@persona/design-system 0.1.5-pre.4
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 +461 -0
- package/LICENSE +77 -0
- package/README.md +9 -0
- package/dist/Action-B10lxofb.d.mts +35 -0
- package/dist/Action-uduFOh2m.d.cts +35 -0
- package/dist/Action.d.cts +2 -0
- package/dist/Action.d.mts +2 -0
- package/dist/Attribute.d.cts +107 -0
- package/dist/Attribute.d.mts +107 -0
- package/dist/AttributeGrid.d.cts +40 -0
- package/dist/AttributeGrid.d.mts +41 -0
- package/dist/Badge-BqLnhb4n.mjs +34 -0
- package/dist/Badge-BqLnhb4n.mjs.map +1 -0
- package/dist/Badge-BwAZD9BH.cjs +41 -0
- package/dist/Badge-BwAZD9BH.cjs.map +1 -0
- package/dist/Badge.d.cts +25 -0
- package/dist/Badge.d.mts +25 -0
- package/dist/Banner.d.cts +48 -0
- package/dist/Banner.d.mts +48 -0
- package/dist/Button-C_3p5Xfi.d.cts +101 -0
- package/dist/Button-DqDLGURJ.d.mts +101 -0
- package/dist/Button.d.cts +2 -0
- package/dist/Button.d.mts +2 -0
- package/dist/ButtonGroup.d.cts +20 -0
- package/dist/ButtonGroup.d.mts +20 -0
- package/dist/Calendar.d.cts +11 -0
- package/dist/Calendar.d.mts +12 -0
- package/dist/CalendarBase.d.mts +12 -0
- package/dist/CalendarCell.d.mts +18 -0
- package/dist/CalendarGrid.d.mts +18 -0
- package/dist/Card-CcU9cKCd.d.mts +52 -0
- package/dist/Card-CrQL0hXm.d.cts +52 -0
- package/dist/Card-CyCKL-M5.cjs +248 -0
- package/dist/Card-CyCKL-M5.cjs.map +1 -0
- package/dist/Card-DeJSt5ys.mjs +205 -0
- package/dist/Card-DeJSt5ys.mjs.map +1 -0
- package/dist/Card.d.cts +2 -0
- package/dist/Card.d.mts +2 -0
- package/dist/Card2.d.cts +95 -0
- package/dist/Card2.d.mts +96 -0
- package/dist/Checkbox-BWJNAP27.d.mts +46 -0
- package/dist/Checkbox-BmjK0Wac.d.cts +46 -0
- package/dist/Checkbox-C5bGcb-r.mjs +176 -0
- package/dist/Checkbox-C5bGcb-r.mjs.map +1 -0
- package/dist/Checkbox-D4nv7eNs.cjs +183 -0
- package/dist/Checkbox-D4nv7eNs.cjs.map +1 -0
- package/dist/Checkbox.d.cts +2 -0
- package/dist/Checkbox.d.mts +2 -0
- package/dist/CheckboxGroupField.d.cts +24 -0
- package/dist/CheckboxGroupField.d.mts +25 -0
- package/dist/Combobox-B_-swcix.mjs +1672 -0
- package/dist/Combobox-B_-swcix.mjs.map +1 -0
- package/dist/Combobox-B_oe33Re.cjs +1692 -0
- package/dist/Combobox-B_oe33Re.cjs.map +1 -0
- package/dist/Combobox-DjbJYK_u.d.mts +11 -0
- package/dist/Combobox.d.cts +12 -0
- package/dist/Combobox.d.mts +3 -0
- package/dist/ComboboxBase-D2wypeXf.d.cts +320 -0
- package/dist/ComboboxBase-INya0Csa.d.mts +320 -0
- package/dist/ComboboxBase.d.cts +2 -0
- package/dist/ComboboxBase.d.mts +2 -0
- package/dist/ComboboxMultiSelect-Dn8cRZ6Z.d.cts +47 -0
- package/dist/ComboboxMultiSelect-Dq9DGH8S.d.mts +47 -0
- package/dist/ComboboxMultiSelect.d.cts +2 -0
- package/dist/ComboboxMultiSelect.d.mts +2 -0
- package/dist/ComboboxSingleSelect-D8YM7GKP.d.cts +35 -0
- package/dist/ComboboxSingleSelect-WwBJRb0e.d.mts +35 -0
- package/dist/ComboboxSingleSelect.d.cts +2 -0
- package/dist/ComboboxSingleSelect.d.mts +2 -0
- package/dist/ConfigFormGroup.d.cts +7 -0
- package/dist/ConfigFormGroup.d.mts +7 -0
- package/dist/DateField-Bwe_0qm9.d.cts +24 -0
- package/dist/DateField-Chko9oLb.d.mts +24 -0
- package/dist/DateField.d.cts +2 -0
- package/dist/DateField.d.mts +2 -0
- package/dist/DatePicker.d.cts +19 -0
- package/dist/DatePicker.d.mts +19 -0
- package/dist/DateRangePicker.d.cts +46 -0
- package/dist/DateRangePicker.d.mts +47 -0
- package/dist/DropdownButton-DO4NqvWR.cjs +33 -0
- package/dist/DropdownButton-DO4NqvWR.cjs.map +1 -0
- package/dist/DropdownButton-k9kEcexu.mjs +27 -0
- package/dist/DropdownButton-k9kEcexu.mjs.map +1 -0
- package/dist/DropdownButton.d.cts +26 -0
- package/dist/DropdownButton.d.mts +26 -0
- package/dist/DropdownMenu-BTk--LWo.mjs +60 -0
- package/dist/DropdownMenu-BTk--LWo.mjs.map +1 -0
- package/dist/DropdownMenu-Bm2QqLEq.d.cts +75 -0
- package/dist/DropdownMenu-D2fzpkX2.cjs +74 -0
- package/dist/DropdownMenu-D2fzpkX2.cjs.map +1 -0
- package/dist/DropdownMenu-rWgROxQe.d.mts +75 -0
- package/dist/DropdownMenu.d.cts +2 -0
- package/dist/DropdownMenu.d.mts +2 -0
- package/dist/ErrorProps-DLdVsYlk.d.cts +8 -0
- package/dist/ErrorProps-DYUKygmd.d.mts +8 -0
- package/dist/ErrorProps.d.cts +2 -0
- package/dist/ErrorProps.d.mts +2 -0
- package/dist/FormControl-BXHqI_2D.mjs +168 -0
- package/dist/FormControl-BXHqI_2D.mjs.map +1 -0
- package/dist/FormControl-CM7wTn1P.d.mts +60 -0
- package/dist/FormControl-DiR2e7Od.cjs +212 -0
- package/dist/FormControl-DiR2e7Od.cjs.map +1 -0
- package/dist/FormControl-KkeIYuBa.d.cts +60 -0
- package/dist/FormControl.d.cts +2 -0
- package/dist/FormControl.d.mts +2 -0
- package/dist/FormField-19ownwjH.d.cts +69 -0
- package/dist/FormField-CdMru4s5.d.mts +69 -0
- package/dist/FormField.d.cts +2 -0
- package/dist/FormField.d.mts +2 -0
- package/dist/Header-D8oDtnIL.d.cts +35 -0
- package/dist/Header-t1plnZc0.d.mts +35 -0
- package/dist/Header.d.cts +2 -0
- package/dist/Header.d.mts +2 -0
- package/dist/HelperTooltip-Cd7I0Ucq.d.mts +20 -0
- package/dist/HelperTooltip-oXdyk2At.d.cts +20 -0
- package/dist/HelperTooltip.d.cts +2 -0
- package/dist/HelperTooltip.d.mts +2 -0
- package/dist/IconButton-B1ZL8BqW.cjs +372 -0
- package/dist/IconButton-B1ZL8BqW.cjs.map +1 -0
- package/dist/IconButton-C28qxOdi.mjs +341 -0
- package/dist/IconButton-C28qxOdi.mjs.map +1 -0
- package/dist/IconButton-DsXbc3nQ.d.mts +24 -0
- package/dist/IconButton-ZcyTFjPn.d.cts +24 -0
- package/dist/IconButton.d.cts +2 -0
- package/dist/IconButton.d.mts +2 -0
- package/dist/ImageTile.d.cts +60 -0
- package/dist/ImageTile.d.mts +60 -0
- package/dist/Input-Cv5qieRg.d.mts +65 -0
- package/dist/Input-DHOsR4cl.cjs +210 -0
- package/dist/Input-DHOsR4cl.cjs.map +1 -0
- package/dist/Input-XppkvfUf.d.cts +65 -0
- package/dist/Input-eoFk39bE.mjs +191 -0
- package/dist/Input-eoFk39bE.mjs.map +1 -0
- package/dist/Input.d.cts +2 -0
- package/dist/Input.d.mts +2 -0
- package/dist/InputProps-BHu05fX0.d.mts +16 -0
- package/dist/InputProps-CitGo8QA.d.cts +16 -0
- package/dist/InputProps.d.cts +2 -0
- package/dist/InputProps.d.mts +2 -0
- package/dist/Link.d.cts +43 -0
- package/dist/Link.d.mts +43 -0
- package/dist/ListBox-AyjzT6ra.d.mts +138 -0
- package/dist/ListBox-CE3mfDSB.cjs +383 -0
- package/dist/ListBox-CE3mfDSB.cjs.map +1 -0
- package/dist/ListBox-DbyZFy2W.d.cts +138 -0
- package/dist/ListBox-Z1y0LG1H.mjs +369 -0
- package/dist/ListBox-Z1y0LG1H.mjs.map +1 -0
- package/dist/ListBox.d.cts +2 -0
- package/dist/ListBox.d.mts +2 -0
- package/dist/ListBoxField.d.cts +46 -0
- package/dist/ListBoxField.d.mts +47 -0
- package/dist/LoadingShimmer-CNE6JUVF.mjs +67 -0
- package/dist/LoadingShimmer-CNE6JUVF.mjs.map +1 -0
- package/dist/LoadingShimmer-DMK9RC4N.cjs +92 -0
- package/dist/LoadingShimmer-DMK9RC4N.cjs.map +1 -0
- package/dist/LoadingShimmer.d.cts +38 -0
- package/dist/LoadingShimmer.d.mts +38 -0
- package/dist/MaskedInput.d.cts +10 -0
- package/dist/MaskedInput.d.mts +10 -0
- package/dist/MatchHighlight.d.cts +11 -0
- package/dist/MatchHighlight.d.mts +11 -0
- package/dist/Menu-BpkjNO81.cjs +217 -0
- package/dist/Menu-BpkjNO81.cjs.map +1 -0
- package/dist/Menu-DIFkRQ6x.d.mts +70 -0
- package/dist/Menu-DNRHo2i_.mjs +167 -0
- package/dist/Menu-DNRHo2i_.mjs.map +1 -0
- package/dist/Menu-DPrNMatb.d.cts +70 -0
- package/dist/Menu.d.cts +2 -0
- package/dist/Menu.d.mts +2 -0
- package/dist/Modal.d.cts +141 -0
- package/dist/Modal.d.mts +141 -0
- package/dist/PageHeader.d.cts +26 -0
- package/dist/PageHeader.d.mts +26 -0
- package/dist/PageSelector.d.cts +30 -0
- package/dist/PageSelector.d.mts +30 -0
- package/dist/PageSizeSelector.d.mts +22 -0
- package/dist/Pagination.d.cts +33 -0
- package/dist/Pagination.d.mts +33 -0
- package/dist/Pii.d.cts +16 -0
- package/dist/Pii.d.mts +17 -0
- package/dist/Popover-BSdyxuja.mjs +124 -0
- package/dist/Popover-BSdyxuja.mjs.map +1 -0
- package/dist/Popover-C2dBSwiU.cjs +168 -0
- package/dist/Popover-C2dBSwiU.cjs.map +1 -0
- package/dist/Popover.d.cts +90 -0
- package/dist/Popover.d.mts +90 -0
- package/dist/ProgressBar.d.cts +83 -0
- package/dist/ProgressBar.d.mts +83 -0
- package/dist/ProgressIndicator.d.cts +64 -0
- package/dist/ProgressIndicator.d.mts +64 -0
- package/dist/PseudoClassProps-C5jpj6Rp.d.cts +12 -0
- package/dist/PseudoClassProps-mZgO_iZJ.d.mts +12 -0
- package/dist/PseudoClassProps.d.cts +2 -0
- package/dist/PseudoClassProps.d.mts +2 -0
- package/dist/Radio-mFfT6G3d.cjs +154 -0
- package/dist/Radio-mFfT6G3d.cjs.map +1 -0
- package/dist/Radio-w-L3Otuk.mjs +147 -0
- package/dist/Radio-w-L3Otuk.mjs.map +1 -0
- package/dist/Radio.d.cts +21 -0
- package/dist/Radio.d.mts +21 -0
- package/dist/RadioGroup-B8htTzsS.mjs +50 -0
- package/dist/RadioGroup-B8htTzsS.mjs.map +1 -0
- package/dist/RadioGroup-BjDmweRK.cjs +57 -0
- package/dist/RadioGroup-BjDmweRK.cjs.map +1 -0
- package/dist/RadioGroup-D5ueuC6a.d.cts +21 -0
- package/dist/RadioGroup-Ls0vPsP_.d.mts +21 -0
- package/dist/RadioGroup.d.cts +2 -0
- package/dist/RadioGroup.d.mts +2 -0
- package/dist/RangeCalendar.d.mts +33 -0
- package/dist/RangeCalendarPresets.d.mts +25 -0
- package/dist/RegisterComponent-BDb43KvI.d.mts +34 -0
- package/dist/RegisterComponent-CpXIR-51.d.cts +34 -0
- package/dist/Section.d.mts +67 -0
- package/dist/SectionHeading-DVSXofwK.d.cts +72 -0
- package/dist/SectionHeading-QvAmhVmD.d.mts +72 -0
- package/dist/SectionHeading.d.cts +2 -0
- package/dist/SectionHeading.d.mts +2 -0
- package/dist/SegmentedControl-CvznPXgC.cjs +124 -0
- package/dist/SegmentedControl-CvznPXgC.cjs.map +1 -0
- package/dist/SegmentedControl-DRtXdbLe.d.cts +59 -0
- package/dist/SegmentedControl-Dk5S4Dhz.d.mts +59 -0
- package/dist/SegmentedControl-DnwNjYre.mjs +111 -0
- package/dist/SegmentedControl-DnwNjYre.mjs.map +1 -0
- package/dist/SegmentedControl.d.cts +2 -0
- package/dist/SegmentedControl.d.mts +2 -0
- package/dist/Select-BdPdgtfU.d.cts +77 -0
- package/dist/Select-CVB-Q1g1.cjs +266 -0
- package/dist/Select-CVB-Q1g1.cjs.map +1 -0
- package/dist/Select-Cl3AOq0-.mjs +246 -0
- package/dist/Select-Cl3AOq0-.mjs.map +1 -0
- package/dist/Select-DRnRqMAL.d.mts +77 -0
- package/dist/Select.d.cts +2 -0
- package/dist/Select.d.mts +2 -0
- package/dist/Slider-D3gz7otf.d.mts +56 -0
- package/dist/Slider-uH5MOu2D.d.cts +56 -0
- package/dist/Slider.d.cts +2 -0
- package/dist/Slider.d.mts +2 -0
- package/dist/SliderRHF-Cc-9RuPe.d.cts +984 -0
- package/dist/SliderRHF-DIV-tCEv.d.mts +984 -0
- package/dist/SliderRHF.d.cts +2 -0
- package/dist/SliderRHF.d.mts +2 -0
- package/dist/SliderThumb.d.mts +139 -0
- package/dist/Spacer-DWGkX170.cjs +20 -0
- package/dist/Spacer-DWGkX170.cjs.map +1 -0
- package/dist/Spacer-DxH_sQrV.mjs +13 -0
- package/dist/Spacer-DxH_sQrV.mjs.map +1 -0
- package/dist/Spacer.d.cts +17 -0
- package/dist/Spacer.d.mts +18 -0
- package/dist/Spinner-C05An_fn.mjs +41 -0
- package/dist/Spinner-C05An_fn.mjs.map +1 -0
- package/dist/Spinner-z7DrPE1d.cjs +48 -0
- package/dist/Spinner-z7DrPE1d.cjs.map +1 -0
- package/dist/Spinner.d.cts +26 -0
- package/dist/Spinner.d.mts +26 -0
- package/dist/Stack-BHb3ZB2A.cjs +53 -0
- package/dist/Stack-BHb3ZB2A.cjs.map +1 -0
- package/dist/Stack-BntgUvsW.d.mts +47 -0
- package/dist/Stack-hwgS2FU1.mjs +40 -0
- package/dist/Stack-hwgS2FU1.mjs.map +1 -0
- package/dist/Stack-toDRLy--.d.cts +47 -0
- package/dist/Stack.d.cts +2 -0
- package/dist/Stack.d.mts +2 -0
- package/dist/StatusIndicator.d.cts +54 -0
- package/dist/StatusIndicator.d.mts +54 -0
- package/dist/Sticker-Bd7KkekO.d.mts +68 -0
- package/dist/Sticker-D6bwBTGr.mjs +215 -0
- package/dist/Sticker-D6bwBTGr.mjs.map +1 -0
- package/dist/Sticker-D_dutvp_.cjs +246 -0
- package/dist/Sticker-D_dutvp_.cjs.map +1 -0
- package/dist/Sticker-S6QWjlEJ.d.cts +68 -0
- package/dist/Sticker.d.cts +2 -0
- package/dist/Sticker.d.mts +2 -0
- package/dist/SwatchPicker.d.cts +18 -0
- package/dist/SwatchPicker.d.mts +18 -0
- package/dist/Tab.d.cts +26 -0
- package/dist/Tab.d.mts +26 -0
- package/dist/TabBar-BMv8dAS3.cjs +297 -0
- package/dist/TabBar-BMv8dAS3.cjs.map +1 -0
- package/dist/TabBar-Bf89XksH.mjs +266 -0
- package/dist/TabBar-Bf89XksH.mjs.map +1 -0
- package/dist/TabBar.d.cts +33 -0
- package/dist/TabBar.d.mts +33 -0
- package/dist/TabBarContext.d.mts +10 -0
- package/dist/TabBarIconButton.d.cts +10 -0
- package/dist/TabBarIconButton.d.mts +11 -0
- package/dist/Table-34f5m7w5.d.mts +13 -0
- package/dist/Table-DkAA1lt_.d.cts +13 -0
- package/dist/Table.d.cts +2 -0
- package/dist/Table.d.mts +2 -0
- package/dist/TableBody-5QcVMPP_.d.cts +9 -0
- package/dist/TableBody-Clf34yzJ.d.mts +9 -0
- package/dist/TableBody.d.cts +2 -0
- package/dist/TableBody.d.mts +2 -0
- package/dist/TableCell-DIs9h97h.d.cts +75 -0
- package/dist/TableCell-Dog4Blfq.d.mts +75 -0
- package/dist/TableCell.d.cts +2 -0
- package/dist/TableCell.d.mts +2 -0
- package/dist/TableHead-9LLM1B8I.d.cts +12 -0
- package/dist/TableHead-DJBGHoUD.d.mts +12 -0
- package/dist/TableHead.d.cts +2 -0
- package/dist/TableHead.d.mts +2 -0
- package/dist/TableHeaderCell-25lC9tNk.d.cts +17 -0
- package/dist/TableHeaderCell-DzYZq7SG.d.mts +17 -0
- package/dist/TableHeaderCell.d.cts +2 -0
- package/dist/TableHeaderCell.d.mts +2 -0
- package/dist/TableLayout-BA3jbdbi.d.mts +19 -0
- package/dist/TableLayout-CmDKOu10.d.cts +19 -0
- package/dist/TableLayout.d.cts +2 -0
- package/dist/TableLayout.d.mts +2 -0
- package/dist/TableRow-CBKpDeUV.d.mts +13 -0
- package/dist/TableRow-IPjQnK2q.d.cts +13 -0
- package/dist/TableRow.d.cts +2 -0
- package/dist/TableRow.d.mts +2 -0
- package/dist/TableTH.d.cts +2 -0
- package/dist/TableTH.d.mts +2 -0
- package/dist/Text-CnXedFut.d.mts +42 -0
- package/dist/Text-CrGiWG2E.d.cts +42 -0
- package/dist/Text-DOTYjIt0.mjs +58 -0
- package/dist/Text-DOTYjIt0.mjs.map +1 -0
- package/dist/Text-DVz8erdF.cjs +95 -0
- package/dist/Text-DVz8erdF.cjs.map +1 -0
- package/dist/Text.d.cts +2 -0
- package/dist/Text.d.mts +2 -0
- package/dist/TextArea-1bHvaq9p.d.mts +10 -0
- package/dist/TextArea-B1kitxCl.mjs +33 -0
- package/dist/TextArea-B1kitxCl.mjs.map +1 -0
- package/dist/TextArea-MVgGGM6r.cjs +40 -0
- package/dist/TextArea-MVgGGM6r.cjs.map +1 -0
- package/dist/TextArea-j43fhp2P.d.cts +10 -0
- package/dist/TextArea.d.cts +2 -0
- package/dist/TextArea.d.mts +2 -0
- package/dist/TextUnderlineTooltip-BDMs4iXn.d.cts +18 -0
- package/dist/TextUnderlineTooltip-z4sSGL91.d.mts +18 -0
- package/dist/TextUnderlineTooltip.d.cts +2 -0
- package/dist/TextUnderlineTooltip.d.mts +2 -0
- package/dist/Tile.d.cts +63 -0
- package/dist/Tile.d.mts +63 -0
- package/dist/Toast.d.cts +27 -0
- package/dist/Toast.d.mts +27 -0
- package/dist/Toggle-8GNRxyvE.mjs +167 -0
- package/dist/Toggle-8GNRxyvE.mjs.map +1 -0
- package/dist/Toggle-B3Cdyf7T.d.mts +54 -0
- package/dist/Toggle-BjkbL_uf.d.cts +54 -0
- package/dist/Toggle-CVdg5iQ0.cjs +174 -0
- package/dist/Toggle-CVdg5iQ0.cjs.map +1 -0
- package/dist/Toggle.d.cts +2 -0
- package/dist/Toggle.d.mts +2 -0
- package/dist/Tooltip-0i_15ysU.cjs +152 -0
- package/dist/Tooltip-0i_15ysU.cjs.map +1 -0
- package/dist/Tooltip-C0PS5InA.d.mts +100 -0
- package/dist/Tooltip-CE1oH6Iz.d.cts +100 -0
- package/dist/Tooltip-T7RQpy_a.mjs +120 -0
- package/dist/Tooltip-T7RQpy_a.mjs.map +1 -0
- package/dist/Tooltip.d.cts +2 -0
- package/dist/Tooltip.d.mts +2 -0
- package/dist/TruncatedText-0Tf8CwFX.d.mts +18 -0
- package/dist/TruncatedText-D8f3AiBL.d.cts +18 -0
- package/dist/chunk-Bpcn9VDT.mjs +39 -0
- package/dist/chunk-CoPdw6nB.cjs +64 -0
- package/dist/common.d.mts +7 -0
- package/dist/components/Attribute/index.cjs +210 -0
- package/dist/components/Attribute/index.cjs.map +1 -0
- package/dist/components/Attribute/index.d.cts +3 -0
- package/dist/components/Attribute/index.d.mts +3 -0
- package/dist/components/Attribute/index.mjs +198 -0
- package/dist/components/Attribute/index.mjs.map +1 -0
- package/dist/components/Badge/index.cjs +8 -0
- package/dist/components/Badge/index.d.cts +2 -0
- package/dist/components/Badge/index.d.mts +2 -0
- package/dist/components/Badge/index.mjs +2 -0
- package/dist/components/Banner/index.cjs +100 -0
- package/dist/components/Banner/index.cjs.map +1 -0
- package/dist/components/Banner/index.d.cts +2 -0
- package/dist/components/Banner/index.d.mts +2 -0
- package/dist/components/Banner/index.mjs +93 -0
- package/dist/components/Banner/index.mjs.map +1 -0
- package/dist/components/Button/index.cjs +12 -0
- package/dist/components/Button/index.d.cts +3 -0
- package/dist/components/Button/index.d.mts +3 -0
- package/dist/components/Button/index.mjs +2 -0
- package/dist/components/ButtonGroup/index.cjs +112 -0
- package/dist/components/ButtonGroup/index.cjs.map +1 -0
- package/dist/components/ButtonGroup/index.d.cts +2 -0
- package/dist/components/ButtonGroup/index.d.mts +2 -0
- package/dist/components/ButtonGroup/index.mjs +103 -0
- package/dist/components/ButtonGroup/index.mjs.map +1 -0
- package/dist/components/Card/index.cjs +13 -0
- package/dist/components/Card/index.d.cts +3 -0
- package/dist/components/Card/index.d.mts +3 -0
- package/dist/components/Card/index.mjs +2 -0
- package/dist/components/CardV2/index.cjs +512 -0
- package/dist/components/CardV2/index.cjs.map +1 -0
- package/dist/components/CardV2/index.d.cts +3 -0
- package/dist/components/CardV2/index.d.mts +3 -0
- package/dist/components/CardV2/index.mjs +511 -0
- package/dist/components/CardV2/index.mjs.map +1 -0
- package/dist/components/Checkbox/index.cjs +8 -0
- package/dist/components/Checkbox/index.d.cts +2 -0
- package/dist/components/Checkbox/index.d.mts +2 -0
- package/dist/components/Checkbox/index.mjs +2 -0
- package/dist/components/Combobox/index.cjs +10 -0
- package/dist/components/Combobox/index.d.cts +3 -0
- package/dist/components/Combobox/index.d.mts +3 -0
- package/dist/components/Combobox/index.mjs +2 -0
- package/dist/components/ConfigFormGroup/index.cjs +37 -0
- package/dist/components/ConfigFormGroup/index.cjs.map +1 -0
- package/dist/components/ConfigFormGroup/index.d.cts +3 -0
- package/dist/components/ConfigFormGroup/index.d.mts +3 -0
- package/dist/components/ConfigFormGroup/index.mjs +28 -0
- package/dist/components/ConfigFormGroup/index.mjs.map +1 -0
- package/dist/components/DatePicker/index.cjs +11503 -0
- package/dist/components/DatePicker/index.cjs.map +1 -0
- package/dist/components/DatePicker/index.d.cts +5 -0
- package/dist/components/DatePicker/index.d.mts +5 -0
- package/dist/components/DatePicker/index.mjs +11491 -0
- package/dist/components/DatePicker/index.mjs.map +1 -0
- package/dist/components/DropdownButton/index.cjs +8 -0
- package/dist/components/DropdownButton/index.d.cts +2 -0
- package/dist/components/DropdownButton/index.d.mts +2 -0
- package/dist/components/DropdownButton/index.mjs +2 -0
- package/dist/components/DropdownMenu/index.cjs +8 -0
- package/dist/components/DropdownMenu/index.d.cts +2 -0
- package/dist/components/DropdownMenu/index.d.mts +2 -0
- package/dist/components/DropdownMenu/index.mjs +2 -0
- package/dist/components/FormControl/index.cjs +16 -0
- package/dist/components/FormControl/index.d.cts +3 -0
- package/dist/components/FormControl/index.d.mts +3 -0
- package/dist/components/FormControl/index.mjs +3 -0
- package/dist/components/FormField/index.cjs +385 -0
- package/dist/components/FormField/index.cjs.map +1 -0
- package/dist/components/FormField/index.d.cts +5 -0
- package/dist/components/FormField/index.d.mts +5 -0
- package/dist/components/FormField/index.mjs +367 -0
- package/dist/components/FormField/index.mjs.map +1 -0
- package/dist/components/ImageTile/index.cjs +228 -0
- package/dist/components/ImageTile/index.cjs.map +1 -0
- package/dist/components/ImageTile/index.d.cts +2 -0
- package/dist/components/ImageTile/index.d.mts +2 -0
- package/dist/components/ImageTile/index.mjs +221 -0
- package/dist/components/ImageTile/index.mjs.map +1 -0
- package/dist/components/Input/index.cjs +15 -0
- package/dist/components/Input/index.cjs.map +1 -0
- package/dist/components/Input/index.d.cts +2 -0
- package/dist/components/Input/index.d.mts +2 -0
- package/dist/components/Input/index.mjs +7 -0
- package/dist/components/Input/index.mjs.map +1 -0
- package/dist/components/Link/index.cjs +87 -0
- package/dist/components/Link/index.cjs.map +1 -0
- package/dist/components/Link/index.d.cts +2 -0
- package/dist/components/Link/index.d.mts +2 -0
- package/dist/components/Link/index.mjs +80 -0
- package/dist/components/Link/index.mjs.map +1 -0
- package/dist/components/ListBox/index.cjs +9 -0
- package/dist/components/ListBox/index.d.cts +2 -0
- package/dist/components/ListBox/index.d.mts +2 -0
- package/dist/components/ListBox/index.mjs +2 -0
- package/dist/components/LoadingShimmer/index.cjs +7 -0
- package/dist/components/LoadingShimmer/index.d.cts +2 -0
- package/dist/components/LoadingShimmer/index.d.mts +2 -0
- package/dist/components/LoadingShimmer/index.mjs +2 -0
- package/dist/components/MaskedInput/index.cjs +29 -0
- package/dist/components/MaskedInput/index.cjs.map +1 -0
- package/dist/components/MaskedInput/index.d.cts +2 -0
- package/dist/components/MaskedInput/index.d.mts +2 -0
- package/dist/components/MaskedInput/index.mjs +24 -0
- package/dist/components/MaskedInput/index.mjs.map +1 -0
- package/dist/components/MatchHighlight/index.cjs +31 -0
- package/dist/components/MatchHighlight/index.cjs.map +1 -0
- package/dist/components/MatchHighlight/index.d.cts +2 -0
- package/dist/components/MatchHighlight/index.d.mts +2 -0
- package/dist/components/MatchHighlight/index.mjs +24 -0
- package/dist/components/MatchHighlight/index.mjs.map +1 -0
- package/dist/components/Menu/index.cjs +15 -0
- package/dist/components/Menu/index.d.cts +2 -0
- package/dist/components/Menu/index.d.mts +2 -0
- package/dist/components/Menu/index.mjs +2 -0
- package/dist/components/Modal/index.cjs +285 -0
- package/dist/components/Modal/index.cjs.map +1 -0
- package/dist/components/Modal/index.d.cts +2 -0
- package/dist/components/Modal/index.d.mts +2 -0
- package/dist/components/Modal/index.mjs +276 -0
- package/dist/components/Modal/index.mjs.map +1 -0
- package/dist/components/PageHeader/index.cjs +71 -0
- package/dist/components/PageHeader/index.cjs.map +1 -0
- package/dist/components/PageHeader/index.d.cts +2 -0
- package/dist/components/PageHeader/index.d.mts +2 -0
- package/dist/components/PageHeader/index.mjs +64 -0
- package/dist/components/PageHeader/index.mjs.map +1 -0
- package/dist/components/Pagination/index.cjs +211 -0
- package/dist/components/Pagination/index.cjs.map +1 -0
- package/dist/components/Pagination/index.d.cts +3 -0
- package/dist/components/Pagination/index.d.mts +3 -0
- package/dist/components/Pagination/index.mjs +203 -0
- package/dist/components/Pagination/index.mjs.map +1 -0
- package/dist/components/Pii/index.cjs +20 -0
- package/dist/components/Pii/index.cjs.map +1 -0
- package/dist/components/Pii/index.d.cts +2 -0
- package/dist/components/Pii/index.d.mts +2 -0
- package/dist/components/Pii/index.mjs +19 -0
- package/dist/components/Pii/index.mjs.map +1 -0
- package/dist/components/Popover/index.cjs +13 -0
- package/dist/components/Popover/index.d.cts +2 -0
- package/dist/components/Popover/index.d.mts +2 -0
- package/dist/components/Popover/index.mjs +2 -0
- package/dist/components/ProgressBar/index.cjs +177 -0
- package/dist/components/ProgressBar/index.cjs.map +1 -0
- package/dist/components/ProgressBar/index.d.cts +2 -0
- package/dist/components/ProgressBar/index.d.mts +2 -0
- package/dist/components/ProgressBar/index.mjs +168 -0
- package/dist/components/ProgressBar/index.mjs.map +1 -0
- package/dist/components/ProgressIndicator/index.cjs +185 -0
- package/dist/components/ProgressIndicator/index.cjs.map +1 -0
- package/dist/components/ProgressIndicator/index.d.cts +2 -0
- package/dist/components/ProgressIndicator/index.d.mts +2 -0
- package/dist/components/ProgressIndicator/index.mjs +178 -0
- package/dist/components/ProgressIndicator/index.mjs.map +1 -0
- package/dist/components/Radio/index.cjs +8 -0
- package/dist/components/Radio/index.d.cts +2 -0
- package/dist/components/Radio/index.d.mts +2 -0
- package/dist/components/Radio/index.mjs +2 -0
- package/dist/components/RadioGroup/index.cjs +8 -0
- package/dist/components/RadioGroup/index.d.cts +2 -0
- package/dist/components/RadioGroup/index.d.mts +2 -0
- package/dist/components/RadioGroup/index.mjs +2 -0
- package/dist/components/SegmentedControl/index.cjs +9 -0
- package/dist/components/SegmentedControl/index.d.cts +2 -0
- package/dist/components/SegmentedControl/index.d.mts +2 -0
- package/dist/components/SegmentedControl/index.mjs +2 -0
- package/dist/components/Select/index.cjs +10 -0
- package/dist/components/Select/index.d.cts +2 -0
- package/dist/components/Select/index.d.mts +2 -0
- package/dist/components/Select/index.mjs +2 -0
- package/dist/components/Slider/index.cjs +1507 -0
- package/dist/components/Slider/index.cjs.map +1 -0
- package/dist/components/Slider/index.d.cts +3 -0
- package/dist/components/Slider/index.d.mts +3 -0
- package/dist/components/Slider/index.mjs +1497 -0
- package/dist/components/Slider/index.mjs.map +1 -0
- package/dist/components/Spacer/index.cjs +3 -0
- package/dist/components/Spacer/index.d.cts +2 -0
- package/dist/components/Spacer/index.d.mts +2 -0
- package/dist/components/Spacer/index.mjs +2 -0
- package/dist/components/Spinner/index.cjs +8 -0
- package/dist/components/Spinner/index.d.cts +2 -0
- package/dist/components/Spinner/index.d.mts +2 -0
- package/dist/components/Spinner/index.mjs +2 -0
- package/dist/components/Stack/index.cjs +9 -0
- package/dist/components/Stack/index.d.cts +2 -0
- package/dist/components/Stack/index.d.mts +2 -0
- package/dist/components/Stack/index.mjs +2 -0
- package/dist/components/StatusIndicator/index.cjs +174 -0
- package/dist/components/StatusIndicator/index.cjs.map +1 -0
- package/dist/components/StatusIndicator/index.d.cts +2 -0
- package/dist/components/StatusIndicator/index.d.mts +2 -0
- package/dist/components/StatusIndicator/index.mjs +167 -0
- package/dist/components/StatusIndicator/index.mjs.map +1 -0
- package/dist/components/Sticker/index.cjs +12 -0
- package/dist/components/Sticker/index.d.cts +2 -0
- package/dist/components/Sticker/index.d.mts +2 -0
- package/dist/components/Sticker/index.mjs +2 -0
- package/dist/components/SwatchPicker/index.cjs +65 -0
- package/dist/components/SwatchPicker/index.cjs.map +1 -0
- package/dist/components/SwatchPicker/index.d.cts +2 -0
- package/dist/components/SwatchPicker/index.d.mts +2 -0
- package/dist/components/SwatchPicker/index.mjs +58 -0
- package/dist/components/SwatchPicker/index.mjs.map +1 -0
- package/dist/components/TabBar/index.cjs +12 -0
- package/dist/components/TabBar/index.d.cts +4 -0
- package/dist/components/TabBar/index.d.mts +4 -0
- package/dist/components/TabBar/index.mjs +2 -0
- package/dist/components/Table/index.cjs +400 -0
- package/dist/components/Table/index.cjs.map +1 -0
- package/dist/components/Table/index.d.cts +8 -0
- package/dist/components/Table/index.d.mts +8 -0
- package/dist/components/Table/index.mjs +379 -0
- package/dist/components/Table/index.mjs.map +1 -0
- package/dist/components/Text/index.cjs +9 -0
- package/dist/components/Text/index.d.cts +2 -0
- package/dist/components/Text/index.d.mts +2 -0
- package/dist/components/Text/index.mjs +2 -0
- package/dist/components/TextArea/index.cjs +8 -0
- package/dist/components/TextArea/index.d.cts +2 -0
- package/dist/components/TextArea/index.d.mts +2 -0
- package/dist/components/TextArea/index.mjs +2 -0
- package/dist/components/Tile/index.cjs +103 -0
- package/dist/components/Tile/index.cjs.map +1 -0
- package/dist/components/Tile/index.d.cts +2 -0
- package/dist/components/Tile/index.d.mts +2 -0
- package/dist/components/Tile/index.mjs +96 -0
- package/dist/components/Tile/index.mjs.map +1 -0
- package/dist/components/Toast/index.cjs +141 -0
- package/dist/components/Toast/index.cjs.map +1 -0
- package/dist/components/Toast/index.d.cts +2 -0
- package/dist/components/Toast/index.d.mts +2 -0
- package/dist/components/Toast/index.mjs +136 -0
- package/dist/components/Toast/index.mjs.map +1 -0
- package/dist/components/Toggle/index.cjs +8 -0
- package/dist/components/Toggle/index.d.cts +2 -0
- package/dist/components/Toggle/index.d.mts +2 -0
- package/dist/components/Toggle/index.mjs +2 -0
- package/dist/components/Tooltip/index.cjs +12 -0
- package/dist/components/Tooltip/index.d.cts +4 -0
- package/dist/components/Tooltip/index.d.mts +4 -0
- package/dist/components/Tooltip/index.mjs +2 -0
- package/dist/constants.d.mts +5 -0
- package/dist/ids-Cr-NW2RJ.d.mts +11 -0
- package/dist/ids-e4V5Y3Ub.d.cts +11 -0
- package/dist/index-1-AkepUA.d.mts +1 -0
- package/dist/index-7in8TPrM.d.mts +1 -0
- package/dist/index-8R9vlM2B.d.mts +83 -0
- package/dist/index-B2KLYYkM.d.cts +1 -0
- package/dist/index-BBDa5smF.d.cts +1 -0
- package/dist/index-BJ8-FA6N.d.cts +1 -0
- package/dist/index-BM1DqNZf.d.cts +628 -0
- package/dist/index-BPSCxsMC.d.cts +1 -0
- package/dist/index-BPiqSRRl.d.mts +1 -0
- package/dist/index-BUYyA1Xh.d.cts +1 -0
- package/dist/index-CCt0lwyI.d.mts +1 -0
- package/dist/index-CEDY7cmG.d.cts +1 -0
- package/dist/index-CEqOS-7M.d.mts +1 -0
- package/dist/index-CExuKKOI.d.cts +218 -0
- package/dist/index-CIABef8t.d.mts +1 -0
- package/dist/index-CIBxlpQo.d.mts +1 -0
- package/dist/index-CKu60b9I.d.mts +154 -0
- package/dist/index-CP2eJYlK.d.mts +1 -0
- package/dist/index-CRo77wc3.d.mts +1 -0
- package/dist/index-CiBIKhMu.d.cts +1 -0
- package/dist/index-Cii4Qb1X.d.mts +1 -0
- package/dist/index-CspKFJM1.d.cts +1 -0
- package/dist/index-CsuikFeJ.d.mts +1 -0
- package/dist/index-Cz6N-KeS.d.cts +1 -0
- package/dist/index-D-BciAtf.d.cts +1 -0
- package/dist/index-D26lpgQi.d.cts +1 -0
- package/dist/index-D2HUTZ-d.d.cts +1 -0
- package/dist/index-D4DUvwPf.d.mts +1 -0
- package/dist/index-D4ELpJXS.d.cts +1 -0
- package/dist/index-D6CnpA_r.d.cts +1 -0
- package/dist/index-DLoAMD9J.d.cts +1 -0
- package/dist/index-DQvVmqvS.d.mts +628 -0
- package/dist/index-DWfPppPU.d.mts +1 -0
- package/dist/index-DcU87nuJ2.d.cts +1 -0
- package/dist/index-DkrC-i1D.d.mts +1 -0
- package/dist/index-DvuJXuAN.d.mts +1 -0
- package/dist/index-OEBbnNdr.d.mts +1 -0
- package/dist/index-QbUkWSLh.d.mts +1 -0
- package/dist/index-VmEFGBxN.d.cts +1 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.cts +2 -0
- package/dist/index.d.mts +2 -0
- package/dist/index.mjs +0 -0
- package/dist/index2.d.cts +1 -0
- package/dist/index2.d.mts +1 -0
- package/dist/input-BCmP106-.d.mts +17 -0
- package/dist/input-Bm_anD8X.d.cts +17 -0
- package/dist/inputFields.d.cts +83 -0
- package/dist/inputFields.d.mts +83 -0
- package/dist/intersperse.d.mts +18 -0
- package/dist/lib/ConfigContext.cjs +15 -0
- package/dist/lib/ConfigContext.cjs.map +1 -0
- package/dist/lib/ConfigContext.d.cts +16 -0
- package/dist/lib/ConfigContext.d.mts +17 -0
- package/dist/lib/ConfigContext.mjs +15 -0
- package/dist/lib/ConfigContext.mjs.map +1 -0
- package/dist/lib/HeadlessAriaButton.cjs +33 -0
- package/dist/lib/HeadlessAriaButton.cjs.map +1 -0
- package/dist/lib/HeadlessAriaButton.d.cts +12 -0
- package/dist/lib/HeadlessAriaButton.d.mts +12 -0
- package/dist/lib/HeadlessAriaButton.mjs +30 -0
- package/dist/lib/HeadlessAriaButton.mjs.map +1 -0
- package/dist/lib/PDSProvider.cjs +20 -0
- package/dist/lib/PDSProvider.cjs.map +1 -0
- package/dist/lib/PDSProvider.d.cts +12 -0
- package/dist/lib/PDSProvider.d.mts +13 -0
- package/dist/lib/PDSProvider.mjs +19 -0
- package/dist/lib/PDSProvider.mjs.map +1 -0
- package/dist/lib/TruncatedText.cjs +39 -0
- package/dist/lib/TruncatedText.cjs.map +1 -0
- package/dist/lib/TruncatedText.d.cts +2 -0
- package/dist/lib/TruncatedText.d.mts +2 -0
- package/dist/lib/TruncatedText.mjs +31 -0
- package/dist/lib/TruncatedText.mjs.map +1 -0
- package/dist/lib/TruncatedTextWithTooltip.cjs +34 -0
- package/dist/lib/TruncatedTextWithTooltip.cjs.map +1 -0
- package/dist/lib/TruncatedTextWithTooltip.d.cts +15 -0
- package/dist/lib/TruncatedTextWithTooltip.d.mts +15 -0
- package/dist/lib/TruncatedTextWithTooltip.mjs +28 -0
- package/dist/lib/TruncatedTextWithTooltip.mjs.map +1 -0
- package/dist/lib/comboboxHelper.cjs +46 -0
- package/dist/lib/comboboxHelper.cjs.map +1 -0
- package/dist/lib/comboboxHelper.d.cts +24 -0
- package/dist/lib/comboboxHelper.d.mts +24 -0
- package/dist/lib/comboboxHelper.mjs +42 -0
- package/dist/lib/comboboxHelper.mjs.map +1 -0
- package/dist/lib/datePickerHelper.cjs +3568 -0
- package/dist/lib/datePickerHelper.cjs.map +1 -0
- package/dist/lib/datePickerHelper.d.cts +19 -0
- package/dist/lib/datePickerHelper.d.mts +19 -0
- package/dist/lib/datePickerHelper.mjs +3566 -0
- package/dist/lib/datePickerHelper.mjs.map +1 -0
- package/dist/lib/pseudoClass.cjs +32 -0
- package/dist/lib/pseudoClass.cjs.map +1 -0
- package/dist/lib/pseudoClass.d.cts +45 -0
- package/dist/lib/pseudoClass.d.mts +45 -0
- package/dist/lib/pseudoClass.mjs +18 -0
- package/dist/lib/pseudoClass.mjs.map +1 -0
- package/dist/lib/register/RegisterComponent.cjs +91 -0
- package/dist/lib/register/RegisterComponent.cjs.map +1 -0
- package/dist/lib/register/RegisterComponent.d.cts +2 -0
- package/dist/lib/register/RegisterComponent.d.mts +2 -0
- package/dist/lib/register/RegisterComponent.mjs +88 -0
- package/dist/lib/register/RegisterComponent.mjs.map +1 -0
- package/dist/lib/register/ids.cjs +31 -0
- package/dist/lib/register/ids.cjs.map +1 -0
- package/dist/lib/register/ids.d.cts +2 -0
- package/dist/lib/register/ids.d.mts +2 -0
- package/dist/lib/register/ids.mjs +28 -0
- package/dist/lib/register/ids.mjs.map +1 -0
- package/dist/lib/register/index.cjs +8 -0
- package/dist/lib/register/index.d.cts +4 -0
- package/dist/lib/register/index.d.mts +4 -0
- package/dist/lib/register/index.mjs +3 -0
- package/dist/lib/register/types.cjs +1 -0
- package/dist/lib/register/types.d.cts +2 -0
- package/dist/lib/register/types.d.mts +2 -0
- package/dist/lib/register/types.mjs +0 -0
- package/dist/lib/reorderItems.cjs +39 -0
- package/dist/lib/reorderItems.cjs.map +1 -0
- package/dist/lib/reorderItems.d.cts +26 -0
- package/dist/lib/reorderItems.d.mts +26 -0
- package/dist/lib/reorderItems.mjs +36 -0
- package/dist/lib/reorderItems.mjs.map +1 -0
- package/dist/lib/selectHelper.cjs +22 -0
- package/dist/lib/selectHelper.cjs.map +1 -0
- package/dist/lib/selectHelper.d.cts +14 -0
- package/dist/lib/selectHelper.d.mts +14 -0
- package/dist/lib/selectHelper.mjs +20 -0
- package/dist/lib/selectHelper.mjs.map +1 -0
- package/dist/lib/useControlled.cjs +20 -0
- package/dist/lib/useControlled.cjs.map +1 -0
- package/dist/lib/useControlled.d.cts +16 -0
- package/dist/lib/useControlled.d.mts +17 -0
- package/dist/lib/useControlled.mjs +19 -0
- package/dist/lib/useControlled.mjs.map +1 -0
- package/dist/lib/useIsOverflow.cjs +58 -0
- package/dist/lib/useIsOverflow.cjs.map +1 -0
- package/dist/lib/useIsOverflow.d.cts +11 -0
- package/dist/lib/useIsOverflow.d.mts +11 -0
- package/dist/lib/useIsOverflow.mjs +56 -0
- package/dist/lib/useIsOverflow.mjs.map +1 -0
- package/dist/lib/useOutsideClick.cjs +19 -0
- package/dist/lib/useOutsideClick.cjs.map +1 -0
- package/dist/lib/useOutsideClick.d.cts +13 -0
- package/dist/lib/useOutsideClick.d.mts +13 -0
- package/dist/lib/useOutsideClick.mjs +17 -0
- package/dist/lib/useOutsideClick.mjs.map +1 -0
- package/dist/lib/zindex.cjs +27 -0
- package/dist/lib/zindex.cjs.map +1 -0
- package/dist/lib/zindex.d.cts +25 -0
- package/dist/lib/zindex.d.mts +25 -0
- package/dist/lib/zindex.mjs +25 -0
- package/dist/lib/zindex.mjs.map +1 -0
- package/dist/mergeRefs-BZinWopc.cjs +31 -0
- package/dist/mergeRefs-BZinWopc.cjs.map +1 -0
- package/dist/mergeRefs-BgcbK0Qy.mjs +26 -0
- package/dist/mergeRefs-BgcbK0Qy.mjs.map +1 -0
- package/dist/mixins/focus.cjs +39 -0
- package/dist/mixins/focus.cjs.map +1 -0
- package/dist/mixins/focus.d.cts +11 -0
- package/dist/mixins/focus.d.mts +11 -0
- package/dist/mixins/focus.mjs +34 -0
- package/dist/mixins/focus.mjs.map +1 -0
- package/dist/mixins/hoverable.cjs +38 -0
- package/dist/mixins/hoverable.cjs.map +1 -0
- package/dist/mixins/hoverable.d.cts +16 -0
- package/dist/mixins/hoverable.d.mts +16 -0
- package/dist/mixins/hoverable.mjs +32 -0
- package/dist/mixins/hoverable.mjs.map +1 -0
- package/dist/mixins/input.cjs +95 -0
- package/dist/mixins/input.cjs.map +1 -0
- package/dist/mixins/input.d.cts +2 -0
- package/dist/mixins/input.d.mts +2 -0
- package/dist/mixins/input.mjs +94 -0
- package/dist/mixins/input.mjs.map +1 -0
- package/dist/mixins/menuItem.cjs +110 -0
- package/dist/mixins/menuItem.cjs.map +1 -0
- package/dist/mixins/menuItem.d.cts +30 -0
- package/dist/mixins/menuItem.d.mts +31 -0
- package/dist/mixins/menuItem.mjs +109 -0
- package/dist/mixins/menuItem.mjs.map +1 -0
- package/dist/mixins/print/index.cjs +25 -0
- package/dist/mixins/print/index.cjs.map +1 -0
- package/dist/mixins/print/index.d.cts +11 -0
- package/dist/mixins/print/index.d.mts +11 -0
- package/dist/mixins/print/index.mjs +23 -0
- package/dist/mixins/print/index.mjs.map +1 -0
- package/dist/mixins/text.cjs +93 -0
- package/dist/mixins/text.cjs.map +1 -0
- package/dist/mixins/text.d.cts +2 -0
- package/dist/mixins/text.d.mts +2 -0
- package/dist/mixins/text.mjs +88 -0
- package/dist/mixins/text.mjs.map +1 -0
- package/dist/motion-DoikasqZ.mjs +7483 -0
- package/dist/motion-DoikasqZ.mjs.map +1 -0
- package/dist/motion-QW6imSxE.cjs +7488 -0
- package/dist/motion-QW6imSxE.cjs.map +1 -0
- package/dist/react.esm-C-es35jP.cjs +11441 -0
- package/dist/react.esm-C-es35jP.cjs.map +1 -0
- package/dist/react.esm-Dv1lMDRs.mjs +11397 -0
- package/dist/react.esm-Dv1lMDRs.mjs.map +1 -0
- package/dist/text-BrSUs-88.d.mts +14 -0
- package/dist/text-PmH5oc61.d.cts +14 -0
- package/dist/theme-Cadb1xzQ.d.cts +154 -0
- package/dist/theme-DGAqgnUa.d.mts +154 -0
- package/dist/theme.cjs +353 -0
- package/dist/theme.cjs.map +1 -0
- package/dist/theme.d.cts +2 -0
- package/dist/theme.d.mts +2 -0
- package/dist/theme.mjs +346 -0
- package/dist/theme.mjs.map +1 -0
- package/dist/types-DzHQ5MGm.d.mts +69 -0
- package/dist/types-N-cXznfM.d.cts +69 -0
- package/dist/useFormField-Ba0CQ43u.d.cts +30 -0
- package/dist/useFormField-BmtItl8y.d.mts +30 -0
- package/dist/useFormField-DN3gpEEV.cjs +37 -0
- package/dist/useFormField-DN3gpEEV.cjs.map +1 -0
- package/dist/useFormField-eftOPiXj.mjs +25 -0
- package/dist/useFormField-eftOPiXj.mjs.map +1 -0
- package/dist/useFormField.d.cts +2 -0
- package/dist/useFormField.d.mts +2 -0
- package/dist/useFormGroup-BMukAMAd.mjs +14 -0
- package/dist/useFormGroup-BMukAMAd.mjs.map +1 -0
- package/dist/useFormGroup-B_mFNoN9.cjs +26 -0
- package/dist/useFormGroup-B_mFNoN9.cjs.map +1 -0
- package/dist/useFormGroup.d.cts +18 -0
- package/dist/useFormGroup.d.mts +18 -0
- package/dist/useLabel-BcbghpIU.cjs +1465 -0
- package/dist/useLabel-BcbghpIU.cjs.map +1 -0
- package/dist/useLabel-DHGzNIKw.mjs +1212 -0
- package/dist/useLabel-DHGzNIKw.mjs.map +1 -0
- package/dist/useModalInsetRight.d.mts +21 -0
- package/dist/useToggle-0zLL1E7s.mjs +21 -0
- package/dist/useToggle-0zLL1E7s.mjs.map +1 -0
- package/dist/useToggle-DNrEsTpr.cjs +27 -0
- package/dist/useToggle-DNrEsTpr.cjs.map +1 -0
- package/dist/useToggle.d.mts +17 -0
- package/dist/useTruncation.d.mts +12 -0
- package/dist/utilities-C8Jf-xpi.d.cts +9 -0
- package/dist/utilities-w1K54IAy.d.mts +9 -0
- package/dist/utilities.d.cts +2 -0
- package/dist/utilities.d.mts +2 -0
- package/dist/utils/storybook.cjs +13 -0
- package/dist/utils/storybook.cjs.map +1 -0
- package/dist/utils/storybook.mjs +11 -0
- package/dist/utils/storybook.mjs.map +1 -0
- package/dist/utils/testing.cjs +50 -0
- package/dist/utils/testing.cjs.map +1 -0
- package/dist/utils/testing.d.cts +370 -0
- package/dist/utils/testing.d.mts +370 -0
- package/dist/utils/testing.mjs +45 -0
- package/dist/utils/testing.mjs.map +1 -0
- package/dist/variables/color.cjs +23 -0
- package/dist/variables/color.cjs.map +1 -0
- package/dist/variables/color.d.cts +19 -0
- package/dist/variables/color.d.mts +19 -0
- package/dist/variables/color.mjs +21 -0
- package/dist/variables/color.mjs.map +1 -0
- package/dist/variables/effect.cjs +27 -0
- package/dist/variables/effect.cjs.map +1 -0
- package/dist/variables/effect.d.cts +21 -0
- package/dist/variables/effect.d.mts +21 -0
- package/dist/variables/effect.mjs +24 -0
- package/dist/variables/effect.mjs.map +1 -0
- package/dist/variables/keyframes.cjs +22 -0
- package/dist/variables/keyframes.cjs.map +1 -0
- package/dist/variables/keyframes.d.cts +8 -0
- package/dist/variables/keyframes.d.mts +8 -0
- package/dist/variables/keyframes.mjs +19 -0
- package/dist/variables/keyframes.mjs.map +1 -0
- package/dist/variables/spacing.cjs +11 -0
- package/dist/variables/spacing.cjs.map +1 -0
- package/dist/variables/spacing.d.cts +8 -0
- package/dist/variables/spacing.d.mts +8 -0
- package/dist/variables/spacing.mjs +9 -0
- package/dist/variables/spacing.mjs.map +1 -0
- package/dist/variables/text.cjs +14 -0
- package/dist/variables/text.cjs.map +1 -0
- package/dist/variables/text.d.cts +10 -0
- package/dist/variables/text.d.mts +10 -0
- package/dist/variables/text.mjs +12 -0
- package/dist/variables/text.mjs.map +1 -0
- package/dist/variables/transitions.cjs +25 -0
- package/dist/variables/transitions.cjs.map +1 -0
- package/dist/variables/transitions.d.cts +19 -0
- package/dist/variables/transitions.d.mts +19 -0
- package/dist/variables/transitions.mjs +22 -0
- package/dist/variables/transitions.mjs.map +1 -0
- package/package.json +781 -0
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
//#region \0rolldown/runtime.js
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __esmMin = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
9
|
+
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
|
|
10
|
+
var __exportAll = (all, no_symbols) => {
|
|
11
|
+
let target = {};
|
|
12
|
+
for (var name in all) __defProp(target, name, {
|
|
13
|
+
get: all[name],
|
|
14
|
+
enumerable: true
|
|
15
|
+
});
|
|
16
|
+
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
17
|
+
return target;
|
|
18
|
+
};
|
|
19
|
+
var __copyProps = (to, from, except, desc) => {
|
|
20
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
21
|
+
key = keys[i];
|
|
22
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
23
|
+
get: ((k) => from[k]).bind(null, key),
|
|
24
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
return to;
|
|
28
|
+
};
|
|
29
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
30
|
+
value: mod,
|
|
31
|
+
enumerable: true
|
|
32
|
+
}) : target, mod));
|
|
33
|
+
var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["module.exports"] : __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
34
|
+
//#endregion
|
|
35
|
+
Object.defineProperty(exports, "__commonJSMin", {
|
|
36
|
+
enumerable: true,
|
|
37
|
+
get: function() {
|
|
38
|
+
return __commonJSMin;
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
Object.defineProperty(exports, "__esmMin", {
|
|
42
|
+
enumerable: true,
|
|
43
|
+
get: function() {
|
|
44
|
+
return __esmMin;
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
Object.defineProperty(exports, "__exportAll", {
|
|
48
|
+
enumerable: true,
|
|
49
|
+
get: function() {
|
|
50
|
+
return __exportAll;
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
Object.defineProperty(exports, "__toCommonJS", {
|
|
54
|
+
enumerable: true,
|
|
55
|
+
get: function() {
|
|
56
|
+
return __toCommonJS;
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
Object.defineProperty(exports, "__toESM", {
|
|
60
|
+
enumerable: true,
|
|
61
|
+
get: function() {
|
|
62
|
+
return __toESM;
|
|
63
|
+
}
|
|
64
|
+
});
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
Object.defineProperties(exports, {
|
|
2
|
+
__esModule: { value: true },
|
|
3
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
4
|
+
});
|
|
5
|
+
const require_chunk = require("../../chunk-CoPdw6nB.cjs");
|
|
6
|
+
const require_Text = require("../../Text-DVz8erdF.cjs");
|
|
7
|
+
const require_Tooltip = require("../../Tooltip-0i_15ysU.cjs");
|
|
8
|
+
const require_IconButton = require("../../IconButton-B1ZL8BqW.cjs");
|
|
9
|
+
const require_Sticker = require("../../Sticker-D_dutvp_.cjs");
|
|
10
|
+
let _persona_design_tokens = require("@persona/design-tokens");
|
|
11
|
+
let styled_components = require("styled-components");
|
|
12
|
+
styled_components = require_chunk.__toESM(styled_components);
|
|
13
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
14
|
+
let react = require("react");
|
|
15
|
+
let _persona_icons = require("@persona/icons");
|
|
16
|
+
let lodash = require("lodash");
|
|
17
|
+
let lodash_fp_js = require("lodash/fp.js");
|
|
18
|
+
let react_aria = require("react-aria");
|
|
19
|
+
let react_stately = require("react-stately");
|
|
20
|
+
//#region components/Attribute/Attribute.tsx
|
|
21
|
+
const AttributeContext = (0, react.createContext)({});
|
|
22
|
+
const IconButtonContainer = (0, styled_components.default)(require_IconButton.IconButton)`
|
|
23
|
+
display: inline-flex;
|
|
24
|
+
align-items: center;
|
|
25
|
+
justify-content: center;
|
|
26
|
+
|
|
27
|
+
svg {
|
|
28
|
+
transition-duration: 150ms;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
:hover {
|
|
32
|
+
svg {
|
|
33
|
+
color: ${_persona_design_tokens.Color.CorePurple800};
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
`;
|
|
37
|
+
const Value = styled_components.default.dd`
|
|
38
|
+
${({ size }) => size === "sm" ? _persona_design_tokens.Typography.TextSmall : _persona_design_tokens.Typography.TextMedium};
|
|
39
|
+
color: ${({ isPlaceholder }) => isPlaceholder ? _persona_design_tokens.Color.TextSecondary : _persona_design_tokens.Color.CoreSlate1000};
|
|
40
|
+
margin: 0;
|
|
41
|
+
text-overflow: ellipsis;
|
|
42
|
+
overflow-x: hidden;
|
|
43
|
+
word-break: ${({ wordBreak }) => wordBreak ? wordBreak : "normal"};
|
|
44
|
+
|
|
45
|
+
ul,
|
|
46
|
+
ol {
|
|
47
|
+
list-style-position: inside;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
a {
|
|
51
|
+
color: ${({ theme }) => theme.color.text.brand};
|
|
52
|
+
text-decoration: none;
|
|
53
|
+
|
|
54
|
+
&:visited {
|
|
55
|
+
color: ${({ theme }) => theme.color.text.brand};
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
`;
|
|
59
|
+
const AttributeValue = ({ placeholder, show, redacted, value, wordBreak, size, id, "aria-labelledby": ariaLabelledBy }) => {
|
|
60
|
+
const isEmpty = value == null || value === "";
|
|
61
|
+
const renderedVal = isEmpty ? placeholder : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, { children: !show ? (0, lodash.repeat)("•", typeof value === "string" ? value.length : 8) : value });
|
|
62
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Value, {
|
|
63
|
+
isPlaceholder: isEmpty,
|
|
64
|
+
wordBreak,
|
|
65
|
+
size,
|
|
66
|
+
title: typeof value === "string" ? value : void 0,
|
|
67
|
+
"aria-labelledby": ariaLabelledBy,
|
|
68
|
+
id,
|
|
69
|
+
children: redacted ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Sticker.Sticker, {
|
|
70
|
+
id,
|
|
71
|
+
children: "Redacted"
|
|
72
|
+
}) : renderedVal
|
|
73
|
+
});
|
|
74
|
+
};
|
|
75
|
+
const AttributeContainer = (0, styled_components.default)("div")`
|
|
76
|
+
${({ table, size }) => table && styled_components.css`
|
|
77
|
+
display: table-row;
|
|
78
|
+
|
|
79
|
+
> * {
|
|
80
|
+
display: table-cell;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
& > ${AttributeLabel} {
|
|
84
|
+
padding: ${_persona_design_tokens.Spacing[1]} 0;
|
|
85
|
+
padding-right: ${size === "sm" ? _persona_design_tokens.Spacing[2] : _persona_design_tokens.Spacing[3]};
|
|
86
|
+
}
|
|
87
|
+
& > ${Value} {
|
|
88
|
+
padding: ${size === "sm" ? _persona_design_tokens.Spacing[1] : _persona_design_tokens.Spacing[2]} 0;
|
|
89
|
+
}
|
|
90
|
+
`}
|
|
91
|
+
|
|
92
|
+
${({ horizontal }) => horizontal && styled_components.css`
|
|
93
|
+
display: grid;
|
|
94
|
+
gap: ${_persona_design_tokens.Spacing[4]};
|
|
95
|
+
grid-template-columns: subgrid;
|
|
96
|
+
grid-column: span 2;
|
|
97
|
+
`}
|
|
98
|
+
`;
|
|
99
|
+
const AttributeLabel = (0, styled_components.default)(require_Text.Paragraph).attrs((props) => ({
|
|
100
|
+
size: props.size ?? "md",
|
|
101
|
+
color: "tertiary",
|
|
102
|
+
as: "dt"
|
|
103
|
+
}))`
|
|
104
|
+
margin: 0;
|
|
105
|
+
overflow-wrap: break-word;
|
|
106
|
+
`;
|
|
107
|
+
const RightContainer = styled_components.default.span`
|
|
108
|
+
display: inline-block;
|
|
109
|
+
vertical-align: middle;
|
|
110
|
+
margin-left: ${_persona_design_tokens.Spacing[2]};
|
|
111
|
+
`;
|
|
112
|
+
const Attribute = ({ label, value, redacted, placeholder = "-", wordBreak, labelComponent: LabelComponent = AttributeLabel, valueComponent: ValueComponent = AttributeValue, right, helpText, toggleable, table, ...elemProps }) => {
|
|
113
|
+
const attrCtx = (0, react.useContext)(AttributeContext);
|
|
114
|
+
const size = attrCtx?.size ?? "md";
|
|
115
|
+
const toggleRef = (0, react.useRef)();
|
|
116
|
+
const valueAsArray = [].concat(value).filter(Boolean);
|
|
117
|
+
const showToggleButton = toggleable && !redacted && valueAsArray.length > 0;
|
|
118
|
+
const state = (0, react_stately.useToggleState)({ defaultSelected: !toggleable });
|
|
119
|
+
const { buttonProps } = (0, react_aria.useToggleButton)({
|
|
120
|
+
"aria-label": state.isSelected ? `Hide ${label} value` : `Show ${label} value`,
|
|
121
|
+
elementType: "button"
|
|
122
|
+
}, state, toggleRef);
|
|
123
|
+
const labelId = (0, react.useMemo)(() => (0, lodash_fp_js.uniqueId)("pds_attribute_label__"), []);
|
|
124
|
+
const valueId = (0, react.useMemo)(() => (0, lodash_fp_js.uniqueId)("pds_attribute_value__"), []);
|
|
125
|
+
const show = state.isSelected;
|
|
126
|
+
(0, react.useEffect)(() => {
|
|
127
|
+
state.setSelected(!toggleable);
|
|
128
|
+
}, [toggleable]);
|
|
129
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(AttributeContainer, {
|
|
130
|
+
table: table || attrCtx?.table,
|
|
131
|
+
horizontal: attrCtx?.horizontal,
|
|
132
|
+
size,
|
|
133
|
+
...elemProps,
|
|
134
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(LabelComponent, {
|
|
135
|
+
id: labelId,
|
|
136
|
+
"aria-details": valueId,
|
|
137
|
+
size,
|
|
138
|
+
children: [
|
|
139
|
+
label,
|
|
140
|
+
helpText && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RightContainer, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Tooltip.HelperTooltip, {
|
|
141
|
+
size: "sm",
|
|
142
|
+
children: helpText
|
|
143
|
+
}) }),
|
|
144
|
+
showToggleButton && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RightContainer, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconButtonContainer, {
|
|
145
|
+
...buttonProps,
|
|
146
|
+
ref: toggleRef,
|
|
147
|
+
children: show ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_persona_icons.EyeIcon, {}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_persona_icons.EyeOffIcon, {})
|
|
148
|
+
}) }),
|
|
149
|
+
right && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RightContainer, { children: right })
|
|
150
|
+
]
|
|
151
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ValueComponent, {
|
|
152
|
+
id: valueId,
|
|
153
|
+
value,
|
|
154
|
+
placeholder,
|
|
155
|
+
wordBreak,
|
|
156
|
+
redacted,
|
|
157
|
+
show,
|
|
158
|
+
size,
|
|
159
|
+
"aria-labelledby": labelId
|
|
160
|
+
})]
|
|
161
|
+
});
|
|
162
|
+
};
|
|
163
|
+
//#endregion
|
|
164
|
+
//#region components/Attribute/AttributeGrid.tsx
|
|
165
|
+
const AttributeGridComponent = styled_components.default.dl`
|
|
166
|
+
${({ colCount, table, horizontal, size }) => table ? styled_components.css`
|
|
167
|
+
display: table;
|
|
168
|
+
${table === "full-width" && styled_components.css`
|
|
169
|
+
width: 100%;
|
|
170
|
+
table-layout: fixed;
|
|
171
|
+
border-spacing: 0 ${size === "sm" ? _persona_design_tokens.Spacing[1] : _persona_design_tokens.Spacing[2]};
|
|
172
|
+
`};
|
|
173
|
+
` : styled_components.css`
|
|
174
|
+
display: grid;
|
|
175
|
+
gap: ${size === "sm" ? _persona_design_tokens.Spacing[2] : _persona_design_tokens.Spacing[4]};
|
|
176
|
+
/* If the layout is horizontal we guarentee an even number of columns */
|
|
177
|
+
grid-template-columns: ${colCount ? `repeat(${colCount}, ${horizontal ? "1fr 2fr" : "1fr"})` : `repeat(auto-fit, ${horizontal ? "minmax(120px, 1fr) minmax(225px, 2fr)" : "minmax(225px, 1fr)"})`};
|
|
178
|
+
`}
|
|
179
|
+
margin: 0;
|
|
180
|
+
|
|
181
|
+
& + & {
|
|
182
|
+
padding-bottom: ${_persona_design_tokens.Spacing[5]};
|
|
183
|
+
}
|
|
184
|
+
`;
|
|
185
|
+
const AttributeGrid = ({ children, horizontal, table, size, ...props }) => {
|
|
186
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(AttributeGridComponent, {
|
|
187
|
+
table,
|
|
188
|
+
horizontal,
|
|
189
|
+
size,
|
|
190
|
+
...props,
|
|
191
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(AttributeContext.Provider, {
|
|
192
|
+
value: {
|
|
193
|
+
horizontal,
|
|
194
|
+
table,
|
|
195
|
+
size
|
|
196
|
+
},
|
|
197
|
+
children
|
|
198
|
+
})
|
|
199
|
+
});
|
|
200
|
+
};
|
|
201
|
+
//#endregion
|
|
202
|
+
exports.Attribute = Attribute;
|
|
203
|
+
exports.AttributeContext = AttributeContext;
|
|
204
|
+
exports.AttributeGrid = AttributeGrid;
|
|
205
|
+
exports.AttributeLabel = AttributeLabel;
|
|
206
|
+
exports.AttributeValue = AttributeValue;
|
|
207
|
+
exports.IconButtonContainer = IconButtonContainer;
|
|
208
|
+
exports.default = Attribute;
|
|
209
|
+
|
|
210
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["IconButton","Color","Typography","Sticker","Spacing","Paragraph","HelperTooltip","EyeIcon","EyeOffIcon","Spacing"],"sources":["../../../components/Attribute/Attribute.tsx","../../../components/Attribute/AttributeGrid.tsx"],"sourcesContent":["import { Color, Spacing, Typography } from '@persona/design-tokens';\nimport { EyeIcon, EyeOffIcon } from '@persona/icons';\nimport { repeat } from 'lodash';\nimport { uniqueId } from 'lodash/fp';\nimport {\n type ComponentPropsWithoutRef,\n type ComponentType,\n createContext,\n type FC,\n type PropsWithChildren,\n type ReactNode,\n useContext,\n useEffect,\n useMemo,\n useRef,\n} from 'react';\nimport { useToggleButton } from 'react-aria';\nimport { useToggleState } from 'react-stately';\nimport styled, { css } from 'styled-components';\n\nimport IconButton from 'design-system/components/Button/IconButton';\nimport Sticker from 'design-system/components/Sticker';\nimport { Paragraph } from 'design-system/components/Text';\nimport { HelperTooltip } from 'design-system/components/Tooltip';\nimport type { ParagraphSize } from 'design-system/mixins/text';\n\nexport type WordBreak = 'break-all' | 'break-word' | 'normal';\nexport type TextTransform = 'capitalize' | 'sentence';\nexport type TableLayoutValue = boolean | 'full-width';\n\nexport type AttributeSize = 'sm' | 'md';\n\nexport const AttributeContext = createContext<{\n table?: TableLayoutValue;\n horizontal?: boolean;\n size?: AttributeSize;\n}>({});\n\n// TODO: Create Toggle Button component\nexport const IconButtonContainer = styled(IconButton)`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n\n svg {\n transition-duration: 150ms;\n }\n\n :hover {\n svg {\n color: ${Color.CorePurple800};\n }\n }\n`;\n\ninterface AttributeValueProps {\n placeholder: ReactNode;\n show?: boolean;\n redacted?: boolean;\n value?: ReactNode;\n textTransform?: TextTransform;\n wordBreak?: WordBreak;\n size?: AttributeSize;\n 'aria-labelledby': string;\n id: string;\n}\n\ninterface ValueFormatterProps {\n isPlaceholder?: boolean;\n wordBreak?: WordBreak;\n size?: AttributeSize;\n}\n\nconst Value = styled.dd<ValueFormatterProps>`\n ${({ size }) => (size === 'sm' ? Typography.TextSmall : Typography.TextMedium)};\n color: ${({ isPlaceholder }) => (isPlaceholder ? Color.TextSecondary : Color.CoreSlate1000)};\n margin: 0;\n text-overflow: ellipsis;\n overflow-x: hidden;\n word-break: ${({ wordBreak }) => (wordBreak ? wordBreak : 'normal')};\n\n ul,\n ol {\n list-style-position: inside;\n }\n\n a {\n color: ${({ theme }) => theme.color.text.brand};\n text-decoration: none;\n\n &:visited {\n color: ${({ theme }) => theme.color.text.brand};\n }\n }\n`;\n\nexport const AttributeValue = ({\n placeholder,\n show,\n redacted,\n value,\n wordBreak,\n size,\n id,\n 'aria-labelledby': ariaLabelledBy,\n}: AttributeValueProps) => {\n const isEmpty = value == null || value === '';\n\n const renderedVal = isEmpty ? (\n placeholder\n ) : (\n <>{!show ? repeat('•', typeof value === 'string' ? value.length : 8) : value}</>\n );\n\n return (\n <Value\n isPlaceholder={isEmpty}\n wordBreak={wordBreak}\n size={size}\n title={typeof value === 'string' ? value : undefined}\n aria-labelledby={ariaLabelledBy}\n id={id}\n >\n {redacted ? <Sticker id={id}>Redacted</Sticker> : renderedVal}\n </Value>\n );\n};\n\nexport interface AttributeProps extends ComponentPropsWithoutRef<'div'> {\n /**\n * Title of the attribute. Rendered as a <dt>.\n */\n label: ReactNode;\n\n /**\n * Value to display. Rendered as a <dd>.\n */\n value?: ReactNode;\n\n /**\n * Will display a \"Redacted\" sticker if there is a value.\n */\n redacted?: boolean;\n\n /**\n * Renders toggleable eye button to the right of the label\n */\n toggleable?: boolean;\n\n /**\n * Text to display in presence of null value.\n */\n placeholder?: string;\n\n /**\n * Word break styling for value.\n */\n wordBreak?: WordBreak;\n\n /**\n * Render a custom label component\n */\n labelComponent?: FC<PropsWithChildren<{ id: string; size?: ParagraphSize }>>;\n\n /**\n * Render a custom value component\n */\n valueComponent?: ComponentType<AttributeValueProps>;\n\n /**\n * Renders a HelperTooltip to display help text to the right of the label.\n */\n helpText?: ReactNode;\n\n /**\n * Custom adornments to display to the right of the label.\n */\n right?: ReactNode;\n\n /**\n * Renders attributes in a tabular layout.\n */\n table?: TableLayoutValue;\n}\n\ntype AttributeContainerProps = {\n horizontal?: boolean;\n table?: TableLayoutValue;\n size?: AttributeSize;\n};\nconst AttributeContainer = styled('div')<AttributeContainerProps>`\n ${({ table, size }) =>\n table &&\n css`\n display: table-row;\n\n > * {\n display: table-cell;\n }\n\n & > ${AttributeLabel} {\n padding: ${Spacing[1]} 0;\n padding-right: ${size === 'sm' ? Spacing[2] : Spacing[3]};\n }\n & > ${Value} {\n padding: ${size === 'sm' ? Spacing[1] : Spacing[2]} 0;\n }\n `}\n\n ${({ horizontal }) =>\n horizontal &&\n css`\n display: grid;\n gap: ${Spacing[4]};\n grid-template-columns: subgrid;\n grid-column: span 2;\n `}\n`;\n\nexport const AttributeLabel = styled(Paragraph).attrs<{ size?: ParagraphSize }>((props) => ({\n size: props.size ?? 'md',\n color: 'tertiary',\n as: 'dt',\n}))`\n margin: 0;\n overflow-wrap: break-word;\n`;\n\nconst RightContainer = styled.span`\n display: inline-block;\n vertical-align: middle;\n margin-left: ${Spacing[2]};\n`;\n\nexport const Attribute = ({\n label,\n value,\n redacted,\n placeholder = '-',\n wordBreak,\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n labelComponent: LabelComponent = AttributeLabel,\n valueComponent: ValueComponent = AttributeValue,\n right,\n helpText,\n toggleable,\n table,\n ...elemProps\n}: AttributeProps) => {\n const attrCtx = useContext(AttributeContext);\n const size = attrCtx?.size ?? 'md';\n const toggleRef = useRef();\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n const valueAsArray = [].concat(value).filter(Boolean);\n const showToggleButton = toggleable && !redacted && valueAsArray.length > 0;\n const state = useToggleState({ defaultSelected: !toggleable });\n const { buttonProps } = useToggleButton(\n {\n 'aria-label': state.isSelected ? `Hide ${label} value` : `Show ${label} value`,\n elementType: 'button',\n },\n state,\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n toggleRef,\n );\n const labelId = useMemo(() => uniqueId('pds_attribute_label__'), []);\n const valueId = useMemo(() => uniqueId('pds_attribute_value__'), []);\n const show = state.isSelected;\n\n useEffect(() => {\n state.setSelected(!toggleable);\n }, [toggleable]);\n\n return (\n <AttributeContainer\n table={table || attrCtx?.table}\n horizontal={attrCtx?.horizontal}\n size={size}\n {...elemProps}\n >\n <LabelComponent id={labelId} aria-details={valueId} size={size}>\n {label}\n {helpText && (\n <RightContainer>\n <HelperTooltip size='sm'>{helpText}</HelperTooltip>\n </RightContainer>\n )}\n {showToggleButton && (\n <RightContainer>\n {/* @ts-expect-error [strict-migration] The following line is not strict; please fix! */}\n <IconButtonContainer {...buttonProps} ref={toggleRef}>\n {show ? <EyeIcon /> : <EyeOffIcon />}\n </IconButtonContainer>\n </RightContainer>\n )}\n {right && <RightContainer>{right}</RightContainer>}\n </LabelComponent>\n <ValueComponent\n id={valueId}\n value={value}\n placeholder={placeholder}\n wordBreak={wordBreak}\n redacted={redacted}\n show={show}\n size={size}\n aria-labelledby={labelId}\n />\n </AttributeContainer>\n );\n};\n\nexport default Attribute;\n","import { Spacing } from '@persona/design-tokens';\nimport type { ReactNode } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport { AttributeContext, type AttributeSize, type TableLayoutValue } from './Attribute';\n\ntype AttributeGridProps = {\n children?: ReactNode;\n /**\n * Sets the font size and spacing density for all child Attributes.\n * Defaults to `'md'`.\n */\n size?: AttributeSize;\n} & (\n | {\n /**\n * Set a fixed number of columns for the grid.\n */\n colCount?: number;\n /**\n * Display attributes in a stacked list with label first then value.\n */\n horizontal?: boolean;\n\n table?: never;\n }\n | {\n /**\n * Display attributes in a fixed tabular layout.\n * Set to `full-width` to expand to full width of container.\n */\n table?: TableLayoutValue;\n\n colCount?: never;\n horizontal?: never;\n }\n);\n\ntype AttributeGridComponentProps = {\n colCount?: number;\n horizontal?: boolean;\n table?: TableLayoutValue;\n size?: AttributeSize;\n};\nconst AttributeGridComponent = styled.dl<AttributeGridComponentProps>`\n ${({ colCount, table, horizontal, size }) =>\n table\n ? css`\n display: table;\n ${\n table === 'full-width' &&\n css`\n width: 100%;\n table-layout: fixed;\n border-spacing: 0 ${size === 'sm' ? Spacing[1] : Spacing[2]};\n `\n };\n `\n : css`\n display: grid;\n gap: ${size === 'sm' ? Spacing[2] : Spacing[4]};\n /* If the layout is horizontal we guarentee an even number of columns */\n grid-template-columns: ${\n colCount\n ? `repeat(${colCount}, ${horizontal ? '1fr 2fr' : '1fr'})`\n : `repeat(auto-fit, ${horizontal ? 'minmax(120px, 1fr) minmax(225px, 2fr)' : 'minmax(225px, 1fr)'})`\n };\n `}\n margin: 0;\n\n & + & {\n padding-bottom: ${Spacing[5]};\n }\n`;\n\nconst AttributeGrid = ({ children, horizontal, table, size, ...props }: AttributeGridProps) => {\n return (\n <AttributeGridComponent table={table} horizontal={horizontal} size={size} {...props}>\n <AttributeContext.Provider value={{ horizontal, table, size }}>\n {children}\n </AttributeContext.Provider>\n </AttributeGridComponent>\n );\n};\n\nexport default AttributeGrid;\n"],"mappings":"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"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { Attribute, AttributeContext, AttributeLabel, AttributeProps, AttributeSize, AttributeValue, IconButtonContainer, TableLayoutValue, TextTransform, WordBreak } from "../../Attribute.cjs";
|
|
2
|
+
import AttributeGrid from "../../AttributeGrid.cjs";
|
|
3
|
+
export { Attribute, Attribute as default, AttributeContext, AttributeGrid, AttributeLabel, AttributeProps, AttributeSize, AttributeValue, IconButtonContainer, TableLayoutValue, TextTransform, WordBreak };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { Attribute, AttributeContext, AttributeLabel, AttributeProps, AttributeSize, AttributeValue, IconButtonContainer, TableLayoutValue, TextTransform, WordBreak } from "../../Attribute.mjs";
|
|
2
|
+
import AttributeGrid from "../../AttributeGrid.mjs";
|
|
3
|
+
export { Attribute, Attribute as default, AttributeContext, AttributeGrid, AttributeLabel, AttributeProps, AttributeSize, AttributeValue, IconButtonContainer, TableLayoutValue, TextTransform, WordBreak };
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import { i as Paragraph } from "../../Text-DOTYjIt0.mjs";
|
|
2
|
+
import { r as HelperTooltip } from "../../Tooltip-T7RQpy_a.mjs";
|
|
3
|
+
import { t as IconButton } from "../../IconButton-C28qxOdi.mjs";
|
|
4
|
+
import { n as Sticker } from "../../Sticker-D6bwBTGr.mjs";
|
|
5
|
+
import { Color, Spacing, Typography } from "@persona/design-tokens";
|
|
6
|
+
import styled, { css } from "styled-components";
|
|
7
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
import { createContext, useContext, useEffect, useMemo, useRef } from "react";
|
|
9
|
+
import { EyeIcon, EyeOffIcon } from "@persona/icons";
|
|
10
|
+
import { repeat } from "lodash";
|
|
11
|
+
import { uniqueId as uniqueId$1 } from "lodash/fp.js";
|
|
12
|
+
import { useToggleButton } from "react-aria";
|
|
13
|
+
import { useToggleState } from "react-stately";
|
|
14
|
+
//#region components/Attribute/Attribute.tsx
|
|
15
|
+
const AttributeContext = createContext({});
|
|
16
|
+
const IconButtonContainer = styled(IconButton)`
|
|
17
|
+
display: inline-flex;
|
|
18
|
+
align-items: center;
|
|
19
|
+
justify-content: center;
|
|
20
|
+
|
|
21
|
+
svg {
|
|
22
|
+
transition-duration: 150ms;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
:hover {
|
|
26
|
+
svg {
|
|
27
|
+
color: ${Color.CorePurple800};
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
`;
|
|
31
|
+
const Value = styled.dd`
|
|
32
|
+
${({ size }) => size === "sm" ? Typography.TextSmall : Typography.TextMedium};
|
|
33
|
+
color: ${({ isPlaceholder }) => isPlaceholder ? Color.TextSecondary : Color.CoreSlate1000};
|
|
34
|
+
margin: 0;
|
|
35
|
+
text-overflow: ellipsis;
|
|
36
|
+
overflow-x: hidden;
|
|
37
|
+
word-break: ${({ wordBreak }) => wordBreak ? wordBreak : "normal"};
|
|
38
|
+
|
|
39
|
+
ul,
|
|
40
|
+
ol {
|
|
41
|
+
list-style-position: inside;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
a {
|
|
45
|
+
color: ${({ theme }) => theme.color.text.brand};
|
|
46
|
+
text-decoration: none;
|
|
47
|
+
|
|
48
|
+
&:visited {
|
|
49
|
+
color: ${({ theme }) => theme.color.text.brand};
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
`;
|
|
53
|
+
const AttributeValue = ({ placeholder, show, redacted, value, wordBreak, size, id, "aria-labelledby": ariaLabelledBy }) => {
|
|
54
|
+
const isEmpty = value == null || value === "";
|
|
55
|
+
const renderedVal = isEmpty ? placeholder : /* @__PURE__ */ jsx(Fragment, { children: !show ? repeat("•", typeof value === "string" ? value.length : 8) : value });
|
|
56
|
+
return /* @__PURE__ */ jsx(Value, {
|
|
57
|
+
isPlaceholder: isEmpty,
|
|
58
|
+
wordBreak,
|
|
59
|
+
size,
|
|
60
|
+
title: typeof value === "string" ? value : void 0,
|
|
61
|
+
"aria-labelledby": ariaLabelledBy,
|
|
62
|
+
id,
|
|
63
|
+
children: redacted ? /* @__PURE__ */ jsx(Sticker, {
|
|
64
|
+
id,
|
|
65
|
+
children: "Redacted"
|
|
66
|
+
}) : renderedVal
|
|
67
|
+
});
|
|
68
|
+
};
|
|
69
|
+
const AttributeContainer = styled("div")`
|
|
70
|
+
${({ table, size }) => table && css`
|
|
71
|
+
display: table-row;
|
|
72
|
+
|
|
73
|
+
> * {
|
|
74
|
+
display: table-cell;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
& > ${AttributeLabel} {
|
|
78
|
+
padding: ${Spacing[1]} 0;
|
|
79
|
+
padding-right: ${size === "sm" ? Spacing[2] : Spacing[3]};
|
|
80
|
+
}
|
|
81
|
+
& > ${Value} {
|
|
82
|
+
padding: ${size === "sm" ? Spacing[1] : Spacing[2]} 0;
|
|
83
|
+
}
|
|
84
|
+
`}
|
|
85
|
+
|
|
86
|
+
${({ horizontal }) => horizontal && css`
|
|
87
|
+
display: grid;
|
|
88
|
+
gap: ${Spacing[4]};
|
|
89
|
+
grid-template-columns: subgrid;
|
|
90
|
+
grid-column: span 2;
|
|
91
|
+
`}
|
|
92
|
+
`;
|
|
93
|
+
const AttributeLabel = styled(Paragraph).attrs((props) => ({
|
|
94
|
+
size: props.size ?? "md",
|
|
95
|
+
color: "tertiary",
|
|
96
|
+
as: "dt"
|
|
97
|
+
}))`
|
|
98
|
+
margin: 0;
|
|
99
|
+
overflow-wrap: break-word;
|
|
100
|
+
`;
|
|
101
|
+
const RightContainer = styled.span`
|
|
102
|
+
display: inline-block;
|
|
103
|
+
vertical-align: middle;
|
|
104
|
+
margin-left: ${Spacing[2]};
|
|
105
|
+
`;
|
|
106
|
+
const Attribute = ({ label, value, redacted, placeholder = "-", wordBreak, labelComponent: LabelComponent = AttributeLabel, valueComponent: ValueComponent = AttributeValue, right, helpText, toggleable, table, ...elemProps }) => {
|
|
107
|
+
const attrCtx = useContext(AttributeContext);
|
|
108
|
+
const size = attrCtx?.size ?? "md";
|
|
109
|
+
const toggleRef = useRef();
|
|
110
|
+
const valueAsArray = [].concat(value).filter(Boolean);
|
|
111
|
+
const showToggleButton = toggleable && !redacted && valueAsArray.length > 0;
|
|
112
|
+
const state = useToggleState({ defaultSelected: !toggleable });
|
|
113
|
+
const { buttonProps } = useToggleButton({
|
|
114
|
+
"aria-label": state.isSelected ? `Hide ${label} value` : `Show ${label} value`,
|
|
115
|
+
elementType: "button"
|
|
116
|
+
}, state, toggleRef);
|
|
117
|
+
const labelId = useMemo(() => uniqueId$1("pds_attribute_label__"), []);
|
|
118
|
+
const valueId = useMemo(() => uniqueId$1("pds_attribute_value__"), []);
|
|
119
|
+
const show = state.isSelected;
|
|
120
|
+
useEffect(() => {
|
|
121
|
+
state.setSelected(!toggleable);
|
|
122
|
+
}, [toggleable]);
|
|
123
|
+
return /* @__PURE__ */ jsxs(AttributeContainer, {
|
|
124
|
+
table: table || attrCtx?.table,
|
|
125
|
+
horizontal: attrCtx?.horizontal,
|
|
126
|
+
size,
|
|
127
|
+
...elemProps,
|
|
128
|
+
children: [/* @__PURE__ */ jsxs(LabelComponent, {
|
|
129
|
+
id: labelId,
|
|
130
|
+
"aria-details": valueId,
|
|
131
|
+
size,
|
|
132
|
+
children: [
|
|
133
|
+
label,
|
|
134
|
+
helpText && /* @__PURE__ */ jsx(RightContainer, { children: /* @__PURE__ */ jsx(HelperTooltip, {
|
|
135
|
+
size: "sm",
|
|
136
|
+
children: helpText
|
|
137
|
+
}) }),
|
|
138
|
+
showToggleButton && /* @__PURE__ */ jsx(RightContainer, { children: /* @__PURE__ */ jsx(IconButtonContainer, {
|
|
139
|
+
...buttonProps,
|
|
140
|
+
ref: toggleRef,
|
|
141
|
+
children: show ? /* @__PURE__ */ jsx(EyeIcon, {}) : /* @__PURE__ */ jsx(EyeOffIcon, {})
|
|
142
|
+
}) }),
|
|
143
|
+
right && /* @__PURE__ */ jsx(RightContainer, { children: right })
|
|
144
|
+
]
|
|
145
|
+
}), /* @__PURE__ */ jsx(ValueComponent, {
|
|
146
|
+
id: valueId,
|
|
147
|
+
value,
|
|
148
|
+
placeholder,
|
|
149
|
+
wordBreak,
|
|
150
|
+
redacted,
|
|
151
|
+
show,
|
|
152
|
+
size,
|
|
153
|
+
"aria-labelledby": labelId
|
|
154
|
+
})]
|
|
155
|
+
});
|
|
156
|
+
};
|
|
157
|
+
//#endregion
|
|
158
|
+
//#region components/Attribute/AttributeGrid.tsx
|
|
159
|
+
const AttributeGridComponent = styled.dl`
|
|
160
|
+
${({ colCount, table, horizontal, size }) => table ? css`
|
|
161
|
+
display: table;
|
|
162
|
+
${table === "full-width" && css`
|
|
163
|
+
width: 100%;
|
|
164
|
+
table-layout: fixed;
|
|
165
|
+
border-spacing: 0 ${size === "sm" ? Spacing[1] : Spacing[2]};
|
|
166
|
+
`};
|
|
167
|
+
` : css`
|
|
168
|
+
display: grid;
|
|
169
|
+
gap: ${size === "sm" ? Spacing[2] : Spacing[4]};
|
|
170
|
+
/* If the layout is horizontal we guarentee an even number of columns */
|
|
171
|
+
grid-template-columns: ${colCount ? `repeat(${colCount}, ${horizontal ? "1fr 2fr" : "1fr"})` : `repeat(auto-fit, ${horizontal ? "minmax(120px, 1fr) minmax(225px, 2fr)" : "minmax(225px, 1fr)"})`};
|
|
172
|
+
`}
|
|
173
|
+
margin: 0;
|
|
174
|
+
|
|
175
|
+
& + & {
|
|
176
|
+
padding-bottom: ${Spacing[5]};
|
|
177
|
+
}
|
|
178
|
+
`;
|
|
179
|
+
const AttributeGrid = ({ children, horizontal, table, size, ...props }) => {
|
|
180
|
+
return /* @__PURE__ */ jsx(AttributeGridComponent, {
|
|
181
|
+
table,
|
|
182
|
+
horizontal,
|
|
183
|
+
size,
|
|
184
|
+
...props,
|
|
185
|
+
children: /* @__PURE__ */ jsx(AttributeContext.Provider, {
|
|
186
|
+
value: {
|
|
187
|
+
horizontal,
|
|
188
|
+
table,
|
|
189
|
+
size
|
|
190
|
+
},
|
|
191
|
+
children
|
|
192
|
+
})
|
|
193
|
+
});
|
|
194
|
+
};
|
|
195
|
+
//#endregion
|
|
196
|
+
export { Attribute, Attribute as default, AttributeContext, AttributeGrid, AttributeLabel, AttributeValue, IconButtonContainer };
|
|
197
|
+
|
|
198
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["uniqueId"],"sources":["../../../components/Attribute/Attribute.tsx","../../../components/Attribute/AttributeGrid.tsx"],"sourcesContent":["import { Color, Spacing, Typography } from '@persona/design-tokens';\nimport { EyeIcon, EyeOffIcon } from '@persona/icons';\nimport { repeat } from 'lodash';\nimport { uniqueId } from 'lodash/fp';\nimport {\n type ComponentPropsWithoutRef,\n type ComponentType,\n createContext,\n type FC,\n type PropsWithChildren,\n type ReactNode,\n useContext,\n useEffect,\n useMemo,\n useRef,\n} from 'react';\nimport { useToggleButton } from 'react-aria';\nimport { useToggleState } from 'react-stately';\nimport styled, { css } from 'styled-components';\n\nimport IconButton from 'design-system/components/Button/IconButton';\nimport Sticker from 'design-system/components/Sticker';\nimport { Paragraph } from 'design-system/components/Text';\nimport { HelperTooltip } from 'design-system/components/Tooltip';\nimport type { ParagraphSize } from 'design-system/mixins/text';\n\nexport type WordBreak = 'break-all' | 'break-word' | 'normal';\nexport type TextTransform = 'capitalize' | 'sentence';\nexport type TableLayoutValue = boolean | 'full-width';\n\nexport type AttributeSize = 'sm' | 'md';\n\nexport const AttributeContext = createContext<{\n table?: TableLayoutValue;\n horizontal?: boolean;\n size?: AttributeSize;\n}>({});\n\n// TODO: Create Toggle Button component\nexport const IconButtonContainer = styled(IconButton)`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n\n svg {\n transition-duration: 150ms;\n }\n\n :hover {\n svg {\n color: ${Color.CorePurple800};\n }\n }\n`;\n\ninterface AttributeValueProps {\n placeholder: ReactNode;\n show?: boolean;\n redacted?: boolean;\n value?: ReactNode;\n textTransform?: TextTransform;\n wordBreak?: WordBreak;\n size?: AttributeSize;\n 'aria-labelledby': string;\n id: string;\n}\n\ninterface ValueFormatterProps {\n isPlaceholder?: boolean;\n wordBreak?: WordBreak;\n size?: AttributeSize;\n}\n\nconst Value = styled.dd<ValueFormatterProps>`\n ${({ size }) => (size === 'sm' ? Typography.TextSmall : Typography.TextMedium)};\n color: ${({ isPlaceholder }) => (isPlaceholder ? Color.TextSecondary : Color.CoreSlate1000)};\n margin: 0;\n text-overflow: ellipsis;\n overflow-x: hidden;\n word-break: ${({ wordBreak }) => (wordBreak ? wordBreak : 'normal')};\n\n ul,\n ol {\n list-style-position: inside;\n }\n\n a {\n color: ${({ theme }) => theme.color.text.brand};\n text-decoration: none;\n\n &:visited {\n color: ${({ theme }) => theme.color.text.brand};\n }\n }\n`;\n\nexport const AttributeValue = ({\n placeholder,\n show,\n redacted,\n value,\n wordBreak,\n size,\n id,\n 'aria-labelledby': ariaLabelledBy,\n}: AttributeValueProps) => {\n const isEmpty = value == null || value === '';\n\n const renderedVal = isEmpty ? (\n placeholder\n ) : (\n <>{!show ? repeat('•', typeof value === 'string' ? value.length : 8) : value}</>\n );\n\n return (\n <Value\n isPlaceholder={isEmpty}\n wordBreak={wordBreak}\n size={size}\n title={typeof value === 'string' ? value : undefined}\n aria-labelledby={ariaLabelledBy}\n id={id}\n >\n {redacted ? <Sticker id={id}>Redacted</Sticker> : renderedVal}\n </Value>\n );\n};\n\nexport interface AttributeProps extends ComponentPropsWithoutRef<'div'> {\n /**\n * Title of the attribute. Rendered as a <dt>.\n */\n label: ReactNode;\n\n /**\n * Value to display. Rendered as a <dd>.\n */\n value?: ReactNode;\n\n /**\n * Will display a \"Redacted\" sticker if there is a value.\n */\n redacted?: boolean;\n\n /**\n * Renders toggleable eye button to the right of the label\n */\n toggleable?: boolean;\n\n /**\n * Text to display in presence of null value.\n */\n placeholder?: string;\n\n /**\n * Word break styling for value.\n */\n wordBreak?: WordBreak;\n\n /**\n * Render a custom label component\n */\n labelComponent?: FC<PropsWithChildren<{ id: string; size?: ParagraphSize }>>;\n\n /**\n * Render a custom value component\n */\n valueComponent?: ComponentType<AttributeValueProps>;\n\n /**\n * Renders a HelperTooltip to display help text to the right of the label.\n */\n helpText?: ReactNode;\n\n /**\n * Custom adornments to display to the right of the label.\n */\n right?: ReactNode;\n\n /**\n * Renders attributes in a tabular layout.\n */\n table?: TableLayoutValue;\n}\n\ntype AttributeContainerProps = {\n horizontal?: boolean;\n table?: TableLayoutValue;\n size?: AttributeSize;\n};\nconst AttributeContainer = styled('div')<AttributeContainerProps>`\n ${({ table, size }) =>\n table &&\n css`\n display: table-row;\n\n > * {\n display: table-cell;\n }\n\n & > ${AttributeLabel} {\n padding: ${Spacing[1]} 0;\n padding-right: ${size === 'sm' ? Spacing[2] : Spacing[3]};\n }\n & > ${Value} {\n padding: ${size === 'sm' ? Spacing[1] : Spacing[2]} 0;\n }\n `}\n\n ${({ horizontal }) =>\n horizontal &&\n css`\n display: grid;\n gap: ${Spacing[4]};\n grid-template-columns: subgrid;\n grid-column: span 2;\n `}\n`;\n\nexport const AttributeLabel = styled(Paragraph).attrs<{ size?: ParagraphSize }>((props) => ({\n size: props.size ?? 'md',\n color: 'tertiary',\n as: 'dt',\n}))`\n margin: 0;\n overflow-wrap: break-word;\n`;\n\nconst RightContainer = styled.span`\n display: inline-block;\n vertical-align: middle;\n margin-left: ${Spacing[2]};\n`;\n\nexport const Attribute = ({\n label,\n value,\n redacted,\n placeholder = '-',\n wordBreak,\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n labelComponent: LabelComponent = AttributeLabel,\n valueComponent: ValueComponent = AttributeValue,\n right,\n helpText,\n toggleable,\n table,\n ...elemProps\n}: AttributeProps) => {\n const attrCtx = useContext(AttributeContext);\n const size = attrCtx?.size ?? 'md';\n const toggleRef = useRef();\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n const valueAsArray = [].concat(value).filter(Boolean);\n const showToggleButton = toggleable && !redacted && valueAsArray.length > 0;\n const state = useToggleState({ defaultSelected: !toggleable });\n const { buttonProps } = useToggleButton(\n {\n 'aria-label': state.isSelected ? `Hide ${label} value` : `Show ${label} value`,\n elementType: 'button',\n },\n state,\n /* @ts-expect-error [strict-migration] The following line is not strict; please fix! */\n toggleRef,\n );\n const labelId = useMemo(() => uniqueId('pds_attribute_label__'), []);\n const valueId = useMemo(() => uniqueId('pds_attribute_value__'), []);\n const show = state.isSelected;\n\n useEffect(() => {\n state.setSelected(!toggleable);\n }, [toggleable]);\n\n return (\n <AttributeContainer\n table={table || attrCtx?.table}\n horizontal={attrCtx?.horizontal}\n size={size}\n {...elemProps}\n >\n <LabelComponent id={labelId} aria-details={valueId} size={size}>\n {label}\n {helpText && (\n <RightContainer>\n <HelperTooltip size='sm'>{helpText}</HelperTooltip>\n </RightContainer>\n )}\n {showToggleButton && (\n <RightContainer>\n {/* @ts-expect-error [strict-migration] The following line is not strict; please fix! */}\n <IconButtonContainer {...buttonProps} ref={toggleRef}>\n {show ? <EyeIcon /> : <EyeOffIcon />}\n </IconButtonContainer>\n </RightContainer>\n )}\n {right && <RightContainer>{right}</RightContainer>}\n </LabelComponent>\n <ValueComponent\n id={valueId}\n value={value}\n placeholder={placeholder}\n wordBreak={wordBreak}\n redacted={redacted}\n show={show}\n size={size}\n aria-labelledby={labelId}\n />\n </AttributeContainer>\n );\n};\n\nexport default Attribute;\n","import { Spacing } from '@persona/design-tokens';\nimport type { ReactNode } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport { AttributeContext, type AttributeSize, type TableLayoutValue } from './Attribute';\n\ntype AttributeGridProps = {\n children?: ReactNode;\n /**\n * Sets the font size and spacing density for all child Attributes.\n * Defaults to `'md'`.\n */\n size?: AttributeSize;\n} & (\n | {\n /**\n * Set a fixed number of columns for the grid.\n */\n colCount?: number;\n /**\n * Display attributes in a stacked list with label first then value.\n */\n horizontal?: boolean;\n\n table?: never;\n }\n | {\n /**\n * Display attributes in a fixed tabular layout.\n * Set to `full-width` to expand to full width of container.\n */\n table?: TableLayoutValue;\n\n colCount?: never;\n horizontal?: never;\n }\n);\n\ntype AttributeGridComponentProps = {\n colCount?: number;\n horizontal?: boolean;\n table?: TableLayoutValue;\n size?: AttributeSize;\n};\nconst AttributeGridComponent = styled.dl<AttributeGridComponentProps>`\n ${({ colCount, table, horizontal, size }) =>\n table\n ? css`\n display: table;\n ${\n table === 'full-width' &&\n css`\n width: 100%;\n table-layout: fixed;\n border-spacing: 0 ${size === 'sm' ? Spacing[1] : Spacing[2]};\n `\n };\n `\n : css`\n display: grid;\n gap: ${size === 'sm' ? Spacing[2] : Spacing[4]};\n /* If the layout is horizontal we guarentee an even number of columns */\n grid-template-columns: ${\n colCount\n ? `repeat(${colCount}, ${horizontal ? '1fr 2fr' : '1fr'})`\n : `repeat(auto-fit, ${horizontal ? 'minmax(120px, 1fr) minmax(225px, 2fr)' : 'minmax(225px, 1fr)'})`\n };\n `}\n margin: 0;\n\n & + & {\n padding-bottom: ${Spacing[5]};\n }\n`;\n\nconst AttributeGrid = ({ children, horizontal, table, size, ...props }: AttributeGridProps) => {\n return (\n <AttributeGridComponent table={table} horizontal={horizontal} size={size} {...props}>\n <AttributeContext.Provider value={{ horizontal, table, size }}>\n {children}\n </AttributeContext.Provider>\n </AttributeGridComponent>\n );\n};\n\nexport default AttributeGrid;\n"],"mappings":"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"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
Object.defineProperties(exports, {
|
|
2
|
+
__esModule: { value: true },
|
|
3
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
4
|
+
});
|
|
5
|
+
require("../../chunk-CoPdw6nB.cjs");
|
|
6
|
+
const require_Badge = require("../../Badge-BwAZD9BH.cjs");
|
|
7
|
+
exports.Badge = require_Badge.Badge;
|
|
8
|
+
exports.default = require_Badge.Badge;
|