@persona/design-system 0.5.0 → 0.5.1
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 +5 -1
- package/dist/{Action-C2waxwIy.d.mts → Action-C2FTJhnQ.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 +8 -6
- package/dist/{Badge-CM2TzkdE.mjs → Badge-BtNIvtDZ.mjs} +3 -3
- package/dist/{Badge-CM2TzkdE.mjs.map → Badge-BtNIvtDZ.mjs.map} +1 -1
- package/dist/BooleanValueControl.d.mts +1 -1
- package/dist/{Breadcrumb-Df06cTnA.d.mts → Breadcrumb-BlAhp45l.d.mts} +1 -1
- package/dist/Breadcrumb.d.mts +1 -1
- package/dist/{Breadcrumbs-BEYQlGbW.mjs → Breadcrumbs-ClKHNIr-.mjs} +15 -14
- package/dist/Breadcrumbs-ClKHNIr-.mjs.map +1 -0
- package/dist/{Breadcrumbs-D_Gzd4_J.d.mts → Breadcrumbs-DdZ14ZFw.d.mts} +2 -2
- package/dist/Breadcrumbs.d.mts +1 -1
- package/dist/{Button-CRFbWv3l.d.mts → Button-CTgyA3gc.d.mts} +5 -4
- package/dist/Button.d.mts +1 -1
- package/dist/{Calendar-DjnoZVcT.d.mts → Calendar-_gM6U5ET.d.mts} +1 -1
- package/dist/Calendar.d.mts +1 -1
- package/dist/CalendarBase.d.mts +1 -1
- package/dist/Card-Dorym91P.d.mts +75 -0
- package/dist/{Card-CKrJtn1f.mjs → Card-vQIPtdXi.mjs} +12 -10
- package/dist/Card-vQIPtdXi.mjs.map +1 -0
- package/dist/Card.d.mts +1 -1
- package/dist/Card2.d.mts +1 -1
- package/dist/{CardV2-B2wx1NE3.mjs → CardV2-CFTjYWoO.mjs} +18 -17
- package/dist/CardV2-CFTjYWoO.mjs.map +1 -0
- package/dist/{Checkbox-DwZEsi7x.mjs → Checkbox-CyeitZ5q.mjs} +26 -22
- package/dist/Checkbox-CyeitZ5q.mjs.map +1 -0
- package/dist/{Checkbox-CwPXPLCi.d.mts → Checkbox-DRJXDs2T.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/CodeHighlight.d.mts +40 -0
- package/dist/{Combobox-BQN5OwB-.d.mts → Combobox-DX4DLe1b.d.mts} +3 -3
- package/dist/{Combobox-CKaVX-32.mjs → Combobox-Ddas5FN-.mjs} +22 -21
- package/dist/Combobox-Ddas5FN-.mjs.map +1 -0
- package/dist/Combobox.d.mts +2 -2
- package/dist/{ComboboxBase-nfHr19x-.d.mts → ComboboxBase-Ds_i3K2m.d.mts} +18 -29
- package/dist/ComboboxBase.d.mts +1 -1
- package/dist/{ComboboxMultiSelect-DRNj2Mtx.d.mts → ComboboxMultiSelect-S6oFJcOS.d.mts} +2 -2
- package/dist/ComboboxMultiSelect.d.mts +1 -1
- package/dist/{ComboboxSingleSelect-BkhbEx-F.d.mts → ComboboxSingleSelect-DFzCwW1Y.d.mts} +4 -4
- package/dist/ComboboxSingleSelect.d.mts +1 -1
- package/dist/{CompactBar-CyHbWTv4.d.mts → CompactBar-DEqItiZr.d.mts} +3 -3
- package/dist/CompactBar.d.mts +1 -1
- package/dist/{ConfigFormGroup-CmCRJyse.mjs → ConfigFormGroup-DcsM-u8o.mjs} +2 -2
- package/dist/{ConfigFormGroup-CmCRJyse.mjs.map → ConfigFormGroup-DcsM-u8o.mjs.map} +1 -1
- package/dist/{ControlBar-DwAhPcb5.d.mts → ControlBar-BVG5Pbvh.d.mts} +2 -2
- package/dist/ControlBar.d.mts +1 -1
- package/dist/DataTable.d.mts +17 -6
- package/dist/{DateField-tOyrGcx1.d.mts → DateField-CBCo8_d3.d.mts} +2 -2
- package/dist/DateField.d.mts +1 -1
- package/dist/{DatePicker-Bs9JODNg.d.mts → DatePicker-BZ4_I4Db.d.mts} +2 -2
- package/dist/{DatePicker-D2SfjS-N.mjs → DatePicker-DTT-mJ8r.mjs} +45 -34
- package/dist/DatePicker-DTT-mJ8r.mjs.map +1 -0
- package/dist/DatePicker.d.mts +1 -1
- package/dist/{DateRangePicker-BT6-j8V7.d.mts → DateRangePicker-BMKJquPT.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-dpGAmVlN.mjs → DropdownButton-DV5if_uG.mjs} +3 -3
- package/dist/{DropdownButton-dpGAmVlN.mjs.map → DropdownButton-DV5if_uG.mjs.map} +1 -1
- package/dist/DropdownButton.d.mts +2 -2
- package/dist/{DropdownMenu-RTxQ0Zu1.d.mts → DropdownMenu-CbhEzWy1.d.mts} +3 -3
- package/dist/{DropdownMenu-CyxizDxJ.mjs → DropdownMenu-DovtBJBs.mjs} +3 -3
- package/dist/{DropdownMenu-CyxizDxJ.mjs.map → DropdownMenu-DovtBJBs.mjs.map} +1 -1
- package/dist/DropdownMenu.d.mts +1 -1
- package/dist/{ErrorProps-C9T857Wk.d.mts → ErrorProps-7eWoxSes.d.mts} +1 -1
- package/dist/ErrorProps.d.mts +1 -1
- package/dist/{FieldRegistry-D6niLExM.d.mts → FieldRegistry-BslyuPZw.d.mts} +2 -2
- package/dist/FieldRegistry.d.mts +1 -1
- package/dist/{FilterBar-DfBV7yKM.d.mts → FilterBar-DjZE4PoB.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-DQFefbrI.mjs → FormControl-BvRzRknE.mjs} +6 -5
- package/dist/FormControl-BvRzRknE.mjs.map +1 -0
- package/dist/{FormControl-BMYRsFkI.d.mts → FormControl-gpLZZpNs.d.mts} +3 -3
- package/dist/FormControl.d.mts +1 -1
- package/dist/FormControlLabel.d.mts +2 -2
- package/dist/{FormField-C7bW-O6H.mjs → FormField-BDJ6zNE6.mjs} +14 -14
- package/dist/{FormField-C7bW-O6H.mjs.map → FormField-BDJ6zNE6.mjs.map} +1 -1
- package/dist/{FormField-C1DaUT5U.d.mts → FormField-CZXKvCGt.d.mts} +2 -2
- package/dist/FormField.d.mts +1 -1
- package/dist/{Header-BKk3qESS.d.mts → Header-1laYnwRP.d.mts} +2 -2
- package/dist/Header.d.mts +1 -1
- package/dist/{HelperTooltip-CD_yy7Hp.d.mts → HelperTooltip-BPJS3EwC.d.mts} +2 -2
- package/dist/HelperTooltip.d.mts +1 -1
- package/dist/{HoverCopyableField-Bgt639FR.mjs → HoverCopyableField-WP6DPjy1.mjs} +8 -8
- package/dist/{HoverCopyableField-Bgt639FR.mjs.map → HoverCopyableField-WP6DPjy1.mjs.map} +1 -1
- package/dist/{IconButton-BnSEV7eR.mjs → IconButton-CnJNIJVQ.mjs} +124 -25
- package/dist/IconButton-CnJNIJVQ.mjs.map +1 -0
- package/dist/{IconButton-Bh-JJ-0x.d.mts → IconButton-PnrnqQ1s.d.mts} +2 -2
- 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-D7of_GtJ.mjs → Input-DbfwNzS_.mjs} +11 -9
- package/dist/Input-DbfwNzS_.mjs.map +1 -0
- package/dist/{Input-1bDdMAgO.d.mts → Input-Diztxhle.d.mts} +5 -9
- package/dist/Input.d.mts +1 -1
- package/dist/{InputProps-BBShwi8N.d.mts → InputProps-BILq1X-n.d.mts} +2 -2
- package/dist/InputProps.d.mts +1 -1
- package/dist/IntegerValueControl.d.mts +1 -1
- package/dist/{ListBox-jzXQDraS.mjs → ListBox-CXh9Jfb-.mjs} +36 -28
- package/dist/ListBox-CXh9Jfb-.mjs.map +1 -0
- package/dist/{ListBox-DeFHRX2T.d.mts → ListBox-P1eTecdo.d.mts} +3 -3
- package/dist/ListBox.d.mts +1 -1
- package/dist/ListBoxField.d.mts +2 -2
- package/dist/{LoadingShimmer-a2Hv0kAq.mjs → LoadingShimmer-DeVCDCjT.mjs} +13 -5
- package/dist/LoadingShimmer-DeVCDCjT.mjs.map +1 -0
- package/dist/LoadingShimmer.d.mts +2 -2
- package/dist/{LogicRow-BOhB0uNS.d.mts → LogicRow-DtZYOzQ8.d.mts} +3 -3
- package/dist/LogicRow.d.mts +1 -1
- package/dist/MaskedInput.d.mts +2 -2
- package/dist/MatchHighlight.d.mts +1 -1
- package/dist/{Menu-DVI8l-4Q.mjs → Menu-CAGTCBqj.mjs} +42 -25
- package/dist/Menu-CAGTCBqj.mjs.map +1 -0
- package/dist/{Menu-BCVhmNEe.d.mts → Menu-_loh8pe3.d.mts} +4 -4
- package/dist/Menu.d.mts +1 -1
- package/dist/{MiddleTruncatedText-DnF7F_1D.mjs → MiddleTruncatedText-CO58jrNF.mjs} +2 -2
- package/dist/{MiddleTruncatedText-DnF7F_1D.mjs.map → MiddleTruncatedText-CO58jrNF.mjs.map} +1 -1
- package/dist/Modal.d.mts +4 -4
- package/dist/{PageHeader-BpGT-BM0.mjs → PageHeader-wpvRRTaa.mjs} +9 -6
- package/dist/PageHeader-wpvRRTaa.mjs.map +1 -0
- package/dist/PageHeader.d.mts +2 -2
- package/dist/PageLayout.d.mts +1 -1
- package/dist/{PageSelector-D6tffcGW.d.mts → PageSelector-CIa3Zts9.d.mts} +3 -3
- package/dist/PageSelector.d.mts +1 -1
- package/dist/{Pagination-BkjmybcI.d.mts → Pagination-C2eZEM7K.d.mts} +2 -2
- package/dist/{Pagination-CVRTcKSG.mjs → Pagination-wjr3W3xf.mjs} +9 -8
- package/dist/Pagination-wjr3W3xf.mjs.map +1 -0
- package/dist/Pagination.d.mts +1 -1
- package/dist/{Pii-CA7aCuYT.mjs → Pii-Bm-qkweh.mjs} +2 -2
- package/dist/{Pii-CA7aCuYT.mjs.map → Pii-Bm-qkweh.mjs.map} +1 -1
- package/dist/{PillShell-CVqpZ5iV.d.mts → PillShell-D6dN9sWk.d.mts} +2 -2
- package/dist/PillShell.d.mts +1 -1
- package/dist/{Popover-DlXyKYL5.mjs → Popover-DUyzmq3e.mjs} +9 -5
- package/dist/Popover-DUyzmq3e.mjs.map +1 -0
- package/dist/{PseudoClassProps-BPdn-ofQ.d.mts → PseudoClassProps-DnlHhW5u.d.mts} +1 -1
- package/dist/PseudoClassProps.d.mts +1 -1
- package/dist/{Radio-DYGEt0FT.mjs → Radio-CkugnL91.mjs} +21 -17
- package/dist/Radio-CkugnL91.mjs.map +1 -0
- package/dist/{RadioGroup-pegXtLwD.mjs → RadioGroup-8dI8gljw.mjs} +3 -3
- package/dist/{RadioGroup-pegXtLwD.mjs.map → RadioGroup-8dI8gljw.mjs.map} +1 -1
- package/dist/{RadioGroup-DYIfRj02.d.mts → RadioGroup-Dg_gydUp.d.mts} +1 -1
- package/dist/RadioGroup.d.mts +1 -1
- package/dist/RangeCalendar.d.mts +1 -1
- package/dist/RangeCalendarPresets.d.mts +1 -1
- package/dist/RuleEditorFields.d.mts +2 -2
- package/dist/RulesPill.d.mts +1 -1
- package/dist/{SearchInput-Dc90GLTF.d.mts → SearchInput-CNg109M5.d.mts} +2 -2
- package/dist/SearchInput.d.mts +1 -1
- package/dist/SectionHeading.d.mts +1 -1
- package/dist/{SegmentedControl-DIHonamg.d.mts → SegmentedControl-BBIHKcvo.d.mts} +1 -1
- package/dist/{SegmentedControl-DwbltwDQ.mjs → SegmentedControl-DQE0hN57.mjs} +9 -8
- package/dist/SegmentedControl-DQE0hN57.mjs.map +1 -0
- package/dist/SegmentedControl.d.mts +1 -1
- package/dist/{Select-CBVvPyRJ.mjs → Select-D9OVjzPR.mjs} +15 -14
- package/dist/Select-D9OVjzPR.mjs.map +1 -0
- package/dist/{Select-DwqWnWBi.d.mts → Select-wnr46ROZ.d.mts} +3 -3
- package/dist/Select.d.mts +1 -1
- package/dist/{Spacer-BsK8tTwA.mjs → Spacer-D58qwuXR.mjs} +2 -2
- package/dist/{Spacer-BsK8tTwA.mjs.map → Spacer-D58qwuXR.mjs.map} +1 -1
- package/dist/{Spinner-e725Rxkd.mjs → Spinner-gBNWIwOn.mjs} +6 -8
- package/dist/Spinner-gBNWIwOn.mjs.map +1 -0
- package/dist/{Stack-Bre2oiov.mjs → Stack-BqQndGI9.mjs} +2 -2
- package/dist/{Stack-Bre2oiov.mjs.map → Stack-BqQndGI9.mjs.map} +1 -1
- package/dist/{Stack-6eOrxjJi.d.mts → Stack-DgC83-nw.d.mts} +2 -2
- package/dist/Stack.d.mts +1 -1
- package/dist/{Sticker-By3F8Aip.mjs → Sticker-BDyejPZa.mjs} +159 -14
- package/dist/Sticker-BDyejPZa.mjs.map +1 -0
- package/dist/{Sticker-Ep6N4Exq.d.mts → Sticker-qvWkqEMw.d.mts} +5 -5
- package/dist/Sticker.d.mts +1 -1
- package/dist/StringValueControl.d.mts +1 -1
- package/dist/Tab.d.mts +3 -4
- package/dist/{TabBar-CWF65Tv4.mjs → TabBar-B__54oO3.mjs} +17 -16
- package/dist/TabBar-B__54oO3.mjs.map +1 -0
- package/dist/TabBarIconButton.d.mts +1 -5
- package/dist/{Table-BOcWdwpv.d.mts → Table-CPvIH27_.d.mts} +1 -1
- package/dist/{Table-nWd5ZVbm.mjs → Table-CqIi5mVF.mjs} +86 -39
- package/dist/Table-CqIi5mVF.mjs.map +1 -0
- package/dist/Table.d.mts +1 -1
- package/dist/{TableBody-BFPFaZnD.d.mts → TableBody-CQYijW_3.d.mts} +1 -1
- package/dist/TableBody.d.mts +1 -1
- package/dist/{TableBox-Bd-H5oyh.mjs → TableBox-C-8RxZT4.mjs} +56 -46
- package/dist/TableBox-C-8RxZT4.mjs.map +1 -0
- package/dist/TableBox.d.mts +2 -2
- package/dist/{TableBoxCell-Cjlc_xJz.d.mts → TableBoxCell-CQ3zT1jG.d.mts} +7 -7
- package/dist/TableBoxCell.d.mts +1 -1
- package/dist/TableBoxField.d.mts +3 -3
- package/dist/{TableBoxRow-CKDjNUsU.d.mts → TableBoxRow-ClK2pceY.d.mts} +3 -3
- package/dist/TableBoxRow.d.mts +1 -1
- package/dist/{TableBoxRowActions-BJ8ue3Bk.d.mts → TableBoxRowActions-CoF3DuUQ.d.mts} +2 -2
- package/dist/TableBoxRowActions.d.mts +1 -1
- package/dist/{index-CvBvfQAY.d.mts → TableCell-BQv4ASkE.d.mts} +5 -26
- package/dist/TableCell.d.mts +1 -1
- package/dist/{TableControls-D8xMNgyS.d.mts → TableControls-CtEL3ioz.d.mts} +3 -3
- package/dist/{TableControls-BnesnTue.mjs → TableControls-DplArh-9.mjs} +76 -64
- package/dist/TableControls-DplArh-9.mjs.map +1 -0
- package/dist/TableControls.d.mts +1 -1
- package/dist/{TableControlsContext-ChFsFEjR.d.mts → TableControlsContext-X-Lupvc6.d.mts} +2 -2
- package/dist/TableControlsContext.d.mts +1 -1
- package/dist/{TableHead-CWDxuy5V.d.mts → TableHead-DLLn0zoP.d.mts} +1 -1
- package/dist/TableHead.d.mts +1 -1
- package/dist/{TableHeaderCell-C_sIU1d7.d.mts → TableHeaderCell-DiJ2jyw4.d.mts} +3 -1
- package/dist/TableHeaderCell.d.mts +1 -1
- package/dist/{TableLayout-CgGhKU_A.d.mts → TableLayout-BgnUz8NO.d.mts} +1 -1
- package/dist/TableLayout.d.mts +1 -1
- package/dist/{TableRow-B1UKlbze.d.mts → TableRow-Dgg8hGy5.d.mts} +2 -2
- package/dist/TableRow.d.mts +1 -1
- package/dist/TableTH.d.mts +1 -1
- package/dist/{TableViewConfigurationDropdown-BqB7pOh8.d.mts → TableViewConfigurationDropdown-DRxd562-.d.mts} +2 -2
- package/dist/TableViewConfigurationDropdown.d.mts +1 -1
- package/dist/{TechnicalSticker-Ct2WnNzJ.mjs → TechnicalSticker-D6MO_IfT.mjs} +27 -22
- package/dist/TechnicalSticker-D6MO_IfT.mjs.map +1 -0
- package/dist/{Text-B0orb-cZ.mjs → Text-Dn_p7ZvT.mjs} +16 -12
- package/dist/Text-Dn_p7ZvT.mjs.map +1 -0
- package/dist/{Text-BzzUdBdc.d.mts → Text-tgFz40XD.d.mts} +4 -4
- package/dist/Text.d.mts +1 -1
- package/dist/{TextArea-CGpY5xqX.d.mts → TextArea-BxxXQSwP.d.mts} +2 -2
- package/dist/{TextArea-CospIXEO.mjs → TextArea-CYirq-B2.mjs} +2 -2
- package/dist/{TextArea-CospIXEO.mjs.map → TextArea-CYirq-B2.mjs.map} +1 -1
- package/dist/TextArea.d.mts +1 -1
- package/dist/{TextUnderlineTooltip-DZYGjJq1.d.mts → TextUnderlineTooltip-DQVYsLqM.d.mts} +3 -3
- package/dist/TextUnderlineTooltip.d.mts +1 -1
- package/dist/Tile.d.mts +1 -1
- package/dist/Toast.d.mts +1 -1
- package/dist/{Toggle-BjAivdyX.d.mts → Toggle-BmUl78kH.d.mts} +1 -1
- package/dist/{Toggle-Do5z1VcO.mjs → Toggle-CqgFNIYS.mjs} +19 -10
- package/dist/Toggle-CqgFNIYS.mjs.map +1 -0
- package/dist/Toggle.d.mts +1 -1
- package/dist/{Tooltip-DSKGD33G.mjs → Tooltip-BsuYG0fw.mjs} +12 -9
- package/dist/Tooltip-BsuYG0fw.mjs.map +1 -0
- package/dist/{Tooltip-n3XkX4dp.d.mts → Tooltip-eSaiYjxT.d.mts} +3 -3
- package/dist/Tooltip.d.mts +1 -1
- package/dist/{TruncatedText-C-MJPIRi.d.mts → TruncatedText-B2v53Y11.d.mts} +2 -2
- package/dist/{codec-B0dZTwlG.d.mts → codec-D5qlDVgU.d.mts} +2 -2
- package/dist/codec.d.mts +1 -1
- package/dist/color-fQTsW4gq.d.mts +20 -0
- package/dist/components/Attribute/index.mjs +34 -9
- package/dist/components/Attribute/index.mjs.map +1 -1
- package/dist/components/Badge/index.mjs +1 -1
- package/dist/components/Banner/index.mjs +19 -8
- package/dist/components/Banner/index.mjs.map +1 -1
- package/dist/components/BottomPanel/index.mjs +4 -4
- package/dist/components/Breadcrumbs/index.d.mts +1 -1
- package/dist/components/Breadcrumbs/index.mjs +1 -1
- package/dist/components/Button/index.d.mts +2 -2
- package/dist/components/Button/index.mjs +1 -1
- package/dist/components/ButtonGroup/index.mjs +12 -4
- package/dist/components/ButtonGroup/index.mjs.map +1 -1
- package/dist/components/Card/index.d.mts +2 -2
- package/dist/components/Card/index.mjs +1 -1
- 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/CodeHighlight/PrismWithLanguages.d.mts +2 -0
- package/dist/components/CodeHighlight/PrismWithLanguages.mjs +48 -0
- package/dist/components/CodeHighlight/PrismWithLanguages.mjs.map +1 -0
- package/dist/components/CodeHighlight/index.d.mts +2 -0
- package/dist/components/CodeHighlight/index.mjs +381 -0
- package/dist/components/CodeHighlight/index.mjs.map +1 -0
- package/dist/components/Combobox/index.d.mts +2 -2
- package/dist/components/Combobox/index.mjs +1 -1
- package/dist/components/ConfigFormGroup/index.mjs +1 -1
- 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 +84 -44
- 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 +4 -4
- package/dist/components/DatePicker/index.mjs +1 -1
- package/dist/components/DropdownButton/index.mjs +1 -1
- package/dist/components/DropdownMenu/index.d.mts +1 -1
- package/dist/components/DropdownMenu/index.mjs +1 -1
- package/dist/components/FloatingPanel/index.mjs +5 -5
- package/dist/components/FormControl/index.d.mts +2 -2
- package/dist/components/FormControl/index.mjs +1 -1
- package/dist/components/FormField/index.d.mts +1 -1
- package/dist/components/FormField/index.mjs +1 -1
- package/dist/components/Grid/index.mjs +1 -1
- package/dist/components/HoverCopyableField/index.mjs +1 -1
- package/dist/components/ImageTile/index.mjs +18 -17
- package/dist/components/ImageTile/index.mjs.map +1 -1
- package/dist/components/Input/index.d.mts +1 -1
- package/dist/components/Input/index.mjs +1 -1
- package/dist/components/Link/index.mjs +7 -8
- 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/MatchHighlight/index.mjs +6 -4
- package/dist/components/MatchHighlight/index.mjs.map +1 -1
- package/dist/components/Menu/index.d.mts +1 -1
- package/dist/components/Menu/index.mjs +1 -1
- package/dist/components/Modal/index.mjs +10 -8
- package/dist/components/Modal/index.mjs.map +1 -1
- package/dist/components/PageHeader/index.mjs +1 -1
- package/dist/components/Pagination/index.d.mts +3 -3
- package/dist/components/Pagination/index.mjs +1 -1
- package/dist/components/Pii/index.mjs +1 -1
- package/dist/components/Popover/index.mjs +1 -1
- package/dist/components/ProgressBar/index.mjs +16 -19
- package/dist/components/ProgressBar/index.mjs.map +1 -1
- package/dist/components/ProgressIndicator/index.mjs +25 -19
- package/dist/components/ProgressIndicator/index.mjs.map +1 -1
- 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 +5 -5
- 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/Slider/index.mjs +22 -13
- package/dist/components/Slider/index.mjs.map +1 -1
- package/dist/components/SmartTextInput/PillType.d.mts +10 -0
- package/dist/components/SmartTextInput/PillType.mjs +31 -0
- package/dist/components/SmartTextInput/PillType.mjs.map +1 -0
- package/dist/components/SmartTextInput/parser/method-chain/parser.d.mts +21 -0
- package/dist/components/SmartTextInput/parser/method-chain/parser.mjs +2 -0
- package/dist/components/SmartTextInput/parser/method-chain/types.d.mts +105 -0
- package/dist/components/SmartTextInput/parser/method-chain/types.mjs +31 -0
- package/dist/components/SmartTextInput/parser/method-chain/types.mjs.map +1 -0
- package/dist/components/SmartTextInput/parser/smart-text/parser.d.mts +17 -0
- package/dist/components/SmartTextInput/parser/smart-text/parser.mjs +814 -0
- package/dist/components/SmartTextInput/parser/smart-text/parser.mjs.map +1 -0
- package/dist/components/SmartTextInput/parser/smart-text/types.d.mts +72 -0
- package/dist/components/SmartTextInput/parser/smart-text/types.mjs +38 -0
- package/dist/components/SmartTextInput/parser/smart-text/types.mjs.map +1 -0
- package/dist/components/Spacer/index.mjs +1 -1
- package/dist/components/Spinner/index.mjs +1 -1
- package/dist/components/Stack/index.d.mts +1 -1
- package/dist/components/Stack/index.mjs +1 -1
- package/dist/components/StatusIndicator/index.mjs +112 -13
- package/dist/components/StatusIndicator/index.mjs.map +1 -1
- package/dist/components/Sticker/index.d.mts +1 -1
- package/dist/components/Sticker/index.mjs +1 -1
- package/dist/components/SwatchPicker/index.mjs +5 -4
- package/dist/components/SwatchPicker/index.mjs.map +1 -1
- package/dist/components/TabBar/index.mjs +1 -1
- package/dist/components/Table/index.d.mts +8 -7
- 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/Text/index.mjs +1 -1
- package/dist/components/TextArea/index.d.mts +1 -1
- package/dist/components/TextArea/index.mjs +1 -1
- package/dist/components/Tile/index.mjs +9 -8
- package/dist/components/Tile/index.mjs.map +1 -1
- package/dist/components/Toast/index.mjs +18 -12
- package/dist/components/Toast/index.mjs.map +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/Tooltip/index.mjs +1 -1
- package/dist/compound-expression.d.mts +1 -1
- package/dist/{constants-Bs94Jw4y.d.mts → constants-zZyl7QbX.d.mts} +1 -1
- package/dist/constants.d.mts +1 -1
- package/dist/{date-filter-BbWgAXy3.mjs → date-filter-DMZnJwGs.mjs} +1 -1
- package/dist/{date-filter-BbWgAXy3.mjs.map → date-filter-DMZnJwGs.mjs.map} +1 -1
- package/dist/{date-range-rule-value-DBEEWTQp.d.mts → date-range-rule-value-zJaa_jR9.d.mts} +2 -2
- package/dist/date-range-rule-value.d.mts +1 -1
- package/dist/{date-rule-intent-BArNGT2E.d.mts → date-rule-intent-CdWv68my.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/fieldSchemaTypes-COEJOqYL.d.mts +39 -0
- package/dist/{filter-size-context-D1UhTwOG.d.mts → filter-size-context-DYkfYMkX.d.mts} +2 -2
- package/dist/filter-size-context.d.mts +1 -1
- package/dist/helpers.d.mts +1 -1
- package/dist/{index-I_Cy3X5R.d.mts → index-BJr_obTf.d.mts} +3 -3
- package/dist/{index-DASkW991.d.mts → index-BX8dSNcy.d.mts} +2 -2
- package/dist/index-DxIXll2Z.d.mts +21 -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-M7BEIewR.d.mts → input-DN_8iHVD.d.mts} +3 -3
- package/dist/inputFields.d.mts +10 -10
- package/dist/jsonSchema-B1VonQij.d.mts +222 -0
- package/dist/lib/GlobalStyles.mjs +1 -1
- package/dist/lib/HeadlessAriaButton.d.mts +1 -2
- package/dist/lib/HeadlessAriaButton.mjs +1 -1
- package/dist/lib/MiddleTruncatedText.mjs +1 -1
- package/dist/lib/PDSProvider.d.mts +1 -1
- package/dist/lib/PDSProvider.mjs +1 -1
- package/dist/lib/TruncatedText.d.mts +1 -1
- package/dist/lib/TruncatedText.mjs +1 -1
- package/dist/lib/TruncatedTextWithTooltip.d.mts +1 -1
- package/dist/lib/TruncatedTextWithTooltip.mjs +1 -1
- package/dist/lib/color.d.mts +2 -0
- package/dist/lib/color.mjs +21 -0
- package/dist/lib/color.mjs.map +1 -0
- package/dist/lib/date-filter/index.d.mts +2 -2
- package/dist/lib/date-filter/index.mjs +1 -1
- package/dist/lib/errorReporter.d.mts +7 -0
- package/dist/lib/errorReporter.mjs +15 -0
- package/dist/lib/errorReporter.mjs.map +1 -0
- package/dist/lib/fieldSchemaTypes.d.mts +2 -0
- package/dist/lib/fieldSchemaTypes.mjs +41 -0
- package/dist/lib/fieldSchemaTypes.mjs.map +1 -0
- package/dist/lib/jsonSchema.d.mts +2 -0
- package/dist/lib/jsonSchema.mjs +260 -0
- package/dist/lib/jsonSchema.mjs.map +1 -0
- package/dist/lib/message.d.mts +1 -1
- package/dist/lib/methodChain.d.mts +66 -0
- package/dist/lib/methodChain.mjs +239 -0
- package/dist/lib/methodChain.mjs.map +1 -0
- package/dist/lib/methodChainNormalize.d.mts +14 -0
- package/dist/lib/methodChainNormalize.mjs +53 -0
- package/dist/lib/methodChainNormalize.mjs.map +1 -0
- package/dist/lib/methodChainTypes.d.mts +23 -0
- package/dist/lib/methodChainTypes.mjs +0 -0
- package/dist/lib/objectSchemaTypes.d.mts +2 -0
- package/dist/lib/objectSchemaTypes.mjs +0 -0
- package/dist/lib/pseudoClass.d.mts +1 -1
- package/dist/lib/selectHelper.mjs.map +1 -1
- package/dist/lib/semanticColor.d.mts +2 -0
- package/dist/lib/semanticColor.mjs +17 -0
- package/dist/lib/semanticColor.mjs.map +1 -0
- package/dist/lib/useControlled.mjs.map +1 -1
- package/dist/{message-CyxgAWZl.d.mts → message-DfEpU8lV.d.mts} +1 -1
- package/dist/mixins/focus.d.mts +4 -4
- package/dist/mixins/focus.mjs +7 -5
- package/dist/mixins/focus.mjs.map +1 -1
- package/dist/mixins/hoverable.d.mts +2 -2
- package/dist/mixins/hoverable.mjs +2 -2
- package/dist/mixins/input.d.mts +1 -1
- package/dist/mixins/input.mjs +56 -23
- package/dist/mixins/input.mjs.map +1 -1
- package/dist/mixins/menuItem.d.mts +2 -2
- package/dist/mixins/menuItem.mjs +78 -50
- package/dist/mixins/menuItem.mjs.map +1 -1
- package/dist/mixins/print/index.mjs +4 -2
- package/dist/mixins/print/index.mjs.map +1 -1
- package/dist/mixins/text.d.mts +1 -1
- package/dist/mixins/text.mjs +1 -1
- package/dist/{operators-CXkmvFpP.d.mts → operators-F8X0hyQB.d.mts} +2 -2
- package/dist/operators.d.mts +1 -1
- package/dist/palette-BANY1Xfs.d.mts +21 -0
- package/dist/palette.d.mts +2 -0
- package/dist/parser-Kxos6siN.mjs +2156 -0
- package/dist/parser-Kxos6siN.mjs.map +1 -0
- package/dist/patterns/LayoutLoadingShimmer/index.mjs +6 -6
- package/dist/patterns/LayoutLoadingSpinner/index.mjs +1 -1
- package/dist/patterns/PageLayout/index.mjs +1 -1
- package/dist/relative-date-label.d.mts +1 -1
- package/dist/semantic-Dy7mTyBP.d.mts +133 -0
- package/dist/semanticColor-DkVQjcbc.d.mts +29 -0
- package/dist/{styledComponentsInterop-8zScIQyC.mjs → styledComponentsInterop-NxwFjeA4.mjs} +2 -2
- package/dist/{styledComponentsInterop-8zScIQyC.mjs.map → styledComponentsInterop-NxwFjeA4.mjs.map} +1 -1
- package/dist/{text-DjTGRUM1.d.mts → text-BaQdW8qa.d.mts} +1 -1
- package/dist/{theme-Biwx2eJZ.d.mts → theme-D02MOaH6.d.mts} +22 -5
- package/dist/theme.d.mts +2 -2
- package/dist/theme.mjs +22 -1
- package/dist/theme.mjs.map +1 -1
- package/dist/tone.d.mts +17 -0
- package/dist/{types-V8UJX-rk.d.mts → types-1_JSe9Wr.d.mts} +2 -2
- package/dist/{types-DBBfOCX1.d.mts → types-C2s9yhgO.d.mts} +2 -2
- package/dist/{types-Bsf1VsW6.d.mts → types-COeginAF.d.mts} +1 -1
- package/dist/{types-Df0D37uh.d.mts → types-CtLY82w5.d.mts} +1 -1
- package/dist/{types-Ds43XULD.d.mts → types-Ok2lRZeu.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/{url-state-M64mdtQ2.d.mts → url-state-DP78aDol.d.mts} +2 -2
- package/dist/url-state.d.mts +1 -1
- package/dist/useComboboxFooterAction.d.mts +1 -1
- package/dist/{useFilterStateV2-gALqONXf.d.mts → useFilterStateV2-DC2rGXHK.d.mts} +3 -3
- package/dist/useFilterStateV2.d.mts +1 -1
- package/dist/{useFormField-Bo7oHMof.d.mts → useFormField--_14te0K.d.mts} +2 -2
- package/dist/useFormField.d.mts +1 -1
- package/dist/{useTableBoxDragAndDrop-BrJFRSaG.d.mts → useTableBoxDragAndDrop-DkCxC7Mi.d.mts} +1 -1
- package/dist/useTableBoxDragAndDrop.d.mts +1 -1
- package/dist/{useToggle-Bo3yd14Y.mjs → useToggle-0zLL1E7s.mjs} +1 -1
- package/dist/{useToggle-Bo3yd14Y.mjs.map → useToggle-0zLL1E7s.mjs.map} +1 -1
- package/dist/useTruncation.d.mts +1 -1
- package/dist/{utilities-BHMNnJ8h.d.mts → utilities-C1hOxjt_.d.mts} +1 -1
- package/dist/utilities.d.mts +1 -1
- package/dist/utils/storybook.mjs +1 -1
- package/dist/utils/storybook.mjs.map +1 -1
- package/dist/utils/testing.mjs.map +1 -1
- package/dist/utils.d.mts +1 -1
- package/dist/{validation-BCBIvN6H.d.mts → validation-CpDsI-TM.d.mts} +3 -3
- package/dist/validation.d.mts +1 -1
- package/dist/{value-control-resolver-qKTH1ErF.d.mts → value-control-resolver-DhaqxKmK.d.mts} +2 -2
- package/dist/value-control-resolver.d.mts +1 -1
- package/dist/variables/effect.d.mts +14 -3
- package/dist/variables/effect.mjs +5 -3
- package/dist/variables/effect.mjs.map +1 -1
- package/dist/variables/keyframes.mjs +1 -1
- package/dist/variables/semantic.d.mts +2 -0
- package/dist/variables/semantic.mjs +241 -0
- package/dist/variables/semantic.mjs.map +1 -0
- package/package.json +68 -7
- package/skills/ui-authoring/COMPONENTS.md +1 -1
- package/skills/ui-authoring/TOKENS.md +1 -1
- package/dist/Breadcrumbs-BEYQlGbW.mjs.map +0 -1
- package/dist/Card-BoGV5tY2.d.mts +0 -52
- package/dist/Card-CKrJtn1f.mjs.map +0 -1
- package/dist/CardV2-B2wx1NE3.mjs.map +0 -1
- package/dist/Checkbox-DwZEsi7x.mjs.map +0 -1
- package/dist/Combobox-CKaVX-32.mjs.map +0 -1
- package/dist/DatePicker-D2SfjS-N.mjs.map +0 -1
- package/dist/FormControl-DQFefbrI.mjs.map +0 -1
- package/dist/IconButton-BnSEV7eR.mjs.map +0 -1
- package/dist/Input-D7of_GtJ.mjs.map +0 -1
- package/dist/ListBox-jzXQDraS.mjs.map +0 -1
- package/dist/LoadingShimmer-a2Hv0kAq.mjs.map +0 -1
- package/dist/Menu-DVI8l-4Q.mjs.map +0 -1
- package/dist/PageHeader-BpGT-BM0.mjs.map +0 -1
- package/dist/Pagination-CVRTcKSG.mjs.map +0 -1
- package/dist/Popover-DlXyKYL5.mjs.map +0 -1
- package/dist/Radio-DYGEt0FT.mjs.map +0 -1
- package/dist/SegmentedControl-DwbltwDQ.mjs.map +0 -1
- package/dist/Select-CBVvPyRJ.mjs.map +0 -1
- package/dist/Spinner-e725Rxkd.mjs.map +0 -1
- package/dist/Sticker-By3F8Aip.mjs.map +0 -1
- package/dist/TabBar-CWF65Tv4.mjs.map +0 -1
- package/dist/Table-nWd5ZVbm.mjs.map +0 -1
- package/dist/TableBox-Bd-H5oyh.mjs.map +0 -1
- package/dist/TableControls-BnesnTue.mjs.map +0 -1
- package/dist/TechnicalSticker-Ct2WnNzJ.mjs.map +0 -1
- package/dist/Text-B0orb-cZ.mjs.map +0 -1
- package/dist/Toggle-Do5z1VcO.mjs.map +0 -1
- package/dist/Tooltip-DSKGD33G.mjs.map +0 -1
- /package/dist/{index-8SLBz2NH.d.mts → index-1-AkepUA.d.mts} +0 -0
- /package/dist/{index-Bt4QNofW.d.mts → index-BFnNtGdX.d.mts} +0 -0
- /package/dist/{index-BwAfCVZH2.d.mts → index-BO_854F2.d.mts} +0 -0
- /package/dist/{index-BwFl_eS0.d.mts → index-BPiqSRRl.d.mts} +0 -0
- /package/dist/{index-CCKHlTA4.d.mts → index-BSVhZrWN.d.mts} +0 -0
- /package/dist/{index-CDGG7lCB.d.mts → index-BYd3Btr1.d.mts} +0 -0
- /package/dist/{index-CRo77wc3.d.mts → index-B_BBnMou.d.mts} +0 -0
- /package/dist/{index-CX869wwk.d.mts → index-BrGZHEgX.d.mts} +0 -0
- /package/dist/{index-D13oYj4_.d.mts → index-Ci-uuV07.d.mts} +0 -0
- /package/dist/{index-D4DUvwPf.d.mts → index-CknANNvQ2.d.mts} +0 -0
- /package/dist/{index-D7UbuJwP.d.mts → index-CtJuGxUp.d.mts} +0 -0
- /package/dist/{index-DA6_cwf8.d.mts → index-CuYZJcK3.d.mts} +0 -0
- /package/dist/{index-DMRtRo7y.d.mts → index-DWfPppPU.d.mts} +0 -0
- /package/dist/{index-Dflz2i1X.d.mts → index-DYX_PQ7T2.d.mts} +0 -0
- /package/dist/{index-DvmLVvRD.d.mts → index-DZlqSwCF.d.mts} +0 -0
- /package/dist/{index-Es5nKSSL.d.mts → index-De7MV8-j.d.mts} +0 -0
- /package/dist/{index-Wc1llEvP.d.mts → index-Deol7ZWO.d.mts} +0 -0
- /package/dist/{index-dhjtMp5F.d.mts → index-N-OgGgfF.d.mts} +0 -0
- /package/dist/{index-e6k85DKM.d.mts → index-VWno75SQ.d.mts} +0 -0
- /package/dist/{index-ehD5GjMH.d.mts → index-hcx6LMSC.d.mts} +0 -0
|
@@ -1,17 +1,93 @@
|
|
|
1
|
-
import { a as styled, r as css } from "./styledComponentsInterop-
|
|
1
|
+
import { a as styled, r as css } from "./styledComponentsInterop-NxwFjeA4.mjs";
|
|
2
|
+
import { semanticColor, semanticOnly, semanticTokens } from "./lib/semanticColor.mjs";
|
|
3
|
+
import { paragraphMixins } from "./mixins/text.mjs";
|
|
4
|
+
import { t as useToggle } from "./useToggle-0zLL1E7s.mjs";
|
|
5
|
+
import { rotate } from "./variables/keyframes.mjs";
|
|
6
|
+
import "./variables/transitions.mjs";
|
|
7
|
+
import { opacityOf, transparent, withAlpha } from "./lib/color.mjs";
|
|
2
8
|
import { isDisabled, isHovered, isNotDisabled } from "./lib/pseudoClass.mjs";
|
|
3
9
|
import { focusOutlineControlled } from "./mixins/focus.mjs";
|
|
4
|
-
import "./variables/transitions.mjs";
|
|
5
10
|
import { printMixins } from "./mixins/print/index.mjs";
|
|
6
|
-
import { paragraphMixins } from "./mixins/text.mjs";
|
|
7
|
-
import { t as useToggle } from "./useToggle-Bo3yd14Y.mjs";
|
|
8
|
-
import { rotate } from "./variables/keyframes.mjs";
|
|
9
11
|
import { BorderRadius, Color, Spacing } from "@persona/design-tokens";
|
|
10
12
|
import { forwardRef, useCallback } from "react";
|
|
11
13
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
12
14
|
import { LoaderIcon } from "@persona/icons";
|
|
13
|
-
import { Link } from "react-router-dom";
|
|
14
15
|
import { isEmpty, isFunction } from "lodash-es";
|
|
16
|
+
import { Link } from "react-router-dom";
|
|
17
|
+
//#region components/Button/palette.ts
|
|
18
|
+
const buildSemanticPalettes = (tokens) => {
|
|
19
|
+
const neutral = {
|
|
20
|
+
hover: tokens.ActionNeutralHover,
|
|
21
|
+
active: tokens.ActionNeutralActive,
|
|
22
|
+
text: tokens.FgPrimary,
|
|
23
|
+
textDisabled: tokens.FgDisabled,
|
|
24
|
+
iconDisabled: tokens.FgDisabled,
|
|
25
|
+
highlightDark: tokens.FgDisabled
|
|
26
|
+
};
|
|
27
|
+
return {
|
|
28
|
+
basic: {
|
|
29
|
+
...neutral,
|
|
30
|
+
default: tokens.ActionNeutral,
|
|
31
|
+
disabled: withAlpha(tokens.ActionNeutral, tokens.Opacity65)
|
|
32
|
+
},
|
|
33
|
+
text: {
|
|
34
|
+
...neutral,
|
|
35
|
+
default: transparent,
|
|
36
|
+
disabled: transparent
|
|
37
|
+
},
|
|
38
|
+
outline: {
|
|
39
|
+
...neutral,
|
|
40
|
+
default: transparent,
|
|
41
|
+
hover: tokens.ActionOutlineHover,
|
|
42
|
+
active: tokens.ActionOutlineActive,
|
|
43
|
+
disabled: transparent
|
|
44
|
+
},
|
|
45
|
+
primary: {
|
|
46
|
+
default: tokens.ActionPrimary,
|
|
47
|
+
hover: tokens.ActionPrimaryHover,
|
|
48
|
+
active: tokens.ActionPrimaryActive,
|
|
49
|
+
disabled: tokens.ActionPrimary,
|
|
50
|
+
text: tokens.FgInverse,
|
|
51
|
+
textDisabled: tokens.FgInverse,
|
|
52
|
+
iconDisabled: tokens.FgInverse,
|
|
53
|
+
highlightDark: tokens.FgInverse
|
|
54
|
+
},
|
|
55
|
+
danger: {
|
|
56
|
+
default: tokens.ActionDanger,
|
|
57
|
+
hover: tokens.ActionDangerHover,
|
|
58
|
+
active: tokens.ActionDangerActive,
|
|
59
|
+
disabled: tokens.ActionDanger,
|
|
60
|
+
text: tokens.FgInverse,
|
|
61
|
+
textDisabled: tokens.FgInverse,
|
|
62
|
+
iconDisabled: tokens.FgInverse,
|
|
63
|
+
highlightDark: tokens.FgInverse
|
|
64
|
+
},
|
|
65
|
+
inverse: {
|
|
66
|
+
default: tokens.ActionInverse,
|
|
67
|
+
hover: tokens.ActionInverseHover,
|
|
68
|
+
active: tokens.ActionInverseActive,
|
|
69
|
+
disabled: withAlpha(tokens.ActionInverse, tokens.Opacity65),
|
|
70
|
+
text: tokens.FgPrimaryStatic,
|
|
71
|
+
textDisabled: withAlpha(tokens.FgPrimaryStatic, tokens.Opacity65),
|
|
72
|
+
iconDisabled: withAlpha(tokens.FgPrimaryStatic, tokens.Opacity65),
|
|
73
|
+
highlightDark: tokens.ActionNeutralActive
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
const semanticPaletteCache = /* @__PURE__ */ new WeakMap();
|
|
78
|
+
const semanticPalettes = (tokens) => {
|
|
79
|
+
let palettes = semanticPaletteCache.get(tokens);
|
|
80
|
+
if (!palettes) {
|
|
81
|
+
palettes = buildSemanticPalettes(tokens);
|
|
82
|
+
semanticPaletteCache.set(tokens, palettes);
|
|
83
|
+
}
|
|
84
|
+
return palettes;
|
|
85
|
+
};
|
|
86
|
+
const buttonPalette = (theme, variant) => {
|
|
87
|
+
const tokens = semanticTokens(theme);
|
|
88
|
+
return tokens ? semanticPalettes(tokens)[variant] : theme.color.variants[variant];
|
|
89
|
+
};
|
|
90
|
+
//#endregion
|
|
15
91
|
//#region components/Button/Button.tsx
|
|
16
92
|
const noop$1 = () => void 0;
|
|
17
93
|
const isActive = ({ active }) => active ? "" : ":active:enabled";
|
|
@@ -67,14 +143,23 @@ const StyledButton = styled.button.attrs(({ to, target }) => {
|
|
|
67
143
|
border: none;
|
|
68
144
|
box-sizing: border-box;
|
|
69
145
|
white-space: nowrap;
|
|
70
|
-
${({ theme, variant }) => {
|
|
71
|
-
const palette = theme
|
|
146
|
+
${({ theme, variant = "primary" }) => {
|
|
147
|
+
const palette = buttonPalette(theme, variant);
|
|
148
|
+
const tokens = semanticTokens(theme);
|
|
72
149
|
return css`
|
|
73
150
|
&:disabled {
|
|
74
151
|
background-color: ${palette.disabled};
|
|
75
152
|
color: ${palette.textDisabled};
|
|
153
|
+
${tokens && (variant === "primary" || variant === "danger") && css`
|
|
154
|
+
opacity: ${opacityOf(tokens.Opacity65)};
|
|
155
|
+
`}
|
|
156
|
+
${palette.iconDisabled && css`
|
|
157
|
+
svg {
|
|
158
|
+
color: ${palette.iconDisabled};
|
|
159
|
+
}
|
|
160
|
+
`}
|
|
76
161
|
svg path {
|
|
77
|
-
stroke: ${palette.textDisabled};
|
|
162
|
+
stroke: ${palette.iconDisabled ?? palette.textDisabled};
|
|
78
163
|
}
|
|
79
164
|
|
|
80
165
|
/* For backwards compatibility with current coloring scheme (targeting stroke property) */
|
|
@@ -94,8 +179,8 @@ const StyledButton = styled.button.attrs(({ to, target }) => {
|
|
|
94
179
|
`;
|
|
95
180
|
}}
|
|
96
181
|
|
|
97
|
-
${({ variant }) => variant === "outline" && css`
|
|
98
|
-
border: 1px solid ${(
|
|
182
|
+
${({ theme, variant }) => variant === "outline" && css`
|
|
183
|
+
border: 1px solid ${semanticColor(theme, "BorderDefault", theme.color.border.input)};
|
|
99
184
|
`}
|
|
100
185
|
|
|
101
186
|
display: flex;
|
|
@@ -118,15 +203,24 @@ const StyledButton = styled.button.attrs(({ to, target }) => {
|
|
|
118
203
|
}}
|
|
119
204
|
|
|
120
205
|
/* Variant styling */
|
|
121
|
-
${({ theme, variant, $isPending, $onSecondaryBackground }) => {
|
|
122
|
-
let palette = theme
|
|
123
|
-
if (variant === "basic" && $onSecondaryBackground)
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
206
|
+
${({ theme, variant = "primary", $isPending, $onSecondaryBackground }) => {
|
|
207
|
+
let palette = buttonPalette(theme, variant);
|
|
208
|
+
if (variant === "basic" && $onSecondaryBackground) {
|
|
209
|
+
const tokens = semanticTokens(theme);
|
|
210
|
+
palette = tokens ? {
|
|
211
|
+
...palette,
|
|
212
|
+
default: tokens.ActionNeutralHover,
|
|
213
|
+
hover: tokens.ActionNeutralActive,
|
|
214
|
+
active: tokens.ActionNeutralActive,
|
|
215
|
+
disabled: withAlpha(tokens.ActionNeutralHover, tokens.Opacity65)
|
|
216
|
+
} : {
|
|
217
|
+
...palette,
|
|
218
|
+
default: Color.CoreSlate300,
|
|
219
|
+
hover: Color.CoreSlate400,
|
|
220
|
+
active: Color.CoreSlate400,
|
|
221
|
+
disabled: Color.CoreSlate100
|
|
222
|
+
};
|
|
223
|
+
}
|
|
130
224
|
return css`
|
|
131
225
|
background-color: ${palette.default};
|
|
132
226
|
color: ${palette.text};
|
|
@@ -162,10 +256,9 @@ const StyledButton = styled.button.attrs(({ to, target }) => {
|
|
|
162
256
|
cursor: default;
|
|
163
257
|
background-color: ${palette.active};
|
|
164
258
|
&:disabled {
|
|
165
|
-
background-color: ${(
|
|
166
|
-
return theme.color.variants[variant].active;
|
|
167
|
-
}};
|
|
259
|
+
background-color: ${buttonPalette(theme, variant).active};
|
|
168
260
|
user-select: none;
|
|
261
|
+
${semanticOnly(() => "opacity: 1;")}
|
|
169
262
|
}
|
|
170
263
|
|
|
171
264
|
svg path {
|
|
@@ -315,6 +408,12 @@ const IconBtn = styled(Button).attrs({
|
|
|
315
408
|
padding: 0;
|
|
316
409
|
border-radius: ${BorderRadius.Md};
|
|
317
410
|
|
|
411
|
+
${semanticOnly(() => css`
|
|
412
|
+
&:disabled {
|
|
413
|
+
background-color: transparent;
|
|
414
|
+
}
|
|
415
|
+
`)}
|
|
416
|
+
|
|
318
417
|
${({ size }) => css`
|
|
319
418
|
height: ${BUTTON_SIZE_MAP[size]};
|
|
320
419
|
width: ${BUTTON_SIZE_MAP[size]};
|
|
@@ -336,6 +435,6 @@ const IconButton = forwardRef(function IconButton({ size = "xs", ...props }, ref
|
|
|
336
435
|
});
|
|
337
436
|
});
|
|
338
437
|
//#endregion
|
|
339
|
-
export { SuffixIconContainer as a, StyledButton as i, Button as n, ButtonChildren as r, IconButton as t };
|
|
438
|
+
export { SuffixIconContainer as a, StyledButton as i, Button as n, buttonPalette as o, ButtonChildren as r, IconButton as t };
|
|
340
439
|
|
|
341
|
-
//# sourceMappingURL=IconButton-
|
|
440
|
+
//# sourceMappingURL=IconButton-CnJNIJVQ.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IconButton-CnJNIJVQ.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 MouseEvent,\n type ReactNode,\n type Ref,\n useCallback,\n} from 'react';\nimport { Link, type LinkProps } from 'react-router-dom';\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 { 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: Link,\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 * Pass a relative path to use `react-router-dom` `<Link>`, or an absolute\n * `https://` URL to render an `<a>` tag that opens in a new tab.\n */\n to?: LinkProps['to'];\n\n /**\n * Overrides the target of the link if `to` is provided and is an external link.\n */\n target?: LinkProps['target'];\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 ...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\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 {...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":"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"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as ButtonProps } from "./Button-
|
|
1
|
+
import { r as ButtonProps } from "./Button-CTgyA3gc.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-PnrnqQ1s.d.mts.map
|
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-PnrnqQ1s.mjs";
|
|
2
2
|
export { IconButtonProps, IconButton as default };
|
package/dist/ImageTile.d.mts
CHANGED
package/dist/InlineInput.d.mts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { a as styled, r as css } from "./styledComponentsInterop-
|
|
1
|
+
import { a as styled, r as css } from "./styledComponentsInterop-NxwFjeA4.mjs";
|
|
2
|
+
import { semanticColor } from "./lib/semanticColor.mjs";
|
|
3
|
+
import { i as Paragraph } from "./Text-Dn_p7ZvT.mjs";
|
|
2
4
|
import { isHovered, isNotDisabled } from "./lib/pseudoClass.mjs";
|
|
3
5
|
import inputMixin from "./mixins/input.mjs";
|
|
4
|
-
import {
|
|
5
|
-
import { n as Button } from "./IconButton-BnSEV7eR.mjs";
|
|
6
|
+
import { n as Button } from "./IconButton-CnJNIJVQ.mjs";
|
|
6
7
|
import { n as useFormField, t as FormControlContext } from "./useFormField-C-K1lgmv.mjs";
|
|
7
8
|
import { BorderRadius, Color, Spacing } from "@persona/design-tokens";
|
|
8
9
|
import { cloneElement, forwardRef, useEffect, useRef, useState } from "react";
|
|
@@ -22,7 +23,7 @@ const LeftIcon = styled.div`
|
|
|
22
23
|
transform: translateY(-50%);
|
|
23
24
|
margin: 0;
|
|
24
25
|
font-size: 0px;
|
|
25
|
-
color: ${Color.BorderIconSecondary};
|
|
26
|
+
color: ${({ theme, $disabled }) => $disabled ? semanticColor(theme, "FgDisabled", Color.BorderIconSecondary) : semanticColor(theme, "FgSecondary", Color.BorderIconSecondary)};
|
|
26
27
|
height: ${({ $size }) => $size === "sm" ? "12px" : "16px"};
|
|
27
28
|
width: ${({ $size }) => $size === "sm" ? "12px" : "16px"};
|
|
28
29
|
pointer-events: none;
|
|
@@ -51,10 +52,10 @@ const ClearButton = styled(Button).attrs({
|
|
|
51
52
|
height: ${({ size }) => size === "sm" ? "18px" : "24px"};
|
|
52
53
|
width: ${({ size }) => size === "sm" ? "18px" : "24px"};
|
|
53
54
|
border-radius: ${BorderRadius.Md};
|
|
54
|
-
color: ${Color.BorderIconSecondary};
|
|
55
|
+
color: ${({ theme }) => semanticColor(theme, "FgSecondary", Color.BorderIconSecondary)};
|
|
55
56
|
|
|
56
|
-
${({ disabled }) => disabled && css`
|
|
57
|
-
color: ${Color.BorderIconDisabled};
|
|
57
|
+
${({ disabled, theme }) => disabled && css`
|
|
58
|
+
color: ${semanticColor(theme, "FgDisabled", Color.BorderIconDisabled)};
|
|
58
59
|
`}
|
|
59
60
|
|
|
60
61
|
&${isHovered}${isNotDisabled} {
|
|
@@ -76,7 +77,7 @@ const InputBase = styled.input`
|
|
|
76
77
|
line-height: 1;
|
|
77
78
|
|
|
78
79
|
&::placeholder {
|
|
79
|
-
color: ${({ theme }) => theme.color.text.secondary};
|
|
80
|
+
color: ${({ theme }) => semanticColor(theme, "FgSecondary", theme.color.text.secondary)};
|
|
80
81
|
}
|
|
81
82
|
|
|
82
83
|
${({ $size, $leftIcon, $hasRightItem }) => {
|
|
@@ -148,6 +149,7 @@ const InputGroup = forwardRef(function InputGroup({ size = "md", leftIcon, onCle
|
|
|
148
149
|
children: [
|
|
149
150
|
leftIcon && /* @__PURE__ */ jsx(LeftIcon, {
|
|
150
151
|
$size: size,
|
|
152
|
+
$disabled: field.disabled,
|
|
151
153
|
children: leftIcon
|
|
152
154
|
}),
|
|
153
155
|
cloneElement(children, {
|
|
@@ -187,4 +189,4 @@ const InputGroup = forwardRef(function InputGroup({ size = "md", leftIcon, onCle
|
|
|
187
189
|
//#endregion
|
|
188
190
|
export { Input as n, InputGroup as r, ClearButton as t };
|
|
189
191
|
|
|
190
|
-
//# sourceMappingURL=Input-
|
|
192
|
+
//# sourceMappingURL=Input-DbfwNzS_.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Input-DbfwNzS_.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,OAAO,CAAC,MAAM;CAC9C,OAAO;CACP,SAAS;CACV,CAAC;;;aAGW,EAAE,WAAY,SAAS,OAAO,SAAS,OAAQ;YAChD,EAAE,WAAY,SAAS,OAAO,SAAS,OAAQ;mBACxC,aAAa,GAAG;YACvB,EAAE,YAAY,cAAc,OAAO,eAAe,MAAM,oBAAoB,CAAC;;KAEpF,EAAE,UAAU,YACb,YACA,GAAG;eACQ,cAAc,OAAO,cAAc,MAAM,mBAAmB,CAAC;MACtE;;KAED,YAAY,cAAc;;;;;eAKhB,EAAE,WAAY,SAAS,OAAO,SAAS,OAAQ;cAChD,EAAE,WAAY,SAAS,OAAO,SAAS,OAAQ;;;AAI7D,MAAM,sBAAsB,OAAO,GAA0B;;WAElD,QAAQ,GAAG;UACZ,EAAE,YAAa,UAAU,OAAO,QAAQ,MAAO;;AAwBzD,MAAM,YAAY,OAAO,KAAuB;IAC5C,WAAW;;;;cAID,EAAE,YAAY,cAAc,OAAO,eAAe,MAAM,MAAM,KAAK,UAAU,CAAC;;;KAGvF,EAAE,OAAO,WAAW,oBAAoB;CACzC,IAAI;AACJ,SAAQ,OAAR;EACE;EACA,KAAK;AACH,gBAAa,QAAQ,QAAQ,GAAG,YAAY,QAAQ,GAAG;AACvD,UAAO,GAAG;2BACS,gBAAgB,aAAa,QAAQ,GAAG;0BACzC,YAAY,aAAa,QAAQ,GAAG;;EAExD,KAAK;AACH,gBAAa,QAAQ,QAAQ,GAAG,YAAY,QAAQ,GAAG;AACvD,UAAO,GAAG;2BACS,gBAAgB,aAAa,QAAQ,GAAG;0BACzC,YAAY,aAAa,QAAQ,GAAG;;;EAG1D;;AAGJ,MAAa,QAAQ,WAAyC,SAAS,MACrE,EAAE,MAAM,UAAU,cAAc,IAAI,YAAY,UAAU,UAAU,WAAW,GAAG,SAClF,KACA;CACA,MAAM,QAAQ,aAAa;EAAE;EAAY;EAAU;EAAU,SAAS;EAAI;EAAW,CAAC;AAEtF,QACE,oBAAC,WAAD;EACE,OAAO;EACP,WAAW;EACX,eAAe;EACV;EACL,IAAI,MAAM;EACV,oBAAkB,GAAG,MAAM,eAAe,MAAM,aAAa,IAAI,MAAM,kBAAkB;EACzF,qBAAmB,MAAM,WAAW,MAAM,cAAc,KAAA;EACxD,gBAAc,MAAM;EACpB,YAAY,MAAM;EAClB,UAAU,MAAM;EAChB,UAAU,MAAM;EAChB,WAAW,MAAM;EACjB,GAAI;EACJ,MAAM,MAAM;EACZ,CAAA;EAEJ;AA0CF,MAAa,aAAa,WAA4C,SAAS,WAC7E,EACE,OAAO,MACP,UACA,SACA,aACA,UACA,UACA,YACA,UACA,QACA,GAAG,SAEL,KACA;CACA,MAAM,QAAQ,aAAa;EAAE;EAAY;EAAU;EAAU,CAAC;CAC9D,MAAM,0BAA0B,QAAwB;CACxD,MAAM,CAAC,mBAAmB,wBAAwB,SAAwB,KAAK;CAE/E,MAAM,qBAAqB,OAA8B,KAAK;CAC9D,MAAM,CAAC,oBAAoB,yBAAyB,SAAwB,KAAK;AAEjF,iBAAgB;AAEd,MAAI,eAAe,wBAAwB,QACzC,sBAAqB,GAAG,KAAK,wBAAwB,QAAQ,cAAc,EAAE,IAAI;IAElF,CAAC,qBAAqB,CAAC;AAE1B,iBAAgB;AACd,MAAI,UAAU,mBAAmB,QAE/B,uBAAsB,GAAG,KAAK,mBAAmB,QAAQ,YAAY,IAAI;IAE1E,CAAC,QAAQ,sBAAsB,CAAC;CAEnC,MAAM,oBACJ,SAAS,OACL,EACE,QAAQ,QACT,GACD,EAAE;AAER,QACE,oBAAC,mBAAmB,UAApB;EAA6B,OAAO;YAClC,qBAAC,WAAD;GAAgB;GAAK,GAAI;aAAzB;IACG,YACC,oBAAC,UAAD;KAAU,OAAO;KAAM,WAAW,MAAM;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,15 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { n as InputSizes, t as InputMixinProps } from "./input-M7BEIewR.mjs";
|
|
4
|
-
import * as _$styled_components0 from "styled-components";
|
|
1
|
+
import { r as ButtonProps } from "./Button-CTgyA3gc.mjs";
|
|
2
|
+
import { n as InputSizes, t as InputMixinProps } from "./input-DN_8iHVD.mjs";
|
|
5
3
|
import * as _$react from "react";
|
|
6
4
|
import { ComponentPropsWithoutRef, MouseEventHandler, ReactElement, ReactNode } from "react";
|
|
5
|
+
import * as _$styled_components0 from "styled-components";
|
|
7
6
|
|
|
8
7
|
//#region components/Input/Input.d.ts
|
|
9
|
-
declare const ClearButton: _$styled_components0.StyledComponent<
|
|
10
|
-
width: "icon";
|
|
11
|
-
variant: "basic";
|
|
12
|
-
} & PseudoClassProps, "width" | "variant">;
|
|
8
|
+
declare const ClearButton: _$styled_components0.StyledComponent<any, any, any, any>;
|
|
13
9
|
interface StyledInputProps extends InputMixinProps {
|
|
14
10
|
$leftIcon?: ReactNode;
|
|
15
11
|
$hasRightItem?: boolean;
|
|
@@ -62,4 +58,4 @@ interface InputGroupProps extends ComponentPropsWithoutRef<'div'>, Omit<InputMix
|
|
|
62
58
|
declare const InputGroup: _$react.ForwardRefExoticComponent<InputGroupProps & _$react.RefAttributes<HTMLDivElement>>;
|
|
63
59
|
//#endregion
|
|
64
60
|
export { InputProps as a, InputGroupProps as i, Input as n, InputGroup as r, ClearButton as t };
|
|
65
|
-
//# sourceMappingURL=Input-
|
|
61
|
+
//# sourceMappingURL=Input-Diztxhle.d.mts.map
|
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-Diztxhle.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-DN_8iHVD.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-BILq1X-n.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-BILq1X-n.mjs";
|
|
2
2
|
export { InputProps };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as ValueControlProps } from "./types-
|
|
1
|
+
import { t as ValueControlProps } from "./types-C2s9yhgO.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
|
|
@@ -1,17 +1,19 @@
|
|
|
1
|
-
import { a as styled, r as css } from "./styledComponentsInterop-
|
|
2
|
-
import { isFocused, isHovered, isNotDisabled } from "./lib/pseudoClass.mjs";
|
|
3
|
-
import { paragraphMixins } from "./mixins/text.mjs";
|
|
1
|
+
import { a as styled, r as css } from "./styledComponentsInterop-NxwFjeA4.mjs";
|
|
4
2
|
import { HeadlessAriaButton } from "./lib/HeadlessAriaButton.mjs";
|
|
3
|
+
import { semanticColor, semanticOnly, semanticTokens } from "./lib/semanticColor.mjs";
|
|
4
|
+
import { paragraphMixins } from "./mixins/text.mjs";
|
|
5
|
+
import { withAlpha } from "./lib/color.mjs";
|
|
6
|
+
import { isFocused, isHovered, isNotDisabled } from "./lib/pseudoClass.mjs";
|
|
5
7
|
import { findIndexByKey, moveItemByIndex } from "./lib/reorderItems.mjs";
|
|
6
8
|
import { Z_INDICES } from "./lib/zindex.mjs";
|
|
7
|
-
import { n as Stack } from "./Stack-
|
|
8
|
-
import { n as Button$1, t as IconButton } from "./IconButton-
|
|
9
|
-
import { a as StyledTruncatedText, i as StickerContentContainer, n as Sticker, r as StickerContainer } from "./Sticker-
|
|
9
|
+
import { n as Stack } from "./Stack-BqQndGI9.mjs";
|
|
10
|
+
import { n as Button$1, t as IconButton } from "./IconButton-CnJNIJVQ.mjs";
|
|
11
|
+
import { a as StyledTruncatedText, i as StickerContentContainer, n as Sticker, r as StickerContainer } from "./Sticker-BDyejPZa.mjs";
|
|
10
12
|
import { t as FormGroupContext } from "./useFormGroup-y-duFylq.mjs";
|
|
11
|
-
import { o as MenuHeading, r as ListItem } from "./Menu-
|
|
12
|
-
import { n as DropdownMenu_default } from "./DropdownMenu-
|
|
13
|
-
import { s as Popover_default } from "./Popover-
|
|
14
|
-
import { t as Container } from "./FormControl-
|
|
13
|
+
import { o as MenuHeading, r as ListItem } from "./Menu-CAGTCBqj.mjs";
|
|
14
|
+
import { n as DropdownMenu_default } from "./DropdownMenu-DovtBJBs.mjs";
|
|
15
|
+
import { s as Popover_default } from "./Popover-DUyzmq3e.mjs";
|
|
16
|
+
import { t as Container } from "./FormControl-BvRzRknE.mjs";
|
|
15
17
|
import { BorderRadius, Color, Spacing, Typography } from "@persona/design-tokens";
|
|
16
18
|
import { createContext, useCallback, useContext, useEffect, useMemo, useRef, useState } from "react";
|
|
17
19
|
import { DropIndicator, GridList, GridListItem, Header, ListBoxSection, useDragAndDrop } from "react-aria-components";
|
|
@@ -20,6 +22,10 @@ import { DragIcon } from "@persona/icons";
|
|
|
20
22
|
import { MoreIcon as MoreIcon$1, XIcon as XIcon$1 } from "@persona/icons/12px";
|
|
21
23
|
import { uniqueId } from "lodash-es";
|
|
22
24
|
//#region components/ListBox/ListBox.tsx
|
|
25
|
+
const selectedHighlight = (theme) => {
|
|
26
|
+
const tokens = semanticTokens(theme);
|
|
27
|
+
return tokens ? withAlpha(tokens.SurfaceAccent, tokens.Opacity25) : theme.color.background.highlight;
|
|
28
|
+
};
|
|
23
29
|
const ListBoxContext = createContext(null);
|
|
24
30
|
/**
|
|
25
31
|
* Hook to access ListBox context values (like size) from child components
|
|
@@ -31,9 +37,9 @@ const StyledListBox = styled(GridList)`
|
|
|
31
37
|
${({ $size }) => $size === "sm" ? paragraphMixins.sm : paragraphMixins.md};
|
|
32
38
|
|
|
33
39
|
box-sizing: border-box;
|
|
34
|
-
background: ${Color.BackgroundPrimary};
|
|
40
|
+
background: ${({ theme }) => semanticColor(theme, "SurfacePrimary", Color.BackgroundPrimary)};
|
|
35
41
|
border-radius: ${BorderRadius.Md};
|
|
36
|
-
border: 1px solid ${Color.BorderDivider};
|
|
42
|
+
border: 1px solid ${({ theme }) => semanticColor(theme, "BorderSubtle", Color.BorderDivider)};
|
|
37
43
|
padding: ${Spacing[1]};
|
|
38
44
|
|
|
39
45
|
${({ $maxHeight }) => $maxHeight != null && css`
|
|
@@ -47,7 +53,7 @@ const StyledListBox = styled(GridList)`
|
|
|
47
53
|
`;
|
|
48
54
|
const StyledDropIndicator = styled(DropIndicator)`
|
|
49
55
|
height: 2px;
|
|
50
|
-
background: ${({ theme }) => theme.color.text.brand};
|
|
56
|
+
background: ${({ theme }) => semanticColor(theme, "BorderAccent", theme.color.text.brand)};
|
|
51
57
|
`;
|
|
52
58
|
const ListBoxEmptyState = styled.button`
|
|
53
59
|
${({ $size }) => $size === "sm" ? paragraphMixins.sm : paragraphMixins.md};
|
|
@@ -56,7 +62,7 @@ const ListBoxEmptyState = styled.button`
|
|
|
56
62
|
outline: none;
|
|
57
63
|
border: none;
|
|
58
64
|
padding: ${Spacing[1]};
|
|
59
|
-
color: ${Color.TextSecondary};
|
|
65
|
+
color: ${({ theme }) => semanticColor(theme, "FgSecondary", Color.TextSecondary)};
|
|
60
66
|
`;
|
|
61
67
|
const ListBoxEmptyStateButton = styled(ListBoxEmptyState)`
|
|
62
68
|
&:hover {
|
|
@@ -176,7 +182,7 @@ const StyledItem = styled(ListItem)`
|
|
|
176
182
|
background: linear-gradient(
|
|
177
183
|
to right,
|
|
178
184
|
transparent,
|
|
179
|
-
${Color.BackgroundPrimary} ${BackgroundFadeWidth}px
|
|
185
|
+
${({ theme }) => semanticColor(theme, "SurfacePrimary", Color.BackgroundPrimary)} ${BackgroundFadeWidth}px
|
|
180
186
|
);
|
|
181
187
|
}
|
|
182
188
|
|
|
@@ -197,15 +203,15 @@ const StyledItem = styled(ListItem)`
|
|
|
197
203
|
&[data-focus-visible]:not([data-selected], [data-dragging]),
|
|
198
204
|
&[data-hovered]:not([data-selected], [data-dragging]) {
|
|
199
205
|
cursor: pointer;
|
|
200
|
-
color: ${({ theme }) => theme.color.text.primary};
|
|
201
|
-
background-color: ${Color.BackgroundSecondary};
|
|
206
|
+
color: ${({ theme }) => semanticColor(theme, "FgPrimary", theme.color.text.primary)};
|
|
207
|
+
background-color: ${({ theme }) => semanticColor(theme, "SurfaceHover", Color.BackgroundSecondary)};
|
|
202
208
|
|
|
203
209
|
${RowActionsContainer} {
|
|
204
210
|
opacity: 1;
|
|
205
211
|
background: linear-gradient(
|
|
206
212
|
to right,
|
|
207
213
|
transparent,
|
|
208
|
-
${Color.BackgroundSecondary} ${BackgroundFadeWidth}px
|
|
214
|
+
${({ theme }) => semanticColor(theme, "SurfaceHover", Color.BackgroundSecondary)} ${BackgroundFadeWidth}px
|
|
209
215
|
);
|
|
210
216
|
}
|
|
211
217
|
}
|
|
@@ -222,22 +228,22 @@ const StyledItem = styled(ListItem)`
|
|
|
222
228
|
&[data-selected]${isFocused}, &[data-selected]:focus,
|
|
223
229
|
&${isNotDisabled}${isHovered}[data-selected] {
|
|
224
230
|
outline: none;
|
|
225
|
-
color: ${({ theme }) => theme.color.text.brand};
|
|
226
|
-
background-color: ${({ theme }) => theme
|
|
231
|
+
color: ${({ theme }) => semanticColor(theme, "FgAccent", theme.color.text.brand)};
|
|
232
|
+
background-color: ${({ theme }) => selectedHighlight(theme)};
|
|
227
233
|
|
|
228
234
|
${RowActionsContainer} {
|
|
229
235
|
opacity: 1;
|
|
230
236
|
background: linear-gradient(
|
|
231
237
|
to right,
|
|
232
238
|
transparent,
|
|
233
|
-
${({ theme }) => theme
|
|
239
|
+
${({ theme }) => selectedHighlight(theme)} ${BackgroundFadeWidth}px
|
|
234
240
|
);
|
|
235
241
|
}
|
|
236
242
|
}
|
|
237
243
|
|
|
238
244
|
&[data-dragging] {
|
|
239
245
|
opacity: 0.5;
|
|
240
|
-
background-color: ${Color.BackgroundPrimary};
|
|
246
|
+
background-color: ${({ theme }) => semanticColor(theme, "SurfacePrimary", Color.BackgroundPrimary)};
|
|
241
247
|
}
|
|
242
248
|
|
|
243
249
|
.react-aria-Section:not(:first-child) {
|
|
@@ -263,7 +269,7 @@ const TextContent = styled.span`
|
|
|
263
269
|
`;
|
|
264
270
|
const DropdownPopoverHeading = styled.div`
|
|
265
271
|
${({ $size }) => $size === "md" ? Typography.TextMediumBold : Typography.TextSmallBold};
|
|
266
|
-
border-bottom: 1px solid ${Color.BorderHairline};
|
|
272
|
+
border-bottom: 1px solid ${({ theme }) => semanticColor(theme, "BorderDivider", Color.BorderHairline)};
|
|
267
273
|
padding: ${Spacing[2]} ${Spacing[3]} ${Spacing[1]};
|
|
268
274
|
`;
|
|
269
275
|
const DropdownPopoverContent = styled(Stack)`
|
|
@@ -275,7 +281,7 @@ const DropdownPopoverContent = styled(Stack)`
|
|
|
275
281
|
}
|
|
276
282
|
`;
|
|
277
283
|
const DropdownPopoverFooter = styled.div`
|
|
278
|
-
border-top: 1px solid ${Color.BorderHairline};
|
|
284
|
+
border-top: 1px solid ${({ theme }) => semanticColor(theme, "BorderDivider", Color.BorderHairline)};
|
|
279
285
|
padding: ${Spacing[1]};
|
|
280
286
|
`;
|
|
281
287
|
const ListBoxItem = ({ children, actions, onDelete, size, dropdownHeadingText, dropdownFormFields, dropdownContent, dropdownFooter, ...props }) => {
|
|
@@ -390,16 +396,18 @@ const LogicListBoxItem = styled(ListBox$1.Item)`
|
|
|
390
396
|
&[data-selected]${isFocused}, &[data-selected]:focus,
|
|
391
397
|
&[data-selected]${isHovered}, &[data-selected]:hover,
|
|
392
398
|
&[data-selected]:not(:disabled)${isHovered}, &[data-selected]:not(:disabled):hover {
|
|
393
|
-
color: ${Color.TextPrimary};
|
|
399
|
+
color: ${({ theme }) => semanticColor(theme, "FgPrimary", Color.TextPrimary)};
|
|
394
400
|
|
|
395
401
|
${LogicRowSticker} {
|
|
396
|
-
background-color: ${Color.BackgroundLabelPurple};
|
|
402
|
+
background-color: ${({ theme }) => semanticColor(theme, "FeedbackAccent2", Color.BackgroundLabelPurple)};
|
|
403
|
+
${semanticOnly((tokens) => `color: ${tokens.FgPrimaryStatic};`)}
|
|
397
404
|
}
|
|
398
405
|
}
|
|
399
406
|
|
|
400
407
|
&[data-hovered]:not([data-selected]) {
|
|
401
408
|
${LogicRowSticker} {
|
|
402
|
-
background-color: ${Color.BackgroundLabelGreyHover};
|
|
409
|
+
background-color: ${({ theme }) => semanticColor(theme, "FeedbackNeutral2Static", Color.BackgroundLabelGreyHover)};
|
|
410
|
+
${semanticOnly((tokens) => `color: ${tokens.FgPrimaryStatic};`)}
|
|
403
411
|
}
|
|
404
412
|
}
|
|
405
413
|
`;
|
|
@@ -444,4 +452,4 @@ const ListBox = Object.assign(ListBox$1, { LogicRow });
|
|
|
444
452
|
//#endregion
|
|
445
453
|
export { useListBoxContext as n, ListBox as t };
|
|
446
454
|
|
|
447
|
-
//# sourceMappingURL=ListBox-
|
|
455
|
+
//# sourceMappingURL=ListBox-CXh9Jfb-.mjs.map
|