@persona/design-system 0.10.10 → 0.10.11
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 +27 -0
- package/dist/{Action-CHWYwpYR.d.mts → Action-sLO73eKq.d.mts} +2 -2
- 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-BCdsVKuj.mjs → Badge-DZq6ByIU.mjs} +2 -2
- package/dist/{Badge-BCdsVKuj.mjs.map → Badge-DZq6ByIU.mjs.map} +1 -1
- package/dist/BooleanValueControl.d.mts +1 -1
- package/dist/{Breadcrumbs-CMf3Uvow.mjs → Breadcrumbs-DpsNZWF9.mjs} +9 -9
- package/dist/Breadcrumbs-DpsNZWF9.mjs.map +1 -0
- package/dist/{Button-DjD8QxcY.d.mts → Button-C4a4BTjL.d.mts} +2 -2
- package/dist/Button.d.mts +1 -1
- package/dist/CalendarBase.d.mts +1 -1
- package/dist/{Card-DiUHtYg_.d.mts → Card-CPV4_mHk.d.mts} +4 -4
- package/dist/Card.d.mts +1 -1
- package/dist/Card2.d.mts +1 -1
- package/dist/CardGrouping.d.mts +1 -1
- package/dist/{CardV2-CrV6eEQb.mjs → CardV2-DCoDfEvr.mjs} +16 -13
- package/dist/CardV2-DCoDfEvr.mjs.map +1 -0
- package/dist/ChartFrame.d.mts +61 -0
- package/dist/ChartLegend.d.mts +60 -0
- package/dist/ChartPopover.d.mts +155 -0
- package/dist/{Checkbox-Dr4LMKHV.mjs → Checkbox-C3z7UUSC.mjs} +8 -8
- package/dist/Checkbox-C3z7UUSC.mjs.map +1 -0
- package/dist/{CheckboxGroupField-Bpu2j6G2.d.mts → CheckboxGroupField-BT87OVOF.d.mts} +2 -2
- package/dist/CheckboxGroupField.d.mts +1 -1
- package/dist/ChoicesValueControl.d.mts +1 -1
- package/dist/{Combobox-Gb_j1dg6.mjs → Combobox-BkK_tosd.mjs} +300 -116
- package/dist/Combobox-BkK_tosd.mjs.map +1 -0
- package/dist/Combobox-aOJDTjzC.d.mts +12 -0
- package/dist/Combobox.d.mts +3 -3
- package/dist/{ComboboxBase-BPXqJHaQ.d.mts → ComboboxBase-Brgv5nxk.d.mts} +65 -25
- package/dist/ComboboxBase.d.mts +2 -2
- package/dist/{ComboboxMultiSelect-BwkkSymj.d.mts → ComboboxMultiSelect-DJyAv0Eg.d.mts} +10 -6
- package/dist/ComboboxMultiSelect.d.mts +2 -2
- package/dist/{ComboboxSingleSelect-CdNNJNkp.d.mts → ComboboxSingleSelect-CP8-HLKl.d.mts} +8 -6
- package/dist/ComboboxSingleSelect.d.mts +2 -2
- package/dist/{CompactBar-BLZZWtIE.d.mts → CompactBar-B0LhjrYV.d.mts} +2 -2
- package/dist/CompactBar.d.mts +1 -1
- package/dist/{ConfigFormGroup-BCTWCws5.mjs → ConfigFormGroup-DAUqAhJW.mjs} +2 -2
- package/dist/{ConfigFormGroup-BCTWCws5.mjs.map → ConfigFormGroup-DAUqAhJW.mjs.map} +1 -1
- package/dist/{DataTable-BE9inUi-.d.mts → DataTable-CSl5Jn3E.d.mts} +18 -8
- package/dist/{DataTable-CIZJ1vO8.mjs → DataTable-DiwzhNMt.mjs} +41 -28
- package/dist/DataTable-DiwzhNMt.mjs.map +1 -0
- package/dist/DataTable.d.mts +1 -1
- package/dist/{DatePicker-C9redLBr.mjs → DatePicker-BK7ioKBm.mjs} +410 -410
- package/dist/DatePicker-BK7ioKBm.mjs.map +1 -0
- package/dist/DateRangeValueControl.d.mts +1 -1
- package/dist/DateValueControl.d.mts +1 -1
- package/dist/{DropdownButton-DpLG-cIj.mjs → DropdownButton-Dp-MZ5tA.mjs} +3 -3
- package/dist/{DropdownButton-DpLG-cIj.mjs.map → DropdownButton-Dp-MZ5tA.mjs.map} +1 -1
- package/dist/DropdownButton.d.mts +2 -2
- package/dist/{DropdownMenu-B6D4stkF.d.mts → DropdownMenu-BnHPeHOm.d.mts} +3 -3
- package/dist/{DropdownMenu-c8XK2Lr4.mjs → DropdownMenu-jJSHQaih.mjs} +4 -2
- package/dist/DropdownMenu-jJSHQaih.mjs.map +1 -0
- package/dist/DropdownMenu.d.mts +1 -1
- package/dist/{FieldRegistry-C2NVPhMO.d.mts → FieldRegistry-CJwGpUVK.d.mts} +2 -2
- package/dist/FieldRegistry.d.mts +1 -1
- package/dist/{FilterBar-BE_gBM0H.d.mts → FilterBar-DDyk14sx.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 +3 -2
- package/dist/{FloatingToolbar-DLRaE0o7.mjs → FloatingToolbar-rfKurDs8.mjs} +36 -39
- package/dist/FloatingToolbar-rfKurDs8.mjs.map +1 -0
- package/dist/{FormControl-BztNXLn6.mjs → FormControl--pbTH3bY.mjs} +3 -3
- package/dist/{FormControl-BztNXLn6.mjs.map → FormControl--pbTH3bY.mjs.map} +1 -1
- package/dist/{FormControl-BQe3GRhi.d.mts → FormControl-DPYbLcBK.d.mts} +2 -2
- package/dist/FormControl.d.mts +1 -1
- package/dist/FormControlLabel.d.mts +2 -2
- package/dist/{FormField-BW5uMzId.d.mts → FormField-CYNGm2bJ.d.mts} +2 -2
- package/dist/{FormField-Cf1VMvoa.mjs → FormField-DMxjftFw.mjs} +14 -14
- package/dist/{FormField-Cf1VMvoa.mjs.map → FormField-DMxjftFw.mjs.map} +1 -1
- package/dist/FormField.d.mts +1 -1
- package/dist/{Grid-CYpOqTUu.mjs → Grid-DVC0SSEZ.mjs} +2 -2
- package/dist/{Grid-CYpOqTUu.mjs.map → Grid-DVC0SSEZ.mjs.map} +1 -1
- package/dist/{Header-CV0Lcf0C.d.mts → Header-DaaUprCL.d.mts} +2 -2
- package/dist/Header.d.mts +1 -1
- package/dist/{HelperTooltip-BNM3pTM-.d.mts → HelperTooltip-C5BDdJSI.d.mts} +2 -2
- package/dist/HelperTooltip.d.mts +1 -1
- package/dist/HighlightedText.d.mts +1 -1
- package/dist/{HoverCopyableField-XHC_n9tp.mjs → HoverCopyableField-B2-xlwUt.mjs} +12 -7
- package/dist/HoverCopyableField-B2-xlwUt.mjs.map +1 -0
- package/dist/{IconButton-C_ReZm8v.d.mts → IconButton-7k-wjvH3.d.mts} +2 -2
- package/dist/{IconButton-DxHB2g80.mjs → IconButton-kSjnfhWt.mjs} +11 -10
- package/dist/IconButton-kSjnfhWt.mjs.map +1 -0
- package/dist/IconButton.d.mts +1 -1
- package/dist/ImageTile.d.mts +1 -1
- package/dist/IndexTableLayout.d.mts +4 -4
- package/dist/InlineCombobox.d.mts +1 -1
- package/dist/InlineInput.d.mts +1 -1
- package/dist/{Input-DH-5dKor.d.mts → Input-CwvrBsiS.d.mts} +3 -3
- package/dist/{Input-RHXujO9u.mjs → Input-TRmTBEav.mjs} +5 -5
- package/dist/{Input-RHXujO9u.mjs.map → Input-TRmTBEav.mjs.map} +1 -1
- package/dist/Input.d.mts +1 -1
- package/dist/IntegerValueControl.d.mts +3 -2
- package/dist/{Link-D_kCyLYX.mjs → Link-XvzUN8sY.mjs} +6 -6
- package/dist/Link-XvzUN8sY.mjs.map +1 -0
- package/dist/{ListBox-DpFcM-dM.d.mts → ListBox-BePQBYR7.d.mts} +3 -3
- package/dist/{ListBox-BZp6exb8.mjs → ListBox-DahM1PgU.mjs} +12 -12
- package/dist/{ListBox-BZp6exb8.mjs.map → ListBox-DahM1PgU.mjs.map} +1 -1
- package/dist/ListBox.d.mts +1 -1
- package/dist/{ListBoxField-DL6Zk8TU.d.mts → ListBoxField-lj7JN1BX.d.mts} +4 -4
- package/dist/ListBoxField.d.mts +1 -1
- package/dist/{LoadingShimmer-oPIv2ESr.mjs → LoadingShimmer-CpfKTSUs.mjs} +4 -3
- package/dist/LoadingShimmer-CpfKTSUs.mjs.map +1 -0
- package/dist/LoadingShimmer.d.mts +1 -1
- package/dist/{LogicRow-BakOUtzx.d.mts → LogicRow-Do7t7Suf.d.mts} +2 -2
- package/dist/LogicRow.d.mts +1 -1
- package/dist/MaskedInput.d.mts +2 -2
- package/dist/MatchHighlight.d.mts +1 -1
- package/dist/{Menu-BVn1jh46.mjs → Menu-BvMzSH2I.mjs} +5 -5
- package/dist/{Menu-BVn1jh46.mjs.map → Menu-BvMzSH2I.mjs.map} +1 -1
- package/dist/{Menu-D6OrKCTC.d.mts → Menu-Ca5ftvo6.d.mts} +4 -4
- package/dist/Menu.d.mts +1 -1
- package/dist/{MiddleTruncatedText-DicQsLDG.mjs → MiddleTruncatedText--jzGTD00.mjs} +2 -2
- package/dist/{MiddleTruncatedText-DicQsLDG.mjs.map → MiddleTruncatedText--jzGTD00.mjs.map} +1 -1
- package/dist/{Modal-De5_bPJ_.mjs → Modal-B6X5AgWj.mjs} +54 -25
- package/dist/{Modal-De5_bPJ_.mjs.map → Modal-B6X5AgWj.mjs.map} +1 -1
- package/dist/{Modal-CujB7DuB.d.mts → Modal-BPfFyzkw.d.mts} +3 -3
- package/dist/Modal.d.mts +1 -1
- package/dist/{PageHeader-UPiqJpIF.d.mts → PageHeader-BeBmYmUX.d.mts} +2 -2
- package/dist/{PageHeader-7_Hf6rHl.mjs → PageHeader-bhQTjuZF.mjs} +2 -2
- package/dist/{PageHeader-7_Hf6rHl.mjs.map → PageHeader-bhQTjuZF.mjs.map} +1 -1
- package/dist/PageHeader.d.mts +1 -1
- package/dist/{PageLayout-BdVM37bV.d.mts → PageLayout-BXM_pyrU.d.mts} +2 -2
- package/dist/{PageLayout-DjtGrvJa.mjs → PageLayout-DgEGcZgB.mjs} +3 -3
- package/dist/{PageLayout-DjtGrvJa.mjs.map → PageLayout-DgEGcZgB.mjs.map} +1 -1
- package/dist/PageLayout.d.mts +1 -1
- package/dist/{PageSelector-B5CcAzss.d.mts → PageSelector-C14ABZVL.d.mts} +2 -2
- package/dist/PageSelector.d.mts +1 -1
- package/dist/{Pagination-DMH2IaV0.mjs → Pagination-DE8wT55m.mjs} +5 -5
- package/dist/{Pagination-DMH2IaV0.mjs.map → Pagination-DE8wT55m.mjs.map} +1 -1
- package/dist/{Pii-24D_nSRQ.mjs → Pii-C42ZY88Y.mjs} +2 -2
- package/dist/{Pii-24D_nSRQ.mjs.map → Pii-C42ZY88Y.mjs.map} +1 -1
- package/dist/{PillShell-B7Bm-dsE.d.mts → PillShell-Bkyu5FXB.d.mts} +2 -2
- package/dist/PillShell.d.mts +1 -1
- package/dist/{Popover-DordjYNM.mjs → Popover-DuFjaSoq.mjs} +4 -2
- package/dist/Popover-DuFjaSoq.mjs.map +1 -0
- package/dist/Popover.d.mts +1 -1
- package/dist/ProgressBar.d.mts +1 -1
- package/dist/{ProgressIndicator-zt3ndT9U.mjs → ProgressIndicator-hy1P-RG1.mjs} +3 -3
- package/dist/{ProgressIndicator-zt3ndT9U.mjs.map → ProgressIndicator-hy1P-RG1.mjs.map} +1 -1
- package/dist/{Radio-BlEtetrr.mjs → Radio-B4TBAho6.mjs} +5 -5
- package/dist/Radio-B4TBAho6.mjs.map +1 -0
- package/dist/{RadioGroup-CMrXmmn4.mjs → RadioGroup-Bf24GKOb.mjs} +3 -3
- package/dist/{RadioGroup-CMrXmmn4.mjs.map → RadioGroup-Bf24GKOb.mjs.map} +1 -1
- package/dist/RichTextEditor.d.mts +1 -1
- package/dist/RuleEditorFields.d.mts +2 -2
- package/dist/RulesPill.d.mts +1 -1
- package/dist/SectionHeading.d.mts +1 -1
- package/dist/{SegmentedControl-D_DA-MU1.mjs → SegmentedControl-BpR7sUWO.mjs} +6 -3
- package/dist/SegmentedControl-BpR7sUWO.mjs.map +1 -0
- package/dist/{Select-CR9TjFfo.d.mts → Select-DYdn73Nh.d.mts} +2 -2
- package/dist/{Select-DOlw_LPR.mjs → Select-RdTT2KoH.mjs} +10 -8
- package/dist/Select-RdTT2KoH.mjs.map +1 -0
- package/dist/Select.d.mts +1 -1
- package/dist/SmartTextInput.d.mts +1 -1
- package/dist/SmartTextInputField.d.mts +2 -2
- package/dist/SmartTextInputFunctionDialog.d.mts +1 -1
- package/dist/SmartTextInputPopover.d.mts +1 -1
- package/dist/{Spinner-CXb-KUs1.mjs → Spinner-vcApnJzv.mjs} +2 -2
- package/dist/{Spinner-CXb-KUs1.mjs.map → Spinner-vcApnJzv.mjs.map} +1 -1
- package/dist/{Stack-CODxfzhl.d.mts → Stack-B6MrjJeW.d.mts} +2 -2
- package/dist/Stack.d.mts +1 -1
- package/dist/{StatusIndicator-CzRaEFSz.mjs → StatusIndicator-lwt35J6B.mjs} +3 -3
- package/dist/{StatusIndicator-CzRaEFSz.mjs.map → StatusIndicator-lwt35J6B.mjs.map} +1 -1
- package/dist/{Sticker-CLvRB8V5.d.mts → Sticker-C7Wv3Obx.d.mts} +4 -4
- package/dist/{Sticker-C1_6I08u.mjs → Sticker-jfOM4Yi6.mjs} +5 -5
- package/dist/{Sticker-C1_6I08u.mjs.map → Sticker-jfOM4Yi6.mjs.map} +1 -1
- package/dist/Sticker.d.mts +1 -1
- package/dist/StringValueControl.d.mts +2 -1
- package/dist/Tab.d.mts +2 -2
- package/dist/{TabBar-BCFO38E0.mjs → TabBar-DwHgbIQ6.mjs} +8 -8
- package/dist/TabBar-DwHgbIQ6.mjs.map +1 -0
- package/dist/{Table-DPi4Dt5H.mjs → Table-SMJAWqoe.mjs} +21 -13
- package/dist/Table-SMJAWqoe.mjs.map +1 -0
- package/dist/{TableBox-DNQsgQ8x.mjs → TableBox-DS8mpN3-.mjs} +21 -17
- package/dist/TableBox-DS8mpN3-.mjs.map +1 -0
- package/dist/TableBox.d.mts +1 -1
- package/dist/{TableBoxCell-CsRt_5gP.d.mts → TableBoxCell-Bo5xYEmR.d.mts} +6 -6
- package/dist/TableBoxCell.d.mts +1 -1
- package/dist/{TableBoxField-Db0Vjo6Z.d.mts → TableBoxField-CdgjSGLK.d.mts} +5 -5
- package/dist/TableBoxField.d.mts +1 -1
- package/dist/{TableBoxRow-exMlZyc4.d.mts → TableBoxRow-DuWS2iRC.d.mts} +2 -2
- package/dist/TableBoxRow.d.mts +1 -1
- package/dist/{TableBoxRowActions-UO9YN34k.d.mts → TableBoxRowActions-zW74DkXt.d.mts} +2 -2
- package/dist/TableBoxRowActions.d.mts +1 -1
- package/dist/{TableCell-CQsF7t4e.d.mts → TableCell-uv_jqT5e.d.mts} +2 -2
- package/dist/TableCell.d.mts +1 -1
- package/dist/{TableControls-Clo_0Mty.d.mts → TableControls-9vz-HfDu.d.mts} +4 -4
- package/dist/{TableControls-BrP_BqnF.mjs → TableControls-CX7BvgD2.mjs} +107 -43
- package/dist/TableControls-CX7BvgD2.mjs.map +1 -0
- package/dist/TableControls.d.mts +1 -1
- package/dist/{TableControlsContext-BNd6z9mD.d.mts → TableControlsContext-D0Hn3rwL.d.mts} +2 -2
- package/dist/TableControlsContext.d.mts +1 -1
- package/dist/{TableViewConfigurationDropdown-Cp7ausV_.d.mts → TableViewConfigurationDropdown-CZcLH8uR.d.mts} +2 -2
- package/dist/TableViewConfigurationDropdown.d.mts +1 -1
- package/dist/{TechnicalSticker-Cq5jzYKQ.mjs → TechnicalSticker-DrN45Vut.mjs} +9 -7
- package/dist/TechnicalSticker-DrN45Vut.mjs.map +1 -0
- package/dist/{Text-CvaqognH.d.mts → Text-CdHeSHCc.d.mts} +2 -2
- package/dist/Text.d.mts +1 -1
- package/dist/{TextArea-Dro-HH8O.mjs → TextArea-CQ1YNi2b.mjs} +4 -5
- package/dist/TextArea-CQ1YNi2b.mjs.map +1 -0
- package/dist/{TextUnderlineTooltip-Bd5e8KH3.d.mts → TextUnderlineTooltip-By1VVsSs.d.mts} +3 -3
- package/dist/TextUnderlineTooltip.d.mts +1 -1
- package/dist/Tile.d.mts +1 -1
- package/dist/{Toggle-D9MzTIZs.mjs → Toggle-DjmkjJlw.mjs} +13 -9
- package/dist/Toggle-DjmkjJlw.mjs.map +1 -0
- package/dist/{Tooltip-YViXzMdm.mjs → Tooltip-C2VB8I6y.mjs} +18 -5
- package/dist/Tooltip-C2VB8I6y.mjs.map +1 -0
- package/dist/{Tooltip-Ddy2Jq0K.d.mts → Tooltip-OxVvOfn8.d.mts} +3 -3
- package/dist/Tooltip.d.mts +1 -1
- package/dist/{TruncatedText-sr9Fhm3N.d.mts → TruncatedText-Dqj94BFK.d.mts} +2 -2
- package/dist/WizardModal.d.mts +1 -1
- package/dist/chartColors.d.mts +92 -0
- package/dist/chartFrameLayout.d.mts +46 -0
- package/dist/{clientFilterUtils-CGHYF5NE.d.mts → clientFilterUtils-CMLuN8kK.d.mts} +2 -2
- package/dist/clientFilterUtils.d.mts +1 -1
- package/dist/components/Accordion/index.mjs +25 -16
- package/dist/components/Accordion/index.mjs.map +1 -1
- package/dist/components/Attribute/index.mjs +8 -6
- package/dist/components/Attribute/index.mjs.map +1 -1
- package/dist/components/Badge/index.mjs +1 -1
- package/dist/components/Banner/index.mjs +3 -3
- package/dist/components/BottomPanel/index.mjs +10 -8
- package/dist/components/BottomPanel/index.mjs.map +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 +2 -2
- package/dist/components/Card/index.d.mts +2 -2
- package/dist/components/CardV2/index.d.mts +1 -1
- package/dist/components/CardV2/index.mjs +1 -1
- package/dist/components/Chart/index.d.mts +9 -0
- package/dist/components/Chart/index.mjs +680 -0
- package/dist/components/Chart/index.mjs.map +1 -0
- package/dist/components/Checkbox/index.mjs +1 -1
- package/dist/components/CodeHighlight/index.mjs +4 -4
- package/dist/components/Combobox/index.d.mts +5 -3
- package/dist/components/Combobox/index.mjs +1 -1
- package/dist/components/ConfigFormGroup/index.mjs +1 -1
- package/dist/components/DataTable/TableControls/index.d.mts +20 -20
- package/dist/components/DataTable/TableControls/index.mjs +2 -2
- package/dist/components/DataTable/index.d.mts +5 -5
- package/dist/components/DataTable/index.mjs +1 -1
- package/dist/components/DataTable/types.d.mts +1 -1
- package/dist/components/DatePicker/index.mjs +1 -1
- package/dist/components/DropdownButton/index.mjs +1 -1
- package/dist/components/DropdownMenu/index.d.mts +1 -1
- package/dist/components/DropdownMenu/index.mjs +1 -1
- package/dist/components/FloatingPanel/index.mjs +20 -18
- package/dist/components/FloatingPanel/index.mjs.map +1 -1
- package/dist/components/FloatingToolbar/index.mjs +1 -1
- package/dist/components/FormControl/index.d.mts +1 -1
- package/dist/components/FormControl/index.mjs +1 -1
- package/dist/components/FormField/index.d.mts +5 -5
- package/dist/components/FormField/index.mjs +1 -1
- package/dist/components/Grid/index.mjs +1 -1
- package/dist/components/HoverCopyableField/index.mjs +1 -1
- package/dist/components/ImageTile/index.mjs +10 -10
- package/dist/components/ImageTile/index.mjs.map +1 -1
- package/dist/components/Input/index.d.mts +1 -1
- package/dist/components/Input/index.mjs +1 -1
- package/dist/components/Link/index.mjs +1 -1
- package/dist/components/ListBox/index.d.mts +3 -3
- package/dist/components/ListBox/index.mjs +1 -1
- package/dist/components/LoadingShimmer/index.mjs +1 -1
- package/dist/components/MaskedInput/index.mjs +1 -1
- package/dist/components/Menu/index.d.mts +1 -1
- package/dist/components/Menu/index.mjs +1 -1
- package/dist/components/Modal/index.d.mts +1 -1
- package/dist/components/Modal/index.mjs +1 -1
- package/dist/components/PageHeader/index.d.mts +1 -1
- package/dist/components/PageHeader/index.mjs +1 -1
- package/dist/components/Pagination/index.d.mts +1 -1
- package/dist/components/Pagination/index.mjs +1 -1
- package/dist/components/Pii/index.mjs +1 -1
- package/dist/components/Popover/index.mjs +1 -1
- package/dist/components/ProgressBar/index.mjs +20 -3
- package/dist/components/ProgressBar/index.mjs.map +1 -1
- package/dist/components/ProgressIndicator/index.mjs +1 -1
- package/dist/components/Radio/index.mjs +1 -1
- package/dist/components/RadioGroup/index.mjs +1 -1
- package/dist/components/RichTextEditor/index.mjs +9 -9
- package/dist/components/RightPanel/index.mjs +30 -15
- package/dist/components/RightPanel/index.mjs.map +1 -1
- package/dist/components/SegmentedControl/index.mjs +1 -1
- package/dist/components/Select/index.d.mts +1 -1
- package/dist/components/Select/index.mjs +1 -1
- package/dist/components/SelectionCard/index.mjs +5 -5
- package/dist/components/Slider/index.mjs +5 -4
- package/dist/components/Slider/index.mjs.map +1 -1
- package/dist/components/SmartTextInput/index.mjs +11 -18
- package/dist/components/SmartTextInput/index.mjs.map +1 -1
- package/dist/components/Spinner/index.mjs +1 -1
- package/dist/components/Stack/index.d.mts +1 -1
- package/dist/components/StatusIndicator/index.mjs +1 -1
- package/dist/components/Sticker/index.d.mts +1 -1
- package/dist/components/Sticker/index.mjs +1 -1
- package/dist/components/SwatchPicker/index.mjs +2 -1
- package/dist/components/SwatchPicker/index.mjs.map +1 -1
- package/dist/components/TabBar/index.mjs +1 -1
- package/dist/components/Table/index.d.mts +1 -1
- package/dist/components/Table/index.mjs +1 -1
- package/dist/components/TableBox/index.d.mts +1 -1
- package/dist/components/TableBox/index.mjs +1 -1
- package/dist/components/TechnicalSticker/index.mjs +1 -1
- package/dist/components/Text/index.d.mts +1 -1
- package/dist/components/TextArea/index.mjs +1 -1
- package/dist/components/Tile/index.mjs +2 -2
- package/dist/components/Toast/index.mjs +19 -13
- package/dist/components/Toast/index.mjs.map +1 -1
- package/dist/components/Toggle/index.mjs +1 -1
- package/dist/components/Tooltip/index.d.mts +3 -3
- package/dist/components/Tooltip/index.mjs +1 -1
- package/dist/components/VersionHistory/index.mjs +8 -8
- package/dist/compound-expression.d.mts +1 -1
- package/dist/{date-range-rule-value-ASr06ClE.d.mts → date-range-rule-value-DyLlMtjr.d.mts} +2 -2
- package/dist/date-range-rule-value.d.mts +1 -1
- package/dist/display.d.mts +1 -1
- package/dist/duration-token.d.mts +11 -0
- package/dist/exit-motion.d.mts +7 -0
- package/dist/fieldPickerOptions.d.mts +2 -2
- package/dist/{filter-size-context-CmFyIPCm.d.mts → filter-size-context-DVnjmuhk.d.mts} +2 -2
- package/dist/filter-size-context.d.mts +1 -1
- package/dist/{filters-DTBc0mE7.d.mts → filters-By_TYKAZ.d.mts} +3 -3
- package/dist/filters.d.mts +1 -1
- package/dist/{helpers-CBJ2AqGZ.d.mts → helpers-BIHsqdyX.d.mts} +2 -2
- package/dist/helpers.d.mts +1 -1
- package/dist/{index-kIon1vPp.d.mts → index-BozzRwby.d.mts} +2 -2
- package/dist/{index-OkdnW-u5.d.mts → index-CZJp4Af6.d.mts} +3 -3
- package/dist/index2.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/{inputFields-DpHeZiFX.d.mts → inputFields-BqO2H-Kj.d.mts} +6 -6
- package/dist/inputFields.d.mts +1 -1
- package/dist/lib/MiddleTruncatedText.mjs +1 -1
- package/dist/lib/TruncatedText.d.mts +1 -1
- package/dist/lib/TruncatedTextWithTooltip.d.mts +1 -1
- package/dist/lib/TruncatedTextWithTooltip.mjs +1 -1
- package/dist/lib/colorMode.d.mts +1 -1
- package/dist/lib/useChain.d.mts +1 -1
- package/dist/lib/useModalInsetRight.d.mts +4 -3
- package/dist/lib/useModalInsetRight.mjs +7 -5
- package/dist/lib/useModalInsetRight.mjs.map +1 -1
- package/dist/lint/THIRD_PARTY_NOTICES.md +30 -0
- package/dist/lint/index.mjs +696 -11
- package/dist/lint/index.mjs.map +1 -1
- package/dist/lint/recommended.json +7 -1
- package/dist/mixins/focus.mjs +1 -1
- package/dist/mixins/hoverable.mjs +2 -2
- package/dist/mixins/hoverable.mjs.map +1 -1
- package/dist/mixins/input.mjs +3 -2
- package/dist/mixins/input.mjs.map +1 -1
- package/dist/mixins/menuItem.mjs +2 -0
- package/dist/mixins/menuItem.mjs.map +1 -1
- package/dist/mixins/motion.d.mts +24 -0
- package/dist/mixins/motion.mjs +44 -0
- package/dist/mixins/motion.mjs.map +1 -0
- package/dist/motion-origin.d.mts +7 -0
- package/dist/motion.d.mts +63 -0
- package/dist/no-layout-motion.d.mts +7 -0
- package/dist/no-transition-all.d.mts +7 -0
- package/dist/{operators-BHxKZcpD.d.mts → operators-B8_k3r69.d.mts} +10 -3
- package/dist/operators.d.mts +2 -2
- package/dist/overlay-motion.d.mts +7 -0
- package/dist/patterns/CardGrouping/index.mjs +9 -9
- package/dist/patterns/CardGrouping/index.mjs.map +1 -1
- package/dist/patterns/IndexTableLayout/index.mjs +3 -3
- package/dist/patterns/LayoutLoadingShimmer/index.mjs +4 -4
- package/dist/patterns/LayoutLoadingSpinner/index.mjs +3 -1
- package/dist/patterns/LayoutLoadingSpinner/index.mjs.map +1 -1
- package/dist/patterns/PageLayout/index.d.mts +1 -1
- package/dist/patterns/PageLayout/index.mjs +1 -1
- package/dist/patterns/WizardModal/index.mjs +4 -4
- package/dist/relative-date-label.d.mts +1 -1
- package/dist/tone.d.mts +1 -1
- package/dist/{types-DLnCkvTt.d.mts → types-BJqmRXFV.d.mts} +15 -1
- package/dist/{types-CqcbWyUY.d.mts → types-BOsCi-kZ.d.mts} +8 -2
- package/dist/{types-BEdERA4v.d.mts → types-C_CncajO.d.mts} +2 -2
- package/dist/{types-BiqzeNsa.d.mts → types-D5txFacG.d.mts} +3 -3
- package/dist/types4.d.mts +1 -1
- package/dist/types5.d.mts +1 -1
- package/dist/types6.d.mts +1 -1
- package/dist/{url-state-CXUuK3_r.d.mts → url-state-CXPmXzIZ.d.mts} +2 -2
- package/dist/url-state.d.mts +1 -1
- package/dist/{useChain-B--KAtdN.d.mts → useChain-x9fd9Fyq.d.mts} +2 -2
- package/dist/useChainAtCursor.d.mts +1 -1
- package/dist/useChartColors.d.mts +30 -0
- package/dist/useChartSeriesVisibility.d.mts +22 -0
- package/dist/useChartStyles.d.mts +108 -0
- package/dist/useColumnConfiguration.d.mts +2 -2
- package/dist/useComboboxFooterAction.d.mts +1 -1
- package/dist/{useFilterStateV2-DBpbxAEC.d.mts → useFilterStateV2-DiTS9DTg.d.mts} +3 -3
- package/dist/useFilterStateV2.d.mts +1 -1
- package/dist/{useTableColumns-Xd14vx_h.d.mts → useTableColumns-BEKJNrb1.d.mts} +2 -2
- package/dist/useTableColumns.d.mts +1 -1
- package/dist/useTruncation.d.mts +1 -1
- package/dist/useValueControlError.d.mts +26 -0
- package/dist/utils.d.mts +1 -1
- package/dist/{validation-Tgg3AhuP.d.mts → validation-BDQdQ1cY.d.mts} +3 -3
- package/dist/validation.d.mts +1 -1
- package/dist/{value-control-resolver-XQbGCdsP.d.mts → value-control-resolver-BFJZEWDn.d.mts} +9 -3
- package/dist/value-control-resolver.d.mts +1 -1
- package/dist/variables/keyframes.d.mts +2 -1
- package/dist/variables/keyframes.mjs +9 -1
- package/dist/variables/keyframes.mjs.map +1 -1
- package/dist/variables/transitions.d.mts +31 -1
- package/dist/variables/transitions.mjs +50 -1
- package/dist/variables/transitions.mjs.map +1 -1
- package/llms.txt +1 -0
- package/package.json +14 -4
- package/skills/new-screen/SKILL.md +33 -0
- package/skills/ui-authoring/COMPONENTS.md +18 -0
- package/skills/ui-authoring/PATTERNS.md +51 -34
- package/skills/ui-authoring/STANDARD.md +68 -4
- package/skills/ui-authoring/TOKENS.md +27 -24
- package/dist/Breadcrumbs-CMf3Uvow.mjs.map +0 -1
- package/dist/CardV2-CrV6eEQb.mjs.map +0 -1
- package/dist/Checkbox-Dr4LMKHV.mjs.map +0 -1
- package/dist/Combobox-CIKqTYZt.d.mts +0 -11
- package/dist/Combobox-Gb_j1dg6.mjs.map +0 -1
- package/dist/DataTable-CIZJ1vO8.mjs.map +0 -1
- package/dist/DatePicker-C9redLBr.mjs.map +0 -1
- package/dist/DropdownMenu-c8XK2Lr4.mjs.map +0 -1
- package/dist/FloatingToolbar-DLRaE0o7.mjs.map +0 -1
- package/dist/HoverCopyableField-XHC_n9tp.mjs.map +0 -1
- package/dist/IconButton-DxHB2g80.mjs.map +0 -1
- package/dist/Link-D_kCyLYX.mjs.map +0 -1
- package/dist/LoadingShimmer-oPIv2ESr.mjs.map +0 -1
- package/dist/Popover-DordjYNM.mjs.map +0 -1
- package/dist/Radio-BlEtetrr.mjs.map +0 -1
- package/dist/SegmentedControl-D_DA-MU1.mjs.map +0 -1
- package/dist/Select-DOlw_LPR.mjs.map +0 -1
- package/dist/TabBar-BCFO38E0.mjs.map +0 -1
- package/dist/Table-DPi4Dt5H.mjs.map +0 -1
- package/dist/TableBox-DNQsgQ8x.mjs.map +0 -1
- package/dist/TableControls-BrP_BqnF.mjs.map +0 -1
- package/dist/TechnicalSticker-Cq5jzYKQ.mjs.map +0 -1
- package/dist/TextArea-Dro-HH8O.mjs.map +0 -1
- package/dist/Toggle-D9MzTIZs.mjs.map +0 -1
- package/dist/Tooltip-YViXzMdm.mjs.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as FilterConditionOperator, c as FilterFieldType, d as FilterRuleValue, l as FilterOperator, o as FilterField, r as DateRangeFilterValue, u as FilterRule } from "./types-
|
|
1
|
+
import { a as FilterConditionOperator, c as FilterFieldType, d as FilterRuleValue, l as FilterOperator, o as FilterField, r as DateRangeFilterValue, u as FilterRule } from "./types-BJqmRXFV.mjs";
|
|
2
2
|
import { i as CommonStrings } from "./strings-DQZIO-n7.mjs";
|
|
3
3
|
//#region src/components/DataTable/TableControls/FiltersV2/operators.d.ts
|
|
4
4
|
type OperatorLabelKey = 'operatorIs' | 'operatorIsNot' | 'operatorContains' | 'operatorDoesNotContain' | 'operatorIsEmpty' | 'operatorIsNotEmpty' | 'operatorIsTrue' | 'operatorIsFalse' | 'operatorBefore' | 'operatorAfter' | 'operatorBetween' | 'operatorIsAnyOf' | 'operatorIsNoneOf' | 'operatorGreaterThan' | 'operatorGreaterThanOrEqual' | 'operatorLessThan' | 'operatorLessThanOrEqual' | 'operatorIsEqualTo' | 'operatorIsGreaterThan' | 'operatorIsLessThan';
|
|
@@ -46,6 +46,13 @@ declare function getOperatorsForField(field: Pick<FilterField, 'type' | 'allowed
|
|
|
46
46
|
declare function getDefaultOperatorForType(type: FilterFieldType): FilterOperator;
|
|
47
47
|
declare function getConditionOperator(field: Pick<FilterField, 'condition'> | undefined, operator: FilterOperator): FilterConditionOperator | undefined;
|
|
48
48
|
declare function isValuelessOperator(operator: FilterOperator, field?: Pick<FilterField, 'condition'>): boolean;
|
|
49
|
+
/**
|
|
50
|
+
* The error message a condition operator's `validate` returns for `value`, or
|
|
51
|
+
* `undefined` when the value is accepted, empty, or the operator has no
|
|
52
|
+
* validator. Value controls show it below the input; a rule with a message
|
|
53
|
+
* is incomplete (see `hasCompleteConditionValue`).
|
|
54
|
+
*/
|
|
55
|
+
declare function getConditionValueError(field: Pick<FilterField, 'condition'> | undefined, operator: FilterOperator, value: FilterRuleValue): string | undefined;
|
|
49
56
|
declare function hasCompleteConditionValue(rule: FilterRule, field: FilterField): boolean;
|
|
50
57
|
/**
|
|
51
58
|
* Whether a rule's value is a date range: a range operator, or a field that is
|
|
@@ -108,5 +115,5 @@ declare function emptyValueForRule(field: Pick<FilterField, 'type' | 'condition'
|
|
|
108
115
|
*/
|
|
109
116
|
declare function reconcileValueForOperator(field: Pick<FilterField, 'type' | 'condition'>, nextOperator: FilterOperator, previousOperator: FilterOperator, value: FilterRuleValue): FilterRuleValue;
|
|
110
117
|
//#endregion
|
|
111
|
-
export {
|
|
112
|
-
//# sourceMappingURL=operators-
|
|
118
|
+
export { withValue as S, isNumericComparison as _, emptyValueForRule as a, isValuelessOperator as b, getConditionValueError as c, getOperatorsForField as d, getOperatorsForType as f, isMinutePrecisionDate as g, isCompleteNumericComparisonValue as h, emptyValueForFieldType as i, getDefaultOperatorForType as l, isCompleteDateRange as m, NumericComparisonOperator as n, fieldHasMultipleOperators as o, hasCompleteConditionValue as p, carriesDateRange as r, getConditionOperator as s, NUMERIC_COMPARISON_OPERATORS as t, getOperatorLabel as u, isNumericComparisonOperator as v, reconcileValueForOperator as x, isRangeOperator as y };
|
|
119
|
+
//# sourceMappingURL=operators-B8_k3r69.d.mts.map
|
package/dist/operators.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as
|
|
2
|
-
export { NUMERIC_COMPARISON_OPERATORS, NumericComparisonOperator, carriesDateRange, emptyValueForFieldType, emptyValueForRule, fieldHasMultipleOperators, getConditionOperator, getDefaultOperatorForType, getOperatorLabel, getOperatorsForField, getOperatorsForType, hasCompleteConditionValue, isCompleteDateRange, isCompleteNumericComparisonValue, isMinutePrecisionDate, isNumericComparison, isNumericComparisonOperator, isRangeOperator, isValuelessOperator, reconcileValueForOperator, withValue };
|
|
1
|
+
import { S as withValue, _ as isNumericComparison, a as emptyValueForRule, b as isValuelessOperator, c as getConditionValueError, d as getOperatorsForField, f as getOperatorsForType, g as isMinutePrecisionDate, h as isCompleteNumericComparisonValue, i as emptyValueForFieldType, l as getDefaultOperatorForType, m as isCompleteDateRange, n as NumericComparisonOperator, o as fieldHasMultipleOperators, p as hasCompleteConditionValue, r as carriesDateRange, s as getConditionOperator, t as NUMERIC_COMPARISON_OPERATORS, u as getOperatorLabel, v as isNumericComparisonOperator, x as reconcileValueForOperator, y as isRangeOperator } from "./operators-B8_k3r69.mjs";
|
|
2
|
+
export { NUMERIC_COMPARISON_OPERATORS, NumericComparisonOperator, carriesDateRange, emptyValueForFieldType, emptyValueForRule, fieldHasMultipleOperators, getConditionOperator, getConditionValueError, getDefaultOperatorForType, getOperatorLabel, getOperatorsForField, getOperatorsForType, hasCompleteConditionValue, isCompleteDateRange, isCompleteNumericComparisonValue, isMinutePrecisionDate, isNumericComparison, isNumericComparisonOperator, isRangeOperator, isValuelessOperator, reconcileValueForOperator, withValue };
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { a as styled } from "../../styledComponentsInterop-Cs5CCPRy.mjs";
|
|
2
2
|
import { semanticColor } from "../../lib/semanticColor.mjs";
|
|
3
|
+
import { focusStyle } from "../../mixins/focus.mjs";
|
|
4
|
+
import "../../variables/transitions.mjs";
|
|
3
5
|
import { HeadlessAriaButton } from "../../lib/HeadlessAriaButton.mjs";
|
|
4
6
|
import { n as RouterLink } from "../../router-BxmA940v.mjs";
|
|
5
7
|
import { TruncatedText } from "../../lib/TruncatedText.mjs";
|
|
6
8
|
import { i as Paragraph, n as Heading$1 } from "../../Text-D0vEReED.mjs";
|
|
7
|
-
import "../../
|
|
8
|
-
import { a as Tooltip } from "../../Tooltip-YViXzMdm.mjs";
|
|
9
|
-
import { focusStyle } from "../../mixins/focus.mjs";
|
|
9
|
+
import { a as Tooltip } from "../../Tooltip-C2VB8I6y.mjs";
|
|
10
10
|
import { n as Stack, t as HStack } from "../../Stack-Bzom2BTR.mjs";
|
|
11
|
-
import { n as Button$1, t as IconButton } from "../../IconButton-
|
|
12
|
-
import { n as DropdownMenu_default } from "../../DropdownMenu-
|
|
13
|
-
import { t as DropdownButton } from "../../DropdownButton-
|
|
14
|
-
import { n as SingleColumnLayout } from "../../PageLayout-
|
|
15
|
-
import { cloneElement } from "react";
|
|
11
|
+
import { n as Button$1, t as IconButton } from "../../IconButton-kSjnfhWt.mjs";
|
|
12
|
+
import { n as DropdownMenu_default } from "../../DropdownMenu-jJSHQaih.mjs";
|
|
13
|
+
import { t as DropdownButton } from "../../DropdownButton-Dp-MZ5tA.mjs";
|
|
14
|
+
import { n as SingleColumnLayout } from "../../PageLayout-DgEGcZgB.mjs";
|
|
16
15
|
import { Color, Spacing } from "@persona/design-tokens";
|
|
16
|
+
import { cloneElement } from "react";
|
|
17
17
|
import { Disclosure, DisclosurePanel } from "react-aria-components";
|
|
18
18
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
19
19
|
import { ChevronDownIcon, MoreIcon } from "@persona/icons";
|
|
@@ -204,7 +204,7 @@ const Chevron = styled.span`
|
|
|
204
204
|
color: ${({ theme }) => semanticColor(theme, "FgSecondary", theme.color.text.secondary)};
|
|
205
205
|
|
|
206
206
|
svg {
|
|
207
|
-
transition: transform ${"
|
|
207
|
+
transition: transform ${"200ms"} ${"cubic-bezier(0.4, 0, 0.2, 1)"};
|
|
208
208
|
transform: rotate(${({ $expanded }) => $expanded ? "0deg" : "-90deg"});
|
|
209
209
|
}
|
|
210
210
|
`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":["Heading","Button","DropdownMenu"],"sources":["../../../src/patterns/CardGrouping/CardGrouping.tsx"],"sourcesContent":["import { cloneElement, type ReactElement, type ReactNode } from 'react';\nimport { Disclosure, DisclosurePanel } from 'react-aria-components';\nimport styled from 'styled-components';\n\nimport { Color, Spacing } from '@persona/design-tokens';\nimport { ChevronDownIcon, MoreIcon } from '@persona/icons';\n\nimport Button, { IconButton } from '#src/components/Button';\nimport DropdownButton from '#src/components/DropdownButton';\nimport DropdownMenu from '#src/components/DropdownMenu';\nimport { HStack, Stack } from '#src/components/Stack';\nimport { Heading, Paragraph } from '#src/components/Text';\nimport Tooltip from '#src/components/Tooltip';\nimport { HeadlessAriaButton } from '#src/lib/HeadlessAriaButton';\nimport { RouterLink } from '#src/lib/router';\nimport { semanticColor } from '#src/lib/semanticColor';\nimport { TruncatedText } from '#src/lib/TruncatedText';\nimport { focusStyle } from '#src/mixins/focus';\nimport type { IconAction, TextAction } from '#src/types/Action';\nimport { TransitionDuration } from '#src/variables/transitions';\n\nimport { SingleColumnLayout, type SingleColumnLayoutProps } from '../PageLayout';\n\ntype HeaderAction = IconAction | TextAction;\n\nconst isIconAction = (action: HeaderAction): action is IconAction => 'icon' in action;\n\nconst splitGroupActions = (actions: HeaderAction[]) => {\n if (actions.length <= 1) {\n return { inlineActions: actions, overflowActions: [] as HeaderAction[] };\n }\n\n const primaryIndex = actions.findIndex(\n (action) => !isIconAction(action) && action.variant === 'primary',\n );\n const inlineIndex = primaryIndex === -1 ? 0 : primaryIndex;\n\n return {\n inlineActions: [actions[inlineIndex]],\n overflowActions: actions.filter((_, index) => index !== inlineIndex),\n };\n};\n\nconst actionKey = (action: HeaderAction, index: number) =>\n isIconAction(action)\n ? (action.id ?? action.ariaLabel ?? `action-${index}`)\n : (action.id ?? action.label ?? `action-${index}`);\n\nconst actionLabel = (action: HeaderAction) =>\n isIconAction(action) ? action.ariaLabel : action.label;\n\nconst overflowLinkProps = (action: HeaderAction) => {\n if (action.disabled || action.to == null) {\n return {};\n }\n\n if (typeof action.to === 'string' && action.to.startsWith('https://')) {\n return {\n as: 'a' as const,\n href: action.to,\n target: '_blank' as const,\n rel: 'noreferrer',\n };\n }\n\n return { as: RouterLink, to: action.to };\n};\n\nconst TitleBlock = styled(Stack)`\n min-width: 0;\n flex: 1;\n\n > * {\n min-width: 0;\n }\n`;\n\nconst TitleHeading = styled(Heading)`\n display: flex;\n align-items: center;\n gap: ${Spacing[2]};\n min-width: 0;\n max-width: 100%;\n overflow: hidden;\n`;\n\nconst TitleText = styled.span`\n min-width: 0;\n`;\n\nconst Actions = styled(HStack)`\n flex-shrink: 0;\n`;\n\nconst Adornment = styled.span`\n display: flex;\n flex-shrink: 0;\n max-width: 180px;\n`;\n\nconst ActionRow = ({\n actions,\n size,\n collapseToPrimary = false,\n}: {\n actions: HeaderAction[];\n size: 'sm' | 'md';\n collapseToPrimary?: boolean;\n}) => {\n const visibleActions = actions.filter((action) => !action.hidden);\n const { inlineActions, overflowActions } = collapseToPrimary\n ? splitGroupActions(visibleActions)\n : { inlineActions: visibleActions, overflowActions: [] as HeaderAction[] };\n\n const buttons = inlineActions.map((action, i) => {\n const key = actionKey(action, i);\n\n const button = isIconAction(action) ? (\n <IconButton\n id={action.id}\n key={key}\n to={action.to}\n size={size}\n disabled={action.disabled}\n aria-label={action.ariaLabel}\n onClick={(event) => {\n event.stopPropagation();\n return action.onClick?.(event);\n }}\n >\n {action.icon}\n </IconButton>\n ) : (\n <Button\n id={action.id}\n key={key}\n to={action.to}\n aria-label={action.ariaLabel}\n disabled={action.disabled}\n variant={action.variant ?? 'basic'}\n size={size}\n width='auto'\n onSecondaryBackground={(action.variant ?? 'basic') === 'basic'}\n prefixIcon={action.prefixIcon}\n suffixIcon={action.suffixIcon}\n onClick={(event) => {\n event.stopPropagation();\n return action.onClick?.(event);\n }}\n >\n {action.label}\n </Button>\n );\n\n return action.tooltip ? (\n <Tooltip key={key} {...action.tooltipProps} trigger={button}>\n {action.tooltip}\n </Tooltip>\n ) : (\n button\n );\n });\n\n return (\n <Actions spacing={Spacing[2]}>\n {buttons}\n {overflowActions.length > 0 && (\n <DropdownButton\n variant='basic'\n size={size}\n width='icon'\n onSecondaryBackground\n suffixIcon={undefined}\n aria-label='More actions'\n menuProps={{ portal: true }}\n menuItems={overflowActions.map((action, index) => (\n <DropdownMenu.Item\n id={action.id ?? actionLabel(action)}\n key={actionKey(action, index)}\n disabled={action.disabled}\n variant={!isIconAction(action) && action.variant === 'danger' ? 'danger' : undefined}\n {...overflowLinkProps(action)}\n onClick={(event) => {\n event.stopPropagation();\n return action.onClick?.(event);\n }}\n >\n {actionLabel(action)}\n </DropdownMenu.Item>\n ))}\n >\n <MoreIcon />\n </DropdownButton>\n )}\n </Actions>\n );\n};\n\nconst onSecondarySurface = (node: ReactElement) =>\n cloneElement(node as ReactElement<{ onSecondaryBackground?: boolean }>, {\n onSecondaryBackground: true,\n });\n\nconst Controls = styled.div`\n margin-top: ${Spacing[2]};\n\n > * {\n margin-bottom: 0;\n }\n`;\n\nconst ListHeader = ({\n title,\n description,\n sticker,\n status,\n actions,\n controls,\n}: {\n title: string;\n description?: string;\n sticker?: ReactElement;\n status?: ReactElement;\n actions?: HeaderAction[];\n controls?: ReactNode;\n}) => (\n <HStack align='flex-start' justify='space-between' spacing={Spacing[4]} fullWidth>\n <TitleBlock spacing={Spacing[1]}>\n <TitleHeading forwardedAs='h2' size='xsm'>\n <TitleText>\n <TruncatedText>{title}</TruncatedText>\n </TitleText>\n {sticker && <Adornment>{onSecondarySurface(sticker)}</Adornment>}\n {status && <Adornment>{status}</Adornment>}\n </TitleHeading>\n {description && <Paragraph size='md'>{description}</Paragraph>}\n {controls && <Controls>{controls}</Controls>}\n </TitleBlock>\n {actions && actions.length > 0 && <ActionRow actions={actions} size='md' />}\n </HStack>\n);\n\nconst GroupDisclosure = styled(Disclosure)`\n display: flex;\n flex-direction: column;\n`;\n\nconst GroupHeader = styled(HStack)`\n box-sizing: border-box;\n width: 100%;\n min-width: 0;\n height: ${Spacing[9]};\n`;\n\nconst Trigger = styled(HeadlessAriaButton)`\n min-width: 0;\n flex: 1;\n display: flex;\n align-items: center;\n gap: ${Spacing[2]};\n text-align: left;\n\n &:focus-visible {\n ${focusStyle}\n }\n`;\n\nconst Chevron = styled.span<{ $expanded: boolean }>`\n display: flex;\n flex-shrink: 0;\n color: ${({ theme }) => semanticColor(theme, 'FgSecondary', theme.color.text.secondary)};\n\n svg {\n transition: transform ${TransitionDuration.Faster} ease-out;\n transform: rotate(${({ $expanded }) => ($expanded ? '0deg' : '-90deg')});\n }\n`;\n\nconst GroupList = styled(Stack)`\n && {\n gap: 0;\n }\n\n > *:not(:last-child) {\n border-bottom: 1px solid\n ${({ theme }) => semanticColor(theme, 'BorderSubtle', Color.BorderDivider)};\n }\n`;\n\nconst GroupCards = styled(Stack)`\n padding-top: ${Spacing[4]};\n padding-bottom: ${Spacing[4]};\n`;\n\nexport type CardGroupingGroup = {\n title: string;\n sticker?: ReactElement;\n actions?: HeaderAction[];\n /** @defaultValue false */\n defaultExpanded?: boolean;\n children: ReactNode;\n};\n\ntype CardGroupingHeaderProps = Omit<SingleColumnLayoutProps, 'main'> & {\n title?: string;\n description?: string;\n sticker?: ReactElement;\n status?: ReactElement;\n actions?: HeaderAction[];\n /** Extra controls under the description, inside the list title group. */\n controls?: ReactNode;\n};\n\nexport type CardGroupingProps = CardGroupingHeaderProps & {\n groups: CardGroupingGroup[];\n};\n\nconst GroupRow = ({\n title,\n sticker,\n actions,\n defaultExpanded = false,\n children,\n}: CardGroupingGroup) => (\n <GroupDisclosure defaultExpanded={defaultExpanded}>\n {({ isExpanded }) => (\n <>\n <GroupHeader align='center' justify='space-between' spacing={Spacing[2]}>\n <Trigger slot='trigger' aria-label={title}>\n <Chevron $expanded={isExpanded} aria-hidden>\n <ChevronDownIcon />\n </Chevron>\n <TitleBlock spacing={Spacing[1]}>\n <TitleHeading forwardedAs='h3' size='xsm'>\n <TitleText>\n <TruncatedText>{title}</TruncatedText>\n </TitleText>\n {sticker && <Adornment>{onSecondarySurface(sticker)}</Adornment>}\n </TitleHeading>\n </TitleBlock>\n </Trigger>\n {actions && actions.length > 0 && (\n <ActionRow actions={actions} size='sm' collapseToPrimary />\n )}\n </GroupHeader>\n <DisclosurePanel>\n <GroupCards spacing={Spacing[4]}>{children}</GroupCards>\n </DisclosurePanel>\n </>\n )}\n </GroupDisclosure>\n);\n\nexport const CardGrouping = ({\n title,\n description,\n sticker,\n status,\n actions,\n controls,\n groups,\n ...chrome\n}: CardGroupingProps) => (\n <SingleColumnLayout\n {...chrome}\n main={\n <Stack spacing={Spacing[4]} fullWidth>\n {title ? (\n <ListHeader\n title={title}\n description={description}\n sticker={sticker}\n status={status}\n actions={actions}\n controls={controls}\n />\n ) : (\n description && <Paragraph size='md'>{description}</Paragraph>\n )}\n <GroupList fullWidth>\n {groups.map((group, index) => (\n <GroupRow key={`${group.title}-${index}`} {...group} />\n ))}\n </GroupList>\n </Stack>\n }\n />\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAyBA,MAAM,gBAAgB,WAA+C,UAAU;AAE/E,MAAM,qBAAqB,YAA4B;AACrD,KAAI,QAAQ,UAAU,EACpB,QAAO;EAAE,eAAe;EAAS,iBAAiB,EAAE;EAAoB;CAG1E,MAAM,eAAe,QAAQ,WAC1B,WAAW,CAAC,aAAa,OAAO,IAAI,OAAO,YAAY,UACzD;CACD,MAAM,cAAc,iBAAiB,KAAK,IAAI;AAE9C,QAAO;EACL,eAAe,CAAC,QAAQ,aAAa;EACrC,iBAAiB,QAAQ,QAAQ,GAAG,UAAU,UAAU,YAAY;EACrE;;AAGH,MAAM,aAAa,QAAsB,UACvC,aAAa,OAAO,GACf,OAAO,MAAM,OAAO,aAAa,UAAU,UAC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qBAAC,cAAD;KAAc,aAAY;KAAK,MAAK;eAApC,CACE,oBAAC,WAAD,EAAA,UACE,oBAAC,eAAD,EAAA,UAAgB,OAAsB,CAAA,EAC5B,CAAA,EACX,WAAW,oBAAC,WAAD,EAAA,UAAY,mBAAmB,QAAQ,EAAa,CAAA,CACnD;;IACJ,CAAA,CACL;MACT,WAAW,QAAQ,SAAS,KAC3B,oBAAC,WAAD;GAAoB;GAAS,MAAK;GAAK,mBAAA;GAAoB,CAAA,CAEjD;KACd,oBAAC,iBAAD,EAAA,UACE,oBAAC,YAAD;EAAY,SAAS,QAAQ;EAAK;EAAsB,CAAA,EACxC,CAAA,CACjB,EAAA,CAAA;CAEW,CAAA;AAGpB,MAAa,gBAAgB,EAC3B,OACA,aACA,SACA,QACA,SACA,UACA,QACA,GAAG,aAEH,oBAAC,oBAAD;CACE,GAAI;CACJ,MACE,qBAAC,OAAD;EAAO,SAAS,QAAQ;EAAI,WAAA;YAA5B,CACG,QACC,oBAAC,YAAD;GACS;GACM;GACJ;GACD;GACC;GACC;GACV,CAAA,GAEF,eAAe,oBAAC,WAAD;GAAW,MAAK;aAAM;GAAwB,CAAA,EAE/D,oBAAC,WAAD;GAAW,WAAA;aACR,OAAO,KAAK,OAAO,UAClB,oBAAC,UAAD,EAA0C,GAAI,OAAS,EAAxC,GAAG,MAAM,MAAM,GAAG,QAAsB,CACvD;GACQ,CAAA,CACN;;CAEV,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["Heading","Button","DropdownMenu"],"sources":["../../../src/patterns/CardGrouping/CardGrouping.tsx"],"sourcesContent":["import { cloneElement, type ReactElement, type ReactNode } from 'react';\nimport { Disclosure, DisclosurePanel } from 'react-aria-components';\nimport styled from 'styled-components';\n\nimport { Color, Spacing } from '@persona/design-tokens';\nimport { ChevronDownIcon, MoreIcon } from '@persona/icons';\n\nimport Button, { IconButton } from '#src/components/Button';\nimport DropdownButton from '#src/components/DropdownButton';\nimport DropdownMenu from '#src/components/DropdownMenu';\nimport { HStack, Stack } from '#src/components/Stack';\nimport { Heading, Paragraph } from '#src/components/Text';\nimport Tooltip from '#src/components/Tooltip';\nimport { HeadlessAriaButton } from '#src/lib/HeadlessAriaButton';\nimport { RouterLink } from '#src/lib/router';\nimport { semanticColor } from '#src/lib/semanticColor';\nimport { TruncatedText } from '#src/lib/TruncatedText';\nimport { focusStyle } from '#src/mixins/focus';\nimport type { IconAction, TextAction } from '#src/types/Action';\nimport { TransitionDuration, TransitionEasing } from '#src/variables/transitions';\n\nimport { SingleColumnLayout, type SingleColumnLayoutProps } from '../PageLayout';\n\ntype HeaderAction = IconAction | TextAction;\n\nconst isIconAction = (action: HeaderAction): action is IconAction => 'icon' in action;\n\nconst splitGroupActions = (actions: HeaderAction[]) => {\n if (actions.length <= 1) {\n return { inlineActions: actions, overflowActions: [] as HeaderAction[] };\n }\n\n const primaryIndex = actions.findIndex(\n (action) => !isIconAction(action) && action.variant === 'primary',\n );\n const inlineIndex = primaryIndex === -1 ? 0 : primaryIndex;\n\n return {\n inlineActions: [actions[inlineIndex]],\n overflowActions: actions.filter((_, index) => index !== inlineIndex),\n };\n};\n\nconst actionKey = (action: HeaderAction, index: number) =>\n isIconAction(action)\n ? (action.id ?? action.ariaLabel ?? `action-${index}`)\n : (action.id ?? action.label ?? `action-${index}`);\n\nconst actionLabel = (action: HeaderAction) =>\n isIconAction(action) ? action.ariaLabel : action.label;\n\nconst overflowLinkProps = (action: HeaderAction) => {\n if (action.disabled || action.to == null) {\n return {};\n }\n\n if (typeof action.to === 'string' && action.to.startsWith('https://')) {\n return {\n as: 'a' as const,\n href: action.to,\n target: '_blank' as const,\n rel: 'noreferrer',\n };\n }\n\n return { as: RouterLink, to: action.to };\n};\n\nconst TitleBlock = styled(Stack)`\n min-width: 0;\n flex: 1;\n\n > * {\n min-width: 0;\n }\n`;\n\nconst TitleHeading = styled(Heading)`\n display: flex;\n align-items: center;\n gap: ${Spacing[2]};\n min-width: 0;\n max-width: 100%;\n overflow: hidden;\n`;\n\nconst TitleText = styled.span`\n min-width: 0;\n`;\n\nconst Actions = styled(HStack)`\n flex-shrink: 0;\n`;\n\nconst Adornment = styled.span`\n display: flex;\n flex-shrink: 0;\n max-width: 180px;\n`;\n\nconst ActionRow = ({\n actions,\n size,\n collapseToPrimary = false,\n}: {\n actions: HeaderAction[];\n size: 'sm' | 'md';\n collapseToPrimary?: boolean;\n}) => {\n const visibleActions = actions.filter((action) => !action.hidden);\n const { inlineActions, overflowActions } = collapseToPrimary\n ? splitGroupActions(visibleActions)\n : { inlineActions: visibleActions, overflowActions: [] as HeaderAction[] };\n\n const buttons = inlineActions.map((action, i) => {\n const key = actionKey(action, i);\n\n const button = isIconAction(action) ? (\n <IconButton\n id={action.id}\n key={key}\n to={action.to}\n size={size}\n disabled={action.disabled}\n aria-label={action.ariaLabel}\n onClick={(event) => {\n event.stopPropagation();\n return action.onClick?.(event);\n }}\n >\n {action.icon}\n </IconButton>\n ) : (\n <Button\n id={action.id}\n key={key}\n to={action.to}\n aria-label={action.ariaLabel}\n disabled={action.disabled}\n variant={action.variant ?? 'basic'}\n size={size}\n width='auto'\n onSecondaryBackground={(action.variant ?? 'basic') === 'basic'}\n prefixIcon={action.prefixIcon}\n suffixIcon={action.suffixIcon}\n onClick={(event) => {\n event.stopPropagation();\n return action.onClick?.(event);\n }}\n >\n {action.label}\n </Button>\n );\n\n return action.tooltip ? (\n <Tooltip key={key} {...action.tooltipProps} trigger={button}>\n {action.tooltip}\n </Tooltip>\n ) : (\n button\n );\n });\n\n return (\n <Actions spacing={Spacing[2]}>\n {buttons}\n {overflowActions.length > 0 && (\n <DropdownButton\n variant='basic'\n size={size}\n width='icon'\n onSecondaryBackground\n suffixIcon={undefined}\n aria-label='More actions'\n menuProps={{ portal: true }}\n menuItems={overflowActions.map((action, index) => (\n <DropdownMenu.Item\n id={action.id ?? actionLabel(action)}\n key={actionKey(action, index)}\n disabled={action.disabled}\n variant={!isIconAction(action) && action.variant === 'danger' ? 'danger' : undefined}\n {...overflowLinkProps(action)}\n onClick={(event) => {\n event.stopPropagation();\n return action.onClick?.(event);\n }}\n >\n {actionLabel(action)}\n </DropdownMenu.Item>\n ))}\n >\n <MoreIcon />\n </DropdownButton>\n )}\n </Actions>\n );\n};\n\nconst onSecondarySurface = (node: ReactElement) =>\n cloneElement(node as ReactElement<{ onSecondaryBackground?: boolean }>, {\n onSecondaryBackground: true,\n });\n\nconst Controls = styled.div`\n margin-top: ${Spacing[2]};\n\n > * {\n margin-bottom: 0;\n }\n`;\n\nconst ListHeader = ({\n title,\n description,\n sticker,\n status,\n actions,\n controls,\n}: {\n title: string;\n description?: string;\n sticker?: ReactElement;\n status?: ReactElement;\n actions?: HeaderAction[];\n controls?: ReactNode;\n}) => (\n <HStack align='flex-start' justify='space-between' spacing={Spacing[4]} fullWidth>\n <TitleBlock spacing={Spacing[1]}>\n <TitleHeading forwardedAs='h2' size='xsm'>\n <TitleText>\n <TruncatedText>{title}</TruncatedText>\n </TitleText>\n {sticker && <Adornment>{onSecondarySurface(sticker)}</Adornment>}\n {status && <Adornment>{status}</Adornment>}\n </TitleHeading>\n {description && <Paragraph size='md'>{description}</Paragraph>}\n {controls && <Controls>{controls}</Controls>}\n </TitleBlock>\n {actions && actions.length > 0 && <ActionRow actions={actions} size='md' />}\n </HStack>\n);\n\nconst GroupDisclosure = styled(Disclosure)`\n display: flex;\n flex-direction: column;\n`;\n\nconst GroupHeader = styled(HStack)`\n box-sizing: border-box;\n width: 100%;\n min-width: 0;\n height: ${Spacing[9]};\n`;\n\nconst Trigger = styled(HeadlessAriaButton)`\n min-width: 0;\n flex: 1;\n display: flex;\n align-items: center;\n gap: ${Spacing[2]};\n text-align: left;\n\n &:focus-visible {\n ${focusStyle}\n }\n`;\n\nconst Chevron = styled.span<{ $expanded: boolean }>`\n display: flex;\n flex-shrink: 0;\n color: ${({ theme }) => semanticColor(theme, 'FgSecondary', theme.color.text.secondary)};\n\n svg {\n transition: transform ${TransitionDuration.Fast} ${TransitionEasing.Move};\n transform: rotate(${({ $expanded }) => ($expanded ? '0deg' : '-90deg')});\n }\n`;\n\nconst GroupList = styled(Stack)`\n && {\n gap: 0;\n }\n\n > *:not(:last-child) {\n border-bottom: 1px solid\n ${({ theme }) => semanticColor(theme, 'BorderSubtle', Color.BorderDivider)};\n }\n`;\n\nconst GroupCards = styled(Stack)`\n padding-top: ${Spacing[4]};\n padding-bottom: ${Spacing[4]};\n`;\n\nexport type CardGroupingGroup = {\n title: string;\n sticker?: ReactElement;\n actions?: HeaderAction[];\n /** @defaultValue false */\n defaultExpanded?: boolean;\n children: ReactNode;\n};\n\ntype CardGroupingHeaderProps = Omit<SingleColumnLayoutProps, 'main'> & {\n title?: string;\n description?: string;\n sticker?: ReactElement;\n status?: ReactElement;\n actions?: HeaderAction[];\n /** Extra controls under the description, inside the list title group. */\n controls?: ReactNode;\n};\n\nexport type CardGroupingProps = CardGroupingHeaderProps & {\n groups: CardGroupingGroup[];\n};\n\nconst GroupRow = ({\n title,\n sticker,\n actions,\n defaultExpanded = false,\n children,\n}: CardGroupingGroup) => (\n <GroupDisclosure defaultExpanded={defaultExpanded}>\n {({ isExpanded }) => (\n <>\n <GroupHeader align='center' justify='space-between' spacing={Spacing[2]}>\n <Trigger slot='trigger' aria-label={title}>\n <Chevron $expanded={isExpanded} aria-hidden>\n <ChevronDownIcon />\n </Chevron>\n <TitleBlock spacing={Spacing[1]}>\n <TitleHeading forwardedAs='h3' size='xsm'>\n <TitleText>\n <TruncatedText>{title}</TruncatedText>\n </TitleText>\n {sticker && <Adornment>{onSecondarySurface(sticker)}</Adornment>}\n </TitleHeading>\n </TitleBlock>\n </Trigger>\n {actions && actions.length > 0 && (\n <ActionRow actions={actions} size='sm' collapseToPrimary />\n )}\n </GroupHeader>\n <DisclosurePanel>\n <GroupCards spacing={Spacing[4]}>{children}</GroupCards>\n </DisclosurePanel>\n </>\n )}\n </GroupDisclosure>\n);\n\nexport const CardGrouping = ({\n title,\n description,\n sticker,\n status,\n actions,\n controls,\n groups,\n ...chrome\n}: CardGroupingProps) => (\n <SingleColumnLayout\n {...chrome}\n main={\n <Stack spacing={Spacing[4]} fullWidth>\n {title ? (\n <ListHeader\n title={title}\n description={description}\n sticker={sticker}\n status={status}\n actions={actions}\n controls={controls}\n />\n ) : (\n description && <Paragraph size='md'>{description}</Paragraph>\n )}\n <GroupList fullWidth>\n {groups.map((group, index) => (\n <GroupRow key={`${group.title}-${index}`} {...group} />\n ))}\n </GroupList>\n </Stack>\n }\n />\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAyBA,MAAM,gBAAgB,WAA+C,UAAU;AAE/E,MAAM,qBAAqB,YAA4B;AACrD,KAAI,QAAQ,UAAU,EACpB,QAAO;EAAE,eAAe;EAAS,iBAAiB,EAAE;EAAoB;CAG1E,MAAM,eAAe,QAAQ,WAC1B,WAAW,CAAC,aAAa,OAAO,IAAI,OAAO,YAAY,UACzD;CACD,MAAM,cAAc,iBAAiB,KAAK,IAAI;AAE9C,QAAO;EACL,eAAe,CAAC,QAAQ,aAAa;EACrC,iBAAiB,QAAQ,QAAQ,GAAG,UAAU,UAAU,YAAY;EACrE;;AAGH,MAAM,aAAa,QAAsB,UACvC,aAAa,OAAO,GACf,OAAO,MAAM,OAAO,aAAa,UAAU,UAC3C,OAAO,MAAM,OAAO,SAAS,UAAU;AAE9C,MAAM,eAAe,WACnB,aAAa,OAAO,GAAG,OAAO,YAAY,OAAO;AAEnD,MAAM,qBAAqB,WAAyB;AAClD,KAAI,OAAO,YAAY,OAAO,MAAM,KAClC,QAAO,EAAE;AAGX,KAAI,OAAO,OAAO,OAAO,YAAY,OAAO,GAAG,WAAW,WAAW,CACnE,QAAO;EACL,IAAI;EACJ,MAAM,OAAO;EACb,QAAQ;EACR,KAAK;EACN;AAGH,QAAO;EAAE,IAAI;EAAY,IAAI,OAAO;EAAI;;AAG1C,MAAM,aAAa,OAAO,MAAM;;;;;;;;AAShC,MAAM,eAAe,OAAOA,UAAQ;;;SAG3B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AEW,CAAA;AAGpB,MAAa,gBAAgB,EAC3B,OACA,aACA,SACA,QACA,SACA,UACA,QACA,GAAG,aAEH,oBAAC,oBAAD;CACE,GAAI;CACJ,MACE,qBAAC,OAAD;EAAO,SAAS,QAAQ;EAAI,WAAA;YAA5B,CACG,QACC,oBAAC,YAAD;GACS;GACM;GACJ;GACD;GACC;GACC;GACV,CAAA,GAEF,eAAe,oBAAC,WAAD;GAAW,MAAK;aAAM;GAAwB,CAAA,EAE/D,oBAAC,WAAD;GAAW,WAAA;aACR,OAAO,KAAK,OAAO,UAClB,oBAAC,UAAD,EAA0C,GAAI,OAAS,EAAxC,GAAG,MAAM,MAAM,GAAG,QAAsB,CACvD;GACQ,CAAA,CACN;;CAEV,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as Card_default } from "../../Card-DuQHyroh.mjs";
|
|
2
|
-
import { t as DataTable } from "../../DataTable-
|
|
3
|
-
import { t as PageHeader } from "../../PageHeader-
|
|
4
|
-
import { a as Section, i as Container } from "../../PageLayout-
|
|
2
|
+
import { t as DataTable } from "../../DataTable-DiwzhNMt.mjs";
|
|
3
|
+
import { t as PageHeader } from "../../PageHeader-bhQTjuZF.mjs";
|
|
4
|
+
import { a as Section, i as Container } from "../../PageLayout-DgEGcZgB.mjs";
|
|
5
5
|
import { useMemo } from "react";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
//#region src/patterns/IndexTableLayout/useColumnConfiguration.ts
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { a as styled } from "../../styledComponentsInterop-Cs5CCPRy.mjs";
|
|
2
2
|
import { n as Stack, t as HStack } from "../../Stack-Bzom2BTR.mjs";
|
|
3
|
-
import { t as LoadingShimmer } from "../../LoadingShimmer-
|
|
4
|
-
import { t as Card_default } from "../../CardV2-
|
|
5
|
-
import { h as Table, m as TableHeaderCell, n as TableBody, p as TableRow, r as TableHead, s as TableCell } from "../../Table-
|
|
6
|
-
import { n as PageHeaderContainer } from "../../PageHeader-
|
|
3
|
+
import { t as LoadingShimmer } from "../../LoadingShimmer-CpfKTSUs.mjs";
|
|
4
|
+
import { t as Card_default } from "../../CardV2-DCoDfEvr.mjs";
|
|
5
|
+
import { h as Table, m as TableHeaderCell, n as TableBody, p as TableRow, r as TableHead, s as TableCell } from "../../Table-SMJAWqoe.mjs";
|
|
6
|
+
import { n as PageHeaderContainer } from "../../PageHeader-bhQTjuZF.mjs";
|
|
7
7
|
import { Color, Spacing } from "@persona/design-tokens";
|
|
8
8
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
//#region src/patterns/containers.tsx
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { a as styled } from "../../styledComponentsInterop-Cs5CCPRy.mjs";
|
|
2
|
+
import "../../variables/transitions.mjs";
|
|
2
3
|
import { fadeIn, rotate } from "../../variables/keyframes.mjs";
|
|
3
4
|
import { Color } from "@persona/design-tokens";
|
|
4
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -9,7 +10,8 @@ const Container = styled.div`
|
|
|
9
10
|
justify-content: center;
|
|
10
11
|
height: 100%;
|
|
11
12
|
width: 100%;
|
|
12
|
-
|
|
13
|
+
/* Waits 500ms so a fast load never flashes a spinner. */
|
|
14
|
+
animation: ${fadeIn} ${"200ms"} ${"cubic-bezier(0, 0, 0.2, 1)"} 500ms backwards;
|
|
13
15
|
`;
|
|
14
16
|
const VisuallyHidden = styled.span`
|
|
15
17
|
position: absolute;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../../../src/patterns/LayoutLoadingSpinner/LayoutLoadingSpinner.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport { Color } from '@persona/design-tokens';\n\nimport { fadeIn, rotate } from '#src/variables/keyframes';\n\nconst Container = styled.div`\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n width: 100%;\n animation: ${fadeIn}
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../../src/patterns/LayoutLoadingSpinner/LayoutLoadingSpinner.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport { Color } from '@persona/design-tokens';\n\nimport { fadeIn, rotate } from '#src/variables/keyframes';\nimport { TransitionDuration, TransitionEasing } from '#src/variables/transitions';\n\nconst Container = styled.div`\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n width: 100%;\n /* Waits 500ms so a fast load never flashes a spinner. */\n animation: ${fadeIn} ${TransitionDuration.Fast} ${TransitionEasing.Enter} 500ms backwards;\n`;\n\nconst VisuallyHidden = styled.span`\n position: absolute;\n width: 1px;\n height: 1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n`;\n\nconst Ring = styled.svg`\n display: block;\n border-radius: 50%;\n animation: ${rotate} 0.9s linear infinite;\n`;\n\nconst RingStroke = styled.circle`\n stroke: ${Color.PrimaryPurple};\n stroke-dasharray: 166;\n stroke-dashoffset: 110;\n stroke-linecap: round;\n`;\n\n/**\n * Centered 120px loading ring that fills its container. Use as the loading state for a page or\n * embedded app when no layout-specific shimmer exists.\n */\nexport const LayoutLoadingSpinner = () => (\n <Container role='status' aria-label='loading spinner'>\n <VisuallyHidden>Loading...</VisuallyHidden>\n <Ring viewBox='0 0 52 52' width={120} height={120} aria-hidden='true'>\n <RingStroke cx='26' cy='26' r='25' fill='none' />\n </Ring>\n </Container>\n);\n"],"mappings":";;;;;;AAOA,MAAM,YAAY,OAAO,GAAG;;;;;;;eAOb,OAAO,GAAA,QAA2B,GAAA,6BAA0B;;AAG3E,MAAM,iBAAiB,OAAO,IAAI;;;;;;;;AASlC,MAAM,OAAO,OAAO,GAAG;;;eAGR,OAAO;;AAGtB,MAAM,aAAa,OAAO,MAAM;YACpB,MAAM,cAAc;;;;;;;;;AAUhC,MAAa,6BACX,qBAAC,WAAD;CAAW,MAAK;CAAS,cAAW;WAApC,CACE,oBAAC,gBAAD,EAAA,UAAgB,cAA2B,CAAA,EAC3C,oBAAC,MAAD;EAAM,SAAQ;EAAY,OAAO;EAAK,QAAQ;EAAK,eAAY;YAC7D,oBAAC,YAAD;GAAY,IAAG;GAAK,IAAG;GAAK,GAAE;GAAK,MAAK;GAAS,CAAA;EAC5C,CAAA,CACG"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as Container, r as Section, t as Backdrop } from "../../PageLayout-
|
|
1
|
+
import { n as Container, r as Section, t as Backdrop } from "../../PageLayout-BXM_pyrU.mjs";
|
|
2
2
|
import { r as PageLayoutWidth } from "../../PageLayoutFrame-4QGs7x-t.mjs";
|
|
3
3
|
import { n as SingleColumnLayoutProps, t as SingleColumnLayout } from "../../SingleColumnLayout-D2bpX7X1.mjs";
|
|
4
4
|
import { n as SplitColumnLayoutProps, t as SplitColumnLayout } from "../../SplitColumnLayout-CRDSDHHm.mjs";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as Section, i as Container, n as SingleColumnLayout, r as Backdrop, t as SplitColumnLayout } from "../../PageLayout-
|
|
1
|
+
import { a as Section, i as Container, n as SingleColumnLayout, r as Backdrop, t as SplitColumnLayout } from "../../PageLayout-DgEGcZgB.mjs";
|
|
2
2
|
export { Backdrop, Container, Section, SingleColumnLayout, SplitColumnLayout };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { a as styled } from "../../styledComponentsInterop-Cs5CCPRy.mjs";
|
|
2
2
|
import { semanticColor } from "../../lib/semanticColor.mjs";
|
|
3
3
|
import { t as HStack } from "../../Stack-Bzom2BTR.mjs";
|
|
4
|
-
import { n as Button } from "../../IconButton-
|
|
5
|
-
import { i as Modal_default } from "../../Modal-
|
|
6
|
-
import { t as ProgressIndicator } from "../../ProgressIndicator-
|
|
7
|
-
import { useState } from "react";
|
|
4
|
+
import { n as Button } from "../../IconButton-kSjnfhWt.mjs";
|
|
5
|
+
import { i as Modal_default } from "../../Modal-B6X5AgWj.mjs";
|
|
6
|
+
import { t as ProgressIndicator } from "../../ProgressIndicator-hy1P-RG1.mjs";
|
|
8
7
|
import { Color, Spacing } from "@persona/design-tokens";
|
|
8
|
+
import { useState } from "react";
|
|
9
9
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
10
10
|
//#region src/patterns/WizardModal/WizardModal.tsx
|
|
11
11
|
const statusFromProceed = (result) => result === "valid" ? "completed" : result;
|
package/dist/tone.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as SemanticTokens } from "./semantic-BZbvb3LV.mjs";
|
|
2
2
|
import { n as PdsColor } from "./color-Db57Wms_.mjs";
|
|
3
|
-
import { o as StickerProps } from "./Sticker-
|
|
3
|
+
import { o as StickerProps } from "./Sticker-C7Wv3Obx.mjs";
|
|
4
4
|
import { Color } from "@persona/design-tokens";
|
|
5
5
|
|
|
6
6
|
//#region src/components/Sticker/tone.d.ts
|
|
@@ -106,6 +106,20 @@ type FilterConditionOperator = {
|
|
|
106
106
|
operator: FilterOperator;
|
|
107
107
|
label: string;
|
|
108
108
|
isComplete?: (value: FilterRuleValue) => boolean;
|
|
109
|
+
/**
|
|
110
|
+
* Optional validation for the value the user has entered. Return an error
|
|
111
|
+
* message to reject the value, or `undefined` to accept it.
|
|
112
|
+
*
|
|
113
|
+
* While it returns a message, the rule counts as incomplete: the pill is not
|
|
114
|
+
* applied, the value control keeps what the user typed, and the Float,
|
|
115
|
+
* Integer and String controls show the message below the input in the error
|
|
116
|
+
* state (red border, `aria-invalid`). The message clears once the value is
|
|
117
|
+
* accepted.
|
|
118
|
+
*
|
|
119
|
+
* Not called for an empty value (`null`, `''` or an empty array): an empty
|
|
120
|
+
* rule is incomplete but not invalid, so it shows no error.
|
|
121
|
+
*/
|
|
122
|
+
validate?: (value: FilterRuleValue) => string | undefined;
|
|
109
123
|
} & ({
|
|
110
124
|
valueType: 'string';
|
|
111
125
|
defaultValue?: string;
|
|
@@ -200,4 +214,4 @@ declare const EMPTY_FILTER_STATE: FilterStateV2;
|
|
|
200
214
|
declare function isEmptyState(state: FilterStateV2): boolean;
|
|
201
215
|
//#endregion
|
|
202
216
|
export { FilterConditionOperator as a, FilterFieldType as c, FilterRuleValue as d, FilterRuleValueChange as f, isEmptyState as g, TopLevelFilterRule as h, EMPTY_FILTER_STATE as i, FilterOperator as l, FilterStateV2 as m, CompoundExpression as n, FilterField as o, FilterSize as p, DateRangeFilterValue as r, FilterFieldSource as s, AndGroup as t, FilterRule as u };
|
|
203
|
-
//# sourceMappingURL=types-
|
|
217
|
+
//# sourceMappingURL=types-BJqmRXFV.d.mts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as FilterRuleValue, f as FilterRuleValueChange, l as FilterOperator, o as FilterField, u as FilterRule } from "./types-
|
|
1
|
+
import { d as FilterRuleValue, f as FilterRuleValueChange, l as FilterOperator, o as FilterField, u as FilterRule } from "./types-BJqmRXFV.mjs";
|
|
2
2
|
import { ReactElement } from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/components/DataTable/TableControls/FiltersV2/value-controls/types.d.ts
|
|
@@ -32,6 +32,12 @@ interface ValueControlProps {
|
|
|
32
32
|
onCommit?: () => void;
|
|
33
33
|
/** Aria label wired to the popover's labeling. */
|
|
34
34
|
ariaLabel?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Validation error for the current value. The Float, Integer and String
|
|
37
|
+
* controls show it below the input and put the input in its error state.
|
|
38
|
+
* `resolveValueControl` fills it from the condition operator's `validate`.
|
|
39
|
+
*/
|
|
40
|
+
errorMessage?: string;
|
|
35
41
|
/** Optional external trigger that opens dropdown-backed value controls directly. */
|
|
36
42
|
trigger?: ReactElement;
|
|
37
43
|
/**
|
|
@@ -44,4 +50,4 @@ interface ValueControlProps {
|
|
|
44
50
|
}
|
|
45
51
|
//#endregion
|
|
46
52
|
export { ValueControlProps as t };
|
|
47
|
-
//# sourceMappingURL=types-
|
|
53
|
+
//# sourceMappingURL=types-BOsCi-kZ.d.mts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as ComboboxProps } from "./Combobox-
|
|
1
|
+
import { n as ComboboxProps } from "./Combobox-aOJDTjzC.mjs";
|
|
2
2
|
import { n as DateRange } from "./DateRangePicker-DlHC2q--.mjs";
|
|
3
3
|
import { ReactNode } from "react";
|
|
4
4
|
import { DateValue } from "@internationalized/date";
|
|
@@ -92,4 +92,4 @@ interface FilterTypeDefinition<TFilter extends BaseFilterConfig = FilterConfig>
|
|
|
92
92
|
type FilterTypeResolver<TFilter extends BaseFilterConfig = FilterConfig> = (config: TFilter) => FilterTypeDefinition<TFilter> | undefined;
|
|
93
93
|
//#endregion
|
|
94
94
|
export { ComboboxFilterConfig as a, FilterRenderOptions as c, InputFilterConfig as d, MultiSelectFilterConfig as f, BaseFilterConfig as i, FilterTypeDefinition as l, AttributeColumn as n, DateRangeFilterConfig as o, SelectFilterConfig as p, BaseActiveFilter as r, FilterConfig as s, ActiveFilter as t, FilterTypeResolver as u };
|
|
95
|
-
//# sourceMappingURL=types-
|
|
95
|
+
//# sourceMappingURL=types-C_CncajO.d.mts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { l as MenuItemProps } from "./Menu-
|
|
2
|
-
import { o as StickerProps } from "./Sticker-
|
|
1
|
+
import { l as MenuItemProps } from "./Menu-Ca5ftvo6.mjs";
|
|
2
|
+
import { o as StickerProps } from "./Sticker-C7Wv3Obx.mjs";
|
|
3
3
|
import { ReactNode } from "react";
|
|
4
4
|
import { Column, DeepKeys, FilterFnOption, Header, RowData, SortingState, Table } from "@tanstack/react-table";
|
|
5
5
|
|
|
@@ -177,4 +177,4 @@ type BulkAction = {
|
|
|
177
177
|
};
|
|
178
178
|
//#endregion
|
|
179
179
|
export { RowAction as C, RowDataWithTourTarget as D, RowDataWithSubrowsToAlwaysShowIds as E, SortProps as O, RenderValueStickerFormatConfig as S, RowDataWithSubrows as T, DataTableColumns as _, DataTableColumnBaseFormat as a, DatetimeConfig as b, DataTableColumnDatetimeFormat as c, DataTableColumnImageFormat as d, DataTableColumnNumberFormat as f, DataTableColumnURLFormat as g, DataTableColumnStringFormat as h, ColumnConfig as i, StickerMapping as k, DataTableColumnFormat as l, DataTableColumnStickerFormat as m, ClientFilterConfig as n, DataTableColumnCheckboxFormat as o, DataTableColumnPiiFormat as p, ClientFilterType as r, DataTableColumnDateFormat as s, BulkAction as t, DataTableColumnIDFormat as u, DataTableVariables as v, RowDataWithDetails as w, HeadlessFilterConfig as x, DateConfig as y };
|
|
180
|
-
//# sourceMappingURL=types-
|
|
180
|
+
//# sourceMappingURL=types-D5txFacG.d.mts.map
|
package/dist/types4.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as FilterConditionOperator, c as FilterFieldType, d as FilterRuleValue, f as FilterRuleValueChange, g as isEmptyState, h as TopLevelFilterRule, i as EMPTY_FILTER_STATE, l as FilterOperator, m as FilterStateV2, n as CompoundExpression, o as FilterField, p as FilterSize, r as DateRangeFilterValue, s as FilterFieldSource, t as AndGroup, u as FilterRule } from "./types-
|
|
1
|
+
import { a as FilterConditionOperator, c as FilterFieldType, d as FilterRuleValue, f as FilterRuleValueChange, g as isEmptyState, h as TopLevelFilterRule, i as EMPTY_FILTER_STATE, l as FilterOperator, m as FilterStateV2, n as CompoundExpression, o as FilterField, p as FilterSize, r as DateRangeFilterValue, s as FilterFieldSource, t as AndGroup, u as FilterRule } from "./types-BJqmRXFV.mjs";
|
|
2
2
|
export { AndGroup, CompoundExpression, DateRangeFilterValue, EMPTY_FILTER_STATE, FilterConditionOperator, FilterField, FilterFieldSource, FilterFieldType, FilterOperator, FilterRule, FilterRuleValue, FilterRuleValueChange, FilterSize, FilterStateV2, TopLevelFilterRule, isEmptyState };
|
package/dist/types5.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as ComboboxFilterConfig, c as FilterRenderOptions, d as InputFilterConfig, f as MultiSelectFilterConfig, i as BaseFilterConfig, l as FilterTypeDefinition, n as AttributeColumn, o as DateRangeFilterConfig, p as SelectFilterConfig, r as BaseActiveFilter, s as FilterConfig, t as ActiveFilter, u as FilterTypeResolver } from "./types-
|
|
1
|
+
import { a as ComboboxFilterConfig, c as FilterRenderOptions, d as InputFilterConfig, f as MultiSelectFilterConfig, i as BaseFilterConfig, l as FilterTypeDefinition, n as AttributeColumn, o as DateRangeFilterConfig, p as SelectFilterConfig, r as BaseActiveFilter, s as FilterConfig, t as ActiveFilter, u as FilterTypeResolver } from "./types-C_CncajO.mjs";
|
|
2
2
|
export { ActiveFilter, AttributeColumn, BaseActiveFilter, BaseFilterConfig, ComboboxFilterConfig, DateRangeFilterConfig, FilterConfig, FilterRenderOptions, FilterTypeDefinition, FilterTypeResolver, InputFilterConfig, MultiSelectFilterConfig, SelectFilterConfig };
|
package/dist/types6.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as ValueControlProps } from "./types-
|
|
1
|
+
import { t as ValueControlProps } from "./types-BOsCi-kZ.mjs";
|
|
2
2
|
export { ValueControlProps };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { m as FilterStateV2 } from "./types-
|
|
1
|
+
import { m as FilterStateV2 } from "./types-BJqmRXFV.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/components/DataTable/TableControls/FiltersV2/url-state.d.ts
|
|
4
4
|
/**
|
|
@@ -39,4 +39,4 @@ declare function applyFilterStateToSearchParams(params: URLSearchParams, state:
|
|
|
39
39
|
declare function decodeFilterStateFromString(raw: string | null | undefined): FilterStateV2 | null;
|
|
40
40
|
//#endregion
|
|
41
41
|
export { decodeFilterStateFromUrl as a, decodeFilterStateFromString as i, UrlStateCodecResult as n, encodeFilterStateToUrlParam as o, applyFilterStateToSearchParams as r, FILTER_STATE_URL_PARAM as t };
|
|
42
|
-
//# sourceMappingURL=url-state-
|
|
42
|
+
//# sourceMappingURL=url-state-CXPmXzIZ.d.mts.map
|
package/dist/url-state.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as decodeFilterStateFromUrl, i as decodeFilterStateFromString, n as UrlStateCodecResult, o as encodeFilterStateToUrlParam, r as applyFilterStateToSearchParams, t as FILTER_STATE_URL_PARAM } from "./url-state-
|
|
1
|
+
import { a as decodeFilterStateFromUrl, i as decodeFilterStateFromString, n as UrlStateCodecResult, o as encodeFilterStateToUrlParam, r as applyFilterStateToSearchParams, t as FILTER_STATE_URL_PARAM } from "./url-state-CXPmXzIZ.mjs";
|
|
2
2
|
export { FILTER_STATE_URL_PARAM, UrlStateCodecResult, applyFilterStateToSearchParams, decodeFilterStateFromString, decodeFilterStateFromUrl, encodeFilterStateToUrlParam };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as Sticker } from "./Sticker-
|
|
1
|
+
import { r as Sticker } from "./Sticker-C7Wv3Obx.mjs";
|
|
2
2
|
import { dt as ObjectSchemaMap, n as JsonSchema, st as FunctionJsonSchema } from "./jsonSchema-C4lfpDrt.mjs";
|
|
3
3
|
import { n as Chain, s as MethodChainNode } from "./methodChainTypes-De6sHGyd.mjs";
|
|
4
4
|
import { t as Option } from "./schemaOptions-DMq37JC5.mjs";
|
|
@@ -74,4 +74,4 @@ declare const useChainSchema: ({
|
|
|
74
74
|
declare const useChain: UseChainHook;
|
|
75
75
|
//#endregion
|
|
76
76
|
export { useChain as n, useChainSchema as r, chainRootsFromSchemaProperties as t };
|
|
77
|
-
//# sourceMappingURL=useChain-
|
|
77
|
+
//# sourceMappingURL=useChain-x9fd9Fyq.d.mts.map
|
|
@@ -3,7 +3,7 @@ import { dt as ObjectSchemaMap, n as JsonSchema, st as FunctionJsonSchema } from
|
|
|
3
3
|
import { n as Chain, s as MethodChainNode } from "./methodChainTypes-De6sHGyd.mjs";
|
|
4
4
|
import { n as PossibleChainSchema, t as ChainRoot } from "./chainTypes-C5mXGz6T.mjs";
|
|
5
5
|
import { u as ValueType } from "./types-02Ij0dgs.mjs";
|
|
6
|
-
import { n as useChain } from "./useChain-
|
|
6
|
+
import { n as useChain } from "./useChain-x9fd9Fyq.mjs";
|
|
7
7
|
|
|
8
8
|
//#region src/components/SmartTextInput/useChainAtCursor.d.ts
|
|
9
9
|
/**
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ChartColorMode, ChartPalette, ChartSeriesColorInput } from "./chartColors.mjs";
|
|
2
|
+
import { Color } from "@persona/design-tokens";
|
|
3
|
+
|
|
4
|
+
//#region src/components/Chart/useChartColors.d.ts
|
|
5
|
+
/** @experimental */
|
|
6
|
+
interface ChartColors {
|
|
7
|
+
/** The colour mode the palettes were read for. */
|
|
8
|
+
mode: ChartColorMode;
|
|
9
|
+
/** The ordered colours of the selected palette for that mode. */
|
|
10
|
+
colors: readonly Color[];
|
|
11
|
+
/** {@link resolveSeriesColors} bound to the selected palette and mode. */
|
|
12
|
+
resolve: <K extends string>(series: readonly ChartSeriesColorInput<K>[]) => Record<K, Color>;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* The chart colours for the current PDS colour mode. Reads the charting palettes `PDSProvider` /
|
|
16
|
+
* `ColorModeScope` install on the styled-components theme, so charts follow dark mode with no
|
|
17
|
+
* extra setup; without a PDS colour mode it returns the light `ChartingColors`.
|
|
18
|
+
*
|
|
19
|
+
* ```tsx
|
|
20
|
+
* const { resolve } = useChartColors();
|
|
21
|
+
* const colors = resolve([{ key: 'approved' }, { key: 'declined', color: chartColor(Color.CoreRed600) }]);
|
|
22
|
+
* <Bar dataKey='approved' fill={colors.approved} />
|
|
23
|
+
* ```
|
|
24
|
+
*
|
|
25
|
+
* @experimental
|
|
26
|
+
*/
|
|
27
|
+
declare function useChartColors(palette?: ChartPalette): ChartColors;
|
|
28
|
+
//#endregion
|
|
29
|
+
export { ChartColors, useChartColors };
|
|
30
|
+
//# sourceMappingURL=useChartColors.d.mts.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
//#region src/components/Chart/useChartSeriesVisibility.d.ts
|
|
2
|
+
/** @experimental */
|
|
3
|
+
interface ChartSeriesVisibility<K extends string> {
|
|
4
|
+
/** Keys of the hidden series, in series order: pass to `ChartLegend`'s `hidden`. */
|
|
5
|
+
hidden: K[];
|
|
6
|
+
/** Pass to `ChartLegend`'s `onToggle`. */
|
|
7
|
+
toggle: (key: K) => void;
|
|
8
|
+
isHidden: (key: K) => boolean;
|
|
9
|
+
/** True when every series is hidden; the plot keeps its size and axes. */
|
|
10
|
+
allHidden: boolean;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Show/hide state for a chart's series, driven by a {@link ChartLegend}. Every series may be hidden.
|
|
14
|
+
* Hide a Recharts series with its `hide` prop (`<Bar hide={isHidden(key)} />`) rather than
|
|
15
|
+
* unmounting it, so colours and axes stay put.
|
|
16
|
+
*
|
|
17
|
+
* @experimental
|
|
18
|
+
*/
|
|
19
|
+
declare function useChartSeriesVisibility<K extends string>(keys: readonly K[], initialHidden?: readonly K[]): ChartSeriesVisibility<K>;
|
|
20
|
+
//#endregion
|
|
21
|
+
export { ChartSeriesVisibility, useChartSeriesVisibility };
|
|
22
|
+
//# sourceMappingURL=useChartSeriesVisibility.d.mts.map
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
//#region src/components/Chart/useChartStyles.d.ts
|
|
2
|
+
/** Axis tick text style (TextSmall). @experimental */
|
|
3
|
+
interface ChartTickStyle {
|
|
4
|
+
fill: string;
|
|
5
|
+
fontSize: string;
|
|
6
|
+
fontFamily: string;
|
|
7
|
+
}
|
|
8
|
+
/** What {@link useChartStyles} returns: props to spread on Recharts components. @experimental */
|
|
9
|
+
interface ChartStyles {
|
|
10
|
+
/** The resolved semantic colours behind the props below. */
|
|
11
|
+
colors: {
|
|
12
|
+
grid: string;
|
|
13
|
+
axis: string;
|
|
14
|
+
text: string;
|
|
15
|
+
surface: string;
|
|
16
|
+
hover: string;
|
|
17
|
+
};
|
|
18
|
+
grid: {
|
|
19
|
+
vertical: false;
|
|
20
|
+
stroke: string;
|
|
21
|
+
zIndex: number;
|
|
22
|
+
};
|
|
23
|
+
xAxis: {
|
|
24
|
+
tick: ChartTickStyle;
|
|
25
|
+
tickLine: false;
|
|
26
|
+
axisLine: {
|
|
27
|
+
stroke: string;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
yAxis: {
|
|
31
|
+
tick: ChartTickStyle;
|
|
32
|
+
tickLine: false;
|
|
33
|
+
axisLine: false;
|
|
34
|
+
};
|
|
35
|
+
barCursor: {
|
|
36
|
+
fill: string;
|
|
37
|
+
fillOpacity: number;
|
|
38
|
+
};
|
|
39
|
+
lineCursor: {
|
|
40
|
+
stroke: string;
|
|
41
|
+
};
|
|
42
|
+
segmentGap: {
|
|
43
|
+
stroke: string;
|
|
44
|
+
strokeWidth: number;
|
|
45
|
+
};
|
|
46
|
+
activeDot: {
|
|
47
|
+
r: number;
|
|
48
|
+
stroke: string;
|
|
49
|
+
strokeWidth: number;
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* PDS styling for hand-built Recharts charts, as props to spread on Recharts' own components so a
|
|
54
|
+
* custom chart (reference lines, formatters, extra children) keeps the PDS look:
|
|
55
|
+
*
|
|
56
|
+
* ```tsx
|
|
57
|
+
* const styles = useChartStyles();
|
|
58
|
+
* <BarChart data={data} margin={CHART_PLOT_MARGIN}>
|
|
59
|
+
* <Tooltip cursor={styles.barCursor} content={<ChartPopover series={series} />} />
|
|
60
|
+
* <CartesianGrid {...styles.grid} />
|
|
61
|
+
* <XAxis dataKey='month' {...styles.xAxis} tickFormatter={formatMonth} />
|
|
62
|
+
* <YAxis {...styles.yAxis} />
|
|
63
|
+
* <ReferenceLine y={target} stroke={styles.colors.axis} strokeDasharray='4 4' />
|
|
64
|
+
* ...
|
|
65
|
+
* </BarChart>
|
|
66
|
+
* ```
|
|
67
|
+
*
|
|
68
|
+
* Colours come from semantic tokens, so they follow light and dark mode.
|
|
69
|
+
*
|
|
70
|
+
* @experimental Part of the in-progress PDS charting components; the API may change.
|
|
71
|
+
*/
|
|
72
|
+
declare function useChartStyles(): ChartStyles;
|
|
73
|
+
/** @experimental */
|
|
74
|
+
interface ChartActiveSeries<K extends string> {
|
|
75
|
+
/** The series under the pointer, for `ChartPopover activeSeries`. */
|
|
76
|
+
activeSeries: K | undefined;
|
|
77
|
+
/** Spread on each `<Bar>`: tracks which series and category the pointer is on. */
|
|
78
|
+
barHandlers: (key: K) => {
|
|
79
|
+
onMouseEnter: (data: unknown, index: number) => void;
|
|
80
|
+
onMouseLeave: () => void;
|
|
81
|
+
};
|
|
82
|
+
/**
|
|
83
|
+
* `fillOpacity` for a series' bar at `index` (pass it to a `<Cell>`): 0.65 for the other series in
|
|
84
|
+
* the hovered category, 1 otherwise.
|
|
85
|
+
*/
|
|
86
|
+
segmentOpacity: (key: K, index: number) => number;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Hover emphasis for bars holding several series (stacked or grouped): the segment under the
|
|
90
|
+
* pointer stays at full strength, the other segments of the same category drop to 65% opacity, and
|
|
91
|
+
* `activeSeries` dims the matching popover rows.
|
|
92
|
+
*
|
|
93
|
+
* ```tsx
|
|
94
|
+
* const { activeSeries, barHandlers, segmentOpacity } = useChartActiveSeries<Key>();
|
|
95
|
+
* <Tooltip content={<ChartPopover series={series} activeSeries={activeSeries} />} />
|
|
96
|
+
* {series.map(({ key }) => (
|
|
97
|
+
* <Bar key={key} dataKey={key} {...barHandlers(key)}>
|
|
98
|
+
* {data.map((_, i) => <Cell key={i} fillOpacity={segmentOpacity(key, i)} />)}
|
|
99
|
+
* </Bar>
|
|
100
|
+
* ))}
|
|
101
|
+
* ```
|
|
102
|
+
*
|
|
103
|
+
* @experimental
|
|
104
|
+
*/
|
|
105
|
+
declare function useChartActiveSeries<K extends string>(): ChartActiveSeries<K>;
|
|
106
|
+
//#endregion
|
|
107
|
+
export { ChartActiveSeries, ChartStyles, ChartTickStyle, useChartActiveSeries, useChartStyles };
|
|
108
|
+
//# sourceMappingURL=useChartStyles.d.mts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as TableViewConfigurationProps } from "./TableViewConfigurationDropdown-
|
|
2
|
-
import { i as ColumnConfig } from "./types-
|
|
1
|
+
import { i as TableViewConfigurationProps } from "./TableViewConfigurationDropdown-CZcLH8uR.mjs";
|
|
2
|
+
import { i as ColumnConfig } from "./types-D5txFacG.mjs";
|
|
3
3
|
import { RowData } from "@tanstack/react-table";
|
|
4
4
|
|
|
5
5
|
//#region src/patterns/IndexTableLayout/useColumnConfiguration.d.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { m as FilterStateV2, n as CompoundExpression, u as FilterRule } from "./types-
|
|
2
|
-
import { t as FieldRegistry } from "./FieldRegistry-
|
|
1
|
+
import { m as FilterStateV2, n as CompoundExpression, u as FilterRule } from "./types-BJqmRXFV.mjs";
|
|
2
|
+
import { t as FieldRegistry } from "./FieldRegistry-CJwGpUVK.mjs";
|
|
3
3
|
import { SetStateAction } from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/components/DataTable/TableControls/FiltersV2/useFilterStateV2.d.ts
|
|
@@ -91,4 +91,4 @@ interface UseFilterStateV2Result {
|
|
|
91
91
|
declare function useFilterStateV2(options: UseFilterStateV2Options): UseFilterStateV2Result;
|
|
92
92
|
//#endregion
|
|
93
93
|
export { UseFilterStateV2Result as n, useFilterStateV2 as r, UseFilterStateV2Options as t };
|
|
94
|
-
//# sourceMappingURL=useFilterStateV2-
|
|
94
|
+
//# sourceMappingURL=useFilterStateV2-DiTS9DTg.d.mts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as UseFilterStateV2Result, r as useFilterStateV2, t as UseFilterStateV2Options } from "./useFilterStateV2-
|
|
1
|
+
import { n as UseFilterStateV2Result, r as useFilterStateV2, t as UseFilterStateV2Options } from "./useFilterStateV2-DiTS9DTg.mjs";
|
|
2
2
|
export { UseFilterStateV2Options, UseFilterStateV2Result, useFilterStateV2 };
|