@persona/design-system 0.5.0 → 0.6.0
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 +11 -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-CR-xdruP.mjs} +16 -15
- package/dist/Breadcrumbs-CR-xdruP.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 +3 -3
- package/dist/{CardV2-B2wx1NE3.mjs → CardV2-CBjhsfrn.mjs} +19 -18
- package/dist/CardV2-CBjhsfrn.mjs.map +1 -0
- package/dist/{Checkbox-DwZEsi7x.mjs → Checkbox-BHZ7c7_6.mjs} +27 -23
- package/dist/Checkbox-BHZ7c7_6.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-CKaVX-32.mjs → Combobox-BCYLeZDP.mjs} +23 -22
- package/dist/Combobox-BCYLeZDP.mjs.map +1 -0
- package/dist/{Combobox-BQN5OwB-.d.mts → Combobox-DMN3nc7E.d.mts} +3 -3
- package/dist/Combobox.d.mts +2 -2
- package/dist/{ComboboxBase-nfHr19x-.d.mts → ComboboxBase-DBLJYQrh.d.mts} +18 -29
- package/dist/ComboboxBase.d.mts +1 -1
- package/dist/{ComboboxMultiSelect-DRNj2Mtx.d.mts → ComboboxMultiSelect-CZRLyM_y.d.mts} +2 -2
- package/dist/ComboboxMultiSelect.d.mts +1 -1
- package/dist/{ComboboxSingleSelect-BkhbEx-F.d.mts → ComboboxSingleSelect-BS6pZpU_.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-BnRDAs0j.mjs} +3 -3
- package/dist/{ConfigFormGroup-CmCRJyse.mjs.map → ConfigFormGroup-BnRDAs0j.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-BcjrAr7o.mjs} +44 -33
- package/dist/DatePicker-BcjrAr7o.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-l-fzkb5_.mjs} +3 -3
- package/dist/{DropdownButton-dpGAmVlN.mjs.map → DropdownButton-l-fzkb5_.mjs.map} +1 -1
- package/dist/DropdownButton.d.mts +2 -2
- package/dist/{DropdownMenu-RTxQ0Zu1.d.mts → DropdownMenu-Bg68vvxx.d.mts} +3 -3
- package/dist/{DropdownMenu-CyxizDxJ.mjs → DropdownMenu-C0WK4bM0.mjs} +3 -3
- package/dist/{DropdownMenu-CyxizDxJ.mjs.map → DropdownMenu-C0WK4bM0.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-BzMbbgr0.mjs} +8 -7
- package/dist/FormControl-BzMbbgr0.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-2sNS5PzN.mjs} +16 -16
- package/dist/{FormField-C7bW-O6H.mjs.map → FormField-2sNS5PzN.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-CeJ0UP87.mjs} +8 -8
- package/dist/{HoverCopyableField-Bgt639FR.mjs.map → HoverCopyableField-CeJ0UP87.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-DGWThZlt.mjs} +12 -10
- package/dist/Input-DGWThZlt.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-DeFHRX2T.d.mts → ListBox-Awtw7Xy_.d.mts} +3 -3
- package/dist/{ListBox-jzXQDraS.mjs → ListBox-DqII8giL.mjs} +37 -29
- package/dist/ListBox-DqII8giL.mjs.map +1 -0
- package/dist/ListBox.d.mts +1 -1
- package/dist/ListBoxField.d.mts +2 -2
- package/dist/{LoadingShimmer-a2Hv0kAq.mjs → LoadingShimmer-ZyzJs5Vi.mjs} +13 -5
- package/dist/LoadingShimmer-ZyzJs5Vi.mjs.map +1 -0
- package/dist/LoadingShimmer.d.mts +2 -2
- package/dist/{LogicRow-BOhB0uNS.d.mts → LogicRow-DIn0gLEq.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-CeV3lL2g.mjs} +42 -25
- package/dist/Menu-CeV3lL2g.mjs.map +1 -0
- package/dist/{Menu-BCVhmNEe.d.mts → Menu-DdHN-drQ.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-UI_6yImi.mjs} +9 -6
- package/dist/PageHeader-UI_6yImi.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-DgA0U1fa.mjs} +9 -8
- package/dist/Pagination-DgA0U1fa.mjs.map +1 -0
- package/dist/Pagination.d.mts +1 -1
- package/dist/{Pii-CA7aCuYT.mjs → Pii-bxG0qu3t.mjs} +2 -2
- package/dist/{Pii-CA7aCuYT.mjs.map → Pii-bxG0qu3t.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-UiOUt5up.mjs} +9 -5
- package/dist/Popover-UiOUt5up.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-BrQzZhwP.mjs} +22 -18
- package/dist/Radio-BrQzZhwP.mjs.map +1 -0
- package/dist/{RadioGroup-pegXtLwD.mjs → RadioGroup-Bl9oXPIo.mjs} +3 -3
- package/dist/{RadioGroup-pegXtLwD.mjs.map → RadioGroup-Bl9oXPIo.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-BozydMtT.mjs} +10 -9
- package/dist/SegmentedControl-BozydMtT.mjs.map +1 -0
- package/dist/SegmentedControl.d.mts +1 -1
- package/dist/{Select-CBVvPyRJ.mjs → Select-CktsIrzf.mjs} +16 -15
- package/dist/Select-CktsIrzf.mjs.map +1 -0
- package/dist/{Select-DwqWnWBi.d.mts → Select-yPqzqe5k.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-Dpw3-3JS.mjs} +6 -8
- package/dist/Spinner-Dpw3-3JS.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-Dw3xE_B-.mjs} +17 -16
- package/dist/TabBar-Dw3xE_B-.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-ELLvSvH4.mjs} +86 -39
- package/dist/Table-ELLvSvH4.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-CCfha6G2.mjs} +57 -47
- package/dist/TableBox-CCfha6G2.mjs.map +1 -0
- package/dist/TableBox.d.mts +2 -2
- package/dist/{TableBoxCell-Cjlc_xJz.d.mts → TableBoxCell-xnzuHPV1.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-BBDMh5xl.d.mts} +3 -3
- package/dist/TableBoxRow.d.mts +1 -1
- package/dist/{TableBoxRowActions-BJ8ue3Bk.d.mts → TableBoxRowActions-DCfol4GC.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-BnesnTue.mjs → TableControls-C-yb5EYU.mjs} +76 -64
- package/dist/TableControls-C-yb5EYU.mjs.map +1 -0
- package/dist/{TableControls-D8xMNgyS.d.mts → TableControls-CtEL3ioz.d.mts} +3 -3
- 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-CLbNA0kp.mjs} +27 -22
- package/dist/TechnicalSticker-CLbNA0kp.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-oAK1DKId.mjs} +3 -3
- package/dist/{TextArea-CospIXEO.mjs.map → TextArea-oAK1DKId.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-DZzirZ8p.mjs} +20 -11
- package/dist/Toggle-DZzirZ8p.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 +13 -5
- 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 +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 +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 +2 -2
- 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 +12 -72
- 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 +21 -12
- 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/grammar.pegjs +219 -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/grammar.pegjs +154 -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-DASkW991.d.mts → index-BX8dSNcy.d.mts} +2 -2
- package/dist/{index-I_Cy3X5R.d.mts → index-CBWvk6Ch.d.mts} +3 -3
- 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/{intersperse-CRUnXmnu.mjs → intersperse-vOYvFOfF.mjs} +1 -1
- package/dist/{intersperse-CRUnXmnu.mjs.map → intersperse-vOYvFOfF.mjs.map} +1 -1
- 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/lib/useModalInsetRight.mjs +69 -0
- package/dist/lib/useModalInsetRight.mjs.map +1 -0
- 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-C-K1lgmv.mjs → useFormField-DhYd6bNn.mjs} +2 -2
- package/dist/{useFormField-C-K1lgmv.mjs.map → useFormField-DhYd6bNn.mjs.map} +1 -1
- package/dist/useFormField.d.mts +1 -1
- package/dist/{useFormGroup-y-duFylq.mjs → useFormGroup-DWVW7A9f.mjs} +1 -1
- package/dist/{useFormGroup-y-duFylq.mjs.map → useFormGroup-DWVW7A9f.mjs.map} +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/llms.txt +1 -0
- package/package.json +70 -7
- package/skills/design-system-component-authoring/SKILL.md +79 -0
- package/skills/design-system-component-authoring/clarifying-scope.md +18 -0
- package/skills/design-system-component-authoring/component-conventions.md +70 -0
- package/skills/design-system-component-authoring/prop-interface-patterns.md +30 -0
- 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
- /package/dist/{useModalInsetRight.d.mts → lib/useModalInsetRight.d.mts} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { l as MenuItemProps } from "../../Menu-DdHN-drQ.mjs";
|
|
2
|
+
import { o as StickerProps } from "../../Sticker-qvWkqEMw.mjs";
|
|
3
3
|
import { ReactNode } from "react";
|
|
4
4
|
import { Column, DeepKeys, FilterFnOption, Header, RowData, SortingState, Table } from "@tanstack/react-table";
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as DatePickerProps, t as DatePicker } from "../../DatePicker-
|
|
2
|
-
import { i as DateRangePickerProps, n as DateRange, r as DateRangePicker, t as DateFilterChange } from "../../DateRangePicker-
|
|
3
|
-
import { t as DateField } from "../../DateField-
|
|
4
|
-
import { t as Calendar } from "../../Calendar-
|
|
1
|
+
import { n as DatePickerProps, t as DatePicker } from "../../DatePicker-BZ4_I4Db.mjs";
|
|
2
|
+
import { i as DateRangePickerProps, n as DateRange, r as DateRangePicker, t as DateFilterChange } from "../../DateRangePicker-BMKJquPT.mjs";
|
|
3
|
+
import { t as DateField } from "../../DateField-CBCo8_d3.mjs";
|
|
4
|
+
import { t as Calendar } from "../../Calendar-_gM6U5ET.mjs";
|
|
5
5
|
export { Calendar, DateField, DateFilterChange, DatePicker, DatePicker as default, DatePickerProps, DateRange, DateRangePicker, DateRangePickerProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as Calendar, n as DatePicker, r as DateField, t as DateRangePicker } from "../../DatePicker-
|
|
1
|
+
import { i as Calendar, n as DatePicker, r as DateField, t as DateRangePicker } from "../../DatePicker-BcjrAr7o.mjs";
|
|
2
2
|
export { Calendar, DateField, DatePicker, DatePicker as default, DateRangePicker };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as DropdownButton } from "../../DropdownButton-
|
|
1
|
+
import { t as DropdownButton } from "../../DropdownButton-l-fzkb5_.mjs";
|
|
2
2
|
export { DropdownButton, DropdownButton as default };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as DropdownMenuProps, r as _default, t as DropdownMenu } from "../../DropdownMenu-
|
|
1
|
+
import { n as DropdownMenuProps, r as _default, t as DropdownMenu } from "../../DropdownMenu-Bg68vvxx.mjs";
|
|
2
2
|
export { DropdownMenu, DropdownMenuProps, _default as default };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as DropdownMenu_default, t as DropdownMenu } from "../../DropdownMenu-
|
|
1
|
+
import { n as DropdownMenu_default, t as DropdownMenu } from "../../DropdownMenu-C0WK4bM0.mjs";
|
|
2
2
|
export { DropdownMenu, DropdownMenu_default as default };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { a as styled, r as css } from "../../styledComponentsInterop-8zScIQyC.mjs";
|
|
2
|
-
import "../../variables/effect.mjs";
|
|
3
|
-
import { paragraphMixins } from "../../mixins/text.mjs";
|
|
4
1
|
import ConfigContext from "../../lib/ConfigContext.mjs";
|
|
2
|
+
import { a as styled, r as css } from "../../styledComponentsInterop-NxwFjeA4.mjs";
|
|
3
|
+
import { paragraphMixins } from "../../mixins/text.mjs";
|
|
5
4
|
import { Z_INDICES } from "../../lib/zindex.mjs";
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
5
|
+
import "../../variables/effect.mjs";
|
|
6
|
+
import { n as Stack } from "../../Stack-BqQndGI9.mjs";
|
|
7
|
+
import { t as IconButton } from "../../IconButton-CnJNIJVQ.mjs";
|
|
8
8
|
import { BorderRadius, Color, Spacing } from "@persona/design-tokens";
|
|
9
9
|
import { cloneElement, createContext, isValidElement, useCallback, useContext, useEffect, useRef, useState } from "react";
|
|
10
10
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as FormControlProps, c as FormLabelProps, i as FormControlBaseProps, l as HelperText, n as ErrorText, o as FormInputContainer, r as FormControl, s as FormLabel, t as Container, u as WarningText } from "../../FormControl-
|
|
2
|
-
import { r as useFormField } from "../../useFormField
|
|
1
|
+
import { a as FormControlProps, c as FormLabelProps, i as FormControlBaseProps, l as HelperText, n as ErrorText, o as FormInputContainer, r as FormControl, s as FormLabel, t as Container, u as WarningText } from "../../FormControl-gpLZZpNs.mjs";
|
|
2
|
+
import { r as useFormField } from "../../useFormField--_14te0K.mjs";
|
|
3
3
|
export { Container, ErrorText, FormControl, FormControl as default, FormControlBaseProps, FormControlProps, FormInputContainer, FormLabel, FormLabelProps, HelperText, WarningText, useFormField };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as useFormField } from "../../useFormField-
|
|
2
|
-
import { a as FormLabel, i as FormInputContainer, n as ErrorText, o as HelperText, r as FormControl, s as WarningText, t as Container } from "../../FormControl-
|
|
1
|
+
import { n as useFormField } from "../../useFormField-DhYd6bNn.mjs";
|
|
2
|
+
import { a as FormLabel, i as FormInputContainer, n as ErrorText, o as HelperText, r as FormControl, s as WarningText, t as Container } from "../../FormControl-BzMbbgr0.mjs";
|
|
3
3
|
export { Container, ErrorText, FormControl, FormControl as default, FormInputContainer, FormLabel, HelperText, WarningText, useFormField };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as FormFieldBaseProps, r as FormFieldProps, t as FormField } from "../../FormField-
|
|
1
|
+
import { n as FormFieldBaseProps, r as FormFieldProps, t as FormField } from "../../FormField-CZXKvCGt.mjs";
|
|
2
2
|
import { CheckboxField, CheckboxFieldProps, ComboboxField, ComboboxMultiSelectFieldProps, ComboboxSingleSelectFieldProps, ImplementsFormField, RadioGroupField, RadioGroupFieldProps, SegmentedControlField, SegmentedControlFieldProps, SelectField, SelectFieldProps, TextAreaField, TextAreaFieldProps, TextField, TextFieldProps, ToggleField, ToggleFieldProps, splitOutFormFieldProps } from "../../inputFields.mjs";
|
|
3
3
|
import CheckboxGroupField from "../../CheckboxGroupField.mjs";
|
|
4
4
|
import ListBoxField from "../../ListBoxField.mjs";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as CheckboxField, c as SegmentedControlField, d as TextField, f as ToggleField, i as CheckboxGroupField, l as SelectField, m as FormField, n as TableBoxField, o as ComboboxField, p as splitOutFormFieldProps, r as ListBoxField, s as RadioGroupField, t as TABLE_BOX_FIELD_ADD_BUTTON_ARIA_LABEL, u as TextAreaField } from "../../FormField-
|
|
1
|
+
import { a as CheckboxField, c as SegmentedControlField, d as TextField, f as ToggleField, i as CheckboxGroupField, l as SelectField, m as FormField, n as TableBoxField, o as ComboboxField, p as splitOutFormFieldProps, r as ListBoxField, s as RadioGroupField, t as TABLE_BOX_FIELD_ADD_BUTTON_ARIA_LABEL, u as TextAreaField } from "../../FormField-2sNS5PzN.mjs";
|
|
2
2
|
export { CheckboxField, CheckboxGroupField, ComboboxField, FormField, FormField as default, ListBoxField, RadioGroupField, SegmentedControlField, SelectField, TABLE_BOX_FIELD_ADD_BUTTON_ARIA_LABEL, TableBoxField, TextAreaField, TextField, ToggleField, splitOutFormFieldProps };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as styled, r as css } from "../../styledComponentsInterop-
|
|
1
|
+
import { a as styled, r as css } from "../../styledComponentsInterop-NxwFjeA4.mjs";
|
|
2
2
|
import { Spacing } from "@persona/design-tokens";
|
|
3
3
|
import { useLayoutEffect, useRef, useState } from "react";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as HoverCopyableField } from "../../HoverCopyableField-
|
|
1
|
+
import { t as HoverCopyableField } from "../../HoverCopyableField-CeJ0UP87.mjs";
|
|
2
2
|
export { HoverCopyableField as default };
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { a as styled, r as css } from "../../styledComponentsInterop-
|
|
2
|
-
import {
|
|
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";
|
|
3
4
|
import "../../variables/transitions.mjs";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { n as Stack } from "../../Stack-
|
|
7
|
-
import { t as IconButton } from "../../IconButton-
|
|
8
|
-
import { n as DropdownMenu_default } from "../../DropdownMenu-
|
|
9
|
-
import { t as LoadingShimmer } from "../../LoadingShimmer-
|
|
10
|
-
import { t as Checkbox } from "../../Checkbox-
|
|
5
|
+
import { a as Tooltip } from "../../Tooltip-BsuYG0fw.mjs";
|
|
6
|
+
import { focusOutline } from "../../mixins/focus.mjs";
|
|
7
|
+
import { n as Stack } from "../../Stack-BqQndGI9.mjs";
|
|
8
|
+
import { t as IconButton } from "../../IconButton-CnJNIJVQ.mjs";
|
|
9
|
+
import { n as DropdownMenu_default } from "../../DropdownMenu-C0WK4bM0.mjs";
|
|
10
|
+
import { t as LoadingShimmer } from "../../LoadingShimmer-ZyzJs5Vi.mjs";
|
|
11
|
+
import { t as Checkbox } from "../../Checkbox-BHZ7c7_6.mjs";
|
|
11
12
|
import { Color, Spacing } from "@persona/design-tokens";
|
|
12
13
|
import { useEffect, useState } from "react";
|
|
13
14
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -21,7 +22,7 @@ const DEFAULT_SELECTION_LABEL = "Select image";
|
|
|
21
22
|
const ImageContainer = styled.div`
|
|
22
23
|
position: relative;
|
|
23
24
|
aspect-ratio: 200 / 144;
|
|
24
|
-
background-color: ${({ theme }) => theme.color.background.secondary};
|
|
25
|
+
background-color: ${({ theme }) => semanticColor(theme, "SurfaceSecondary", theme.color.background.secondary)};
|
|
25
26
|
overflow: hidden;
|
|
26
27
|
`;
|
|
27
28
|
const Thumbnail = styled.img`
|
|
@@ -49,14 +50,14 @@ const EmptyState = styled.div`
|
|
|
49
50
|
align-items: center;
|
|
50
51
|
justify-content: center;
|
|
51
52
|
gap: ${Spacing[1]};
|
|
52
|
-
color: ${Color.BorderIconDisabled};
|
|
53
|
+
color: ${({ theme }) => semanticColor(theme, "FgDisabled", Color.BorderIconDisabled)};
|
|
53
54
|
padding: ${Spacing[3]};
|
|
54
55
|
text-align: center;
|
|
55
56
|
`;
|
|
56
57
|
const MetadataContainer = styled.div`
|
|
57
58
|
padding: ${Spacing[3]};
|
|
58
|
-
background-color: ${({ theme }) => theme.color.background.primary};
|
|
59
|
-
border-top: 1px solid ${({ theme }) => theme.color.border.primary};
|
|
59
|
+
background-color: ${({ theme }) => semanticColor(theme, "SurfacePrimary", theme.color.background.primary)};
|
|
60
|
+
border-top: 1px solid ${({ theme }) => semanticColor(theme, "BorderDivider", theme.color.border.primary)};
|
|
60
61
|
transition: background-color ${"200ms"};
|
|
61
62
|
`;
|
|
62
63
|
const MetadataRow = styled.div`
|
|
@@ -85,7 +86,7 @@ const LockedOverlay = styled.div`
|
|
|
85
86
|
display: inline-flex;
|
|
86
87
|
align-items: center;
|
|
87
88
|
justify-content: center;
|
|
88
|
-
color: ${({ theme }) => theme.color.text.secondary};
|
|
89
|
+
color: ${({ theme }) => semanticColor(theme, "FgSecondary", theme.color.text.secondary)};
|
|
89
90
|
`;
|
|
90
91
|
const Root = styled.div`
|
|
91
92
|
position: relative;
|
|
@@ -94,8 +95,8 @@ const Root = styled.div`
|
|
|
94
95
|
width: 100%;
|
|
95
96
|
min-width: ${MIN_WIDTH};
|
|
96
97
|
max-width: ${MAX_WIDTH};
|
|
97
|
-
background-color: ${({ theme }) => theme.color.background.primary};
|
|
98
|
-
border: 1px solid ${({ theme }) => theme.color.border.primary};
|
|
98
|
+
background-color: ${({ theme }) => semanticColor(theme, "SurfacePrimary", theme.color.background.primary)};
|
|
99
|
+
border: 1px solid ${({ theme }) => semanticColor(theme, "BorderDivider", theme.color.border.primary)};
|
|
99
100
|
border-radius: ${({ theme }) => theme.card.borderRadius};
|
|
100
101
|
box-sizing: border-box;
|
|
101
102
|
overflow: hidden;
|
|
@@ -106,7 +107,7 @@ const Root = styled.div`
|
|
|
106
107
|
`}
|
|
107
108
|
|
|
108
109
|
&:hover ${MetadataContainer} {
|
|
109
|
-
background-color: ${({ theme }) => theme.color.background.highlight};
|
|
110
|
+
background-color: ${({ theme }) => semanticColor(theme, "SurfaceAccent", theme.color.background.highlight)};
|
|
110
111
|
}
|
|
111
112
|
`;
|
|
112
113
|
const stopPropagation = (e) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":["DropdownMenu"],"sources":["../../../components/ImageTile/ImageTile.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n type KeyboardEvent,\n type MouseEvent,\n type ReactNode,\n useEffect,\n useState,\n} from 'react';\nimport styled, { css } from 'styled-components';\n\nimport { IconButton } from '@persona/design-system/components/Button';\nimport Checkbox from '@persona/design-system/components/Checkbox';\nimport DropdownMenu from '@persona/design-system/components/DropdownMenu';\nimport { LoadingShimmer } from '@persona/design-system/components/LoadingShimmer';\nimport Stack from '@persona/design-system/components/Stack';\nimport { Paragraph } from '@persona/design-system/components/Text';\nimport { Tooltip } from '@persona/design-system/components/Tooltip';\nimport { focusOutline } from '@persona/design-system/mixins/focus';\nimport { TransitionDuration } from '@persona/design-system/variables/transitions';\nimport { Color, Spacing } from '@persona/design-tokens';\nimport { ImageIcon, LockedIcon, MoreIcon } from '@persona/icons';\nimport type { TextAction } from 'design-system/types/Action';\n\nconst MIN_WIDTH = '180px';\nconst MAX_WIDTH = '420px';\nconst OVERLAY_INSET = Spacing[2];\nconst EMPTY_COPY = 'No available preview';\nconst DEFAULT_SELECTION_LABEL = 'Select image';\n\nexport interface ImageTileProps extends Omit<ComponentPropsWithoutRef<'div'>, 'children'> {\n /** URL of the thumbnail. While loading shows shimmer; on error shows the empty fallback. */\n src: string | null;\n /** Alt text for the thumbnail. Also seeds the default checkbox label. */\n alt?: string;\n /** How the thumbnail fills its area. `cover` crops overflow; `contain` letterboxes to fit. Defaults to `cover`. */\n objectFit?: 'cover' | 'contain';\n\n /** Enables the selection checkbox (top-left). */\n selectable?: boolean;\n /** Controlled checked state for the selection checkbox. */\n selected?: boolean;\n /** Called with the new checked value when the checkbox is toggled. */\n onSelectedChange?: (selected: boolean) => void;\n /** Accessible label for the checkbox. Defaults to \"Select {alt}\" or \"Select image\". */\n selectionLabel?: string;\n\n /**\n * Action menu items rendered behind a 3-dot IconButton in the top-right.\n * Ignored when `locked` is true. Pass an empty array (or omit) to hide the menu.\n */\n actions?: TextAction[];\n /**\n * Replaces the action menu with a non-interactive lock icon. Indicates the\n * viewer does not have permission to edit. `actions` are ignored.\n */\n locked?: boolean;\n /** Tooltip string shown when hovering the lock icon. */\n lockedTooltip?: string;\n\n /**\n * Metadata rows rendered beneath the thumbnail. Each entry becomes a\n * full-width, left-aligned row in a vertical Stack. Block content fills the\n * row; inline content (e.g. a Sticker) hugs the left. Region is omitted when\n * the array is empty or undefined.\n */\n metadata?: ReactNode[];\n\n /** Optional click handler for the whole tile. When provided, the tile is keyboard-activatable. */\n onClick?: (e: MouseEvent<HTMLDivElement>) => void;\n}\n\nconst ImageContainer = styled.div`\n position: relative;\n aspect-ratio: 200 / 144;\n background-color: ${({ theme }) => theme.color.background.secondary};\n overflow: hidden;\n`;\n\nconst Thumbnail = styled.img<{ $visible: boolean; $objectFit: 'cover' | 'contain' }>`\n position: absolute;\n inset: 0;\n width: 100%;\n height: 100%;\n object-fit: ${({ $objectFit }) => $objectFit};\n display: block;\n opacity: ${({ $visible }) => ($visible ? 1 : 0)};\n transition: opacity ${TransitionDuration.Fast};\n`;\n\nconst ImageShimmer = styled(LoadingShimmer)`\n position: absolute;\n inset: 0;\n width: 100%;\n height: 100%;\n border-radius: 0;\n`;\n\nconst EmptyState = styled.div`\n position: absolute;\n inset: 0;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: ${Spacing[1]};\n color: ${Color.BorderIconDisabled};\n padding: ${Spacing[3]};\n text-align: center;\n`;\n\nconst MetadataContainer = styled.div`\n padding: ${Spacing[3]};\n background-color: ${({ theme }) => theme.color.background.primary};\n border-top: 1px solid ${({ theme }) => theme.color.border.primary};\n transition: background-color ${TransitionDuration.Fast};\n`;\n\nconst MetadataRow = styled.div`\n width: 100%;\n // Without these Stickers get bottom aligned\n display: flex;\n align-items: flex-start;\n`;\n\nconst SelectionOverlay = styled.div`\n position: absolute;\n top: ${OVERLAY_INSET};\n left: ${OVERLAY_INSET};\n z-index: 1;\n`;\n\nconst ActionsOverlay = styled.div`\n position: absolute;\n top: ${OVERLAY_INSET};\n right: ${OVERLAY_INSET};\n z-index: 1;\n`;\n\nconst LockedOverlay = styled.div`\n position: absolute;\n top: ${OVERLAY_INSET};\n right: ${OVERLAY_INSET};\n z-index: 1;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n color: ${({ theme }) => theme.color.text.secondary};\n`;\n\nconst Root = styled.div<{ $clickable: boolean }>`\n position: relative;\n display: flex;\n flex-direction: column;\n width: 100%;\n min-width: ${MIN_WIDTH};\n max-width: ${MAX_WIDTH};\n background-color: ${({ theme }) => theme.color.background.primary};\n border: 1px solid ${({ theme }) => theme.color.border.primary};\n border-radius: ${({ theme }) => theme.card.borderRadius};\n box-sizing: border-box;\n overflow: hidden;\n ${focusOutline};\n\n ${({ $clickable }) =>\n $clickable &&\n css`\n cursor: pointer;\n `}\n\n &:hover ${MetadataContainer} {\n background-color: ${({ theme }) => theme.color.background.highlight};\n }\n`;\n\nconst stopPropagation = (e: MouseEvent) => {\n e.stopPropagation();\n};\n\nexport const ImageTile = ({\n src,\n alt = '',\n objectFit = 'cover',\n selectable = false,\n selected = false,\n onSelectedChange,\n selectionLabel,\n actions,\n locked = false,\n lockedTooltip,\n metadata,\n onClick,\n ...props\n}: ImageTileProps) => {\n const [loaded, setLoaded] = useState(false);\n const [hasError, setHasError] = useState(false);\n\n useEffect(() => {\n setLoaded(false);\n setHasError(false);\n }, [src]);\n\n const hasSrc = Boolean(src);\n const isLoading = hasSrc && !loaded && !hasError;\n const showEmpty = !hasSrc || hasError;\n\n const visibleActions = actions?.filter((action) => !action.hidden) ?? [];\n const renderActions = !locked && visibleActions.length > 0;\n const clickable = Boolean(onClick);\n\n const handleKeyDown = (e: KeyboardEvent<HTMLDivElement>) => {\n if (!onClick) {\n return;\n }\n // Only activate when the key event originates from the tile root itself.\n // Interactive descendants (selection checkbox, action buttons) must keep\n // their own native Space/Enter behavior.\n if (e.target !== e.currentTarget) {\n return;\n }\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n e.currentTarget.click();\n }\n };\n\n const accessibleSelectionLabel =\n selectionLabel ?? (alt ? `Select ${alt}` : DEFAULT_SELECTION_LABEL);\n\n const hasMetadata = (metadata?.length ?? 0) > 0;\n const renderMetadata = hasMetadata || isLoading;\n\n return (\n <Root\n $clickable={clickable}\n onClick={onClick}\n onKeyDown={clickable ? handleKeyDown : undefined}\n role={clickable ? 'button' : undefined}\n tabIndex={clickable ? 0 : undefined}\n {...props}\n >\n <ImageContainer>\n {hasSrc && !hasError && (\n <Thumbnail\n $visible={loaded}\n $objectFit={objectFit}\n src={src ?? undefined}\n alt={alt}\n onLoad={() => setLoaded(true)}\n onError={() => setHasError(true)}\n />\n )}\n {isLoading && <ImageShimmer />}\n {showEmpty && (\n <EmptyState>\n <ImageIcon size={24} aria-hidden />\n <Paragraph size='sm' color='secondary' as='span'>\n {EMPTY_COPY}\n </Paragraph>\n </EmptyState>\n )}\n\n {selectable && (\n <SelectionOverlay onClick={stopPropagation}>\n <Checkbox\n size='sm'\n checked={selected}\n onChange={(e) => onSelectedChange?.(e.target.checked)}\n aria-label={accessibleSelectionLabel}\n />\n </SelectionOverlay>\n )}\n\n {renderActions && (\n <ActionsOverlay onClick={stopPropagation}>\n <DropdownMenu\n portal\n trigger={\n <IconButton size='sm' aria-label='More actions'>\n <MoreIcon />\n </IconButton>\n }\n >\n {visibleActions.map((action, idx) => (\n <DropdownMenu.Item\n key={action.id ?? `${action.label}-${idx}`}\n prefixIcon={action.prefixIcon}\n suffixIcon={action.suffixIcon}\n disabled={action.disabled}\n variant={action.variant === 'danger' ? 'danger' : 'basic'}\n onClick={(e) => {\n if (action.disabled) {\n return;\n }\n return action.onClick?.(e);\n }}\n >\n {action.label}\n </DropdownMenu.Item>\n ))}\n </DropdownMenu>\n </ActionsOverlay>\n )}\n\n {locked && (\n <LockedOverlay onClick={stopPropagation}>\n {lockedTooltip ? (\n <Tooltip iconTrigger={<LockedIcon size={16} />} aria-label={lockedTooltip}>\n {lockedTooltip}\n </Tooltip>\n ) : (\n <LockedIcon size={16} aria-label='Locked' />\n )}\n </LockedOverlay>\n )}\n </ImageContainer>\n\n {renderMetadata && (\n <MetadataContainer>\n {isLoading ? (\n <LoadingShimmer width='60%' height='14px' />\n ) : (\n <Stack spacing={Spacing[2]}>\n {metadata?.map((row, idx) => (\n <MetadataRow key={idx}>{row}</MetadataRow>\n ))}\n </Stack>\n )}\n </MetadataContainer>\n )}\n </Root>\n );\n};\n\nexport default ImageTile;\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["DropdownMenu"],"sources":["../../../components/ImageTile/ImageTile.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n type KeyboardEvent,\n type MouseEvent,\n type ReactNode,\n useEffect,\n useState,\n} from 'react';\nimport styled, { css } from 'styled-components';\n\nimport { IconButton } from '@persona/design-system/components/Button';\nimport Checkbox from '@persona/design-system/components/Checkbox';\nimport DropdownMenu from '@persona/design-system/components/DropdownMenu';\nimport { LoadingShimmer } from '@persona/design-system/components/LoadingShimmer';\nimport Stack from '@persona/design-system/components/Stack';\nimport { Paragraph } from '@persona/design-system/components/Text';\nimport { Tooltip } from '@persona/design-system/components/Tooltip';\nimport { focusOutline } from '@persona/design-system/mixins/focus';\nimport { TransitionDuration } from '@persona/design-system/variables/transitions';\nimport { Color, Spacing } from '@persona/design-tokens';\nimport { ImageIcon, LockedIcon, MoreIcon } from '@persona/icons';\nimport { semanticColor } from 'design-system/lib/semanticColor';\nimport type { TextAction } from 'design-system/types/Action';\n\nconst MIN_WIDTH = '180px';\nconst MAX_WIDTH = '420px';\nconst OVERLAY_INSET = Spacing[2];\nconst EMPTY_COPY = 'No available preview';\nconst DEFAULT_SELECTION_LABEL = 'Select image';\n\nexport interface ImageTileProps extends Omit<ComponentPropsWithoutRef<'div'>, 'children'> {\n /** URL of the thumbnail. While loading shows shimmer; on error shows the empty fallback. */\n src: string | null;\n /** Alt text for the thumbnail. Also seeds the default checkbox label. */\n alt?: string;\n /** How the thumbnail fills its area. `cover` crops overflow; `contain` letterboxes to fit. Defaults to `cover`. */\n objectFit?: 'cover' | 'contain';\n\n /** Enables the selection checkbox (top-left). */\n selectable?: boolean;\n /** Controlled checked state for the selection checkbox. */\n selected?: boolean;\n /** Called with the new checked value when the checkbox is toggled. */\n onSelectedChange?: (selected: boolean) => void;\n /** Accessible label for the checkbox. Defaults to \"Select {alt}\" or \"Select image\". */\n selectionLabel?: string;\n\n /**\n * Action menu items rendered behind a 3-dot IconButton in the top-right.\n * Ignored when `locked` is true. Pass an empty array (or omit) to hide the menu.\n */\n actions?: TextAction[];\n /**\n * Replaces the action menu with a non-interactive lock icon. Indicates the\n * viewer does not have permission to edit. `actions` are ignored.\n */\n locked?: boolean;\n /** Tooltip string shown when hovering the lock icon. */\n lockedTooltip?: string;\n\n /**\n * Metadata rows rendered beneath the thumbnail. Each entry becomes a\n * full-width, left-aligned row in a vertical Stack. Block content fills the\n * row; inline content (e.g. a Sticker) hugs the left. Region is omitted when\n * the array is empty or undefined.\n */\n metadata?: ReactNode[];\n\n /** Optional click handler for the whole tile. When provided, the tile is keyboard-activatable. */\n onClick?: (e: MouseEvent<HTMLDivElement>) => void;\n}\n\nconst ImageContainer = styled.div`\n position: relative;\n aspect-ratio: 200 / 144;\n background-color: ${({ theme }) => semanticColor(theme, 'SurfaceSecondary', theme.color.background.secondary)};\n overflow: hidden;\n`;\n\nconst Thumbnail = styled.img<{ $visible: boolean; $objectFit: 'cover' | 'contain' }>`\n position: absolute;\n inset: 0;\n width: 100%;\n height: 100%;\n object-fit: ${({ $objectFit }) => $objectFit};\n display: block;\n opacity: ${({ $visible }) => ($visible ? 1 : 0)};\n transition: opacity ${TransitionDuration.Fast};\n`;\n\nconst ImageShimmer = styled(LoadingShimmer)`\n position: absolute;\n inset: 0;\n width: 100%;\n height: 100%;\n border-radius: 0;\n`;\n\nconst EmptyState = styled.div`\n position: absolute;\n inset: 0;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: ${Spacing[1]};\n color: ${({ theme }) => semanticColor(theme, 'FgDisabled', Color.BorderIconDisabled)};\n padding: ${Spacing[3]};\n text-align: center;\n`;\n\nconst MetadataContainer = styled.div`\n padding: ${Spacing[3]};\n background-color: ${({ theme }) => semanticColor(theme, 'SurfacePrimary', theme.color.background.primary)};\n border-top: 1px solid ${({ theme }) => semanticColor(theme, 'BorderDivider', theme.color.border.primary)};\n transition: background-color ${TransitionDuration.Fast};\n`;\n\nconst MetadataRow = styled.div`\n width: 100%;\n // Without these Stickers get bottom aligned\n display: flex;\n align-items: flex-start;\n`;\n\nconst SelectionOverlay = styled.div`\n position: absolute;\n top: ${OVERLAY_INSET};\n left: ${OVERLAY_INSET};\n z-index: 1;\n`;\n\nconst ActionsOverlay = styled.div`\n position: absolute;\n top: ${OVERLAY_INSET};\n right: ${OVERLAY_INSET};\n z-index: 1;\n`;\n\nconst LockedOverlay = styled.div`\n position: absolute;\n top: ${OVERLAY_INSET};\n right: ${OVERLAY_INSET};\n z-index: 1;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n color: ${({ theme }) => semanticColor(theme, 'FgSecondary', theme.color.text.secondary)};\n`;\n\nconst Root = styled.div<{ $clickable: boolean }>`\n position: relative;\n display: flex;\n flex-direction: column;\n width: 100%;\n min-width: ${MIN_WIDTH};\n max-width: ${MAX_WIDTH};\n background-color: ${({ theme }) => semanticColor(theme, 'SurfacePrimary', theme.color.background.primary)};\n border: 1px solid ${({ theme }) => semanticColor(theme, 'BorderDivider', theme.color.border.primary)};\n border-radius: ${({ theme }) => theme.card.borderRadius};\n box-sizing: border-box;\n overflow: hidden;\n ${focusOutline};\n\n ${({ $clickable }) =>\n $clickable &&\n css`\n cursor: pointer;\n `}\n\n &:hover ${MetadataContainer} {\n background-color: ${({ theme }) => semanticColor(theme, 'SurfaceAccent', theme.color.background.highlight)};\n }\n`;\n\nconst stopPropagation = (e: MouseEvent) => {\n e.stopPropagation();\n};\n\nexport const ImageTile = ({\n src,\n alt = '',\n objectFit = 'cover',\n selectable = false,\n selected = false,\n onSelectedChange,\n selectionLabel,\n actions,\n locked = false,\n lockedTooltip,\n metadata,\n onClick,\n ...props\n}: ImageTileProps) => {\n const [loaded, setLoaded] = useState(false);\n const [hasError, setHasError] = useState(false);\n\n useEffect(() => {\n setLoaded(false);\n setHasError(false);\n }, [src]);\n\n const hasSrc = Boolean(src);\n const isLoading = hasSrc && !loaded && !hasError;\n const showEmpty = !hasSrc || hasError;\n\n const visibleActions = actions?.filter((action) => !action.hidden) ?? [];\n const renderActions = !locked && visibleActions.length > 0;\n const clickable = Boolean(onClick);\n\n const handleKeyDown = (e: KeyboardEvent<HTMLDivElement>) => {\n if (!onClick) {\n return;\n }\n // Only activate when the key event originates from the tile root itself.\n // Interactive descendants (selection checkbox, action buttons) must keep\n // their own native Space/Enter behavior.\n if (e.target !== e.currentTarget) {\n return;\n }\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n e.currentTarget.click();\n }\n };\n\n const accessibleSelectionLabel =\n selectionLabel ?? (alt ? `Select ${alt}` : DEFAULT_SELECTION_LABEL);\n\n const hasMetadata = (metadata?.length ?? 0) > 0;\n const renderMetadata = hasMetadata || isLoading;\n\n return (\n <Root\n $clickable={clickable}\n onClick={onClick}\n onKeyDown={clickable ? handleKeyDown : undefined}\n role={clickable ? 'button' : undefined}\n tabIndex={clickable ? 0 : undefined}\n {...props}\n >\n <ImageContainer>\n {hasSrc && !hasError && (\n <Thumbnail\n $visible={loaded}\n $objectFit={objectFit}\n src={src ?? undefined}\n alt={alt}\n onLoad={() => setLoaded(true)}\n onError={() => setHasError(true)}\n />\n )}\n {isLoading && <ImageShimmer />}\n {showEmpty && (\n <EmptyState>\n <ImageIcon size={24} aria-hidden />\n <Paragraph size='sm' color='secondary' as='span'>\n {EMPTY_COPY}\n </Paragraph>\n </EmptyState>\n )}\n\n {selectable && (\n <SelectionOverlay onClick={stopPropagation}>\n <Checkbox\n size='sm'\n checked={selected}\n onChange={(e) => onSelectedChange?.(e.target.checked)}\n aria-label={accessibleSelectionLabel}\n />\n </SelectionOverlay>\n )}\n\n {renderActions && (\n <ActionsOverlay onClick={stopPropagation}>\n <DropdownMenu\n portal\n trigger={\n <IconButton size='sm' aria-label='More actions'>\n <MoreIcon />\n </IconButton>\n }\n >\n {visibleActions.map((action, idx) => (\n <DropdownMenu.Item\n key={action.id ?? `${action.label}-${idx}`}\n prefixIcon={action.prefixIcon}\n suffixIcon={action.suffixIcon}\n disabled={action.disabled}\n variant={action.variant === 'danger' ? 'danger' : 'basic'}\n onClick={(e) => {\n if (action.disabled) {\n return;\n }\n return action.onClick?.(e);\n }}\n >\n {action.label}\n </DropdownMenu.Item>\n ))}\n </DropdownMenu>\n </ActionsOverlay>\n )}\n\n {locked && (\n <LockedOverlay onClick={stopPropagation}>\n {lockedTooltip ? (\n <Tooltip iconTrigger={<LockedIcon size={16} />} aria-label={lockedTooltip}>\n {lockedTooltip}\n </Tooltip>\n ) : (\n <LockedIcon size={16} aria-label='Locked' />\n )}\n </LockedOverlay>\n )}\n </ImageContainer>\n\n {renderMetadata && (\n <MetadataContainer>\n {isLoading ? (\n <LoadingShimmer width='60%' height='14px' />\n ) : (\n <Stack spacing={Spacing[2]}>\n {metadata?.map((row, idx) => (\n <MetadataRow key={idx}>{row}</MetadataRow>\n ))}\n </Stack>\n )}\n </MetadataContainer>\n )}\n </Root>\n );\n};\n\nexport default ImageTile;\n"],"mappings":"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"}
|
|
@@ -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,7 +1,8 @@
|
|
|
1
|
-
import { a as styled, r as css } from "../../styledComponentsInterop-
|
|
2
|
-
import {
|
|
3
|
-
import "../../variables/transitions.mjs";
|
|
1
|
+
import { a as styled, r as css } from "../../styledComponentsInterop-NxwFjeA4.mjs";
|
|
2
|
+
import { semanticColor } from "../../lib/semanticColor.mjs";
|
|
4
3
|
import { paragraphMixins } from "../../mixins/text.mjs";
|
|
4
|
+
import "../../variables/transitions.mjs";
|
|
5
|
+
import { focusOutline } from "../../mixins/focus.mjs";
|
|
5
6
|
import { Color, Spacing } from "@persona/design-tokens";
|
|
6
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
8
|
import { LinkExternalIcon } from "@persona/icons";
|
|
@@ -20,7 +21,7 @@ const IconContainer = styled.span`
|
|
|
20
21
|
`;
|
|
21
22
|
const baseLinkStyles = css`
|
|
22
23
|
${paragraphMixins.md};
|
|
23
|
-
color: ${Color.CorePurple600};
|
|
24
|
+
color: ${({ theme }) => semanticColor(theme, "FgAccent", Color.CorePurple600)};
|
|
24
25
|
width: fit-content;
|
|
25
26
|
position: relative;
|
|
26
27
|
overflow: hidden;
|
|
@@ -32,8 +33,7 @@ const baseLinkStyles = css`
|
|
|
32
33
|
text-underline-offset: 2px;
|
|
33
34
|
|
|
34
35
|
&:hover {
|
|
35
|
-
|
|
36
|
-
color: ${Color.CorePurple800};
|
|
36
|
+
color: ${({ theme }) => semanticColor(theme, "FgAccentHover", Color.CorePurple800)};
|
|
37
37
|
text-underline-offset: ${Spacing[1]};
|
|
38
38
|
}
|
|
39
39
|
|
|
@@ -41,8 +41,7 @@ const baseLinkStyles = css`
|
|
|
41
41
|
${focusOutline}
|
|
42
42
|
|
|
43
43
|
&:active {
|
|
44
|
-
|
|
45
|
-
color: ${Color.CorePurple900};
|
|
44
|
+
color: ${({ theme }) => semanticColor(theme, "FgAccentActive", Color.CorePurple900)};
|
|
46
45
|
}
|
|
47
46
|
`;
|
|
48
47
|
const StyledAnchor = styled.a`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":["RouterLink"],"sources":["../../../components/Link/Link.tsx"],"sourcesContent":["import type { AnchorHTMLAttributes, ReactNode } from 'react';\nimport { Link as RouterLink, type LinkProps as RouterLinkProps } from 'react-router-dom';\nimport styled, { css } from 'styled-components';\n\nimport { Color, Spacing } from '@persona/design-tokens';\nimport { LinkExternalIcon } from '@persona/icons';\nimport { focusOutline } from 'design-system/mixins/focus';\nimport { paragraphMixins } from 'design-system/mixins/text';\nimport { TransitionDuration } from 'design-system/variables/transitions';\n\ntype Target = '_blank' | '_self' | '_parent' | '_top';\n\ninterface BaseLinkProps {\n /**\n * The content to display inside the link.\n *\n */\n children?: ReactNode;\n /**\n * Provides an accessible name for the link when the visible text alone\n * isn't descriptive enough for screen reader users\n */\n 'aria-label'?: string;\n}\n\ninterface ExternalLinkProps extends BaseLinkProps, AnchorHTMLAttributes<HTMLAnchorElement> {\n /**\n * The URL to navigate to. Can be internal (e.g., \"/settings\") or external (e.g., \"https://example.com\").\n */\n url: string;\n\n /**\n * Where to open the link. Use \"_blank\" for external links to open in a new tab.\n */\n target?: Target;\n}\n\ninterface InternalLinkProps extends BaseLinkProps, Omit<RouterLinkProps, 'to'> {\n /**\n * The URL to navigate to. Should be an internal route (e.g., \"/settings\").\n */\n url: string;\n}\n\nexport type LinkProps = ExternalLinkProps | InternalLinkProps;\n\nconst IconContainer = styled.span`\n display: inline-block;\n vertical-align: middle;\n /* Uses padding here since we can't define flex on the element for multiline support */\n padding-left: 2px;\n /* Needed to reset the height of the container for SVG */\n line-height: 0;\n position: relative;\n /* Optical alignment adjustments */\n bottom: 1px;\n`;\n\nconst baseLinkStyles = css`\n ${paragraphMixins.md};\n color: ${Color.CorePurple600};\n width: fit-content;\n position: relative;\n overflow: hidden;\n text-decoration: underline;\n\n transition:\n color ${TransitionDuration.ExtraFast} ease-out,\n text-underline-offset ${TransitionDuration.ExtraFast} ease-out;\n text-underline-offset: 2px;\n\n &:hover {\n
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["RouterLink"],"sources":["../../../components/Link/Link.tsx"],"sourcesContent":["import type { AnchorHTMLAttributes, ReactNode } from 'react';\nimport { Link as RouterLink, type LinkProps as RouterLinkProps } from 'react-router-dom';\nimport styled, { css } from 'styled-components';\n\nimport { Color, Spacing } from '@persona/design-tokens';\nimport { LinkExternalIcon } from '@persona/icons';\nimport { semanticColor } from 'design-system/lib/semanticColor';\nimport { focusOutline } from 'design-system/mixins/focus';\nimport { paragraphMixins } from 'design-system/mixins/text';\nimport { TransitionDuration } from 'design-system/variables/transitions';\n\ntype Target = '_blank' | '_self' | '_parent' | '_top';\n\ninterface BaseLinkProps {\n /**\n * The content to display inside the link.\n *\n */\n children?: ReactNode;\n /**\n * Provides an accessible name for the link when the visible text alone\n * isn't descriptive enough for screen reader users\n */\n 'aria-label'?: string;\n}\n\ninterface ExternalLinkProps extends BaseLinkProps, AnchorHTMLAttributes<HTMLAnchorElement> {\n /**\n * The URL to navigate to. Can be internal (e.g., \"/settings\") or external (e.g., \"https://example.com\").\n */\n url: string;\n\n /**\n * Where to open the link. Use \"_blank\" for external links to open in a new tab.\n */\n target?: Target;\n}\n\ninterface InternalLinkProps extends BaseLinkProps, Omit<RouterLinkProps, 'to'> {\n /**\n * The URL to navigate to. Should be an internal route (e.g., \"/settings\").\n */\n url: string;\n}\n\nexport type LinkProps = ExternalLinkProps | InternalLinkProps;\n\nconst IconContainer = styled.span`\n display: inline-block;\n vertical-align: middle;\n /* Uses padding here since we can't define flex on the element for multiline support */\n padding-left: 2px;\n /* Needed to reset the height of the container for SVG */\n line-height: 0;\n position: relative;\n /* Optical alignment adjustments */\n bottom: 1px;\n`;\n\nconst baseLinkStyles = css`\n ${paragraphMixins.md};\n color: ${({ theme }) => semanticColor(theme, 'FgAccent', Color.CorePurple600)};\n width: fit-content;\n position: relative;\n overflow: hidden;\n text-decoration: underline;\n\n transition:\n color ${TransitionDuration.ExtraFast} ease-out,\n text-underline-offset ${TransitionDuration.ExtraFast} ease-out;\n text-underline-offset: 2px;\n\n &:hover {\n color: ${({ theme }) => semanticColor(theme, 'FgAccentHover', Color.CorePurple800)};\n text-underline-offset: ${Spacing[1]};\n }\n\n border-radius: ${({ theme }) => theme.button.borderRadius};\n ${focusOutline}\n\n &:active {\n color: ${({ theme }) => semanticColor(theme, 'FgAccentActive', Color.CorePurple900)};\n }\n`;\n\nconst StyledAnchor = styled.a`\n ${baseLinkStyles}\n`;\n\nconst StyledRouterLink = styled(RouterLink)`\n ${baseLinkStyles}\n`;\n\nexport const Link = ({ children, url, ...props }: LinkProps) => {\n // Check if the URL is external by looking at the protocol or if target is _blank\n const isAbsoluteUrl = /^https?:\\/\\//.test(url);\n const hasBlankTarget = props.target === '_blank';\n const isExternal = isAbsoluteUrl || hasBlankTarget;\n\n if (isExternal) {\n const { 'aria-label': ariaLabel, ...anchorProps } = props;\n const externalProps = {\n href: url,\n target: '_blank',\n rel: 'noopener noreferrer',\n 'aria-label': ariaLabel,\n // Automatically inform screen readers that link opens in new window\n title: ariaLabel ? undefined : 'Opens in new window',\n ...anchorProps,\n };\n\n return (\n <StyledAnchor {...externalProps}>\n {children}\n <IconContainer>\n <LinkExternalIcon size={12} />\n </IconContainer>\n </StyledAnchor>\n );\n }\n\n // Internal link using React Router\n const { 'aria-label': ariaLabel, ...routerProps } = props;\n const internalProps = {\n to: url,\n 'aria-label': ariaLabel,\n\n ...routerProps,\n };\n\n return <StyledRouterLink {...internalProps}>{children}</StyledRouterLink>;\n};\n\nexport default Link;\n"],"mappings":";;;;;;;;;;AA+CA,MAAM,gBAAgB,OAAO,IAAI;;;;;;;;;;;AAYjC,MAAM,iBAAiB,GAAG;IACtB,gBAAgB,GAAG;YACX,EAAE,YAAY,cAAc,OAAO,YAAY,MAAM,cAAc,CAAC;;;;;;;oBAOvC;oCACgB;;;;cAI3C,EAAE,YAAY,cAAc,OAAO,iBAAiB,MAAM,cAAc,CAAC;6BAC1D,QAAQ,GAAG;;;oBAGpB,EAAE,YAAY,MAAM,OAAO,aAAa;IACxD,aAAa;;;cAGH,EAAE,YAAY,cAAc,OAAO,kBAAkB,MAAM,cAAc,CAAC;;;AAIxF,MAAM,eAAe,OAAO,CAAC;IACzB,eAAe;;AAGnB,MAAM,mBAAmB,OAAOA,OAAW;IACvC,eAAe;;AAGnB,MAAa,QAAQ,EAAE,UAAU,KAAK,GAAG,YAAuB;CAE9D,MAAM,gBAAgB,eAAe,KAAK,IAAI;CAC9C,MAAM,iBAAiB,MAAM,WAAW;AAGxC,KAFmB,iBAAiB,gBAEpB;EACd,MAAM,EAAE,cAAc,WAAW,GAAG,gBAAgB;AAWpD,SACE,qBAAC,cAAD;GAVA,MAAM;GACN,QAAQ;GACR,KAAK;GACL,cAAc;GAEd,OAAO,YAAY,KAAA,IAAY;GAC/B,GAAG;aAIH,CACG,UACD,oBAAC,eAAD,EAAA,UACE,oBAAC,kBAAD,EAAkB,MAAM,IAAM,CAAA,EAChB,CAAA,CACH;;;CAKnB,MAAM,EAAE,cAAc,WAAW,GAAG,gBAAgB;AAQpD,QAAO,oBAAC,kBAAD;EANL,IAAI;EACJ,cAAc;EAEd,GAAG;EAGwC;EAA4B,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as useListBoxContext, n as ListBoxItemProps, r as ListBoxProps } from "../../ListBox-
|
|
2
|
-
import { n as LogicRowProps } from "../../LogicRow-
|
|
3
|
-
import { t as ListBox } from "../../index-
|
|
1
|
+
import { i as useListBoxContext, n as ListBoxItemProps, r as ListBoxProps } from "../../ListBox-Awtw7Xy_.mjs";
|
|
2
|
+
import { n as LogicRowProps } from "../../LogicRow-DIn0gLEq.mjs";
|
|
3
|
+
import { t as ListBox } from "../../index-CBWvk6Ch.mjs";
|
|
4
4
|
export { ListBox, ListBox as default, ListBoxItemProps, ListBoxProps, LogicRowProps, useListBoxContext };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as useListBoxContext, t as ListBox } from "../../ListBox-
|
|
1
|
+
import { n as useListBoxContext, t as ListBox } from "../../ListBox-DqII8giL.mjs";
|
|
2
2
|
export { ListBox, ListBox as default, useListBoxContext };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as MaybeLoadingShimmer, n as LoadingShimmerHeading, r as LoadingShimmerParagraph, t as LoadingShimmer } from "../../LoadingShimmer-
|
|
1
|
+
import { i as MaybeLoadingShimmer, n as LoadingShimmerHeading, r as LoadingShimmerParagraph, t as LoadingShimmer } from "../../LoadingShimmer-ZyzJs5Vi.mjs";
|
|
2
2
|
export { LoadingShimmer, LoadingShimmerHeading, LoadingShimmerParagraph, MaybeLoadingShimmer };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { a as styled } from "../../styledComponentsInterop-
|
|
1
|
+
import { a as styled } from "../../styledComponentsInterop-NxwFjeA4.mjs";
|
|
2
|
+
import { semanticColor, semanticOnly } from "../../lib/semanticColor.mjs";
|
|
2
3
|
import { Spacing } from "@persona/design-tokens";
|
|
3
4
|
//#region components/MatchHighlight/MatchHighlight.tsx
|
|
4
5
|
const MatchHighlight = styled.span`
|
|
@@ -11,12 +12,13 @@ const MatchHighlight = styled.span`
|
|
|
11
12
|
/* Allow background colors to be dictated by the matchStrength. */
|
|
12
13
|
background-color: ${({ matchStrength, theme }) => {
|
|
13
14
|
switch (matchStrength) {
|
|
14
|
-
case "none": return theme.color.background.disabled;
|
|
15
|
-
case "partial": return theme.color.variants.success.highlightLight;
|
|
16
|
-
case "full": return theme.color.variants.success.highlightDark;
|
|
15
|
+
case "none": return semanticColor(theme, "FeedbackNeutral2Static", theme.color.background.disabled);
|
|
16
|
+
case "partial": return semanticColor(theme, "FeedbackWarning2", theme.color.variants.success.highlightLight);
|
|
17
|
+
case "full": return semanticColor(theme, "FeedbackSuccess2", theme.color.variants.success.highlightDark);
|
|
17
18
|
default: return "none";
|
|
18
19
|
}
|
|
19
20
|
}};
|
|
21
|
+
${semanticOnly((tokens) => `color: ${tokens.FgPrimaryStatic};`)}
|
|
20
22
|
`;
|
|
21
23
|
//#endregion
|
|
22
24
|
export { MatchHighlight, MatchHighlight as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../../../components/MatchHighlight/MatchHighlight.tsx"],"sourcesContent":["import type { ComponentPropsWithoutRef } from 'react';\nimport styled from 'styled-components';\n\nimport { Spacing } from '@persona/design-tokens';\n\nexport interface MatchHighlightProps extends Omit<ComponentPropsWithoutRef<'p'>, 'color'> {\n matchStrength?: 'none' | 'partial' | 'full';\n}\n\nexport const MatchHighlight = styled.span<MatchHighlightProps>`\n /* Sizing and Borders */\n width: fit-content;\n padding-left: ${Spacing[1]};\n padding-right: ${Spacing[1]};\n border-radius: ${Spacing[1]};\n\n /* Allow background colors to be dictated by the matchStrength. */\n background-color: ${({ matchStrength, theme }) => {\n switch (matchStrength) {\n case 'none':\n return theme.color.background.disabled;\n case 'partial':\n return theme.color.variants.success.highlightLight;\n case 'full':\n return theme.color.variants.success.highlightDark;\n\n default:\n return 'none';\n }\n }};\n`;\n\nexport default MatchHighlight;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../../components/MatchHighlight/MatchHighlight.tsx"],"sourcesContent":["import type { ComponentPropsWithoutRef } from 'react';\nimport styled from 'styled-components';\n\nimport { Spacing } from '@persona/design-tokens';\nimport { semanticColor, semanticOnly } from 'design-system/lib/semanticColor';\n\nexport interface MatchHighlightProps extends Omit<ComponentPropsWithoutRef<'p'>, 'color'> {\n matchStrength?: 'none' | 'partial' | 'full';\n}\n\nexport const MatchHighlight = styled.span<MatchHighlightProps>`\n /* Sizing and Borders */\n width: fit-content;\n padding-left: ${Spacing[1]};\n padding-right: ${Spacing[1]};\n border-radius: ${Spacing[1]};\n\n /* Allow background colors to be dictated by the matchStrength. */\n background-color: ${({ matchStrength, theme }) => {\n switch (matchStrength) {\n case 'none':\n return semanticColor(theme, 'FeedbackNeutral2Static', theme.color.background.disabled);\n case 'partial':\n return semanticColor(\n theme,\n 'FeedbackWarning2',\n theme.color.variants.success.highlightLight,\n );\n case 'full':\n return semanticColor(theme, 'FeedbackSuccess2', theme.color.variants.success.highlightDark);\n\n default:\n return 'none';\n }\n }};\n ${semanticOnly((tokens) => `color: ${tokens.FgPrimaryStatic};`)}\n`;\n\nexport default MatchHighlight;\n"],"mappings":";;;;AAUA,MAAa,iBAAiB,OAAO,IAAyB;;;kBAG5C,QAAQ,GAAG;mBACV,QAAQ,GAAG;mBACX,QAAQ,GAAG;;;uBAGP,EAAE,eAAe,YAAY;AAChD,SAAQ,eAAR;EACE,KAAK,OACH,QAAO,cAAc,OAAO,0BAA0B,MAAM,MAAM,WAAW,SAAS;EACxF,KAAK,UACH,QAAO,cACL,OACA,oBACA,MAAM,MAAM,SAAS,QAAQ,eAC9B;EACH,KAAK,OACH,QAAO,cAAc,OAAO,oBAAoB,MAAM,MAAM,SAAS,QAAQ,cAAc;EAE7F,QACE,QAAO;;EAEX;IACA,cAAc,WAAW,UAAU,OAAO,gBAAgB,GAAG,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as MenuDivider, c as MenuItem, d as MenuList, f as MenuProps, i as Menu, l as MenuItemProps, n as IconContainer, o as MenuHeading, r as ListItem, s as MenuHeadingProps, t as FloatingCard, u as MenuItemType } from "../../Menu-
|
|
1
|
+
import { a as MenuDivider, c as MenuItem, d as MenuList, f as MenuProps, i as Menu, l as MenuItemProps, n as IconContainer, o as MenuHeading, r as ListItem, s as MenuHeadingProps, t as FloatingCard, u as MenuItemType } from "../../Menu-DdHN-drQ.mjs";
|
|
2
2
|
export { FloatingCard, IconContainer, ListItem, Menu, Menu as default, MenuDivider, MenuHeading, MenuHeadingProps, MenuItem, MenuItemProps, MenuItemType, MenuList, MenuProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as MenuDivider, c as MenuList, i as Menu, n as IconContainer, o as MenuHeading, r as ListItem, s as MenuItem, t as FloatingCard } from "../../Menu-
|
|
1
|
+
import { a as MenuDivider, c as MenuList, i as Menu, n as IconContainer, o as MenuHeading, r as ListItem, s as MenuItem, t as FloatingCard } from "../../Menu-CeV3lL2g.mjs";
|
|
2
2
|
export { FloatingCard, IconContainer, ListItem, Menu, Menu as default, MenuDivider, MenuHeading, MenuItem, MenuList };
|
|
@@ -1,78 +1,17 @@
|
|
|
1
|
-
import { a as styled } from "../../styledComponentsInterop-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { a as styled } from "../../styledComponentsInterop-NxwFjeA4.mjs";
|
|
2
|
+
import { semanticColor, semanticOnly } from "../../lib/semanticColor.mjs";
|
|
3
|
+
import { t as Card_default } from "../../Card-vQIPtdXi.mjs";
|
|
4
|
+
import { n as Heading$1 } from "../../Text-Dn_p7ZvT.mjs";
|
|
4
5
|
import useEmbeddedSurface, { useEmbeddedSurfaceGate, useEmbeddedSurfaceId } from "../../lib/useEmbeddedSurface.mjs";
|
|
5
|
-
import
|
|
6
|
-
import { n as
|
|
7
|
-
import {
|
|
6
|
+
import useModalInsetRight from "../../lib/useModalInsetRight.mjs";
|
|
7
|
+
import { n as Stack, t as HStack } from "../../Stack-BqQndGI9.mjs";
|
|
8
|
+
import { n as Button$1 } from "../../IconButton-CnJNIJVQ.mjs";
|
|
9
|
+
import { i as TabBar, r as Tab } from "../../TabBar-Dw3xE_B-.mjs";
|
|
8
10
|
import { Color, Spacing } from "@persona/design-tokens";
|
|
9
|
-
import { forwardRef, useContext, useEffect,
|
|
11
|
+
import { forwardRef, useContext, useEffect, useState } from "react";
|
|
10
12
|
import { Button, Dialog, DialogTrigger, Heading, Modal, ModalOverlay, OverlayTriggerStateContext, Pressable } from "react-aria-components";
|
|
11
13
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
14
|
import { XIcon } from "@persona/icons";
|
|
13
|
-
//#region lib/useModalInsetRight.ts
|
|
14
|
-
const CSS_VAR = "--modal-inset-right";
|
|
15
|
-
const getModalInsetRight = () => getComputedStyle(document.documentElement).getPropertyValue(CSS_VAR).trim() || "0px";
|
|
16
|
-
const prefersReducedMotion = () => typeof window !== "undefined" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
17
|
-
/**
|
|
18
|
-
* Returns the current value of --modal-inset-right from :root, reactively updating
|
|
19
|
-
* as the agents side panel animates open/closed or is resized. Also tracks whether
|
|
20
|
-
* the panel is opening, open, closing, or closed.
|
|
21
|
-
*
|
|
22
|
-
* panelState stays 'opening'/'closing' for the full transition duration so that
|
|
23
|
-
* CSS transitions on consumers have time to animate.
|
|
24
|
-
*/
|
|
25
|
-
const useModalInsetRight = () => {
|
|
26
|
-
const [insetRight, setInsetRight] = useState(getModalInsetRight);
|
|
27
|
-
const [panelState, setPanelState] = useState(() => getModalInsetRight() !== "0px" ? "open" : "closed");
|
|
28
|
-
const prevInsetRight = useRef(getModalInsetRight());
|
|
29
|
-
const transitionTimerRef = useRef(null);
|
|
30
|
-
const rafRef = useRef(null);
|
|
31
|
-
useEffect(() => {
|
|
32
|
-
const observer = new MutationObserver(() => {
|
|
33
|
-
const prev = prevInsetRight.current;
|
|
34
|
-
const next = getModalInsetRight();
|
|
35
|
-
prevInsetRight.current = next;
|
|
36
|
-
if (prev === "0px" && next !== "0px") if (prefersReducedMotion()) {
|
|
37
|
-
setInsetRight(next);
|
|
38
|
-
setPanelState("open");
|
|
39
|
-
} else {
|
|
40
|
-
if (rafRef.current) cancelAnimationFrame(rafRef.current);
|
|
41
|
-
if (transitionTimerRef.current) clearTimeout(transitionTimerRef.current);
|
|
42
|
-
setInsetRight("0px");
|
|
43
|
-
setPanelState("opening");
|
|
44
|
-
rafRef.current = requestAnimationFrame(() => setInsetRight(next));
|
|
45
|
-
transitionTimerRef.current = setTimeout(() => setPanelState("open"), 425);
|
|
46
|
-
}
|
|
47
|
-
else if (prev !== "0px" && next === "0px") if (prefersReducedMotion()) {
|
|
48
|
-
setInsetRight("0px");
|
|
49
|
-
setPanelState("closed");
|
|
50
|
-
} else {
|
|
51
|
-
if (rafRef.current) cancelAnimationFrame(rafRef.current);
|
|
52
|
-
if (transitionTimerRef.current) clearTimeout(transitionTimerRef.current);
|
|
53
|
-
setInsetRight(prev);
|
|
54
|
-
setPanelState("closing");
|
|
55
|
-
rafRef.current = requestAnimationFrame(() => setInsetRight("0px"));
|
|
56
|
-
transitionTimerRef.current = setTimeout(() => setPanelState("closed"), 200);
|
|
57
|
-
}
|
|
58
|
-
else setInsetRight(next);
|
|
59
|
-
});
|
|
60
|
-
observer.observe(document.documentElement, {
|
|
61
|
-
attributes: true,
|
|
62
|
-
attributeFilter: ["style"]
|
|
63
|
-
});
|
|
64
|
-
return () => {
|
|
65
|
-
observer.disconnect();
|
|
66
|
-
if (transitionTimerRef.current) clearTimeout(transitionTimerRef.current);
|
|
67
|
-
if (rafRef.current) cancelAnimationFrame(rafRef.current);
|
|
68
|
-
};
|
|
69
|
-
}, []);
|
|
70
|
-
return {
|
|
71
|
-
insetRight,
|
|
72
|
-
panelState
|
|
73
|
-
};
|
|
74
|
-
};
|
|
75
|
-
//#endregion
|
|
76
15
|
//#region components/Modal/Modal.tsx
|
|
77
16
|
const StyledModalOverlay = styled(ModalOverlay)`
|
|
78
17
|
@keyframes overlayShow {
|
|
@@ -111,6 +50,7 @@ const StyledModal = styled(Modal)`
|
|
|
111
50
|
outline: none;
|
|
112
51
|
width: fit-content;
|
|
113
52
|
max-width: 100%;
|
|
53
|
+
${semanticOnly((tokens) => `color: ${tokens.FgPrimary};`)}
|
|
114
54
|
`;
|
|
115
55
|
/**
|
|
116
56
|
* React Aria keeps the overlay mounted through the exit animation, so announcing the surface from
|
|
@@ -149,7 +89,7 @@ const ModalFooter = styled(HStack).attrs({
|
|
|
149
89
|
spacing: Spacing[2]
|
|
150
90
|
})`
|
|
151
91
|
padding: ${Spacing[3]} ${Spacing[4]};
|
|
152
|
-
border-top: 1px solid ${Color.BorderDivider};
|
|
92
|
+
border-top: 1px solid ${({ theme }) => semanticColor(theme, "BorderSubtle", Color.BorderDivider)};
|
|
153
93
|
`;
|
|
154
94
|
const ModalHeaderTitle = styled.div`
|
|
155
95
|
flex: 1;
|
|
@@ -183,7 +123,7 @@ const ModalTitle = ({ children, ...props }) => {
|
|
|
183
123
|
});
|
|
184
124
|
};
|
|
185
125
|
const ModalHeader = styled(HStack)`
|
|
186
|
-
border-bottom: ${({ $hasTabs }) => $hasTabs ? "none" : `1px solid ${Color.BorderDivider}`};
|
|
126
|
+
border-bottom: ${({ $hasTabs, theme }) => $hasTabs ? "none" : `1px solid ${semanticColor(theme, "BorderSubtle", Color.BorderDivider)}`};
|
|
187
127
|
padding: ${({ $hasTabs }) => $hasTabs ? `${Spacing[3]} ${Spacing[2]} ${Spacing[1]} ${Spacing[4]}` : `${Spacing[3]} ${Spacing[2]} ${Spacing[3]} ${Spacing[4]}`};
|
|
188
128
|
`;
|
|
189
129
|
const ModalTabBar = styled(TabBar)`
|