@persona/design-system 0.7.0 → 0.7.2
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 +23 -0
- package/README.md +9 -9
- package/dist/Accordion.d.mts +38 -0
- package/dist/AccordionItem.d.mts +31 -0
- package/dist/{Action-C7INft7X.d.mts → Action-Cyo6KCsS.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 +3 -3
- package/dist/BooleanValueControl.d.mts +1 -1
- package/dist/{Breadcrumb-DtW1R9xW.d.mts → Breadcrumb-CYXkrKXl.d.mts} +1 -1
- package/dist/Breadcrumb.d.mts +1 -1
- package/dist/{Breadcrumbs-B6JyoS8n.d.mts → Breadcrumbs-CP7eUYUy.d.mts} +2 -2
- package/dist/{Breadcrumbs-CCmf8oZ4.mjs → Breadcrumbs-CrXfUK1V.mjs} +3 -3
- package/dist/{Breadcrumbs-CCmf8oZ4.mjs.map → Breadcrumbs-CrXfUK1V.mjs.map} +1 -1
- package/dist/Breadcrumbs.d.mts +1 -1
- package/dist/{Button-HodDf_bB.d.mts → Button-Dhiund3f.d.mts} +4 -4
- package/dist/Button.d.mts +1 -1
- package/dist/{Calendar-DrdTvzAa.d.mts → Calendar-CMeIZ0BO.d.mts} +1 -1
- package/dist/Calendar.d.mts +1 -1
- package/dist/CalendarBase.d.mts +1 -1
- package/dist/{Card-CpDwATnX.d.mts → Card-DCYB_mtR.d.mts} +3 -3
- package/dist/Card.d.mts +1 -1
- package/dist/{CardV2-Y_kRfd-R.mjs → CardV2-M3o4BELp.mjs} +5 -5
- package/dist/{CardV2-Y_kRfd-R.mjs.map → CardV2-M3o4BELp.mjs.map} +1 -1
- package/dist/{Checkbox-DBAXDIQf.mjs → Checkbox-AjL7ucoR.mjs} +2 -2
- package/dist/{Checkbox-DBAXDIQf.mjs.map → Checkbox-AjL7ucoR.mjs.map} +1 -1
- package/dist/{Checkbox-C-hMfItK.d.mts → Checkbox-fWj7GkBl.d.mts} +1 -1
- package/dist/Checkbox.d.mts +1 -1
- package/dist/CheckboxGroupField.d.mts +1 -1
- package/dist/ChoicesValueControl.d.mts +1 -1
- package/dist/{Combobox-CNdpK8VG.mjs → Combobox-C2b9u955.mjs} +11 -8
- package/dist/Combobox-C2b9u955.mjs.map +1 -0
- package/dist/{Combobox-CPE-IV79.d.mts → Combobox-CC-Osr57.d.mts} +3 -3
- package/dist/Combobox.d.mts +2 -2
- package/dist/{ComboboxBase-B3Es1y9g.d.mts → ComboboxBase-Evo0FRxP.d.mts} +7 -5
- package/dist/ComboboxBase.d.mts +1 -1
- package/dist/{ComboboxMultiSelect-4sRA7oL0.d.mts → ComboboxMultiSelect-CvAc0FT3.d.mts} +2 -2
- package/dist/ComboboxMultiSelect.d.mts +1 -1
- package/dist/{ComboboxSingleSelect-DVPznL7L.d.mts → ComboboxSingleSelect-CBm7x0oh.d.mts} +4 -4
- package/dist/ComboboxSingleSelect.d.mts +1 -1
- package/dist/{CompactBar-DhHh7Roq.d.mts → CompactBar-D_2qMK4y.d.mts} +3 -3
- package/dist/CompactBar.d.mts +1 -1
- package/dist/{ConfigFormGroup-4lUy7CZH.mjs → ConfigFormGroup-Cz7GeTYd.mjs} +2 -2
- package/dist/{ConfigFormGroup-4lUy7CZH.mjs.map → ConfigFormGroup-Cz7GeTYd.mjs.map} +1 -1
- package/dist/{ControlBar-C8kagIck.d.mts → ControlBar-B7j9sOr9.d.mts} +2 -2
- package/dist/ControlBar.d.mts +1 -1
- package/dist/DataTable.d.mts +3 -3
- package/dist/{DateField-2aigfD4u.d.mts → DateField-BamAk9_w.d.mts} +2 -2
- package/dist/DateField.d.mts +1 -1
- package/dist/{DatePicker-DC_RKjdM.d.mts → DatePicker-C3xNSkPG.d.mts} +2 -2
- package/dist/{DatePicker-CSd20-CW.mjs → DatePicker-IgiUI3Wj.mjs} +6 -6
- package/dist/{DatePicker-CSd20-CW.mjs.map → DatePicker-IgiUI3Wj.mjs.map} +1 -1
- package/dist/DatePicker.d.mts +1 -1
- package/dist/{DateRangePicker-ByD6IsLB.d.mts → DateRangePicker-C4QKMo2a.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-gmGRrD1z.mjs → DropdownButton-BWiXLMfD.mjs} +2 -2
- package/dist/{DropdownButton-gmGRrD1z.mjs.map → DropdownButton-BWiXLMfD.mjs.map} +1 -1
- package/dist/DropdownButton.d.mts +2 -2
- package/dist/{DropdownMenu-I5WDO-q5.mjs → DropdownMenu-CuKSNxc9.mjs} +2 -2
- package/dist/{DropdownMenu-I5WDO-q5.mjs.map → DropdownMenu-CuKSNxc9.mjs.map} +1 -1
- package/dist/{DropdownMenu-eP6v6XE4.d.mts → DropdownMenu-DL5ye-0m.d.mts} +2 -2
- package/dist/DropdownMenu.d.mts +1 -1
- package/dist/{ErrorProps-Dgu98PkH.d.mts → ErrorProps-BA0-m_Wp.d.mts} +1 -1
- package/dist/ErrorProps.d.mts +1 -1
- package/dist/{FieldRegistry-BtdqMYUD.d.mts → FieldRegistry-bKxrF1gC.d.mts} +2 -2
- package/dist/FieldRegistry.d.mts +1 -1
- package/dist/{FilterBar-CAnqGXgE.d.mts → FilterBar-DhlBLWxw.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/{FormControl-CJfYdgZF.d.mts → FormControl-D5xyPkST.d.mts} +6 -2
- package/dist/{FormControl-CButLg9b.mjs → FormControl-DnfZTli_.mjs} +26 -11
- package/dist/FormControl-DnfZTli_.mjs.map +1 -0
- package/dist/FormControl.d.mts +1 -1
- package/dist/FormControlLabel.d.mts +1 -1
- package/dist/{FormField-BHUeWCsa.mjs → FormField-74TPV8-8.mjs} +29 -19
- package/dist/FormField-74TPV8-8.mjs.map +1 -0
- package/dist/{FormField-CK8o1sMB.d.mts → FormField-BJZUj6jg.d.mts} +4 -2
- package/dist/FormField.d.mts +1 -1
- package/dist/Grid-DOyYYsvk.mjs +92 -0
- package/dist/Grid-DOyYYsvk.mjs.map +1 -0
- package/dist/Grid.d.mts +4 -1
- package/dist/{Header-ZnHGm8fs.d.mts → Header-BqEKkEp5.d.mts} +1 -1
- package/dist/Header.d.mts +1 -1
- package/dist/{HelperTooltip-CQpPO16Q.d.mts → HelperTooltip-mOVSuEB8.d.mts} +2 -2
- package/dist/HelperTooltip.d.mts +1 -1
- package/dist/{HoverCopyableField-B89NIwlE.mjs → HoverCopyableField-CN3gl0ny.mjs} +2 -2
- package/dist/{HoverCopyableField-B89NIwlE.mjs.map → HoverCopyableField-CN3gl0ny.mjs.map} +1 -1
- package/dist/{IconButton-zu-VNp1h.d.mts → IconButton-CjPFhpVG.d.mts} +2 -2
- package/dist/IconButton-CqTPMhjV.mjs.map +1 -1
- package/dist/IconButton.d.mts +1 -1
- package/dist/ImageTile.d.mts +1 -1
- package/dist/InlineCombobox.d.mts +1 -1
- package/dist/InlineInput.d.mts +1 -1
- package/dist/{Input-Ce8FvSYf.d.mts → Input-CZ_6KWDN.d.mts} +3 -3
- package/dist/{Input-C-TwCer2.mjs → Input-C_3QwAAt.mjs} +2 -2
- package/dist/{Input-C-TwCer2.mjs.map → Input-C_3QwAAt.mjs.map} +1 -1
- package/dist/Input.d.mts +1 -1
- package/dist/{InputProps-B1Xod4wm.d.mts → InputProps-lag6BM5h.d.mts} +2 -2
- package/dist/InputProps.d.mts +1 -1
- package/dist/IntegerValueControl.d.mts +1 -1
- package/dist/Link.d.mts +1 -1
- package/dist/{ListBox-BHE4DO2l.mjs → ListBox-D4j4LCT3.mjs} +6 -6
- package/dist/{ListBox-BHE4DO2l.mjs.map → ListBox-D4j4LCT3.mjs.map} +1 -1
- package/dist/{ListBox-CCBWdAUR.d.mts → ListBox-nYAdYVQx.d.mts} +3 -3
- package/dist/ListBox.d.mts +1 -1
- package/dist/ListBoxField.d.mts +3 -2
- package/dist/{LoadingShimmer-JyGh7M7V.mjs → LoadingShimmer-Dizk2sZu.mjs} +1 -1
- package/dist/{LoadingShimmer-JyGh7M7V.mjs.map → LoadingShimmer-Dizk2sZu.mjs.map} +1 -1
- package/dist/LoadingShimmer.d.mts +1 -1
- package/dist/{LogicRow-DmI8NKrI.d.mts → LogicRow-k4ZPtjN0.d.mts} +3 -3
- package/dist/LogicRow.d.mts +1 -1
- package/dist/MaskedInput.d.mts +2 -2
- package/dist/{Menu-C8RxFGOG.d.mts → Menu-Bu7-KBhp.d.mts} +3 -3
- package/dist/{Menu-xENvm-Oa.mjs → Menu-Cd6oxjAe.mjs} +1 -1
- package/dist/{Menu-xENvm-Oa.mjs.map → Menu-Cd6oxjAe.mjs.map} +1 -1
- package/dist/Menu.d.mts +1 -1
- package/dist/Modal-BN0K8QXi.mjs +258 -0
- package/dist/Modal-BN0K8QXi.mjs.map +1 -0
- package/dist/Modal-Dwq-QBw_.d.mts +145 -0
- package/dist/Modal.d.mts +2 -145
- package/dist/{PageHeader-7GBfUjU_.mjs → PageHeader-BTtm3hRQ.mjs} +2 -2
- package/dist/{PageHeader-7GBfUjU_.mjs.map → PageHeader-BTtm3hRQ.mjs.map} +1 -1
- package/dist/PageHeader.d.mts +1 -1
- package/dist/PageLayoutFrame.d.mts +28 -0
- package/dist/{PageSelector-BMz2Q4P6.d.mts → PageSelector-CeGC84N1.d.mts} +3 -3
- package/dist/PageSelector.d.mts +1 -1
- package/dist/{Pagination-BxNqU2yh.mjs → Pagination-CPd4mSnw.mjs} +3 -3
- package/dist/{Pagination-BxNqU2yh.mjs.map → Pagination-CPd4mSnw.mjs.map} +1 -1
- package/dist/{Pagination-ne9hnVoe.d.mts → Pagination-H-CcXrCD.d.mts} +2 -2
- package/dist/Pagination.d.mts +1 -1
- package/dist/{Pii-B29k0Omf.mjs → Pii-Dz4woKd8.mjs} +1 -1
- package/dist/{Pii-B29k0Omf.mjs.map → Pii-Dz4woKd8.mjs.map} +1 -1
- package/dist/{PillShell-D9iQyM-8.d.mts → PillShell-BQC-k7Rl.d.mts} +2 -2
- package/dist/PillShell.d.mts +1 -1
- package/dist/{Popover-Dn3xmzSK.mjs → Popover-opVa9Xhc.mjs} +1 -1
- package/dist/{Popover-Dn3xmzSK.mjs.map → Popover-opVa9Xhc.mjs.map} +1 -1
- package/dist/ProgressIndicator-3A4Aqci6.mjs +188 -0
- package/dist/ProgressIndicator-3A4Aqci6.mjs.map +1 -0
- package/dist/ProgressIndicator-DbOLOaxJ.d.mts +66 -0
- package/dist/ProgressIndicator.d.mts +2 -66
- package/dist/{PseudoClassProps-CdRF3QNn.d.mts → PseudoClassProps-CHtBNv8B.d.mts} +1 -1
- package/dist/PseudoClassProps.d.mts +1 -1
- package/dist/{Radio-BRPoGITE.mjs → Radio-Cxt89w8s.mjs} +2 -2
- package/dist/{Radio-BRPoGITE.mjs.map → Radio-Cxt89w8s.mjs.map} +1 -1
- package/dist/{RadioGroup-CahrWsXi.mjs → RadioGroup-B6Cg1kdm.mjs} +2 -2
- package/dist/{RadioGroup-CahrWsXi.mjs.map → RadioGroup-B6Cg1kdm.mjs.map} +1 -1
- package/dist/{RadioGroup-CxL6LW4q.d.mts → RadioGroup-BjrfVPZQ.d.mts} +1 -1
- package/dist/RadioGroup.d.mts +1 -1
- package/dist/{RangeCalendar-B7TwRJbg.d.mts → RangeCalendar-CPnLaM-J.d.mts} +2 -2
- package/dist/RangeCalendar.d.mts +1 -1
- package/dist/RangeCalendarPresets.d.mts +1 -1
- package/dist/{RouterContext-B7N12wkK.d.mts → RouterContext-CbvHIl4K.d.mts} +2 -2
- package/dist/RouterContext.d.mts +1 -1
- package/dist/{RouterLink-Bq36EGjc.d.mts → RouterLink-v9AG9fYa.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-D69WxMNq.d.mts → SearchInput-CIjwmT8R.d.mts} +2 -2
- package/dist/SearchInput.d.mts +1 -1
- package/dist/SectionHeading.d.mts +1 -1
- package/dist/{SegmentedControl-DLkAC2kW.mjs → SegmentedControl-BcwfLuHA.mjs} +12 -5
- package/dist/SegmentedControl-BcwfLuHA.mjs.map +1 -0
- package/dist/{SegmentedControl-vCnGsdXo.d.mts → SegmentedControl-Crr_aHAs.d.mts} +2 -1
- package/dist/SegmentedControl.d.mts +1 -1
- package/dist/{Select-YOgn_uD0.mjs → Select-BstCz8P1.mjs} +4 -4
- package/dist/{Select-YOgn_uD0.mjs.map → Select-BstCz8P1.mjs.map} +1 -1
- package/dist/{Select-CpRijO_l.d.mts → Select-CJQeuCiF.d.mts} +3 -3
- package/dist/Select.d.mts +1 -1
- package/dist/SingleColumnLayout.d.mts +16 -0
- package/dist/{Spinner-BDa0D1ze.mjs → Spinner-DplDSBqf.mjs} +1 -1
- package/dist/{Spinner-BDa0D1ze.mjs.map → Spinner-DplDSBqf.mjs.map} +1 -1
- package/dist/SplitColumnLayout.d.mts +19 -0
- package/dist/{Stack-8KGPQp0u.d.mts → Stack-RVptVTVi.d.mts} +1 -1
- package/dist/Stack.d.mts +1 -1
- package/dist/{Sticker-Bf9rhSkv.d.mts → Sticker-BVX38LKi.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-RenaeJJ6.mjs → TabBar-BepWbJHz.mjs} +1 -1
- package/dist/{TabBar-RenaeJJ6.mjs.map → TabBar-BepWbJHz.mjs.map} +1 -1
- package/dist/{Table-DaxiIS96.mjs → Table-B1gRr2XT.mjs} +2 -2
- package/dist/{Table-DaxiIS96.mjs.map → Table-B1gRr2XT.mjs.map} +1 -1
- package/dist/{Table-BefytM6w.d.mts → Table-DFiSWroB.d.mts} +1 -1
- package/dist/Table.d.mts +1 -1
- package/dist/{TableBody-BZ34-_wV.d.mts → TableBody-Di9JYHDN.d.mts} +1 -1
- package/dist/TableBody.d.mts +1 -1
- package/dist/{TableBox-C7ZXamI7.mjs → TableBox-DAQ3Plqx.mjs} +7 -7
- package/dist/{TableBox-C7ZXamI7.mjs.map → TableBox-DAQ3Plqx.mjs.map} +1 -1
- package/dist/TableBox.d.mts +2 -2
- package/dist/{TableBoxCell-B7kjO76l.d.mts → TableBoxCell-D6h1X5ph.d.mts} +6 -6
- package/dist/TableBoxCell.d.mts +1 -1
- package/dist/TableBoxField.d.mts +4 -3
- package/dist/{TableBoxRow-oVGEFVOO.d.mts → TableBoxRow-C6l6J4mq.d.mts} +3 -3
- package/dist/TableBoxRow.d.mts +1 -1
- package/dist/{TableBoxRowActions-DIZw2OPP.d.mts → TableBoxRowActions-CsLN1b1J.d.mts} +2 -2
- package/dist/TableBoxRowActions.d.mts +1 -1
- package/dist/{TableCell-DorRxyke.d.mts → TableCell-WSDXw79Q.d.mts} +2 -2
- package/dist/TableCell.d.mts +1 -1
- package/dist/{TableControls-DxAUnR9v.mjs → TableControls-BxuPCUQS.mjs} +34 -21
- package/dist/TableControls-BxuPCUQS.mjs.map +1 -0
- package/dist/{TableControls-BtGFiZeD.d.mts → TableControls-cswMgBAr.d.mts} +3 -3
- package/dist/TableControls.d.mts +1 -1
- package/dist/{TableControlsContext-C3DYeUmB.d.mts → TableControlsContext-Cbh8wear.d.mts} +2 -2
- package/dist/TableControlsContext.d.mts +1 -1
- package/dist/{TableHead-B0Fdldgw.d.mts → TableHead-CkL1fEg2.d.mts} +1 -1
- package/dist/TableHead.d.mts +1 -1
- package/dist/{TableHeaderCell-C_7X8QAT.d.mts → TableHeaderCell-K9Ry6YqO.d.mts} +1 -1
- package/dist/TableHeaderCell.d.mts +1 -1
- package/dist/{TableLayout-CXVVzq0e.d.mts → TableLayout-CYRGIFEl.d.mts} +1 -1
- package/dist/TableLayout.d.mts +1 -1
- package/dist/{TableRow-Dr61XJNw.d.mts → TableRow-DMHlo1eg.d.mts} +2 -2
- package/dist/TableRow.d.mts +1 -1
- package/dist/TableTH.d.mts +1 -1
- package/dist/{TableViewConfigurationDropdown-CCtwcB3I.d.mts → TableViewConfigurationDropdown-BRbOcVNc.d.mts} +2 -2
- package/dist/TableViewConfigurationDropdown.d.mts +1 -1
- package/dist/{TechnicalSticker-D1PqG_yT.mjs → TechnicalSticker-_LtE-PRY.mjs} +1 -1
- package/dist/{TechnicalSticker-D1PqG_yT.mjs.map → TechnicalSticker-_LtE-PRY.mjs.map} +1 -1
- package/dist/{Text-DD_W_ixb.d.mts → Text-B69gp3X_.d.mts} +3 -3
- package/dist/Text.d.mts +1 -1
- package/dist/{TextArea-wwV-s5Oa.mjs → TextArea-CcxltuBh.mjs} +2 -2
- package/dist/{TextArea-wwV-s5Oa.mjs.map → TextArea-CcxltuBh.mjs.map} +1 -1
- package/dist/{TextArea-DOofaXJi.d.mts → TextArea-Cjsdl07-.d.mts} +2 -2
- package/dist/TextArea.d.mts +1 -1
- package/dist/{TextUnderlineTooltip-BPLKU9wu.d.mts → TextUnderlineTooltip-DDzKLCeX.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-2nrUX591.d.mts → Toggle-B5sSdb_q.d.mts} +3 -1
- package/dist/{Toggle-iG2x_IZR.mjs → Toggle-DWbJOwf3.mjs} +4 -3
- package/dist/Toggle-DWbJOwf3.mjs.map +1 -0
- package/dist/Toggle.d.mts +1 -1
- package/dist/{Tooltip-Cnqf1-tx.d.mts → Tooltip-x1pFf-Mj.d.mts} +2 -2
- package/dist/Tooltip.d.mts +1 -1
- package/dist/{TruncatedText-g2T5HlqX.d.mts → TruncatedText-BE8FuEQm.d.mts} +1 -1
- package/dist/WizardModal.d.mts +41 -0
- package/dist/accordionTitleTypography-BYhjSN9t.d.mts +17 -0
- package/dist/accordionTitleTypography.d.mts +2 -0
- package/dist/{codec-CoX6LfOY.d.mts → codec-BcgsGCHE.d.mts} +2 -2
- package/dist/codec.d.mts +1 -1
- package/dist/{color-Bt0Lv1e3.d.mts → color-LH7zKfKo.d.mts} +2 -2
- package/dist/components/Accordion/index.d.mts +4 -0
- package/dist/components/Accordion/index.mjs +330 -0
- package/dist/components/Accordion/index.mjs.map +1 -0
- package/dist/components/BottomPanel/index.mjs +1 -1
- 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/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/Checkbox/index.mjs +1 -1
- package/dist/components/Combobox/index.d.mts +2 -2
- package/dist/components/Combobox/index.mjs +1 -1
- package/dist/components/ConfigFormGroup/index.mjs +2 -2
- package/dist/components/DataTable/TableControls/index.d.mts +19 -19
- package/dist/components/DataTable/TableControls/index.mjs +1 -1
- package/dist/components/DataTable/index.mjs +7 -7
- package/dist/components/DataTable/index.mjs.map +1 -1
- package/dist/components/DataTable/types.d.mts +2 -2
- 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/FormControl/index.d.mts +2 -2
- package/dist/components/FormControl/index.mjs +2 -2
- package/dist/components/FormField/index.d.mts +1 -1
- package/dist/components/FormField/index.mjs +1 -1
- package/dist/components/Grid/index.d.mts +2 -2
- package/dist/components/Grid/index.mjs +2 -85
- package/dist/components/HoverCopyableField/index.mjs +1 -1
- package/dist/components/ImageTile/index.mjs +3 -3
- package/dist/components/Input/index.d.mts +1 -1
- package/dist/components/Input/index.mjs +1 -1
- package/dist/components/Link/index.mjs.map +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 -257
- 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/Popover/index.mjs +1 -1
- package/dist/components/ProgressIndicator/index.d.mts +2 -2
- package/dist/components/ProgressIndicator/index.mjs +1 -187
- package/dist/components/Radio/index.mjs +1 -1
- package/dist/components/RadioGroup/index.d.mts +1 -1
- package/dist/components/RadioGroup/index.mjs +1 -1
- package/dist/components/RightPanel/index.mjs +1 -1
- package/dist/components/SegmentedControl/index.d.mts +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/Spinner/index.mjs +1 -1
- package/dist/components/Stack/index.d.mts +1 -1
- package/dist/components/Sticker/index.d.mts +1 -1
- package/dist/components/TabBar/index.mjs +1 -1
- package/dist/components/Table/index.d.mts +8 -8
- package/dist/components/Table/index.mjs +1 -1
- 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/TextArea/index.mjs +1 -1
- package/dist/components/Toggle/index.d.mts +1 -1
- package/dist/components/Toggle/index.mjs +1 -1
- package/dist/components/Tooltip/index.d.mts +3 -3
- package/dist/components/WizardModal/index.d.mts +2 -0
- package/dist/components/WizardModal/index.mjs +106 -0
- package/dist/components/WizardModal/index.mjs.map +1 -0
- package/dist/compound-expression.d.mts +1 -1
- package/dist/{constants-D8bzZ-7B.d.mts → constants-BpwnTzcv.d.mts} +1 -1
- package/dist/constants.d.mts +1 -1
- package/dist/{createPath-BDYRvl57.d.mts → createPath-Bst12Uxr.d.mts} +2 -2
- package/dist/createPath.d.mts +1 -1
- package/dist/{date-range-rule-value-C3wrh0jw.d.mts → date-range-rule-value-C4ir2Y8W.d.mts} +2 -2
- package/dist/date-range-rule-value.d.mts +1 -1
- package/dist/{date-rule-intent-CC1LdkE7.d.mts → date-rule-intent-gKmuxMVA.d.mts} +3 -3
- package/dist/date-rule-intent.d.mts +1 -1
- package/dist/display.d.mts +1 -1
- package/dist/fieldPickerOptions.d.mts +2 -2
- package/dist/{filter-size-context-CCfFnaib.d.mts → filter-size-context-BOpH6pBm.d.mts} +2 -2
- package/dist/filter-size-context.d.mts +1 -1
- package/dist/helpers.d.mts +1 -1
- package/dist/{index-Nip77QqW.d.mts → index-BXdrzR0c.d.mts} +3 -3
- package/dist/{index-DalP_w0c.d.mts → index-C2-PBfN3.d.mts} +2 -2
- package/dist/{index-D-RD2Kfg.d.mts → index-c0aXmZV9.d.mts} +2 -2
- package/dist/index-dhjtMp5F.d.mts +1 -0
- package/dist/index-xmouCHX9.d.mts +1 -0
- package/dist/index.d.mts +1 -1
- package/dist/index2.d.mts +1 -1
- package/dist/index3.d.mts +3 -3
- package/dist/index4.d.mts +1 -1
- package/dist/index5.d.mts +14 -14
- package/dist/{input-DCJivcWf.d.mts → input-DVJhMlxU.d.mts} +3 -3
- package/dist/inputFields.d.mts +14 -12
- package/dist/{intersperse-DQAyfeEw.mjs → intersperse-Bxcrxj2Q.mjs} +1 -1
- package/dist/{intersperse-DQAyfeEw.mjs.map → intersperse-Bxcrxj2Q.mjs.map} +1 -1
- package/dist/{jsonSchema-c_EfAj8y.d.mts → jsonSchema-DmdZYC4a.d.mts} +35 -11
- package/dist/lib/PDSProvider.d.mts +2 -2
- package/dist/lib/TruncatedText.d.mts +1 -1
- package/dist/lib/TruncatedTextWithTooltip.d.mts +1 -1
- package/dist/lib/color.d.mts +1 -1
- package/dist/lib/date-filter/index.d.mts +2 -2
- package/dist/lib/jsonSchema.d.mts +2 -2
- package/dist/lib/jsonSchema.mjs +10 -10
- package/dist/lib/jsonSchema.mjs.map +1 -1
- package/dist/lib/message.d.mts +1 -1
- package/dist/lib/methodChain.d.mts +1 -1
- package/dist/lib/objectSchemaTypes.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/semanticColor.d.mts +1 -1
- package/dist/{message-CjIHdhX1.d.mts → message-CKSLIKF0.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/text.d.mts +1 -1
- package/dist/{operators-C4yL6qbl.d.mts → operators-1_jTgYRX.d.mts} +2 -2
- package/dist/operators.d.mts +1 -1
- package/dist/{palette-qgPRWgUN.d.mts → palette-CMOEyNPH.d.mts} +3 -3
- package/dist/palette.d.mts +1 -1
- package/dist/patterns/LayoutLoadingShimmer/index.mjs +4 -4
- package/dist/patterns/PageLayout/index.d.mts +4 -1
- package/dist/patterns/PageLayout/index.mjs +99 -2
- package/dist/patterns/PageLayout/index.mjs.map +1 -1
- package/dist/reactRouterFallback.d.mts +1 -1
- package/dist/relative-date-label.d.mts +1 -1
- package/dist/scrollExpandedItemIntoView.d.mts +12 -0
- package/dist/{semantic-DUctmpu_.d.mts → semantic-BXwNUd4a.d.mts} +1 -1
- package/dist/{semanticColor-IAhXS17y.d.mts → semanticColor-Cru2gSys.d.mts} +3 -3
- package/dist/{text-DjTGRUM1.d.mts → text-CxIup7HJ.d.mts} +1 -1
- package/dist/{theme-DKiszVRN.d.mts → theme-CW6qlONZ.d.mts} +3 -3
- package/dist/theme.d.mts +1 -1
- package/dist/tone.d.mts +3 -3
- package/dist/{types-B8aAvU2a2.d.mts → types-3iEDsymE.d.mts} +2 -2
- package/dist/{types-CuQSgl1F.d.mts → types-B-stjYNc.d.mts} +1 -1
- package/dist/{types-I9z-0m7q.d.mts → types-BEjWTkZV.d.mts} +3 -3
- package/dist/{types-CcZbBH0e.d.mts → types-ChkiGhjQ.d.mts} +1 -1
- package/dist/{types-D8rWSj3z.d.mts → types-YojUycQK.d.mts} +1 -1
- package/dist/{types-RWjW1d9I.d.mts → types-g-aqbnek.d.mts} +1 -1
- 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/{url-state-BOkOTKNZ.d.mts → url-state-CHK2N2fA.d.mts} +2 -2
- package/dist/url-state.d.mts +1 -1
- package/dist/useComboboxFooterAction.d.mts +1 -1
- package/dist/{useFilterStateV2-CjXG2vjy.d.mts → useFilterStateV2-B26e5iUx.d.mts} +3 -3
- package/dist/useFilterStateV2.d.mts +1 -1
- package/dist/{useFormField-C61u9KvG.mjs → useFormField-BzhMbl5P.mjs} +3 -2
- package/dist/useFormField-BzhMbl5P.mjs.map +1 -0
- package/dist/{useFormField-DDbo-ExT.d.mts → useFormField-DPFClB5h.d.mts} +4 -2
- package/dist/useFormField.d.mts +1 -1
- package/dist/{useFormGroup-C89-oI4w.mjs → useFormGroup-CH3kiXoa.mjs} +1 -1
- package/dist/{useFormGroup-C89-oI4w.mjs.map → useFormGroup-CH3kiXoa.mjs.map} +1 -1
- package/dist/{useLocationPathname-K2N4fw8j.d.mts → useLocationPathname-CnRd_Rzn.d.mts} +1 -1
- package/dist/useLocationPathname.d.mts +1 -1
- package/dist/{useTableBoxDragAndDrop-CbbH3pMK.d.mts → useTableBoxDragAndDrop-DWlG5vhl.d.mts} +1 -1
- package/dist/useTableBoxDragAndDrop.d.mts +1 -1
- package/dist/useTruncation.d.mts +1 -1
- package/dist/{utilities-D0EhDri-.d.mts → utilities-BcGuP8Fd.d.mts} +1 -1
- package/dist/utilities.d.mts +1 -1
- package/dist/utils/testing.d.mts +1 -1
- package/dist/utils/testing.mjs.map +1 -1
- package/dist/utils.d.mts +1 -1
- package/dist/{validation-C07D6XjI.d.mts → validation-B-Om4ANo.d.mts} +3 -3
- package/dist/validation.d.mts +1 -1
- package/dist/{value-control-resolver-zYNPNlRW.d.mts → value-control-resolver-BiyhB8zt.d.mts} +2 -2
- package/dist/value-control-resolver.d.mts +1 -1
- package/dist/variables/effect.d.mts +1 -1
- package/dist/variables/semantic.d.mts +1 -1
- package/llms.txt +10 -1
- package/package.json +5 -3
- package/skills/ui-authoring/COMPONENTS.md +5 -1
- package/skills/ui-authoring/PATTERNS.md +74 -115
- package/dist/Combobox-CNdpK8VG.mjs.map +0 -1
- package/dist/FormControl-CButLg9b.mjs.map +0 -1
- package/dist/FormField-BHUeWCsa.mjs.map +0 -1
- package/dist/SegmentedControl-DLkAC2kW.mjs.map +0 -1
- package/dist/TableControls-DxAUnR9v.mjs.map +0 -1
- package/dist/Toggle-iG2x_IZR.mjs.map +0 -1
- package/dist/components/Grid/index.mjs.map +0 -1
- package/dist/components/Modal/index.mjs.map +0 -1
- package/dist/components/ProgressIndicator/index.mjs.map +0 -1
- package/dist/fieldSchemaTypes-BVYSm74B.d.mts +0 -39
- package/dist/lib/fieldSchemaTypes.d.mts +0 -2
- package/dist/lib/fieldSchemaTypes.mjs +0 -41
- package/dist/lib/fieldSchemaTypes.mjs.map +0 -1
- package/dist/useFormField-C61u9KvG.mjs.map +0 -1
- /package/dist/{index-B33elXxm.d.mts → index-BCh-G39Y2.d.mts} +0 -0
- /package/dist/{index-B_BBnMou.d.mts → index-BMBcfD_R.d.mts} +0 -0
- /package/dist/{index-BrGZHEgX.d.mts → index-BOn0AAue.d.mts} +0 -0
- /package/dist/{index-BwAfCVZH2.d.mts → index-BcsXXrHq.d.mts} +0 -0
- /package/dist/{index-C6HcjJiY.d.mts → index-BwFl_eS0.d.mts} +0 -0
- /package/dist/{index-CX869wwk.d.mts → index-C-lwXyQ6.d.mts} +0 -0
- /package/dist/{index-CjDodOH2.d.mts → index-C1o2TFfS.d.mts} +0 -0
- /package/dist/{index-CsuikFeJ.d.mts → index-C3kE54DD.d.mts} +0 -0
- /package/dist/{index-CzItj62a.d.mts → index-CREkvfw9.d.mts} +0 -0
- /package/dist/{index-D13oYj4_.d.mts → index-CfCYi7PF.d.mts} +0 -0
- /package/dist/{index-D4DUvwPf.d.mts → index-DCTy4zg0.d.mts} +0 -0
- /package/dist/{index-DMRtRo7y.d.mts → index-DWIh4oP5.d.mts} +0 -0
- /package/dist/{index-DXJd7-2Z.d.mts → index-De7MV8-j.d.mts} +0 -0
- /package/dist/{index-DZlqSwCF.d.mts → index-DgJfEygr.d.mts} +0 -0
- /package/dist/{index-DeVKzGce.d.mts → index-DrK1_jKY.d.mts} +0 -0
- /package/dist/{index-Deol7ZWO.d.mts → index-Es5nKSSL.d.mts} +0 -0
- /package/dist/{index-DztUdPP_.d.mts → index-Qwqzz3XM.d.mts} +0 -0
- /package/dist/{index-Rvd9MEUQ.d.mts → index-Wc1llEvP.d.mts} +0 -0
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { a as styled, r as css } from "./styledComponentsInterop-NxwFjeA4.mjs";
|
|
2
|
+
import { Spacing } from "@persona/design-tokens";
|
|
3
|
+
import { createContext, useContext, useLayoutEffect, useRef, useState } from "react";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
//#region components/Grid/Grid.tsx
|
|
6
|
+
const GRID_BREAKPOINTS = {
|
|
7
|
+
sm: 768,
|
|
8
|
+
md: 1024,
|
|
9
|
+
lg: 1408
|
|
10
|
+
};
|
|
11
|
+
const GridBreakpointContext = createContext("md");
|
|
12
|
+
/** Breakpoint of the nearest `Grid`, measured from that grid's width. */
|
|
13
|
+
const useGridBreakpoint = () => useContext(GridBreakpointContext);
|
|
14
|
+
const getBreakpoint = (width) => {
|
|
15
|
+
if (width >= GRID_BREAKPOINTS.lg) return "lg";
|
|
16
|
+
if (width >= GRID_BREAKPOINTS.md) return "md";
|
|
17
|
+
if (width >= GRID_BREAKPOINTS.sm) return "sm";
|
|
18
|
+
return "xs";
|
|
19
|
+
};
|
|
20
|
+
const useMeasuredGridBreakpoint = (ref) => {
|
|
21
|
+
const [breakpoint, setBreakpoint] = useState("md");
|
|
22
|
+
useLayoutEffect(() => {
|
|
23
|
+
const node = ref.current;
|
|
24
|
+
if (!node) return;
|
|
25
|
+
const update = () => setBreakpoint(getBreakpoint(node.offsetWidth));
|
|
26
|
+
update();
|
|
27
|
+
const observer = new ResizeObserver(update);
|
|
28
|
+
observer.observe(node);
|
|
29
|
+
return () => observer.disconnect();
|
|
30
|
+
}, [ref]);
|
|
31
|
+
return breakpoint;
|
|
32
|
+
};
|
|
33
|
+
const Root = styled.div`
|
|
34
|
+
display: grid;
|
|
35
|
+
width: 100%;
|
|
36
|
+
grid-template-columns: repeat(12, minmax(0, 1fr));
|
|
37
|
+
box-sizing: border-box;
|
|
38
|
+
|
|
39
|
+
${({ $breakpoint }) => $breakpoint === "xs" && css`
|
|
40
|
+
min-width: ${GRID_BREAKPOINTS.sm - 1}px;
|
|
41
|
+
`}
|
|
42
|
+
|
|
43
|
+
${({ $breakpoint }) => $breakpoint === "xs" || $breakpoint === "sm" ? css`
|
|
44
|
+
gap: ${Spacing[3]};
|
|
45
|
+
padding-inline: ${Spacing[5]};
|
|
46
|
+
` : css`
|
|
47
|
+
gap: ${Spacing[4]};
|
|
48
|
+
padding-inline: ${Spacing[6]};
|
|
49
|
+
`}
|
|
50
|
+
|
|
51
|
+
// max-width equals the lg threshold; offsetWidth reads the clamped border-box width and getBreakpoint uses >=, so the clamp stays 'lg'
|
|
52
|
+
${({ $mode, $breakpoint }) => $mode === "fixed" && $breakpoint === "lg" && css`
|
|
53
|
+
max-width: ${GRID_BREAKPOINTS.lg}px;
|
|
54
|
+
margin-inline: auto;
|
|
55
|
+
`}
|
|
56
|
+
`;
|
|
57
|
+
/**
|
|
58
|
+
* Provides a 12-column CSS grid that measures its own width with a ResizeObserver for responsive
|
|
59
|
+
* horizontal margins and gutters. Vertical spacing is left to the consumer.
|
|
60
|
+
*
|
|
61
|
+
* The grid measures breakpoints against its own width rather than the viewport. Use `fixed` to
|
|
62
|
+
* center the grid at its large-screen maximum width, or `fluid` to keep it at 100% width.
|
|
63
|
+
*/
|
|
64
|
+
const Grid = ({ mode, children, ...rest }) => {
|
|
65
|
+
const ref = useRef(null);
|
|
66
|
+
const breakpoint = useMeasuredGridBreakpoint(ref);
|
|
67
|
+
return /* @__PURE__ */ jsx(GridBreakpointContext.Provider, {
|
|
68
|
+
value: breakpoint,
|
|
69
|
+
children: /* @__PURE__ */ jsx(Root, {
|
|
70
|
+
ref,
|
|
71
|
+
$mode: mode,
|
|
72
|
+
$breakpoint: breakpoint,
|
|
73
|
+
...rest,
|
|
74
|
+
children
|
|
75
|
+
})
|
|
76
|
+
});
|
|
77
|
+
};
|
|
78
|
+
//#endregion
|
|
79
|
+
//#region components/Grid/GridItem.tsx
|
|
80
|
+
const Item = styled.div`
|
|
81
|
+
grid-column: span ${({ $span }) => $span};
|
|
82
|
+
min-width: 0;
|
|
83
|
+
`;
|
|
84
|
+
const GridItem = ({ span, children, ...rest }) => /* @__PURE__ */ jsx(Item, {
|
|
85
|
+
$span: span,
|
|
86
|
+
...rest,
|
|
87
|
+
children
|
|
88
|
+
});
|
|
89
|
+
//#endregion
|
|
90
|
+
export { useGridBreakpoint as i, GRID_BREAKPOINTS as n, Grid as r, GridItem as t };
|
|
91
|
+
|
|
92
|
+
//# sourceMappingURL=Grid-DOyYYsvk.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Grid-DOyYYsvk.mjs","names":[],"sources":["../components/Grid/Grid.tsx","../components/Grid/GridItem.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n createContext,\n type ReactNode,\n type RefObject,\n useContext,\n useLayoutEffect,\n useRef,\n useState,\n} from 'react';\nimport styled, { css } from 'styled-components';\n\nimport { Spacing } from '@persona/design-tokens';\n\nexport const GRID_BREAKPOINTS = { sm: 768, md: 1024, lg: 1408 } as const;\n\ntype Breakpoint = 'xs' | 'sm' | 'md' | 'lg';\n\nconst GridBreakpointContext = createContext<Breakpoint>('md');\n\n/** Breakpoint of the nearest `Grid`, measured from that grid's width. */\nexport const useGridBreakpoint = (): Breakpoint => useContext(GridBreakpointContext);\n\nconst getBreakpoint = (width: number): Breakpoint => {\n if (width >= GRID_BREAKPOINTS.lg) {\n return 'lg';\n }\n if (width >= GRID_BREAKPOINTS.md) {\n return 'md';\n }\n if (width >= GRID_BREAKPOINTS.sm) {\n return 'sm';\n }\n return 'xs';\n};\n\nconst useMeasuredGridBreakpoint = (ref: RefObject<HTMLDivElement>) => {\n const [breakpoint, setBreakpoint] = useState<Breakpoint>('md');\n useLayoutEffect(() => {\n const node = ref.current;\n if (!node) {\n return;\n }\n const update = () => setBreakpoint(getBreakpoint(node.offsetWidth));\n update();\n const observer = new ResizeObserver(update);\n observer.observe(node);\n return () => observer.disconnect();\n }, [ref]);\n return breakpoint;\n};\n\nconst Root = styled.div<{ $mode: GridProps['mode']; $breakpoint: Breakpoint }>`\n display: grid;\n width: 100%;\n grid-template-columns: repeat(12, minmax(0, 1fr));\n box-sizing: border-box;\n\n ${({ $breakpoint }) =>\n $breakpoint === 'xs' &&\n css`\n min-width: ${GRID_BREAKPOINTS.sm - 1}px;\n `}\n\n ${({ $breakpoint }) =>\n $breakpoint === 'xs' || $breakpoint === 'sm'\n ? css`\n gap: ${Spacing[3]};\n padding-inline: ${Spacing[5]};\n `\n : css`\n gap: ${Spacing[4]};\n padding-inline: ${Spacing[6]};\n `}\n\n // max-width equals the lg threshold; offsetWidth reads the clamped border-box width and getBreakpoint uses >=, so the clamp stays 'lg'\n ${({ $mode, $breakpoint }) =>\n $mode === 'fixed' &&\n $breakpoint === 'lg' &&\n css`\n max-width: ${GRID_BREAKPOINTS.lg}px;\n margin-inline: auto;\n `}\n`;\n\nexport interface GridProps extends ComponentPropsWithoutRef<'div'> {\n /**\n * Selects the grid width behavior at the large breakpoint. `fixed` centers the grid at a\n * maximum width of 1408px, while `fluid` fills the available width.\n *\n * Breakpoints:\n * - ≤767px: 12 columns, 24px margins, 12px gutters, and a 767px minimum width.\n * - 768–1023px: 12 columns, 24px margins, 12px gutters, and 100% width.\n * - 1024–1407px: 12 columns, 32px margins, 16px gutters, and 100% width.\n * - ≥1408px: 12 columns, 32px margins, 16px gutters, and either fixed or fluid width.\n */\n mode: 'fixed' | 'fluid';\n children: ReactNode;\n}\n\n/**\n * Provides a 12-column CSS grid that measures its own width with a ResizeObserver for responsive\n * horizontal margins and gutters. Vertical spacing is left to the consumer.\n *\n * The grid measures breakpoints against its own width rather than the viewport. Use `fixed` to\n * center the grid at its large-screen maximum width, or `fluid` to keep it at 100% width.\n */\nexport const Grid = ({ mode, children, ...rest }: GridProps) => {\n const ref = useRef<HTMLDivElement>(null);\n const breakpoint = useMeasuredGridBreakpoint(ref);\n return (\n <GridBreakpointContext.Provider value={breakpoint}>\n <Root ref={ref} $mode={mode} $breakpoint={breakpoint} {...rest}>\n {children}\n </Root>\n </GridBreakpointContext.Provider>\n );\n};\n\nexport default Grid;\n","import type { ComponentPropsWithoutRef, ReactNode } from 'react';\nimport styled from 'styled-components';\n\nexport type GridSpan = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;\n\nexport interface GridItemProps extends ComponentPropsWithoutRef<'div'> {\n span: GridSpan;\n children: ReactNode;\n}\n\nconst Item = styled.div<{ $span: GridSpan }>`\n grid-column: span ${({ $span }) => $span};\n min-width: 0;\n`;\n\nexport const GridItem = ({ span, children, ...rest }: GridItemProps) => (\n <Item $span={span} {...rest}>\n {children}\n </Item>\n);\n\nexport default GridItem;\n"],"mappings":";;;;;AAcA,MAAa,mBAAmB;CAAE,IAAI;CAAK,IAAI;CAAM,IAAI;CAAM;AAI/D,MAAM,wBAAwB,cAA0B,KAAK;;AAG7D,MAAa,0BAAsC,WAAW,sBAAsB;AAEpF,MAAM,iBAAiB,UAA8B;AACnD,KAAI,SAAS,iBAAiB,GAC5B,QAAO;AAET,KAAI,SAAS,iBAAiB,GAC5B,QAAO;AAET,KAAI,SAAS,iBAAiB,GAC5B,QAAO;AAET,QAAO;;AAGT,MAAM,6BAA6B,QAAmC;CACpE,MAAM,CAAC,YAAY,iBAAiB,SAAqB,KAAK;AAC9D,uBAAsB;EACpB,MAAM,OAAO,IAAI;AACjB,MAAI,CAAC,KACH;EAEF,MAAM,eAAe,cAAc,cAAc,KAAK,YAAY,CAAC;AACnE,UAAQ;EACR,MAAM,WAAW,IAAI,eAAe,OAAO;AAC3C,WAAS,QAAQ,KAAK;AACtB,eAAa,SAAS,YAAY;IACjC,CAAC,IAAI,CAAC;AACT,QAAO;;AAGT,MAAM,OAAO,OAAO,GAA0D;;;;;;KAMzE,EAAE,kBACH,gBAAgB,QAChB,GAAG;mBACY,iBAAiB,KAAK,EAAE;MACrC;;KAED,EAAE,kBACH,gBAAgB,QAAQ,gBAAgB,OACpC,GAAG;iBACM,QAAQ,GAAG;4BACA,QAAQ,GAAG;YAE/B,GAAG;iBACM,QAAQ,GAAG;4BACA,QAAQ,GAAG;UAC7B;;;KAGL,EAAE,OAAO,kBACV,UAAU,WACV,gBAAgB,QAChB,GAAG;mBACY,iBAAiB,GAAG;;MAEjC;;;;;;;;;AAyBN,MAAa,QAAQ,EAAE,MAAM,UAAU,GAAG,WAAsB;CAC9D,MAAM,MAAM,OAAuB,KAAK;CACxC,MAAM,aAAa,0BAA0B,IAAI;AACjD,QACE,oBAAC,sBAAsB,UAAvB;EAAgC,OAAO;YACrC,oBAAC,MAAD;GAAW;GAAK,OAAO;GAAM,aAAa;GAAY,GAAI;GACvD;GACI,CAAA;EACwB,CAAA;;;;ACzGrC,MAAM,OAAO,OAAO,GAAwB;uBACrB,EAAE,YAAY,MAAM;;;AAI3C,MAAa,YAAY,EAAE,MAAM,UAAU,GAAG,WAC5C,oBAAC,MAAD;CAAM,OAAO;CAAM,GAAI;CACpB;CACI,CAAA"}
|
package/dist/Grid.d.mts
CHANGED
|
@@ -7,6 +7,9 @@ declare const GRID_BREAKPOINTS: {
|
|
|
7
7
|
readonly md: 1024;
|
|
8
8
|
readonly lg: 1408;
|
|
9
9
|
};
|
|
10
|
+
type Breakpoint = 'xs' | 'sm' | 'md' | 'lg';
|
|
11
|
+
/** Breakpoint of the nearest `Grid`, measured from that grid's width. */
|
|
12
|
+
declare const useGridBreakpoint: () => Breakpoint;
|
|
10
13
|
interface GridProps extends ComponentPropsWithoutRef<'div'> {
|
|
11
14
|
/**
|
|
12
15
|
* Selects the grid width behavior at the large breakpoint. `fixed` centers the grid at a
|
|
@@ -34,5 +37,5 @@ declare const Grid: ({
|
|
|
34
37
|
...rest
|
|
35
38
|
}: GridProps) => _$react_jsx_runtime0.JSX.Element;
|
|
36
39
|
//#endregion
|
|
37
|
-
export { GRID_BREAKPOINTS, Grid, Grid as default, GridProps };
|
|
40
|
+
export { GRID_BREAKPOINTS, Grid, Grid as default, GridProps, useGridBreakpoint };
|
|
38
41
|
//# sourceMappingURL=Grid.d.mts.map
|
|
@@ -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-BqEKkEp5.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-BqEKkEp5.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-x1pFf-Mj.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-mOVSuEB8.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-mOVSuEB8.mjs";
|
|
2
2
|
export { HelperTooltipProps, HelperTooltip as default };
|
|
@@ -5,7 +5,7 @@ import { t as useToggle } from "./useToggle-DUHQjohK.mjs";
|
|
|
5
5
|
import { fadeIn } from "./variables/keyframes.mjs";
|
|
6
6
|
import "./variables/transitions.mjs";
|
|
7
7
|
import { n as Button } from "./IconButton-CqTPMhjV.mjs";
|
|
8
|
-
import { s as Popover_default } from "./Popover-
|
|
8
|
+
import { s as Popover_default } from "./Popover-opVa9Xhc.mjs";
|
|
9
9
|
import { Spacing } from "@persona/design-tokens";
|
|
10
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
11
|
import { CopyIcon } from "@persona/icons";
|
|
@@ -111,4 +111,4 @@ const HoverCopyableField = ({ copyValue, confirmationText = "Copied", onCopySucc
|
|
|
111
111
|
//#endregion
|
|
112
112
|
export { HoverCopyableField as t };
|
|
113
113
|
|
|
114
|
-
//# sourceMappingURL=HoverCopyableField-
|
|
114
|
+
//# sourceMappingURL=HoverCopyableField-CN3gl0ny.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HoverCopyableField-
|
|
1
|
+
{"version":3,"file":"HoverCopyableField-CN3gl0ny.mjs","names":["Card","Popover"],"sources":["../components/HoverCopyableField/HoverCopyableField.tsx"],"sourcesContent":["import type { MouseEvent, ReactNode } from 'react';\nimport styled from 'styled-components';\n\nimport { Spacing } from '@persona/design-tokens';\nimport { CopyIcon } from '@persona/icons';\nimport Button from 'design-system/components/Button';\nimport Card from 'design-system/components/Card';\nimport Popover from 'design-system/components/Popover';\nimport { Paragraph } from 'design-system/components/Text';\nimport useToggle from 'design-system/lib/useToggle';\nimport { fadeIn } from 'design-system/variables/keyframes';\nimport { TransitionDuration } from 'design-system/variables/transitions';\n\nexport type CopySuccessDetail = {\n text: string;\n clientX: number;\n clientY: number;\n};\n\nexport type HoverCopyableFieldProps = {\n copyValue: string | undefined;\n confirmationText?: string;\n /**\n * Called after a successful clipboard write. When provided, the Copied\n * popover is skipped so the host can own post-copy UX.\n */\n onCopySuccess?: (detail: CopySuccessDetail) => void;\n children: ReactNode;\n};\n\nconst copyToClipboard = async (text: string): Promise<boolean> => {\n try {\n if ('clipboard' in navigator) {\n await navigator.clipboard.writeText(text);\n return true;\n } else {\n return document.execCommand('copy', true, text);\n }\n } catch {\n return false;\n }\n};\n\nconst clickOrigin = (e: MouseEvent<HTMLButtonElement>): { clientX: number; clientY: number } => {\n const rect = e.currentTarget.getBoundingClientRect();\n const hasPointer = e.clientX !== 0 || e.clientY !== 0;\n return {\n clientX: hasPointer ? e.clientX : rect.left + rect.width / 2,\n clientY: rect.top,\n };\n};\n\nconst CopyableFieldContainer = styled.div`\n display: flex;\n gap: ${Spacing[1]};\n align-items: center;\n`;\n\nconst CopyButton = styled(Button).attrs(() => ({\n type: 'button',\n variant: 'inverse',\n width: 'icon',\n}))<{ isActive: boolean }>`\n height: ${Spacing[5]};\n width: ${Spacing[5]};\n visibility: ${({ isActive }) => (isActive ? 'visible' : 'hidden')};\n animation: ${fadeIn} ${TransitionDuration.Medium} ease-in-out;\n svg {\n width: 14px;\n height: 14px;\n }\n`;\n\nconst StyledCard = styled(Card)`\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 4px;\n animation: ${fadeIn} ${TransitionDuration.Medium} ease-in-out;\n padding: 6px;\n margin: 0;\n`;\n\nconst HoverCopyableField = ({\n copyValue,\n confirmationText = 'Copied',\n onCopySuccess,\n children,\n}: HoverCopyableFieldProps) => {\n const [copyButtonActive, { enable: showCopyButton, disable: hideCopyButton }] = useToggle(false);\n const [confirmationActive, { enable: showConfirmation, disable: hideConfirmation }] =\n useToggle(false);\n\n const copyTextToClipboard = async (origin: { clientX: number; clientY: number }) => {\n if (copyValue == null) {\n return;\n }\n const copyWasSuccessful = await copyToClipboard(copyValue);\n if (!copyWasSuccessful) {\n return;\n }\n if (onCopySuccess) {\n onCopySuccess({ text: copyValue, ...origin });\n hideCopyButton();\n return;\n }\n showConfirmation();\n setTimeout(() => {\n hideCopyButton();\n hideConfirmation();\n }, 1200);\n };\n\n const copyField = (e: MouseEvent<HTMLButtonElement>) => {\n e.preventDefault();\n e.stopPropagation();\n void copyTextToClipboard(clickOrigin(e));\n };\n\n return copyValue != null && copyValue.trim().length > 0 ? (\n <CopyableFieldContainer onMouseEnter={showCopyButton} onMouseLeave={hideCopyButton}>\n {children}\n <Popover open={confirmationActive}>\n <Popover.Anchor asChild>\n <CopyButton\n id='hover-copyable-field__copy-button'\n isActive={copyButtonActive || confirmationActive}\n onClick={copyField}\n >\n <CopyIcon width={16} height={16} />\n </CopyButton>\n </Popover.Anchor>\n <Popover.Content side='top' align='center' style={{ zIndex: 2 }}>\n <StyledCard elevated>\n <Paragraph>{confirmationText}</Paragraph>\n </StyledCard>\n </Popover.Content>\n </Popover>\n </CopyableFieldContainer>\n ) : null;\n};\n\nexport default HoverCopyableField;\n"],"mappings":";;;;;;;;;;;;AA8BA,MAAM,kBAAkB,OAAO,SAAmC;AAChE,KAAI;AACF,MAAI,eAAe,WAAW;AAC5B,SAAM,UAAU,UAAU,UAAU,KAAK;AACzC,UAAO;QAEP,QAAO,SAAS,YAAY,QAAQ,MAAM,KAAK;SAE3C;AACN,SAAO;;;AAIX,MAAM,eAAe,MAA2E;CAC9F,MAAM,OAAO,EAAE,cAAc,uBAAuB;AAEpD,QAAO;EACL,SAFiB,EAAE,YAAY,KAAK,EAAE,YAAY,IAE5B,EAAE,UAAU,KAAK,OAAO,KAAK,QAAQ;EAC3D,SAAS,KAAK;EACf;;AAGH,MAAM,yBAAyB,OAAO,GAAG;;SAEhC,QAAQ,GAAG;;;AAIpB,MAAM,aAAa,OAAO,OAAO,CAAC,aAAa;CAC7C,MAAM;CACN,SAAS;CACT,OAAO;CACR,EAAE;YACS,QAAQ,GAAG;WACZ,QAAQ,GAAG;iBACL,EAAE,eAAgB,WAAW,YAAY,SAAU;eACrD,OAAO,GAAA,QAA6B;;;;;;AAOnD,MAAM,aAAa,OAAOA,aAAK;;;;;eAKhB,OAAO,GAAA,QAA6B;;;;AAKnD,MAAM,sBAAsB,EAC1B,WACA,mBAAmB,UACnB,eACA,eAC6B;CAC7B,MAAM,CAAC,kBAAkB,EAAE,QAAQ,gBAAgB,SAAS,oBAAoB,UAAU,MAAM;CAChG,MAAM,CAAC,oBAAoB,EAAE,QAAQ,kBAAkB,SAAS,sBAC9D,UAAU,MAAM;CAElB,MAAM,sBAAsB,OAAO,WAAiD;AAClF,MAAI,aAAa,KACf;AAGF,MAAI,CAAC,MAD2B,gBAAgB,UAAU,CAExD;AAEF,MAAI,eAAe;AACjB,iBAAc;IAAE,MAAM;IAAW,GAAG;IAAQ,CAAC;AAC7C,mBAAgB;AAChB;;AAEF,oBAAkB;AAClB,mBAAiB;AACf,mBAAgB;AAChB,qBAAkB;KACjB,KAAK;;CAGV,MAAM,aAAa,MAAqC;AACtD,IAAE,gBAAgB;AAClB,IAAE,iBAAiB;AACd,sBAAoB,YAAY,EAAE,CAAC;;AAG1C,QAAO,aAAa,QAAQ,UAAU,MAAM,CAAC,SAAS,IACpD,qBAAC,wBAAD;EAAwB,cAAc;EAAgB,cAAc;YAApE,CACG,UACD,qBAACC,iBAAD;GAAS,MAAM;aAAf,CACE,oBAACA,gBAAQ,QAAT;IAAgB,SAAA;cACd,oBAAC,YAAD;KACE,IAAG;KACH,UAAU,oBAAoB;KAC9B,SAAS;eAET,oBAAC,UAAD;MAAU,OAAO;MAAI,QAAQ;MAAM,CAAA;KACxB,CAAA;IACE,CAAA,EACjB,oBAACA,gBAAQ,SAAT;IAAiB,MAAK;IAAM,OAAM;IAAS,OAAO,EAAE,QAAQ,GAAG;cAC7D,oBAAC,YAAD;KAAY,UAAA;eACV,oBAAC,WAAD,EAAA,UAAY,kBAA6B,CAAA;KAC9B,CAAA;IACG,CAAA,CACV;KACa;MACvB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as ButtonProps } from "./Button-
|
|
1
|
+
import { r as ButtonProps } from "./Button-Dhiund3f.mjs";
|
|
2
2
|
import * as _$react from "react";
|
|
3
3
|
|
|
4
4
|
//#region components/Button/IconButton.d.ts
|
|
@@ -21,4 +21,4 @@ interface IconButtonProps extends Omit<ButtonProps, 'width' | 'prefixIcon' | 'pr
|
|
|
21
21
|
declare const IconButton: _$react.ForwardRefExoticComponent<Omit<IconButtonProps, "ref"> & _$react.RefAttributes<HTMLButtonElement>>;
|
|
22
22
|
//#endregion
|
|
23
23
|
export { IconButtonProps as n, IconButton as t };
|
|
24
|
-
//# sourceMappingURL=IconButton-
|
|
24
|
+
//# sourceMappingURL=IconButton-CjPFhpVG.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconButton-CqTPMhjV.mjs","names":["noop"],"sources":["../components/Button/palette.ts","../components/Button/Button.tsx","../components/Button/IconButton.tsx"],"sourcesContent":["import type { Color } from '@persona/design-tokens';\nimport { type PdsColor, transparent, withAlpha } from 'design-system/lib/color';\nimport { semanticTokens } from 'design-system/lib/semanticColor';\nimport type { PersonaTheme } from 'design-system/theme';\nimport type { SemanticTokens } from 'design-system/variables/semantic';\n\nexport type ButtonVariant = 'basic' | 'primary' | 'inverse' | 'danger' | 'text' | 'outline';\n\nexport interface ButtonPalette {\n default: PdsColor;\n hover: Color;\n active: Color;\n disabled: PdsColor;\n text: Color;\n textDisabled: PdsColor;\n /** Set only under semantic theming; legacy leaves disabled icon colour to the stroke rules. */\n iconDisabled?: PdsColor;\n highlightDark: Color;\n}\n\nconst buildSemanticPalettes = (tokens: SemanticTokens): Record<ButtonVariant, ButtonPalette> => {\n const neutral = {\n hover: tokens.ActionNeutralHover,\n active: tokens.ActionNeutralActive,\n text: tokens.FgPrimary,\n textDisabled: tokens.FgDisabled,\n iconDisabled: tokens.FgDisabled,\n highlightDark: tokens.FgDisabled,\n };\n return {\n basic: {\n ...neutral,\n default: tokens.ActionNeutral,\n disabled: withAlpha(tokens.ActionNeutral, tokens.Opacity65),\n },\n text: { ...neutral, default: transparent, disabled: transparent },\n outline: {\n ...neutral,\n default: transparent,\n hover: tokens.ActionOutlineHover,\n active: tokens.ActionOutlineActive,\n disabled: transparent,\n },\n primary: {\n default: tokens.ActionPrimary,\n hover: tokens.ActionPrimaryHover,\n active: tokens.ActionPrimaryActive,\n disabled: tokens.ActionPrimary,\n text: tokens.FgInverse,\n textDisabled: tokens.FgInverse,\n iconDisabled: tokens.FgInverse,\n highlightDark: tokens.FgInverse,\n },\n danger: {\n default: tokens.ActionDanger,\n hover: tokens.ActionDangerHover,\n active: tokens.ActionDangerActive,\n disabled: tokens.ActionDanger,\n text: tokens.FgInverse,\n textDisabled: tokens.FgInverse,\n iconDisabled: tokens.FgInverse,\n highlightDark: tokens.FgInverse,\n },\n inverse: {\n default: tokens.ActionInverse,\n hover: tokens.ActionInverseHover,\n active: tokens.ActionInverseActive,\n disabled: withAlpha(tokens.ActionInverse, tokens.Opacity65),\n text: tokens.FgPrimaryStatic,\n textDisabled: withAlpha(tokens.FgPrimaryStatic, tokens.Opacity65),\n iconDisabled: withAlpha(tokens.FgPrimaryStatic, tokens.Opacity65),\n highlightDark: tokens.ActionNeutralActive,\n },\n };\n};\n\nconst semanticPaletteCache = new WeakMap<SemanticTokens, Record<ButtonVariant, ButtonPalette>>();\n\nconst semanticPalettes = (tokens: SemanticTokens): Record<ButtonVariant, ButtonPalette> => {\n let palettes = semanticPaletteCache.get(tokens);\n if (!palettes) {\n palettes = buildSemanticPalettes(tokens);\n semanticPaletteCache.set(tokens, palettes);\n }\n return palettes;\n};\n\nexport const buttonPalette = (theme: PersonaTheme, variant: ButtonVariant): ButtonPalette => {\n const tokens = semanticTokens(theme);\n return tokens ? semanticPalettes(tokens)[variant] : theme.color.variants[variant];\n};\n","import { isEmpty, isFunction } from 'lodash-es';\nimport {\n type ComponentPropsWithoutRef,\n forwardRef,\n type HTMLAttributeAnchorTarget,\n type MouseEvent,\n type ReactNode,\n type Ref,\n useCallback,\n} from 'react';\nimport styled, {\n css,\n type DefaultTheme,\n type FlattenInterpolation,\n type ThemeProps,\n} from 'styled-components';\n\nimport { Color, Spacing } from '@persona/design-tokens';\nimport { LoaderIcon } from '@persona/icons';\nimport { opacityOf, withAlpha } from 'design-system/lib/color';\nimport { isDisabled, isHovered, isNotDisabled } from 'design-system/lib/pseudoClass';\nimport { RouterLink, type To } from 'design-system/lib/router';\nimport { semanticColor, semanticOnly, semanticTokens } from 'design-system/lib/semanticColor';\nimport useToggle from 'design-system/lib/useToggle';\nimport { focusOutlineControlled } from 'design-system/mixins/focus';\nimport { printMixins } from 'design-system/mixins/print';\nimport { paragraphMixins } from 'design-system/mixins/text';\nimport type PseudoClassProps from 'design-system/types/PseudoClassProps';\nimport { rotate } from 'design-system/variables/keyframes';\nimport { TransitionDuration } from 'design-system/variables/transitions';\n\nimport { type ButtonVariant, buttonPalette } from './palette';\n\nconst noop = (): void => undefined;\n\n// TODO(joseph): Bring this fix back to pseudoClass\nconst isActive = ({ active }: PseudoClassProps) => (active ? '' : ':active:enabled');\n\n/* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\nconst sizeStyles: Record<ButtonProps['size'], FlattenInterpolation<ThemeProps<DefaultTheme>>> = {\n md: css`\n ${paragraphMixins.md}\n height: ${({ theme }) => theme.button.height.md};\n padding: ${Spacing[2]};\n svg {\n height: 16px;\n width: 16px;\n }\n `,\n sm: css`\n ${paragraphMixins.sm}\n height: ${({ theme }) => theme.button.height.sm};\n padding: ${Spacing[1]} 6px;\n svg {\n height: 16px;\n width: 16px;\n }\n `,\n};\n\n/* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\nconst widthStyles: Record<ButtonProps['width'], FlattenInterpolation<ThemeProps<DefaultTheme>>> = {\n full: css`\n width: 100%;\n `,\n auto: css`\n width: auto;\n `,\n // TODO: rename this prop to 'element' as a standard unresponsive element width\n button: css`\n width: ${({ theme }) => theme.element.width.md};\n `,\n icon: css<ButtonProps>`\n width: ${({ theme, size }) => {\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n return theme.button.height[size];\n }};\n padding: 0;\n flex: none;\n `,\n};\n\ninterface ButtonPropsWithTransientProps extends Omit<ButtonProps, 'isPending'> {\n $isPending: boolean;\n $onSecondaryBackground?: boolean;\n}\n\nexport const StyledButton = styled.button.attrs<ButtonPropsWithTransientProps>(({ to, target }) => {\n if (isEmpty(to)) {\n return 'button';\n } else if (typeof to === 'string' && to.startsWith('https://')) {\n return {\n as: 'a',\n href: to,\n target: target ?? '_blank',\n rel: 'noreferrer',\n };\n } else {\n return {\n as: RouterLink,\n };\n }\n})<ButtonPropsWithTransientProps>`\n cursor: pointer;\n border: none;\n box-sizing: border-box;\n white-space: nowrap;\n ${({ theme, variant = 'primary' }) => {\n const palette = buttonPalette(theme, variant);\n const tokens = semanticTokens(theme);\n return css`\n &:disabled {\n background-color: ${palette.disabled};\n color: ${palette.textDisabled};\n ${\n tokens &&\n (variant === 'primary' || variant === 'danger') &&\n css`\n opacity: ${opacityOf(tokens.Opacity65)};\n `\n }\n ${\n palette.iconDisabled &&\n css`\n svg {\n color: ${palette.iconDisabled};\n }\n `\n }\n svg path {\n stroke: ${palette.iconDisabled ?? palette.textDisabled};\n }\n\n /* For backwards compatibility with current coloring scheme (targeting stroke property) */\n svg.pds-icon {\n path {\n stroke: unset;\n }\n\n /* Support icons with stroke */\n path[stroke] {\n stroke: currentColor;\n }\n }\n\n user-select: none;\n }\n `;\n }}\n\n ${({ theme, variant }) =>\n variant === 'outline' &&\n css`\n border: 1px solid ${semanticColor(theme, 'BorderDefault', theme.color.border.input)};\n `}\n\n display: flex;\n align-items: center;\n justify-content: center;\n\n /* To properly position loading spinner */\n position: relative;\n\n border-radius: ${({ theme }) => theme.button.borderRadius};\n\n transition-duration: ${TransitionDuration.Fast};\n transition-property: background-color, color, border-color, width, height;\n\n ${({ size }) => {\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n return sizeStyles[size];\n }}\n ${({ width }) => {\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n return widthStyles[width];\n }}\n\n /* Variant styling */\n ${({ theme, variant = 'primary', $isPending, $onSecondaryBackground }) => {\n let palette = buttonPalette(theme, variant);\n\n if (variant === 'basic' && $onSecondaryBackground) {\n const tokens = semanticTokens(theme);\n palette = tokens\n ? {\n ...palette,\n default: tokens.ActionNeutralHover,\n hover: tokens.ActionNeutralActive,\n active: tokens.ActionNeutralActive,\n disabled: withAlpha(tokens.ActionNeutralHover, tokens.Opacity65),\n }\n : {\n ...palette,\n default: Color.CoreSlate300,\n hover: Color.CoreSlate400,\n active: Color.CoreSlate400,\n disabled: Color.CoreSlate100,\n };\n }\n\n return css`\n background-color: ${palette.default};\n color: ${palette.text};\n svg path {\n stroke: ${palette.text};\n }\n\n svg.pds-icon {\n path {\n stroke: unset;\n }\n\n path[stroke] {\n stroke: currentColor;\n }\n }\n\n &${isHovered}${isNotDisabled} {\n background-color: ${palette.hover};\n }\n\n &${isDisabled} {\n cursor: not-allowed;\n }\n\n &${isActive} {\n background-color: ${palette.active};\n }\n\n ${focusOutlineControlled}\n\n ${\n $isPending &&\n css`\n cursor: default;\n background-color: ${palette.active};\n &:disabled {\n background-color: ${buttonPalette(theme, variant).active};\n user-select: none;\n ${semanticOnly(() => 'opacity: 1;')}\n }\n\n svg path {\n stroke: ${palette.highlightDark};\n }\n\n // For backwards compatibility with current coloring scheme (targeting stroke property)\n svg.pds-icon {\n path {\n stroke: unset;\n }\n\n path[stroke] {\n stroke: currentColor;\n }\n }\n `\n }\n `;\n }}\n\n\n ${printMixins.hide}\n`;\n\ntype WithPendingProps = Pick<ButtonProps, 'isPending'>;\n\nconst LoaderContainer = styled.div<WithPendingProps>`\n position: absolute;\n height: 100%;\n width: 100%;\n top: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: opacity 2s;\n opacity: ${({ isPending }) => (isPending ? '1' : '0')};\n`;\n\nconst Loader = styled(LoaderIcon)`\n animation: ${rotate} linear 1s infinite;\n`;\n\nexport const ButtonChildren = styled('div').attrs(({ isPending }: WithPendingProps) => ({\n ['aria-hidden']: isPending,\n}))<WithPendingProps>`\n width: 100%;\n display: flex;\n flex-wrap: nowrap;\n align-items: center;\n justify-content: center;\n transition: opacity ${TransitionDuration.Fast};\n opacity: ${({ isPending }) => (isPending ? '0' : '1')};\n gap: ${Spacing[1]};\n`;\n\nconst PrefixIconContainer = styled.div`\n display: flex;\n align-items: center;\n`;\n\nconst InheritPrefixIconContainer = styled.div`\n display: flex;\n align-items: center;\n\n & svg {\n width: inherit;\n height: inherit;\n }\n`;\n\nexport const SuffixIconContainer = styled(PrefixIconContainer)`\n margin-right: 0;\n flex-grow: 1;\n justify-content: flex-end;\n`;\n\nconst ButtonText = styled.span<{ size: 'md' | 'sm'; width: 'full' | 'auto' | 'button' | 'icon' }>`\n position: relative;\n\n /* Needed to align for browsers that don't support text-box yet\n (which at this time, is firefox, and opera, and a few niche browsers)\n This checks firefox. Otherwise, it will default back to the original\n which is a slightly misaligned button\n */\n\n /* Was trying to use this with @supports not, but genuinely could not figure out why this wouldn't\n work */\n\n line-height: ${({ width }) => (width === 'icon' ? '0' : 'inherit')};\n @-moz-document url-prefix() {\n top: ${({ size }) => (size === 'md' ? '1px' : '0.5px')};\n }\n\n @supports (text-box: cap alphabetic) {\n text-box: ${({ width }) => (width === 'icon' ? 'normal' : 'cap alphabetic')};\n }\n`;\n\ntype MaybePromise =\n | ((e: MouseEvent<HTMLButtonElement>) => void)\n | ((e: MouseEvent<HTMLButtonElement>) => Promise<void>);\n\nexport interface ButtonProps\n extends ComponentPropsWithoutRef<'button'>, Omit<PseudoClassProps, 'checked'> {\n /**\n * Visual style of the button.\n *\n * - `primary` – filled brand colour, for the primary action on a surface.\n * - `basic` – subtle grey fill, for secondary actions.\n * - `outline` – transparent with a border, alternative secondary style.\n * - `text` – no background or border, for tertiary / inline actions.\n * - `inverse` – inverted fill for use on dark/coloured backgrounds.\n * - `danger` – red fill, for destructive actions.\n *\n * @defaultValue 'primary'\n */\n variant?: ButtonVariant;\n /**\n * Shows a loading spinner and disables the button. Also triggers automatically\n * when `onClick` returns a Promise, clearing once the promise settles.\n */\n isPending?: boolean;\n /**\n * Icon rendered to the left of the button label.\n * Import from `@persona/icons`.\n */\n prefixIcon?: ReactNode;\n /**\n * Controls how the prefix icon inherits sizing.\n *\n * - `basic` – icon is rendered inside a fixed-size container.\n * - `inherit` – icon stretches to fill the surrounding element's dimensions.\n *\n * @defaultValue 'basic'\n */\n prefixIconType?: 'basic' | 'inherit';\n\n /**\n * Icon rendered to the right of the button label.\n * Import from `@persona/icons`.\n */\n suffixIcon?: ReactNode;\n\n /**\n * Height and typography scale of the button.\n *\n * @defaultValue 'md'\n */\n size?: 'md' | 'sm';\n\n /**\n * Changes the button into a link.\n * A relative path renders a router-aware link (PDS `RouterProvider` adapter,\n * react-router when present, otherwise a plain `<a>`); an absolute `https://`\n * URL renders an `<a>` that opens in a new tab.\n */\n to?: To;\n\n /**\n * Overrides the target of the link if `to` is provided and is an external link.\n */\n target?: HTMLAttributeAnchorTarget;\n\n /**\n * History state attached to the navigation when `to` is an internal link.\n */\n state?: unknown;\n\n /**\n * Replaces the current history entry instead of pushing, when `to` is an internal link.\n */\n replace?: boolean;\n\n /**\n * Note: we may want to default this to 'button' in the future, but many instances of this Button component\n * in dashboard currently rely on the default 'submit' behavior that occurs when using this in redux-form\n * so we'll have to comb through and manually add the type='submit' prop.\n */\n type?: 'button' | 'reset' | 'submit';\n /**\n * Controls the width of the button.\n *\n * - `full` – stretches to fill its container (`width: 100%`).\n * - `auto` – shrinks to fit its content.\n * - `button` – a fixed medium element width (from design tokens).\n * - `icon` – square, sized to match the button height; use for icon-only buttons.\n *\n * @defaultValue 'full'\n */\n width?: 'full' | 'auto' | 'button' | 'icon';\n onClick?: MaybePromise;\n ref?: Ref<HTMLButtonElement>;\n\n /**\n * In some cases we render a button on a secondary background, which needs an adjustment\n * for certain variants.\n */\n onSecondaryBackground?: boolean;\n}\n\nconst Button = forwardRef<HTMLButtonElement, ButtonProps>(function Button(\n {\n id,\n children,\n prefixIcon,\n suffixIcon,\n disabled,\n isPending,\n type = 'button',\n prefixIconType = 'basic',\n variant = 'primary',\n size = 'md',\n width = 'full',\n onClick,\n onSecondaryBackground,\n to,\n target,\n state,\n replace,\n ...props\n }: ButtonProps,\n ref,\n) {\n const [isResolving, { enable, disable }] = useToggle(false);\n const innerOnClick: MaybePromise = isFunction(onClick) ? onClick : noop;\n const loading = isPending || isResolving;\n const isInternalLink =\n !isEmpty(to) && !(typeof to === 'string' && to.startsWith('https://'));\n\n const handleClick = useCallback(\n async (e: MouseEvent<HTMLButtonElement>) => {\n if (loading) {\n return;\n }\n\n const maybePromise = innerOnClick(e);\n\n if (maybePromise instanceof Promise) {\n enable();\n await maybePromise;\n disable();\n }\n },\n [loading, innerOnClick],\n );\n\n return (\n <StyledButton\n id={id}\n type={type}\n data-test={'button__' + variant}\n variant={variant}\n size={size}\n width={width}\n disabled={disabled || loading}\n $isPending={loading}\n $onSecondaryBackground={onSecondaryBackground}\n to={to}\n target={target}\n {...(isInternalLink ? { state, replace } : {})}\n {...props}\n onClick={handleClick}\n ref={ref}\n >\n {loading && (\n <LoaderContainer isPending={loading}>\n <Loader aria-label={`Loading ${props['aria-label'] || ''}`} />\n </LoaderContainer>\n )}\n <ButtonChildren isPending={loading}>\n {prefixIcon != null && (\n <>\n {prefixIconType === 'basic' && <PrefixIconContainer>{prefixIcon}</PrefixIconContainer>}\n {prefixIconType === 'inherit' && (\n <InheritPrefixIconContainer>{prefixIcon}</InheritPrefixIconContainer>\n )}\n </>\n )}\n {children && (\n <ButtonText width={width} size={size}>\n {children}\n </ButtonText>\n )}\n {suffixIcon != null && <SuffixIconContainer>{suffixIcon}</SuffixIconContainer>}\n </ButtonChildren>\n </StyledButton>\n );\n});\n\nexport default Button;\n","import { forwardRef } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport { BorderRadius } from '@persona/design-tokens';\nimport { semanticOnly } from 'design-system/lib/semanticColor';\n\nimport Button, { type ButtonProps } from './Button';\n\nconst BUTTON_SIZE_MAP = {\n xs: '16px',\n sm: '24px',\n md: '32px',\n};\n\nconst ICON_SIZE_MAP = {\n xs: '12px',\n sm: '16px',\n md: '16px',\n};\n\ntype IconBtnSize = keyof typeof BUTTON_SIZE_MAP;\n\nconst IconBtn = styled(Button).attrs({\n width: 'icon',\n variant: 'basic',\n})`\n background-color: transparent;\n padding: 0;\n border-radius: ${BorderRadius.Md};\n\n ${semanticOnly(\n () => css`\n &:disabled {\n background-color: transparent;\n }\n `,\n )}\n\n ${({ size }) => css`\n height: ${BUTTON_SIZE_MAP[size as IconBtnSize]};\n width: ${BUTTON_SIZE_MAP[size as IconBtnSize]};\n\n svg {\n width: ${ICON_SIZE_MAP[size as IconBtnSize]};\n height: ${ICON_SIZE_MAP[size as IconBtnSize]};\n }\n `}\n`;\n\nexport interface IconButtonProps extends Omit<\n ButtonProps,\n 'width' | 'prefixIcon' | 'prefixIconType' | 'suffixIcon' | 'variant' | 'size'\n> {\n /**\n * `xs` - 16px. `sm` - 24px. `md` - 32px.\n * Pair with a PDS icon in the prescribed size.\n */\n size?: IconBtnSize;\n}\n\n/**\n * Use to render icon-only buttons. Ensure buttons have proper aria properties.\n */\nconst IconButton = forwardRef<HTMLButtonElement, IconButtonProps>(function IconButton(\n { size = 'xs', ...props },\n ref,\n) {\n return <IconBtn size={size as ButtonProps['size']} ref={ref} {...props} />;\n});\n\nexport default IconButton;\n"],"mappings":";;;;;;;;;;;;;;;;;AAoBA,MAAM,yBAAyB,WAAiE;CAC9F,MAAM,UAAU;EACd,OAAO,OAAO;EACd,QAAQ,OAAO;EACf,MAAM,OAAO;EACb,cAAc,OAAO;EACrB,cAAc,OAAO;EACrB,eAAe,OAAO;EACvB;AACD,QAAO;EACL,OAAO;GACL,GAAG;GACH,SAAS,OAAO;GAChB,UAAU,UAAU,OAAO,eAAe,OAAO,UAAU;GAC5D;EACD,MAAM;GAAE,GAAG;GAAS,SAAS;GAAa,UAAU;GAAa;EACjE,SAAS;GACP,GAAG;GACH,SAAS;GACT,OAAO,OAAO;GACd,QAAQ,OAAO;GACf,UAAU;GACX;EACD,SAAS;GACP,SAAS,OAAO;GAChB,OAAO,OAAO;GACd,QAAQ,OAAO;GACf,UAAU,OAAO;GACjB,MAAM,OAAO;GACb,cAAc,OAAO;GACrB,cAAc,OAAO;GACrB,eAAe,OAAO;GACvB;EAC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BAGiB,aAAa,GAAG;;IAE/B,mBACM,GAAG;;;;MAKV,CAAC;;KAEC,EAAE,WAAW,GAAG;cACP,gBAAgB,MAAqB;aACtC,gBAAgB,MAAqB;;;eAGnC,cAAc,MAAqB;gBAClC,cAAc,MAAqB;;IAE/C;;;;;AAiBJ,MAAM,aAAa,WAA+C,SAAS,WACzE,EAAE,OAAO,MAAM,GAAG,SAClB,KACA;AACA,QAAO,oBAAC,SAAD;EAAe;EAAkC;EAAK,GAAI;EAAS,CAAA;EAC1E"}
|
|
1
|
+
{"version":3,"file":"IconButton-CqTPMhjV.mjs","names":["noop"],"sources":["../components/Button/palette.ts","../components/Button/Button.tsx","../components/Button/IconButton.tsx"],"sourcesContent":["import type { Color } from '@persona/design-tokens';\nimport { type PdsColor, transparent, withAlpha } from 'design-system/lib/color';\nimport { semanticTokens } from 'design-system/lib/semanticColor';\nimport type { PersonaTheme } from 'design-system/theme';\nimport type { SemanticTokens } from 'design-system/variables/semantic';\n\nexport type ButtonVariant = 'basic' | 'primary' | 'inverse' | 'danger' | 'text' | 'outline';\n\nexport interface ButtonPalette {\n default: PdsColor;\n hover: Color;\n active: Color;\n disabled: PdsColor;\n text: Color;\n textDisabled: PdsColor;\n /** Set only under semantic theming; legacy leaves disabled icon colour to the stroke rules. */\n iconDisabled?: PdsColor;\n highlightDark: Color;\n}\n\nconst buildSemanticPalettes = (tokens: SemanticTokens): Record<ButtonVariant, ButtonPalette> => {\n const neutral = {\n hover: tokens.ActionNeutralHover,\n active: tokens.ActionNeutralActive,\n text: tokens.FgPrimary,\n textDisabled: tokens.FgDisabled,\n iconDisabled: tokens.FgDisabled,\n highlightDark: tokens.FgDisabled,\n };\n return {\n basic: {\n ...neutral,\n default: tokens.ActionNeutral,\n disabled: withAlpha(tokens.ActionNeutral, tokens.Opacity65),\n },\n text: { ...neutral, default: transparent, disabled: transparent },\n outline: {\n ...neutral,\n default: transparent,\n hover: tokens.ActionOutlineHover,\n active: tokens.ActionOutlineActive,\n disabled: transparent,\n },\n primary: {\n default: tokens.ActionPrimary,\n hover: tokens.ActionPrimaryHover,\n active: tokens.ActionPrimaryActive,\n disabled: tokens.ActionPrimary,\n text: tokens.FgInverse,\n textDisabled: tokens.FgInverse,\n iconDisabled: tokens.FgInverse,\n highlightDark: tokens.FgInverse,\n },\n danger: {\n default: tokens.ActionDanger,\n hover: tokens.ActionDangerHover,\n active: tokens.ActionDangerActive,\n disabled: tokens.ActionDanger,\n text: tokens.FgInverse,\n textDisabled: tokens.FgInverse,\n iconDisabled: tokens.FgInverse,\n highlightDark: tokens.FgInverse,\n },\n inverse: {\n default: tokens.ActionInverse,\n hover: tokens.ActionInverseHover,\n active: tokens.ActionInverseActive,\n disabled: withAlpha(tokens.ActionInverse, tokens.Opacity65),\n text: tokens.FgPrimaryStatic,\n textDisabled: withAlpha(tokens.FgPrimaryStatic, tokens.Opacity65),\n iconDisabled: withAlpha(tokens.FgPrimaryStatic, tokens.Opacity65),\n highlightDark: tokens.ActionNeutralActive,\n },\n };\n};\n\nconst semanticPaletteCache = new WeakMap<SemanticTokens, Record<ButtonVariant, ButtonPalette>>();\n\nconst semanticPalettes = (tokens: SemanticTokens): Record<ButtonVariant, ButtonPalette> => {\n let palettes = semanticPaletteCache.get(tokens);\n if (!palettes) {\n palettes = buildSemanticPalettes(tokens);\n semanticPaletteCache.set(tokens, palettes);\n }\n return palettes;\n};\n\nexport const buttonPalette = (theme: PersonaTheme, variant: ButtonVariant): ButtonPalette => {\n const tokens = semanticTokens(theme);\n return tokens ? semanticPalettes(tokens)[variant] : theme.color.variants[variant];\n};\n","import { isEmpty, isFunction } from 'lodash-es';\nimport {\n type ComponentPropsWithoutRef,\n forwardRef,\n type HTMLAttributeAnchorTarget,\n type MouseEvent,\n type ReactNode,\n type Ref,\n useCallback,\n} from 'react';\nimport styled, {\n css,\n type DefaultTheme,\n type FlattenInterpolation,\n type ThemeProps,\n} from 'styled-components';\n\nimport { Color, Spacing } from '@persona/design-tokens';\nimport { LoaderIcon } from '@persona/icons';\nimport { opacityOf, withAlpha } from 'design-system/lib/color';\nimport { isDisabled, isHovered, isNotDisabled } from 'design-system/lib/pseudoClass';\nimport { RouterLink, type To } from 'design-system/lib/router';\nimport { semanticColor, semanticOnly, semanticTokens } from 'design-system/lib/semanticColor';\nimport useToggle from 'design-system/lib/useToggle';\nimport { focusOutlineControlled } from 'design-system/mixins/focus';\nimport { printMixins } from 'design-system/mixins/print';\nimport { paragraphMixins } from 'design-system/mixins/text';\nimport type PseudoClassProps from 'design-system/types/PseudoClassProps';\nimport { rotate } from 'design-system/variables/keyframes';\nimport { TransitionDuration } from 'design-system/variables/transitions';\n\nimport { type ButtonVariant, buttonPalette } from './palette';\n\nconst noop = (): void => undefined;\n\n// TODO(joseph): Bring this fix back to pseudoClass\nconst isActive = ({ active }: PseudoClassProps) => (active ? '' : ':active:enabled');\n\n/* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\nconst sizeStyles: Record<ButtonProps['size'], FlattenInterpolation<ThemeProps<DefaultTheme>>> = {\n md: css`\n ${paragraphMixins.md}\n height: ${({ theme }) => theme.button.height.md};\n padding: ${Spacing[2]};\n svg {\n height: 16px;\n width: 16px;\n }\n `,\n sm: css`\n ${paragraphMixins.sm}\n height: ${({ theme }) => theme.button.height.sm};\n padding: ${Spacing[1]} 6px;\n svg {\n height: 16px;\n width: 16px;\n }\n `,\n};\n\n/* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\nconst widthStyles: Record<ButtonProps['width'], FlattenInterpolation<ThemeProps<DefaultTheme>>> = {\n full: css`\n width: 100%;\n `,\n auto: css`\n width: auto;\n `,\n // TODO: rename this prop to 'element' as a standard unresponsive element width\n button: css`\n width: ${({ theme }) => theme.element.width.md};\n `,\n icon: css<ButtonProps>`\n width: ${({ theme, size }) => {\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n return theme.button.height[size];\n }};\n padding: 0;\n flex: none;\n `,\n};\n\ninterface ButtonPropsWithTransientProps extends Omit<ButtonProps, 'isPending'> {\n $isPending: boolean;\n $onSecondaryBackground?: boolean;\n}\n\nexport const StyledButton = styled.button.attrs<ButtonPropsWithTransientProps>(({ to, target }) => {\n if (isEmpty(to)) {\n return 'button';\n } else if (typeof to === 'string' && to.startsWith('https://')) {\n return {\n as: 'a',\n href: to,\n target: target ?? '_blank',\n rel: 'noreferrer',\n };\n } else {\n return {\n as: RouterLink,\n };\n }\n})<ButtonPropsWithTransientProps>`\n cursor: pointer;\n border: none;\n box-sizing: border-box;\n white-space: nowrap;\n ${({ theme, variant = 'primary' }) => {\n const palette = buttonPalette(theme, variant);\n const tokens = semanticTokens(theme);\n return css`\n &:disabled {\n background-color: ${palette.disabled};\n color: ${palette.textDisabled};\n ${\n tokens &&\n (variant === 'primary' || variant === 'danger') &&\n css`\n opacity: ${opacityOf(tokens.Opacity65)};\n `\n }\n ${\n palette.iconDisabled &&\n css`\n svg {\n color: ${palette.iconDisabled};\n }\n `\n }\n svg path {\n stroke: ${palette.iconDisabled ?? palette.textDisabled};\n }\n\n /* For backwards compatibility with current coloring scheme (targeting stroke property) */\n svg.pds-icon {\n path {\n stroke: unset;\n }\n\n /* Support icons with stroke */\n path[stroke] {\n stroke: currentColor;\n }\n }\n\n user-select: none;\n }\n `;\n }}\n\n ${({ theme, variant }) =>\n variant === 'outline' &&\n css`\n border: 1px solid ${semanticColor(theme, 'BorderDefault', theme.color.border.input)};\n `}\n\n display: flex;\n align-items: center;\n justify-content: center;\n\n /* To properly position loading spinner */\n position: relative;\n\n border-radius: ${({ theme }) => theme.button.borderRadius};\n\n transition-duration: ${TransitionDuration.Fast};\n transition-property: background-color, color, border-color, width, height;\n\n ${({ size }) => {\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n return sizeStyles[size];\n }}\n ${({ width }) => {\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n return widthStyles[width];\n }}\n\n /* Variant styling */\n ${({ theme, variant = 'primary', $isPending, $onSecondaryBackground }) => {\n let palette = buttonPalette(theme, variant);\n\n if (variant === 'basic' && $onSecondaryBackground) {\n const tokens = semanticTokens(theme);\n palette = tokens\n ? {\n ...palette,\n default: tokens.ActionNeutralHover,\n hover: tokens.ActionNeutralActive,\n active: tokens.ActionNeutralActive,\n disabled: withAlpha(tokens.ActionNeutralHover, tokens.Opacity65),\n }\n : {\n ...palette,\n default: Color.CoreSlate300,\n hover: Color.CoreSlate400,\n active: Color.CoreSlate400,\n disabled: Color.CoreSlate100,\n };\n }\n\n return css`\n background-color: ${palette.default};\n color: ${palette.text};\n svg path {\n stroke: ${palette.text};\n }\n\n svg.pds-icon {\n path {\n stroke: unset;\n }\n\n path[stroke] {\n stroke: currentColor;\n }\n }\n\n &${isHovered}${isNotDisabled} {\n background-color: ${palette.hover};\n }\n\n &${isDisabled} {\n cursor: not-allowed;\n }\n\n &${isActive} {\n background-color: ${palette.active};\n }\n\n ${focusOutlineControlled}\n\n ${\n $isPending &&\n css`\n cursor: default;\n background-color: ${palette.active};\n &:disabled {\n background-color: ${buttonPalette(theme, variant).active};\n user-select: none;\n ${semanticOnly(() => 'opacity: 1;')}\n }\n\n svg path {\n stroke: ${palette.highlightDark};\n }\n\n // For backwards compatibility with current coloring scheme (targeting stroke property)\n svg.pds-icon {\n path {\n stroke: unset;\n }\n\n path[stroke] {\n stroke: currentColor;\n }\n }\n `\n }\n `;\n }}\n\n\n ${printMixins.hide}\n`;\n\ntype WithPendingProps = Pick<ButtonProps, 'isPending'>;\n\nconst LoaderContainer = styled.div<WithPendingProps>`\n position: absolute;\n height: 100%;\n width: 100%;\n top: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: opacity 2s;\n opacity: ${({ isPending }) => (isPending ? '1' : '0')};\n`;\n\nconst Loader = styled(LoaderIcon)`\n animation: ${rotate} linear 1s infinite;\n`;\n\nexport const ButtonChildren = styled('div').attrs(({ isPending }: WithPendingProps) => ({\n ['aria-hidden']: isPending,\n}))<WithPendingProps>`\n width: 100%;\n display: flex;\n flex-wrap: nowrap;\n align-items: center;\n justify-content: center;\n transition: opacity ${TransitionDuration.Fast};\n opacity: ${({ isPending }) => (isPending ? '0' : '1')};\n gap: ${Spacing[1]};\n`;\n\nconst PrefixIconContainer = styled.div`\n display: flex;\n align-items: center;\n`;\n\nconst InheritPrefixIconContainer = styled.div`\n display: flex;\n align-items: center;\n\n & svg {\n width: inherit;\n height: inherit;\n }\n`;\n\nexport const SuffixIconContainer = styled(PrefixIconContainer)`\n margin-right: 0;\n flex-grow: 1;\n justify-content: flex-end;\n`;\n\nconst ButtonText = styled.span<{ size: 'md' | 'sm'; width: 'full' | 'auto' | 'button' | 'icon' }>`\n position: relative;\n\n /* Needed to align for browsers that don't support text-box yet\n (which at this time, is firefox, and opera, and a few niche browsers)\n This checks firefox. Otherwise, it will default back to the original\n which is a slightly misaligned button\n */\n\n /* Was trying to use this with @supports not, but genuinely could not figure out why this wouldn't\n work */\n\n line-height: ${({ width }) => (width === 'icon' ? '0' : 'inherit')};\n @-moz-document url-prefix() {\n top: ${({ size }) => (size === 'md' ? '1px' : '0.5px')};\n }\n\n @supports (text-box: cap alphabetic) {\n text-box: ${({ width }) => (width === 'icon' ? 'normal' : 'cap alphabetic')};\n }\n`;\n\ntype MaybePromise =\n | ((e: MouseEvent<HTMLButtonElement>) => void)\n | ((e: MouseEvent<HTMLButtonElement>) => Promise<void>);\n\nexport interface ButtonProps\n extends ComponentPropsWithoutRef<'button'>, Omit<PseudoClassProps, 'checked'> {\n /**\n * Visual style of the button.\n *\n * - `primary` – filled brand colour, for the primary action on a surface.\n * - `basic` – subtle grey fill, for secondary actions.\n * - `outline` – transparent with a border, alternative secondary style.\n * - `text` – no background or border, for tertiary / inline actions.\n * - `inverse` – inverted fill for use on dark/coloured backgrounds.\n * - `danger` – red fill, for destructive actions.\n *\n * @defaultValue 'primary'\n */\n variant?: ButtonVariant;\n /**\n * Shows a loading spinner and disables the button. Also triggers automatically\n * when `onClick` returns a Promise, clearing once the promise settles.\n */\n isPending?: boolean;\n /**\n * Icon rendered to the left of the button label.\n * Import from `@persona/icons`.\n */\n prefixIcon?: ReactNode;\n /**\n * Controls how the prefix icon inherits sizing.\n *\n * - `basic` – icon is rendered inside a fixed-size container.\n * - `inherit` – icon stretches to fill the surrounding element's dimensions.\n *\n * @defaultValue 'basic'\n */\n prefixIconType?: 'basic' | 'inherit';\n\n /**\n * Icon rendered to the right of the button label.\n * Import from `@persona/icons`.\n */\n suffixIcon?: ReactNode;\n\n /**\n * Height and typography scale of the button.\n *\n * @defaultValue 'md'\n */\n size?: 'md' | 'sm';\n\n /**\n * Changes the button into a link.\n * A relative path renders a router-aware link (PDS `RouterProvider` adapter,\n * react-router when present, otherwise a plain `<a>`); an absolute `https://`\n * URL renders an `<a>` that opens in a new tab.\n */\n to?: To;\n\n /**\n * Overrides the target of the link if `to` is provided and is an external link.\n */\n target?: HTMLAttributeAnchorTarget;\n\n /**\n * History state attached to the navigation when `to` is an internal link.\n */\n state?: unknown;\n\n /**\n * Replaces the current history entry instead of pushing, when `to` is an internal link.\n */\n replace?: boolean;\n\n /**\n * Note: we may want to default this to 'button' in the future, but many instances of this Button component\n * in dashboard currently rely on the default 'submit' behavior that occurs when using this in redux-form\n * so we'll have to comb through and manually add the type='submit' prop.\n */\n type?: 'button' | 'reset' | 'submit';\n /**\n * Controls the width of the button.\n *\n * - `full` – stretches to fill its container (`width: 100%`).\n * - `auto` – shrinks to fit its content.\n * - `button` – a fixed medium element width (from design tokens).\n * - `icon` – square, sized to match the button height; use for icon-only buttons.\n *\n * @defaultValue 'full'\n */\n width?: 'full' | 'auto' | 'button' | 'icon';\n onClick?: MaybePromise;\n ref?: Ref<HTMLButtonElement>;\n\n /**\n * In some cases we render a button on a secondary background, which needs an adjustment\n * for certain variants.\n */\n onSecondaryBackground?: boolean;\n}\n\nconst Button = forwardRef<HTMLButtonElement, ButtonProps>(function Button(\n {\n id,\n children,\n prefixIcon,\n suffixIcon,\n disabled,\n isPending,\n type = 'button',\n prefixIconType = 'basic',\n variant = 'primary',\n size = 'md',\n width = 'full',\n onClick,\n onSecondaryBackground,\n to,\n target,\n state,\n replace,\n ...props\n }: ButtonProps,\n ref,\n) {\n const [isResolving, { enable, disable }] = useToggle(false);\n const innerOnClick: MaybePromise = isFunction(onClick) ? onClick : noop;\n const loading = isPending || isResolving;\n const isInternalLink = !isEmpty(to) && !(typeof to === 'string' && to.startsWith('https://'));\n\n const handleClick = useCallback(\n async (e: MouseEvent<HTMLButtonElement>) => {\n if (loading) {\n return;\n }\n\n const maybePromise = innerOnClick(e);\n\n if (maybePromise instanceof Promise) {\n enable();\n await maybePromise;\n disable();\n }\n },\n [loading, innerOnClick],\n );\n\n return (\n <StyledButton\n id={id}\n type={type}\n data-test={'button__' + variant}\n variant={variant}\n size={size}\n width={width}\n disabled={disabled || loading}\n $isPending={loading}\n $onSecondaryBackground={onSecondaryBackground}\n to={to}\n target={target}\n {...(isInternalLink ? { state, replace } : {})}\n {...props}\n onClick={handleClick}\n ref={ref}\n >\n {loading && (\n <LoaderContainer isPending={loading}>\n <Loader aria-label={`Loading ${props['aria-label'] || ''}`} />\n </LoaderContainer>\n )}\n <ButtonChildren isPending={loading}>\n {prefixIcon != null && (\n <>\n {prefixIconType === 'basic' && <PrefixIconContainer>{prefixIcon}</PrefixIconContainer>}\n {prefixIconType === 'inherit' && (\n <InheritPrefixIconContainer>{prefixIcon}</InheritPrefixIconContainer>\n )}\n </>\n )}\n {children && (\n <ButtonText width={width} size={size}>\n {children}\n </ButtonText>\n )}\n {suffixIcon != null && <SuffixIconContainer>{suffixIcon}</SuffixIconContainer>}\n </ButtonChildren>\n </StyledButton>\n );\n});\n\nexport default Button;\n","import { forwardRef } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport { BorderRadius } from '@persona/design-tokens';\nimport { semanticOnly } from 'design-system/lib/semanticColor';\n\nimport Button, { type ButtonProps } from './Button';\n\nconst BUTTON_SIZE_MAP = {\n xs: '16px',\n sm: '24px',\n md: '32px',\n};\n\nconst ICON_SIZE_MAP = {\n xs: '12px',\n sm: '16px',\n md: '16px',\n};\n\ntype IconBtnSize = keyof typeof BUTTON_SIZE_MAP;\n\nconst IconBtn = styled(Button).attrs({\n width: 'icon',\n variant: 'basic',\n})`\n background-color: transparent;\n padding: 0;\n border-radius: ${BorderRadius.Md};\n\n ${semanticOnly(\n () => css`\n &:disabled {\n background-color: transparent;\n }\n `,\n )}\n\n ${({ size }) => css`\n height: ${BUTTON_SIZE_MAP[size as IconBtnSize]};\n width: ${BUTTON_SIZE_MAP[size as IconBtnSize]};\n\n svg {\n width: ${ICON_SIZE_MAP[size as IconBtnSize]};\n height: ${ICON_SIZE_MAP[size as IconBtnSize]};\n }\n `}\n`;\n\nexport interface IconButtonProps extends Omit<\n ButtonProps,\n 'width' | 'prefixIcon' | 'prefixIconType' | 'suffixIcon' | 'variant' | 'size'\n> {\n /**\n * `xs` - 16px. `sm` - 24px. `md` - 32px.\n * Pair with a PDS icon in the prescribed size.\n */\n size?: IconBtnSize;\n}\n\n/**\n * Use to render icon-only buttons. Ensure buttons have proper aria properties.\n */\nconst IconButton = forwardRef<HTMLButtonElement, IconButtonProps>(function IconButton(\n { size = 'xs', ...props },\n ref,\n) {\n return <IconBtn size={size as ButtonProps['size']} ref={ref} {...props} />;\n});\n\nexport default IconButton;\n"],"mappings":";;;;;;;;;;;;;;;;;AAoBA,MAAM,yBAAyB,WAAiE;CAC9F,MAAM,UAAU;EACd,OAAO,OAAO;EACd,QAAQ,OAAO;EACf,MAAM,OAAO;EACb,cAAc,OAAO;EACrB,cAAc,OAAO;EACrB,eAAe,OAAO;EACvB;AACD,QAAO;EACL,OAAO;GACL,GAAG;GACH,SAAS,OAAO;GAChB,UAAU,UAAU,OAAO,eAAe,OAAO,UAAU;GAC5D;EACD,MAAM;GAAE,GAAG;GAAS,SAAS;GAAa,UAAU;GAAa;EACjE,SAAS;GACP,GAAG;GACH,SAAS;GACT,OAAO,OAAO;GACd,QAAQ,OAAO;GACf,UAAU;GACX;EACD,SAAS;G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IAAI;CACL;AAED,MAAM,gBAAgB;CACpB,IAAI;CACJ,IAAI;CACJ,IAAI;CACL;AAID,MAAM,UAAU,OAAO,OAAO,CAAC,MAAM;CACnC,OAAO;CACP,SAAS;CACV,CAAC;;;mBAGiB,aAAa,GAAG;;IAE/B,mBACM,GAAG;;;;MAKV,CAAC;;KAEC,EAAE,WAAW,GAAG;cACP,gBAAgB,MAAqB;aACtC,gBAAgB,MAAqB;;;eAGnC,cAAc,MAAqB;gBAClC,cAAc,MAAqB;;IAE/C;;;;;AAiBJ,MAAM,aAAa,WAA+C,SAAS,WACzE,EAAE,OAAO,MAAM,GAAG,SAClB,KACA;AACA,QAAO,oBAAC,SAAD;EAAe;EAAkC;EAAK,GAAI;EAAS,CAAA;EAC1E"}
|
package/dist/IconButton.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as IconButtonProps, t as IconButton } from "./IconButton-
|
|
1
|
+
import { n as IconButtonProps, t as IconButton } from "./IconButton-CjPFhpVG.mjs";
|
|
2
2
|
export { IconButtonProps, IconButton as default };
|
package/dist/ImageTile.d.mts
CHANGED
package/dist/InlineInput.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as ButtonProps } from "./Button-
|
|
2
|
-
import { n as InputSizes, t as InputMixinProps } from "./input-
|
|
1
|
+
import { r as ButtonProps } from "./Button-Dhiund3f.mjs";
|
|
2
|
+
import { n as InputSizes, t as InputMixinProps } from "./input-DVJhMlxU.mjs";
|
|
3
3
|
import * as _$react from "react";
|
|
4
4
|
import { ComponentPropsWithoutRef, MouseEventHandler, ReactElement, ReactNode } from "react";
|
|
5
5
|
import * as _$styled_components0 from "styled-components";
|
|
@@ -58,4 +58,4 @@ interface InputGroupProps extends ComponentPropsWithoutRef<'div'>, Omit<InputMix
|
|
|
58
58
|
declare const InputGroup: _$react.ForwardRefExoticComponent<InputGroupProps & _$react.RefAttributes<HTMLDivElement>>;
|
|
59
59
|
//#endregion
|
|
60
60
|
export { InputProps as a, InputGroupProps as i, Input as n, InputGroup as r, ClearButton as t };
|
|
61
|
-
//# sourceMappingURL=Input-
|
|
61
|
+
//# sourceMappingURL=Input-CZ_6KWDN.d.mts.map
|
|
@@ -4,7 +4,7 @@ import { i as Paragraph } from "./Text-BdluS7Fy.mjs";
|
|
|
4
4
|
import { isHovered, isNotDisabled } from "./lib/pseudoClass.mjs";
|
|
5
5
|
import inputMixin from "./mixins/input.mjs";
|
|
6
6
|
import { n as Button } from "./IconButton-CqTPMhjV.mjs";
|
|
7
|
-
import { n as useFormField, t as FormControlContext } from "./useFormField-
|
|
7
|
+
import { n as useFormField, t as FormControlContext } from "./useFormField-BzhMbl5P.mjs";
|
|
8
8
|
import { BorderRadius, Color, Spacing } from "@persona/design-tokens";
|
|
9
9
|
import { cloneElement, forwardRef, useEffect, useRef, useState } from "react";
|
|
10
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -189,4 +189,4 @@ const InputGroup = forwardRef(function InputGroup({ size = "md", leftIcon, onCle
|
|
|
189
189
|
//#endregion
|
|
190
190
|
export { Input as n, InputGroup as r, ClearButton as t };
|
|
191
191
|
|
|
192
|
-
//# sourceMappingURL=Input-
|
|
192
|
+
//# sourceMappingURL=Input-C_3QwAAt.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input-C-TwCer2.mjs","names":["SmallCircleXInverseIcon"],"sources":["../components/Input/Input.tsx"],"sourcesContent":["import {\n cloneElement,\n type ComponentPropsWithoutRef,\n type CSSProperties,\n forwardRef,\n type MouseEventHandler,\n type ReactElement,\n type ReactNode,\n useEffect,\n useRef,\n useState,\n} from 'react';\nimport styled, { css } from 'styled-components';\n\nimport { BorderRadius, Color, Spacing } from '@persona/design-tokens';\nimport { CircleXInverseIcon } from '@persona/icons';\nimport { CircleXInverseIcon as SmallCircleXInverseIcon } from '@persona/icons/12px';\nimport Button, { type ButtonProps } from 'design-system/components/Button';\nimport useFormField, {\n FormControlContext,\n} from 'design-system/components/FormControl/useFormField';\nimport { Paragraph } from 'design-system/components/Text';\nimport { isHovered, isNotDisabled } from 'design-system/lib/pseudoClass';\nimport { semanticColor } from 'design-system/lib/semanticColor';\nimport inputMixin, { type InputMixinProps, type InputSizes } from 'design-system/mixins/input';\n\nconst Container = styled.div`\n display: flex;\n position: relative;\n width: 100%;\n`;\n\nconst LeftIcon = styled.div<{ $size?: InputSizes; $disabled?: boolean }>`\n position: absolute;\n left: ${Spacing[2]};\n top: 50%;\n transform: translateY(-50%);\n margin: 0;\n font-size: 0px;\n color: ${({ theme, $disabled }) =>\n $disabled\n ? semanticColor(theme, 'FgDisabled', Color.BorderIconSecondary)\n : semanticColor(theme, 'FgSecondary', Color.BorderIconSecondary)};\n height: ${({ $size }) => ($size === 'sm' ? '12px' : '16px')};\n width: ${({ $size }) => ($size === 'sm' ? '12px' : '16px')};\n pointer-events: none;\n\n svg {\n height: 100%;\n width: 100%;\n }\n`;\n\nconst InputButtonContainer = styled.div<{ $size?: InputSizes }>`\n position: absolute;\n display: flex;\n gap: ${Spacing[2]};\n right: ${({ $size }) => ($size === 'sm' ? '3px' : Spacing[1])};\n top: 50%;\n transform: translateY(-50%);\n margin: 0;\n font-size: 0px;\n`;\n\nexport const ClearButton = styled(Button).attrs({\n width: 'icon',\n variant: 'basic',\n})`\n background-color: transparent;\n padding: 0;\n height: ${({ size }) => (size === 'sm' ? '18px' : '24px')};\n width: ${({ size }) => (size === 'sm' ? '18px' : '24px')};\n border-radius: ${BorderRadius.Md};\n color: ${({ theme }) => semanticColor(theme, 'FgSecondary', Color.BorderIconSecondary)};\n\n ${({ disabled, theme }) =>\n disabled &&\n css`\n color: ${semanticColor(theme, 'FgDisabled', Color.BorderIconDisabled)};\n `}\n\n &${isHovered}${isNotDisabled} {\n background-color: transparent;\n }\n\n svg {\n height: ${({ size }) => (size === 'sm' ? '12px' : '16px')};\n width: ${({ size }) => (size === 'sm' ? '12px' : '16px')};\n }\n`;\n\nconst SuffixTextContainer = styled.div<{ $size: InputSizes }>`\n position: absolute;\n right: ${Spacing[2]};\n top: ${({ $size }) => ($size === 'sm' ? '2px' : '6px')};\n`;\n\ninterface StyledInputProps extends InputMixinProps {\n $leftIcon?: ReactNode;\n $hasRightItem?: boolean;\n}\n\nexport interface InputProps\n extends Omit<ComponentPropsWithoutRef<'input'>, 'size'>, Omit<InputMixinProps, '$size'> {\n /**\n * Size of the input. If you need the HTML size attr, use inputSize.\n */\n size?: InputSizes;\n\n /**\n * `size` HTML attr on `<input>`\n */\n inputSize?: ComponentPropsWithoutRef<'input'>['size'];\n\n leftIcon?: StyledInputProps['$leftIcon'];\n hasRightItem?: boolean;\n}\n\nconst InputBase = styled.input<StyledInputProps>`\n ${inputMixin};\n line-height: 1;\n\n &::placeholder {\n color: ${({ theme }) => semanticColor(theme, 'FgSecondary', theme.color.text.secondary)};\n }\n\n ${({ $size, $leftIcon, $hasRightItem }) => {\n let btnSpacing: string;\n switch ($size) {\n default:\n case 'md':\n btnSpacing = `calc(${Spacing[3]} + 16px + ${Spacing[1]})`;\n return css`\n padding-right: ${$hasRightItem ? btnSpacing : Spacing[3]};\n padding-left: ${$leftIcon ? btnSpacing : Spacing[3]};\n `;\n case 'sm':\n btnSpacing = `calc(${Spacing[2]} + 16px + ${Spacing[1]})`;\n return css`\n padding-right: ${$hasRightItem ? btnSpacing : Spacing[2]};\n padding-left: ${$leftIcon ? btnSpacing : Spacing[2]};\n `;\n }\n }}\n`;\n\nexport const Input = forwardRef<HTMLInputElement, InputProps>(function Input(\n { size, leftIcon, hasRightItem, id, hasWarning, hasError, disabled, maxLength, ...props },\n ref,\n) {\n const field = useFormField({ hasWarning, hasError, disabled, inputId: id, maxLength });\n\n return (\n <InputBase\n $size={size}\n $leftIcon={leftIcon}\n $hasRightItem={hasRightItem}\n ref={ref}\n id={field.inputId}\n aria-describedby={`${field.helperTextId}${field.hasWarning ? ` ${field.warningTextId}` : ''}`}\n aria-errormessage={field.hasError ? field.errorTextId : undefined}\n aria-invalid={field.hasError}\n hasWarning={field.hasWarning}\n hasError={field.hasError}\n disabled={field.disabled}\n maxLength={field.maxLength}\n {...props}\n size={props.inputSize}\n />\n );\n});\n\nexport interface InputGroupProps\n extends ComponentPropsWithoutRef<'div'>, Omit<InputMixinProps, '$size'> {\n /**\n * Input\n */\n children: ReactElement<InputProps>;\n\n /**\n * Size of the input. If you need the HTML size attr, use inputSize.\n */\n size?: InputSizes;\n\n /**\n * Icon to render to the left of the input field.\n *\n * Import icon from `@persona/icons`. Use 24px for `lg` input size.\n */\n leftIcon?: ReactNode;\n\n /**\n * Renders clear button to the right and calls function upon click.\n */\n onClear?: MouseEventHandler<HTMLButtonElement>;\n\n /**\n * Button to be rendered to the right of the input\n */\n rightButton?: ReactElement<ButtonProps>;\n\n /**\n * Disabled prop will be passed down to `<Input>`\n */\n disabled?: boolean;\n\n /**\n * Suffix text to be shown to the right of the input (inside the input field)\n */\n suffix?: string;\n}\n\nexport const InputGroup = forwardRef<HTMLDivElement, InputGroupProps>(function InputGroup(\n {\n size = 'md',\n leftIcon,\n onClear,\n rightButton,\n children,\n disabled,\n hasWarning,\n hasError,\n suffix,\n ...props\n },\n ref,\n) {\n const field = useFormField({ hasWarning, hasError, disabled });\n const inputButtonContainerRef = useRef<HTMLDivElement>();\n const [inputPaddingRight, setInputPaddingRight] = useState<string | null>(null);\n\n const suffixContainerRef = useRef<HTMLDivElement | null>(null);\n const [suffixPaddingRight, setSuffixPaddingRight] = useState<string | null>(null);\n\n useEffect(() => {\n // We only need to calculate padding in presence of the right button\n if (rightButton && inputButtonContainerRef.current) {\n setInputPaddingRight(`${12 + inputButtonContainerRef.current.offsetWidth + 4}px`);\n }\n }, [setInputPaddingRight]);\n\n useEffect(() => {\n if (suffix && suffixContainerRef.current) {\n // 12px is 8px padding to the right, plus the 4px gap between the suffix and the input.\n setSuffixPaddingRight(`${12 + suffixContainerRef.current.offsetWidth}px`);\n }\n }, [suffix, setSuffixPaddingRight]);\n\n const rightButtonStyles: CSSProperties =\n size === 'sm'\n ? {\n height: '18px',\n }\n : {};\n\n return (\n <FormControlContext.Provider value={field}>\n <Container ref={ref} {...props}>\n {leftIcon && (\n <LeftIcon $size={size} $disabled={field.disabled}>\n {leftIcon}\n </LeftIcon>\n )}\n {cloneElement(children, {\n size,\n leftIcon: leftIcon,\n ...(rightButton ? { rightButton } : {}),\n hasRightItem: onClear || suffix,\n style:\n inputPaddingRight || suffixPaddingRight\n ? {\n paddingRight: inputPaddingRight || suffixPaddingRight,\n }\n : {},\n })}\n\n {/* Renders only if there's a suffix and NO button */}\n {/* At some point, this should be moved so that it's not absolutely positioned, and\n these are both wrapped within an \"input\" container */}\n {suffix && !(onClear || rightButton) && (\n <SuffixTextContainer $size={size} ref={suffixContainerRef}>\n <Paragraph size={size}>{suffix}</Paragraph>\n </SuffixTextContainer>\n )}\n\n {(onClear || rightButton) && ( // TODO: Render only if value is present\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n <InputButtonContainer ref={inputButtonContainerRef} $size={size}>\n {onClear && (\n <ClearButton\n onClick={onClear}\n disabled={field.disabled}\n aria-label='Clear'\n size={size}\n >\n {size === 'sm' ? <SmallCircleXInverseIcon /> : <CircleXInverseIcon />}\n </ClearButton>\n )}\n {rightButton &&\n cloneElement(rightButton, {\n size: 'sm',\n width: rightButton.props.width || 'auto',\n style: rightButtonStyles,\n })}\n </InputButtonContainer>\n )}\n </Container>\n </FormControlContext.Provider>\n );\n});\n\nexport default Input;\n"],"mappings":";;;;;;;;;;;;;AA0BA,MAAM,YAAY,OAAO,GAAG;;;;;AAM5B,MAAM,WAAW,OAAO,GAAgD;;UAE9D,QAAQ,GAAG;;;;;YAKT,EAAE,OAAO,gBACjB,YACI,cAAc,OAAO,cAAc,MAAM,oBAAoB,GAC7D,cAAc,OAAO,eAAe,MAAM,oBAAoB,CAAC;aAC1D,EAAE,YAAa,UAAU,OAAO,SAAS,OAAQ;YAClD,EAAE,YAAa,UAAU,OAAO,SAAS,O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eACrC;KACQ,CAAA;IAEZ,aAAa,UAAU;KACtB;KACU;KACV,GAAI,cAAc,EAAE,aAAa,GAAG,EAAE;KACtC,cAAc,WAAW;KACzB,OACE,qBAAqB,qBACjB,EACE,cAAc,qBAAqB,oBACpC,GACD,EAAE;KACT,CAAC;IAKD,UAAU,EAAE,WAAW,gBACtB,oBAAC,qBAAD;KAAqB,OAAO;KAAM,KAAK;eACrC,oBAAC,WAAD;MAAiB;gBAAO;MAAmB,CAAA;KACvB,CAAA;KAGtB,WAAW,gBAEX,qBAAC,sBAAD;KAAsB,KAAK;KAAyB,OAAO;eAA3D,CACG,WACC,oBAAC,aAAD;MACE,SAAS;MACT,UAAU,MAAM;MAChB,cAAW;MACL;gBAEL,SAAS,OAAO,oBAACA,sBAAD,EAA2B,CAAA,GAAG,oBAAC,oBAAD,EAAsB,CAAA;MACzD,CAAA,EAEf,eACC,aAAa,aAAa;MACxB,MAAM;MACN,OAAO,YAAY,MAAM,SAAS;MAClC,OAAO;MACR,CAAC,CACiB;;IAEf;;EACgB,CAAA;EAEhC"}
|
|
1
|
+
{"version":3,"file":"Input-C_3QwAAt.mjs","names":["SmallCircleXInverseIcon"],"sources":["../components/Input/Input.tsx"],"sourcesContent":["import {\n cloneElement,\n type ComponentPropsWithoutRef,\n type CSSProperties,\n forwardRef,\n type MouseEventHandler,\n type ReactElement,\n type ReactNode,\n useEffect,\n useRef,\n useState,\n} from 'react';\nimport styled, { css } from 'styled-components';\n\nimport { BorderRadius, Color, Spacing } from '@persona/design-tokens';\nimport { CircleXInverseIcon } from '@persona/icons';\nimport { CircleXInverseIcon as SmallCircleXInverseIcon } from '@persona/icons/12px';\nimport Button, { type ButtonProps } from 'design-system/components/Button';\nimport useFormField, {\n FormControlContext,\n} from 'design-system/components/FormControl/useFormField';\nimport { Paragraph } from 'design-system/components/Text';\nimport { isHovered, isNotDisabled } from 'design-system/lib/pseudoClass';\nimport { semanticColor } from 'design-system/lib/semanticColor';\nimport inputMixin, { type InputMixinProps, type InputSizes } from 'design-system/mixins/input';\n\nconst Container = styled.div`\n display: flex;\n position: relative;\n width: 100%;\n`;\n\nconst LeftIcon = styled.div<{ $size?: InputSizes; $disabled?: boolean }>`\n position: absolute;\n left: ${Spacing[2]};\n top: 50%;\n transform: translateY(-50%);\n margin: 0;\n font-size: 0px;\n color: ${({ theme, $disabled }) =>\n $disabled\n ? semanticColor(theme, 'FgDisabled', Color.BorderIconSecondary)\n : semanticColor(theme, 'FgSecondary', Color.BorderIconSecondary)};\n height: ${({ $size }) => ($size === 'sm' ? '12px' : '16px')};\n width: ${({ $size }) => ($size === 'sm' ? '12px' : '16px')};\n pointer-events: none;\n\n svg {\n height: 100%;\n width: 100%;\n }\n`;\n\nconst InputButtonContainer = styled.div<{ $size?: InputSizes }>`\n position: absolute;\n display: flex;\n gap: ${Spacing[2]};\n right: ${({ $size }) => ($size === 'sm' ? '3px' : Spacing[1])};\n top: 50%;\n transform: translateY(-50%);\n margin: 0;\n font-size: 0px;\n`;\n\nexport const ClearButton = styled(Button).attrs({\n width: 'icon',\n variant: 'basic',\n})`\n background-color: transparent;\n padding: 0;\n height: ${({ size }) => (size === 'sm' ? '18px' : '24px')};\n width: ${({ size }) => (size === 'sm' ? '18px' : '24px')};\n border-radius: ${BorderRadius.Md};\n color: ${({ theme }) => semanticColor(theme, 'FgSecondary', Color.BorderIconSecondary)};\n\n ${({ disabled, theme }) =>\n disabled &&\n css`\n color: ${semanticColor(theme, 'FgDisabled', Color.BorderIconDisabled)};\n `}\n\n &${isHovered}${isNotDisabled} {\n background-color: transparent;\n }\n\n svg {\n height: ${({ size }) => (size === 'sm' ? '12px' : '16px')};\n width: ${({ size }) => (size === 'sm' ? '12px' : '16px')};\n }\n`;\n\nconst SuffixTextContainer = styled.div<{ $size: InputSizes }>`\n position: absolute;\n right: ${Spacing[2]};\n top: ${({ $size }) => ($size === 'sm' ? '2px' : '6px')};\n`;\n\ninterface StyledInputProps extends InputMixinProps {\n $leftIcon?: ReactNode;\n $hasRightItem?: boolean;\n}\n\nexport interface InputProps\n extends Omit<ComponentPropsWithoutRef<'input'>, 'size'>, Omit<InputMixinProps, '$size'> {\n /**\n * Size of the input. If you need the HTML size attr, use inputSize.\n */\n size?: InputSizes;\n\n /**\n * `size` HTML attr on `<input>`\n */\n inputSize?: ComponentPropsWithoutRef<'input'>['size'];\n\n leftIcon?: StyledInputProps['$leftIcon'];\n hasRightItem?: boolean;\n}\n\nconst InputBase = styled.input<StyledInputProps>`\n ${inputMixin};\n line-height: 1;\n\n &::placeholder {\n color: ${({ theme }) => semanticColor(theme, 'FgSecondary', theme.color.text.secondary)};\n }\n\n ${({ $size, $leftIcon, $hasRightItem }) => {\n let btnSpacing: string;\n switch ($size) {\n default:\n case 'md':\n btnSpacing = `calc(${Spacing[3]} + 16px + ${Spacing[1]})`;\n return css`\n padding-right: ${$hasRightItem ? btnSpacing : Spacing[3]};\n padding-left: ${$leftIcon ? btnSpacing : Spacing[3]};\n `;\n case 'sm':\n btnSpacing = `calc(${Spacing[2]} + 16px + ${Spacing[1]})`;\n return css`\n padding-right: ${$hasRightItem ? btnSpacing : Spacing[2]};\n padding-left: ${$leftIcon ? btnSpacing : Spacing[2]};\n `;\n }\n }}\n`;\n\nexport const Input = forwardRef<HTMLInputElement, InputProps>(function Input(\n { size, leftIcon, hasRightItem, id, hasWarning, hasError, disabled, maxLength, ...props },\n ref,\n) {\n const field = useFormField({ hasWarning, hasError, disabled, inputId: id, maxLength });\n\n return (\n <InputBase\n $size={size}\n $leftIcon={leftIcon}\n $hasRightItem={hasRightItem}\n ref={ref}\n id={field.inputId}\n aria-describedby={`${field.helperTextId}${field.hasWarning ? ` ${field.warningTextId}` : ''}`}\n aria-errormessage={field.hasError ? field.errorTextId : undefined}\n aria-invalid={field.hasError}\n hasWarning={field.hasWarning}\n hasError={field.hasError}\n disabled={field.disabled}\n maxLength={field.maxLength}\n {...props}\n size={props.inputSize}\n />\n );\n});\n\nexport interface InputGroupProps\n extends ComponentPropsWithoutRef<'div'>, Omit<InputMixinProps, '$size'> {\n /**\n * Input\n */\n children: ReactElement<InputProps>;\n\n /**\n * Size of the input. If you need the HTML size attr, use inputSize.\n */\n size?: InputSizes;\n\n /**\n * Icon to render to the left of the input field.\n *\n * Import icon from `@persona/icons`. Use 24px for `lg` input size.\n */\n leftIcon?: ReactNode;\n\n /**\n * Renders clear button to the right and calls function upon click.\n */\n onClear?: MouseEventHandler<HTMLButtonElement>;\n\n /**\n * Button to be rendered to the right of the input\n */\n rightButton?: ReactElement<ButtonProps>;\n\n /**\n * Disabled prop will be passed down to `<Input>`\n */\n disabled?: boolean;\n\n /**\n * Suffix text to be shown to the right of the input (inside the input field)\n */\n suffix?: string;\n}\n\nexport const InputGroup = forwardRef<HTMLDivElement, InputGroupProps>(function InputGroup(\n {\n size = 'md',\n leftIcon,\n onClear,\n rightButton,\n children,\n disabled,\n hasWarning,\n hasError,\n suffix,\n ...props\n },\n ref,\n) {\n const field = useFormField({ hasWarning, hasError, disabled });\n const inputButtonContainerRef = useRef<HTMLDivElement>();\n const [inputPaddingRight, setInputPaddingRight] = useState<string | null>(null);\n\n const suffixContainerRef = useRef<HTMLDivElement | null>(null);\n const [suffixPaddingRight, setSuffixPaddingRight] = useState<string | null>(null);\n\n useEffect(() => {\n // We only need to calculate padding in presence of the right button\n if (rightButton && inputButtonContainerRef.current) {\n setInputPaddingRight(`${12 + inputButtonContainerRef.current.offsetWidth + 4}px`);\n }\n }, [setInputPaddingRight]);\n\n useEffect(() => {\n if (suffix && suffixContainerRef.current) {\n // 12px is 8px padding to the right, plus the 4px gap between the suffix and the input.\n setSuffixPaddingRight(`${12 + suffixContainerRef.current.offsetWidth}px`);\n }\n }, [suffix, setSuffixPaddingRight]);\n\n const rightButtonStyles: CSSProperties =\n size === 'sm'\n ? {\n height: '18px',\n }\n : {};\n\n return (\n <FormControlContext.Provider value={field}>\n <Container ref={ref} {...props}>\n {leftIcon && (\n <LeftIcon $size={size} $disabled={field.disabled}>\n {leftIcon}\n </LeftIcon>\n )}\n {cloneElement(children, {\n size,\n leftIcon: leftIcon,\n ...(rightButton ? { rightButton } : {}),\n hasRightItem: onClear || suffix,\n style:\n inputPaddingRight || suffixPaddingRight\n ? {\n paddingRight: inputPaddingRight || suffixPaddingRight,\n }\n : {},\n })}\n\n {/* Renders only if there's a suffix and NO button */}\n {/* At some point, this should be moved so that it's not absolutely positioned, and\n these are both wrapped within an \"input\" container */}\n {suffix && !(onClear || rightButton) && (\n <SuffixTextContainer $size={size} ref={suffixContainerRef}>\n <Paragraph size={size}>{suffix}</Paragraph>\n </SuffixTextContainer>\n )}\n\n {(onClear || rightButton) && ( // TODO: Render only if value is present\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n <InputButtonContainer ref={inputButtonContainerRef} $size={size}>\n {onClear && (\n <ClearButton\n onClick={onClear}\n disabled={field.disabled}\n aria-label='Clear'\n size={size}\n >\n {size === 'sm' ? <SmallCircleXInverseIcon /> : <CircleXInverseIcon />}\n </ClearButton>\n )}\n {rightButton &&\n cloneElement(rightButton, {\n size: 'sm',\n width: rightButton.props.width || 'auto',\n style: rightButtonStyles,\n })}\n </InputButtonContainer>\n )}\n </Container>\n </FormControlContext.Provider>\n );\n});\n\nexport default Input;\n"],"mappings":";;;;;;;;;;;;;AA0BA,MAAM,YAAY,OAAO,GAAG;;;;;AAM5B,MAAM,WAAW,OAAO,GAAgD;;UAE9D,QAAQ,GAAG;;;;;YAKT,EAAE,OAAO,gBACjB,YACI,cAAc,OAAO,cAAc,MAAM,oBAAoB,GAC7D,cAAc,OAAO,eAAe,MAAM,oBAAoB,CAAC;aAC1D,EAAE,YAAa,UAAU,OAAO,SAAS,OAAQ;YAClD,EAAE,YAAa,UAAU,OAAO,SAAS,OAAQ;;;;;;;;AAS7D,MAAM,uBAAuB,OAAO,GAA2B;;;SAGtD,QAAQ,GAAG;YACR,EAAE,YAAa,UAAU,OAAO,QAAQ,QAAQ,GAAI;;;;;;AAOhE,MAAa,cAAc,OAAO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,oBACpC,GACD,EAAE;KACT,CAAC;IAKD,UAAU,EAAE,WAAW,gBACtB,oBAAC,qBAAD;KAAqB,OAAO;KAAM,KAAK;eACrC,oBAAC,WAAD;MAAiB;gBAAO;MAAmB,CAAA;KACvB,CAAA;KAGtB,WAAW,gBAEX,qBAAC,sBAAD;KAAsB,KAAK;KAAyB,OAAO;eAA3D,CACG,WACC,oBAAC,aAAD;MACE,SAAS;MACT,UAAU,MAAM;MAChB,cAAW;MACL;gBAEL,SAAS,OAAO,oBAACA,sBAAD,EAA2B,CAAA,GAAG,oBAAC,oBAAD,EAAsB,CAAA;MACzD,CAAA,EAEf,eACC,aAAa,aAAa;MACxB,MAAM;MACN,OAAO,YAAY,MAAM,SAAS;MAClC,OAAO;MACR,CAAC,CACiB;;IAEf;;EACgB,CAAA;EAEhC"}
|
package/dist/Input.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as InputProps, i as InputGroupProps, n as Input, r as InputGroup, t as ClearButton } from "./Input-
|
|
1
|
+
import { a as InputProps, i as InputGroupProps, n as Input, r as InputGroup, t as ClearButton } from "./Input-CZ_6KWDN.mjs";
|
|
2
2
|
export { ClearButton, Input, Input as default, InputGroup, InputGroupProps, InputProps };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as InputSizes, t as InputMixinProps } from "./input-
|
|
1
|
+
import { n as InputSizes, t as InputMixinProps } from "./input-DVJhMlxU.mjs";
|
|
2
2
|
|
|
3
3
|
//#region types/InputProps.d.ts
|
|
4
4
|
interface InputProps extends Omit<InputMixinProps, '$size'> {
|
|
@@ -13,4 +13,4 @@ interface InputProps extends Omit<InputMixinProps, '$size'> {
|
|
|
13
13
|
}
|
|
14
14
|
//#endregion
|
|
15
15
|
export { InputProps as t };
|
|
16
|
-
//# sourceMappingURL=InputProps-
|
|
16
|
+
//# sourceMappingURL=InputProps-lag6BM5h.d.mts.map
|
package/dist/InputProps.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as InputProps } from "./InputProps-
|
|
1
|
+
import { t as InputProps } from "./InputProps-lag6BM5h.mjs";
|
|
2
2
|
export { InputProps };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as ValueControlProps } from "./types-
|
|
1
|
+
import { t as ValueControlProps } from "./types-3iEDsymE.mjs";
|
|
2
2
|
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region components/DataTable/TableControls/FiltersV2/value-controls/IntegerValueControl/IntegerValueControl.d.ts
|
package/dist/Link.d.mts
CHANGED
|
@@ -9,11 +9,11 @@ import { Z_INDICES } from "./lib/zindex.mjs";
|
|
|
9
9
|
import { n as Stack } from "./Stack-ChsImaEY.mjs";
|
|
10
10
|
import { n as Button$1, t as IconButton } from "./IconButton-CqTPMhjV.mjs";
|
|
11
11
|
import { a as StyledTruncatedText, i as StickerContentContainer, n as Sticker, r as StickerContainer } from "./Sticker-C3Eb13OQ.mjs";
|
|
12
|
-
import { t as FormGroupContext } from "./useFormGroup-
|
|
13
|
-
import { o as MenuHeading, r as ListItem } from "./Menu-
|
|
14
|
-
import { n as DropdownMenu_default } from "./DropdownMenu-
|
|
15
|
-
import { s as Popover_default } from "./Popover-
|
|
16
|
-
import { t as Container } from "./FormControl-
|
|
12
|
+
import { t as FormGroupContext } from "./useFormGroup-CH3kiXoa.mjs";
|
|
13
|
+
import { o as MenuHeading, r as ListItem } from "./Menu-Cd6oxjAe.mjs";
|
|
14
|
+
import { n as DropdownMenu_default } from "./DropdownMenu-CuKSNxc9.mjs";
|
|
15
|
+
import { s as Popover_default } from "./Popover-opVa9Xhc.mjs";
|
|
16
|
+
import { t as Container } from "./FormControl-DnfZTli_.mjs";
|
|
17
17
|
import { BorderRadius, Color, Spacing, Typography } from "@persona/design-tokens";
|
|
18
18
|
import { createContext, useCallback, useContext, useEffect, useMemo, useRef, useState } from "react";
|
|
19
19
|
import { DropIndicator, GridList, GridListItem, Header, ListBoxSection, useDragAndDrop } from "react-aria-components";
|
|
@@ -452,4 +452,4 @@ const ListBox = Object.assign(ListBox$1, { LogicRow });
|
|
|
452
452
|
//#endregion
|
|
453
453
|
export { useListBoxContext as n, ListBox as t };
|
|
454
454
|
|
|
455
|
-
//# sourceMappingURL=ListBox-
|
|
455
|
+
//# sourceMappingURL=ListBox-D4j4LCT3.mjs.map
|