@persona/design-system 0.10.7 → 0.10.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 +22 -0
- package/dist/{Action-BLMJwLBV.d.mts → Action-CHWYwpYR.d.mts} +3 -3
- package/dist/Action.d.mts +1 -1
- package/dist/AdvancedFilterRuleRow.d.mts +2 -2
- package/dist/AdvancedFilterRulesPopover.d.mts +2 -2
- package/dist/ArrayValueControl.d.mts +1 -1
- package/dist/Attribute.d.mts +2 -2
- package/dist/{Badge-8YzapjWf.mjs → Badge-BCdsVKuj.mjs} +2 -2
- package/dist/{Badge-8YzapjWf.mjs.map → Badge-BCdsVKuj.mjs.map} +1 -1
- package/dist/BooleanValueControl.d.mts +1 -1
- package/dist/{Breadcrumb-chGXhl3V.d.mts → Breadcrumb-uK4v6_P1.d.mts} +1 -1
- package/dist/Breadcrumb.d.mts +1 -1
- package/dist/{Breadcrumbs-ChKWIuRq.d.mts → Breadcrumbs-3MtvzTPi.d.mts} +2 -2
- package/dist/{Breadcrumbs-Dft2TR4v.mjs → Breadcrumbs-CMf3Uvow.mjs} +4 -4
- package/dist/{Breadcrumbs-Dft2TR4v.mjs.map → Breadcrumbs-CMf3Uvow.mjs.map} +1 -1
- package/dist/Breadcrumbs.d.mts +1 -1
- package/dist/{Button-B79_aXfC.d.mts → Button-DjD8QxcY.d.mts} +4 -4
- package/dist/Button.d.mts +1 -1
- package/dist/{Calendar-50D7poM_.d.mts → Calendar-DRJljp8S.d.mts} +1 -1
- package/dist/Calendar.d.mts +1 -1
- package/dist/CalendarBase.d.mts +1 -1
- package/dist/CalendarCell.d.mts +1 -1
- package/dist/CalendarGrid.d.mts +1 -1
- package/dist/{Card-DOIqF954.d.mts → Card-DiUHtYg_.d.mts} +3 -3
- package/dist/Card.d.mts +1 -1
- package/dist/CardGrouping.d.mts +2 -2
- package/dist/{CardV2-BRJbRSts.mjs → CardV2-ACI5RIzF.mjs} +5 -5
- package/dist/{CardV2-BRJbRSts.mjs.map → CardV2-ACI5RIzF.mjs.map} +1 -1
- package/dist/{Checkbox-EgYclGfH.d.mts → Checkbox-Clt9mCTk.d.mts} +1 -1
- package/dist/Checkbox.d.mts +1 -1
- package/dist/{CheckboxGroupField-Cw-1UxIW.d.mts → CheckboxGroupField-DnVqlpwi.d.mts} +3 -3
- package/dist/CheckboxGroupField.d.mts +1 -1
- package/dist/ChoicesValueControl.d.mts +1 -1
- package/dist/{Combobox-DQxaOCLA.mjs → Combobox-Gb_j1dg6.mjs} +5 -5
- package/dist/{Combobox-DQxaOCLA.mjs.map → Combobox-Gb_j1dg6.mjs.map} +1 -1
- package/dist/{Combobox-BkDYZlUh.d.mts → Combobox-fYZjpn5-.d.mts} +3 -3
- package/dist/Combobox.d.mts +2 -2
- package/dist/{ComboboxBase-1Xy4pnRV.d.mts → ComboboxBase-Mb8HyeAI.d.mts} +6 -6
- package/dist/ComboboxBase.d.mts +1 -1
- package/dist/{ComboboxMultiSelect-DHf7NK7Z.d.mts → ComboboxMultiSelect-C87lkXr7.d.mts} +2 -2
- package/dist/ComboboxMultiSelect.d.mts +1 -1
- package/dist/{ComboboxSingleSelect-Ble5PcXQ.d.mts → ComboboxSingleSelect-CIYakRW5.d.mts} +4 -4
- package/dist/ComboboxSingleSelect.d.mts +1 -1
- package/dist/{CompactBar-DmoFq5i6.d.mts → CompactBar-BLZZWtIE.d.mts} +3 -3
- package/dist/CompactBar.d.mts +1 -1
- package/dist/{ControlBar-dqzVo6e6.d.mts → ControlBar-B3Jn8G0k.d.mts} +6 -5
- package/dist/ControlBar.d.mts +1 -1
- package/dist/{DataTable-Cblw6bLk.d.mts → DataTable-Bf1WDY0z.d.mts} +6 -6
- package/dist/{DataTable-B7QqP6YU.mjs → DataTable-CIZJ1vO8.mjs} +10 -10
- package/dist/{DataTable-B7QqP6YU.mjs.map → DataTable-CIZJ1vO8.mjs.map} +1 -1
- package/dist/DataTable.d.mts +1 -1
- package/dist/{DateField-CbTxDzYF.d.mts → DateField-BIPqfQzC.d.mts} +2 -2
- package/dist/DateField.d.mts +1 -1
- package/dist/{DatePicker-1BADH9Pi.d.mts → DatePicker-BdOqWdwx.d.mts} +2 -2
- package/dist/{DatePicker-CHaNe2Es.mjs → DatePicker-C9redLBr.mjs} +5 -5
- package/dist/{DatePicker-CHaNe2Es.mjs.map → DatePicker-C9redLBr.mjs.map} +1 -1
- package/dist/DatePicker.d.mts +1 -1
- package/dist/{DateRangePicker-fq-_pFpg.d.mts → DateRangePicker-DlHC2q--.d.mts} +3 -3
- package/dist/DateRangePicker.d.mts +1 -1
- package/dist/DateRangeValueControl.d.mts +2 -2
- package/dist/DateValueControl.d.mts +1 -1
- package/dist/{DropdownButton-BiFRlSVD.mjs → DropdownButton-DpLG-cIj.mjs} +3 -3
- package/dist/{DropdownButton-BiFRlSVD.mjs.map → DropdownButton-DpLG-cIj.mjs.map} +1 -1
- package/dist/DropdownButton.d.mts +2 -2
- package/dist/{DropdownMenu-DjdNBJqP.d.mts → DropdownMenu-DVxXQDRC.d.mts} +2 -2
- package/dist/{DropdownMenu-Q8S-9rXm.mjs → DropdownMenu-c8XK2Lr4.mjs} +2 -2
- package/dist/{DropdownMenu-Q8S-9rXm.mjs.map → DropdownMenu-c8XK2Lr4.mjs.map} +1 -1
- package/dist/DropdownMenu.d.mts +1 -1
- package/dist/{ErrorProps-D4G9EWX2.d.mts → ErrorProps-4Ohsinrf.d.mts} +1 -1
- package/dist/ErrorProps.d.mts +1 -1
- package/dist/{FieldRegistry-CPr7YoG5.d.mts → FieldRegistry-C2NVPhMO.d.mts} +2 -2
- package/dist/FieldRegistry.d.mts +1 -1
- package/dist/{FilterBar-DPCPfr4_.d.mts → FilterBar-BE_gBM0H.d.mts} +4 -4
- package/dist/FilterBar.d.mts +1 -1
- package/dist/FilterPickerMenu.d.mts +2 -2
- package/dist/FilterPill.d.mts +1 -1
- package/dist/FilterPopover.d.mts +1 -1
- package/dist/FloatValueControl.d.mts +1 -1
- package/dist/{FloatingActionBar-u3TJcigs.d.mts → FloatingActionBar-BUgSKimy.d.mts} +1 -1
- package/dist/FloatingActionBar.d.mts +1 -1
- package/dist/{FloatingToolbar-Df90f7Dm.mjs → FloatingToolbar-DLRaE0o7.mjs} +3 -3
- package/dist/{FloatingToolbar-Df90f7Dm.mjs.map → FloatingToolbar-DLRaE0o7.mjs.map} +1 -1
- package/dist/{FormControl-D8vpeAPI.d.mts → FormControl-BQe3GRhi.d.mts} +2 -2
- package/dist/FormControl.d.mts +1 -1
- package/dist/FormControlLabel.d.mts +1 -1
- package/dist/{FormField-C6vp1Vfe.d.mts → FormField-BW5uMzId.d.mts} +2 -2
- package/dist/{FormField-BStxmlZT.mjs → FormField-Cf1VMvoa.mjs} +7 -7
- package/dist/{FormField-BStxmlZT.mjs.map → FormField-Cf1VMvoa.mjs.map} +1 -1
- package/dist/FormField.d.mts +1 -1
- package/dist/{Header-C9oYPBLv.d.mts → Header-CV0Lcf0C.d.mts} +1 -1
- package/dist/Header.d.mts +1 -1
- package/dist/{HelperTooltip-jHTdkLQq.d.mts → HelperTooltip-BNM3pTM-.d.mts} +2 -2
- package/dist/HelperTooltip.d.mts +1 -1
- package/dist/HighlightedText.d.mts +2 -2
- package/dist/{HoverCopyableField-CW7Jxmni.mjs → HoverCopyableField-XHC_n9tp.mjs} +2 -2
- package/dist/{HoverCopyableField-CW7Jxmni.mjs.map → HoverCopyableField-XHC_n9tp.mjs.map} +1 -1
- package/dist/{I18nContext-DzV-RDIh.d.mts → I18nContext-Dt5VraO8.d.mts} +2 -2
- package/dist/I18nContext.d.mts +1 -1
- package/dist/{IconButton-CaEvsrOn.d.mts → IconButton-C_ReZm8v.d.mts} +2 -2
- package/dist/{IconButton-DftINsp7.mjs → IconButton-DxHB2g80.mjs} +2 -2
- package/dist/{IconButton-DftINsp7.mjs.map → IconButton-DxHB2g80.mjs.map} +1 -1
- package/dist/IconButton.d.mts +1 -1
- package/dist/ImageTile.d.mts +1 -1
- package/dist/IndexTableLayout.d.mts +5 -5
- package/dist/InlineCombobox.d.mts +1 -1
- package/dist/InlineInput.d.mts +1 -1
- package/dist/{Input-DQ2J9wlC.d.mts → Input-DH-5dKor.d.mts} +3 -3
- package/dist/{Input-DtO3qMnE.mjs → Input-RHXujO9u.mjs} +2 -2
- package/dist/{Input-DtO3qMnE.mjs.map → Input-RHXujO9u.mjs.map} +1 -1
- package/dist/Input.d.mts +1 -1
- package/dist/{InputProps-DrG94eFF.d.mts → InputProps-B363l4_k.d.mts} +2 -2
- package/dist/InputProps.d.mts +1 -1
- package/dist/{Inserter-CZeKlPqj.d.mts → Inserter-BtUatmsd.d.mts} +1 -1
- package/dist/Inserter.d.mts +1 -1
- package/dist/IntegerValueControl.d.mts +1 -1
- package/dist/{Link-DKYmdL9t.mjs → Link-D_kCyLYX.mjs} +2 -2
- package/dist/{Link-DKYmdL9t.mjs.map → Link-D_kCyLYX.mjs.map} +1 -1
- package/dist/Link.d.mts +1 -1
- package/dist/{ListBox-CDG0EAPg.mjs → ListBox-BZp6exb8.mjs} +6 -6
- package/dist/{ListBox-CDG0EAPg.mjs.map → ListBox-BZp6exb8.mjs.map} +1 -1
- package/dist/{ListBox-DxbXE_EE.d.mts → ListBox-DxOACf6N.d.mts} +3 -3
- package/dist/ListBox.d.mts +1 -1
- package/dist/{ListBoxField-DVLggscv.d.mts → ListBoxField-CgnDuhUw.d.mts} +4 -4
- package/dist/ListBoxField.d.mts +1 -1
- package/dist/{LogicRow-DG06PsUe.d.mts → LogicRow-Dv_1G1TC.d.mts} +3 -3
- package/dist/LogicRow.d.mts +1 -1
- package/dist/MaskedInput.d.mts +2 -2
- package/dist/{Menu-EIT_MwK6.mjs → Menu-BVn1jh46.mjs} +2 -2
- package/dist/{Menu-EIT_MwK6.mjs.map → Menu-BVn1jh46.mjs.map} +1 -1
- package/dist/{Menu-Bq6Lij2L.d.mts → Menu-BfjvH8mr.d.mts} +3 -3
- package/dist/Menu.d.mts +1 -1
- package/dist/{Modal-kEgKwLg4.d.mts → Modal-CujB7DuB.d.mts} +6 -3
- package/dist/{Modal-BBlilB-B.mjs → Modal-De5_bPJ_.mjs} +49 -41
- package/dist/Modal-De5_bPJ_.mjs.map +1 -0
- package/dist/Modal.d.mts +1 -1
- package/dist/PageHeader-7_Hf6rHl.mjs +81 -0
- package/dist/PageHeader-7_Hf6rHl.mjs.map +1 -0
- package/dist/{PageHeader-BGGhOS81.d.mts → PageHeader-UPiqJpIF.d.mts} +12 -4
- package/dist/PageHeader.d.mts +1 -1
- package/dist/{PageLayout-B_LKPZD8.d.mts → PageLayout-BdVM37bV.d.mts} +1 -1
- package/dist/PageLayout.d.mts +1 -1
- package/dist/{PageLayoutFrame-uf17F41p.d.mts → PageLayoutFrame-4QGs7x-t.d.mts} +1 -1
- package/dist/PageLayoutFrame.d.mts +1 -1
- package/dist/{PageSelector-CLeG2gFh.d.mts → PageSelector-B5CcAzss.d.mts} +3 -3
- package/dist/PageSelector.d.mts +1 -1
- package/dist/{Pagination-y3kn2X_A.d.mts → Pagination-CCKuudiz.d.mts} +2 -2
- package/dist/{Pagination-C8hPOu0l.mjs → Pagination-DMH2IaV0.mjs} +5 -5
- package/dist/{Pagination-C8hPOu0l.mjs.map → Pagination-DMH2IaV0.mjs.map} +1 -1
- package/dist/Pagination.d.mts +1 -1
- package/dist/{Pii-Bvh_kfGN.mjs → Pii-24D_nSRQ.mjs} +2 -2
- package/dist/{Pii-Bvh_kfGN.mjs.map → Pii-24D_nSRQ.mjs.map} +1 -1
- package/dist/{PillShell-Clv4b-2w.d.mts → PillShell-B7Bm-dsE.d.mts} +2 -2
- package/dist/PillShell.d.mts +1 -1
- package/dist/{ProgressIndicator-tVvf0cY5.d.mts → ProgressIndicator-BoB5JOfV.d.mts} +1 -1
- package/dist/ProgressIndicator.d.mts +1 -1
- package/dist/{PseudoClassProps-D-sdJdnG.d.mts → PseudoClassProps-CIuO49a4.d.mts} +1 -1
- package/dist/PseudoClassProps.d.mts +1 -1
- package/dist/{RadioGroup-9AnTQbh9.d.mts → RadioGroup-D_z37ZOU.d.mts} +1 -1
- package/dist/RadioGroup.d.mts +1 -1
- package/dist/{RangeCalendar-D86xh2yV.d.mts → RangeCalendar-CLCp70w6.d.mts} +2 -2
- package/dist/RangeCalendar.d.mts +1 -1
- package/dist/RangeCalendarPresets.d.mts +2 -2
- package/dist/{RouterContext-Bgg29ZJo.d.mts → RouterContext-DchdVyIX.d.mts} +2 -2
- package/dist/RouterContext.d.mts +1 -1
- package/dist/{RouterLink-CMCsV5H-.d.mts → RouterLink-B6ikC5Kq.d.mts} +2 -2
- package/dist/RouterLink.d.mts +1 -1
- package/dist/RuleEditorFields.d.mts +2 -2
- package/dist/RulesPill.d.mts +1 -1
- package/dist/{SearchInput-NlIspWun.d.mts → SearchInput-D42v7MLp.d.mts} +2 -2
- package/dist/SearchInput.d.mts +1 -1
- package/dist/SectionHeading.d.mts +1 -1
- package/dist/{SegmentedControl-C4C5ge4p.d.mts → SegmentedControl-yVK6kkcx.d.mts} +1 -1
- package/dist/SegmentedControl.d.mts +1 -1
- package/dist/{Select-By_LoM1n.d.mts → Select-CaG6OQi1.d.mts} +3 -3
- package/dist/{Select-DkUMz4LG.mjs → Select-DOlw_LPR.mjs} +4 -4
- package/dist/{Select-DkUMz4LG.mjs.map → Select-DOlw_LPR.mjs.map} +1 -1
- package/dist/Select.d.mts +1 -1
- package/dist/{SingleColumnLayout-C4qrVyMf.d.mts → SingleColumnLayout-D2bpX7X1.d.mts} +2 -2
- package/dist/SingleColumnLayout.d.mts +1 -1
- package/dist/SmartTextInput.d.mts +6 -6
- package/dist/SmartTextInputField.d.mts +2 -2
- package/dist/SmartTextInputFunctionDialog.d.mts +4 -4
- package/dist/SmartTextInputListbox.d.mts +2 -2
- package/dist/SmartTextInputPopover.d.mts +1 -1
- package/dist/{SplitColumnLayout-BXT7AeNx.d.mts → SplitColumnLayout-CRDSDHHm.d.mts} +2 -2
- package/dist/SplitColumnLayout.d.mts +1 -1
- package/dist/{Stack-BqRcxDQM.d.mts → Stack-CODxfzhl.d.mts} +1 -1
- package/dist/Stack.d.mts +1 -1
- package/dist/{StatusIndicator-Zf75KK3O.mjs → StatusIndicator-CzRaEFSz.mjs} +2 -2
- package/dist/{StatusIndicator-Zf75KK3O.mjs.map → StatusIndicator-CzRaEFSz.mjs.map} +1 -1
- package/dist/{Sticker-Bi_fezCO.mjs → Sticker-C1_6I08u.mjs} +3 -3
- package/dist/{Sticker-Bi_fezCO.mjs.map → Sticker-C1_6I08u.mjs.map} +1 -1
- package/dist/{Sticker-C2zp47FB.d.mts → Sticker-CLvRB8V5.d.mts} +4 -4
- package/dist/Sticker.d.mts +1 -1
- package/dist/StringValueControl.d.mts +1 -1
- package/dist/Tab.d.mts +1 -1
- package/dist/{TabBar-DpXYsWgS.mjs → TabBar-BCFO38E0.mjs} +3 -3
- package/dist/{TabBar-DpXYsWgS.mjs.map → TabBar-BCFO38E0.mjs.map} +1 -1
- package/dist/{Table-DGl3mDwc.d.mts → Table-qsIo7V-R.d.mts} +1 -1
- package/dist/Table.d.mts +1 -1
- package/dist/{TableBody-BbC-H2qj.d.mts → TableBody-1fqZP2Cb.d.mts} +1 -1
- package/dist/TableBody.d.mts +1 -1
- package/dist/{TableBox-BfSF36Gy.mjs → TableBox-DNQsgQ8x.mjs} +4 -4
- package/dist/{TableBox-BfSF36Gy.mjs.map → TableBox-DNQsgQ8x.mjs.map} +1 -1
- package/dist/TableBox.d.mts +2 -2
- package/dist/{TableBoxCell-DuvWTwOm.d.mts → TableBoxCell-B9KMWebc.d.mts} +6 -6
- package/dist/TableBoxCell.d.mts +1 -1
- package/dist/{TableBoxField-DRx24VAz.d.mts → TableBoxField-0uIGzBhF.d.mts} +5 -5
- package/dist/TableBoxField.d.mts +1 -1
- package/dist/{TableBoxRow-DFPTf-bZ.d.mts → TableBoxRow-PjBBDcEk.d.mts} +3 -3
- package/dist/TableBoxRow.d.mts +1 -1
- package/dist/{TableBoxRowActions-CFCnGc7D.d.mts → TableBoxRowActions-B7stm6Q3.d.mts} +2 -2
- package/dist/TableBoxRowActions.d.mts +1 -1
- package/dist/{TableCell-Do9W49SJ.d.mts → TableCell-CQsF7t4e.d.mts} +2 -2
- package/dist/TableCell.d.mts +1 -1
- package/dist/{TableControls-Dgle87OP.mjs → TableControls-BrP_BqnF.mjs} +14 -14
- package/dist/TableControls-BrP_BqnF.mjs.map +1 -0
- package/dist/{TableControls-r58fZb_C.d.mts → TableControls-ODHrCDJM.d.mts} +5 -5
- package/dist/TableControls.d.mts +1 -1
- package/dist/{TableControlsContext-nz8GXmXc.d.mts → TableControlsContext-CHuLxfa7.d.mts} +2 -2
- package/dist/TableControlsContext.d.mts +1 -1
- package/dist/{TableHead-CIXIrZGE.d.mts → TableHead-Dq0Fi4hP.d.mts} +1 -1
- package/dist/TableHead.d.mts +1 -1
- package/dist/{TableHeaderCell-wKcp8rZj.d.mts → TableHeaderCell-CAfcFwJy.d.mts} +1 -1
- package/dist/TableHeaderCell.d.mts +1 -1
- package/dist/{TableLayout-0-9FnNvt.d.mts → TableLayout-CM8wiU3C.d.mts} +1 -1
- package/dist/TableLayout.d.mts +1 -1
- package/dist/{TableRow-C011thJ3.d.mts → TableRow-C4eHuRF3.d.mts} +2 -2
- package/dist/TableRow.d.mts +1 -1
- package/dist/TableTH.d.mts +1 -1
- package/dist/{TableViewConfigurationDropdown-D0VcRmd4.d.mts → TableViewConfigurationDropdown-BWBBUXCs.d.mts} +2 -2
- package/dist/TableViewConfigurationDropdown.d.mts +1 -1
- package/dist/{TechnicalSticker-B_JlBkXZ.mjs → TechnicalSticker-Cq5jzYKQ.mjs} +2 -2
- package/dist/{TechnicalSticker-B_JlBkXZ.mjs.map → TechnicalSticker-Cq5jzYKQ.mjs.map} +1 -1
- package/dist/{Text-BgSW0yDb.d.mts → Text-CvaqognH.d.mts} +2 -2
- package/dist/Text.d.mts +1 -1
- package/dist/{TextArea-CyWv8jaV.d.mts → TextArea-BJWEaURJ.d.mts} +2 -2
- package/dist/TextArea.d.mts +1 -1
- package/dist/{TextUnderlineTooltip-CcyG4VkJ.d.mts → TextUnderlineTooltip-Bd5e8KH3.d.mts} +2 -2
- package/dist/TextUnderlineTooltip.d.mts +1 -1
- package/dist/Tile.d.mts +1 -1
- package/dist/Toast.d.mts +1 -1
- package/dist/{Toggle-BIJoB1AA.d.mts → Toggle-CeIDF9yS.d.mts} +1 -1
- package/dist/Toggle.d.mts +1 -1
- package/dist/{Tooltip-CrpfAAfA.d.mts → Tooltip-Ddy2Jq0K.d.mts} +2 -2
- package/dist/Tooltip.d.mts +1 -1
- package/dist/{TruncatedText-DaGx3CX6.d.mts → TruncatedText-sr9Fhm3N.d.mts} +1 -1
- package/dist/VersionHistory.d.mts +1 -1
- package/dist/{VersionHistoryItem-Bo78T7y7.d.mts → VersionHistoryItem-DnKlzuDe.d.mts} +1 -1
- package/dist/VersionHistoryItem.d.mts +1 -1
- package/dist/WizardModal.d.mts +2 -2
- package/dist/{chainTypes-CLKwXymd.d.mts → chainTypes-C5mXGz6T.d.mts} +4 -4
- package/dist/charting-C_WcP3tn.d.mts +16 -0
- package/dist/{clientFilterUtils-BnASP9Tt.d.mts → clientFilterUtils-scLlIuP_.d.mts} +2 -2
- package/dist/clientFilterUtils.d.mts +1 -1
- package/dist/{codec-C4WJftW6.d.mts → codec-BTVOuowZ.d.mts} +2 -2
- package/dist/codec.d.mts +1 -1
- package/dist/complete-typography.d.mts +1 -1
- package/dist/components/Accordion/index.mjs +1 -1
- package/dist/components/Attribute/index.mjs +2 -2
- package/dist/components/Badge/index.mjs +1 -1
- package/dist/components/Banner/index.mjs +1 -1
- package/dist/components/BottomPanel/index.mjs +4 -4
- package/dist/components/Breadcrumbs/index.d.mts +1 -1
- 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 +1 -1
- 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.d.mts +1 -1
- package/dist/components/CodeHighlight/index.mjs +1 -1
- package/dist/components/Combobox/index.d.mts +2 -2
- package/dist/components/Combobox/index.mjs +1 -1
- package/dist/components/DataTable/TableControls/index.d.mts +21 -21
- package/dist/components/DataTable/TableControls/index.mjs +1 -1
- package/dist/components/DataTable/index.d.mts +8 -8
- package/dist/components/DataTable/index.mjs +1 -1
- package/dist/components/DataTable/types.d.mts +1 -1
- package/dist/components/DatePicker/index.d.mts +5 -5
- 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 +2 -2
- package/dist/components/FloatingToolbar/index.mjs +1 -1
- package/dist/components/FormControl/index.d.mts +2 -2
- package/dist/components/FormField/index.d.mts +5 -5
- package/dist/components/FormField/index.mjs +1 -1
- package/dist/components/HoverCopyableField/index.mjs +1 -1
- package/dist/components/ImageTile/index.mjs +2 -2
- 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/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 +3 -3
- package/dist/components/Pagination/index.mjs +1 -1
- package/dist/components/Pii/index.mjs +1 -1
- package/dist/components/ProgressIndicator/index.d.mts +1 -1
- package/dist/components/RadioGroup/index.d.mts +1 -1
- package/dist/components/RichTextEditor/index.mjs +4 -4
- package/dist/components/RightPanel/index.mjs +1 -1
- package/dist/components/SegmentedControl/index.d.mts +1 -1
- package/dist/components/Select/index.d.mts +1 -1
- package/dist/components/Select/index.mjs +1 -1
- package/dist/components/SmartTextInput/index.d.mts +2 -2
- package/dist/components/SmartTextInput/index.mjs +3 -3
- package/dist/components/SmartTextInput/parser/method-chain/types.d.mts +1 -1
- package/dist/components/SmartTextInput/parser/smart-text/types.d.mts +2 -2
- 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/TabBar/index.mjs +1 -1
- package/dist/components/Table/index.d.mts +8 -8
- package/dist/components/TableBox/index.d.mts +2 -2
- 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/TextArea/index.d.mts +1 -1
- package/dist/components/Tile/index.mjs +1 -1
- package/dist/components/Toast/index.mjs +1 -1
- package/dist/components/Toggle/index.d.mts +1 -1
- package/dist/components/Tooltip/index.d.mts +3 -3
- package/dist/components/VersionHistory/index.d.mts +1 -1
- package/dist/components/VersionHistory/index.mjs +4 -4
- package/dist/compound-expression.d.mts +1 -1
- package/dist/{constants-B2NIZBD6.d.mts → constants-ByOakXpZ.d.mts} +1 -1
- package/dist/{constants-ChVceduh.d.mts → constants-DMTL6rF3.d.mts} +1 -1
- package/dist/constants.d.mts +1 -1
- package/dist/constants2.d.mts +1 -1
- package/dist/{createPath-D_opTH9A.d.mts → createPath-BgyL9FVF.d.mts} +2 -2
- package/dist/createPath.d.mts +1 -1
- package/dist/{date-range-rule-value-3izEoXmi.d.mts → date-range-rule-value-ASr06ClE.d.mts} +2 -2
- package/dist/date-range-rule-value.d.mts +1 -1
- package/dist/{date-rule-intent-DjYIGcGO.d.mts → date-rule-intent-DDDCA6kc.d.mts} +3 -3
- package/dist/date-rule-intent.d.mts +1 -1
- package/dist/display.d.mts +2 -2
- package/dist/fieldPickerOptions.d.mts +2 -2
- package/dist/{filter-size-context-BcpjykVw.d.mts → filter-size-context-CmFyIPCm.d.mts} +2 -2
- package/dist/filter-size-context.d.mts +1 -1
- package/dist/{filters-DUI7TLSn.d.mts → filters-yfzOlqKx.d.mts} +2 -2
- package/dist/filters.d.mts +1 -1
- package/dist/{formatDateTime-CgQvW3A5.d.mts → formatDateTime-Cj9XxTNy.d.mts} +1 -1
- package/dist/formatDateTime.d.mts +1 -1
- package/dist/{helpers-CDZ7Zk9G.d.mts → helpers-BeCjgAeE.d.mts} +4 -4
- package/dist/helpers.d.mts +1 -1
- package/dist/{index-CDFw-zKW.d.mts → index-BEHNqAZa.d.mts} +3 -3
- package/dist/{index-B9kfFACl.d.mts → index-CLAjbq8g.d.mts} +1 -1
- package/dist/{index-DntqThoS.d.mts → index-aK04IR94.d.mts} +2 -2
- package/dist/{index-_D_TMpPU.d.mts → index-kIon1vPp.d.mts} +2 -2
- package/dist/index2.d.mts +1 -1
- package/dist/index3.d.mts +1 -1
- package/dist/index4.d.mts +3 -3
- package/dist/index5.d.mts +1 -1
- package/dist/index6.d.mts +14 -14
- package/dist/{input-RTMLTvG1.d.mts → input-JDU1Goyr.d.mts} +3 -3
- package/dist/{inputFields-iRg_emVK.d.mts → inputFields-BnCdmuBt.d.mts} +11 -11
- package/dist/inputFields.d.mts +1 -1
- package/dist/{jsonSchema-BJpNaFc4.d.mts → jsonSchema-C4lfpDrt.d.mts} +1 -1
- package/dist/lib/GlobalStyles.d.mts +19 -2
- package/dist/lib/GlobalStyles.mjs +50 -1
- package/dist/lib/GlobalStyles.mjs.map +1 -1
- package/dist/lib/PDSProvider.d.mts +3 -3
- package/dist/lib/TruncatedText.d.mts +1 -1
- package/dist/lib/TruncatedTextWithTooltip.d.mts +1 -1
- package/dist/lib/chainTypes.d.mts +1 -1
- package/dist/lib/colorMode.d.mts +1 -1
- package/dist/lib/customFunctionSchema.d.mts +1 -1
- package/dist/lib/date-filter/index.d.mts +2 -2
- package/dist/lib/i18n/index.d.mts +3 -3
- package/dist/lib/jsonSchema.d.mts +1 -1
- package/dist/lib/jsonSchemaType.d.mts +1 -1
- package/dist/lib/message.d.mts +1 -1
- package/dist/lib/methodChain.d.mts +2 -2
- package/dist/lib/methodChainNormalize.d.mts +2 -2
- package/dist/lib/methodChainTypes.d.mts +1 -1
- package/dist/lib/objectSchemaTypes.d.mts +1 -1
- package/dist/lib/platformObject.d.mts +1 -1
- package/dist/lib/pseudoClass.d.mts +1 -1
- package/dist/lib/router/adapters/reactRouter.d.mts +1 -1
- package/dist/lib/router/adapters/tanstack.d.mts +1 -1
- package/dist/lib/router/index.d.mts +5 -5
- package/dist/lib/schemaOptions.d.mts +1 -1
- package/dist/lib/semanticColor.d.mts +2 -2
- package/dist/lib/semanticColor.mjs +8 -1
- package/dist/lib/semanticColor.mjs.map +1 -1
- package/dist/lib/useChain.d.mts +1 -1
- package/dist/lint/index.d.mts +1 -1
- package/dist/{listbox-options-D0JmYWjB.d.mts → listbox-options-CDAOiyUH.d.mts} +3 -3
- package/dist/listbox-options.d.mts +1 -1
- package/dist/{message-Bk5UTw75.d.mts → message-BwRBPJXD.d.mts} +1 -1
- package/dist/{methodChain-C3u60_V8.d.mts → methodChain-COb4t-sM.d.mts} +4 -4
- package/dist/{methodChainTypes-Di4GCMX7.d.mts → methodChainTypes-De6sHGyd.d.mts} +2 -2
- package/dist/min-copy-size.d.mts +1 -1
- package/dist/mixins/focus.d.mts +1 -1
- package/dist/mixins/hoverable.d.mts +2 -2
- package/dist/mixins/input.d.mts +1 -1
- package/dist/mixins/menuItem.d.mts +2 -2
- package/dist/mixins/scrollbar.d.mts +1 -1
- package/dist/no-raw-table.d.mts +1 -1
- package/dist/{operators-BTCnQpeu.d.mts → operators-BHxKZcpD.d.mts} +3 -3
- package/dist/operators.d.mts +1 -1
- package/dist/{palette-D61sDyDI.d.mts → palette-DzmqrF_5.d.mts} +2 -2
- package/dist/palette.d.mts +1 -1
- package/dist/patterns/CardGrouping/index.mjs +4 -4
- package/dist/patterns/IndexTableLayout/index.mjs +2 -2
- package/dist/patterns/LayoutLoadingShimmer/index.mjs +2 -2
- package/dist/patterns/PageLayout/index.d.mts +4 -4
- package/dist/patterns/WizardModal/index.mjs +2 -2
- package/dist/reactRouterFallback.d.mts +1 -1
- package/dist/reduced-motion.d.mts +1 -1
- package/dist/relative-date-label.d.mts +1 -1
- package/dist/safe-parse.d.mts +1 -1
- package/dist/{schemaOptions-BKtrXvjR.d.mts → schemaOptions-DMq37JC5.d.mts} +3 -3
- package/dist/semantic-color.d.mts +1 -1
- package/dist/{semanticColor-y9byerSl.d.mts → semanticColor-BKbCliyl.d.mts} +13 -2
- package/dist/shared.d.mts +1 -1
- package/dist/{strings-T-gsdqiJ.d.mts → strings-DQZIO-n7.d.mts} +1 -1
- package/dist/strings.d.mts +1 -1
- package/dist/{theme-BFP-_PEh.d.mts → theme-CeA8jBRG.d.mts} +7 -3
- package/dist/theme.d.mts +1 -1
- package/dist/theme.mjs +7 -3
- package/dist/theme.mjs.map +1 -1
- package/dist/tone.d.mts +1 -1
- package/dist/tree.d.mts +1 -1
- package/dist/{types-BnXYfNrd.d.mts → types-02Ij0dgs.d.mts} +4 -4
- package/dist/{types-B5RbKp2V.d.mts → types-BRYGqFVm.d.mts} +1 -1
- package/dist/{types-BiRayNak.d.mts → types-BXJ6qAGy.d.mts} +3 -3
- package/dist/{types-C31ecr0j.d.mts → types-BeFBvQ1c.d.mts} +3 -3
- package/dist/{types-QYT1VZgy.d.mts → types-CRymR_J9.d.mts} +1 -1
- package/dist/{types-1p-ij0cd.d.mts → types-CqcbWyUY.d.mts} +2 -2
- package/dist/{types-Bu5rhBdH.d.mts → types-D9LBWGw5.d.mts} +1 -1
- package/dist/{types-K57NVM0M.d.mts → types-DLnCkvTt.d.mts} +2 -2
- package/dist/{types-FG-jOit9.d.mts → types-DQVUNrrN.d.mts} +1 -1
- package/dist/{types-Bg_sfqXE.d.mts → types-DeVO4sCM.d.mts} +2 -2
- package/dist/types.d.mts +1 -1
- package/dist/types2.d.mts +1 -1
- package/dist/types3.d.mts +1 -1
- package/dist/types4.d.mts +1 -1
- package/dist/types5.d.mts +1 -1
- package/dist/types6.d.mts +1 -1
- package/dist/types8.d.mts +1 -1
- package/dist/{url-state-DmhG0Qg-.d.mts → url-state-CXUuK3_r.d.mts} +2 -2
- package/dist/url-state.d.mts +1 -1
- package/dist/{useChain-CIwI4Xop.d.mts → useChain-B--KAtdN.d.mts} +6 -6
- package/dist/useChainAtCursor.d.mts +6 -6
- package/dist/useCodeChainFunctionPanel.d.mts +1 -1
- package/dist/useColumnConfiguration.d.mts +2 -2
- package/dist/useComboboxFooterAction.d.mts +1 -1
- package/dist/{useFilterStateV2-DPzkJpGT.d.mts → useFilterStateV2-DBpbxAEC.d.mts} +3 -3
- package/dist/useFilterStateV2.d.mts +1 -1
- package/dist/{useFormField-ATKyX8CU.d.mts → useFormField-CTgW_8x0.d.mts} +2 -2
- package/dist/useFormField.d.mts +1 -1
- package/dist/{useLocationPathname-DPMpqO1_.d.mts → useLocationPathname-CClZoIGm.d.mts} +1 -1
- package/dist/useLocationPathname.d.mts +1 -1
- package/dist/{useTableBoxDragAndDrop-CCMADt-F.d.mts → useTableBoxDragAndDrop-MwbXWWDQ.d.mts} +1 -1
- package/dist/useTableBoxDragAndDrop.d.mts +1 -1
- package/dist/{useTableColumns-Bw0HvnP4.d.mts → useTableColumns-DJFy0Gp8.d.mts} +2 -2
- package/dist/useTableColumns.d.mts +1 -1
- package/dist/useTruncation.d.mts +1 -1
- package/dist/{utilities-BfXjJZQt.d.mts → utilities-BDkho6-f.d.mts} +1 -1
- package/dist/utilities.d.mts +1 -1
- package/dist/utils/testing.d.mts +1 -1
- package/dist/utils.d.mts +1 -1
- package/dist/utils4.d.mts +5 -5
- package/dist/{validation-yhA0siru.d.mts → validation-Tgg3AhuP.d.mts} +3 -3
- package/dist/validation.d.mts +1 -1
- package/dist/validation2.d.mts +4 -4
- package/dist/{value-control-resolver-Df0AmGFe.d.mts → value-control-resolver-XQbGCdsP.d.mts} +2 -2
- package/dist/value-control-resolver.d.mts +1 -1
- package/dist/variables/charting.d.mts +2 -0
- package/dist/variables/charting.mjs +134 -0
- package/dist/variables/charting.mjs.map +1 -0
- package/dist/variables/effect.d.mts +1 -1
- package/llms.txt +1 -1
- package/package.json +5 -3
- package/skills/ui-authoring/TOKENS.md +5 -0
- package/dist/Modal-BBlilB-B.mjs.map +0 -1
- package/dist/PageHeader-DEKTopzU.mjs +0 -75
- package/dist/PageHeader-DEKTopzU.mjs.map +0 -1
- package/dist/TableControls-Dgle87OP.mjs.map +0 -1
- /package/dist/{index-BAJc0Rej.d.mts → index-0-W_aPej.d.mts} +0 -0
- /package/dist/{index-BFHp82YL.d.mts → index-1-AkepUA.d.mts} +0 -0
- /package/dist/{index-BYd3Btr1.d.mts → index-B33elXxm.d.mts} +0 -0
- /package/dist/{index-CEUVsenl.d.mts → index-B6T7ov8p.d.mts} +0 -0
- /package/dist/{index-CEqOS-7M.d.mts → index-B9SJORI12.d.mts} +0 -0
- /package/dist/{index-CNxS4Tlu.d.mts → index-BINnViIh.d.mts} +0 -0
- /package/dist/{index-CP2eJYlK.d.mts → index-BNRXMhlr.d.mts} +0 -0
- /package/dist/{index-CQQezDJQ2.d.mts → index-BRJ_6A42.d.mts} +0 -0
- /package/dist/{index-CWB6exYm.d.mts → index-BsHUlSyF.d.mts} +0 -0
- /package/dist/{index-CcSfkYLp2.d.mts → index-CCKHlTA4.d.mts} +0 -0
- /package/dist/{index-CjDodOH2.d.mts → index-CCt0lwyI.d.mts} +0 -0
- /package/dist/{index-Cm-1i165.d.mts → index-CIABef8t.d.mts} +0 -0
- /package/dist/{index-D-giXKyu.d.mts → index-CaqYCRmZ.d.mts} +0 -0
- /package/dist/{index-D4DUvwPf.d.mts → index-CoUVmp_Q.d.mts} +0 -0
- /package/dist/{index-DCTy4zg0.d.mts → index-CuYZJcK3.d.mts} +0 -0
- /package/dist/{index-DWIh4oP5.d.mts → index-CuheJfs-.d.mts} +0 -0
- /package/dist/{index-Dflz2i1X.d.mts → index-Cx0vQ6ld.d.mts} +0 -0
- /package/dist/{index-DhiymMxa.d.mts → index-CzUpNo0e.d.mts} +0 -0
- /package/dist/{index-DkrC-i1D.d.mts → index-CzdAgLVp.d.mts} +0 -0
- /package/dist/{index-Dp7lwkTl2.d.mts → index-DG59sVPG2.d.mts} +0 -0
- /package/dist/{index-DqCA6utX.d.mts → index-DMRtRo7y.d.mts} +0 -0
- /package/dist/{index-Iujpc9_6.d.mts → index-DNjQe1D8.d.mts} +0 -0
- /package/dist/{index-Jh0C5PIG.d.mts → index-DeVKzGce.d.mts} +0 -0
- /package/dist/{index-N-OgGgfF.d.mts → index-DedbSZMv.d.mts} +0 -0
- /package/dist/{index-Oio5ygqN.d.mts → index-Deol7ZWO.d.mts} +0 -0
- /package/dist/{index-Rvd9MEUQ.d.mts → index-Es5nKSSL.d.mts} +0 -0
- /package/dist/{index-YB8V3VRW.d.mts → index-K614ZhWK.d.mts} +0 -0
- /package/dist/{index-aKlsLnwy.d.mts → index-KEHKKJEa.d.mts} +0 -0
- /package/dist/{index-fxXoW-qc.d.mts → index-PQbV5sXG2.d.mts} +0 -0
- /package/dist/{index-ikHBE458.d.mts → index-dhjtMp5F.d.mts} +0 -0
- /package/dist/{index-luywJTzJ.d.mts → index-dzI_9J-Z.d.mts} +0 -0
- /package/dist/{index-xmouCHX9.d.mts → index-lTcag11w.d.mts} +0 -0
package/dist/ErrorProps.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as ErrorProps } from "./ErrorProps-
|
|
1
|
+
import { t as ErrorProps } from "./ErrorProps-4Ohsinrf.mjs";
|
|
2
2
|
export { ErrorProps as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { l as FilterOperator, o as FilterField } from "./types-
|
|
1
|
+
import { l as FilterOperator, o as FilterField } from "./types-DLnCkvTt.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/components/DataTable/TableControls/FiltersV2/FieldRegistry.d.ts
|
|
4
4
|
/**
|
|
@@ -119,4 +119,4 @@ declare function buildFieldRegistry(resource: string, fieldKeyToInfo: Record<str
|
|
|
119
119
|
}): FieldRegistry;
|
|
120
120
|
//#endregion
|
|
121
121
|
export { RawFieldInfo as n, buildFieldRegistry as r, FieldRegistry as t };
|
|
122
|
-
//# sourceMappingURL=FieldRegistry-
|
|
122
|
+
//# sourceMappingURL=FieldRegistry-C2NVPhMO.d.mts.map
|
package/dist/FieldRegistry.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as RawFieldInfo, r as buildFieldRegistry, t as FieldRegistry } from "./FieldRegistry-
|
|
1
|
+
import { n as RawFieldInfo, r as buildFieldRegistry, t as FieldRegistry } from "./FieldRegistry-C2NVPhMO.mjs";
|
|
2
2
|
export { FieldRegistry, RawFieldInfo, buildFieldRegistry };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { m as FilterStateV2, p as FilterSize } from "./types-
|
|
2
|
-
import { t as FieldRegistry } from "./FieldRegistry-
|
|
3
|
-
import { n as ValueControlResolver } from "./value-control-resolver-
|
|
1
|
+
import { m as FilterStateV2, p as FilterSize } from "./types-DLnCkvTt.mjs";
|
|
2
|
+
import { t as FieldRegistry } from "./FieldRegistry-C2NVPhMO.mjs";
|
|
3
|
+
import { n as ValueControlResolver } from "./value-control-resolver-XQbGCdsP.mjs";
|
|
4
4
|
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
5
5
|
|
|
6
6
|
//#region src/components/DataTable/TableControls/FiltersV2/FilterBar/FilterBar.d.ts
|
|
@@ -113,4 +113,4 @@ declare function FilterBar({
|
|
|
113
113
|
}: FilterBarProps): _$react_jsx_runtime0.JSX.Element;
|
|
114
114
|
//#endregion
|
|
115
115
|
export { FilterBarProps as n, FilterBar as t };
|
|
116
|
-
//# sourceMappingURL=FilterBar-
|
|
116
|
+
//# sourceMappingURL=FilterBar-BE_gBM0H.d.mts.map
|
package/dist/FilterBar.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as FilterBarProps, t as FilterBar } from "./FilterBar-
|
|
1
|
+
import { n as FilterBarProps, t as FilterBar } from "./FilterBar-BE_gBM0H.mjs";
|
|
2
2
|
export { FilterBarProps, FilterBar as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { o as FilterField, p as FilterSize } from "./types-
|
|
2
|
-
import { t as FieldRegistry } from "./FieldRegistry-
|
|
1
|
+
import { o as FilterField, p as FilterSize } from "./types-DLnCkvTt.mjs";
|
|
2
|
+
import { t as FieldRegistry } from "./FieldRegistry-C2NVPhMO.mjs";
|
|
3
3
|
import { HTMLAttributes } from "react";
|
|
4
4
|
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
5
5
|
|
package/dist/FilterPill.d.mts
CHANGED
package/dist/FilterPopover.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { l as FilterOperator, o as FilterField, p as FilterSize } from "./types-
|
|
1
|
+
import { l as FilterOperator, o as FilterField, p as FilterSize } from "./types-DLnCkvTt.mjs";
|
|
2
2
|
import { ReactNode } from "react";
|
|
3
3
|
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as ValueControlProps } from "./types-
|
|
1
|
+
import { t as ValueControlProps } from "./types-CqcbWyUY.mjs";
|
|
2
2
|
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/DataTable/TableControls/FiltersV2/value-controls/FloatValueControl/FloatValueControl.d.ts
|
|
@@ -38,4 +38,4 @@ declare const FloatingActionBar: ({
|
|
|
38
38
|
}: FloatingActionBarProps) => _$react_jsx_runtime0.JSX.Element;
|
|
39
39
|
//#endregion
|
|
40
40
|
export { FloatingActionBar as t };
|
|
41
|
-
//# sourceMappingURL=FloatingActionBar-
|
|
41
|
+
//# sourceMappingURL=FloatingActionBar-BUgSKimy.d.mts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as FloatingActionBar } from "./FloatingActionBar-
|
|
1
|
+
import { t as FloatingActionBar } from "./FloatingActionBar-BUgSKimy.mjs";
|
|
2
2
|
export { FloatingActionBar as default };
|
|
@@ -2,9 +2,9 @@ import { a as styled } from "./styledComponentsInterop-Cs5CCPRy.mjs";
|
|
|
2
2
|
import "./variables/transitions.mjs";
|
|
3
3
|
import { Z_INDICES } from "./lib/zindex.mjs";
|
|
4
4
|
import { n as Stack } from "./Stack-Bzom2BTR.mjs";
|
|
5
|
-
import { t as IconButton } from "./IconButton-
|
|
5
|
+
import { t as IconButton } from "./IconButton-DxHB2g80.mjs";
|
|
6
6
|
import Input_default from "./components/Input/index.mjs";
|
|
7
|
-
import { n as DropdownMenu_default } from "./DropdownMenu-
|
|
7
|
+
import { n as DropdownMenu_default } from "./DropdownMenu-c8XK2Lr4.mjs";
|
|
8
8
|
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
9
9
|
import { BorderRadius, Color, Spacing } from "@persona/design-tokens";
|
|
10
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -490,4 +490,4 @@ function FloatingToolbar({ editor, showOnFocus = false }) {
|
|
|
490
490
|
//#endregion
|
|
491
491
|
export { ensureProtocol as n, FloatingToolbar as t };
|
|
492
492
|
|
|
493
|
-
//# sourceMappingURL=FloatingToolbar-
|
|
493
|
+
//# sourceMappingURL=FloatingToolbar-DLRaE0o7.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FloatingToolbar-Df90f7Dm.mjs","names":["Input","DropdownMenu"],"sources":["../src/components/FloatingToolbar/FloatingToolbar.tsx"],"sourcesContent":["import { PluginKey } from '@tiptap/pm/state';\nimport type { EditorView } from '@tiptap/pm/view';\nimport { useEditorState, type Editor } from '@tiptap/react';\nimport { BubbleMenu } from '@tiptap/react/menus';\nimport { AnimatePresence, motion } from 'framer-motion';\nimport { useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport styled from 'styled-components';\n\nimport { BorderRadius, Color, Spacing } from '@persona/design-tokens';\nimport {\n BoldIcon,\n CheckIcon,\n GridIcon,\n ItalicIcon,\n LinkIcon,\n ListIcon,\n UnlinkIcon,\n XIcon,\n} from '@persona/icons';\n\nimport { IconButton } from '#src/components/Button';\nimport DropdownMenu from '#src/components/DropdownMenu';\nimport Input from '#src/components/Input';\nimport Stack from '#src/components/Stack';\nimport { Z_INDICES } from '#src/lib/zindex';\nimport { TransitionDuration } from '#src/variables/transitions';\n\n// Core* colors throughout this file are intentional: the bubble toolbar is an\n// always-dark inverse surface floating over the editor, so it must not track\n// the semantic surface theme.\nconst BubbleMenuBar = styled(Stack)`\n padding: ${Spacing[1]} ${Spacing[2]};\n background-color: ${Color.CoreSlate1100};\n border-radius: ${BorderRadius.Lg};\n`;\n\nconst IconContainer = styled(motion.div)`\n display: flex;\n gap: ${Spacing[1]};\n`;\n\nconst InverseIconButton = styled(IconButton)<{ $selected?: boolean }>`\n background-color: ${({ $selected }) => ($selected ? Color.CoreSlate900 : 'transparent')};\n color: ${Color.PrimaryWhite};\n transition: background-color ${TransitionDuration.ExtraFast} ease-out;\n\n &:hover:not(:disabled) {\n background-color: ${Color.CoreSlate800};\n }\n\n &:disabled {\n background-color: transparent;\n opacity: 0.35;\n }\n`;\n\nconst InverseInput = styled(Input)`\n background-color: ${Color.CoreSlate900};\n color: ${Color.PrimaryWhite};\n\n :focus-within {\n border-color: ${Color.CoreBlue700};\n }\n ::placeholder {\n color: ${Color.TextDisabled};\n }\n\n input {\n background-color: ${Color.CoreSlate900};\n color: ${Color.PrimaryWhite};\n }\n`;\n\nconst StyledDropdownItem = styled(DropdownMenu.Item)`\n width: 100%;\n height: 30px;\n font-size: small;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n`;\n\n// Floating UI takes its offset as numbers while the spacing tokens are CSS lengths.\nconst TOOLBAR_GAP = parseInt(Spacing[1]);\n\n// Anchored to the field, the toolbar lines up with the input's left edge; over a\n// selection it sits back a notch so it does not crowd the first selected glyph.\nconst FIELD_OFFSET = { mainAxis: TOOLBAR_GAP, crossAxis: 0 };\nconst SELECTION_OFFSET = { mainAxis: TOOLBAR_GAP, crossAxis: -parseInt(Spacing[2]) };\n\n// The element EditorContent mounts the editor into — the visible field. Tiptap\n// types `options.element` loosely, so fall back to the editable root.\nconst getFieldElement = (editor: Editor): Element =>\n editor.options.element instanceof Element ? editor.options.element : editor.view.dom;\n\n// Schemes we trust as link targets. Anything else (no scheme, or an unsafe one\n// like javascript:/data:/vbscript:) is treated as a bare host and forced onto\n// https, which both preserves host:port input and neutralizes script schemes.\nconst SAFE_LINK_SCHEME = /^(https?|mailto|tel):/i;\nconst URI_SCHEME = /^[a-zA-Z][a-zA-Z0-9+.-]*:/;\n\nexport const ensureProtocol = (url: string): string => {\n const trimmedUrl = url.trim();\n if (!trimmedUrl) {\n return '';\n }\n // Handlebars placeholders (e.g. {{inquiry.id}}) are legitimate link targets in\n // templated messages — the template render produces the final URL, so pass\n // the expression through unvalidated. Only when nothing before the first\n // placeholder looks like an unsafe scheme: javascript:alert(1)//{{x}} would\n // otherwise smuggle a script href past the allowlist. URL parsers strip C0\n // controls, tabs and spaces before reading the scheme, so normalize the\n // prefix the same way first — java\\tscript:...{{x}} must not slip through.\n if (trimmedUrl.includes('{{')) {\n const beforePlaceholder = trimmedUrl\n .slice(0, trimmedUrl.indexOf('{{'))\n // eslint-disable-next-line no-control-regex -- mirrors how URL parsers strip C0/space before reading the scheme\n .replace(/[\\u0000-\\u0020]/g, '');\n if (!URI_SCHEME.test(beforePlaceholder) || SAFE_LINK_SCHEME.test(beforePlaceholder)) {\n return trimmedUrl;\n }\n return '';\n }\n const candidate = SAFE_LINK_SCHEME.test(trimmedUrl) ? trimmedUrl : `https://${trimmedUrl}`;\n // Re-parse so malformed input — including an unsafe scheme that can't survive\n // the https prefix — is dropped instead of applied as a broken href.\n return URL.canParse(candidate) ? candidate : '';\n};\n\ninterface FloatingToolbarProps {\n /** TipTap editor instance to operate on. */\n editor: Editor | null;\n /**\n * Keep the toolbar up the whole time the editor is focused instead of only\n * while text is selected, so the formatting actions are discoverable without\n * knowing to select first.\n */\n showOnFocus?: boolean;\n}\n\n/**\n * Floating bubble toolbar that appears on text selection or inside a table, or —\n * with `showOnFocus` — for as long as the editor is focused.\n * Keyboard shortcut: Cmd/Ctrl+Shift+U opens the link-edit row.\n */\nfunction FloatingToolbar({ editor, showOnFocus = false }: FloatingToolbarProps) {\n const [linkURL, setLinkURL] = useState('');\n const [editingLink, setEditingLink] = useState(false);\n const linkInputRef = useRef<HTMLInputElement>(null);\n const toolbarRef = useRef<HTMLDivElement>(null);\n const savedSelection = useRef<{ from: number; to: number } | null>(null);\n const editingLinkRef = useRef(editingLink);\n const blurTimeout = useRef<ReturnType<typeof setTimeout>>();\n // Lets the toolbar close its own bubble menu plugin via a `hide` meta.\n const [pluginKey] = useState(() => new PluginKey('floatingToolbar'));\n\n useEffect(() => () => clearTimeout(blurTimeout.current), []);\n\n useEffect(() => {\n editingLinkRef.current = editingLink;\n }, [editingLink]);\n\n const restoreSelection = useCallback(() => {\n if (editor && savedSelection.current) {\n const { from, to } = savedSelection.current;\n editor.chain().focus().setTextSelection({ from, to }).run();\n }\n }, [editor]);\n\n const openLinkEditingMode = useCallback(() => {\n if (!editor) {\n return;\n }\n if (!editor.can().chain().toggleLink({ href: 'https://www.google.com' }).run()) {\n return;\n }\n\n const { from, to } = editor.state.selection;\n savedSelection.current = { from, to };\n\n const linkAttr = editor.getAttributes('link');\n if (linkAttr.href) {\n setLinkURL(linkAttr.href);\n }\n\n editor.chain().focus().setTextSelection({ from, to }).run();\n setEditingLink(true);\n\n setTimeout(() => {\n linkInputRef.current?.focus();\n }, 250);\n }, [editor]);\n\n // Cmd/Ctrl+Shift+U → open link mode; Escape inside link mode → cancel.\n useEffect(() => {\n if (!editor) {\n return undefined;\n }\n const dom = editor.view.dom;\n const handler = (event: KeyboardEvent) => {\n if ((event.metaKey || event.ctrlKey) && event.shiftKey && event.key.toLowerCase() === 'u') {\n event.preventDefault();\n openLinkEditingMode();\n return;\n }\n if (event.key === 'Escape' && editingLinkRef.current) {\n event.preventDefault();\n setEditingLink(false);\n setLinkURL('');\n savedSelection.current = null;\n }\n };\n dom.addEventListener('keydown', handler);\n return () => {\n dom.removeEventListener('keydown', handler);\n };\n }, [editor, openLinkEditingMode]);\n\n // Keep selection highlighted while focus is in the link input.\n useEffect(() => {\n if (!editingLink || !editor || !savedSelection.current) {\n return undefined;\n }\n restoreSelection();\n const timeoutId = setTimeout(() => {\n restoreSelection();\n editor.view.dom?.focus();\n }, 0);\n return () => clearTimeout(timeoutId);\n }, [editingLink, restoreSelection, editor]);\n\n // Pressing a toolbar button focuses that button, and the command's own\n // transaction re-runs this check before the chained `.focus()` hands focus\n // back to the editor. Ignoring focus held inside the toolbar therefore tears\n // the bar down for a frame mid-click, taking the pressed button with it.\n const isFocusWithinToolbar = useCallback(\n () => !!toolbarRef.current?.contains(document.activeElement),\n [],\n );\n\n // BubbleMenu dispatches an options-update transaction whenever these props\n // change identity, and editors that re-render per transaction would then\n // loop — so keep them stable across renders.\n const bubbleMenuOptions = useMemo(\n () => ({\n placement: 'top-start' as const,\n offset: showOnFocus ? FIELD_OFFSET : SELECTION_OFFSET,\n }),\n [showOnFocus],\n );\n\n // Sitting above the field rather than the selection: a toolbar that is up\n // for the whole time the field is focused looks jumpy if it chases the\n // caret and hops between selections.\n const getReferencedVirtualElement = useMemo(\n () =>\n showOnFocus && editor\n ? () => ({ getBoundingClientRect: () => getFieldElement(editor).getBoundingClientRect() })\n : undefined,\n [editor, showOnFocus],\n );\n\n const shouldShow = useCallback(\n ({\n editor: e,\n view,\n from,\n to,\n }: {\n editor: Editor;\n view: EditorView;\n from: number;\n to: number;\n }) => {\n if (!e.isEditable) {\n return false;\n }\n if (e.isActive('mention')) {\n return false;\n }\n // The toolbar carries the table-actions dropdown — a collapsed caret\n // inside a table must still show it or row/column controls are\n // unreachable.\n if (e.isActive('table')) {\n return true;\n }\n if (from !== to) {\n return true;\n }\n return showOnFocus && (view.hasFocus() || isFocusWithinToolbar());\n },\n [isFocusWithinToolbar, showOnFocus],\n );\n\n // Self-subscribe: standalone use can't rely on the host's useEditor options (shouldRerenderOnTransaction is off by default in Tiptap 3).\n const editorState = useEditorState({\n editor,\n selector: (snapshot) =>\n snapshot.editor && {\n isBold: snapshot.editor.isActive('bold'),\n canBold: snapshot.editor.can().chain().toggleBold().run(),\n isItalic: snapshot.editor.isActive('italic'),\n canItalic: snapshot.editor.can().chain().toggleItalic().run(),\n isLink: snapshot.editor.isActive('link'),\n isBulletList: snapshot.editor.isActive('bulletList'),\n canLink: snapshot.editor.can().chain().toggleLink({ href: 'https://www.google.com' }).run(),\n isTable: snapshot.editor.isActive('table'),\n canInsertTable: snapshot.editor\n .can()\n .chain()\n .insertTable({ rows: 3, cols: 3, withHeaderRow: true })\n .run(),\n },\n });\n\n if (!editor || !editorState) {\n return null;\n }\n\n // The plugin closes the toolbar off the editor's blur, which cannot fire again\n // once focus has moved in here, so leaving from the toolbar has to close it.\n // Focus only lands on its next target after this event, hence the tick.\n const handleToolbarBlur = () => {\n blurTimeout.current = setTimeout(() => {\n if (editor.isDestroyed || isFocusWithinToolbar() || editor.view.hasFocus()) {\n return;\n }\n editor.view.dispatch(editor.state.tr.setMeta(pluginKey, 'hide'));\n });\n };\n\n return (\n <BubbleMenu\n editor={editor}\n pluginKey={pluginKey}\n options={bubbleMenuOptions}\n getReferencedVirtualElement={getReferencedVirtualElement}\n shouldShow={shouldShow}\n // Floating UI sets no z-index on the portaled menu (Tippy used 9999).\n style={{ zIndex: Z_INDICES.modalElevated }}\n >\n <AnimatePresence>\n <BubbleMenuBar\n ref={toolbarRef}\n role='toolbar'\n aria-label='Text formatting'\n direction='horizontal'\n spacing={Spacing[1]}\n onBlur={handleToolbarBlur}\n >\n {!editingLink ? (\n <IconContainer\n key='main-toolbar'\n layout\n initial={{ x: -10, opacity: 0 }}\n animate={{ x: 0, opacity: 1 }}\n exit={{ x: -10, opacity: 0 }}\n transition={{ duration: 0.2, ease: 'easeOut' }}\n >\n <InverseIconButton\n onClick={() => editor.chain().focus().toggleBulletList().run()}\n $selected={editorState.isBulletList}\n size='sm'\n type='button'\n aria-label='Toggle bullet list'\n data-rte-menu-bar-item\n >\n <ListIcon />\n </InverseIconButton>\n <InverseIconButton\n onClick={() => editor.chain().focus().toggleBold().run()}\n disabled={!editorState.canBold}\n $selected={editorState.isBold}\n size='sm'\n type='button'\n aria-label='Toggle bold'\n data-rte-menu-bar-item\n >\n <BoldIcon />\n </InverseIconButton>\n <InverseIconButton\n onClick={() => editor.chain().focus().toggleItalic().run()}\n $selected={editorState.isItalic}\n disabled={!editorState.canItalic}\n type='button'\n size='sm'\n aria-label='Toggle italic'\n data-rte-menu-bar-item\n >\n <ItalicIcon />\n </InverseIconButton>\n <InverseIconButton\n onClick={(e) => {\n e.preventDefault();\n e.stopPropagation();\n openLinkEditingMode();\n }}\n $selected={editorState.isLink}\n disabled={!editorState.canLink}\n size='sm'\n type='button'\n aria-label='Toggle link'\n data-rte-menu-bar-item\n >\n <LinkIcon />\n </InverseIconButton>\n {editorState.isTable ? (\n <DropdownMenu\n contentProps={{\n // @ts-expect-error data attribute on dropdown menu\n 'data-rte-menu-bar-item': 'table-actions-dropdown-menu',\n onCloseAutoFocus: (event) => {\n event.preventDefault();\n editor.commands.focus();\n },\n }}\n trigger={\n <InverseIconButton\n size='sm'\n type='button'\n aria-label='Table actions'\n data-rte-menu-bar-item\n $selected\n >\n <GridIcon />\n </InverseIconButton>\n }\n >\n <StyledDropdownItem\n id='floating-toolbar__tableAddRowAfter'\n variant='basic'\n data-rte-menu-bar-item='table-add-row-after'\n onClick={() => editor.chain().focus().addRowAfter().run()}\n >\n Add row below\n </StyledDropdownItem>\n <StyledDropdownItem\n id='floating-toolbar__tableAddRowBefore'\n variant='basic'\n data-rte-menu-bar-item='table-add-row-before'\n onClick={() => editor.chain().focus().addRowBefore().run()}\n >\n Add row above\n </StyledDropdownItem>\n <StyledDropdownItem\n id='floating-toolbar__tableAddColumnAfter'\n variant='basic'\n data-rte-menu-bar-item='table-add-column-after'\n onClick={() => editor.chain().focus().addColumnAfter().run()}\n >\n Add column right\n </StyledDropdownItem>\n <StyledDropdownItem\n id='floating-toolbar__tableAddColumnBefore'\n variant='basic'\n data-rte-menu-bar-item='table-add-column-before'\n onClick={() => editor.chain().focus().addColumnBefore().run()}\n >\n Add column left\n </StyledDropdownItem>\n <StyledDropdownItem\n id='floating-toolbar__tableDeleteRow'\n variant='basic'\n data-rte-menu-bar-item='table-delete-row'\n onClick={() => editor.chain().focus().deleteRow().run()}\n >\n Delete row\n </StyledDropdownItem>\n <StyledDropdownItem\n id='floating-toolbar__tableDeleteColumn'\n variant='basic'\n data-rte-menu-bar-item='table-delete-column'\n onClick={() => editor.chain().focus().deleteColumn().run()}\n >\n Delete column\n </StyledDropdownItem>\n <StyledDropdownItem\n id='floating-toolbar__tableToggleHeaderRow'\n variant='basic'\n data-rte-menu-bar-item='table-toggle-header-row'\n onClick={() => editor.chain().focus().toggleHeaderRow().run()}\n >\n Toggle header row\n </StyledDropdownItem>\n <StyledDropdownItem\n id='floating-toolbar__tableDelete'\n variant='basic'\n data-rte-menu-bar-item='table-delete'\n onClick={() => editor.chain().focus().deleteTable().run()}\n >\n Delete table\n </StyledDropdownItem>\n </DropdownMenu>\n ) : (\n <InverseIconButton\n onClick={() =>\n editor\n .chain()\n .focus()\n .insertTable({ rows: 3, cols: 3, withHeaderRow: true })\n .run()\n }\n disabled={!editorState.canInsertTable}\n size='sm'\n type='button'\n aria-label='Insert table'\n data-rte-menu-bar-item\n >\n <GridIcon />\n </InverseIconButton>\n )}\n </IconContainer>\n ) : (\n <IconContainer\n key='link-toolbar'\n initial={{ x: -10, opacity: 0 }}\n animate={{ x: 0, opacity: 1 }}\n exit={{ x: -10, opacity: 0 }}\n transition={{ duration: 0.2, ease: 'easeOut' }}\n aria-label='Link toolbar'\n onAnimationComplete={() => {\n if (editor && savedSelection.current) {\n setTimeout(() => {\n restoreSelection();\n linkInputRef.current?.focus();\n }, 10);\n }\n }}\n >\n <InverseInput\n ref={linkInputRef}\n size='sm'\n value={linkURL}\n onChange={(e) => setLinkURL(e.target.value)}\n placeholder='Click to enter URL...'\n aria-label='Link input'\n data-rte-menu-bar-item\n onClick={() => {\n linkInputRef.current?.focus();\n }}\n onFocus={() => {\n if (savedSelection.current && editor) {\n const { from, to } = savedSelection.current;\n editor.chain().setTextSelection({ from, to }).run();\n }\n }}\n onKeyDown={(e) => {\n if (e.key === 'Enter' && linkURL.trim() && editor && savedSelection.current) {\n e.preventDefault();\n e.stopPropagation();\n const { from, to } = savedSelection.current;\n editor\n .chain()\n .focus()\n .setTextSelection({ from, to })\n .setLink({ href: ensureProtocol(linkURL) })\n .run();\n savedSelection.current = null;\n setEditingLink(false);\n setLinkURL('');\n return;\n }\n if (e.key === 'Escape') {\n e.preventDefault();\n e.stopPropagation();\n setEditingLink(false);\n setLinkURL('');\n savedSelection.current = null;\n const { from, to } = editor.state.selection;\n editor.chain().focus().setTextSelection({ from, to }).run();\n }\n }}\n />\n <InverseIconButton\n onClick={(e) => {\n e.preventDefault();\n e.stopPropagation();\n if (linkURL) {\n editor.chain().focus().unsetLink().run();\n }\n restoreSelection();\n setLinkURL('');\n savedSelection.current = null;\n setEditingLink(false);\n }}\n size='sm'\n type='button'\n aria-label='Cancel link'\n data-rte-menu-bar-item\n >\n {linkURL && editorState.isLink ? <UnlinkIcon /> : <XIcon />}\n </InverseIconButton>\n <InverseIconButton\n onClick={(e) => {\n e.preventDefault();\n e.stopPropagation();\n if (linkURL.trim() && editor && savedSelection.current) {\n const { from, to } = savedSelection.current;\n editor\n .chain()\n .focus()\n .setTextSelection({ from, to })\n .setLink({ href: ensureProtocol(linkURL) })\n .run();\n } else if (editor && savedSelection.current) {\n const { from, to } = savedSelection.current;\n editor.chain().focus().setTextSelection({ from, to }).unsetLink().run();\n }\n savedSelection.current = null;\n setEditingLink(false);\n setLinkURL('');\n }}\n size='sm'\n type='button'\n aria-label='Apply link'\n data-rte-menu-bar-item\n >\n <CheckIcon />\n </InverseIconButton>\n </IconContainer>\n )}\n </BubbleMenuBar>\n </AnimatePresence>\n </BubbleMenu>\n );\n}\n\nexport default FloatingToolbar;\n"],"mappings":";;;;;;;;;;;;;;;;AA8BA,MAAM,gBAAgB,OAAO,MAAM;aACtB,QAAQ,GAAG,GAAG,QAAQ,GAAG;sBAChB,MAAM,cAAc;mBACvB,aAAa,GAAG;;AAGnC,MAAM,gBAAgB,OAAO,OAAO,IAAI;;SAE/B,QAAQ,GAAG;;AAGpB,MAAM,oBAAoB,OAAO,WAAW;uBACrB,EAAE,gBAAiB,YAAY,MAAM,eAAe,cAAe;WAC/E,MAAM,aAAa;yCACgC;;;wBAGtC,MAAM,aAAa;;;;;;;;AAS3C,MAAM,eAAe,OAAOA,cAAM;sBACZ,MAAM,aAAa;WAC9B,MAAM,aAAa;;;oBAGV,MAAM,YAAY;;;aAGzB,MAAM,aAAa;;;;wBAIR,MAAM,aAAa;aAC9B,MAAM,aAAa;;;AAIhC,MAAM,qBAAqB,OAAOC,qBAAa,KAAK;;;;;;;;AAUpD,MAAM,cAAc,SAAS,QAAQ,GAAG;AAIxC,MAAM,eAAe;CAAE,UAAU;CAAa,WAAW;CAAG;AAC5D,MAAM,mBAAmB;CAAE,UAAU;CAAa,WAAW,CAAC,SAAS,QAAQ,GAAG;CAAE;AAIpF,MAAM,mBAAmB,WACvB,OAAO,QAAQ,mBAAmB,UAAU,OAAO,QAAQ,UAAU,OAAO,KAAK;AAKnF,MAAM,mBAAmB;AACzB,MAAM,aAAa;AAEnB,MAAa,kBAAkB,QAAwB;CACrD,MAAM,aAAa,IAAI,MAAM;AAC7B,KAA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AW,GAAG;;MAEhB,MAAK;MACL,MAAK;MACL,cAAW;MACX,0BAAA;gBAEA,oBAAC,WAAD,EAAa,CAAA;MACK,CAAA;KACN;MAzGV,eAyGU;GAEJ,CAAA,EACA,CAAA;EACP,CAAA"}
|
|
1
|
+
{"version":3,"file":"FloatingToolbar-DLRaE0o7.mjs","names":["Input","DropdownMenu"],"sources":["../src/components/FloatingToolbar/FloatingToolbar.tsx"],"sourcesContent":["import { PluginKey } from '@tiptap/pm/state';\nimport type { EditorView } from '@tiptap/pm/view';\nimport { useEditorState, type Editor } from '@tiptap/react';\nimport { BubbleMenu } from '@tiptap/react/menus';\nimport { AnimatePresence, motion } from 'framer-motion';\nimport { useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport styled from 'styled-components';\n\nimport { BorderRadius, Color, Spacing } from '@persona/design-tokens';\nimport {\n BoldIcon,\n CheckIcon,\n GridIcon,\n ItalicIcon,\n LinkIcon,\n ListIcon,\n UnlinkIcon,\n XIcon,\n} from '@persona/icons';\n\nimport { IconButton } from '#src/components/Button';\nimport DropdownMenu from '#src/components/DropdownMenu';\nimport Input from '#src/components/Input';\nimport Stack from '#src/components/Stack';\nimport { Z_INDICES } from '#src/lib/zindex';\nimport { TransitionDuration } from '#src/variables/transitions';\n\n// Core* colors throughout this file are intentional: the bubble toolbar is an\n// always-dark inverse surface floating over the editor, so it must not track\n// the semantic surface theme.\nconst BubbleMenuBar = styled(Stack)`\n padding: ${Spacing[1]} ${Spacing[2]};\n background-color: ${Color.CoreSlate1100};\n border-radius: ${BorderRadius.Lg};\n`;\n\nconst IconContainer = styled(motion.div)`\n display: flex;\n gap: ${Spacing[1]};\n`;\n\nconst InverseIconButton = styled(IconButton)<{ $selected?: boolean }>`\n background-color: ${({ $selected }) => ($selected ? Color.CoreSlate900 : 'transparent')};\n color: ${Color.PrimaryWhite};\n transition: background-color ${TransitionDuration.ExtraFast} ease-out;\n\n &:hover:not(:disabled) {\n background-color: ${Color.CoreSlate800};\n }\n\n &:disabled {\n background-color: transparent;\n opacity: 0.35;\n }\n`;\n\nconst InverseInput = styled(Input)`\n background-color: ${Color.CoreSlate900};\n color: ${Color.PrimaryWhite};\n\n :focus-within {\n border-color: ${Color.CoreBlue700};\n }\n ::placeholder {\n color: ${Color.TextDisabled};\n }\n\n input {\n background-color: ${Color.CoreSlate900};\n color: ${Color.PrimaryWhite};\n }\n`;\n\nconst StyledDropdownItem = styled(DropdownMenu.Item)`\n width: 100%;\n height: 30px;\n font-size: small;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n`;\n\n// Floating UI takes its offset as numbers while the spacing tokens are CSS lengths.\nconst TOOLBAR_GAP = parseInt(Spacing[1]);\n\n// Anchored to the field, the toolbar lines up with the input's left edge; over a\n// selection it sits back a notch so it does not crowd the first selected glyph.\nconst FIELD_OFFSET = { mainAxis: TOOLBAR_GAP, crossAxis: 0 };\nconst SELECTION_OFFSET = { mainAxis: TOOLBAR_GAP, crossAxis: -parseInt(Spacing[2]) };\n\n// The element EditorContent mounts the editor into — the visible field. Tiptap\n// types `options.element` loosely, so fall back to the editable root.\nconst getFieldElement = (editor: Editor): Element =>\n editor.options.element instanceof Element ? editor.options.element : editor.view.dom;\n\n// Schemes we trust as link targets. Anything else (no scheme, or an unsafe one\n// like javascript:/data:/vbscript:) is treated as a bare host and forced onto\n// https, which both preserves host:port input and neutralizes script schemes.\nconst SAFE_LINK_SCHEME = /^(https?|mailto|tel):/i;\nconst URI_SCHEME = /^[a-zA-Z][a-zA-Z0-9+.-]*:/;\n\nexport const ensureProtocol = (url: string): string => {\n const trimmedUrl = url.trim();\n if (!trimmedUrl) {\n return '';\n }\n // Handlebars placeholders (e.g. {{inquiry.id}}) are legitimate link targets in\n // templated messages — the template render produces the final URL, so pass\n // the expression through unvalidated. Only when nothing before the first\n // placeholder looks like an unsafe scheme: javascript:alert(1)//{{x}} would\n // otherwise smuggle a script href past the allowlist. URL parsers strip C0\n // controls, tabs and spaces before reading the scheme, so normalize the\n // prefix the same way first — java\\tscript:...{{x}} must not slip through.\n if (trimmedUrl.includes('{{')) {\n const beforePlaceholder = trimmedUrl\n .slice(0, trimmedUrl.indexOf('{{'))\n // eslint-disable-next-line no-control-regex -- mirrors how URL parsers strip C0/space before reading the scheme\n .replace(/[\\u0000-\\u0020]/g, '');\n if (!URI_SCHEME.test(beforePlaceholder) || SAFE_LINK_SCHEME.test(beforePlaceholder)) {\n return trimmedUrl;\n }\n return '';\n }\n const candidate = SAFE_LINK_SCHEME.test(trimmedUrl) ? trimmedUrl : `https://${trimmedUrl}`;\n // Re-parse so malformed input — including an unsafe scheme that can't survive\n // the https prefix — is dropped instead of applied as a broken href.\n return URL.canParse(candidate) ? candidate : '';\n};\n\ninterface FloatingToolbarProps {\n /** TipTap editor instance to operate on. */\n editor: Editor | null;\n /**\n * Keep the toolbar up the whole time the editor is focused instead of only\n * while text is selected, so the formatting actions are discoverable without\n * knowing to select first.\n */\n showOnFocus?: boolean;\n}\n\n/**\n * Floating bubble toolbar that appears on text selection or inside a table, or —\n * with `showOnFocus` — for as long as the editor is focused.\n * Keyboard shortcut: Cmd/Ctrl+Shift+U opens the link-edit row.\n */\nfunction FloatingToolbar({ editor, showOnFocus = false }: FloatingToolbarProps) {\n const [linkURL, setLinkURL] = useState('');\n const [editingLink, setEditingLink] = useState(false);\n const linkInputRef = useRef<HTMLInputElement>(null);\n const toolbarRef = useRef<HTMLDivElement>(null);\n const savedSelection = useRef<{ from: number; to: number } | null>(null);\n const editingLinkRef = useRef(editingLink);\n const blurTimeout = useRef<ReturnType<typeof setTimeout>>();\n // Lets the toolbar close its own bubble menu plugin via a `hide` meta.\n const [pluginKey] = useState(() => new PluginKey('floatingToolbar'));\n\n useEffect(() => () => clearTimeout(blurTimeout.current), []);\n\n useEffect(() => {\n editingLinkRef.current = editingLink;\n }, [editingLink]);\n\n const restoreSelection = useCallback(() => {\n if (editor && savedSelection.current) {\n const { from, to } = savedSelection.current;\n editor.chain().focus().setTextSelection({ from, to }).run();\n }\n }, [editor]);\n\n const openLinkEditingMode = useCallback(() => {\n if (!editor) {\n return;\n }\n if (!editor.can().chain().toggleLink({ href: 'https://www.google.com' }).run()) {\n return;\n }\n\n const { from, to } = editor.state.selection;\n savedSelection.current = { from, to };\n\n const linkAttr = editor.getAttributes('link');\n if (linkAttr.href) {\n setLinkURL(linkAttr.href);\n }\n\n editor.chain().focus().setTextSelection({ from, to }).run();\n setEditingLink(true);\n\n setTimeout(() => {\n linkInputRef.current?.focus();\n }, 250);\n }, [editor]);\n\n // Cmd/Ctrl+Shift+U → open link mode; Escape inside link mode → cancel.\n useEffect(() => {\n if (!editor) {\n return undefined;\n }\n const dom = editor.view.dom;\n const handler = (event: KeyboardEvent) => {\n if ((event.metaKey || event.ctrlKey) && event.shiftKey && event.key.toLowerCase() === 'u') {\n event.preventDefault();\n openLinkEditingMode();\n return;\n }\n if (event.key === 'Escape' && editingLinkRef.current) {\n event.preventDefault();\n setEditingLink(false);\n setLinkURL('');\n savedSelection.current = null;\n }\n };\n dom.addEventListener('keydown', handler);\n return () => {\n dom.removeEventListener('keydown', handler);\n };\n }, [editor, openLinkEditingMode]);\n\n // Keep selection highlighted while focus is in the link input.\n useEffect(() => {\n if (!editingLink || !editor || !savedSelection.current) {\n return undefined;\n }\n restoreSelection();\n const timeoutId = setTimeout(() => {\n restoreSelection();\n editor.view.dom?.focus();\n }, 0);\n return () => clearTimeout(timeoutId);\n }, [editingLink, restoreSelection, editor]);\n\n // Pressing a toolbar button focuses that button, and the command's own\n // transaction re-runs this check before the chained `.focus()` hands focus\n // back to the editor. Ignoring focus held inside the toolbar therefore tears\n // the bar down for a frame mid-click, taking the pressed button with it.\n const isFocusWithinToolbar = useCallback(\n () => !!toolbarRef.current?.contains(document.activeElement),\n [],\n );\n\n // BubbleMenu dispatches an options-update transaction whenever these props\n // change identity, and editors that re-render per transaction would then\n // loop — so keep them stable across renders.\n const bubbleMenuOptions = useMemo(\n () => ({\n placement: 'top-start' as const,\n offset: showOnFocus ? FIELD_OFFSET : SELECTION_OFFSET,\n }),\n [showOnFocus],\n );\n\n // Sitting above the field rather than the selection: a toolbar that is up\n // for the whole time the field is focused looks jumpy if it chases the\n // caret and hops between selections.\n const getReferencedVirtualElement = useMemo(\n () =>\n showOnFocus && editor\n ? () => ({ getBoundingClientRect: () => getFieldElement(editor).getBoundingClientRect() })\n : undefined,\n [editor, showOnFocus],\n );\n\n const shouldShow = useCallback(\n ({\n editor: e,\n view,\n from,\n to,\n }: {\n editor: Editor;\n view: EditorView;\n from: number;\n to: number;\n }) => {\n if (!e.isEditable) {\n return false;\n }\n if (e.isActive('mention')) {\n return false;\n }\n // The toolbar carries the table-actions dropdown — a collapsed caret\n // inside a table must still show it or row/column controls are\n // unreachable.\n if (e.isActive('table')) {\n return true;\n }\n if (from !== to) {\n return true;\n }\n return showOnFocus && (view.hasFocus() || isFocusWithinToolbar());\n },\n [isFocusWithinToolbar, showOnFocus],\n );\n\n // Self-subscribe: standalone use can't rely on the host's useEditor options (shouldRerenderOnTransaction is off by default in Tiptap 3).\n const editorState = useEditorState({\n editor,\n selector: (snapshot) =>\n snapshot.editor && {\n isBold: snapshot.editor.isActive('bold'),\n canBold: snapshot.editor.can().chain().toggleBold().run(),\n isItalic: snapshot.editor.isActive('italic'),\n canItalic: snapshot.editor.can().chain().toggleItalic().run(),\n isLink: snapshot.editor.isActive('link'),\n isBulletList: snapshot.editor.isActive('bulletList'),\n canLink: snapshot.editor.can().chain().toggleLink({ href: 'https://www.google.com' }).run(),\n isTable: snapshot.editor.isActive('table'),\n canInsertTable: snapshot.editor\n .can()\n .chain()\n .insertTable({ rows: 3, cols: 3, withHeaderRow: true })\n .run(),\n },\n });\n\n if (!editor || !editorState) {\n return null;\n }\n\n // The plugin closes the toolbar off the editor's blur, which cannot fire again\n // once focus has moved in here, so leaving from the toolbar has to close it.\n // Focus only lands on its next target after this event, hence the tick.\n const handleToolbarBlur = () => {\n blurTimeout.current = setTimeout(() => {\n if (editor.isDestroyed || isFocusWithinToolbar() || editor.view.hasFocus()) {\n return;\n }\n editor.view.dispatch(editor.state.tr.setMeta(pluginKey, 'hide'));\n });\n };\n\n return (\n <BubbleMenu\n editor={editor}\n pluginKey={pluginKey}\n options={bubbleMenuOptions}\n getReferencedVirtualElement={getReferencedVirtualElement}\n shouldShow={shouldShow}\n // Floating UI sets no z-index on the portaled menu (Tippy used 9999).\n style={{ zIndex: Z_INDICES.modalElevated }}\n >\n <AnimatePresence>\n <BubbleMenuBar\n ref={toolbarRef}\n role='toolbar'\n aria-label='Text formatting'\n direction='horizontal'\n spacing={Spacing[1]}\n onBlur={handleToolbarBlur}\n >\n {!editingLink ? (\n <IconContainer\n key='main-toolbar'\n layout\n initial={{ x: -10, opacity: 0 }}\n animate={{ x: 0, opacity: 1 }}\n exit={{ x: -10, opacity: 0 }}\n transition={{ duration: 0.2, ease: 'easeOut' }}\n >\n <InverseIconButton\n onClick={() => editor.chain().focus().toggleBulletList().run()}\n $selected={editorState.isBulletList}\n size='sm'\n type='button'\n aria-label='Toggle bullet list'\n data-rte-menu-bar-item\n >\n <ListIcon />\n </InverseIconButton>\n <InverseIconButton\n onClick={() => editor.chain().focus().toggleBold().run()}\n disabled={!editorState.canBold}\n $selected={editorState.isBold}\n size='sm'\n type='button'\n aria-label='Toggle bold'\n data-rte-menu-bar-item\n >\n <BoldIcon />\n </InverseIconButton>\n <InverseIconButton\n onClick={() => editor.chain().focus().toggleItalic().run()}\n $selected={editorState.isItalic}\n disabled={!editorState.canItalic}\n type='button'\n size='sm'\n aria-label='Toggle italic'\n data-rte-menu-bar-item\n >\n <ItalicIcon />\n </InverseIconButton>\n <InverseIconButton\n onClick={(e) => {\n e.preventDefault();\n e.stopPropagation();\n openLinkEditingMode();\n }}\n $selected={editorState.isLink}\n disabled={!editorState.canLink}\n size='sm'\n type='button'\n aria-label='Toggle link'\n data-rte-menu-bar-item\n >\n <LinkIcon />\n </InverseIconButton>\n {editorState.isTable ? (\n <DropdownMenu\n contentProps={{\n // @ts-expect-error data attribute on dropdown menu\n 'data-rte-menu-bar-item': 'table-actions-dropdown-menu',\n onCloseAutoFocus: (event) => {\n event.preventDefault();\n editor.commands.focus();\n },\n }}\n trigger={\n <InverseIconButton\n size='sm'\n type='button'\n aria-label='Table actions'\n data-rte-menu-bar-item\n $selected\n >\n <GridIcon />\n </InverseIconButton>\n }\n >\n <StyledDropdownItem\n id='floating-toolbar__tableAddRowAfter'\n variant='basic'\n data-rte-menu-bar-item='table-add-row-after'\n onClick={() => editor.chain().focus().addRowAfter().run()}\n >\n Add row below\n </StyledDropdownItem>\n <StyledDropdownItem\n id='floating-toolbar__tableAddRowBefore'\n variant='basic'\n data-rte-menu-bar-item='table-add-row-before'\n onClick={() => editor.chain().focus().addRowBefore().run()}\n >\n Add row above\n </StyledDropdownItem>\n <StyledDropdownItem\n id='floating-toolbar__tableAddColumnAfter'\n variant='basic'\n data-rte-menu-bar-item='table-add-column-after'\n onClick={() => editor.chain().focus().addColumnAfter().run()}\n >\n Add column right\n </StyledDropdownItem>\n <StyledDropdownItem\n id='floating-toolbar__tableAddColumnBefore'\n variant='basic'\n data-rte-menu-bar-item='table-add-column-before'\n onClick={() => editor.chain().focus().addColumnBefore().run()}\n >\n Add column left\n </StyledDropdownItem>\n <StyledDropdownItem\n id='floating-toolbar__tableDeleteRow'\n variant='basic'\n data-rte-menu-bar-item='table-delete-row'\n onClick={() => editor.chain().focus().deleteRow().run()}\n >\n Delete row\n </StyledDropdownItem>\n <StyledDropdownItem\n id='floating-toolbar__tableDeleteColumn'\n variant='basic'\n data-rte-menu-bar-item='table-delete-column'\n onClick={() => editor.chain().focus().deleteColumn().run()}\n >\n Delete column\n </StyledDropdownItem>\n <StyledDropdownItem\n id='floating-toolbar__tableToggleHeaderRow'\n variant='basic'\n data-rte-menu-bar-item='table-toggle-header-row'\n onClick={() => editor.chain().focus().toggleHeaderRow().run()}\n >\n Toggle header row\n </StyledDropdownItem>\n <StyledDropdownItem\n id='floating-toolbar__tableDelete'\n variant='basic'\n data-rte-menu-bar-item='table-delete'\n onClick={() => editor.chain().focus().deleteTable().run()}\n >\n Delete table\n </StyledDropdownItem>\n </DropdownMenu>\n ) : (\n <InverseIconButton\n onClick={() =>\n editor\n .chain()\n .focus()\n .insertTable({ rows: 3, cols: 3, withHeaderRow: true })\n .run()\n }\n disabled={!editorState.canInsertTable}\n size='sm'\n type='button'\n aria-label='Insert table'\n data-rte-menu-bar-item\n >\n <GridIcon />\n </InverseIconButton>\n )}\n </IconContainer>\n ) : (\n <IconContainer\n key='link-toolbar'\n initial={{ x: -10, opacity: 0 }}\n animate={{ x: 0, opacity: 1 }}\n exit={{ x: -10, opacity: 0 }}\n transition={{ duration: 0.2, ease: 'easeOut' }}\n aria-label='Link toolbar'\n onAnimationComplete={() => {\n if (editor && savedSelection.current) {\n setTimeout(() => {\n restoreSelection();\n linkInputRef.current?.focus();\n }, 10);\n }\n }}\n >\n <InverseInput\n ref={linkInputRef}\n size='sm'\n value={linkURL}\n onChange={(e) => setLinkURL(e.target.value)}\n placeholder='Click to enter URL...'\n aria-label='Link input'\n data-rte-menu-bar-item\n onClick={() => {\n linkInputRef.current?.focus();\n }}\n onFocus={() => {\n if (savedSelection.current && editor) {\n const { from, to } = savedSelection.current;\n editor.chain().setTextSelection({ from, to }).run();\n }\n }}\n onKeyDown={(e) => {\n if (e.key === 'Enter' && linkURL.trim() && editor && savedSelection.current) {\n e.preventDefault();\n e.stopPropagation();\n const { from, to } = savedSelection.current;\n editor\n .chain()\n .focus()\n .setTextSelection({ from, to })\n .setLink({ href: ensureProtocol(linkURL) })\n .run();\n savedSelection.current = null;\n setEditingLink(false);\n setLinkURL('');\n return;\n }\n if (e.key === 'Escape') {\n e.preventDefault();\n e.stopPropagation();\n setEditingLink(false);\n setLinkURL('');\n savedSelection.current = null;\n const { from, to } = editor.state.selection;\n editor.chain().focus().setTextSelection({ from, to }).run();\n }\n }}\n />\n <InverseIconButton\n onClick={(e) => {\n e.preventDefault();\n e.stopPropagation();\n if (linkURL) {\n editor.chain().focus().unsetLink().run();\n }\n restoreSelection();\n setLinkURL('');\n savedSelection.current = null;\n setEditingLink(false);\n }}\n size='sm'\n type='button'\n aria-label='Cancel link'\n data-rte-menu-bar-item\n >\n {linkURL && editorState.isLink ? <UnlinkIcon /> : <XIcon />}\n </InverseIconButton>\n <InverseIconButton\n onClick={(e) => {\n e.preventDefault();\n e.stopPropagation();\n if (linkURL.trim() && editor && savedSelection.current) {\n const { from, to } = savedSelection.current;\n editor\n .chain()\n .focus()\n .setTextSelection({ from, to })\n .setLink({ href: ensureProtocol(linkURL) })\n .run();\n } else if (editor && savedSelection.current) {\n const { from, to } = savedSelection.current;\n editor.chain().focus().setTextSelection({ from, to }).unsetLink().run();\n }\n savedSelection.current = null;\n setEditingLink(false);\n setLinkURL('');\n }}\n size='sm'\n type='button'\n aria-label='Apply link'\n data-rte-menu-bar-item\n >\n <CheckIcon />\n </InverseIconButton>\n </IconContainer>\n )}\n </BubbleMenuBar>\n </AnimatePresence>\n </BubbleMenu>\n );\n}\n\nexport default FloatingToolbar;\n"],"mappings":";;;;;;;;;;;;;;;;AA8BA,MAAM,gBAAgB,OAAO,MAAM;aACtB,QAAQ,GAAG,GAAG,QAAQ,GAAG;sBAChB,MAAM,cAAc;mBACvB,aAAa,GAAG;;AAGnC,MAAM,gBAAgB,OAAO,OAAO,IAAI;;SAE/B,QAAQ,GAAG;;AAGpB,MAAM,oBAAoB,OAAO,WAAW;uBACrB,EAAE,gBAAiB,YAAY,MAAM,eAAe,cAAe;WAC/E,MAAM,aAAa;yCACgC;;;wBAGtC,MAAM,aAAa;;;;;;;;AAS3C,MAAM,eAAe,OAAOA,cAAM;sBACZ,MAAM,aAAa;WAC9B,MAAM,aAAa;;;oBAGV,MAAM,YAAY;;;aAGzB,MAAM,aAAa;;;;wBAIR,MAAM,aAAa;aAC9B,MAAM,aAAa;;;AAIhC,MAAM,qBAAqB,OAAOC,qBAAa,KAAK;;;;;;;;AAUpD,MAAM,cA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AAO,eAAe;AACpC,eACG,OAAO,CACP,OAAO,CACP,iBAAiB;SAAE;SAAM;SAAI,CAAC,CAC9B,QAAQ,EAAE,MAAM,eAAe,QAAQ,EAAE,CAAC,CAC1C,KAAK;kBACC,UAAU,eAAe,SAAS;QAC3C,MAAM,EAAE,MAAM,OAAO,eAAe;AACpC,eAAO,OAAO,CAAC,OAAO,CAAC,iBAAiB;SAAE;SAAM;SAAI,CAAC,CAAC,WAAW,CAAC,KAAK;;AAEzE,sBAAe,UAAU;AACzB,sBAAe,MAAM;AACrB,kBAAW,GAAG;;MAEhB,MAAK;MACL,MAAK;MACL,cAAW;MACX,0BAAA;gBAEA,oBAAC,WAAD,EAAa,CAAA;MACK,CAAA;KACN;MAzGV,eAyGU;GAEJ,CAAA,EACA,CAAA;EACP,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as ErrorProps } from "./ErrorProps-
|
|
1
|
+
import { t as ErrorProps } from "./ErrorProps-4Ohsinrf.mjs";
|
|
2
2
|
import * as _$react from "react";
|
|
3
3
|
import { ComponentPropsWithoutRef, ReactNode } from "react";
|
|
4
4
|
import * as _$styled_components0 from "styled-components";
|
|
@@ -61,4 +61,4 @@ interface FormControlProps extends ComponentPropsWithoutRef<'div'>, FormControlB
|
|
|
61
61
|
declare const FormControl: _$react.ForwardRefExoticComponent<FormControlProps & _$react.RefAttributes<HTMLDivElement>>;
|
|
62
62
|
//#endregion
|
|
63
63
|
export { FormControlProps as a, FormLabelProps as c, FormControlBaseProps as i, HelperText as l, ErrorText as n, FormInputContainer as o, FormControl as r, FormLabel as s, Container as t, WarningText as u };
|
|
64
|
-
//# sourceMappingURL=FormControl-
|
|
64
|
+
//# sourceMappingURL=FormControl-BQe3GRhi.d.mts.map
|
package/dist/FormControl.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as FormControlProps, c as FormLabelProps, i as FormControlBaseProps, l as HelperText, n as ErrorText, o as FormInputContainer, r as FormControl, s as FormLabel, t as Container, u as WarningText } from "./FormControl-
|
|
1
|
+
import { a as FormControlProps, c as FormLabelProps, i as FormControlBaseProps, l as HelperText, n as ErrorText, o as FormInputContainer, r as FormControl, s as FormLabel, t as Container, u as WarningText } from "./FormControl-BQe3GRhi.mjs";
|
|
2
2
|
export { Container, ErrorText, FormControl, FormControl as default, FormControlBaseProps, FormControlProps, FormInputContainer, FormLabel, FormLabelProps, HelperText, WarningText };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as ParagraphProps, o as LabelProps, u as SpanProps } from "./Text-
|
|
1
|
+
import { c as ParagraphProps, o as LabelProps, u as SpanProps } from "./Text-CvaqognH.mjs";
|
|
2
2
|
import * as _$react from "react";
|
|
3
3
|
import * as _$styled_components0 from "styled-components";
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as FormControlProps, l as HelperText, n as ErrorText, s as FormLabel, u as WarningText } from "./FormControl-
|
|
1
|
+
import { a as FormControlProps, l as HelperText, n as ErrorText, s as FormLabel, u as WarningText } from "./FormControl-BQe3GRhi.mjs";
|
|
2
2
|
import * as _$react from "react";
|
|
3
3
|
import { ComponentPropsWithRef, ReactElement, ReactNode } from "react";
|
|
4
4
|
|
|
@@ -67,4 +67,4 @@ interface FormFieldProps extends Omit<FormControlProps, 'children'>, FormFieldBa
|
|
|
67
67
|
declare const FormField: _$react.ForwardRefExoticComponent<FormFieldProps & _$react.RefAttributes<HTMLDivElement>>;
|
|
68
68
|
//#endregion
|
|
69
69
|
export { FormFieldBaseProps as n, FormFieldProps as r, FormField as t };
|
|
70
|
-
//# sourceMappingURL=FormField-
|
|
70
|
+
//# sourceMappingURL=FormField-BW5uMzId.d.mts.map
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { t as HStack } from "./Stack-Bzom2BTR.mjs";
|
|
2
|
-
import { t as IconButton } from "./IconButton-
|
|
2
|
+
import { t as IconButton } from "./IconButton-DxHB2g80.mjs";
|
|
3
3
|
import { n as useFormGroup } from "./useFormGroup-DSQkoWLh.mjs";
|
|
4
4
|
import { t as FormControlContext } from "./useFormField-pOVkb5BK.mjs";
|
|
5
5
|
import Input_default from "./components/Input/index.mjs";
|
|
6
|
-
import { n as DropdownMenu_default } from "./DropdownMenu-
|
|
6
|
+
import { n as DropdownMenu_default } from "./DropdownMenu-c8XK2Lr4.mjs";
|
|
7
7
|
import { t as Checkbox } from "./Checkbox-Dr4LMKHV.mjs";
|
|
8
|
-
import { t as Combobox } from "./Combobox-
|
|
9
|
-
import { n as Select } from "./Select-
|
|
8
|
+
import { t as Combobox } from "./Combobox-Gb_j1dg6.mjs";
|
|
9
|
+
import { n as Select } from "./Select-DOlw_LPR.mjs";
|
|
10
10
|
import { a as FormLabel, i as FormInputContainer, n as ErrorText, o as HelperText, r as FormControl, s as WarningText } from "./FormControl-BztNXLn6.mjs";
|
|
11
|
-
import { t as ListBox } from "./ListBox-
|
|
11
|
+
import { t as ListBox } from "./ListBox-BZp6exb8.mjs";
|
|
12
12
|
import { t as RadioGroup } from "./RadioGroup-CMrXmmn4.mjs";
|
|
13
13
|
import { t as SegmentedControl } from "./SegmentedControl-D_DA-MU1.mjs";
|
|
14
14
|
import { t as TextAreaWithStyle } from "./TextArea-Dro-HH8O.mjs";
|
|
15
15
|
import { t as Toggle } from "./Toggle-D9MzTIZs.mjs";
|
|
16
|
-
import { t as TableBox } from "./TableBox-
|
|
16
|
+
import { t as TableBox } from "./TableBox-DNQsgQ8x.mjs";
|
|
17
17
|
import { Children, Fragment, cloneElement, createContext, forwardRef, useContext, useMemo, useRef, useState } from "react";
|
|
18
18
|
import { Spacing } from "@persona/design-tokens";
|
|
19
19
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -483,4 +483,4 @@ TableBoxField.Cell = TableBox.Cell;
|
|
|
483
483
|
//#endregion
|
|
484
484
|
export { CheckboxField as a, SegmentedControlField as c, TextField as d, ToggleField as f, CheckboxGroupField as i, SelectField as l, FormField as m, TableBoxField as n, ComboboxField as o, splitOutFormFieldProps as p, ListBoxField as r, RadioGroupField as s, TABLE_BOX_FIELD_ADD_BUTTON_ARIA_LABEL as t, TextAreaField as u };
|
|
485
485
|
|
|
486
|
-
//# sourceMappingURL=FormField-
|
|
486
|
+
//# sourceMappingURL=FormField-Cf1VMvoa.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormField-BStxmlZT.mjs","names":["Input","TextArea","DropdownMenu","DropdownMenu"],"sources":["../src/components/FormField/FormField.tsx","../src/components/FormField/inputFields.tsx","../src/components/FormField/CheckboxGroupField.tsx","../src/components/FormField/ListBoxField.tsx","../src/components/FormField/TableBoxField.tsx"],"sourcesContent":["import { type ComponentPropsWithRef, forwardRef, type ReactElement, type ReactNode } from 'react';\n\nimport { Spacing } from '@persona/design-tokens';\n\nimport useFormGroup from '#src/components/ConfigFormGroup/useFormGroup';\nimport FormControl, {\n ErrorText,\n type FormControlProps,\n FormInputContainer,\n FormLabel,\n HelperText,\n WarningText,\n} from '#src/components/FormControl';\nimport { HStack } from '#src/components/Stack';\n\nexport interface FormFieldBaseProps {\n /**\n * Renders `<Label>` above input\n */\n label?: ReactNode;\n\n /**\n * ID of the input element. Providing this will automatically link the label to the input.\n */\n inputId?: string;\n\n /** Marks the field as required. The label renders an asterisk; composed fields also forward `required` to their input. */\n required?: boolean;\n\n /**\n * Renders `<HelperText>` below input\n */\n helperText?: ReactNode;\n\n /**\n * Renders `<ErrorText>` below input and helper text.\n */\n errorText?: ReactNode;\n\n /**\n * Renders `<WarningText>` below input and helper text.\n */\n warningText?: ReactNode;\n\n /**\n * Should be an input of some sort\n */\n children?: ReactElement;\n\n labelProps?: ComponentPropsWithRef<typeof FormLabel>;\n helperProps?: ComponentPropsWithRef<typeof HelperText>;\n warningProps?: ComponentPropsWithRef<typeof WarningText>;\n errorProps?: ComponentPropsWithRef<typeof ErrorText>;\n\n /**\n * Whether to render the form field as a config field.\n * This will render the helper text as a tooltip.\n */\n configField?: boolean;\n\n /**\n * Override the width of the input area when `configField` is true.\n * Accepts any valid CSS width value (e.g. `'33%'`, `'66.67%'`).\n * Defaults to `'50%'`.\n */\n configFieldInputWidth?: string;\n\n /**\n * Renders actions to the right of the label.\n */\n rightActions?: ReactNode;\n}\n\nexport interface FormFieldProps extends Omit<FormControlProps, 'children'>, FormFieldBaseProps {}\n\n/**\n * Helper component with preset slots for label, input, and helper texts.\n *\n * Prefer a composed field component, such as `<TextField>`, `<SelectField>`, or\n * `<CheckboxField>`, when one is available for the input type. Use `<FormField>` directly\n * when composing a custom control or layout.\n *\n * ## Usage\n *\n * ```tsx\n * import FormField from '@persona/design-system/components/FormField';\n * ```\n */\nexport const FormField = forwardRef<HTMLDivElement, FormFieldProps>(function FormField(\n {\n label,\n children,\n helperText,\n warningText,\n errorText,\n labelProps,\n helperProps,\n warningProps,\n errorProps,\n configField: configFieldProp,\n configFieldInputWidth,\n rightActions,\n ...props\n }: FormFieldProps,\n ref,\n) {\n const { configField: configFieldFormGroup } = useFormGroup();\n const configField = configFieldProp ?? configFieldFormGroup;\n\n const labelElement = label ? (\n <FormLabel tooltip={configField && helperText ? helperText : undefined} {...labelProps}>\n {label}\n </FormLabel>\n ) : null;\n\n return (\n <FormControl\n hasError={!!errorText}\n hasWarning={!!warningText}\n ref={ref}\n configField={configField}\n hasRightActions={!!rightActions}\n configFieldInputWidth={configFieldInputWidth}\n {...props}\n >\n {rightActions ? (\n <HStack justify='space-between' align='center'>\n {labelElement}\n <HStack spacing={Spacing[1]}>{rightActions}</HStack>\n </HStack>\n ) : (\n labelElement\n )}\n <FormInputContainer>{children}</FormInputContainer>\n {!configField && helperText && <HelperText {...helperProps}>{helperText}</HelperText>}\n {!configField && warningText && <WarningText {...warningProps}>{warningText}</WarningText>}\n {!configField && errorText && <ErrorText {...errorProps}>{errorText}</ErrorText>}\n </FormControl>\n );\n});\n\nexport default FormField;\n","import { uniqueId } from 'lodash-es';\nimport { forwardRef, useMemo } from 'react';\n\nimport Checkbox, { type CheckboxProps } from '#src/components/Checkbox';\nimport Combobox from '#src/components/Combobox';\nimport type { ComboboxMultiSelectProps } from '#src/components/Combobox/ComboboxMultiSelect';\nimport type { ComboboxSingleSelectProps } from '#src/components/Combobox/ComboboxSingleSelect';\nimport FormField, { type FormFieldBaseProps } from '#src/components/FormField/FormField';\nimport Input, { type InputProps } from '#src/components/Input';\nimport RadioGroup, { type RadioGroupProps } from '#src/components/RadioGroup';\nimport SegmentedControl, { type SegmentedControlProps } from '#src/components/SegmentedControl';\nimport Select, { type SelectProps } from '#src/components/Select';\nimport TextArea, { type TextAreaProps } from '#src/components/TextArea';\nimport Toggle, { type ToggleProps } from '#src/components/Toggle';\n\nexport type ImplementsFormField = Omit<FormFieldBaseProps, 'children'>;\n\ntype ExtractFormFieldProps<T extends ImplementsFormField> = Pick<\n T,\n | 'label'\n | 'inputId'\n | 'required'\n | 'helperText'\n | 'errorText'\n | 'warningText'\n | 'labelProps'\n | 'helperProps'\n | 'warningProps'\n | 'errorProps'\n | 'configField'\n | 'configFieldInputWidth'\n | 'rightActions'\n>;\ntype OmitFormFieldProps<T extends ImplementsFormField> = Omit<\n T,\n Exclude<keyof ExtractFormFieldProps<T>, 'required'>\n>;\n\n/**\n * Helper to split out props that are sent to the FormField component from props sent\n * to the underlying input component.\n */\nexport const splitOutFormFieldProps = <T extends ImplementsFormField>(\n props: T,\n): {\n formFieldProps: ExtractFormFieldProps<T>;\n inputProps: OmitFormFieldProps<T>;\n} => {\n const {\n label,\n inputId,\n helperText,\n errorText,\n warningText,\n labelProps,\n helperProps,\n warningProps,\n errorProps,\n configField,\n configFieldInputWidth,\n rightActions,\n ...inputProps\n } = props;\n\n return {\n formFieldProps: {\n label,\n inputId,\n required: props.required,\n helperText,\n errorText,\n warningText,\n labelProps,\n helperProps,\n warningProps,\n errorProps,\n configField,\n configFieldInputWidth,\n rightActions,\n },\n inputProps,\n };\n};\n\nexport interface TextFieldProps extends ImplementsFormField, InputProps {}\n\nexport const TextField = forwardRef<HTMLInputElement, TextFieldProps>(\n function TextField(props, ref) {\n const { formFieldProps, inputProps } = splitOutFormFieldProps(props);\n const { id, ...rest } = inputProps;\n\n return (\n <FormField\n {...formFieldProps}\n labelProps={{ size: props.size, ...formFieldProps.labelProps }}\n inputId={formFieldProps.inputId ?? id}\n >\n <Input {...rest} ref={ref} />\n </FormField>\n );\n },\n);\n\nexport interface TextAreaFieldProps extends ImplementsFormField, TextAreaProps {}\n\nexport const TextAreaField = forwardRef<HTMLTextAreaElement, TextAreaFieldProps>(\n function TextAreaField(props, ref) {\n const { formFieldProps, inputProps } = splitOutFormFieldProps(props);\n const { id, ...rest } = inputProps;\n\n return (\n <FormField\n {...formFieldProps}\n labelProps={{ size: props.size, ...formFieldProps.labelProps }}\n inputId={formFieldProps.inputId ?? id}\n >\n <TextArea {...rest} ref={ref} />\n </FormField>\n );\n },\n);\n\nexport interface SelectFieldProps extends ImplementsFormField, SelectProps {}\n\nexport const SelectField = ({ id, children, ...props }: SelectFieldProps) => {\n const { formFieldProps, inputProps } = splitOutFormFieldProps(props);\n const linkedId = useMemo(\n () => formFieldProps.inputId ?? id ?? uniqueId('pds-form-field-input-fields-select__'),\n [formFieldProps.inputId, id],\n );\n\n return (\n <FormField\n {...formFieldProps}\n inputId={linkedId}\n labelProps={{ htmlFor: linkedId, size: inputProps.size, ...formFieldProps.labelProps }}\n >\n <Select {...inputProps} id={linkedId}>\n {children}\n </Select>\n </FormField>\n );\n};\n\nexport interface RadioGroupFieldProps\n extends Omit<ImplementsFormField, 'configField'>, RadioGroupProps {}\n\nexport const RadioGroupField = ({\n label,\n helperText,\n errorText,\n warningText,\n required,\n children,\n ...props\n}: RadioGroupFieldProps) => {\n return (\n <FormField\n label={label}\n helperText={helperText}\n warningText={warningText}\n errorText={errorText}\n required={required}\n >\n <RadioGroup {...props} aria-required={required}>\n {children}\n </RadioGroup>\n </FormField>\n );\n};\n\nexport interface CheckboxFieldProps extends ImplementsFormField, CheckboxProps {\n checkboxLabel?: CheckboxProps['label'];\n}\n\nexport const CheckboxField = ({\n label,\n helperText,\n errorText,\n warningText,\n checkboxLabel,\n configField,\n labelProps,\n required,\n ...props\n}: CheckboxFieldProps) => {\n return (\n <FormField\n label={label}\n helperText={helperText}\n warningText={warningText}\n errorText={errorText}\n configField={configField}\n labelProps={labelProps}\n required={required}\n >\n <Checkbox label={checkboxLabel} required={required} {...props} />\n </FormField>\n );\n};\n\nexport interface ToggleFieldProps extends ImplementsFormField, ToggleProps {}\n\nexport const ToggleField = forwardRef<HTMLDivElement, ToggleFieldProps>(\n function ToggleField(props, ref) {\n const { formFieldProps, inputProps } = splitOutFormFieldProps(props);\n\n return (\n <FormField\n {...formFieldProps}\n labelProps={{ size: inputProps.size, ...formFieldProps.labelProps }}\n >\n <Toggle {...inputProps} ref={ref} />\n </FormField>\n );\n },\n);\n\nexport interface SegmentedControlFieldProps\n extends ImplementsFormField, Omit<SegmentedControlProps, 'children'> {\n children?: SegmentedControlProps['children'];\n}\n\nexport const SegmentedControlField = forwardRef<HTMLDivElement, SegmentedControlFieldProps>(\n function SegmentedControlField(\n {\n label,\n helperText,\n errorText,\n warningText,\n configField,\n required,\n children,\n labelProps,\n ...props\n },\n ref,\n ) {\n return (\n <FormField\n label={label}\n helperText={helperText}\n warningText={warningText}\n errorText={errorText}\n configField={configField}\n labelProps={labelProps}\n required={required}\n >\n <SegmentedControl fullWidth {...props} aria-required={required} ref={ref}>\n {children}\n </SegmentedControl>\n </FormField>\n );\n },\n);\n\nexport type ComboboxSingleSelectFieldProps<T = string> = ImplementsFormField &\n ComboboxSingleSelectProps<T>;\nexport type ComboboxMultiSelectFieldProps<T = string> = ImplementsFormField &\n ComboboxMultiSelectProps<T>;\n\nexport const ComboboxField = (\n props: ComboboxSingleSelectFieldProps | ComboboxMultiSelectFieldProps,\n) => {\n // `Combobox` registers its own id with the surrounding `FormControl`, which is what links the\n // label to it, so the field only forwards an explicit `inputId` when one is given. Each mode is\n // split separately: `multiple` discriminates the two, and a union split at once loses that.\n if (props.multiple) {\n const { formFieldProps, inputProps } = splitOutFormFieldProps(props);\n\n return (\n <FormField {...formFieldProps}>\n <Combobox {...inputProps} />\n </FormField>\n );\n }\n\n const { formFieldProps, inputProps } = splitOutFormFieldProps(props);\n\n return (\n <FormField {...formFieldProps}>\n <Combobox {...inputProps} />\n </FormField>\n );\n};\n","import {\n Children,\n cloneElement,\n type ComponentPropsWithRef,\n createContext,\n type ReactElement,\n type ReactNode,\n useContext,\n useRef,\n} from 'react';\nimport {\n type AriaCheckboxGroupProps,\n mergeProps,\n useCheckboxGroup,\n useCheckboxGroupItem,\n} from 'react-aria';\nimport innerText from 'react-innertext';\nimport { type CheckboxGroupState, useCheckboxGroupState } from 'react-stately';\n\nimport type { CheckboxProps } from '#src/components/Checkbox';\nimport type Checkbox from '#src/components/Checkbox';\nimport { FormControlContext } from '#src/components/FormControl/useFormField';\nimport FormField from '#src/components/FormField/FormField';\nimport type { ImplementsFormField } from '#src/components/FormField/inputFields';\n\n/* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\nconst CheckboxGroupContext = createContext<CheckboxGroupState>(null);\n\n/** Preserves the parent FormControl context (disabled, hasError, etc.) but clears\n * inputId so each Checkbox inside the group generates its own unique id. */\nconst ClearGroupInputId = ({ children }: { children: ReactNode }) => {\n const parentContext = useContext(FormControlContext);\n return (\n <FormControlContext.Provider value={{ ...parentContext, inputId: undefined }}>\n {children}\n </FormControlContext.Provider>\n );\n};\n\ninterface CheckboxGroupItemProps {\n children: ReactElement<ComponentPropsWithRef<typeof Checkbox>>;\n}\n\nconst CheckboxGroupItem = (props: CheckboxGroupItemProps) => {\n const { children } = props;\n const checkboxProps = children.props;\n\n const state = useContext(CheckboxGroupContext);\n const ref = useRef();\n const { inputProps } = useCheckboxGroupItem(\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n {\n ...checkboxProps,\n onChange: undefined,\n isDisabled: checkboxProps.disabled,\n isReadOnly: checkboxProps.readOnly,\n isRequired: checkboxProps.required,\n isIndeterminate: checkboxProps.indeterminate,\n value: String(children.props.value),\n 'aria-label': innerText(checkboxProps.label),\n },\n state,\n ref,\n );\n\n return cloneElement(\n children,\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n mergeProps(inputProps, {\n onChange: checkboxProps.onChange,\n disabled: state.isDisabled || checkboxProps.disabled,\n checked: state.isSelected(String(inputProps.value)),\n ref,\n } as ComponentPropsWithRef<typeof Checkbox>),\n );\n};\n\ninterface CheckboxGroupFieldProps\n extends\n Omit<ImplementsFormField, 'configField'>,\n Omit<\n AriaCheckboxGroupProps,\n 'description' | 'disabled' | 'isReadOnly' | 'isRequired' | 'errorMessage'\n > {\n children?: ReactElement<CheckboxProps>[];\n disabled?: boolean;\n readOnly?: boolean;\n required?: boolean;\n}\n\nconst CheckboxGroupField = ({\n children,\n name,\n onChange,\n disabled,\n readOnly,\n required,\n ...props\n}: CheckboxGroupFieldProps) => {\n const reactAriaProps = {\n ...props,\n description: props.helperText,\n errorMessage: props.errorText,\n onChange,\n name,\n isDisabled: disabled,\n isReadOnly: readOnly,\n isRequired: required,\n };\n const state = useCheckboxGroupState(reactAriaProps);\n const { groupProps, labelProps, descriptionProps, errorMessageProps } = useCheckboxGroup(\n reactAriaProps,\n state,\n );\n\n return (\n <FormField\n labelProps={labelProps}\n helperProps={descriptionProps}\n errorProps={errorMessageProps}\n disabled={disabled}\n required={required}\n {...groupProps}\n {...props}\n >\n <ClearGroupInputId>\n <CheckboxGroupContext.Provider value={state}>\n {Children.map(children, (checkbox) => (\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n <CheckboxGroupItem>{checkbox}</CheckboxGroupItem>\n ))}\n </CheckboxGroupContext.Provider>\n </ClearGroupInputId>\n </FormField>\n );\n};\n\nexport default CheckboxGroupField;\n","import { type ReactNode, useState } from 'react';\n\nimport { MoreIcon, PlusIcon } from '@persona/icons';\n\nimport { IconButton } from '#src/components/Button';\nimport useFormGroup from '#src/components/ConfigFormGroup/useFormGroup';\nimport DropdownMenu from '#src/components/DropdownMenu';\nimport FormField from '#src/components/FormField/FormField';\nimport type { ImplementsFormField } from '#src/components/FormField/inputFields';\nimport ListBox, { type ListBoxProps } from '#src/components/ListBox';\nimport type { MenuItemProps } from '#src/components/Menu';\n\ninterface ListBoxFieldAction extends Omit<MenuItemProps, 'children'> {\n label: string;\n onClick: (selectedKeys: ListBoxProps<any>['selectedKeys']) => void;\n}\n\ninterface AddDropdownConfig {\n options: ({ label: ReactNode; value: string } & Omit<MenuItemProps, 'children'>)[];\n onSelection: (value: string) => void;\n}\n\ninterface ListBoxFieldProps<T extends object> extends ImplementsFormField, ListBoxProps<T> {\n actions?: ListBoxFieldAction[];\n addDropdownConfig?: AddDropdownConfig;\n /** Disables the add button, e.g. while the list is read-only. */\n addDisabled?: boolean;\n}\n\nconst ListBoxField = <T extends object>({\n label,\n helperText,\n errorText,\n warningText,\n labelProps,\n helperProps,\n errorProps,\n warningProps,\n inputId,\n required,\n onAdd,\n onDelete,\n deleteDisabled,\n configField: configFieldProp,\n size = 'md',\n actions = [],\n addDropdownConfig,\n addDisabled,\n selectedKeys: selectedKeysProp,\n onSelectionChange,\n defaultSelectedKeys,\n ...props\n}: ListBoxFieldProps<T>) => {\n const { configField } = useFormGroup({ configField: configFieldProp });\n const menuActions: ListBoxFieldAction[] = [...actions];\n const [selectedKeysState, setSelectedKeys] = useState(defaultSelectedKeys);\n const selectedKeys = selectedKeysProp ?? selectedKeysState;\n const effectiveSize = configField ? 'sm' : size;\n\n if (onDelete) {\n menuActions.unshift({\n label: 'Delete',\n onClick: () => onDelete(selectedKeys),\n disabled:\n deleteDisabled ||\n selectedKeys == null ||\n (typeof selectedKeys === 'object' && [...selectedKeys].length === 0),\n });\n }\n\n const addButton = (\n <IconButton size='sm' onClick={onAdd} aria-label='Add item to list' disabled={addDisabled}>\n <PlusIcon />\n </IconButton>\n );\n\n return (\n <FormField\n label={label}\n helperText={helperText}\n errorText={errorText}\n warningText={warningText}\n labelProps={labelProps}\n helperProps={helperProps}\n errorProps={errorProps}\n warningProps={warningProps}\n inputId={inputId}\n required={required}\n configField={configField}\n rightActions={\n configField && (\n <>\n {menuActions.length > 0 && (\n <DropdownMenu\n trigger={\n <IconButton aria-label='Actions' size='sm'>\n <MoreIcon />\n </IconButton>\n }\n portal\n >\n {menuActions.map((action) => (\n <DropdownMenu.Item\n key={action.label}\n {...action}\n onClick={() => action.onClick(selectedKeys)}\n size={effectiveSize}\n >\n {action.label}\n </DropdownMenu.Item>\n ))}\n </DropdownMenu>\n )}\n {onAdd && !addDropdownConfig && addButton}\n {addDropdownConfig && (\n <DropdownMenu trigger={addButton} align='start' portal>\n {addDropdownConfig.options.map((option) => (\n <DropdownMenu.Item\n key={option.value}\n {...option}\n onClick={() => addDropdownConfig.onSelection(option.value)}\n size={effectiveSize}\n >\n {option.label}\n </DropdownMenu.Item>\n ))}\n </DropdownMenu>\n )}\n </>\n )\n }\n >\n <ListBox\n id={inputId}\n fullWidth={configField}\n size={effectiveSize}\n deleteDisabled={deleteDisabled}\n // We have to control the keys so we can power the `rightActions`\n selectedKeys={selectedKeys}\n onSelectionChange={(keys) => {\n onSelectionChange?.(keys);\n setSelectedKeys(keys);\n }}\n {...props}\n />\n </FormField>\n );\n};\n\nexport default ListBoxField;\n","import { Fragment, type MouseEvent, type ReactNode, useState } from 'react';\n\nimport { IconButton } from '@persona/design-system/components/Button';\nimport { useFormGroup } from '@persona/design-system/components/ConfigFormGroup';\nimport DropdownMenu from '@persona/design-system/components/DropdownMenu';\nimport type { FormLabelProps } from '@persona/design-system/components/FormControl';\nimport type { MenuItemProps } from '@persona/design-system/components/Menu';\nimport TableBox, { type TableBoxProps } from '@persona/design-system/components/TableBox';\nimport { MoreIcon, PlusIcon } from '@persona/icons';\n\nimport FormField from './FormField';\nimport type { ImplementsFormField } from './inputFields';\n\nexport interface TableBoxFieldAction extends Omit<MenuItemProps, 'children'> {\n label: string;\n onClick: (selectedKey: TableBoxProps['selectedKey']) => void;\n}\n\nexport interface TableBoxFieldActionGroup {\n type: 'group';\n heading: string;\n actions: TableBoxFieldAction[];\n}\n\nexport type TableBoxFieldActionEntry = TableBoxFieldAction | TableBoxFieldActionGroup;\n\n/** Aria-label on TableBoxField's + button. Consumers that style or detect that\n * button (e.g. popover toggle guards) should import this rather than redefining it. */\nexport const TABLE_BOX_FIELD_ADD_BUTTON_ARIA_LABEL = 'Add item to table';\n\nconst isActionGroup = (action: TableBoxFieldActionEntry): action is TableBoxFieldActionGroup =>\n 'type' in action && action.type === 'group';\n\ninterface AddDropdownConfig {\n options: Array<{ label: string; value: string }>;\n onSelection: (value: string) => void;\n}\n\ninterface TableBoxFieldProps<T extends object = object>\n extends ImplementsFormField, Omit<TableBoxProps<T>, 'aria-label' | 'onCreateNewRow'> {\n onAdd?: (e: MouseEvent<HTMLButtonElement>) => void;\n onDelete?: (selectedKey: string | null) => void;\n deleteDisabled?: boolean;\n /** Actions and labeled action groups rendered in order. Empty groups are omitted. */\n actions?: TableBoxFieldActionEntry[];\n addDropdownConfig?: AddDropdownConfig;\n\n /**\n * Callback to create a new row and add it to the rows array\n * Should return the id of the newly created row\n */\n createNewRow?: () => string;\n children?: ReactNode;\n}\n\nconst TableBoxField = <T extends object = object>({\n label,\n helperText,\n errorText,\n warningText,\n labelProps: labelPropsProp,\n helperProps,\n errorProps,\n warningProps,\n inputId,\n required,\n onAdd,\n onDelete,\n deleteDisabled,\n configField: configFieldProp = true,\n actions = [],\n addDropdownConfig,\n selectedKey: selectedKeyProp,\n onSelectionChange,\n defaultSelectedKey,\n selectionMode,\n disabled,\n createNewRow,\n children,\n emptyText = 'No data',\n ...props\n}: TableBoxFieldProps<T>) => {\n const { configField } = useFormGroup({ configField: configFieldProp });\n const menuActions: TableBoxFieldActionEntry[] = [...actions];\n const [selectedKeyState, setSelectedKey] = useState(defaultSelectedKey);\n const selectedKey = selectedKeyProp ?? selectedKeyState;\n const [newRowId, setNewRowId] = useState<string | null>(null);\n const labelProps: FormLabelProps = { size: 'sm', ...labelPropsProp };\n\n const handleCreateNewRow = () => {\n if (createNewRow) {\n setNewRowId(createNewRow());\n }\n };\n\n // Handle add button click\n const handleAddClick = (e: MouseEvent<HTMLButtonElement>) => {\n if (createNewRow) {\n handleCreateNewRow();\n } else if (onAdd) {\n onAdd(e);\n }\n };\n\n if (onDelete) {\n menuActions.unshift({\n label: 'Delete',\n onClick: () => selectedKey && onDelete(selectedKey),\n disabled: deleteDisabled || selectedKey == null,\n });\n }\n const visibleMenuActions = menuActions.filter(\n (action) => !isActionGroup(action) || action.actions.length > 0,\n );\n\n const addButton = (\n <IconButton\n size='sm'\n onClick={handleAddClick}\n aria-label={TABLE_BOX_FIELD_ADD_BUTTON_ARIA_LABEL}\n disabled={disabled}\n >\n <PlusIcon />\n </IconButton>\n );\n\n return (\n <FormField\n label={label}\n helperText={helperText}\n errorText={errorText}\n warningText={warningText}\n labelProps={labelProps}\n helperProps={helperProps}\n errorProps={errorProps}\n warningProps={warningProps}\n inputId={inputId}\n required={required}\n rightActions={\n configField && (\n <>\n {visibleMenuActions.length > 0 && (\n <DropdownMenu\n trigger={\n <IconButton aria-label='Actions' size='sm' disabled={disabled}>\n <MoreIcon />\n </IconButton>\n }\n portal\n >\n {visibleMenuActions.map((entry, entryIndex) => {\n const previousEntry = visibleMenuActions[entryIndex - 1];\n if (isActionGroup(entry)) {\n return (\n <Fragment key={`${entry.heading}-${entryIndex}`}>\n {entryIndex > 0 && <DropdownMenu.Divider />}\n <DropdownMenu.Heading size='sm'>{entry.heading}</DropdownMenu.Heading>\n {entry.actions.map((action) => (\n <DropdownMenu.Item\n key={action.label}\n {...action}\n disabled={disabled || action.disabled}\n onClick={() => action.onClick(selectedKey)}\n size='sm'\n >\n {action.label}\n </DropdownMenu.Item>\n ))}\n </Fragment>\n );\n }\n\n return (\n <Fragment key={`${entry.label}-${entryIndex}`}>\n {previousEntry && isActionGroup(previousEntry) && <DropdownMenu.Divider />}\n <DropdownMenu.Item\n {...entry}\n disabled={disabled || entry.disabled}\n onClick={() => entry.onClick(selectedKey)}\n size='sm'\n >\n {entry.label}\n </DropdownMenu.Item>\n </Fragment>\n );\n })}\n </DropdownMenu>\n )}\n {(onAdd || createNewRow) && !addDropdownConfig && addButton}\n {addDropdownConfig && (\n <DropdownMenu trigger={addButton} portal>\n {addDropdownConfig.options.map((option) => (\n <DropdownMenu.Item\n key={option.value}\n {...option}\n onClick={() => addDropdownConfig.onSelection(option.value)}\n size='sm'\n >\n {option.label}\n </DropdownMenu.Item>\n ))}\n </DropdownMenu>\n )}\n </>\n )\n }\n >\n <TableBox\n aria-label={`${label} table`}\n // We have to control the keys so we can power the `rightActions`\n selectedKey={selectedKey}\n onSelectionChange={(key) => {\n onSelectionChange?.(key);\n setSelectedKey(key);\n }}\n selectionMode={selectionMode}\n newRowId={newRowId}\n onCreateNewRow={createNewRow ? handleCreateNewRow : undefined}\n emptyText={emptyText}\n disabled={disabled}\n {...props}\n >\n {children}\n </TableBox>\n </FormField>\n );\n};\n\n// Attach subcomponents to TableBoxField\nTableBoxField.Row = TableBox.Row;\nTableBoxField.Cell = TableBox.Cell;\n\nexport default TableBoxField;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwFA,MAAa,YAAY,WAA2C,SAAS,UAC3E,EACE,OACA,UACA,YACA,aACA,WACA,YACA,aACA,cACA,YACA,aAAa,iBACb,uBACA,cACA,GAAG,SAEL,KACA;CACA,MAAM,EAAE,aAAa,yBAAyB,cAAc;CAC5D,MAAM,cAAc,mBAAmB;CAEvC,MAAM,eAAe,QACnB,oBAAC,WAAD;EAAW,SAAS,eAAe,aAAa,aAAa,KAAA;EAAW,GAAI;YACzE;EACS,CAAA,GACV;AAEJ,QACE,qBAAC,aAAD;EACE,UAAU,CAAC,CAAC;EACZ,YAAY,CAAC,CAAC;EACT;EACQ;EACb,iBAAiB,CAAC,CAAC;EACI;EACvB,GAAI;YAPN;GASG,eACC,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B;MACO,EAAA,EAdI,GAAG,MAAM,QAAQ,GAAG,aAcxB;AAIf,YACE,qBAAC,UAAD,EAAA,UAAA,CACG,iBAAiB,cAAc,cAAc,IAAI,oBAACA,qBAAa,SAAd,EAAwB,CAAA,EAC1E,oBAACA,qBAAa,MAAd;MACE,GAAI;MACJ,UAAU,YAAY,MAAM;MAC5B,eAAe,MAAM,QAAQ,YAAY;MACzC,MAAK;gBAEJ,MAAM;MACW,CAAA,CACX,EAAA,EAVI,GAAG,MAAM,MAAM,GAAG,aAUtB;MAEb;IACW,CAAA;IAEf,SAAS,iBAAiB,CAAC,qBAAqB;GACjD,qBACC,oBAACA,sBAAD;IAAc,SAAS;IAAW,QAAA;cAC/B,kBAAkB,QAAQ,KAAK,WAC9B,oBAACA,qBAAa,MAAd;KAEE,GAAI;KACJ,eAAe,kBAAkB,YAAY,OAAO,MAAM;KAC1D,MAAK;eAEJ,OAAO;KACU,EANb,OAAO,MAMM,CACpB;IACW,CAAA;GAEhB,EAAA,CAAA;YAIP,oBAAC,UAAD;GACE,cAAY,GAAG,MAAM;GAER;GACb,oBAAoB,QAAQ;AAC1B,wBAAoB,IAAI;AACxB,mBAAe,IAAI;;GAEN;GACL;GACV,gBAAgB,eAAe,qBAAqB,KAAA;GACzC;GACD;GACV,GAAI;GAEH;GACQ,CAAA;EACD,CAAA;;AAKhB,cAAc,MAAM,SAAS;AAC7B,cAAc,OAAO,SAAS"}
|
|
1
|
+
{"version":3,"file":"FormField-Cf1VMvoa.mjs","names":["Input","TextArea","DropdownMenu","DropdownMenu"],"sources":["../src/components/FormField/FormField.tsx","../src/components/FormField/inputFields.tsx","../src/components/FormField/CheckboxGroupField.tsx","../src/components/FormField/ListBoxField.tsx","../src/components/FormField/TableBoxField.tsx"],"sourcesContent":["import { type ComponentPropsWithRef, forwardRef, type ReactElement, type ReactNode } from 'react';\n\nimport { Spacing } from '@persona/design-tokens';\n\nimport useFormGroup from '#src/components/ConfigFormGroup/useFormGroup';\nimport FormControl, {\n ErrorText,\n type FormControlProps,\n FormInputContainer,\n FormLabel,\n HelperText,\n WarningText,\n} from '#src/components/FormControl';\nimport { HStack } from '#src/components/Stack';\n\nexport interface FormFieldBaseProps {\n /**\n * Renders `<Label>` above input\n */\n label?: ReactNode;\n\n /**\n * ID of the input element. Providing this will automatically link the label to the input.\n */\n inputId?: string;\n\n /** Marks the field as required. The label renders an asterisk; composed fields also forward `required` to their input. */\n required?: boolean;\n\n /**\n * Renders `<HelperText>` below input\n */\n helperText?: ReactNode;\n\n /**\n * Renders `<ErrorText>` below input and helper text.\n */\n errorText?: ReactNode;\n\n /**\n * Renders `<WarningText>` below input and helper text.\n */\n warningText?: ReactNode;\n\n /**\n * Should be an input of some sort\n */\n children?: ReactElement;\n\n labelProps?: ComponentPropsWithRef<typeof FormLabel>;\n helperProps?: ComponentPropsWithRef<typeof HelperText>;\n warningProps?: ComponentPropsWithRef<typeof WarningText>;\n errorProps?: ComponentPropsWithRef<typeof ErrorText>;\n\n /**\n * Whether to render the form field as a config field.\n * This will render the helper text as a tooltip.\n */\n configField?: boolean;\n\n /**\n * Override the width of the input area when `configField` is true.\n * Accepts any valid CSS width value (e.g. `'33%'`, `'66.67%'`).\n * Defaults to `'50%'`.\n */\n configFieldInputWidth?: string;\n\n /**\n * Renders actions to the right of the label.\n */\n rightActions?: ReactNode;\n}\n\nexport interface FormFieldProps extends Omit<FormControlProps, 'children'>, FormFieldBaseProps {}\n\n/**\n * Helper component with preset slots for label, input, and helper texts.\n *\n * Prefer a composed field component, such as `<TextField>`, `<SelectField>`, or\n * `<CheckboxField>`, when one is available for the input type. Use `<FormField>` directly\n * when composing a custom control or layout.\n *\n * ## Usage\n *\n * ```tsx\n * import FormField from '@persona/design-system/components/FormField';\n * ```\n */\nexport const FormField = forwardRef<HTMLDivElement, FormFieldProps>(function FormField(\n {\n label,\n children,\n helperText,\n warningText,\n errorText,\n labelProps,\n helperProps,\n warningProps,\n errorProps,\n configField: configFieldProp,\n configFieldInputWidth,\n rightActions,\n ...props\n }: FormFieldProps,\n ref,\n) {\n const { configField: configFieldFormGroup } = useFormGroup();\n const configField = configFieldProp ?? configFieldFormGroup;\n\n const labelElement = label ? (\n <FormLabel tooltip={configField && helperText ? helperText : undefined} {...labelProps}>\n {label}\n </FormLabel>\n ) : null;\n\n return (\n <FormControl\n hasError={!!errorText}\n hasWarning={!!warningText}\n ref={ref}\n configField={configField}\n hasRightActions={!!rightActions}\n configFieldInputWidth={configFieldInputWidth}\n {...props}\n >\n {rightActions ? (\n <HStack justify='space-between' align='center'>\n {labelElement}\n <HStack spacing={Spacing[1]}>{rightActions}</HStack>\n </HStack>\n ) : (\n labelElement\n )}\n <FormInputContainer>{children}</FormInputContainer>\n {!configField && helperText && <HelperText {...helperProps}>{helperText}</HelperText>}\n {!configField && warningText && <WarningText {...warningProps}>{warningText}</WarningText>}\n {!configField && errorText && <ErrorText {...errorProps}>{errorText}</ErrorText>}\n </FormControl>\n );\n});\n\nexport default FormField;\n","import { uniqueId } from 'lodash-es';\nimport { forwardRef, useMemo } from 'react';\n\nimport Checkbox, { type CheckboxProps } from '#src/components/Checkbox';\nimport Combobox from '#src/components/Combobox';\nimport type { ComboboxMultiSelectProps } from '#src/components/Combobox/ComboboxMultiSelect';\nimport type { ComboboxSingleSelectProps } from '#src/components/Combobox/ComboboxSingleSelect';\nimport FormField, { type FormFieldBaseProps } from '#src/components/FormField/FormField';\nimport Input, { type InputProps } from '#src/components/Input';\nimport RadioGroup, { type RadioGroupProps } from '#src/components/RadioGroup';\nimport SegmentedControl, { type SegmentedControlProps } from '#src/components/SegmentedControl';\nimport Select, { type SelectProps } from '#src/components/Select';\nimport TextArea, { type TextAreaProps } from '#src/components/TextArea';\nimport Toggle, { type ToggleProps } from '#src/components/Toggle';\n\nexport type ImplementsFormField = Omit<FormFieldBaseProps, 'children'>;\n\ntype ExtractFormFieldProps<T extends ImplementsFormField> = Pick<\n T,\n | 'label'\n | 'inputId'\n | 'required'\n | 'helperText'\n | 'errorText'\n | 'warningText'\n | 'labelProps'\n | 'helperProps'\n | 'warningProps'\n | 'errorProps'\n | 'configField'\n | 'configFieldInputWidth'\n | 'rightActions'\n>;\ntype OmitFormFieldProps<T extends ImplementsFormField> = Omit<\n T,\n Exclude<keyof ExtractFormFieldProps<T>, 'required'>\n>;\n\n/**\n * Helper to split out props that are sent to the FormField component from props sent\n * to the underlying input component.\n */\nexport const splitOutFormFieldProps = <T extends ImplementsFormField>(\n props: T,\n): {\n formFieldProps: ExtractFormFieldProps<T>;\n inputProps: OmitFormFieldProps<T>;\n} => {\n const {\n label,\n inputId,\n helperText,\n errorText,\n warningText,\n labelProps,\n helperProps,\n warningProps,\n errorProps,\n configField,\n configFieldInputWidth,\n rightActions,\n ...inputProps\n } = props;\n\n return {\n formFieldProps: {\n label,\n inputId,\n required: props.required,\n helperText,\n errorText,\n warningText,\n labelProps,\n helperProps,\n warningProps,\n errorProps,\n configField,\n configFieldInputWidth,\n rightActions,\n },\n inputProps,\n };\n};\n\nexport interface TextFieldProps extends ImplementsFormField, InputProps {}\n\nexport const TextField = forwardRef<HTMLInputElement, TextFieldProps>(\n function TextField(props, ref) {\n const { formFieldProps, inputProps } = splitOutFormFieldProps(props);\n const { id, ...rest } = inputProps;\n\n return (\n <FormField\n {...formFieldProps}\n labelProps={{ size: props.size, ...formFieldProps.labelProps }}\n inputId={formFieldProps.inputId ?? id}\n >\n <Input {...rest} ref={ref} />\n </FormField>\n );\n },\n);\n\nexport interface TextAreaFieldProps extends ImplementsFormField, TextAreaProps {}\n\nexport const TextAreaField = forwardRef<HTMLTextAreaElement, TextAreaFieldProps>(\n function TextAreaField(props, ref) {\n const { formFieldProps, inputProps } = splitOutFormFieldProps(props);\n const { id, ...rest } = inputProps;\n\n return (\n <FormField\n {...formFieldProps}\n labelProps={{ size: props.size, ...formFieldProps.labelProps }}\n inputId={formFieldProps.inputId ?? id}\n >\n <TextArea {...rest} ref={ref} />\n </FormField>\n );\n },\n);\n\nexport interface SelectFieldProps extends ImplementsFormField, SelectProps {}\n\nexport const SelectField = ({ id, children, ...props }: SelectFieldProps) => {\n const { formFieldProps, inputProps } = splitOutFormFieldProps(props);\n const linkedId = useMemo(\n () => formFieldProps.inputId ?? id ?? uniqueId('pds-form-field-input-fields-select__'),\n [formFieldProps.inputId, id],\n );\n\n return (\n <FormField\n {...formFieldProps}\n inputId={linkedId}\n labelProps={{ htmlFor: linkedId, size: inputProps.size, ...formFieldProps.labelProps }}\n >\n <Select {...inputProps} id={linkedId}>\n {children}\n </Select>\n </FormField>\n );\n};\n\nexport interface RadioGroupFieldProps\n extends Omit<ImplementsFormField, 'configField'>, RadioGroupProps {}\n\nexport const RadioGroupField = ({\n label,\n helperText,\n errorText,\n warningText,\n required,\n children,\n ...props\n}: RadioGroupFieldProps) => {\n return (\n <FormField\n label={label}\n helperText={helperText}\n warningText={warningText}\n errorText={errorText}\n required={required}\n >\n <RadioGroup {...props} aria-required={required}>\n {children}\n </RadioGroup>\n </FormField>\n );\n};\n\nexport interface CheckboxFieldProps extends ImplementsFormField, CheckboxProps {\n checkboxLabel?: CheckboxProps['label'];\n}\n\nexport const CheckboxField = ({\n label,\n helperText,\n errorText,\n warningText,\n checkboxLabel,\n configField,\n labelProps,\n required,\n ...props\n}: CheckboxFieldProps) => {\n return (\n <FormField\n label={label}\n helperText={helperText}\n warningText={warningText}\n errorText={errorText}\n configField={configField}\n labelProps={labelProps}\n required={required}\n >\n <Checkbox label={checkboxLabel} required={required} {...props} />\n </FormField>\n );\n};\n\nexport interface ToggleFieldProps extends ImplementsFormField, ToggleProps {}\n\nexport const ToggleField = forwardRef<HTMLDivElement, ToggleFieldProps>(\n function ToggleField(props, ref) {\n const { formFieldProps, inputProps } = splitOutFormFieldProps(props);\n\n return (\n <FormField\n {...formFieldProps}\n labelProps={{ size: inputProps.size, ...formFieldProps.labelProps }}\n >\n <Toggle {...inputProps} ref={ref} />\n </FormField>\n );\n },\n);\n\nexport interface SegmentedControlFieldProps\n extends ImplementsFormField, Omit<SegmentedControlProps, 'children'> {\n children?: SegmentedControlProps['children'];\n}\n\nexport const SegmentedControlField = forwardRef<HTMLDivElement, SegmentedControlFieldProps>(\n function SegmentedControlField(\n {\n label,\n helperText,\n errorText,\n warningText,\n configField,\n required,\n children,\n labelProps,\n ...props\n },\n ref,\n ) {\n return (\n <FormField\n label={label}\n helperText={helperText}\n warningText={warningText}\n errorText={errorText}\n configField={configField}\n labelProps={labelProps}\n required={required}\n >\n <SegmentedControl fullWidth {...props} aria-required={required} ref={ref}>\n {children}\n </SegmentedControl>\n </FormField>\n );\n },\n);\n\nexport type ComboboxSingleSelectFieldProps<T = string> = ImplementsFormField &\n ComboboxSingleSelectProps<T>;\nexport type ComboboxMultiSelectFieldProps<T = string> = ImplementsFormField &\n ComboboxMultiSelectProps<T>;\n\nexport const ComboboxField = (\n props: ComboboxSingleSelectFieldProps | ComboboxMultiSelectFieldProps,\n) => {\n // `Combobox` registers its own id with the surrounding `FormControl`, which is what links the\n // label to it, so the field only forwards an explicit `inputId` when one is given. Each mode is\n // split separately: `multiple` discriminates the two, and a union split at once loses that.\n if (props.multiple) {\n const { formFieldProps, inputProps } = splitOutFormFieldProps(props);\n\n return (\n <FormField {...formFieldProps}>\n <Combobox {...inputProps} />\n </FormField>\n );\n }\n\n const { formFieldProps, inputProps } = splitOutFormFieldProps(props);\n\n return (\n <FormField {...formFieldProps}>\n <Combobox {...inputProps} />\n </FormField>\n );\n};\n","import {\n Children,\n cloneElement,\n type ComponentPropsWithRef,\n createContext,\n type ReactElement,\n type ReactNode,\n useContext,\n useRef,\n} from 'react';\nimport {\n type AriaCheckboxGroupProps,\n mergeProps,\n useCheckboxGroup,\n useCheckboxGroupItem,\n} from 'react-aria';\nimport innerText from 'react-innertext';\nimport { type CheckboxGroupState, useCheckboxGroupState } from 'react-stately';\n\nimport type { CheckboxProps } from '#src/components/Checkbox';\nimport type Checkbox from '#src/components/Checkbox';\nimport { FormControlContext } from '#src/components/FormControl/useFormField';\nimport FormField from '#src/components/FormField/FormField';\nimport type { ImplementsFormField } from '#src/components/FormField/inputFields';\n\n/* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\nconst CheckboxGroupContext = createContext<CheckboxGroupState>(null);\n\n/** Preserves the parent FormControl context (disabled, hasError, etc.) but clears\n * inputId so each Checkbox inside the group generates its own unique id. */\nconst ClearGroupInputId = ({ children }: { children: ReactNode }) => {\n const parentContext = useContext(FormControlContext);\n return (\n <FormControlContext.Provider value={{ ...parentContext, inputId: undefined }}>\n {children}\n </FormControlContext.Provider>\n );\n};\n\ninterface CheckboxGroupItemProps {\n children: ReactElement<ComponentPropsWithRef<typeof Checkbox>>;\n}\n\nconst CheckboxGroupItem = (props: CheckboxGroupItemProps) => {\n const { children } = props;\n const checkboxProps = children.props;\n\n const state = useContext(CheckboxGroupContext);\n const ref = useRef();\n const { inputProps } = useCheckboxGroupItem(\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n {\n ...checkboxProps,\n onChange: undefined,\n isDisabled: checkboxProps.disabled,\n isReadOnly: checkboxProps.readOnly,\n isRequired: checkboxProps.required,\n isIndeterminate: checkboxProps.indeterminate,\n value: String(children.props.value),\n 'aria-label': innerText(checkboxProps.label),\n },\n state,\n ref,\n );\n\n return cloneElement(\n children,\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n mergeProps(inputProps, {\n onChange: checkboxProps.onChange,\n disabled: state.isDisabled || checkboxProps.disabled,\n checked: state.isSelected(String(inputProps.value)),\n ref,\n } as ComponentPropsWithRef<typeof Checkbox>),\n );\n};\n\ninterface CheckboxGroupFieldProps\n extends\n Omit<ImplementsFormField, 'configField'>,\n Omit<\n AriaCheckboxGroupProps,\n 'description' | 'disabled' | 'isReadOnly' | 'isRequired' | 'errorMessage'\n > {\n children?: ReactElement<CheckboxProps>[];\n disabled?: boolean;\n readOnly?: boolean;\n required?: boolean;\n}\n\nconst CheckboxGroupField = ({\n children,\n name,\n onChange,\n disabled,\n readOnly,\n required,\n ...props\n}: CheckboxGroupFieldProps) => {\n const reactAriaProps = {\n ...props,\n description: props.helperText,\n errorMessage: props.errorText,\n onChange,\n name,\n isDisabled: disabled,\n isReadOnly: readOnly,\n isRequired: required,\n };\n const state = useCheckboxGroupState(reactAriaProps);\n const { groupProps, labelProps, descriptionProps, errorMessageProps } = useCheckboxGroup(\n reactAriaProps,\n state,\n );\n\n return (\n <FormField\n labelProps={labelProps}\n helperProps={descriptionProps}\n errorProps={errorMessageProps}\n disabled={disabled}\n required={required}\n {...groupProps}\n {...props}\n >\n <ClearGroupInputId>\n <CheckboxGroupContext.Provider value={state}>\n {Children.map(children, (checkbox) => (\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n <CheckboxGroupItem>{checkbox}</CheckboxGroupItem>\n ))}\n </CheckboxGroupContext.Provider>\n </ClearGroupInputId>\n </FormField>\n );\n};\n\nexport default CheckboxGroupField;\n","import { type ReactNode, useState } from 'react';\n\nimport { MoreIcon, PlusIcon } from '@persona/icons';\n\nimport { IconButton } from '#src/components/Button';\nimport useFormGroup from '#src/components/ConfigFormGroup/useFormGroup';\nimport DropdownMenu from '#src/components/DropdownMenu';\nimport FormField from '#src/components/FormField/FormField';\nimport type { ImplementsFormField } from '#src/components/FormField/inputFields';\nimport ListBox, { type ListBoxProps } from '#src/components/ListBox';\nimport type { MenuItemProps } from '#src/components/Menu';\n\ninterface ListBoxFieldAction extends Omit<MenuItemProps, 'children'> {\n label: string;\n onClick: (selectedKeys: ListBoxProps<any>['selectedKeys']) => void;\n}\n\ninterface AddDropdownConfig {\n options: ({ label: ReactNode; value: string } & Omit<MenuItemProps, 'children'>)[];\n onSelection: (value: string) => void;\n}\n\ninterface ListBoxFieldProps<T extends object> extends ImplementsFormField, ListBoxProps<T> {\n actions?: ListBoxFieldAction[];\n addDropdownConfig?: AddDropdownConfig;\n /** Disables the add button, e.g. while the list is read-only. */\n addDisabled?: boolean;\n}\n\nconst ListBoxField = <T extends object>({\n label,\n helperText,\n errorText,\n warningText,\n labelProps,\n helperProps,\n errorProps,\n warningProps,\n inputId,\n required,\n onAdd,\n onDelete,\n deleteDisabled,\n configField: configFieldProp,\n size = 'md',\n actions = [],\n addDropdownConfig,\n addDisabled,\n selectedKeys: selectedKeysProp,\n onSelectionChange,\n defaultSelectedKeys,\n ...props\n}: ListBoxFieldProps<T>) => {\n const { configField } = useFormGroup({ configField: configFieldProp });\n const menuActions: ListBoxFieldAction[] = [...actions];\n const [selectedKeysState, setSelectedKeys] = useState(defaultSelectedKeys);\n const selectedKeys = selectedKeysProp ?? selectedKeysState;\n const effectiveSize = configField ? 'sm' : size;\n\n if (onDelete) {\n menuActions.unshift({\n label: 'Delete',\n onClick: () => onDelete(selectedKeys),\n disabled:\n deleteDisabled ||\n selectedKeys == null ||\n (typeof selectedKeys === 'object' && [...selectedKeys].length === 0),\n });\n }\n\n const addButton = (\n <IconButton size='sm' onClick={onAdd} aria-label='Add item to list' disabled={addDisabled}>\n <PlusIcon />\n </IconButton>\n );\n\n return (\n <FormField\n label={label}\n helperText={helperText}\n errorText={errorText}\n warningText={warningText}\n labelProps={labelProps}\n helperProps={helperProps}\n errorProps={errorProps}\n warningProps={warningProps}\n inputId={inputId}\n required={required}\n configField={configField}\n rightActions={\n configField && (\n <>\n {menuActions.length > 0 && (\n <DropdownMenu\n trigger={\n <IconButton aria-label='Actions' size='sm'>\n <MoreIcon />\n </IconButton>\n }\n portal\n >\n {menuActions.map((action) => (\n <DropdownMenu.Item\n key={action.label}\n {...action}\n onClick={() => action.onClick(selectedKeys)}\n size={effectiveSize}\n >\n {action.label}\n </DropdownMenu.Item>\n ))}\n </DropdownMenu>\n )}\n {onAdd && !addDropdownConfig && addButton}\n {addDropdownConfig && (\n <DropdownMenu trigger={addButton} align='start' portal>\n {addDropdownConfig.options.map((option) => (\n <DropdownMenu.Item\n key={option.value}\n {...option}\n onClick={() => addDropdownConfig.onSelection(option.value)}\n size={effectiveSize}\n >\n {option.label}\n </DropdownMenu.Item>\n ))}\n </DropdownMenu>\n )}\n </>\n )\n }\n >\n <ListBox\n id={inputId}\n fullWidth={configField}\n size={effectiveSize}\n deleteDisabled={deleteDisabled}\n // We have to control the keys so we can power the `rightActions`\n selectedKeys={selectedKeys}\n onSelectionChange={(keys) => {\n onSelectionChange?.(keys);\n setSelectedKeys(keys);\n }}\n {...props}\n />\n </FormField>\n );\n};\n\nexport default ListBoxField;\n","import { Fragment, type MouseEvent, type ReactNode, useState } from 'react';\n\nimport { IconButton } from '@persona/design-system/components/Button';\nimport { useFormGroup } from '@persona/design-system/components/ConfigFormGroup';\nimport DropdownMenu from '@persona/design-system/components/DropdownMenu';\nimport type { FormLabelProps } from '@persona/design-system/components/FormControl';\nimport type { MenuItemProps } from '@persona/design-system/components/Menu';\nimport TableBox, { type TableBoxProps } from '@persona/design-system/components/TableBox';\nimport { MoreIcon, PlusIcon } from '@persona/icons';\n\nimport FormField from './FormField';\nimport type { ImplementsFormField } from './inputFields';\n\nexport interface TableBoxFieldAction extends Omit<MenuItemProps, 'children'> {\n label: string;\n onClick: (selectedKey: TableBoxProps['selectedKey']) => void;\n}\n\nexport interface TableBoxFieldActionGroup {\n type: 'group';\n heading: string;\n actions: TableBoxFieldAction[];\n}\n\nexport type TableBoxFieldActionEntry = TableBoxFieldAction | TableBoxFieldActionGroup;\n\n/** Aria-label on TableBoxField's + button. Consumers that style or detect that\n * button (e.g. popover toggle guards) should import this rather than redefining it. */\nexport const TABLE_BOX_FIELD_ADD_BUTTON_ARIA_LABEL = 'Add item to table';\n\nconst isActionGroup = (action: TableBoxFieldActionEntry): action is TableBoxFieldActionGroup =>\n 'type' in action && action.type === 'group';\n\ninterface AddDropdownConfig {\n options: Array<{ label: string; value: string }>;\n onSelection: (value: string) => void;\n}\n\ninterface TableBoxFieldProps<T extends object = object>\n extends ImplementsFormField, Omit<TableBoxProps<T>, 'aria-label' | 'onCreateNewRow'> {\n onAdd?: (e: MouseEvent<HTMLButtonElement>) => void;\n onDelete?: (selectedKey: string | null) => void;\n deleteDisabled?: boolean;\n /** Actions and labeled action groups rendered in order. Empty groups are omitted. */\n actions?: TableBoxFieldActionEntry[];\n addDropdownConfig?: AddDropdownConfig;\n\n /**\n * Callback to create a new row and add it to the rows array\n * Should return the id of the newly created row\n */\n createNewRow?: () => string;\n children?: ReactNode;\n}\n\nconst TableBoxField = <T extends object = object>({\n label,\n helperText,\n errorText,\n warningText,\n labelProps: labelPropsProp,\n helperProps,\n errorProps,\n warningProps,\n inputId,\n required,\n onAdd,\n onDelete,\n deleteDisabled,\n configField: configFieldProp = true,\n actions = [],\n addDropdownConfig,\n selectedKey: selectedKeyProp,\n onSelectionChange,\n defaultSelectedKey,\n selectionMode,\n disabled,\n createNewRow,\n children,\n emptyText = 'No data',\n ...props\n}: TableBoxFieldProps<T>) => {\n const { configField } = useFormGroup({ configField: configFieldProp });\n const menuActions: TableBoxFieldActionEntry[] = [...actions];\n const [selectedKeyState, setSelectedKey] = useState(defaultSelectedKey);\n const selectedKey = selectedKeyProp ?? selectedKeyState;\n const [newRowId, setNewRowId] = useState<string | null>(null);\n const labelProps: FormLabelProps = { size: 'sm', ...labelPropsProp };\n\n const handleCreateNewRow = () => {\n if (createNewRow) {\n setNewRowId(createNewRow());\n }\n };\n\n // Handle add button click\n const handleAddClick = (e: MouseEvent<HTMLButtonElement>) => {\n if (createNewRow) {\n handleCreateNewRow();\n } else if (onAdd) {\n onAdd(e);\n }\n };\n\n if (onDelete) {\n menuActions.unshift({\n label: 'Delete',\n onClick: () => selectedKey && onDelete(selectedKey),\n disabled: deleteDisabled || selectedKey == null,\n });\n }\n const visibleMenuActions = menuActions.filter(\n (action) => !isActionGroup(action) || action.actions.length > 0,\n );\n\n const addButton = (\n <IconButton\n size='sm'\n onClick={handleAddClick}\n aria-label={TABLE_BOX_FIELD_ADD_BUTTON_ARIA_LABEL}\n disabled={disabled}\n >\n <PlusIcon />\n </IconButton>\n );\n\n return (\n <FormField\n label={label}\n helperText={helperText}\n errorText={errorText}\n warningText={warningText}\n labelProps={labelProps}\n helperProps={helperProps}\n errorProps={errorProps}\n warningProps={warningProps}\n inputId={inputId}\n required={required}\n rightActions={\n configField && (\n <>\n {visibleMenuActions.length > 0 && (\n <DropdownMenu\n trigger={\n <IconButton aria-label='Actions' size='sm' disabled={disabled}>\n <MoreIcon />\n </IconButton>\n }\n portal\n >\n {visibleMenuActions.map((entry, entryIndex) => {\n const previousEntry = visibleMenuActions[entryIndex - 1];\n if (isActionGroup(entry)) {\n return (\n <Fragment key={`${entry.heading}-${entryIndex}`}>\n {entryIndex > 0 && <DropdownMenu.Divider />}\n <DropdownMenu.Heading size='sm'>{entry.heading}</DropdownMenu.Heading>\n {entry.actions.map((action) => (\n <DropdownMenu.Item\n key={action.label}\n {...action}\n disabled={disabled || action.disabled}\n onClick={() => action.onClick(selectedKey)}\n size='sm'\n >\n {action.label}\n </DropdownMenu.Item>\n ))}\n </Fragment>\n );\n }\n\n return (\n <Fragment key={`${entry.label}-${entryIndex}`}>\n {previousEntry && isActionGroup(previousEntry) && <DropdownMenu.Divider />}\n <DropdownMenu.Item\n {...entry}\n disabled={disabled || entry.disabled}\n onClick={() => entry.onClick(selectedKey)}\n size='sm'\n >\n {entry.label}\n </DropdownMenu.Item>\n </Fragment>\n );\n })}\n </DropdownMenu>\n )}\n {(onAdd || createNewRow) && !addDropdownConfig && addButton}\n {addDropdownConfig && (\n <DropdownMenu trigger={addButton} portal>\n {addDropdownConfig.options.map((option) => (\n <DropdownMenu.Item\n key={option.value}\n {...option}\n onClick={() => addDropdownConfig.onSelection(option.value)}\n size='sm'\n >\n {option.label}\n </DropdownMenu.Item>\n ))}\n </DropdownMenu>\n )}\n </>\n )\n }\n >\n <TableBox\n aria-label={`${label} table`}\n // We have to control the keys so we can power the `rightActions`\n selectedKey={selectedKey}\n onSelectionChange={(key) => {\n onSelectionChange?.(key);\n setSelectedKey(key);\n }}\n selectionMode={selectionMode}\n newRowId={newRowId}\n onCreateNewRow={createNewRow ? handleCreateNewRow : undefined}\n emptyText={emptyText}\n disabled={disabled}\n {...props}\n >\n {children}\n </TableBox>\n </FormField>\n );\n};\n\n// Attach subcomponents to TableBoxField\nTableBoxField.Row = TableBox.Row;\nTableBoxField.Cell = TableBox.Cell;\n\nexport default TableBoxField;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwFA,MAAa,YAAY,WAA2C,SAAS,UAC3E,EACE,OACA,UACA,YACA,aACA,WACA,YACA,aACA,cACA,YACA,aAAa,iBACb,uBACA,cACA,GAAG,SAEL,KACA;CACA,MAAM,EAAE,aAAa,yBAAyB,cAAc;CAC5D,MAAM,cAAc,mBAAmB;CAEvC,MAAM,eAAe,QACnB,oBAAC,WAAD;EAAW,SAAS,eAAe,aAAa,aAAa,KAAA;EAAW,GAAI;YACzE;EACS,CAAA,GACV;AAEJ,QACE,qBAAC,aAAD;EACE,UAAU,CAAC,CAAC;EACZ,YAAY,CAAC,CAAC;EACT;EACQ;EACb,iBAAiB,CAAC,CAAC;EACI;EACvB,GAAI;YAPN;GASG,eACC,qBAAC,QAAD;IAAQ,SAAQ;IAAgB,OAAM;cAAtC,CACG,cACD,oBAAC,QAAD;KAAQ,SAAS,QAAQ;eAAK;KAAsB,CAAA,CAC7C;QAET;GAEF,oBAAC,oBAAD,EAAqB,UAA8B,CAAA;GAClD,CAAC,eAAe,cAAc,oBAAC,YAAD;IAAY,GAAI;cAAc;IAAwB,CAAA;GACpF,CAAC,eAAe,eAAe,oBAAC,aAAD;IAAa,GAAI;cAAe;IAA0B,CAAA;GACzF,CAAC,eAAe,aAAa,oBAAC,WAAD;IAAW,GAAI;cAAa;IAAsB,CAAA;GACpE;;EAEhB;;;;;;;ACjGF,MAAa,0BACX,UAIG;CACH,MAAM,EACJ,OACA,SACA,YACA,WACA,aACA,YACA,aACA,cACA,YACA,aACA,uBACA,cACA,GAAG,eACD;AAEJ,QAAO;EACL,gBAAgB;GACd;GACA;GACA,UAAU,MAAM;GAChB;GACA;GACA;GACA;GACA;GACA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MAMM,CACpB;IACW,CAAA;GAEhB,EAAA,CAAA;YAIP,oBAAC,UAAD;GACE,cAAY,GAAG,MAAM;GAER;GACb,oBAAoB,QAAQ;AAC1B,wBAAoB,IAAI;AACxB,mBAAe,IAAI;;GAEN;GACL;GACV,gBAAgB,eAAe,qBAAqB,KAAA;GACzC;GACD;GACV,GAAI;GAEH;GACQ,CAAA;EACD,CAAA;;AAKhB,cAAc,MAAM,SAAS;AAC7B,cAAc,OAAO,SAAS"}
|
package/dist/FormField.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as FormFieldBaseProps, r as FormFieldProps, t as FormField } from "./FormField-
|
|
1
|
+
import { n as FormFieldBaseProps, r as FormFieldProps, t as FormField } from "./FormField-BW5uMzId.mjs";
|
|
2
2
|
export { FormField, FormField as default, FormFieldBaseProps, FormFieldProps };
|
|
@@ -32,4 +32,4 @@ declare const Root: ({
|
|
|
32
32
|
}: HeaderProps & ComponentPropsWithoutRef<"div">) => _$react_jsx_runtime0.JSX.Element;
|
|
33
33
|
//#endregion
|
|
34
34
|
export { Root as a, HeaderProps as i, Header as n, Title as o, HeaderContainer as r, TitleContainer as s, ActionsContainer as t };
|
|
35
|
-
//# sourceMappingURL=Header-
|
|
35
|
+
//# sourceMappingURL=Header-CV0Lcf0C.d.mts.map
|
package/dist/Header.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as Root, i as HeaderProps, n as Header, o as Title, r as HeaderContainer, s as TitleContainer, t as ActionsContainer } from "./Header-
|
|
1
|
+
import { a as Root, i as HeaderProps, n as Header, o as Title, r as HeaderContainer, s as TitleContainer, t as ActionsContainer } from "./Header-CV0Lcf0C.mjs";
|
|
2
2
|
export { ActionsContainer, HeaderContainer, HeaderProps, Root, Title, TitleContainer, Header as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as TooltipWithIconProps } from "./Tooltip-
|
|
1
|
+
import { i as TooltipWithIconProps } from "./Tooltip-Ddy2Jq0K.mjs";
|
|
2
2
|
import { ReactNode } from "react";
|
|
3
3
|
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
4
|
|
|
@@ -17,4 +17,4 @@ declare const HelperTooltip: ({
|
|
|
17
17
|
}: HelperTooltipProps) => _$react_jsx_runtime0.JSX.Element;
|
|
18
18
|
//#endregion
|
|
19
19
|
export { HelperTooltipProps as n, HelperTooltip as t };
|
|
20
|
-
//# sourceMappingURL=HelperTooltip-
|
|
20
|
+
//# sourceMappingURL=HelperTooltip-BNM3pTM-.d.mts.map
|
package/dist/HelperTooltip.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as HelperTooltipProps, t as HelperTooltip } from "./HelperTooltip-
|
|
1
|
+
import { n as HelperTooltipProps, t as HelperTooltip } from "./HelperTooltip-BNM3pTM-.mjs";
|
|
2
2
|
export { HelperTooltipProps, HelperTooltip as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as ASTNode } from "./types-
|
|
2
|
-
import { a as Mode, l as TextStyle, u as ValueType } from "./types-
|
|
1
|
+
import { t as ASTNode } from "./types-DeVO4sCM.mjs";
|
|
2
|
+
import { a as Mode, l as TextStyle, u as ValueType } from "./types-02Ij0dgs.mjs";
|
|
3
3
|
import { SchemaValidator } from "./validation2.mjs";
|
|
4
4
|
import * as _$react from "react";
|
|
5
5
|
import { FC, ReactNode } from "react";
|