@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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parser.mjs","names":["peg$import0"],"sources":["../../../../../components/SmartTextInput/parser/smart-text/parser.js"],"sourcesContent":["/**\n * ==============================================================================\n * This file is generated by bin/smart_text_input_parser/generate.sh\n * Do not edit this file directly\n * ==============================================================================\n */\n\n\n// @generated by Peggy 4.2.0.\n//\n// https://peggyjs.org/\n\nimport * as peg$import0 from \"../method-chain/parser.js\";\n\n\n function mkNode(type, start, end, children) {\n return { type, start, end, children: children || [] };\n }\n function mkError(start, end, kind, extra) {\n return { type: 'error', start, end, ...(kind ? { kind } : {}), ...(extra || {}) };\n }\n function hasErrors(node) {\n if (!node || typeof node !== 'object') return false;\n if (node.type === 'error') return true;\n const children = node.children || [];\n return children.some(hasErrors);\n }\n\nfunction peg$subclass(child, parent) {\n function C() { this.constructor = child; }\n C.prototype = parent.prototype;\n child.prototype = new C();\n}\n\nfunction peg$SyntaxError(message, expected, found, location) {\n var self = Error.call(this, message);\n // istanbul ignore next Check is a necessary evil to support older environments\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(self, peg$SyntaxError.prototype);\n }\n self.expected = expected;\n self.found = found;\n self.location = location;\n self.name = \"SyntaxError\";\n return self;\n}\n\npeg$subclass(peg$SyntaxError, Error);\n\nfunction peg$padEnd(str, targetLength, padString) {\n padString = padString || \" \";\n if (str.length > targetLength) { return str; }\n targetLength -= str.length;\n padString += padString.repeat(targetLength);\n return str + padString.slice(0, targetLength);\n}\n\npeg$SyntaxError.prototype.format = function(sources) {\n var str = \"Error: \" + this.message;\n if (this.location) {\n var src = null;\n var k;\n for (k = 0; k < sources.length; k++) {\n if (sources[k].source === this.location.source) {\n src = sources[k].text.split(/\\r\\n|\\n|\\r/g);\n break;\n }\n }\n var s = this.location.start;\n var offset_s = (this.location.source && (typeof this.location.source.offset === \"function\"))\n ? this.location.source.offset(s)\n : s;\n var loc = this.location.source + \":\" + offset_s.line + \":\" + offset_s.column;\n if (src) {\n var e = this.location.end;\n var filler = peg$padEnd(\"\", offset_s.line.toString().length, ' ');\n var line = src[s.line - 1];\n var last = s.line === e.line ? e.column : line.length + 1;\n var hatLen = (last - s.column) || 1;\n str += \"\\n --> \" + loc + \"\\n\"\n + filler + \" |\\n\"\n + offset_s.line + \" | \" + line + \"\\n\"\n + filler + \" | \" + peg$padEnd(\"\", s.column - 1, ' ')\n + peg$padEnd(\"\", hatLen, \"^\");\n } else {\n str += \"\\n at \" + loc;\n }\n }\n return str;\n};\n\npeg$SyntaxError.buildMessage = function(expected, found) {\n var DESCRIBE_EXPECTATION_FNS = {\n literal: function(expectation) {\n return \"\\\"\" + literalEscape(expectation.text) + \"\\\"\";\n },\n\n class: function(expectation) {\n var escapedParts = expectation.parts.map(function(part) {\n return Array.isArray(part)\n ? classEscape(part[0]) + \"-\" + classEscape(part[1])\n : classEscape(part);\n });\n\n return \"[\" + (expectation.inverted ? \"^\" : \"\") + escapedParts.join(\"\") + \"]\";\n },\n\n any: function() {\n return \"any character\";\n },\n\n end: function() {\n return \"end of input\";\n },\n\n other: function(expectation) {\n return expectation.description;\n }\n };\n\n function hex(ch) {\n return ch.charCodeAt(0).toString(16).toUpperCase();\n }\n\n function literalEscape(s) {\n return s\n .replace(/\\\\/g, \"\\\\\\\\\")\n .replace(/\"/g, \"\\\\\\\"\")\n .replace(/\\0/g, \"\\\\0\")\n .replace(/\\t/g, \"\\\\t\")\n .replace(/\\n/g, \"\\\\n\")\n .replace(/\\r/g, \"\\\\r\")\n .replace(/[\\x00-\\x0F]/g, function(ch) { return \"\\\\x0\" + hex(ch); })\n .replace(/[\\x10-\\x1F\\x7F-\\x9F]/g, function(ch) { return \"\\\\x\" + hex(ch); });\n }\n\n function classEscape(s) {\n return s\n .replace(/\\\\/g, \"\\\\\\\\\")\n .replace(/\\]/g, \"\\\\]\")\n .replace(/\\^/g, \"\\\\^\")\n .replace(/-/g, \"\\\\-\")\n .replace(/\\0/g, \"\\\\0\")\n .replace(/\\t/g, \"\\\\t\")\n .replace(/\\n/g, \"\\\\n\")\n .replace(/\\r/g, \"\\\\r\")\n .replace(/[\\x00-\\x0F]/g, function(ch) { return \"\\\\x0\" + hex(ch); })\n .replace(/[\\x10-\\x1F\\x7F-\\x9F]/g, function(ch) { return \"\\\\x\" + hex(ch); });\n }\n\n function describeExpectation(expectation) {\n return DESCRIBE_EXPECTATION_FNS[expectation.type](expectation);\n }\n\n function describeExpected(expected) {\n var descriptions = expected.map(describeExpectation);\n var i, j;\n\n descriptions.sort();\n\n if (descriptions.length > 0) {\n for (i = 1, j = 1; i < descriptions.length; i++) {\n if (descriptions[i - 1] !== descriptions[i]) {\n descriptions[j] = descriptions[i];\n j++;\n }\n }\n descriptions.length = j;\n }\n\n switch (descriptions.length) {\n case 1:\n return descriptions[0];\n\n case 2:\n return descriptions[0] + \" or \" + descriptions[1];\n\n default:\n return descriptions.slice(0, -1).join(\", \")\n + \", or \"\n + descriptions[descriptions.length - 1];\n }\n }\n\n function describeFound(found) {\n return found ? \"\\\"\" + literalEscape(found) + \"\\\"\" : \"end of input\";\n }\n\n return \"Expected \" + describeExpected(expected) + \" but \" + describeFound(found) + \" found.\";\n};\n\nfunction peg$parse(input, options) {\n options = options !== undefined ? options : {};\n\n var peg$FAILED = {};\n var peg$source = options.grammarSource;\n\n var peg$startRuleFunctions = { Root: peg$parseRoot, ChainRoot: peg$parseChainRoot };\n var peg$startRuleFunction = peg$parseRoot;\n\n var peg$c0 = \"{{\";\n var peg$c1 = \"}}\";\n var peg$c2 = \"${\";\n var peg$c3 = \"}\";\n var peg$c4 = \".\";\n\n var peg$r0 = /^[ \\t]/;\n\n var peg$e0 = peg$literalExpectation(\"{{\", false);\n var peg$e1 = peg$literalExpectation(\"}}\", false);\n var peg$e2 = peg$literalExpectation(\"${\", false);\n var peg$e3 = peg$literalExpectation(\"}\", false);\n var peg$e4 = peg$anyExpectation();\n var peg$e5 = peg$literalExpectation(\".\", false);\n var peg$e6 = peg$classExpectation([\" \", \"\\t\"], false, false);\n\n var peg$f0 = function(children) {\n const node = mkNode('root', 0, input.length, children);\n if (options.strict === true && hasErrors(node)) { error('Invalid expression'); }\n return node;\n };\n var peg$f1 = function(chain) {\n return mkNode('root', 0, input.length, [chain]);\n };\n var peg$f2 = function() { return !!options.allowHandlebars };\n var peg$f3 = function(node) { return node; };\n var peg$f4 = function() { return !!options.allowCode };\n var peg$f5 = function(node) { return node; };\n var peg$f6 = function(chain) {\n const s = location().start.offset;\n const e = location().end.offset;\n return mkNode('handlebars', s, e, [\n mkNode('hb_open', s, s + 2),\n chain,\n mkNode('hb_close', e - 2, e),\n ]);\n };\n var peg$f7 = function(chain) {\n const s = location().start.offset;\n const e = location().end.offset;\n return mkNode('handlebars', s, e, [\n mkNode('hb_open', s, s + 2),\n chain,\n mkError(e, e, 'unclosedHandlebars'),\n ]);\n };\n var peg$f8 = function() {\n const s = location().start.offset;\n const e = location().end.offset;\n return mkNode('handlebars', s, e, [\n mkNode('hb_open', s, s + 2),\n mkError(s + 2, s + 2, 'emptyHandlebars'),\n mkNode('hb_close', e - 2, e),\n ]);\n };\n var peg$f9 = function() {\n const s = location().start.offset;\n const e = location().end.offset;\n return mkNode('handlebars', s, e, [\n mkNode('hb_open', s, s + 2),\n mkError(e, e, 'unclosedHandlebars'),\n ]);\n };\n var peg$f10 = function() {\n const s = location().start.offset;\n const e = location().end.offset;\n return mkNode('code', s, e, [\n mkNode('code_open', s, s + 2),\n { type: 'code', start: s + 2, end: e - 1 },\n mkNode('code_close', e - 1, e),\n ]);\n };\n var peg$f11 = function() {\n const s = location().start.offset;\n const e = location().end.offset;\n return mkNode('code', s, e, [\n mkNode('code_open', s, s + 2),\n { type: 'code', start: s + 2, end: e },\n ]);\n };\n var peg$f12 = function() {\n return { type: 'dot', start: location().start.offset, end: location().end.offset };\n };\n var peg$f13 = function(chars) {\n const s = location().start.offset;\n const e = location().end.offset;\n return mkNode('text', s, e);\n };\n var peg$f14 = function() { return !!options.allowHandlebars };\n var peg$f15 = function() { return !!options.allowCode };\n var peg$currPos = options.peg$currPos | 0;\n var peg$savedPos = peg$currPos;\n var peg$posDetailsCache = [{ line: 1, column: 1 }];\n var peg$maxFailPos = peg$currPos;\n var peg$maxFailExpected = options.peg$maxFailExpected || [];\n var peg$silentFails = options.peg$silentFails | 0;\n\n var peg$result;\n\n if (options.startRule) {\n if (!(options.startRule in peg$startRuleFunctions)) {\n throw new Error(\"Can't start parsing from rule \\\"\" + options.startRule + \"\\\".\");\n }\n\n peg$startRuleFunction = peg$startRuleFunctions[options.startRule];\n }\n\n function text() {\n return input.substring(peg$savedPos, peg$currPos);\n }\n\n function offset() {\n return peg$savedPos;\n }\n\n function range() {\n return {\n source: peg$source,\n start: peg$savedPos,\n end: peg$currPos\n };\n }\n\n function location() {\n return peg$computeLocation(peg$savedPos, peg$currPos);\n }\n\n function expected(description, location) {\n location = location !== undefined\n ? location\n : peg$computeLocation(peg$savedPos, peg$currPos);\n\n throw peg$buildStructuredError(\n [peg$otherExpectation(description)],\n input.substring(peg$savedPos, peg$currPos),\n location\n );\n }\n\n function error(message, location) {\n location = location !== undefined\n ? location\n : peg$computeLocation(peg$savedPos, peg$currPos);\n\n throw peg$buildSimpleError(message, location);\n }\n\n function peg$literalExpectation(text, ignoreCase) {\n return { type: \"literal\", text: text, ignoreCase: ignoreCase };\n }\n\n function peg$classExpectation(parts, inverted, ignoreCase) {\n return { type: \"class\", parts: parts, inverted: inverted, ignoreCase: ignoreCase };\n }\n\n function peg$anyExpectation() {\n return { type: \"any\" };\n }\n\n function peg$endExpectation() {\n return { type: \"end\" };\n }\n\n function peg$otherExpectation(description) {\n return { type: \"other\", description: description };\n }\n\n function peg$computePosDetails(pos) {\n var details = peg$posDetailsCache[pos];\n var p;\n\n if (details) {\n return details;\n } else {\n if (pos >= peg$posDetailsCache.length) {\n p = peg$posDetailsCache.length - 1;\n } else {\n p = pos;\n while (!peg$posDetailsCache[--p]) {}\n }\n\n details = peg$posDetailsCache[p];\n details = {\n line: details.line,\n column: details.column\n };\n\n while (p < pos) {\n if (input.charCodeAt(p) === 10) {\n details.line++;\n details.column = 1;\n } else {\n details.column++;\n }\n\n p++;\n }\n\n peg$posDetailsCache[pos] = details;\n\n return details;\n }\n }\n\n function peg$computeLocation(startPos, endPos, offset) {\n var startPosDetails = peg$computePosDetails(startPos);\n var endPosDetails = peg$computePosDetails(endPos);\n\n var res = {\n source: peg$source,\n start: {\n offset: startPos,\n line: startPosDetails.line,\n column: startPosDetails.column\n },\n end: {\n offset: endPos,\n line: endPosDetails.line,\n column: endPosDetails.column\n }\n };\n if (offset && peg$source && (typeof peg$source.offset === \"function\")) {\n res.start = peg$source.offset(res.start);\n res.end = peg$source.offset(res.end);\n }\n return res;\n }\n\n function peg$fail(expected) {\n if (peg$currPos < peg$maxFailPos) { return; }\n\n if (peg$currPos > peg$maxFailPos) {\n peg$maxFailPos = peg$currPos;\n peg$maxFailExpected = [];\n }\n\n peg$maxFailExpected.push(expected);\n }\n\n function peg$buildSimpleError(message, location) {\n return new peg$SyntaxError(message, null, null, location);\n }\n\n function peg$buildStructuredError(expected, found, location) {\n return new peg$SyntaxError(\n peg$SyntaxError.buildMessage(expected, found),\n expected,\n found,\n location\n );\n }\n\n var peg$assign = Object.assign || function(t) {\n var i, s;\n for (i = 1; i < arguments.length; i++) {\n s = arguments[i];\n for (var p in s) {\n if (Object.prototype.hasOwnProperty.call(s, p)) {\n t[p] = s[p];\n }\n }\n }\n return t;\n };\n\n function peg$callLibrary(lib, startRule) {\n const opts = peg$assign({}, options, {\n startRule: startRule,\n peg$currPos: peg$currPos,\n peg$silentFails: peg$silentFails,\n peg$library: true,\n peg$maxFailExpected: peg$maxFailExpected\n });\n const res = lib.parse(input, opts);\n peg$currPos = res.peg$currPos;\n peg$maxFailPos = res.peg$maxFailPos;\n peg$maxFailExpected = res.peg$maxFailExpected;\n return (res.peg$result === res.peg$FAILED) ? peg$FAILED : res.peg$result;\n }\n\n function peg$parseRoot() {\n var s0, s1, s2;\n\n s0 = peg$currPos;\n s1 = [];\n s2 = peg$parseTopLevel();\n while (s2 !== peg$FAILED) {\n s1.push(s2);\n s2 = peg$parseTopLevel();\n }\n peg$savedPos = s0;\n s1 = peg$f0(s1);\n s0 = s1;\n\n return s0;\n }\n\n function peg$parseChainRoot() {\n var s0, s1;\n\n s0 = peg$currPos;\n s1 = peg$parseChain();\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$f1(s1);\n }\n s0 = s1;\n\n return s0;\n }\n\n function peg$parseTopLevel() {\n var s0, s1, s2;\n\n s0 = peg$currPos;\n peg$savedPos = peg$currPos;\n s1 = peg$f2();\n if (s1) {\n s1 = undefined;\n } else {\n s1 = peg$FAILED;\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parseHandlebars();\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s0 = peg$f3(s2);\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n peg$savedPos = peg$currPos;\n s1 = peg$f4();\n if (s1) {\n s1 = undefined;\n } else {\n s1 = peg$FAILED;\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parseCode();\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s0 = peg$f5(s2);\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$parseText();\n }\n }\n\n return s0;\n }\n\n function peg$parseHandlebars() {\n var s0, s1, s2, s3;\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 2) === peg$c0) {\n s1 = peg$c0;\n peg$currPos += 2;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$e0); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parseChain();\n if (s2 !== peg$FAILED) {\n if (input.substr(peg$currPos, 2) === peg$c1) {\n s3 = peg$c1;\n peg$currPos += 2;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$e1); }\n }\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s0 = peg$f6(s2);\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 2) === peg$c0) {\n s1 = peg$c0;\n peg$currPos += 2;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$e0); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parseChain();\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s0 = peg$f7(s2);\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 2) === peg$c0) {\n s1 = peg$c0;\n peg$currPos += 2;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$e0); }\n }\n if (s1 !== peg$FAILED) {\n if (input.substr(peg$currPos, 2) === peg$c1) {\n s2 = peg$c1;\n peg$currPos += 2;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$e1); }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s0 = peg$f8();\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 2) === peg$c0) {\n s1 = peg$c0;\n peg$currPos += 2;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$e0); }\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$f9();\n }\n s0 = s1;\n }\n }\n }\n\n return s0;\n }\n\n function peg$parseCode() {\n var s0, s1, s2, s3;\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 2) === peg$c2) {\n s1 = peg$c2;\n peg$currPos += 2;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$e2); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parseCodeContent();\n if (input.charCodeAt(peg$currPos) === 125) {\n s3 = peg$c3;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$e3); }\n }\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s0 = peg$f10();\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 2) === peg$c2) {\n s1 = peg$c2;\n peg$currPos += 2;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$e2); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parseCodeContent();\n peg$savedPos = s0;\n s0 = peg$f11();\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n\n return s0;\n }\n\n function peg$parseCodeContent() {\n var s0, s1, s2, s3;\n\n s0 = [];\n s1 = peg$currPos;\n s2 = peg$currPos;\n peg$silentFails++;\n if (input.substr(peg$currPos, 2) === peg$c2) {\n s3 = peg$c2;\n peg$currPos += 2;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$e2); }\n }\n if (s3 === peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 125) {\n s3 = peg$c3;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$e3); }\n }\n if (s3 === peg$FAILED) {\n if (input.substr(peg$currPos, 2) === peg$c0) {\n s3 = peg$c0;\n peg$currPos += 2;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$e0); }\n }\n }\n }\n peg$silentFails--;\n if (s3 === peg$FAILED) {\n s2 = undefined;\n } else {\n peg$currPos = s2;\n s2 = peg$FAILED;\n }\n if (s2 !== peg$FAILED) {\n if (input.length > peg$currPos) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$e4); }\n }\n if (s3 !== peg$FAILED) {\n s2 = [s2, s3];\n s1 = s2;\n } else {\n peg$currPos = s1;\n s1 = peg$FAILED;\n }\n } else {\n peg$currPos = s1;\n s1 = peg$FAILED;\n }\n while (s1 !== peg$FAILED) {\n s0.push(s1);\n s1 = peg$currPos;\n s2 = peg$currPos;\n peg$silentFails++;\n if (input.substr(peg$currPos, 2) === peg$c2) {\n s3 = peg$c2;\n peg$currPos += 2;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$e2); }\n }\n if (s3 === peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 125) {\n s3 = peg$c3;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$e3); }\n }\n if (s3 === peg$FAILED) {\n if (input.substr(peg$currPos, 2) === peg$c0) {\n s3 = peg$c0;\n peg$currPos += 2;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$e0); }\n }\n }\n }\n peg$silentFails--;\n if (s3 === peg$FAILED) {\n s2 = undefined;\n } else {\n peg$currPos = s2;\n s2 = peg$FAILED;\n }\n if (s2 !== peg$FAILED) {\n if (input.length > peg$currPos) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$e4); }\n }\n if (s3 !== peg$FAILED) {\n s2 = [s2, s3];\n s1 = s2;\n } else {\n peg$currPos = s1;\n s1 = peg$FAILED;\n }\n } else {\n peg$currPos = s1;\n s1 = peg$FAILED;\n }\n }\n\n return s0;\n }\n\n function peg$parseDotNode() {\n var s0, s1;\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 46) {\n s1 = peg$c4;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$e5); }\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$f12();\n }\n s0 = s1;\n\n return s0;\n }\n\n function peg$parse_() {\n var s0, s1;\n\n s0 = [];\n s1 = input.charAt(peg$currPos);\n if (peg$r0.test(s1)) {\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$e6); }\n }\n while (s1 !== peg$FAILED) {\n s0.push(s1);\n s1 = input.charAt(peg$currPos);\n if (peg$r0.test(s1)) {\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$e6); }\n }\n }\n\n return s0;\n }\n\n function peg$parseText() {\n var s0, s1, s2;\n\n s0 = peg$currPos;\n s1 = [];\n s2 = peg$parseTextChar();\n if (s2 !== peg$FAILED) {\n while (s2 !== peg$FAILED) {\n s1.push(s2);\n s2 = peg$parseTextChar();\n }\n } else {\n s1 = peg$FAILED;\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$f13(s1);\n }\n s0 = s1;\n\n return s0;\n }\n\n function peg$parseTextChar() {\n var s0, s1, s2;\n\n s0 = peg$currPos;\n s1 = peg$currPos;\n peg$silentFails++;\n s2 = peg$parseEnabledHandlebarsStart();\n if (s2 === peg$FAILED) {\n s2 = peg$parseEnabledCodeStart();\n }\n peg$silentFails--;\n if (s2 === peg$FAILED) {\n s1 = undefined;\n } else {\n peg$currPos = s1;\n s1 = peg$FAILED;\n }\n if (s1 !== peg$FAILED) {\n if (input.length > peg$currPos) {\n s2 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$e4); }\n }\n if (s2 !== peg$FAILED) {\n s1 = [s1, s2];\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n return s0;\n }\n\n function peg$parseEnabledHandlebarsStart() {\n var s0, s1, s2;\n\n s0 = peg$currPos;\n peg$savedPos = peg$currPos;\n s1 = peg$f14();\n if (s1) {\n s1 = undefined;\n } else {\n s1 = peg$FAILED;\n }\n if (s1 !== peg$FAILED) {\n if (input.substr(peg$currPos, 2) === peg$c0) {\n s2 = peg$c0;\n peg$currPos += 2;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$e0); }\n }\n if (s2 !== peg$FAILED) {\n s1 = [s1, s2];\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n return s0;\n }\n\n function peg$parseEnabledCodeStart() {\n var s0, s1, s2;\n\n s0 = peg$currPos;\n peg$savedPos = peg$currPos;\n s1 = peg$f15();\n if (s1) {\n s1 = undefined;\n } else {\n s1 = peg$FAILED;\n }\n if (s1 !== peg$FAILED) {\n if (input.substr(peg$currPos, 2) === peg$c2) {\n s2 = peg$c2;\n peg$currPos += 2;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$e2); }\n }\n if (s2 !== peg$FAILED) {\n s1 = [s1, s2];\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n return s0;\n }\n\n function peg$parseChain() {\n var s0;\n\n s0 = peg$callLibrary(peg$import0);\n\n return s0;\n }\n\n peg$result = peg$startRuleFunction();\n\n if (options.peg$library) {\n return /** @type {any} */ ({\n peg$result,\n peg$currPos,\n peg$FAILED,\n peg$maxFailExpected,\n peg$maxFailPos\n });\n }\n if (peg$result !== peg$FAILED && peg$currPos === input.length) {\n return peg$result;\n } else {\n if (peg$result !== peg$FAILED && peg$currPos < input.length) {\n peg$fail(peg$endExpectation());\n }\n\n throw peg$buildStructuredError(\n peg$maxFailExpected,\n peg$maxFailPos < input.length ? input.charAt(peg$maxFailPos) : null,\n peg$maxFailPos < input.length\n ? peg$computeLocation(peg$maxFailPos, peg$maxFailPos + 1)\n : peg$computeLocation(peg$maxFailPos, peg$maxFailPos)\n );\n }\n}\n\nconst peg$allowedStartRules = [\n \"Root\",\n \"ChainRoot\"\n];\n\nexport {\n peg$allowedStartRules as StartRules,\n peg$SyntaxError as SyntaxError,\n peg$parse as parse\n};\n"],"mappings":";;;;;;;;AAeE,SAAS,OAAO,MAAM,OAAO,KAAK,UAAU;AAC1C,QAAO;EAAE;EAAM;EAAO;EAAK,UAAU,YAAY,EAAE;EAAE;;AAEvD,SAAS,QAAQ,OAAO,KAAK,MAAM,OAAO;AACxC,QAAO;EAAE,MAAM;EAAS;EAAO;EAAK,GAAI,OAAO,EAAE,MAAM,GAAG,EAAE;EAAG,GAAI,SAAS,EAAE;EAAG;;AAEnF,SAAS,UAAU,MAAM;AACvB,KAAI,CAAC,QAAQ,OAAO,SAAS,SAAU,QAAO;AAC9C,KAAI,KAAK,SAAS,QAAS,QAAO;AAElC,SADiB,KAAK,YAAY,EAAE,EACpB,KAAK,UAAU;;AAGnC,SAAS,aAAa,OAAO,QAAQ;CACnC,SAAS,IAAI;AAAE,OAAK,cAAc;;AAClC,GAAE,YAAY,OAAO;AACrB,OAAM,YAAY,IAAI,GAAG;;AAG3B,SAAS,gBAAgB,SAAS,UAAU,OAAO,UAAU;CAC3D,IAAI,OAAO,MAAM,KAAK,MAAM,QAAQ;;AAEpC,KAAI,OAAO,eACT,QAAO,eAAe,MAAM,gBAAgB,UAAU;AAExD,MAAK,WAAW;AAChB,MAAK,QAAQ;AACb,MAAK,WAAW;AAChB,MAAK,OAAO;AACZ,QAAO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AACL,kBAAc;AACd,SAAK;;SAEF;AACL,iBAAc;AACd,QAAK;;AAGP,SAAO;;CAGT,SAAS,iBAAiB;AAKxB,SAFK,gBAAgBA,eAEZ;;AAGX,cAAa,uBAAuB;AAEpC,KAAI,QAAQ,YACV,QAA2B;EACzB;EACA;EACA;EACA;EACA;EACD;AAEH,KAAI,eAAe,cAAc,gBAAgB,MAAM,OACrD,QAAO;MACF;AACL,MAAI,eAAe,cAAc,cAAc,MAAM,OACnD,UAAS,oBAAoB,CAAC;AAGhC,QAAM,yBACJ,qBACA,iBAAiB,MAAM,SAAS,MAAM,OAAO,eAAe,GAAG,MAC/D,iBAAiB,MAAM,SACnB,oBAAoB,gBAAgB,iBAAiB,EAAE,GACvD,oBAAoB,gBAAgB,eAAe,CACxD;;;AAIL,MAAM,wBAAwB,CAC5B,QACA,YACD"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { ASTChain, ASTErrorNode, ASTMethodChainNode, ASTNodeType, ASTParenCloseNode, ASTParenOpenNode } from "../method-chain/types.mjs";
|
|
2
|
+
|
|
3
|
+
//#region components/SmartTextInput/parser/smart-text/types.d.ts
|
|
4
|
+
type ErrorKind = NonNullable<ASTErrorNode['kind']> | 'unclosedHandlebars' | 'emptyHandlebars' | 'invalidHandlebarsContent' | 'interpolationInDataPath';
|
|
5
|
+
declare const ErrorMessageByKind: Record<ErrorKind, string>;
|
|
6
|
+
declare enum SmartTextInputNodeType {
|
|
7
|
+
Root = "root",
|
|
8
|
+
Text = "text",
|
|
9
|
+
Handlebars = "handlebars",
|
|
10
|
+
Code = "code",
|
|
11
|
+
HBOpen = "hb_open",
|
|
12
|
+
HBClose = "hb_close",
|
|
13
|
+
CodeOpen = "code_open",
|
|
14
|
+
CodeClose = "code_close",
|
|
15
|
+
Space = "space"
|
|
16
|
+
}
|
|
17
|
+
declare const NodeType: {
|
|
18
|
+
readonly Chain: ASTNodeType.Chain;
|
|
19
|
+
readonly Identifier: ASTNodeType.Identifier;
|
|
20
|
+
readonly Function: ASTNodeType.Function;
|
|
21
|
+
readonly CustomFunction: ASTNodeType.CustomFunction;
|
|
22
|
+
readonly String: ASTNodeType.String;
|
|
23
|
+
readonly Number: ASTNodeType.Number;
|
|
24
|
+
readonly Array: ASTNodeType.Array;
|
|
25
|
+
readonly ParenOpen: ASTNodeType.ParenOpen;
|
|
26
|
+
readonly ParenClose: ASTNodeType.ParenClose;
|
|
27
|
+
readonly Error: ASTNodeType.Error;
|
|
28
|
+
readonly Dot: ASTNodeType.Dot;
|
|
29
|
+
readonly Root: SmartTextInputNodeType.Root;
|
|
30
|
+
readonly Text: SmartTextInputNodeType.Text;
|
|
31
|
+
readonly Handlebars: SmartTextInputNodeType.Handlebars;
|
|
32
|
+
readonly Code: SmartTextInputNodeType.Code;
|
|
33
|
+
readonly HBOpen: SmartTextInputNodeType.HBOpen;
|
|
34
|
+
readonly HBClose: SmartTextInputNodeType.HBClose;
|
|
35
|
+
readonly CodeOpen: SmartTextInputNodeType.CodeOpen;
|
|
36
|
+
readonly CodeClose: SmartTextInputNodeType.CodeClose;
|
|
37
|
+
readonly Space: SmartTextInputNodeType.Space;
|
|
38
|
+
};
|
|
39
|
+
type ErrorNode = {
|
|
40
|
+
type: 'error';
|
|
41
|
+
start: number;
|
|
42
|
+
end: number;
|
|
43
|
+
children?: ASTNode[];
|
|
44
|
+
wip?: boolean;
|
|
45
|
+
kind?: ErrorKind;
|
|
46
|
+
};
|
|
47
|
+
type ASTNode = {
|
|
48
|
+
type: 'root' | 'text' | 'handlebars' | 'code' | 'space' | 'hb_open' | 'hb_close' | 'code_open' | 'code_close';
|
|
49
|
+
start: number;
|
|
50
|
+
end: number;
|
|
51
|
+
children?: ASTNode[];
|
|
52
|
+
} | ErrorNode | ASTChain;
|
|
53
|
+
declare const isASTChainNode: (node: {
|
|
54
|
+
type: string;
|
|
55
|
+
}) => node is ASTChain;
|
|
56
|
+
/**
|
|
57
|
+
* Narrows to named method-chain nodes (Identifier, Function, CustomFunction).
|
|
58
|
+
* These are the nodes that carry a `.name` property.
|
|
59
|
+
* Dot nodes and Error nodes are excluded.
|
|
60
|
+
*/
|
|
61
|
+
declare const isMethodChainNode: (node: {
|
|
62
|
+
type: string;
|
|
63
|
+
}) => node is ASTMethodChainNode;
|
|
64
|
+
type ASTContainerNode = Extract<ASTNode, {
|
|
65
|
+
children?: ASTNode[];
|
|
66
|
+
}>;
|
|
67
|
+
declare const isASTContainerNode: (node: {
|
|
68
|
+
type: string;
|
|
69
|
+
}) => node is ASTContainerNode;
|
|
70
|
+
//#endregion
|
|
71
|
+
export { ASTNode, type ASTParenCloseNode, type ASTParenOpenNode, ErrorKind, ErrorMessageByKind, ErrorNode, NodeType, isASTChainNode, isASTContainerNode, isMethodChainNode };
|
|
72
|
+
//# sourceMappingURL=types.d.mts.map
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { ASTNodeType } from "../method-chain/types.mjs";
|
|
2
|
+
//#region components/SmartTextInput/parser/smart-text/types.ts
|
|
3
|
+
const ErrorMessageByKind = {
|
|
4
|
+
unclosedHandlebars: "Add }} to close the data expression.",
|
|
5
|
+
emptyHandlebars: "Add a data path between {{ and }}.",
|
|
6
|
+
invalidHandlebarsContent: "Invalid data path inside {{ and }}.",
|
|
7
|
+
invalidMethodChainSyntax: "Invalid data path syntax.",
|
|
8
|
+
trailingDot: "Data path has a trailing dot.",
|
|
9
|
+
trailingAtSign: "Data path has a trailing @ sign.",
|
|
10
|
+
unclosedFunctionParen: "Data path has an unclosed function call.",
|
|
11
|
+
emptyFunctionParam: "Data path function call is missing a parameter.",
|
|
12
|
+
trailingFunctionComma: "Data path function call has a trailing comma.",
|
|
13
|
+
interpolationInDataPath: "Interpolation syntax is not supported here, enter a data path directly."
|
|
14
|
+
};
|
|
15
|
+
const NodeType = {
|
|
16
|
+
Root: "root",
|
|
17
|
+
Text: "text",
|
|
18
|
+
Handlebars: "handlebars",
|
|
19
|
+
Code: "code",
|
|
20
|
+
HBOpen: "hb_open",
|
|
21
|
+
HBClose: "hb_close",
|
|
22
|
+
CodeOpen: "code_open",
|
|
23
|
+
CodeClose: "code_close",
|
|
24
|
+
Space: "space",
|
|
25
|
+
...ASTNodeType
|
|
26
|
+
};
|
|
27
|
+
const isASTChainNode = (node) => node.type === NodeType.Chain;
|
|
28
|
+
/**
|
|
29
|
+
* Narrows to named method-chain nodes (Identifier, Function, CustomFunction).
|
|
30
|
+
* These are the nodes that carry a `.name` property.
|
|
31
|
+
* Dot nodes and Error nodes are excluded.
|
|
32
|
+
*/
|
|
33
|
+
const isMethodChainNode = (node) => node.type === NodeType.Identifier || node.type === NodeType.Function || node.type === NodeType.CustomFunction;
|
|
34
|
+
const isASTContainerNode = (node) => !isASTChainNode(node) && !isMethodChainNode(node) && node.type !== NodeType.Dot && node.type !== NodeType.ParenOpen && node.type !== NodeType.ParenClose;
|
|
35
|
+
//#endregion
|
|
36
|
+
export { ErrorMessageByKind, NodeType, isASTChainNode, isASTContainerNode, isMethodChainNode };
|
|
37
|
+
|
|
38
|
+
//# sourceMappingURL=types.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.mjs","names":[],"sources":["../../../../../components/SmartTextInput/parser/smart-text/types.ts"],"sourcesContent":["import {\n type ASTChain,\n type ASTMethodChainNode,\n type ASTParenOpenNode,\n type ASTParenCloseNode,\n type ASTErrorNode,\n ASTNodeType,\n} from '@persona/design-system/components/SmartTextInput/parser/method-chain/types';\n\nexport type { ASTParenOpenNode, ASTParenCloseNode };\n\nexport type ErrorKind =\n | NonNullable<ASTErrorNode['kind']>\n | 'unclosedHandlebars'\n | 'emptyHandlebars'\n | 'invalidHandlebarsContent'\n | 'interpolationInDataPath';\n\nexport const ErrorMessageByKind: Record<ErrorKind, string> = {\n unclosedHandlebars: 'Add }} to close the data expression.',\n emptyHandlebars: 'Add a data path between {{ and }}.',\n invalidHandlebarsContent: 'Invalid data path inside {{ and }}.',\n invalidMethodChainSyntax: 'Invalid data path syntax.',\n trailingDot: 'Data path has a trailing dot.',\n trailingAtSign: 'Data path has a trailing @ sign.',\n unclosedFunctionParen: 'Data path has an unclosed function call.',\n emptyFunctionParam: 'Data path function call is missing a parameter.',\n trailingFunctionComma: 'Data path function call has a trailing comma.',\n interpolationInDataPath:\n 'Interpolation syntax is not supported here, enter a data path directly.',\n};\n\nenum SmartTextInputNodeType {\n Root = 'root',\n Text = 'text',\n Handlebars = 'handlebars',\n Code = 'code',\n HBOpen = 'hb_open',\n HBClose = 'hb_close',\n CodeOpen = 'code_open',\n CodeClose = 'code_close',\n Space = 'space',\n}\n\nexport const NodeType = {\n Root: SmartTextInputNodeType.Root,\n Text: SmartTextInputNodeType.Text,\n Handlebars: SmartTextInputNodeType.Handlebars,\n Code: SmartTextInputNodeType.Code,\n HBOpen: SmartTextInputNodeType.HBOpen,\n HBClose: SmartTextInputNodeType.HBClose,\n CodeOpen: SmartTextInputNodeType.CodeOpen,\n CodeClose: SmartTextInputNodeType.CodeClose,\n Space: SmartTextInputNodeType.Space,\n ...ASTNodeType,\n} as const;\n\nexport type ErrorNode = {\n type: 'error';\n start: number;\n end: number;\n children?: ASTNode[];\n wip?: boolean;\n kind?: ErrorKind;\n};\n\nexport type ASTNode =\n | {\n type:\n | 'root'\n | 'text'\n | 'handlebars'\n | 'code'\n | 'space'\n | 'hb_open'\n | 'hb_close'\n | 'code_open'\n | 'code_close';\n start: number;\n end: number;\n children?: ASTNode[];\n }\n | ErrorNode\n | ASTChain;\n\nexport const isASTChainNode = (node: { type: string }): node is ASTChain =>\n node.type === NodeType.Chain;\n\n/**\n * Narrows to named method-chain nodes (Identifier, Function, CustomFunction).\n * These are the nodes that carry a `.name` property.\n * Dot nodes and Error nodes are excluded.\n */\nexport const isMethodChainNode = (node: { type: string }): node is ASTMethodChainNode =>\n node.type === NodeType.Identifier ||\n node.type === NodeType.Function ||\n node.type === NodeType.CustomFunction;\n\ntype ASTContainerNode = Extract<ASTNode, { children?: ASTNode[] }>;\n\nexport const isASTContainerNode = (node: { type: string }): node is ASTContainerNode =>\n !isASTChainNode(node) &&\n !isMethodChainNode(node) &&\n node.type !== NodeType.Dot &&\n node.type !== NodeType.ParenOpen &&\n node.type !== NodeType.ParenClose;\n"],"mappings":";;AAkBA,MAAa,qBAAgD;CAC3D,oBAAoB;CACpB,iBAAiB;CACjB,0BAA0B;CAC1B,0BAA0B;CAC1B,aAAa;CACb,gBAAgB;CAChB,uBAAuB;CACvB,oBAAoB;CACpB,uBAAuB;CACvB,yBACE;CACH;AAcD,MAAa,WAAW;CACtB,MAAA;CACA,MAAA;CACA,YAAA;CACA,MAAA;CACA,QAAA;CACA,SAAA;CACA,UAAA;CACA,WAAA;CACA,OAAA;CACA,GAAG;CACJ;AA8BD,MAAa,kBAAkB,SAC7B,KAAK,SAAS,SAAS;;;;;;AAOzB,MAAa,qBAAqB,SAChC,KAAK,SAAS,SAAS,cACvB,KAAK,SAAS,SAAS,YACvB,KAAK,SAAS,SAAS;AAIzB,MAAa,sBAAsB,SACjC,CAAC,eAAe,KAAK,IACrB,CAAC,kBAAkB,KAAK,IACxB,KAAK,SAAS,SAAS,OACvB,KAAK,SAAS,SAAS,aACvB,KAAK,SAAS,SAAS"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as Spacer_default } from "../../Spacer-
|
|
1
|
+
import { t as Spacer_default } from "../../Spacer-D58qwuXR.mjs";
|
|
2
2
|
export { Spacer_default as default };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as Spinner } from "../../Spinner-
|
|
1
|
+
import { t as Spinner } from "../../Spinner-gBNWIwOn.mjs";
|
|
2
2
|
export { Spinner, Spinner as default };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as StackProps, n as HStackProps, r as Stack, t as HStack } from "../../Stack-
|
|
1
|
+
import { i as StackProps, n as HStackProps, r as Stack, t as HStack } from "../../Stack-DgC83-nw.mjs";
|
|
2
2
|
export { HStack, HStackProps, Stack, Stack as default, StackProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as Stack, t as HStack } from "../../Stack-
|
|
1
|
+
import { n as Stack, t as HStack } from "../../Stack-BqQndGI9.mjs";
|
|
2
2
|
export { HStack, Stack, Stack as default };
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { a as styled, r as css } from "../../styledComponentsInterop-
|
|
2
|
-
import { paragraphMixins } from "../../mixins/text.mjs";
|
|
1
|
+
import { a as styled, r as css } from "../../styledComponentsInterop-NxwFjeA4.mjs";
|
|
3
2
|
import { TruncatedText } from "../../lib/TruncatedText.mjs";
|
|
3
|
+
import { semanticTokens } from "../../lib/semanticColor.mjs";
|
|
4
|
+
import { paragraphMixins } from "../../mixins/text.mjs";
|
|
5
|
+
import { withAlpha } from "../../lib/color.mjs";
|
|
4
6
|
import { BorderRadius, Color, Spacing } from "@persona/design-tokens";
|
|
5
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
8
|
import { CircleCheckFillIcon, CircleFillIcon, CircleHalfIcon, CircleNullIcon, CircleSlashIcon, WarningFillIcon } from "@persona/icons/12px";
|
|
@@ -125,6 +127,107 @@ const TRANSPARENT_STATUS_COLORS = {
|
|
|
125
127
|
icon: Color.BorderIconLabelTeal
|
|
126
128
|
}
|
|
127
129
|
};
|
|
130
|
+
const semanticFilledStatusColors = (t) => ({
|
|
131
|
+
neutral: {
|
|
132
|
+
background: t.StatusNeutral,
|
|
133
|
+
text: t.FgPrimary,
|
|
134
|
+
icon: t.FgPrimary
|
|
135
|
+
},
|
|
136
|
+
attention: {
|
|
137
|
+
background: withAlpha(t.StatusHighlight, t.Opacity15),
|
|
138
|
+
text: t.FgHighlight,
|
|
139
|
+
icon: t.FgHighlight
|
|
140
|
+
},
|
|
141
|
+
warning: {
|
|
142
|
+
background: withAlpha(t.StatusWarning, t.Opacity15),
|
|
143
|
+
text: t.FgWarning2,
|
|
144
|
+
icon: t.FgWarning2
|
|
145
|
+
},
|
|
146
|
+
critical: {
|
|
147
|
+
background: withAlpha(t.StatusDanger3, t.Opacity15),
|
|
148
|
+
text: t.FgDanger2,
|
|
149
|
+
icon: t.FgDanger2
|
|
150
|
+
},
|
|
151
|
+
success: {
|
|
152
|
+
background: withAlpha(t.StatusSuccess2, t.Opacity15),
|
|
153
|
+
text: t.FgSuccess,
|
|
154
|
+
icon: t.FgSuccess
|
|
155
|
+
},
|
|
156
|
+
feature: {
|
|
157
|
+
background: withAlpha(t.StatusFeature, t.Opacity25),
|
|
158
|
+
text: t.FgFeature,
|
|
159
|
+
icon: t.FgFeature
|
|
160
|
+
},
|
|
161
|
+
informational: {
|
|
162
|
+
background: withAlpha(t.StatusInfo2, t.Opacity25),
|
|
163
|
+
text: t.FgInfo,
|
|
164
|
+
icon: t.FgInfo
|
|
165
|
+
},
|
|
166
|
+
miscellaneous: {
|
|
167
|
+
background: withAlpha(t.StatusMisc, t.Opacity15),
|
|
168
|
+
text: t.FgMisc,
|
|
169
|
+
icon: t.FgMisc
|
|
170
|
+
}
|
|
171
|
+
});
|
|
172
|
+
const semanticTransparentStatusColors = (t) => ({
|
|
173
|
+
neutral: {
|
|
174
|
+
background: "transparent",
|
|
175
|
+
text: t.FgPrimary,
|
|
176
|
+
icon: t.FgSecondary
|
|
177
|
+
},
|
|
178
|
+
attention: {
|
|
179
|
+
background: "transparent",
|
|
180
|
+
text: t.FgPrimary,
|
|
181
|
+
icon: t.FgWarning1
|
|
182
|
+
},
|
|
183
|
+
warning: {
|
|
184
|
+
background: "transparent",
|
|
185
|
+
text: t.FgPrimary,
|
|
186
|
+
icon: t.FgWarning1
|
|
187
|
+
},
|
|
188
|
+
critical: {
|
|
189
|
+
background: "transparent",
|
|
190
|
+
text: t.FgPrimary,
|
|
191
|
+
icon: t.FgDanger1
|
|
192
|
+
},
|
|
193
|
+
success: {
|
|
194
|
+
background: "transparent",
|
|
195
|
+
text: t.FgPrimary,
|
|
196
|
+
icon: t.FgSuccess
|
|
197
|
+
},
|
|
198
|
+
feature: {
|
|
199
|
+
background: "transparent",
|
|
200
|
+
text: t.FgPrimary,
|
|
201
|
+
icon: t.FgAccent
|
|
202
|
+
},
|
|
203
|
+
informational: {
|
|
204
|
+
background: "transparent",
|
|
205
|
+
text: t.FgPrimary,
|
|
206
|
+
icon: t.FgInfo
|
|
207
|
+
},
|
|
208
|
+
miscellaneous: {
|
|
209
|
+
background: "transparent",
|
|
210
|
+
text: t.FgPrimary,
|
|
211
|
+
icon: t.FgMisc
|
|
212
|
+
}
|
|
213
|
+
});
|
|
214
|
+
const semanticStatusColorCache = /* @__PURE__ */ new WeakMap();
|
|
215
|
+
const semanticStatusColors = (tokens) => {
|
|
216
|
+
let colors = semanticStatusColorCache.get(tokens);
|
|
217
|
+
if (!colors) {
|
|
218
|
+
colors = {
|
|
219
|
+
filled: semanticFilledStatusColors(tokens),
|
|
220
|
+
none: semanticTransparentStatusColors(tokens)
|
|
221
|
+
};
|
|
222
|
+
semanticStatusColorCache.set(tokens, colors);
|
|
223
|
+
}
|
|
224
|
+
return colors;
|
|
225
|
+
};
|
|
226
|
+
const statusColors = (theme, background) => {
|
|
227
|
+
const tokens = semanticTokens(theme);
|
|
228
|
+
if (tokens) return semanticStatusColors(tokens)[background];
|
|
229
|
+
return background === "filled" ? FILLED_STATUS_COLORS : TRANSPARENT_STATUS_COLORS;
|
|
230
|
+
};
|
|
128
231
|
const Label = styled.div`
|
|
129
232
|
${paragraphMixins.sm}
|
|
130
233
|
display: flex;
|
|
@@ -139,13 +242,11 @@ const Label = styled.div`
|
|
|
139
242
|
text-transform: ${({ $preserveCase }) => $preserveCase ? "none" : "capitalize"};
|
|
140
243
|
/* Slight optical centering adjustment */
|
|
141
244
|
transform: translateY(0.5px);
|
|
142
|
-
color: ${({ $type, $background }) =>
|
|
143
|
-
return ($background === "filled" ? FILLED_STATUS_COLORS : TRANSPARENT_STATUS_COLORS)[$type].text;
|
|
144
|
-
}};
|
|
245
|
+
color: ${({ theme, $type, $background }) => statusColors(theme, $background)[$type].text};
|
|
145
246
|
`;
|
|
146
247
|
const IconContainer = styled.span`
|
|
147
248
|
line-height: 0;
|
|
148
|
-
color: ${({ $
|
|
249
|
+
color: ${({ theme, $type, $background }) => statusColors(theme, $background)[$type].icon};
|
|
149
250
|
`;
|
|
150
251
|
const LabelContainer = styled.div`
|
|
151
252
|
display: flex;
|
|
@@ -163,11 +264,9 @@ const StyledStatusIndicator = styled.div`
|
|
|
163
264
|
width: fit-content;
|
|
164
265
|
max-width: ${({ $truncate }) => $truncate ? "100%" : "none"};
|
|
165
266
|
|
|
166
|
-
${({ $type, $background }) =>
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
`;
|
|
170
|
-
}}
|
|
267
|
+
${({ theme, $type, $background }) => css`
|
|
268
|
+
background-color: ${statusColors(theme, $background)[$type].background};
|
|
269
|
+
`}
|
|
171
270
|
`;
|
|
172
271
|
/**
|
|
173
272
|
* StatusIndicator displays semantic status information with a colored icon and label.
|
|
@@ -182,7 +281,6 @@ const StyledStatusIndicator = styled.div`
|
|
|
182
281
|
*/
|
|
183
282
|
const StatusIndicator = ({ status, type, background = "filled", showIcon = true, leadingIcon, truncate = false, preserveCase = false, children, ...props }) => {
|
|
184
283
|
const resolvedType = type ?? (status != null ? STATUS_CONFIG[status].type : "neutral");
|
|
185
|
-
const colors = background === "filled" ? FILLED_STATUS_COLORS : TRANSPARENT_STATUS_COLORS;
|
|
186
284
|
let iconToRender;
|
|
187
285
|
if (!showIcon && background === "filled") iconToRender = null;
|
|
188
286
|
else if (typeof leadingIcon !== "undefined") iconToRender = leadingIcon;
|
|
@@ -198,7 +296,8 @@ const StatusIndicator = ({ status, type, background = "filled", showIcon = true,
|
|
|
198
296
|
$hasIcon: hasIcon,
|
|
199
297
|
$truncate: truncate,
|
|
200
298
|
children: [hasIcon && /* @__PURE__ */ jsx(IconContainer, {
|
|
201
|
-
$
|
|
299
|
+
$type: resolvedType,
|
|
300
|
+
$background: background,
|
|
202
301
|
children: iconToRender
|
|
203
302
|
}), /* @__PURE__ */ jsx(Label, {
|
|
204
303
|
$type: resolvedType,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../../../components/StatusIndicator/StatusIndicator.tsx"],"sourcesContent":["import type { ComponentPropsWithoutRef, ReactNode } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport { BorderRadius, Color, Spacing } from '@persona/design-tokens';\nimport {\n CircleCheckFillIcon,\n CircleFillIcon,\n CircleHalfIcon,\n CircleNullIcon,\n CircleSlashIcon,\n WarningFillIcon,\n} from '@persona/icons/12px';\nimport { TruncatedText } from 'design-system/lib/TruncatedText';\nimport { paragraphMixins } from 'design-system/mixins/text';\n\nexport type StatusType =\n | 'neutral'\n | 'attention'\n | 'warning'\n | 'critical'\n | 'success'\n | 'feature'\n | 'informational'\n | 'miscellaneous';\nexport type BackgroundType = 'filled' | 'none';\n\n/**\n * Narrow set of status presets — one value per type+icon combination.\n * Override color with `type` or icon with `leadingIcon` when needed.\n */\nexport type Status =\n | 'open'\n | 'pending'\n | 'completed'\n | 'active'\n | 'failed'\n | 'needs_review'\n | 'canceled'\n | 'archived';\n\nconst STATUS_CONFIG: Record<Status, { type: StatusType; icon: ReactNode }> = {\n open: { type: 'neutral', icon: <CircleNullIcon /> },\n pending: { type: 'neutral', icon: <CircleHalfIcon /> },\n completed: { type: 'success', icon: <CircleFillIcon /> },\n active: { type: 'success', icon: <CircleCheckFillIcon /> },\n failed: { type: 'critical', icon: <CircleSlashIcon /> },\n needs_review: { type: 'warning', icon: <WarningFillIcon /> },\n canceled: { type: 'attention', icon: <CircleSlashIcon /> },\n archived: { type: 'informational', icon: <CircleSlashIcon /> },\n};\n\n/** All supported `status` preset keys, derived from the config map. */\nexport const STATUSES = Object.keys(STATUS_CONFIG) as Status[];\n\nexport interface StatusIndicatorProps extends ComponentPropsWithoutRef<'div'> {\n /**\n * Preset that sets a default semantic type and icon.\n * Explicit `type` and `leadingIcon` override the preset.\n */\n status?: Status;\n\n /**\n * The semantic status type to display. Overrides `status` when both are set.\n */\n type?: StatusType;\n\n /**\n * Whether to show filled background or transparent\n */\n background?: BackgroundType;\n\n /**\n * Whether to show the icon. When false, displays label-only variant\n * @default true\n */\n showIcon?: boolean;\n\n /**\n * Optional custom icon to replace the default icon indicator (12px recommended)\n * - undefined (default): Uses `status` icon when set, otherwise CircleNullIcon\n * - null: Hides the icon completely\n * - ReactNode: Shows the provided custom icon\n * Note: showIcon must be true for this to take effect\n */\n leadingIcon?: ReactNode | null;\n\n /**\n * Truncate the label with an ellipsis instead of letting it overflow its container. Adds a\n * title tooltip with the full text when it doesn't fit.\n * @default false\n */\n truncate?: boolean;\n\n /**\n * Render the label exactly as given instead of capitalizing each word. Use for labels that are\n * authored outside the product, where the casing is not ours to change.\n * @default false\n */\n preserveCase?: boolean;\n\n /**\n * The text label to display\n */\n children?: ReactNode;\n}\n\ninterface StatusColors {\n background: string;\n text: string;\n icon: string;\n}\n\nconst FILLED_STATUS_COLORS: Record<StatusType, StatusColors> = {\n neutral: {\n background: Color.BackgroundStatusIndicatorDefault,\n text: Color.TextStatusIndicatorDefault,\n icon: Color.BorderIconLabelGrey,\n },\n attention: {\n background: Color.BackgroundStatusIndicatorAttention,\n text: Color.TextStatusIndicatorAttention,\n icon: Color.BorderIconLabelYellow,\n },\n warning: {\n background: Color.BackgroundStatusIndicatorWarning,\n text: Color.TextStatusIndicatorWarning,\n icon: Color.BorderIconLabelOrange,\n },\n critical: {\n background: Color.BackgroundStatusIndicatorCritical,\n text: Color.TextStatusIndicatorCritical,\n icon: Color.BorderIconLabelRed,\n },\n success: {\n background: Color.BackgroundStatusIndicatorSuccess,\n text: Color.TextStatusIndicatorSuccess,\n icon: Color.BorderIconLabelGreen,\n },\n feature: {\n background: Color.BackgroundStatusIndicatorFeature,\n text: Color.TextStatusIndicatorFeature,\n icon: Color.BorderIconLabelPurple,\n },\n informational: {\n background: Color.BackgroundStatusIndicatorInformational,\n text: Color.TextStatusIndicatorInformational,\n icon: Color.BorderIconLabelBlue,\n },\n miscellaneous: {\n background: Color.BackgroundStatusIndicatorMiscellaneous,\n text: Color.TextStatusIndicatorMiscellaneous,\n icon: Color.BorderIconLabelTeal,\n },\n};\n\nconst TRANSPARENT_STATUS_COLORS: Record<StatusType, StatusColors> = {\n neutral: {\n background: 'transparent',\n text: Color.TextPrimary,\n icon: Color.BorderIconSecondary,\n },\n attention: {\n background: 'transparent',\n text: Color.TextPrimary,\n icon: Color.BorderIconWarning,\n },\n warning: {\n background: 'transparent',\n text: Color.TextPrimary,\n icon: Color.BorderIconWarning,\n },\n critical: {\n background: 'transparent',\n text: Color.TextPrimary,\n icon: Color.BorderIconDanger,\n },\n success: {\n background: 'transparent',\n text: Color.TextPrimary,\n icon: Color.BorderIconSuccess,\n },\n feature: {\n background: 'transparent',\n text: Color.TextPrimary,\n icon: Color.BorderIconActive,\n },\n informational: {\n background: 'transparent',\n text: Color.TextPrimary,\n icon: Color.BorderIconLabelBlue,\n },\n miscellaneous: {\n background: 'transparent',\n text: Color.TextPrimary,\n icon: Color.BorderIconLabelTeal,\n },\n};\n\nconst Label = styled.div<{\n $type: StatusType;\n $background: BackgroundType;\n $truncate: boolean;\n $preserveCase: boolean;\n}>`\n ${paragraphMixins.sm}\n display: flex;\n flex-direction: column;\n justify-content: center;\n flex-shrink: ${({ $truncate }) => ($truncate ? 1 : 0)};\n min-width: ${({ $truncate }) => ($truncate ? '0' : 'auto')};\n /* Line box hugs the font so pill height is driven by padding alone, and clipping an overflowing\n label can't cut into descenders. Matches Sticker. */\n line-height: 1;\n white-space: nowrap;\n text-transform: ${({ $preserveCase }) => ($preserveCase ? 'none' : 'capitalize')};\n /* Slight optical centering adjustment */\n transform: translateY(0.5px);\n color: ${({ $type, $background }) => {\n const colors = $background === 'filled' ? FILLED_STATUS_COLORS : TRANSPARENT_STATUS_COLORS;\n return colors[$type].text;\n }};\n`;\n\nconst IconContainer = styled.span<{ $iconColor: string }>`\n line-height: 0;\n color: ${({ $iconColor }) => $iconColor};\n`;\n\nconst LabelContainer = styled.div<{ $hasIcon: boolean; $truncate: boolean }>`\n display: flex;\n align-items: center;\n gap: ${Spacing[1]};\n padding: ${({ $hasIcon }) =>\n `${Spacing[1]} ${Spacing[2]} ${Spacing[1]} ${$hasIcon ? Spacing[1] : Spacing[2]}`};\n position: relative;\n flex-shrink: ${({ $truncate }) => ($truncate ? 1 : 0)};\n min-width: ${({ $truncate }) => ($truncate ? '0' : 'auto')};\n`;\n\nconst StyledStatusIndicator = styled.div<{\n $type: StatusType;\n $background: BackgroundType;\n $truncate: boolean;\n}>`\n display: inline-flex;\n align-items: center;\n border-radius: ${BorderRadius.Xl};\n width: fit-content;\n max-width: ${({ $truncate }) => ($truncate ? '100%' : 'none')};\n\n ${({ $type, $background }) => {\n const colors = $background === 'filled' ? FILLED_STATUS_COLORS : TRANSPARENT_STATUS_COLORS;\n return css`\n background-color: ${colors[$type].background};\n `;\n }}\n`;\n\n/**\n * StatusIndicator displays semantic status information with a colored icon and label.\n * Supports both filled backgrounds and transparent styles.\n *\n * @example\n * ```tsx\n * <StatusIndicator status=\"active\">Active</StatusIndicator>\n * <StatusIndicator type=\"success\" background=\"filled\">Approved</StatusIndicator>\n * <StatusIndicator type=\"critical\" background=\"none\">Failed</StatusIndicator>\n * ```\n */\nexport const StatusIndicator = ({\n status,\n type,\n background = 'filled',\n showIcon = true,\n leadingIcon,\n truncate = false,\n preserveCase = false,\n children,\n ...props\n}: StatusIndicatorProps) => {\n const resolvedType = type ?? (status != null ? STATUS_CONFIG[status].type : 'neutral');\n const colors = background === 'filled' ? FILLED_STATUS_COLORS : TRANSPARENT_STATUS_COLORS;\n\n // Determine which icon to show:\n // - showIcon=false with background='filled': label-only variant (no icon)\n // - leadingIcon set (including null): explicit override\n // - status set: use preset icon\n // - otherwise: default CircleNullIcon\n // - background='none' always shows icon (showIcon is ignored for none background)\n let iconToRender;\n if (!showIcon && background === 'filled') {\n iconToRender = null;\n } else if (typeof leadingIcon !== 'undefined') {\n iconToRender = leadingIcon;\n } else if (status != null) {\n iconToRender = STATUS_CONFIG[status].icon;\n } else {\n iconToRender = <CircleNullIcon />;\n }\n const hasIcon = iconToRender != null;\n\n return (\n <StyledStatusIndicator\n $type={resolvedType}\n $background={background}\n $truncate={truncate}\n {...props}\n >\n <LabelContainer $hasIcon={hasIcon} $truncate={truncate}>\n {hasIcon && (\n <IconContainer $iconColor={colors[resolvedType].icon}>{iconToRender}</IconContainer>\n )}\n <Label\n $type={resolvedType}\n $background={background}\n $truncate={truncate}\n $preserveCase={preserveCase}\n >\n {truncate ? <TruncatedText>{children}</TruncatedText> : children}\n </Label>\n </LabelContainer>\n </StyledStatusIndicator>\n );\n};\n\nexport default StatusIndicator;\n"],"mappings":";;;;;;;AAwCA,MAAM,gBAAuE;CAC3E,MAAM;EAAE,MAAM;EAAW,MAAM,oBAAC,gBAAD,EAAkB,CAAA;EAAE;CACnD,SAAS;EAAE,MAAM;EAAW,MAAM,oBAAC,gBAAD,EAAkB,CAAA;EAAE;CACtD,WAAW;EAAE,MAAM;EAAW,MAAM,oBAAC,gBAAD,EAAkB,CAAA;EAAE;CACxD,QAAQ;EAAE,MAAM;EAAW,MAAM,oBAAC,qBAAD,EAAuB,CAAA;EAAE;CAC1D,QAAQ;EAAE,MAAM;EAAY,MAAM,oBAAC,iBAAD,EAAmB,CAAA;EAAE;CACvD,cAAc;EAAE,MAAM;EAAW,MAAM,oBAAC,iBAAD,EAAmB,CAAA;EAAE;CAC5D,UAAU;EAAE,MAAM;EAAa,MAAM,oBAAC,iBAAD,EAAmB,CAAA;EAAE;CAC1D,UAAU;EAAE,MAAM;EAAiB,MAAM,oBAAC,iBAAD,EAAmB,CAAA;EAAE;CAC/D;;AAGD,MAAa,WAAW,OAAO,KAAK,cAAc;AA4DlD,MAAM,uBAAyD;CAC7D,SAAS;EACP,YAAY,MAAM;EAClB,MAAM,MAAM;EACZ,MAAM,MAAM;EACb;CACD,WAAW;EACT,YAAY,MAAM;EAClB,MAAM,MAAM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CAAA,GAAG;IAClD,CAAA,CACO;;EACK,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../../components/StatusIndicator/StatusIndicator.tsx"],"sourcesContent":["import type { ComponentPropsWithoutRef, ReactNode } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport { BorderRadius, Color, Spacing } from '@persona/design-tokens';\nimport {\n CircleCheckFillIcon,\n CircleFillIcon,\n CircleHalfIcon,\n CircleNullIcon,\n CircleSlashIcon,\n WarningFillIcon,\n} from '@persona/icons/12px';\nimport { withAlpha } from 'design-system/lib/color';\nimport { type MaybeSemanticTheme, semanticTokens } from 'design-system/lib/semanticColor';\nimport { TruncatedText } from 'design-system/lib/TruncatedText';\nimport { paragraphMixins } from 'design-system/mixins/text';\nimport type { SemanticTokens } from 'design-system/variables/semantic';\n\nexport type StatusType =\n | 'neutral'\n | 'attention'\n | 'warning'\n | 'critical'\n | 'success'\n | 'feature'\n | 'informational'\n | 'miscellaneous';\nexport type BackgroundType = 'filled' | 'none';\n\n/**\n * Narrow set of status presets — one value per type+icon combination.\n * Override color with `type` or icon with `leadingIcon` when needed.\n */\nexport type Status =\n | 'open'\n | 'pending'\n | 'completed'\n | 'active'\n | 'failed'\n | 'needs_review'\n | 'canceled'\n | 'archived';\n\nconst STATUS_CONFIG: Record<Status, { type: StatusType; icon: ReactNode }> = {\n open: { type: 'neutral', icon: <CircleNullIcon /> },\n pending: { type: 'neutral', icon: <CircleHalfIcon /> },\n completed: { type: 'success', icon: <CircleFillIcon /> },\n active: { type: 'success', icon: <CircleCheckFillIcon /> },\n failed: { type: 'critical', icon: <CircleSlashIcon /> },\n needs_review: { type: 'warning', icon: <WarningFillIcon /> },\n canceled: { type: 'attention', icon: <CircleSlashIcon /> },\n archived: { type: 'informational', icon: <CircleSlashIcon /> },\n};\n\n/** All supported `status` preset keys, derived from the config map. */\nexport const STATUSES = Object.keys(STATUS_CONFIG) as Status[];\n\nexport interface StatusIndicatorProps extends ComponentPropsWithoutRef<'div'> {\n /**\n * Preset that sets a default semantic type and icon.\n * Explicit `type` and `leadingIcon` override the preset.\n */\n status?: Status;\n\n /**\n * The semantic status type to display. Overrides `status` when both are set.\n */\n type?: StatusType;\n\n /**\n * Whether to show filled background or transparent\n */\n background?: BackgroundType;\n\n /**\n * Whether to show the icon. When false, displays label-only variant\n * @default true\n */\n showIcon?: boolean;\n\n /**\n * Optional custom icon to replace the default icon indicator (12px recommended)\n * - undefined (default): Uses `status` icon when set, otherwise CircleNullIcon\n * - null: Hides the icon completely\n * - ReactNode: Shows the provided custom icon\n * Note: showIcon must be true for this to take effect\n */\n leadingIcon?: ReactNode | null;\n\n /**\n * Truncate the label with an ellipsis instead of letting it overflow its container. Adds a\n * title tooltip with the full text when it doesn't fit.\n * @default false\n */\n truncate?: boolean;\n\n /**\n * Render the label exactly as given instead of capitalizing each word. Use for labels that are\n * authored outside the product, where the casing is not ours to change.\n * @default false\n */\n preserveCase?: boolean;\n\n /**\n * The text label to display\n */\n children?: ReactNode;\n}\n\ninterface StatusColors {\n background: string;\n text: string;\n icon: string;\n}\n\nconst FILLED_STATUS_COLORS: Record<StatusType, StatusColors> = {\n neutral: {\n background: Color.BackgroundStatusIndicatorDefault,\n text: Color.TextStatusIndicatorDefault,\n icon: Color.BorderIconLabelGrey,\n },\n attention: {\n background: Color.BackgroundStatusIndicatorAttention,\n text: Color.TextStatusIndicatorAttention,\n icon: Color.BorderIconLabelYellow,\n },\n warning: {\n background: Color.BackgroundStatusIndicatorWarning,\n text: Color.TextStatusIndicatorWarning,\n icon: Color.BorderIconLabelOrange,\n },\n critical: {\n background: Color.BackgroundStatusIndicatorCritical,\n text: Color.TextStatusIndicatorCritical,\n icon: Color.BorderIconLabelRed,\n },\n success: {\n background: Color.BackgroundStatusIndicatorSuccess,\n text: Color.TextStatusIndicatorSuccess,\n icon: Color.BorderIconLabelGreen,\n },\n feature: {\n background: Color.BackgroundStatusIndicatorFeature,\n text: Color.TextStatusIndicatorFeature,\n icon: Color.BorderIconLabelPurple,\n },\n informational: {\n background: Color.BackgroundStatusIndicatorInformational,\n text: Color.TextStatusIndicatorInformational,\n icon: Color.BorderIconLabelBlue,\n },\n miscellaneous: {\n background: Color.BackgroundStatusIndicatorMiscellaneous,\n text: Color.TextStatusIndicatorMiscellaneous,\n icon: Color.BorderIconLabelTeal,\n },\n};\n\nconst TRANSPARENT_STATUS_COLORS: Record<StatusType, StatusColors> = {\n neutral: {\n background: 'transparent',\n text: Color.TextPrimary,\n icon: Color.BorderIconSecondary,\n },\n attention: {\n background: 'transparent',\n text: Color.TextPrimary,\n icon: Color.BorderIconWarning,\n },\n warning: {\n background: 'transparent',\n text: Color.TextPrimary,\n icon: Color.BorderIconWarning,\n },\n critical: {\n background: 'transparent',\n text: Color.TextPrimary,\n icon: Color.BorderIconDanger,\n },\n success: {\n background: 'transparent',\n text: Color.TextPrimary,\n icon: Color.BorderIconSuccess,\n },\n feature: {\n background: 'transparent',\n text: Color.TextPrimary,\n icon: Color.BorderIconActive,\n },\n informational: {\n background: 'transparent',\n text: Color.TextPrimary,\n icon: Color.BorderIconLabelBlue,\n },\n miscellaneous: {\n background: 'transparent',\n text: Color.TextPrimary,\n icon: Color.BorderIconLabelTeal,\n },\n};\n\nconst semanticFilledStatusColors = (t: SemanticTokens): Record<StatusType, StatusColors> => ({\n neutral: { background: t.StatusNeutral, text: t.FgPrimary, icon: t.FgPrimary },\n attention: {\n background: withAlpha(t.StatusHighlight, t.Opacity15),\n text: t.FgHighlight,\n icon: t.FgHighlight,\n },\n warning: {\n background: withAlpha(t.StatusWarning, t.Opacity15),\n text: t.FgWarning2,\n icon: t.FgWarning2,\n },\n critical: {\n background: withAlpha(t.StatusDanger3, t.Opacity15),\n text: t.FgDanger2,\n icon: t.FgDanger2,\n },\n success: {\n background: withAlpha(t.StatusSuccess2, t.Opacity15),\n text: t.FgSuccess,\n icon: t.FgSuccess,\n },\n feature: {\n background: withAlpha(t.StatusFeature, t.Opacity25),\n text: t.FgFeature,\n icon: t.FgFeature,\n },\n informational: {\n background: withAlpha(t.StatusInfo2, t.Opacity25),\n text: t.FgInfo,\n icon: t.FgInfo,\n },\n miscellaneous: {\n background: withAlpha(t.StatusMisc, t.Opacity15),\n text: t.FgMisc,\n icon: t.FgMisc,\n },\n});\n\nconst semanticTransparentStatusColors = (t: SemanticTokens): Record<StatusType, StatusColors> => ({\n neutral: { background: 'transparent', text: t.FgPrimary, icon: t.FgSecondary },\n // Transparent attention intentionally shares warning orange; yellow is reserved for filled attention.\n attention: { background: 'transparent', text: t.FgPrimary, icon: t.FgWarning1 },\n warning: { background: 'transparent', text: t.FgPrimary, icon: t.FgWarning1 },\n critical: { background: 'transparent', text: t.FgPrimary, icon: t.FgDanger1 },\n success: { background: 'transparent', text: t.FgPrimary, icon: t.FgSuccess },\n feature: { background: 'transparent', text: t.FgPrimary, icon: t.FgAccent },\n informational: { background: 'transparent', text: t.FgPrimary, icon: t.FgInfo },\n miscellaneous: { background: 'transparent', text: t.FgPrimary, icon: t.FgMisc },\n});\n\nconst semanticStatusColorCache = new WeakMap<\n SemanticTokens,\n Record<BackgroundType, Record<StatusType, StatusColors>>\n>();\n\nconst semanticStatusColors = (tokens: SemanticTokens) => {\n let colors = semanticStatusColorCache.get(tokens);\n if (!colors) {\n colors = {\n filled: semanticFilledStatusColors(tokens),\n none: semanticTransparentStatusColors(tokens),\n };\n semanticStatusColorCache.set(tokens, colors);\n }\n return colors;\n};\n\nconst statusColors = (theme: MaybeSemanticTheme, background: BackgroundType) => {\n const tokens = semanticTokens(theme);\n if (tokens) {\n return semanticStatusColors(tokens)[background];\n }\n return background === 'filled' ? FILLED_STATUS_COLORS : TRANSPARENT_STATUS_COLORS;\n};\n\nconst Label = styled.div<{\n $type: StatusType;\n $background: BackgroundType;\n $truncate: boolean;\n $preserveCase: boolean;\n}>`\n ${paragraphMixins.sm}\n display: flex;\n flex-direction: column;\n justify-content: center;\n flex-shrink: ${({ $truncate }) => ($truncate ? 1 : 0)};\n min-width: ${({ $truncate }) => ($truncate ? '0' : 'auto')};\n /* Line box hugs the font so pill height is driven by padding alone, and clipping an overflowing\n label can't cut into descenders. Matches Sticker. */\n line-height: 1;\n white-space: nowrap;\n text-transform: ${({ $preserveCase }) => ($preserveCase ? 'none' : 'capitalize')};\n /* Slight optical centering adjustment */\n transform: translateY(0.5px);\n color: ${({ theme, $type, $background }) => statusColors(theme, $background)[$type].text};\n`;\n\nconst IconContainer = styled.span<{ $type: StatusType; $background: BackgroundType }>`\n line-height: 0;\n color: ${({ theme, $type, $background }) => statusColors(theme, $background)[$type].icon};\n`;\n\nconst LabelContainer = styled.div<{ $hasIcon: boolean; $truncate: boolean }>`\n display: flex;\n align-items: center;\n gap: ${Spacing[1]};\n padding: ${({ $hasIcon }) =>\n `${Spacing[1]} ${Spacing[2]} ${Spacing[1]} ${$hasIcon ? Spacing[1] : Spacing[2]}`};\n position: relative;\n flex-shrink: ${({ $truncate }) => ($truncate ? 1 : 0)};\n min-width: ${({ $truncate }) => ($truncate ? '0' : 'auto')};\n`;\n\nconst StyledStatusIndicator = styled.div<{\n $type: StatusType;\n $background: BackgroundType;\n $truncate: boolean;\n}>`\n display: inline-flex;\n align-items: center;\n border-radius: ${BorderRadius.Xl};\n width: fit-content;\n max-width: ${({ $truncate }) => ($truncate ? '100%' : 'none')};\n\n ${({ theme, $type, $background }) => css`\n background-color: ${statusColors(theme, $background)[$type].background};\n `}\n`;\n\n/**\n * StatusIndicator displays semantic status information with a colored icon and label.\n * Supports both filled backgrounds and transparent styles.\n *\n * @example\n * ```tsx\n * <StatusIndicator status=\"active\">Active</StatusIndicator>\n * <StatusIndicator type=\"success\" background=\"filled\">Approved</StatusIndicator>\n * <StatusIndicator type=\"critical\" background=\"none\">Failed</StatusIndicator>\n * ```\n */\nexport const StatusIndicator = ({\n status,\n type,\n background = 'filled',\n showIcon = true,\n leadingIcon,\n truncate = false,\n preserveCase = false,\n children,\n ...props\n}: StatusIndicatorProps) => {\n const resolvedType = type ?? (status != null ? STATUS_CONFIG[status].type : 'neutral');\n\n // Determine which icon to show:\n // - showIcon=false with background='filled': label-only variant (no icon)\n // - leadingIcon set (including null): explicit override\n // - status set: use preset icon\n // - otherwise: default CircleNullIcon\n // - background='none' always shows icon (showIcon is ignored for none background)\n let iconToRender;\n if (!showIcon && background === 'filled') {\n iconToRender = null;\n } else if (typeof leadingIcon !== 'undefined') {\n iconToRender = leadingIcon;\n } else if (status != null) {\n iconToRender = STATUS_CONFIG[status].icon;\n } else {\n iconToRender = <CircleNullIcon />;\n }\n const hasIcon = iconToRender != null;\n\n return (\n <StyledStatusIndicator\n $type={resolvedType}\n $background={background}\n $truncate={truncate}\n {...props}\n >\n <LabelContainer $hasIcon={hasIcon} $truncate={truncate}>\n {hasIcon && (\n <IconContainer $type={resolvedType} $background={background}>\n {iconToRender}\n </IconContainer>\n )}\n <Label\n $type={resolvedType}\n $background={background}\n $truncate={truncate}\n $preserveCase={preserveCase}\n >\n {truncate ? <TruncatedText>{children}</TruncatedText> : children}\n </Label>\n </LabelContainer>\n </StyledStatusIndicator>\n );\n};\n\nexport default StatusIndicator;\n"],"mappings":";;;;;;;;;AA2CA,MAAM,gBAAuE;CAC3E,MAAM;EAAE,MAAM;EAAW,MAAM,oBAAC,gBAAD,EAAkB,CAAA;EAAE;CACnD,SAAS;EAAE,MAAM;EAAW,MAAM,oBAAC,gBAAD,EAAkB,CAAA;EAAE;CACtD,WAAW;EAAE,MAAM;EAAW,MAAM,oBAAC,gBAAD,EAAkB,CAAA;EAAE;CACxD,QAAQ;EAAE,MAAM;EAAW,MAAM,oBAAC,qBAAD,EAAuB,CAAA;EAAE;CAC1D,QAAQ;EAAE,MAAM;EAAY,MAAM,oBAAC,iBAAD,EAAmB,CAAA;EAAE;CACvD,cAAc;EAAE,MAAM;EAAW,MAAM,oBAAC,iBAAD,EAAmB,CAAA;EAAE;CAC5D,UAAU;EAAE,MAAM;EAAa,MAAM,oBAAC,iBAAD,EAAmB,CAAA;EAAE;CAC1D,UAA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a,OAAO,YAAY,CAAC,OAAO,WAAW;IACvE;;;;;;;;;;;;;AAcJ,MAAa,mBAAmB,EAC9B,QACA,MACA,aAAa,UACb,WAAW,MACX,aACA,WAAW,OACX,eAAe,OACf,UACA,GAAG,YACuB;CAC1B,MAAM,eAAe,SAAS,UAAU,OAAO,cAAc,QAAQ,OAAO;CAQ5E,IAAI;AACJ,KAAI,CAAC,YAAY,eAAe,SAC9B,gBAAe;UACN,OAAO,gBAAgB,YAChC,gBAAe;UACN,UAAU,KACnB,gBAAe,cAAc,QAAQ;KAErC,gBAAe,oBAAC,gBAAD,EAAkB,CAAA;CAEnC,MAAM,UAAU,gBAAgB;AAEhC,QACE,oBAAC,uBAAD;EACE,OAAO;EACP,aAAa;EACb,WAAW;EACX,GAAI;YAEJ,qBAAC,gBAAD;GAAgB,UAAU;GAAS,WAAW;aAA9C,CACG,WACC,oBAAC,eAAD;IAAe,OAAO;IAAc,aAAa;cAC9C;IACa,CAAA,EAElB,oBAAC,OAAD;IACE,OAAO;IACP,aAAa;IACb,WAAW;IACX,eAAe;cAEd,WAAW,oBAAC,eAAD,EAAgB,UAAyB,CAAA,GAAG;IAClD,CAAA,CACO;;EACK,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as StickerContentContainer, i as StickerContainer, n as STICKER_COLOR_CONFIG, o as StickerProps, r as Sticker, s as StyledTruncatedText, t as LabelBackgrounds } from "../../Sticker-
|
|
1
|
+
import { a as StickerContentContainer, i as StickerContainer, n as STICKER_COLOR_CONFIG, o as StickerProps, r as Sticker, s as StyledTruncatedText, t as LabelBackgrounds } from "../../Sticker-qvWkqEMw.mjs";
|
|
2
2
|
export { LabelBackgrounds, STICKER_COLOR_CONFIG, Sticker, Sticker as default, StickerContainer, StickerContentContainer, StickerProps, StyledTruncatedText };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as StyledTruncatedText, i as StickerContentContainer, n as Sticker, r as StickerContainer, t as STICKER_COLOR_CONFIG } from "../../Sticker-
|
|
1
|
+
import { a as StyledTruncatedText, i as StickerContentContainer, n as Sticker, r as StickerContainer, t as STICKER_COLOR_CONFIG } from "../../Sticker-BDyejPZa.mjs";
|
|
2
2
|
export { STICKER_COLOR_CONFIG, Sticker, Sticker as default, StickerContainer, StickerContentContainer, StyledTruncatedText };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { a as styled } from "../../styledComponentsInterop-
|
|
1
|
+
import { a as styled } from "../../styledComponentsInterop-NxwFjeA4.mjs";
|
|
2
|
+
import { semanticColor } from "../../lib/semanticColor.mjs";
|
|
2
3
|
import "../../variables/effect.mjs";
|
|
3
4
|
import { BorderRadius, Color, Spacing } from "@persona/design-tokens";
|
|
4
5
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -26,17 +27,17 @@ const ColorSwatch = styled.button`
|
|
|
26
27
|
padding: 0;
|
|
27
28
|
background-color: ${({ $color }) => $color ?? "transparent"};
|
|
28
29
|
border-radius: ${BorderRadius.Circle};
|
|
29
|
-
border: 2px solid ${Color.PrimaryWhite};
|
|
30
|
+
border: 2px solid ${({ theme }) => semanticColor(theme, "InputSurfaceDefault", Color.PrimaryWhite)};
|
|
30
31
|
transition: all 100ms ease-out;
|
|
31
32
|
cursor: pointer;
|
|
32
|
-
${({ selected }) => selected ? `outline: 2px solid ${Color.BorderIconActive}` : ""};
|
|
33
|
+
${({ selected, theme }) => selected ? `outline: 2px solid ${semanticColor(theme, "BorderAccent", Color.BorderIconActive)}` : ""};
|
|
33
34
|
|
|
34
35
|
&:hover {
|
|
35
36
|
box-shadow: ${"0px 4px 5px 0px rgba(0, 0, 0, 0.08), 0px 3px 14px 0px rgba(0, 0, 0, 0.04), 0px 8px 10px 0px rgba(0, 0, 0, 0.04)"};
|
|
36
37
|
}
|
|
37
38
|
`;
|
|
38
39
|
const WhiteSwatch = styled(ColorSwatch)`
|
|
39
|
-
border-color: ${Color.BorderHairline};
|
|
40
|
+
border-color: ${({ theme }) => semanticColor(theme, "BorderDivider", Color.BorderHairline)};
|
|
40
41
|
`;
|
|
41
42
|
const Swatch = ({ color, selected, onSelect }) => {
|
|
42
43
|
return color.toUpperCase() === "#FFFFFF" ? /* @__PURE__ */ jsx(WhiteSwatch, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../../../components/SwatchPicker/SwatchPicker.tsx"],"sourcesContent":["import type { ComponentPropsWithoutRef } from 'react';\nimport styled from 'styled-components';\n\nimport { BorderRadius, Color, Spacing } from '@persona/design-tokens';\nimport { Elevation } from 'design-system/variables/effect';\n\nconst SwatchGrid = styled.div`\n display: flex;\n flex-wrap: wrap;\n align-items: flex-start;\n gap: ${Spacing[1]};\n`;\n\nexport interface SwatchPickerProps extends Omit<ComponentPropsWithoutRef<'div'>, 'onChange'> {\n value: string;\n onChange: (color: string) => void;\n colors: string[];\n}\n\nexport const SwatchPicker = ({ value, onChange, colors, ...restProps }: SwatchPickerProps) => {\n return (\n <SwatchGrid {...restProps}>\n {colors.map((color) => (\n <Swatch key={color} color={color} selected={color === value} onSelect={onChange} />\n ))}\n </SwatchGrid>\n );\n};\n\nconst ColorSwatch = styled.button<{ selected: boolean; $color?: string }>`\n display: inline-block;\n width: 24px;\n height: 24px;\n padding: 0;\n background-color: ${({ $color }) => $color ?? 'transparent'};\n border-radius: ${BorderRadius.Circle};\n border: 2px solid ${Color.PrimaryWhite};\n transition: all 100ms ease-out;\n cursor: pointer;\n ${({ selected })
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../../components/SwatchPicker/SwatchPicker.tsx"],"sourcesContent":["import type { ComponentPropsWithoutRef } from 'react';\nimport styled from 'styled-components';\n\nimport { BorderRadius, Color, Spacing } from '@persona/design-tokens';\nimport { semanticColor } from 'design-system/lib/semanticColor';\nimport { Elevation } from 'design-system/variables/effect';\n\nconst SwatchGrid = styled.div`\n display: flex;\n flex-wrap: wrap;\n align-items: flex-start;\n gap: ${Spacing[1]};\n`;\n\nexport interface SwatchPickerProps extends Omit<ComponentPropsWithoutRef<'div'>, 'onChange'> {\n value: string;\n onChange: (color: string) => void;\n colors: string[];\n}\n\nexport const SwatchPicker = ({ value, onChange, colors, ...restProps }: SwatchPickerProps) => {\n return (\n <SwatchGrid {...restProps}>\n {colors.map((color) => (\n <Swatch key={color} color={color} selected={color === value} onSelect={onChange} />\n ))}\n </SwatchGrid>\n );\n};\n\nconst ColorSwatch = styled.button<{ selected: boolean; $color?: string }>`\n display: inline-block;\n width: 24px;\n height: 24px;\n padding: 0;\n background-color: ${({ $color }) => $color ?? 'transparent'};\n border-radius: ${BorderRadius.Circle};\n border: 2px solid ${({ theme }) => semanticColor(theme, 'InputSurfaceDefault', Color.PrimaryWhite)};\n transition: all 100ms ease-out;\n cursor: pointer;\n ${({ selected, theme }) =>\n selected\n ? `outline: 2px solid ${semanticColor(theme, 'BorderAccent', Color.BorderIconActive)}`\n : ''};\n\n &:hover {\n box-shadow: ${Elevation.Low};\n }\n`;\n\nconst WhiteSwatch = styled(ColorSwatch)`\n border-color: ${({ theme }) => semanticColor(theme, 'BorderDivider', Color.BorderHairline)};\n`;\n\ninterface SwatchProps {\n color: string;\n selected: boolean;\n onSelect: (color: string) => void;\n}\n\nconst Swatch = ({ color, selected, onSelect }: SwatchProps) => {\n // NOTE: This is a hack to get the white color to show up. In theory we may want to do this\n // for all colors close to white, but this gets the job done for now.\n return color.toUpperCase() === '#FFFFFF' ? (\n <WhiteSwatch selected={selected} title='#FFFFFF' onClick={() => onSelect(color)} />\n ) : (\n <ColorSwatch $color={color} selected={selected} title={color} onClick={() => onSelect(color)} />\n );\n};\n\nexport default SwatchPicker;\n"],"mappings":";;;;;;AAOA,MAAM,aAAa,OAAO,GAAG;;;;SAIpB,QAAQ,GAAG;;AASpB,MAAa,gBAAgB,EAAE,OAAO,UAAU,QAAQ,GAAG,gBAAmC;AAC5F,QACE,oBAAC,YAAD;EAAY,GAAI;YACb,OAAO,KAAK,UACX,oBAAC,QAAD;GAA2B;GAAO,UAAU,UAAU;GAAO,UAAU;GAAY,EAAtE,MAAsE,CACnF;EACS,CAAA;;AAIjB,MAAM,cAAc,OAAO,MAA8C;;;;;uBAKlD,EAAE,aAAa,UAAU,cAAc;mBAC3C,aAAa,OAAO;uBAChB,EAAE,YAAY,cAAc,OAAO,uBAAuB,MAAM,aAAa,CAAC;;;KAGhG,EAAE,UAAU,YACb,WACI,sBAAsB,cAAc,OAAO,gBAAgB,MAAM,iBAAiB,KAClF,GAAG;;;oIAGqB;;;AAIhC,MAAM,cAAc,OAAO,YAAY;mBACpB,EAAE,YAAY,cAAc,OAAO,iBAAiB,MAAM,eAAe,CAAC;;AAS7F,MAAM,UAAU,EAAE,OAAO,UAAU,eAA4B;AAG7D,QAAO,MAAM,aAAa,KAAK,YAC7B,oBAAC,aAAD;EAAuB;EAAU,OAAM;EAAU,eAAe,SAAS,MAAM;EAAI,CAAA,GAEnF,oBAAC,aAAD;EAAa,QAAQ;EAAiB;EAAU,OAAO;EAAO,eAAe,SAAS,MAAM;EAAI,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as TabContainer, i as TabBar, n as StyledTab, r as Tab, t as TabBarIconButton_default } from "../../TabBar-
|
|
1
|
+
import { a as TabContainer, i as TabBar, n as StyledTab, r as Tab, t as TabBarIconButton_default } from "../../TabBar-B__54oO3.mjs";
|
|
2
2
|
export { StyledTab, Tab, TabBar, TabBar as default, TabBarIconButton_default as TabBarIconButton, TabContainer };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { t as Table } from "../../Table-
|
|
2
|
-
import { t as TableHeaderCell } from "../../TableHeaderCell-
|
|
3
|
-
import {
|
|
4
|
-
import { t as
|
|
5
|
-
import { t as TableHead } from "../../TableHead-
|
|
6
|
-
import { t as TableBody } from "../../TableBody-
|
|
7
|
-
import { t as
|
|
1
|
+
import { t as Table } from "../../Table-CPvIH27_.mjs";
|
|
2
|
+
import { t as TableHeaderCell } from "../../TableHeaderCell-DiJ2jyw4.mjs";
|
|
3
|
+
import { t as TableRow } from "../../TableRow-Dgg8hGy5.mjs";
|
|
4
|
+
import { a as TableCellProps, c as TableTD, i as TableCell, l as TableTR, n as StickyTH, o as TableCellTitle, r as TableActionTD, s as TableIconTD, t as StickyTD } from "../../TableCell-BQv4ASkE.mjs";
|
|
5
|
+
import { t as TableHead } from "../../TableHead-DLLn0zoP.mjs";
|
|
6
|
+
import { t as TableBody } from "../../TableBody-CQYijW_3.mjs";
|
|
7
|
+
import { t as TableTH } from "../../index-DxIXll2Z.mjs";
|
|
8
|
+
import { t as TableLayout } from "../../TableLayout-BgnUz8NO.mjs";
|
|
8
9
|
export { StickyTD, StickyTH, Table, Table as default, TableActionTD, TableBody, TableCell, TableCellProps, TableCellTitle, TableHead, TableHeaderCell, TableIconTD, TableLayout, TableRow, TableTD, TableTH, TableTR };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as StickyTH, c as TableCellTitle, d as TableTR, f as TableTH, h as Table, i as StickyTD, l as TableIconTD, m as TableHeaderCell, n as TableBody, o as TableActionTD, p as TableRow, r as TableHead, s as TableCell, t as TableLayout, u as TableTD } from "../../Table-
|
|
1
|
+
import { a as StickyTH, c as TableCellTitle, d as TableTR, f as TableTH, h as Table, i as StickyTD, l as TableIconTD, m as TableHeaderCell, n as TableBody, o as TableActionTD, p as TableRow, r as TableHead, s as TableCell, t as TableLayout, u as TableTD } from "../../Table-CqIi5mVF.mjs";
|
|
2
2
|
export { StickyTD, StickyTH, Table, Table as default, TableActionTD, TableBody, TableCell, TableCellTitle, TableHead, TableHeaderCell, TableIconTD, TableLayout, TableRow, TableTD, TableTH, TableTR };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as DragDirection } from "../../useTableBoxDragAndDrop-
|
|
2
|
-
import { a as TableBox, o as TableBoxContext, r as InlineEditConfig, s as TableBoxProps } from "../../TableBoxCell-
|
|
1
|
+
import { t as DragDirection } from "../../useTableBoxDragAndDrop-DkCxC7Mi.mjs";
|
|
2
|
+
import { a as TableBox, o as TableBoxContext, r as InlineEditConfig, s as TableBoxProps } from "../../TableBoxCell-CQ3zT1jG.mjs";
|
|
3
3
|
export { DragDirection, InlineEditConfig, TableBoxContext, TableBoxProps, TableBox as default };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as TableBoxContext, t as TableBox } from "../../TableBox-
|
|
1
|
+
import { n as TableBoxContext, t as TableBox } from "../../TableBox-C-8RxZT4.mjs";
|
|
2
2
|
export { TableBoxContext, TableBox as default };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as TechnicalSticker } from "../../TechnicalSticker-
|
|
1
|
+
import { t as TechnicalSticker } from "../../TechnicalSticker-D6MO_IfT.mjs";
|
|
2
2
|
export { TechnicalSticker, TechnicalSticker as default };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as Label, c as ParagraphProps, d as TabularNumber, i as HeadingProps, l as Span, n as DisplayProps, o as LabelProps, r as Heading, s as Paragraph, t as Display, u as SpanProps } from "../../Text-
|
|
1
|
+
import { a as Label, c as ParagraphProps, d as TabularNumber, i as HeadingProps, l as Span, n as DisplayProps, o as LabelProps, r as Heading, s as Paragraph, t as Display, u as SpanProps } from "../../Text-tgFz40XD.mjs";
|
|
2
2
|
export { Display, DisplayProps, Heading, HeadingProps, Label, LabelProps, Paragraph, ParagraphProps, Span, SpanProps, TabularNumber };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as Span, i as Paragraph, n as Heading, o as TabularNumber, r as Label, t as Display } from "../../Text-
|
|
1
|
+
import { a as Span, i as Paragraph, n as Heading, o as TabularNumber, r as Label, t as Display } from "../../Text-Dn_p7ZvT.mjs";
|
|
2
2
|
export { Display, Heading, Label, Paragraph, Span, TabularNumber };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as TextAreaWithStyle, t as TextAreaProps } from "../../TextArea-
|
|
1
|
+
import { n as TextAreaWithStyle, t as TextAreaProps } from "../../TextArea-BxxXQSwP.mjs";
|
|
2
2
|
export { TextAreaWithStyle as TextArea, TextAreaWithStyle as default, TextAreaProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as TextAreaWithStyle } from "../../TextArea-
|
|
1
|
+
import { t as TextAreaWithStyle } from "../../TextArea-CYirq-B2.mjs";
|
|
2
2
|
export { TextAreaWithStyle as TextArea, TextAreaWithStyle as default };
|