@persona/design-system 0.10.8 → 0.10.10
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 +27 -0
- package/dist/{Badge-8YzapjWf.mjs → Badge-BCdsVKuj.mjs} +2 -2
- package/dist/{Badge-8YzapjWf.mjs.map → Badge-BCdsVKuj.mjs.map} +1 -1
- package/dist/{Breadcrumbs-Dft2TR4v.mjs → Breadcrumbs-CMf3Uvow.mjs} +4 -4
- package/dist/{Breadcrumbs-Dft2TR4v.mjs.map → Breadcrumbs-CMf3Uvow.mjs.map} +1 -1
- package/dist/Card2.d.mts +2 -2
- package/dist/{CardV2-BRJbRSts.mjs → CardV2-CrV6eEQb.mjs} +15 -5
- package/dist/CardV2-CrV6eEQb.mjs.map +1 -0
- package/dist/{CheckboxGroupField-DnVqlpwi.d.mts → CheckboxGroupField-Bpu2j6G2.d.mts} +2 -2
- package/dist/CheckboxGroupField.d.mts +1 -1
- package/dist/{Combobox-fYZjpn5-.d.mts → Combobox-CIKqTYZt.d.mts} +3 -3
- package/dist/{Combobox-DQxaOCLA.mjs → Combobox-Gb_j1dg6.mjs} +5 -5
- package/dist/{Combobox-DQxaOCLA.mjs.map → Combobox-Gb_j1dg6.mjs.map} +1 -1
- package/dist/Combobox.d.mts +2 -2
- package/dist/{ComboboxBase-Mb8HyeAI.d.mts → ComboboxBase-BPXqJHaQ.d.mts} +2 -2
- package/dist/ComboboxBase.d.mts +1 -1
- package/dist/{ComboboxMultiSelect-C87lkXr7.d.mts → ComboboxMultiSelect-BwkkSymj.d.mts} +2 -2
- package/dist/ComboboxMultiSelect.d.mts +1 -1
- package/dist/{ComboboxSingleSelect-CIYakRW5.d.mts → ComboboxSingleSelect-CdNNJNkp.d.mts} +3 -3
- package/dist/ComboboxSingleSelect.d.mts +1 -1
- package/dist/{CompactBar-D67CdcIo.d.mts → CompactBar-BLZZWtIE.d.mts} +2 -2
- package/dist/CompactBar.d.mts +1 -1
- package/dist/{ControlBar-34th2yt4.d.mts → ControlBar-B3Jn8G0k.d.mts} +5 -4
- package/dist/ControlBar.d.mts +1 -1
- package/dist/{DataTable-BZtzdtVs.d.mts → DataTable-BE9inUi-.d.mts} +5 -5
- package/dist/{DataTable-BvA2H9D9.mjs → DataTable-CIZJ1vO8.mjs} +10 -10
- package/dist/{DataTable-BvA2H9D9.mjs.map → DataTable-CIZJ1vO8.mjs.map} +1 -1
- package/dist/DataTable.d.mts +1 -1
- package/dist/{DatePicker-D-_ibUd1.mjs → DatePicker-C9redLBr.mjs} +4 -4
- package/dist/{DatePicker-D-_ibUd1.mjs.map → DatePicker-C9redLBr.mjs.map} +1 -1
- package/dist/{DropdownButton-BiFRlSVD.mjs → DropdownButton-DpLG-cIj.mjs} +3 -3
- package/dist/{DropdownButton-BiFRlSVD.mjs.map → DropdownButton-DpLG-cIj.mjs.map} +1 -1
- package/dist/DropdownButton.d.mts +1 -1
- package/dist/{DropdownMenu-DVxXQDRC.d.mts → DropdownMenu-B6D4stkF.d.mts} +2 -2
- package/dist/{DropdownMenu-Q8S-9rXm.mjs → DropdownMenu-c8XK2Lr4.mjs} +2 -2
- package/dist/{DropdownMenu-Q8S-9rXm.mjs.map → DropdownMenu-c8XK2Lr4.mjs.map} +1 -1
- package/dist/DropdownMenu.d.mts +1 -1
- package/dist/{FloatingToolbar-Df90f7Dm.mjs → FloatingToolbar-DLRaE0o7.mjs} +3 -3
- package/dist/{FloatingToolbar-Df90f7Dm.mjs.map → FloatingToolbar-DLRaE0o7.mjs.map} +1 -1
- package/dist/{FormField-BStxmlZT.mjs → FormField-Cf1VMvoa.mjs} +7 -7
- package/dist/{FormField-BStxmlZT.mjs.map → FormField-Cf1VMvoa.mjs.map} +1 -1
- package/dist/{HoverCopyableField-CW7Jxmni.mjs → HoverCopyableField-XHC_n9tp.mjs} +2 -2
- package/dist/{HoverCopyableField-CW7Jxmni.mjs.map → HoverCopyableField-XHC_n9tp.mjs.map} +1 -1
- package/dist/{IconButton-DftINsp7.mjs → IconButton-DxHB2g80.mjs} +2 -2
- package/dist/{IconButton-DftINsp7.mjs.map → IconButton-DxHB2g80.mjs.map} +1 -1
- package/dist/IndexTableLayout.d.mts +4 -4
- package/dist/InlineCombobox.d.mts +1 -1
- package/dist/InlineInput.d.mts +1 -1
- package/dist/{Input-DtO3qMnE.mjs → Input-RHXujO9u.mjs} +2 -2
- package/dist/{Input-DtO3qMnE.mjs.map → Input-RHXujO9u.mjs.map} +1 -1
- package/dist/{Link-DKYmdL9t.mjs → Link-D_kCyLYX.mjs} +2 -2
- package/dist/{Link-DKYmdL9t.mjs.map → Link-D_kCyLYX.mjs.map} +1 -1
- package/dist/{ListBox-CDG0EAPg.mjs → ListBox-BZp6exb8.mjs} +6 -6
- package/dist/{ListBox-CDG0EAPg.mjs.map → ListBox-BZp6exb8.mjs.map} +1 -1
- package/dist/{ListBox-DxOACf6N.d.mts → ListBox-DpFcM-dM.d.mts} +2 -2
- package/dist/ListBox.d.mts +1 -1
- package/dist/{ListBoxField-CgnDuhUw.d.mts → ListBoxField-DL6Zk8TU.d.mts} +4 -4
- package/dist/ListBoxField.d.mts +1 -1
- package/dist/{LogicRow-Dv_1G1TC.d.mts → LogicRow-BakOUtzx.d.mts} +2 -2
- package/dist/LogicRow.d.mts +1 -1
- package/dist/{Menu-EIT_MwK6.mjs → Menu-BVn1jh46.mjs} +2 -2
- package/dist/{Menu-EIT_MwK6.mjs.map → Menu-BVn1jh46.mjs.map} +1 -1
- package/dist/{Menu-BfjvH8mr.d.mts → Menu-D6OrKCTC.d.mts} +2 -2
- package/dist/Menu.d.mts +1 -1
- package/dist/{Modal-BGlRX63w.mjs → Modal-De5_bPJ_.mjs} +4 -4
- package/dist/{Modal-BGlRX63w.mjs.map → Modal-De5_bPJ_.mjs.map} +1 -1
- package/dist/PageHeader-7_Hf6rHl.mjs +81 -0
- package/dist/PageHeader-7_Hf6rHl.mjs.map +1 -0
- package/dist/{PageHeader-DRatgscC.d.mts → PageHeader-UPiqJpIF.d.mts} +11 -3
- package/dist/PageHeader.d.mts +1 -1
- package/dist/{Pagination-C8hPOu0l.mjs → Pagination-DMH2IaV0.mjs} +5 -5
- package/dist/{Pagination-C8hPOu0l.mjs.map → Pagination-DMH2IaV0.mjs.map} +1 -1
- package/dist/{Pii-Bvh_kfGN.mjs → Pii-24D_nSRQ.mjs} +2 -2
- package/dist/{Pii-Bvh_kfGN.mjs.map → Pii-24D_nSRQ.mjs.map} +1 -1
- package/dist/{Select-CaG6OQi1.d.mts → Select-CR9TjFfo.d.mts} +2 -2
- package/dist/{Select-DkUMz4LG.mjs → Select-DOlw_LPR.mjs} +4 -4
- package/dist/{Select-DkUMz4LG.mjs.map → Select-DOlw_LPR.mjs.map} +1 -1
- package/dist/Select.d.mts +1 -1
- package/dist/SmartTextInputField.d.mts +2 -2
- package/dist/{StatusIndicator-Zf75KK3O.mjs → StatusIndicator-CzRaEFSz.mjs} +2 -2
- package/dist/{StatusIndicator-Zf75KK3O.mjs.map → StatusIndicator-CzRaEFSz.mjs.map} +1 -1
- package/dist/{Sticker-Bi_fezCO.mjs → Sticker-C1_6I08u.mjs} +3 -3
- package/dist/{Sticker-Bi_fezCO.mjs.map → Sticker-C1_6I08u.mjs.map} +1 -1
- package/dist/{TabBar-DpXYsWgS.mjs → TabBar-BCFO38E0.mjs} +3 -3
- package/dist/{TabBar-DpXYsWgS.mjs.map → TabBar-BCFO38E0.mjs.map} +1 -1
- package/dist/{TableBox-BfSF36Gy.mjs → TableBox-DNQsgQ8x.mjs} +4 -4
- package/dist/{TableBox-BfSF36Gy.mjs.map → TableBox-DNQsgQ8x.mjs.map} +1 -1
- package/dist/TableBox.d.mts +1 -1
- package/dist/{TableBoxCell-B9KMWebc.d.mts → TableBoxCell-CsRt_5gP.d.mts} +4 -4
- package/dist/TableBoxCell.d.mts +1 -1
- package/dist/{TableBoxField-0uIGzBhF.d.mts → TableBoxField-Db0Vjo6Z.d.mts} +5 -5
- package/dist/TableBoxField.d.mts +1 -1
- package/dist/{TableBoxRow-PjBBDcEk.d.mts → TableBoxRow-exMlZyc4.d.mts} +2 -2
- package/dist/TableBoxRow.d.mts +1 -1
- package/dist/{TableBoxRowActions-B7stm6Q3.d.mts → TableBoxRowActions-UO9YN34k.d.mts} +2 -2
- package/dist/TableBoxRowActions.d.mts +1 -1
- package/dist/{TableControls-BZ8RrYOc.mjs → TableControls-BrP_BqnF.mjs} +14 -14
- package/dist/TableControls-BrP_BqnF.mjs.map +1 -0
- package/dist/{TableControls-DT2YpFK8.d.mts → TableControls-Clo_0Mty.d.mts} +4 -4
- package/dist/TableControls.d.mts +1 -1
- package/dist/{TableControlsContext-CHuLxfa7.d.mts → TableControlsContext-BNd6z9mD.d.mts} +2 -2
- package/dist/TableControlsContext.d.mts +1 -1
- package/dist/{TableViewConfigurationDropdown-BWBBUXCs.d.mts → TableViewConfigurationDropdown-Cp7ausV_.d.mts} +2 -2
- package/dist/TableViewConfigurationDropdown.d.mts +1 -1
- package/dist/{TechnicalSticker-B_JlBkXZ.mjs → TechnicalSticker-Cq5jzYKQ.mjs} +2 -2
- package/dist/{TechnicalSticker-B_JlBkXZ.mjs.map → TechnicalSticker-Cq5jzYKQ.mjs.map} +1 -1
- package/dist/{clientFilterUtils-scLlIuP_.d.mts → clientFilterUtils-CGHYF5NE.d.mts} +2 -2
- package/dist/clientFilterUtils.d.mts +1 -1
- package/dist/components/Accordion/index.mjs +1 -1
- package/dist/components/Attribute/index.mjs +2 -2
- package/dist/components/Badge/index.mjs +1 -1
- package/dist/components/Banner/index.mjs +1 -1
- package/dist/components/BottomPanel/index.mjs +4 -4
- package/dist/components/Breadcrumbs/index.mjs +1 -1
- package/dist/components/Button/index.mjs +1 -1
- package/dist/components/ButtonGroup/index.mjs +1 -1
- package/dist/components/CardV2/index.mjs +1 -1
- package/dist/components/CodeHighlight/index.mjs +1 -1
- package/dist/components/Combobox/index.d.mts +2 -2
- package/dist/components/Combobox/index.mjs +1 -1
- package/dist/components/DataTable/TableControls/index.d.mts +7 -7
- package/dist/components/DataTable/TableControls/index.mjs +1 -1
- package/dist/components/DataTable/index.d.mts +5 -5
- package/dist/components/DataTable/index.mjs +1 -1
- package/dist/components/DataTable/types.d.mts +1 -1
- 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 +2 -2
- package/dist/components/FloatingToolbar/index.mjs +1 -1
- package/dist/components/FormField/index.d.mts +4 -4
- package/dist/components/FormField/index.mjs +1 -1
- package/dist/components/HoverCopyableField/index.mjs +1 -1
- package/dist/components/ImageTile/index.mjs +2 -2
- package/dist/components/Input/index.mjs +1 -1
- package/dist/components/Link/index.mjs +1 -1
- package/dist/components/ListBox/index.d.mts +3 -3
- package/dist/components/ListBox/index.mjs +1 -1
- package/dist/components/MaskedInput/index.mjs +1 -1
- package/dist/components/Menu/index.d.mts +1 -1
- package/dist/components/Menu/index.mjs +1 -1
- package/dist/components/Modal/index.mjs +1 -1
- package/dist/components/PageHeader/index.d.mts +1 -1
- package/dist/components/PageHeader/index.mjs +1 -1
- package/dist/components/Pagination/index.mjs +1 -1
- package/dist/components/Pii/index.mjs +1 -1
- package/dist/components/RichTextEditor/index.mjs +4 -4
- package/dist/components/RightPanel/index.mjs +1 -1
- package/dist/components/Select/index.d.mts +1 -1
- package/dist/components/Select/index.mjs +1 -1
- package/dist/components/SmartTextInput/index.mjs +2 -2
- package/dist/components/StatusIndicator/index.mjs +1 -1
- package/dist/components/Sticker/index.mjs +1 -1
- package/dist/components/TabBar/index.mjs +1 -1
- package/dist/components/TableBox/index.d.mts +1 -1
- package/dist/components/TableBox/index.mjs +1 -1
- package/dist/components/TechnicalSticker/index.mjs +1 -1
- package/dist/components/Tile/index.mjs +1 -1
- package/dist/components/Toast/index.mjs +1 -1
- package/dist/components/VersionHistory/index.mjs +4 -4
- package/dist/fieldPickerOptions.d.mts +1 -1
- package/dist/{filters-yfzOlqKx.d.mts → filters-DTBc0mE7.d.mts} +2 -2
- package/dist/filters.d.mts +1 -1
- package/dist/{helpers-BeCjgAeE.d.mts → helpers-CBJ2AqGZ.d.mts} +2 -2
- package/dist/helpers.d.mts +1 -1
- package/dist/{index-BEHNqAZa.d.mts → index-OkdnW-u5.d.mts} +3 -3
- package/dist/{inputFields-BnCdmuBt.d.mts → inputFields-DpHeZiFX.d.mts} +4 -4
- package/dist/inputFields.d.mts +1 -1
- package/dist/lib/GlobalStyles.d.mts +19 -2
- package/dist/lib/GlobalStyles.mjs +50 -1
- package/dist/lib/GlobalStyles.mjs.map +1 -1
- package/dist/lib/schemaOptions.mjs +9 -4
- package/dist/lib/schemaOptions.mjs.map +1 -1
- package/dist/patterns/CardGrouping/index.mjs +4 -4
- package/dist/patterns/IndexTableLayout/index.mjs +2 -2
- package/dist/patterns/LayoutLoadingShimmer/index.mjs +2 -2
- package/dist/patterns/WizardModal/index.mjs +2 -2
- package/dist/theme.mjs +1 -1
- package/dist/{types-BXJ6qAGy.d.mts → types-BEdERA4v.d.mts} +2 -2
- package/dist/{types-BeFBvQ1c.d.mts → types-BiqzeNsa.d.mts} +2 -2
- package/dist/types5.d.mts +1 -1
- package/dist/useColumnConfiguration.d.mts +2 -2
- package/dist/useComboboxFooterAction.d.mts +1 -1
- package/dist/{useTableColumns-DJFy0Gp8.d.mts → useTableColumns-Xd14vx_h.d.mts} +2 -2
- package/dist/useTableColumns.d.mts +1 -1
- package/dist/useTruncation.d.mts +1 -1
- package/dist/variables/charting.mjs +1 -1
- package/dist/variables/charting.mjs.map +1 -1
- package/llms.txt +3 -3
- package/package.json +3 -3
- package/skills/ui-authoring/COMPONENTS.md +1 -1
- package/skills/ui-authoring/PATTERNS.md +7 -0
- package/dist/CardV2-BRJbRSts.mjs.map +0 -1
- package/dist/PageHeader-DEKTopzU.mjs +0 -75
- package/dist/PageHeader-DEKTopzU.mjs.map +0 -1
- package/dist/TableControls-BZ8RrYOc.mjs.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as Card_default } from "../../Card-DuQHyroh.mjs";
|
|
2
|
-
import { t as DataTable } from "../../DataTable-
|
|
3
|
-
import { t as PageHeader } from "../../PageHeader-
|
|
2
|
+
import { t as DataTable } from "../../DataTable-CIZJ1vO8.mjs";
|
|
3
|
+
import { t as PageHeader } from "../../PageHeader-7_Hf6rHl.mjs";
|
|
4
4
|
import { a as Section, i as Container } from "../../PageLayout-DjtGrvJa.mjs";
|
|
5
5
|
import { useMemo } from "react";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { a as styled } from "../../styledComponentsInterop-Cs5CCPRy.mjs";
|
|
2
2
|
import { n as Stack, t as HStack } from "../../Stack-Bzom2BTR.mjs";
|
|
3
3
|
import { t as LoadingShimmer } from "../../LoadingShimmer-oPIv2ESr.mjs";
|
|
4
|
-
import { t as Card_default } from "../../CardV2-
|
|
4
|
+
import { t as Card_default } from "../../CardV2-CrV6eEQb.mjs";
|
|
5
5
|
import { h as Table, m as TableHeaderCell, n as TableBody, p as TableRow, r as TableHead, s as TableCell } from "../../Table-DPi4Dt5H.mjs";
|
|
6
|
-
import { n as PageHeaderContainer } from "../../PageHeader-
|
|
6
|
+
import { n as PageHeaderContainer } from "../../PageHeader-7_Hf6rHl.mjs";
|
|
7
7
|
import { Color, Spacing } from "@persona/design-tokens";
|
|
8
8
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
//#region src/patterns/containers.tsx
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { a as styled } from "../../styledComponentsInterop-Cs5CCPRy.mjs";
|
|
2
2
|
import { semanticColor } from "../../lib/semanticColor.mjs";
|
|
3
3
|
import { t as HStack } from "../../Stack-Bzom2BTR.mjs";
|
|
4
|
-
import { n as Button } from "../../IconButton-
|
|
5
|
-
import { i as Modal_default } from "../../Modal-
|
|
4
|
+
import { n as Button } from "../../IconButton-DxHB2g80.mjs";
|
|
5
|
+
import { i as Modal_default } from "../../Modal-De5_bPJ_.mjs";
|
|
6
6
|
import { t as ProgressIndicator } from "../../ProgressIndicator-zt3ndT9U.mjs";
|
|
7
7
|
import { useState } from "react";
|
|
8
8
|
import { Color, Spacing } from "@persona/design-tokens";
|
package/dist/theme.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { chartingDark, chartingLight } from "./variables/charting.mjs";
|
|
2
1
|
import { semanticDark, semanticLight } from "./variables/semantic.mjs";
|
|
2
|
+
import { chartingDark, chartingLight } from "./variables/charting.mjs";
|
|
3
3
|
import { Color, FontFamilies, Typography } from "@persona/design-tokens";
|
|
4
4
|
//#region src/theme.ts
|
|
5
5
|
const primary = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as ComboboxProps } from "./Combobox-
|
|
1
|
+
import { n as ComboboxProps } from "./Combobox-CIKqTYZt.mjs";
|
|
2
2
|
import { n as DateRange } from "./DateRangePicker-DlHC2q--.mjs";
|
|
3
3
|
import { ReactNode } from "react";
|
|
4
4
|
import { DateValue } from "@internationalized/date";
|
|
@@ -92,4 +92,4 @@ interface FilterTypeDefinition<TFilter extends BaseFilterConfig = FilterConfig>
|
|
|
92
92
|
type FilterTypeResolver<TFilter extends BaseFilterConfig = FilterConfig> = (config: TFilter) => FilterTypeDefinition<TFilter> | undefined;
|
|
93
93
|
//#endregion
|
|
94
94
|
export { ComboboxFilterConfig as a, FilterRenderOptions as c, InputFilterConfig as d, MultiSelectFilterConfig as f, BaseFilterConfig as i, FilterTypeDefinition as l, AttributeColumn as n, DateRangeFilterConfig as o, SelectFilterConfig as p, BaseActiveFilter as r, FilterConfig as s, ActiveFilter as t, FilterTypeResolver as u };
|
|
95
|
-
//# sourceMappingURL=types-
|
|
95
|
+
//# sourceMappingURL=types-BEdERA4v.d.mts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { l as MenuItemProps } from "./Menu-
|
|
1
|
+
import { l as MenuItemProps } from "./Menu-D6OrKCTC.mjs";
|
|
2
2
|
import { o as StickerProps } from "./Sticker-CLvRB8V5.mjs";
|
|
3
3
|
import { ReactNode } from "react";
|
|
4
4
|
import { Column, DeepKeys, FilterFnOption, Header, RowData, SortingState, Table } from "@tanstack/react-table";
|
|
@@ -177,4 +177,4 @@ type BulkAction = {
|
|
|
177
177
|
};
|
|
178
178
|
//#endregion
|
|
179
179
|
export { RowAction as C, RowDataWithTourTarget as D, RowDataWithSubrowsToAlwaysShowIds as E, SortProps as O, RenderValueStickerFormatConfig as S, RowDataWithSubrows as T, DataTableColumns as _, DataTableColumnBaseFormat as a, DatetimeConfig as b, DataTableColumnDatetimeFormat as c, DataTableColumnImageFormat as d, DataTableColumnNumberFormat as f, DataTableColumnURLFormat as g, DataTableColumnStringFormat as h, ColumnConfig as i, StickerMapping as k, DataTableColumnFormat as l, DataTableColumnStickerFormat as m, ClientFilterConfig as n, DataTableColumnCheckboxFormat as o, DataTableColumnPiiFormat as p, ClientFilterType as r, DataTableColumnDateFormat as s, BulkAction as t, DataTableColumnIDFormat as u, DataTableVariables as v, RowDataWithDetails as w, HeadlessFilterConfig as x, DateConfig as y };
|
|
180
|
-
//# sourceMappingURL=types-
|
|
180
|
+
//# sourceMappingURL=types-BiqzeNsa.d.mts.map
|
package/dist/types5.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as ComboboxFilterConfig, c as FilterRenderOptions, d as InputFilterConfig, f as MultiSelectFilterConfig, i as BaseFilterConfig, l as FilterTypeDefinition, n as AttributeColumn, o as DateRangeFilterConfig, p as SelectFilterConfig, r as BaseActiveFilter, s as FilterConfig, t as ActiveFilter, u as FilterTypeResolver } from "./types-
|
|
1
|
+
import { a as ComboboxFilterConfig, c as FilterRenderOptions, d as InputFilterConfig, f as MultiSelectFilterConfig, i as BaseFilterConfig, l as FilterTypeDefinition, n as AttributeColumn, o as DateRangeFilterConfig, p as SelectFilterConfig, r as BaseActiveFilter, s as FilterConfig, t as ActiveFilter, u as FilterTypeResolver } from "./types-BEdERA4v.mjs";
|
|
2
2
|
export { ActiveFilter, AttributeColumn, BaseActiveFilter, BaseFilterConfig, ComboboxFilterConfig, DateRangeFilterConfig, FilterConfig, FilterRenderOptions, FilterTypeDefinition, FilterTypeResolver, InputFilterConfig, MultiSelectFilterConfig, SelectFilterConfig };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as TableViewConfigurationProps } from "./TableViewConfigurationDropdown-
|
|
2
|
-
import { i as ColumnConfig } from "./types-
|
|
1
|
+
import { i as TableViewConfigurationProps } from "./TableViewConfigurationDropdown-Cp7ausV_.mjs";
|
|
2
|
+
import { i as ColumnConfig } from "./types-BiqzeNsa.mjs";
|
|
3
3
|
import { RowData } from "@tanstack/react-table";
|
|
4
4
|
|
|
5
5
|
//#region src/patterns/IndexTableLayout/useColumnConfiguration.d.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as RowAction, O as SortProps, _ as DataTableColumns, l as DataTableColumnFormat } from "./types-
|
|
1
|
+
import { C as RowAction, O as SortProps, _ as DataTableColumns, l as DataTableColumnFormat } from "./types-BiqzeNsa.mjs";
|
|
2
2
|
import { ColumnDef, Row, RowData, Table } from "@tanstack/react-table";
|
|
3
3
|
|
|
4
4
|
//#region src/components/DataTable/useTableColumns.d.ts
|
|
@@ -69,4 +69,4 @@ declare function useTableColumns<TData extends RowData, TFormat extends {
|
|
|
69
69
|
}[]];
|
|
70
70
|
//#endregion
|
|
71
71
|
export { UseTableColumnsParams as n, useTableColumns as r, RenderFormatFn as t };
|
|
72
|
-
//# sourceMappingURL=useTableColumns-
|
|
72
|
+
//# sourceMappingURL=useTableColumns-Xd14vx_h.d.mts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as UseTableColumnsParams, r as useTableColumns, t as RenderFormatFn } from "./useTableColumns-
|
|
1
|
+
import { n as UseTableColumnsParams, r as useTableColumns, t as RenderFormatFn } from "./useTableColumns-Xd14vx_h.mjs";
|
|
2
2
|
export { RenderFormatFn, UseTableColumnsParams, useTableColumns };
|
package/dist/useTruncation.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"charting.mjs","names":[],"sources":["../../src/variables/charting.ts"],"sourcesContent":["// Generated by design-system/scripts/generate-charting-tokens.mjs from\n// design-system/tokens/charting/light.json\n// design-system/tokens/charting/dark.json\n// Do not edit by hand — edit the token source and regenerate.\n// This module is where charting palettes map onto core primitives, per colour mode.\n/* oxlint-disable persona-web/no-core-color-tokens */\nimport { Color } from '@persona/design-tokens';\n\n/** Charting palettes: ordered colour lists, named as `ChartingColors` names them. */\nexport interface ChartingTokens {\n Sequential: readonly Color[];\n Categorical: readonly Color[];\n Qualitative: readonly Color[];\n SequentialMono: readonly Color[];\n SequentialDivergent: readonly Color[];\n}\n\nexport const chartingLight: ChartingTokens = {\n Sequential: [\n Color.CorePurple400,\n Color.CorePurple300,\n Color.CorePurple200,\n Color.CoreTeal400,\n Color.CoreTeal200,\n Color.CoreTeal100,\n Color.CoreSlate400,\n Color.CoreSlate300,\n ],\n Categorical: [\n Color.CorePurple500,\n Color.CorePurple700,\n Color.CoreTeal400,\n Color.CoreTeal800,\n Color.CoreGreen400,\n Color.CoreGreen800,\n Color.CoreOrange400,\n Color.CoreOrange700,\n Color.CoreYellow400,\n Color.CoreYellow800,\n Color.CoreRed400,\n Color.CoreRed600,\n Color.CoreBlue400,\n Color.CoreBlue700,\n ],\n Qualitative: [\n Color.CoreBlue500,\n Color.CoreYellow1000,\n Color.CoreOrange800,\n Color.CoreGreen900,\n Color.CoreGreen700,\n Color.CoreBlue800,\n Color.CoreOrange700,\n Color.CoreTeal900,\n Color.CoreYellow900,\n Color.CoreBlue700,\n Color.CoreSlate600,\n Color.CoreTeal800,\n ],\n SequentialMono: [\n Color.CoreBlue900,\n Color.CoreBlue800,\n Color.CoreBlue700,\n Color.CoreBlue600,\n Color.CoreBlue500,\n Color.CoreBlue400,\n Color.CoreBlue300,\n Color.CoreBlue200,\n ],\n SequentialDivergent: [\n Color.CoreBlue900,\n Color.CoreBlue800,\n Color.CoreBlue600,\n Color.CoreBlue400,\n Color.CoreBlue200,\n Color.CoreOrange200,\n Color.CoreOrange400,\n Color.CoreOrange600,\n Color.CoreOrange800,\n Color.CoreOrange900,\n ],\n};\n\nexport const chartingDark: ChartingTokens = {\n Sequential: [\n Color.CorePurple400,\n Color.CorePurple300,\n Color.CorePurple200,\n Color.CoreTeal400,\n Color.CoreTeal200,\n Color.CoreTeal100,\n Color.CoreSlate400,\n Color.CoreSlate300,\n ],\n Categorical: [\n Color.CorePurple500,\n Color.CorePurple700,\n Color.CoreTeal400,\n Color.CoreTeal800,\n Color.CoreGreen400,\n Color.CoreGreen800,\n Color.CoreOrange400,\n Color.CoreOrange700,\n Color.CoreYellow400,\n Color.CoreYellow800,\n Color.CoreRed400,\n Color.CoreRed600,\n Color.CoreBlue400,\n Color.CoreBlue700,\n ],\n Qualitative: [\n Color.CoreBlue500,\n Color.CoreYellow900,\n Color.CoreOrange800,\n Color.CoreGreen800,\n Color.CoreGreen700,\n Color.CoreBlue600,\n Color.CoreOrange700,\n Color.CoreTeal900,\n Color.
|
|
1
|
+
{"version":3,"file":"charting.mjs","names":[],"sources":["../../src/variables/charting.ts"],"sourcesContent":["// Generated by design-system/scripts/generate-charting-tokens.mjs from\n// design-system/tokens/charting/light.json\n// design-system/tokens/charting/dark.json\n// Do not edit by hand — edit the token source and regenerate.\n// This module is where charting palettes map onto core primitives, per colour mode.\n/* oxlint-disable persona-web/no-core-color-tokens */\nimport { Color } from '@persona/design-tokens';\n\n/** Charting palettes: ordered colour lists, named as `ChartingColors` names them. */\nexport interface ChartingTokens {\n Sequential: readonly Color[];\n Categorical: readonly Color[];\n Qualitative: readonly Color[];\n SequentialMono: readonly Color[];\n SequentialDivergent: readonly Color[];\n}\n\nexport const chartingLight: ChartingTokens = {\n Sequential: [\n Color.CorePurple400,\n Color.CorePurple300,\n Color.CorePurple200,\n Color.CoreTeal400,\n Color.CoreTeal200,\n Color.CoreTeal100,\n Color.CoreSlate400,\n Color.CoreSlate300,\n ],\n Categorical: [\n Color.CorePurple500,\n Color.CorePurple700,\n Color.CoreTeal400,\n Color.CoreTeal800,\n Color.CoreGreen400,\n Color.CoreGreen800,\n Color.CoreOrange400,\n Color.CoreOrange700,\n Color.CoreYellow400,\n Color.CoreYellow800,\n Color.CoreRed400,\n Color.CoreRed600,\n Color.CoreBlue400,\n Color.CoreBlue700,\n ],\n Qualitative: [\n Color.CoreBlue500,\n Color.CoreYellow1000,\n Color.CoreOrange800,\n Color.CoreGreen900,\n Color.CoreGreen700,\n Color.CoreBlue800,\n Color.CoreOrange700,\n Color.CoreTeal900,\n Color.CoreYellow900,\n Color.CoreBlue700,\n Color.CoreSlate600,\n Color.CoreTeal800,\n ],\n SequentialMono: [\n Color.CoreBlue900,\n Color.CoreBlue800,\n Color.CoreBlue700,\n Color.CoreBlue600,\n Color.CoreBlue500,\n Color.CoreBlue400,\n Color.CoreBlue300,\n Color.CoreBlue200,\n ],\n SequentialDivergent: [\n Color.CoreBlue900,\n Color.CoreBlue800,\n Color.CoreBlue600,\n Color.CoreBlue400,\n Color.CoreBlue200,\n Color.CoreOrange200,\n Color.CoreOrange400,\n Color.CoreOrange600,\n Color.CoreOrange800,\n Color.CoreOrange900,\n ],\n};\n\nexport const chartingDark: ChartingTokens = {\n Sequential: [\n Color.CorePurple400,\n Color.CorePurple300,\n Color.CorePurple200,\n Color.CoreTeal400,\n Color.CoreTeal200,\n Color.CoreTeal100,\n Color.CoreSlate400,\n Color.CoreSlate300,\n ],\n Categorical: [\n Color.CorePurple500,\n Color.CorePurple700,\n Color.CoreTeal400,\n Color.CoreTeal800,\n Color.CoreGreen400,\n Color.CoreGreen800,\n Color.CoreOrange400,\n Color.CoreOrange700,\n Color.CoreYellow400,\n Color.CoreYellow800,\n Color.CoreRed400,\n Color.CoreRed600,\n Color.CoreBlue400,\n Color.CoreBlue700,\n ],\n Qualitative: [\n Color.CoreBlue500,\n Color.CoreYellow900,\n Color.CoreOrange800,\n Color.CoreGreen800,\n Color.CoreGreen700,\n Color.CoreBlue600,\n Color.CoreOrange700,\n Color.CoreTeal900,\n Color.CoreYellow800,\n Color.CoreBlue700,\n Color.CoreSlate600,\n Color.CoreTeal800,\n ],\n SequentialMono: [\n Color.CoreBlue900,\n Color.CoreBlue800,\n Color.CoreBlue700,\n Color.CoreBlue600,\n Color.CoreBlue500,\n Color.CoreBlue400,\n Color.CoreBlue300,\n Color.CoreBlue200,\n ],\n SequentialDivergent: [\n Color.CoreBlue900,\n Color.CoreBlue800,\n Color.CoreBlue600,\n Color.CoreBlue400,\n Color.CoreBlue200,\n Color.CoreOrange200,\n Color.CoreOrange400,\n Color.CoreOrange600,\n Color.CoreOrange800,\n Color.CoreOrange900,\n ],\n};\n"],"mappings":";;AAiBA,MAAa,gBAAgC;CAC3C,YAAY;EACV,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACP;CACD,aAAa;EACX,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACP;CACD,aAAa;EACX,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACP;CACD,gBAAgB;EACd,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACP;CACD,qBAAqB;EACnB,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACP;CACF;AAED,MAAa,eAA+B;CAC1C,YAAY;EACV,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACP;CACD,aAAa;EACX,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACP;CACD,aAAa;EACX,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACP;CACD,gBAAgB;EACd,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACP;CACD,qBAAqB;EACnB,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACN,MAAM;EACP;CACF"}
|
package/llms.txt
CHANGED
|
@@ -16,7 +16,7 @@ For exact prop types, prefer the published type declarations (`dist/**/*.d.mts`,
|
|
|
16
16
|
- [ui-authoring](skills/ui-authoring/SKILL.md): design tokens, PDS implementation guidelines, table guidelines (DataTable vs TableBox vs TableLayout), routing/link adapters (react-router, TanStack, custom), localization (PDSProvider strings/locale), loading states, testing, Storybook
|
|
17
17
|
- [Product UI standard](skills/ui-authoring/STANDARD.md): the rules every screen meets (11 px minimum for copy and 8 px for labels inside charts and diagrams, WCAG AA contrast, reduced motion, status not by colour alone), the screen brief, the `pds/*` oxlint rules that check it (`@persona/design-system/lint`), and the `new-screen` skill for building one screen
|
|
18
18
|
- [Tokens](skills/ui-authoring/TOKENS.md): semantic color tokens (Fg / Surface / Border / Action / Input / Feedback / Status / Opacity) with recipes and a dark-mode checklist; Spacing / Typography catalog, radius, elevation, charts
|
|
19
|
-
- [Patterns](skills/ui-authoring/PATTERNS.md): forms, layout, index tables, indicators, feedback, empty states, charts, panels
|
|
19
|
+
- [Patterns](skills/ui-authoring/PATTERNS.md): forms, layout, index tables, versioned resource headers, indicators, feedback, empty states, charts, panels
|
|
20
20
|
- [Components](skills/ui-authoring/COMPONENTS.md): which PDS component to use (and its import path); APIs live in that component's `.mdx` when one exists, otherwise in `dist/components/<Name>/index.d.mts`
|
|
21
21
|
- [design-system-component-authoring](skills/design-system-component-authoring/SKILL.md): authoring a new PDS component in this repo — clarifying scope, component conventions, prop interface patterns
|
|
22
22
|
|
|
@@ -39,8 +39,8 @@ their own subpaths.
|
|
|
39
39
|
- Overlays: `Modal`, `WizardModal` (`patterns/WizardModal`), `RightPanel`, `Popover`, `Tooltip` / `TextUnderlineTooltip`, `DropdownMenu`, `FloatingPanel`
|
|
40
40
|
- Modal close button: localize the default with `PDSProvider strings={{ closeModal: translatedLabel }}` (English: "Close"), or override one modal with `contentProps.closeButtonLabel`.
|
|
41
41
|
- Forms: `ConfigFormGroup`, `FormField` (`TextField`, `TextAreaField`, `TableBoxField`), `Input`, `TextArea`, `Select`, `Combobox`, `Checkbox`, `Radio`, `Toggle`, `DatePicker`, `RichTextEditor` (tiptap-based Markdown/HTML editor with menu bar and optional floating toolbar), `FloatingToolbar` (tiptap bubble-menu toolbar)
|
|
42
|
-
- Status: `
|
|
43
|
-
- Saved views: `TableControls` (or `DataTable.controls`) requires `onSetDefaultView` and `onUnsetDefaultView` together, or neither. Editable views offer "Set as default" / "Unset default" based on `view.isDefault`; the design system confirms before calling either callback and warns that both changes affect the entire organization. Consumers own persistence and must remove their own confirmations to avoid double prompts. Compact controls omit saved views. Pass `starredDefaultView` to star the default view: the `isDefault` view is pinned first with a star icon, cannot be dragged, hidden, deleted or unset, and its menu offers only Save and
|
|
42
|
+
- Status: `StatusIndicator` (named lifecycle status, including version and deployment status), `Badge` (counts); `Sticker` is for tags and complementary labels, not status
|
|
43
|
+
- Saved views: `TableControls` (or `DataTable.controls`) requires `onSetDefaultView` and `onUnsetDefaultView` together, or neither. Editable views offer "Set as default" / "Unset default" based on `view.isDefault`; the design system confirms before calling either callback and warns that both changes affect the entire organization. Consumers own persistence and must remove their own confirmations to avoid double prompts. Compact controls omit saved views. Pass `starredDefaultView` to star the default view: the `isDefault` view is pinned first with a star icon, cannot be dragged, hidden, deleted or unset, and its menu offers only Save, Duplicate and Reset (its name field still renames it); every other view gets the full menu. Rename and Duplicate on it call `onViewNameChange` / `onDuplicateView` with its id; Save calls `onSaveView()` with no id, saving whatever the consumer treats as the current view. A null `currentView` is shown as the starred view, so `onSaveView` and toolbar Save must treat null as the starred view; while an `isDefault` view exists, pass its id as `currentView` rather than null. A lazy default is a consumer-owned placeholder view with `isDefault: true`. While a view is the default the built-in tab is not shown and a `null` `currentView` is displayed as the starred view; with no `isDefault` view the built-in tab is shown starred and read-only.
|
|
44
44
|
- DataTable filters: pass `filtersV2` (`TableControlsFiltersV2Props` / `FilterBarProps`) through `DataTable.controls` or directly to `TableControls` for a first-class FilterBar; defaults visible with size derived from `compact`. Hosts own V2 data filtering and feed `onChange` back to `initialState` for active-filter messaging; hydration needs no remount key. Precedence: `filterPanel` → `filtersV2` → legacy `filters`. Legacy `filters` supports `input`, `select`, `multiselect`, `combobox`, and `daterange` with optional `filterResolver`. With `clientFiltering`, `column.filter` generates legacy-only controls backed by TanStack column-filter state, not V2 filtering.
|
|
45
45
|
- SmartTextInput: when method chains are allowed (`ValueType.MethodChain` or `{{...}}` interpolation), you MUST pass `renderFunctionForm`. PDS does not build the function-parameter form, so without it the dialog opened by placing the cursor in a call like `convert_to(...)` shows only the function name over an empty body. It receives `FunctionFormRenderProps` and must call `onComplete(nodes)` or `onCancel()`. In persona-web, `useDashboardSmartTextInputProps` supplies it (backed by `InputMethodChain/FunctionForm`). See components/SmartTextInput/SmartTextInput.mdx.
|
|
46
46
|
- FilterBar: optional `FilterField.condition`, `pickerGroup`, and `disabledReason` support host-defined individual predicates in pills and native Rules; existing aggregate fields stay unchanged. See components/DataTable/DataTable.mdx. Hosts own feature activation and serialization.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@persona/design-system",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.10",
|
|
4
4
|
"description": "React components for Persona UI",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"tanstack-intent"
|
|
@@ -242,8 +242,8 @@
|
|
|
242
242
|
"@faker-js/faker": "^10.5.0",
|
|
243
243
|
"@figma/code-connect": "^1.4.4",
|
|
244
244
|
"@oxlint/plugins": "1.72.0",
|
|
245
|
-
"@persona/design-tokens": "0.4.
|
|
246
|
-
"@persona/icons": "0.1.
|
|
245
|
+
"@persona/design-tokens": "0.4.24",
|
|
246
|
+
"@persona/icons": "0.1.13",
|
|
247
247
|
"@storybook/react": "^10.6.2",
|
|
248
248
|
"@storybook/react-vite": "^10.6.2",
|
|
249
249
|
"@tanstack/intent": "^0.3.6",
|
|
@@ -63,7 +63,7 @@ exists. If there is no `.mdx`, use the published type declarations
|
|
|
63
63
|
| `Spinner` | Showing that something is loading | `@persona/design-system/components/Spinner` |
|
|
64
64
|
| `Stack` | Flex column — laying out children vertically with token spacing | `@persona/design-system/components/Stack` |
|
|
65
65
|
| `StatusIndicator` | Showing a named status (open, pending, completed, failed, …) | `@persona/design-system/components/StatusIndicator` |
|
|
66
|
-
| `Sticker` |
|
|
66
|
+
| `Sticker` | Tags and complementary labels on nearby content — not status (use `StatusIndicator`) | `@persona/design-system/components/Sticker` |
|
|
67
67
|
| `SwatchPicker` | Picking a color from a swatch list. Wrap with `FormField` | `@persona/design-system/components/SwatchPicker` |
|
|
68
68
|
| `TabBar`, `Tab` | Tabs — switching between related views or content sections | `@persona/design-system/components/TabBar` |
|
|
69
69
|
| `Table` | Displaying rows and columns with sticky headers, sort, and checkbox selection. Use `DataTable` when you need filtering, bulk actions, or search | `@persona/design-system/components/Table` |
|
|
@@ -20,6 +20,7 @@ Which pattern to use, and for what. Patterns with a dedicated doc link to
|
|
|
20
20
|
| LayoutLoadingShimmer | Filling space while content loads |
|
|
21
21
|
| [Panels](../../patterns/Panels/Panels.mdx) | Use `RightPanel` when the page should stay visible. Use `Modal` when the task needs full attention. Never a custom drawer. |
|
|
22
22
|
| [WizardModal](../../patterns/WizardModal/WizardModal.mdx) | A linear multi-step task behind a page overlay. |
|
|
23
|
+
| [Versioned resources: Page header](../../patterns/VersionedResources/VersionedResourcePageHeader.mdx) | Header order for a versioned resource (template, workflow, schedule): breadcrumbs → object status (icon) → deployment status (no icon) → version status (no icon) → actions (optional Last updated caption, then buttons, one primary rightmost). A code example, not a component: copy the stories and compose `PageHeader` + `StatusIndicator`; there is nothing to import |
|
|
23
24
|
| [CardGrouping](../../patterns/CardGrouping/CardGrouping.mdx) | Distinct records as cards in collapsible groups, for a clean view rather than querying or filtering. Optional controls sit under the list description |
|
|
24
25
|
|
|
25
26
|
|
|
@@ -198,6 +199,12 @@ Use `StatusIndicator` for a record’s named lifecycle state. Use `Sticker` for
|
|
|
198
199
|
| needs review / flagged | `needs_review` |
|
|
199
200
|
| canceled | `canceled` |
|
|
200
201
|
| archived | `archived` |
|
|
202
|
+
| version: draft / archived | `type="neutral" showIcon={false}` |
|
|
203
|
+
| version: published / deployment: deployed | `type="success" showIcon={false}` |
|
|
204
|
+
|
|
205
|
+
When several statuses sit together (a versioned resource header), only the object status keeps its
|
|
206
|
+
icon; version and deployment status are label-only. Don't use `status="archived"` for an archived
|
|
207
|
+
version — it adds a minus icon.
|
|
201
208
|
|
|
202
209
|
|
|
203
210
|
```tsx
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CardV2-BRJbRSts.mjs","names":["CardLoadingShimmer","Heading","Button","DropdownMenu"],"sources":["../src/components/CardV2/SectionHeading.tsx","../src/components/CardV2/Section.tsx","../src/components/CardV2/Card.tsx"],"sourcesContent":["import type { ComponentPropsWithoutRef, FC, ReactElement, ReactNode } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport { Color, Spacing, Typography } from '@persona/design-tokens';\nimport { ChevronDownIcon, MoreIcon } from '@persona/icons';\n\nimport Button, { IconButton } from '#src/components/Button';\nimport DropdownButton from '#src/components/DropdownButton';\nimport DropdownMenu from '#src/components/DropdownMenu';\nimport { LoadingShimmer } from '#src/components/LoadingShimmer';\nimport { HStack } from '#src/components/Stack';\nimport { Heading } from '#src/components/Text';\nimport Tooltip from '#src/components/Tooltip';\nimport { HeadlessAriaButton } from '#src/lib/HeadlessAriaButton';\nimport { semanticColor } from '#src/lib/semanticColor';\nimport { TruncatedText } from '#src/lib/TruncatedText';\nimport { focusStyle } from '#src/mixins/focus';\nimport type { HeadingSize } from '#src/mixins/text';\nimport type { IconAction, MenuAction, TextAction } from '#src/types/Action';\nimport { TransitionDuration } from '#src/variables/transitions';\n\n/**\n * Distance from the top of a card to the underside of an expanded top-section heading: the\n * `Spacing[4]` padding above and below a 24px title line, plus the divider. Sticky content inside\n * the card pins here so the heading's divider stays the only line between them.\n */\nexport const CARD_HEADING_STICKY_OFFSET = `calc(${Spacing[9]} + 1px)`;\n\nconst CardLoadingShimmer = styled(LoadingShimmer)`\n border-radius: ${({ theme }) => theme.card.borderRadius};\n`;\n\nconst StickerContainer = styled.div`\n display: flex;\n max-width: 180px;\n`;\n\ntype AccordionContainerProps = {\n $isTopSection: boolean;\n $expanded: boolean;\n};\nconst AccordionContainer = styled.div<AccordionContainerProps>`\n transition: opacity ${TransitionDuration.Faster};\n position: absolute;\n opacity: 0;\n\n height: 12px;\n width: 12px;\n display: flex;\n align-items: center;\n /* Because of padding in the top section heading we need to offset differently. */\n /* We want a 12px icon to be off-center in 24px padding, 4px on the right and 8px on the left */\n left: ${({ $isTopSection }) => ($isTopSection ? '8px' : '-16px')};\n /* center the icon vertically */\n top: calc(50% - 6px);\n\n border-radius: 1px;\n\n & svg {\n transition: transform ${TransitionDuration.Faster} ease-out;\n transform: rotate(${({ $expanded }) => ($expanded ? '0' : '-90deg')});\n }\n`;\n\nconst HeaderButton = styled(HeadlessAriaButton)`\n min-width: 0;\n flex: 1;\n\n &:hover ~ ${AccordionContainer} {\n opacity: 1;\n }\n\n &:focus-visible ~ ${AccordionContainer} {\n opacity: 1;\n ${focusStyle}\n }\n`;\n\ntype HeadingContainerProps = {\n $isTopSection: boolean;\n $divider: boolean;\n $hasFooter: boolean;\n $isExpanded: boolean;\n};\nconst HeadingContainer = styled(HStack)<HeadingContainerProps>`\n position: relative;\n\n ${({ $isTopSection }) =>\n $isTopSection &&\n css`\n padding: ${Spacing[4]} ${Spacing[5]};\n `}\n ${({ $divider }) =>\n $divider &&\n css`\n border-bottom: 1px solid ${({ theme }) => semanticColor(theme, 'BorderSubtle', Color.BorderDivider)};\n `}\n ${({ $isTopSection, $hasFooter, $isExpanded }) =>\n $isTopSection &&\n !$hasFooter &&\n !$isExpanded &&\n css`\n // We apply 4px of whitespace to the bottom of the card container so that content has a buffer\n // when being scrolled and still appears inside the card. Here we adjust, subtracting\n // 4px from the 16px padding.\n padding-bottom: ${Spacing[3]};\n `}\n`;\n\ntype StyledHeadingProps = {\n $isCollapsible: boolean;\n $isTopSection: boolean;\n size: HeadingSize;\n};\nconst StyledHeading = styled(Heading)<StyledHeadingProps>`\n flex: 1;\n display: flex;\n align-items: center;\n gap: ${Spacing[2]};\n line-height: 24px; // We want an adjusted line-height to hit the target header size.\n overflow: hidden;\n\n ${({ $isCollapsible }) => $isCollapsible && 'cursor: pointer;'}\n ${({ $isTopSection }) =>\n !$isTopSection &&\n css`\n ${Typography.TextLargeBold};\n `}\n`;\n\nconst isIconAction = (action: IconAction | TextAction): action is IconAction => 'icon' in action;\n\nconst ButtonRow: FC<{\n actions: (IconAction | TextAction)[];\n menuActions: MenuAction[];\n}> = ({ actions, menuActions }) => {\n const buttons = actions\n .filter((action) => !action.hidden)\n .map((action, i) => {\n const key = isIconAction(action)\n ? (action.id ?? action.ariaLabel ?? `action-${i}`)\n : (action.id ?? action.label ?? `action-${i}`);\n\n const button = isIconAction(action) ? (\n <IconButton\n id={action.id}\n key={key}\n to={action.to}\n onClick={(e) => {\n e.stopPropagation();\n return action.onClick?.(e);\n }}\n disabled={action.disabled}\n aria-label={action.ariaLabel}\n size='sm'\n >\n {action.icon}\n </IconButton>\n ) : (\n <Button\n id={action.id}\n key={key}\n aria-label={action.ariaLabel}\n to={action.to}\n onClick={(e) => {\n e.stopPropagation();\n return action.onClick?.(e);\n }}\n disabled={action.disabled}\n variant={action.variant ?? 'basic'}\n size='sm'\n width='auto'\n prefixIcon={action.prefixIcon}\n suffixIcon={action.suffixIcon}\n >\n {action.label}\n </Button>\n );\n\n return action.tooltip ? (\n <Tooltip key={key} {...action.tooltipProps} trigger={button}>\n {action.tooltip}\n </Tooltip>\n ) : (\n button\n );\n });\n\n return (\n <HStack>\n {buttons}\n {menuActions.length > 0 && (\n <DropdownButton\n variant='text'\n width='icon'\n size='sm'\n suffixIcon={undefined}\n style={{ justifySelf: 'flex-end' }}\n aria-label='More actions'\n menuProps={{\n portal: true,\n }}\n menuItems={menuActions\n .filter((action) => !action.hidden)\n .map((action) => (\n <DropdownMenu.Item\n id={action.id ?? action.label}\n key={action.id ?? action.label}\n onClick={action.onClick}\n disabled={action.disabled}\n >\n {action.label}\n </DropdownMenu.Item>\n ))}\n >\n <MoreIcon />\n </DropdownButton>\n )}\n </HStack>\n );\n};\n\n/**\n * Private component for rendering the heading of a section, both the primary card heading and\n * section headings.\n */\nexport const SectionHeading: FC<{\n /**\n * Whether this is the top-level section of the card which has different visual treatment.\n */\n isTopSection: boolean;\n\n /**\n * Whether this heading's section has content.\n */\n sectionHasContent: boolean;\n\n /**\n * Whether this heading's section has a footer.\n */\n hasFooter: boolean;\n\n loading: boolean;\n\n /**\n * Title text to render in the heading.\n */\n title: string;\n\n /**\n * Optional sticker to render after the title.\n */\n sticker?: ReactElement;\n\n /**\n * Optional icon to render before the title text.\n *\n * Usage of this icon slot should be avoided if possible to maintain left-text alignement. If\n * using this icon slot for a section heading use it for all sections.\n */\n leftDecorativeIcon?: ReactElement;\n\n /**\n * Optional actions to render in the heading.\n * Only accepts IconButton or Button components with specific prop restrictions.\n */\n actions?: (IconAction | TextAction | undefined)[];\n\n /**\n * Optional actions to render in the heading in a menu.\n */\n menuActions?: (MenuAction | undefined)[];\n\n /**\n * Optional custom content to render in the heading in the button row. Prefer setting `actions` or\n * `menuActions` if possible.\n */\n headerActionsRowContent?: ReactNode;\n\n /**\n * Callback to toggle collapsed state of the section. Omit to disable collapsing.\n */\n toggle?: () => void;\n\n /**\n * Whether the section is currently expanded or collapsed.\n */\n isExpanded: boolean;\n\n /**\n * Optional props to pass to the heading element. Accepts an `as` key to override the\n * rendered heading level. Defaults to `h2` for the top-level card heading and `h3` for\n * section headings so that the document heading hierarchy reflects the visual hierarchy.\n */\n headingProps?: Omit<ComponentPropsWithoutRef<'span'>, 'color'> & {\n as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';\n };\n}> = ({\n isTopSection,\n sectionHasContent,\n hasFooter,\n loading,\n title,\n actions = [],\n menuActions = [],\n headerActionsRowContent,\n sticker,\n leftDecorativeIcon,\n toggle,\n isExpanded,\n headingProps,\n}) => {\n const renderButtonRow = actions.length > 0 || menuActions.length > 0;\n const { as: headingAs, ...restHeadingProps } = headingProps ?? {};\n\n return (\n <HeadingContainer\n $isTopSection={isTopSection}\n $hasFooter={hasFooter}\n $isExpanded={isExpanded}\n $divider={isTopSection && isExpanded && sectionHasContent}\n align='center'\n justify='space-between'\n spacing={Spacing[2]}\n >\n {loading ? (\n <CardLoadingShimmer height='24px' width='200px' />\n ) : (\n <>\n {/* https://github.com/adobe/react-spectrum/issues/7444 */}\n <HeaderButton slot='trigger' isDisabled={!toggle}>\n <StyledHeading\n forwardedAs={headingAs ?? (isTopSection ? 'h2' : 'h3')}\n size='xsm'\n $isCollapsible={!!toggle}\n $isTopSection={isTopSection}\n aria-label={title}\n {...restHeadingProps}\n >\n {leftDecorativeIcon}\n <TruncatedText>{title}</TruncatedText>\n {sticker && <StickerContainer>{sticker}</StickerContainer>}\n </StyledHeading>\n </HeaderButton>\n {headerActionsRowContent}\n {renderButtonRow && (\n <ButtonRow\n actions={actions.filter((action) => action != null)}\n menuActions={menuActions.filter((action) => action != null)}\n />\n )}\n {toggle && (\n <AccordionContainer $isTopSection={isTopSection} $expanded={isExpanded}>\n <ChevronDownIcon />\n </AccordionContainer>\n )}\n </>\n )}\n </HeadingContainer>\n );\n};\n","import type { ComponentProps, FC, ReactNode } from 'react';\nimport { Disclosure, DisclosurePanel } from 'react-aria-components';\nimport styled, { css } from 'styled-components';\n\nimport { Color, Spacing } from '@persona/design-tokens';\n\nimport { SectionHeading } from '#src/components/CardV2/SectionHeading';\nimport { LoadingShimmer } from '#src/components/LoadingShimmer';\nimport { HStack } from '#src/components/Stack';\nimport { Paragraph } from '#src/components/Text';\nimport { intersperse } from '#src/lib/intersperse';\nimport { semanticColor } from '#src/lib/semanticColor';\nimport { Z_INDICES } from '#src/lib/zindex';\n\nconst FooterParagraph = styled(Paragraph)`\n line-height: 16px;\n`;\n\ntype FooterContainerProps = {\n $divider: boolean;\n};\nconst FooterContainer = styled.div<FooterContainerProps>`\n ${({ $divider }) =>\n $divider &&\n css`\n border-top: 1px solid ${({ theme }) => semanticColor(theme, 'BorderSubtle', Color.BorderDivider)};\n `}\n padding: ${Spacing[3]} ${Spacing[5]} ${Spacing[2]};\n`;\n\ntype MaybeStickyContainerProps = {\n $enabled: boolean;\n $bottom?: boolean;\n};\nconst MaybeStickyContainer = styled.div<MaybeStickyContainerProps>`\n ${({ $enabled }) =>\n $enabled &&\n css`\n // We are using sticky positioning here to have consistent scrollbar behavior between\n // different card configurations. Usage of sticky allows us to keep the scroll container at\n // the top of the card DOM structure regardless of whether the heading or footer is sticky.\n //\n // This also afaict helps eliminate the need to carry height values through the card DOM\n // structure to the content container (and possibly needing to adjust heights for heading and footer).\n position: sticky;\n top: 0;\n background-color: ${({ theme }) => semanticColor(theme, 'SurfacePrimary', theme.color.background.primary)};\n z-index: ${Z_INDICES.sticky};\n `}\n\n ${({ $bottom = false }) =>\n $bottom &&\n css`\n top: unset;\n bottom: 0;\n `}\n`;\n\ntype StyledDisclosureProps = {\n $fullHeight: boolean;\n};\nconst StyledDisclosure = styled(Disclosure)<StyledDisclosureProps>`\n display: flex;\n flex-direction: column;\n gap: 0;\n ${({ $fullHeight }) =>\n $fullHeight &&\n css`\n height: 100%;\n `}\n`;\n\ntype StyledDisclosurePanelProps = {\n $isTopSection: boolean;\n};\nconst StyledDisclosurePanel = styled(DisclosurePanel)<StyledDisclosurePanelProps>`\n flex: 1;\n ${({ $isTopSection }) =>\n $isTopSection &&\n css`\n // Safari does not support hidden='until-found' so react-aria uses display: none instead.\n // Since react-aria is using display to hide content we need to not set display ourselves.\n &:not([aria-hidden='true']) {\n display: flex;\n }\n `}\n`;\n\nconst CardLoadingShimmer = styled(LoadingShimmer)`\n border-radius: ${({ theme }) => theme.card.borderRadius};\n`;\n\ntype SectionContentContainerProps = {\n $isTopSection: boolean;\n $hasHeading: boolean;\n $hasFooter: boolean;\n};\nconst SectionContentContainer = styled.div<SectionContentContainerProps>`\n ${({ $isTopSection }) =>\n $isTopSection &&\n css`\n padding: ${Spacing[5]};\n display: flex;\n flex-direction: column;\n gap: ${Spacing[5]};\n flex: 1;\n /* Prevent grid blowout https://css-tricks.com/preventing-a-grid-blowout/ */\n min-width: 0;\n `}\n\n ${({ $isTopSection, $hasHeading }) =>\n !$isTopSection &&\n $hasHeading &&\n css`\n padding-top: ${Spacing[3]};\n `}\n\n ${({ $isTopSection, $hasFooter }) =>\n $isTopSection &&\n !$hasFooter &&\n css`\n // We apply 4px of whitespace to the bottom of the card container so that content has a buffer\n // when being scrolled and still appears inside the card. Here we adjust, subtracting\n // 4px from the 24px padding.\n padding-bottom: 20px;\n `}\n`;\n\n/**\n * Private component for rendering sections of the card, both the primary card section and\n * individual sections.\n */\nexport const Section: FC<{\n children?: ReactNode;\n\n /**\n * Whether this is the top-level section of the card which has different visual treatment.\n */\n isTopSection: boolean;\n\n /**\n * Available props for the section's heading.\n */\n heading?: Pick<\n ComponentProps<typeof SectionHeading>,\n | 'title'\n | 'actions'\n | 'menuActions'\n | 'headerActionsRowContent'\n | 'sticker'\n | 'leftDecorativeIcon'\n | 'headingProps'\n >;\n\n /**\n * Optional footer to render at the bottom of the card. Footer content is rendered as a\n * paragraph with the items separated by a dot.\n */\n footer?: ReactNode[];\n\n /**\n * Optional arbitrary footer content to render as-is.\n */\n footerContent?: ReactNode;\n\n /**\n * Whether the section is collapsible.\n */\n collapsible?: boolean;\n\n /**\n * Whether the section heading and footer are sticky.\n */\n sticky?: boolean;\n\n /**\n * Whether the section is initially collapsed.\n */\n defaultCollapsed?: boolean;\n\n /**\n * If true, the section will be rendered in a loading state.\n */\n loading?: boolean;\n\n /**\n * Set height of the loading state.\n */\n loadingProps?: {\n height?: string;\n };\n\n /**\n * Control display of the empty state.\n */\n empty?: boolean;\n\n /**\n * Props for the empty state.\n */\n emptyProps?: {\n /**\n * Empty state message.\n */\n message?: string;\n };\n\n fullHeight?: boolean;\n}> = ({\n children,\n isTopSection,\n heading,\n footer,\n footerContent,\n loading = false,\n loadingProps,\n empty = false,\n emptyProps,\n defaultCollapsed = false,\n collapsible = false,\n sticky = false,\n fullHeight = false,\n}) => {\n let content: ReactNode;\n if (loading) {\n content = <CardLoadingShimmer height={loadingProps?.height ?? '200px'} width='100%' />;\n } else if (empty) {\n content = <Paragraph>{emptyProps?.message ?? 'No data collected'}</Paragraph>;\n } else {\n content = children;\n }\n\n const hasFooter = !!(footer || footerContent);\n const hasContent = !!content;\n\n // Normally we would have `isDisabled` as well but there's a react-aria-components quirk\n // that sets `hidden` on the disclosure panel if both `defaultExpanded` and `isDisabled` are true.\n // https://github.com/adobe/react-spectrum/issues/7444\n return (\n <StyledDisclosure defaultExpanded={!defaultCollapsed} $fullHeight={fullHeight}>\n {({ isExpanded, state }) => (\n <>\n {heading && (\n <MaybeStickyContainer $enabled={sticky}>\n <SectionHeading\n isTopSection={isTopSection}\n hasFooter={hasFooter}\n sectionHasContent={hasContent}\n loading={loading}\n toggle={collapsible ? state.toggle : undefined}\n isExpanded={isExpanded}\n {...heading}\n />\n </MaybeStickyContainer>\n )}\n {hasContent && (\n <StyledDisclosurePanel $isTopSection={isTopSection}>\n <SectionContentContainer\n $isTopSection={isTopSection}\n $hasHeading={!!heading}\n $hasFooter={hasFooter}\n >\n {content}\n </SectionContentContainer>\n </StyledDisclosurePanel>\n )}\n {hasFooter && (\n <MaybeStickyContainer $enabled={sticky} $bottom>\n <FooterContainer $divider={hasContent}>\n {loading ? (\n <HStack>\n <CardLoadingShimmer height='16px' width='120px' />\n <CardLoadingShimmer height='16px' width='120px' />\n </HStack>\n ) : (\n <>\n {footer && (\n <FooterParagraph size='sm'>\n <HStack spacing={Spacing[1]}>\n {intersperse(\n footer\n .filter((item) => item != null)\n .map((item, i) => <span key={`footer-item-${i}`}>{item}</span>),\n (i) => (\n <span key={i}>•</span>\n ),\n )}\n </HStack>\n </FooterParagraph>\n )}\n {footerContent}\n </>\n )}\n </FooterContainer>\n </MaybeStickyContainer>\n )}\n </>\n )}\n </StyledDisclosure>\n );\n};\n","import { type ComponentProps, createContext, type FC, type ReactNode, useContext } from 'react';\nimport { ErrorBoundary } from 'react-error-boundary';\nimport styled from 'styled-components';\n\nimport { Color } from '@persona/design-tokens';\n\nimport { Section } from '#src/components/CardV2/Section';\nimport { Paragraph } from '#src/components/Text';\nimport ConfigContext from '#src/lib/ConfigContext';\nimport { intersperse } from '#src/lib/intersperse';\nimport { semanticColor } from '#src/lib/semanticColor';\nimport { semanticScrollbar } from '#src/mixins/scrollbar';\n\nconst CardContainer = styled.div`\n border-radius: ${({ theme }) => theme.card.borderRadius};\n background-color: ${({ theme }) => semanticColor(theme, 'SurfacePrimary', theme.color.background.primary)};\n // Height has been tricky here.\n // inherit seems to work well for both grid and flexbox layouts. In a grid we want this\n // container to receive the full cell height, In a flexbox we want this container to flex, maintaining\n // the minimum height for it's content.\n height: inherit;\n overflow-y: auto;\n ${semanticScrollbar}\n\n box-sizing: border-box;\n // Small buffer so that content is not scrolling right on the edge of the card.\n border-bottom: 4px solid ${({ theme }) => semanticColor(theme, 'SurfacePrimary', theme.color.background.primary)};\n`;\n\nconst CardContext = createContext<{ isStacked?: boolean }>({});\n\nconst Divider = styled.hr`\n margin: 0;\n border: none;\n border-top: 1px solid ${({ theme }) => semanticColor(theme, 'BorderSubtle', Color.BorderDivider)};\n`;\n\n/**\n * Renders a card section.\n */\nconst PublicSection: FC<\n Pick<\n ComponentProps<typeof Section>,\n | 'children'\n | 'collapsible'\n | 'defaultCollapsed'\n | 'heading'\n | 'loading'\n | 'loadingProps'\n | 'empty'\n | 'emptyProps'\n >\n> = (props) => {\n return <Section isTopSection={false} {...props} />;\n};\n\n/**\n * Render the card in a \"stacked\" mode. Used for rendering multiple cards on top of each other\n * that appear visually as a single card.\n */\nconst Stacked: FC<{\n children: ReactNode[];\n}> = ({ children }) => {\n return (\n <CardContext.Provider value={{ isStacked: true }}>\n <CardContainer>\n {intersperse(children, (i) => (\n <Divider key={i} />\n ))}\n </CardContainer>\n </CardContext.Provider>\n );\n};\n\nconst DEFAULT_ERROR_MESSAGE = 'Something went wrong loading this card.';\n\n/**\n * Renders a PDS Card.\n *\n * To render sections of the card use `<Card.Section>...</Card.Section>`\n */\nconst Card: FC<\n {\n /**\n * Optional footer to render at the bottom of the card. Footer content is rendered as a\n * paragraph with the items separated by a dot.\n */\n footer?: ReactNode[];\n\n /**\n * Optional arbitrary footer content to render as-is.\n */\n footerContent?: ReactNode;\n\n /**\n * Whether the card heading and footer are sticky.\n */\n sticky?: boolean;\n\n /**\n * Force the card to render in an errored state. Errors bubbling up from children will also\n * render the errored state.\n */\n errored?: boolean;\n\n /**\n * Props for the errored state.\n */\n erroredProps?: {\n /**\n * Message to render in the errored state.\n */\n message?: string;\n /**\n * Callback to handle errors. Note this callback is only called when the error is bubbled up\n * from children, not when `errored` is set to true.\n */\n onError?: (error: Error) => void;\n };\n\n containerProps?: ComponentProps<typeof CardContainer>;\n\n /**\n * Whether the card should render its content with 100% height. This is a bit of a hack for cards\n * that want full control of their content and don't use sections.\n */\n fullHeight?: boolean;\n } & ComponentProps<typeof PublicSection>\n> = ({ children, errored, erroredProps, containerProps, sticky = true, ...sectionProps }) => {\n const { isStacked = false } = useContext(CardContext);\n const { captureException } = useContext(ConfigContext);\n\n const errorFallback = (\n <Section isTopSection {...sectionProps}>\n <Paragraph>{erroredProps?.message ?? DEFAULT_ERROR_MESSAGE}</Paragraph>\n </Section>\n );\n\n const section = (\n <Section isTopSection sticky={sticky} {...sectionProps}>\n {children}\n </Section>\n );\n\n return (\n <ErrorBoundary\n fallback={\n isStacked ? (\n errorFallback\n ) : (\n <CardContainer {...containerProps}>{errorFallback}</CardContainer>\n )\n }\n onError={erroredProps?.onError ?? ((error) => captureException(error))}\n >\n {isStacked ? (\n <>{errored ? <>{errorFallback}</> : <>{section}</>}</>\n ) : (\n <CardContainer {...containerProps}>\n {errored ? <>{errorFallback}</> : <>{section}</>}\n </CardContainer>\n )}\n </ErrorBoundary>\n );\n};\n\nexport default Object.assign(Card, {\n Section: PublicSection,\n Stacked: Stacked,\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,MAAa,6BAA6B,QAAQ,QAAQ,GAAG;AAE7D,MAAMA,uBAAqB,OAAO,eAAe;oBAC7B,EAAE,YAAY,MAAM,KAAK,aAAa;;AAG1D,MAAM,mBAAmB,OAAO,GAAG;;;;AASnC,MAAM,qBAAqB,OAAO,GAA4B;gCACZ;;;;;;;;;;WAUvC,EAAE,oBAAqB,gBAAgB,QAAQ,QAAS;;;;;;;oCAOb;yBAC7B,EAAE,gBAAiB,YAAY,MAAM,SAAU;;;AAIxE,MAAM,eAAe,OAAO,mBAAmB;;;;cAIjC,mBAAmB;;;;sBA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,uBAAkC,CAAA;EAC/D,CAAA;CAGZ,MAAM,UACJ,oBAAC,SAAD;EAAS,cAAA;EAAqB;EAAQ,GAAI;EACvC;EACO,CAAA;AAGZ,QACE,oBAAC,eAAD;EACE,UACE,YACE,gBAEA,oBAAC,eAAD;GAAe,GAAI;aAAiB;GAA8B,CAAA;EAGtE,SAAS,cAAc,aAAa,UAAU,iBAAiB,MAAM;YAEpE,YACC,oBAAA,YAAA,EAAA,UAAG,UAAU,oBAAA,YAAA,EAAA,UAAG,eAAiB,CAAA,GAAG,oBAAA,YAAA,EAAA,UAAG,SAAW,CAAA,EAAI,CAAA,GAEtD,oBAAC,eAAD;GAAe,GAAI;aAChB,UAAU,oBAAA,YAAA,EAAA,UAAG,eAAiB,CAAA,GAAG,oBAAA,YAAA,EAAA,UAAG,SAAW,CAAA;GAClC,CAAA;EAEJ,CAAA;;AAIpB,IAAA,eAAe,OAAO,OAAO,MAAM;CACjC,SAAS;CACA;CACV,CAAC"}
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { a as styled } from "./styledComponentsInterop-Cs5CCPRy.mjs";
|
|
2
|
-
import { semanticColor, semanticOnly } from "./lib/semanticColor.mjs";
|
|
3
|
-
import { i as Paragraph, n as Heading } from "./Text-D0vEReED.mjs";
|
|
4
|
-
import { t as Breadcrumbs } from "./Breadcrumbs-Dft2TR4v.mjs";
|
|
5
|
-
import { Spacing } from "@persona/design-tokens";
|
|
6
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
-
//#region src/components/PageHeader/PageHeader.tsx
|
|
8
|
-
const PageHeaderContainer = styled.header`
|
|
9
|
-
display: flex;
|
|
10
|
-
width: 100%;
|
|
11
|
-
justify-content: space-between;
|
|
12
|
-
align-items: center;
|
|
13
|
-
padding: ${Spacing[3]} ${Spacing[5]};
|
|
14
|
-
background-color: ${({ theme }) => semanticColor(theme, "SurfacePrimary", theme.color.background.primary)};
|
|
15
|
-
border-bottom: 1px solid ${({ theme }) => semanticColor(theme, "BorderDivider", theme.color.border.primary)};
|
|
16
|
-
box-sizing: border-box;
|
|
17
|
-
min-height: 56px; /* Standardize height for most PageHeaders */
|
|
18
|
-
`;
|
|
19
|
-
const TitleContainer = styled.div`
|
|
20
|
-
display: flex;
|
|
21
|
-
flex: 0 1 auto;
|
|
22
|
-
min-width: 0;
|
|
23
|
-
align-items: center;
|
|
24
|
-
h1 {
|
|
25
|
-
margin: 0;
|
|
26
|
-
${semanticOnly((tokens) => `color: ${tokens.FgPrimary};`)}
|
|
27
|
-
}
|
|
28
|
-
p {
|
|
29
|
-
margin: 0 0 0 ${Spacing[2]};
|
|
30
|
-
${semanticOnly((tokens) => `color: ${tokens.FgSecondary};`)}
|
|
31
|
-
}
|
|
32
|
-
`;
|
|
33
|
-
const LeftContainer = styled.div`
|
|
34
|
-
display: flex;
|
|
35
|
-
flex: 1 1 auto;
|
|
36
|
-
align-items: center;
|
|
37
|
-
gap: ${Spacing[2]};
|
|
38
|
-
min-width: 0;
|
|
39
|
-
& > :not(${TitleContainer}) {
|
|
40
|
-
flex-shrink: 0;
|
|
41
|
-
}
|
|
42
|
-
`;
|
|
43
|
-
const RightContainer = styled.div`
|
|
44
|
-
display: flex;
|
|
45
|
-
gap: ${Spacing[2]};
|
|
46
|
-
margin-left: ${Spacing[3]};
|
|
47
|
-
flex-shrink: 0;
|
|
48
|
-
`;
|
|
49
|
-
const PageHeader = ({ title, breadcrumbs, subtitle, level = "product", prepend, append, children, ...props }) => /* @__PURE__ */ jsxs(PageHeaderContainer, {
|
|
50
|
-
...props,
|
|
51
|
-
children: [/* @__PURE__ */ jsxs(LeftContainer, { children: [
|
|
52
|
-
prepend,
|
|
53
|
-
/* @__PURE__ */ jsxs(TitleContainer, { children: [breadcrumbs ? /* @__PURE__ */ jsx(Breadcrumbs, {
|
|
54
|
-
size: "lg",
|
|
55
|
-
...breadcrumbs
|
|
56
|
-
}) : /* @__PURE__ */ jsxs(Fragment, { children: [level === "product" && /* @__PURE__ */ jsx(Heading, {
|
|
57
|
-
as: "h1",
|
|
58
|
-
size: "sm",
|
|
59
|
-
children: title
|
|
60
|
-
}), level === "detail" && /* @__PURE__ */ jsx(Paragraph, {
|
|
61
|
-
as: "h1",
|
|
62
|
-
size: "lg",
|
|
63
|
-
color: "primary",
|
|
64
|
-
children: title
|
|
65
|
-
})] }), subtitle && /* @__PURE__ */ jsx(Paragraph, {
|
|
66
|
-
size: "md",
|
|
67
|
-
children: subtitle
|
|
68
|
-
})] }),
|
|
69
|
-
append
|
|
70
|
-
] }), children && /* @__PURE__ */ jsx(RightContainer, { children })]
|
|
71
|
-
});
|
|
72
|
-
//#endregion
|
|
73
|
-
export { PageHeaderContainer as n, PageHeader as t };
|
|
74
|
-
|
|
75
|
-
//# sourceMappingURL=PageHeader-DEKTopzU.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PageHeader-DEKTopzU.mjs","names":[],"sources":["../src/components/PageHeader/PageHeader.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport styled from 'styled-components';\n\nimport { Spacing } from '@persona/design-tokens';\n\nimport Breadcrumbs, { type BreadcrumbsProps } from '#src/components/Breadcrumbs';\nimport { Heading, Paragraph } from '#src/components/Text';\nimport { semanticColor, semanticOnly } from '#src/lib/semanticColor';\n\nexport const PageHeaderContainer = styled.header`\n display: flex;\n width: 100%;\n justify-content: space-between;\n align-items: center;\n padding: ${Spacing[3]} ${Spacing[5]};\n background-color: ${({ theme }) => semanticColor(theme, 'SurfacePrimary', theme.color.background.primary)};\n border-bottom: 1px solid ${({ theme }) => semanticColor(theme, 'BorderDivider', theme.color.border.primary)};\n box-sizing: border-box;\n min-height: 56px; /* Standardize height for most PageHeaders */\n`;\n\nconst TitleContainer = styled.div`\n display: flex;\n flex: 0 1 auto;\n min-width: 0;\n align-items: center;\n h1 {\n margin: 0;\n ${semanticOnly((tokens) => `color: ${tokens.FgPrimary};`)}\n }\n p {\n margin: 0 0 0 ${Spacing[2]};\n ${semanticOnly((tokens) => `color: ${tokens.FgSecondary};`)}\n }\n`;\n\nconst LeftContainer = styled.div`\n display: flex;\n flex: 1 1 auto;\n align-items: center;\n gap: ${Spacing[2]};\n min-width: 0;\n & > :not(${TitleContainer}) {\n flex-shrink: 0;\n }\n`;\n\nconst RightContainer = styled.div`\n display: flex;\n gap: ${Spacing[2]};\n margin-left: ${Spacing[3]};\n flex-shrink: 0;\n`;\n\ninterface PageHeaderCommonProps {\n level?: 'product' | 'detail';\n prepend?: ReactNode;\n append?: ReactNode;\n children?: ReactNode;\n}\n\n/** Exactly one heading source is required: either `title` or `breadcrumbs`. */\nexport type PageHeaderProps = PageHeaderCommonProps &\n (\n | { title: ReactNode; subtitle?: ReactNode; breadcrumbs?: never }\n | {\n title?: never;\n /**\n * The subtitle is sunset in the breadcrumbs variant (PX-1299); fold the value it\n * carried (e.g. an object ID) into the current crumb, with a copy action if useful.\n */\n subtitle?: never;\n /** Renders in place of `title`; the current crumb becomes the page `h1`, at `lg` size. */\n breadcrumbs: BreadcrumbsProps;\n }\n );\n\nconst PageHeader = ({\n title,\n breadcrumbs,\n subtitle,\n level = 'product',\n prepend,\n append,\n children,\n ...props\n}: PageHeaderProps) => (\n <PageHeaderContainer {...props}>\n <LeftContainer>\n {prepend}\n <TitleContainer>\n {breadcrumbs ? (\n <Breadcrumbs size='lg' {...breadcrumbs} />\n ) : (\n <>\n {level === 'product' && (\n <Heading as='h1' size='sm'>\n {title}\n </Heading>\n )}\n {level === 'detail' && (\n <Paragraph as='h1' size='lg' color='primary'>\n {title}\n </Paragraph>\n )}\n </>\n )}\n {subtitle && <Paragraph size='md'>{subtitle}</Paragraph>}\n </TitleContainer>\n {append}\n </LeftContainer>\n {children && <RightContainer>{children}</RightContainer>}\n </PageHeaderContainer>\n);\n\nexport default PageHeader;\n"],"mappings":";;;;;;;AASA,MAAa,sBAAsB,OAAO,MAAM;;;;;aAKnC,QAAQ,GAAG,GAAG,QAAQ,GAAG;uBACf,EAAE,YAAY,cAAc,OAAO,kBAAkB,MAAM,MAAM,WAAW,QAAQ,CAAC;8BAC9E,EAAE,YAAY,cAAc,OAAO,iBAAiB,MAAM,MAAM,OAAO,QAAQ,CAAC;;;;AAK9G,MAAM,iBAAiB,OAAO,GAAG;;;;;;;MAO3B,cAAc,WAAW,UAAU,OAAO,UAAU,GAAG,CAAC;;;oBAG1C,QAAQ,GAAG;MACzB,cAAc,WAAW,UAAU,OAAO,YAAY,GAAG,CAAC;;;AAIhE,MAAM,gBAAgB,OAAO,GAAG;;;;SAIvB,QAAQ,GAAG;;aAEP,eAAe;;;;AAK5B,MAAM,iBAAiB,OAAO,GAAG;;SAExB,QAAQ,GAAG;iBACH,QAAQ,GAAG;;;AA2B5B,MAAM,cAAc,EAClB,OACA,aACA,UACA,QAAQ,WACR,SACA,QACA,UACA,GAAG,YAEH,qBAAC,qBAAD;CAAqB,GAAI;WAAzB,CACE,qBAAC,eAAD,EAAA,UAAA;EACG;EACD,qBAAC,gBAAD,EAAA,UAAA,CACG,cACC,oBAAC,aAAD;GAAa,MAAK;GAAK,GAAI;GAAe,CAAA,GAE1C,qBAAA,UAAA,EAAA,UAAA,CACG,UAAU,aACT,oBAAC,SAAD;GAAS,IAAG;GAAK,MAAK;aACnB;GACO,CAAA,EAEX,UAAU,YACT,oBAAC,WAAD;GAAW,IAAG;GAAK,MAAK;GAAK,OAAM;aAChC;GACS,CAAA,CAEb,EAAA,CAAA,EAEJ,YAAY,oBAAC,WAAD;GAAW,MAAK;aAAM;GAAqB,CAAA,CACzC,EAAA,CAAA;EAChB;EACa,EAAA,CAAA,EACf,YAAY,oBAAC,gBAAD,EAAiB,UAA0B,CAAA,CACpC"}
|