@bfrs/agentic-components 0.8.9 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/BFRS_AGENTIC_COMPONENTS.md +9 -6
- package/README.md +50 -2
- package/dist/components/data-display/DataTable/DataTable.js +365 -337
- package/dist/components/data-display/DataTable/DataTable.js.map +1 -1
- package/dist/components/data-display/DataTable/TableColumnVisibility.js +33 -26
- package/dist/components/data-display/DataTable/TableColumnVisibility.js.map +1 -1
- package/dist/components/data-display/DataTable/TablePagination.js +36 -35
- package/dist/components/data-display/DataTable/TablePagination.js.map +1 -1
- package/dist/components/data-display/DataTable/TableSaveView.js +20 -18
- package/dist/components/data-display/DataTable/TableSaveView.js.map +1 -1
- package/dist/components/data-display/DataTable/TableViewSelector.js +279 -263
- package/dist/components/data-display/DataTable/TableViewSelector.js.map +1 -1
- package/dist/components/data-display/Table/Table.js +32 -25
- package/dist/components/data-display/Table/Table.js.map +1 -1
- package/dist/components/feedback/Toast/Toast.js +1 -1
- package/dist/components/feedback/Toast/Toast.js.map +1 -1
- package/dist/components/filters/DateRangePicker/DateRangePicker.js +348 -331
- package/dist/components/filters/DateRangePicker/DateRangePicker.js.map +1 -1
- package/dist/components/filters/FilterBar/FilterBar.js +18 -17
- package/dist/components/filters/FilterBar/FilterBar.js.map +1 -1
- package/dist/components/layout/ListPageLayout/ListPageLayout.js +28 -26
- package/dist/components/layout/ListPageLayout/ListPageLayout.js.map +1 -1
- package/dist/components/layout/PageHeader/PageHeader.js +6 -4
- package/dist/components/layout/PageHeader/PageHeader.js.map +1 -1
- package/dist/components/navigation/ActionMenu/ActionMenu.js +30 -23
- package/dist/components/navigation/ActionMenu/ActionMenu.js.map +1 -1
- package/dist/components/navigation/Tabs/Tabs.js +20 -19
- package/dist/components/navigation/Tabs/Tabs.js.map +1 -1
- package/dist/components/primitives/Button/Button.js +76 -61
- package/dist/components/primitives/Button/Button.js.map +1 -1
- package/dist/components/primitives/Chip/Chip.js +3 -1
- package/dist/components/primitives/Chip/Chip.js.map +1 -1
- package/dist/components/primitives/Input/Input.js +12 -12
- package/dist/components/primitives/Input/Input.js.map +1 -1
- package/dist/components/ui/feedback/warningVisual.d.ts +4 -4
- package/dist/components/ui/feedback/warningVisual.js +20 -20
- package/dist/components/ui/feedback/warningVisual.js.map +1 -1
- package/dist/components/ui/forms/Checkbox/Checkbox.js +9 -6
- package/dist/components/ui/forms/Checkbox/Checkbox.js.map +1 -1
- package/dist/components/ui/forms/MultiSelect/MultiSelect.js +25 -14
- package/dist/components/ui/forms/MultiSelect/MultiSelect.js.map +1 -1
- package/dist/components/ui/forms/NumberStepper/NumberStepper.js +1 -1
- package/dist/components/ui/forms/NumberStepper/NumberStepper.js.map +1 -1
- package/dist/components/ui/forms/SearchableSelect/SearchableSelect.js +29 -19
- package/dist/components/ui/forms/SearchableSelect/SearchableSelect.js.map +1 -1
- package/dist/components/ui/forms/Select/Select.js +27 -18
- package/dist/components/ui/forms/Select/Select.js.map +1 -1
- package/dist/components/ui/forms/SuggestInput/SuggestInput.js +22 -10
- package/dist/components/ui/forms/SuggestInput/SuggestInput.js.map +1 -1
- package/dist/components/ui/forms/TagInput/TagInput.js +21 -16
- package/dist/components/ui/forms/TagInput/TagInput.js.map +1 -1
- package/dist/components/ui/index.d.ts +1 -1
- package/dist/components/ui/overlays/Dropdown/Dropdown.js +32 -20
- package/dist/components/ui/overlays/Dropdown/Dropdown.js.map +1 -1
- package/dist/components/ui/overlays/Tooltip/Tooltip.js +21 -21
- package/dist/components/ui/overlays/Tooltip/Tooltip.js.map +1 -1
- package/dist/components/ui/patterns/ChatComposer/ChatComposer.js +14 -12
- package/dist/components/ui/patterns/ChatComposer/ChatComposer.js.map +1 -1
- package/dist/components/ui/patterns/CommandMenu/CommandMenu.js +31 -19
- package/dist/components/ui/patterns/CommandMenu/CommandMenu.js.map +1 -1
- package/dist/components/ui/patterns/HorizontalStepper/HorizontalStepper.js +1 -1
- package/dist/components/ui/patterns/HorizontalStepper/HorizontalStepper.js.map +1 -1
- package/dist/components/ui/patterns/SideNav/SideNav.js +21 -17
- package/dist/components/ui/patterns/SideNav/SideNav.js.map +1 -1
- package/dist/components/ui/providers/BfrsProvider/BfrsProvider.d.ts +10 -0
- package/dist/components/ui/providers/BfrsProvider/BfrsProvider.js +63 -42
- package/dist/components/ui/providers/BfrsProvider/BfrsProvider.js.map +1 -1
- package/dist/custom-elements.d.ts +1 -0
- package/dist/custom-elements.js +7754 -7389
- package/dist/custom-elements.js.map +1 -1
- package/dist/index.js +290 -287
- package/dist/style.css +1 -1
- package/dist/styles/globals.css2.js +1 -1
- package/dist/theme/overrides.d.ts +256 -0
- package/dist/theme/overrides.js +255 -92
- package/dist/theme/overrides.js.map +1 -1
- package/dist/theme.js +34 -32
- package/dist/tokens/colors.d.ts +23 -0
- package/dist/tokens/colors.js +23 -0
- package/dist/tokens/colors.js.map +1 -1
- package/dist/tokens/shadows.d.ts +1 -0
- package/dist/tokens/shadows.js +4 -3
- package/dist/tokens/shadows.js.map +1 -1
- package/package.json +1 -1
- package/scripts/lint/cli.cjs +0 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilterBar.js","sources":["../../../../src/components/filters/FilterBar/FilterBar.tsx"],"sourcesContent":["import { Funnel, MagnifyingGlass } from \"@phosphor-icons/react\";\nimport { Children, forwardRef } from \"react\";\nimport styled from \"@emotion/styled\";\nimport { Badge } from \"@/components/primitives/Badge\";\nimport { Button } from \"@/components/primitives/Button\";\nimport { Chip } from \"@/components/primitives/Chip\";\nimport { Input } from \"@/components/primitives/Input\";\nimport type { FilterBarProps } from \"./FilterBar.types\";\n\n/* Exact compiled output of the pre-migration Tailwind utilities, in the same\n * class-list emission order. Verified against the frozen baseline. */\n\nconst FilterBarRoot = /*#__PURE__*/ styled(\"div\", {\n label: \"AgenticFilterBar-root\",\n shouldForwardProp: (propName) => propName !== \"ownerState\"\n})<{ ownerState: { sticky: boolean } }>(({ ownerState }) => [\n {\n borderBottomWidth: \"1px\",\n \"--tw-border-opacity\": \"1\",\n borderColor: \"hsl(var(--bfrs-color-border) / var(--tw-border-opacity, 1))\",\n \"--tw-bg-opacity\": \"1\",\n // Themable surface: hosts (e.g. ListPageLayout's filter band) set\n // --bfrs-filterbar-bg to blend the bar with their own sheet.
|
|
1
|
+
{"version":3,"file":"FilterBar.js","sources":["../../../../src/components/filters/FilterBar/FilterBar.tsx"],"sourcesContent":["import { Funnel, MagnifyingGlass } from \"@phosphor-icons/react\";\nimport { Children, forwardRef } from \"react\";\nimport styled from \"@emotion/styled\";\nimport { Badge } from \"@/components/primitives/Badge\";\nimport { Button } from \"@/components/primitives/Button\";\nimport { Chip } from \"@/components/primitives/Chip\";\nimport { Input } from \"@/components/primitives/Input\";\nimport type { FilterBarProps } from \"./FilterBar.types\";\n\n/* Exact compiled output of the pre-migration Tailwind utilities, in the same\n * class-list emission order. Verified against the frozen baseline. */\n\nconst FilterBarRoot = /*#__PURE__*/ styled(\"div\", {\n label: \"AgenticFilterBar-root\",\n shouldForwardProp: (propName) => propName !== \"ownerState\"\n})<{ ownerState: { sticky: boolean } }>(({ ownerState }) => [\n {\n borderBottomWidth: \"1px\",\n \"--tw-border-opacity\": \"1\",\n borderColor: \"hsl(var(--bfrs-color-border) / var(--tw-border-opacity, 1))\",\n \"--tw-bg-opacity\": \"1\",\n // Themable surface: hosts (e.g. ListPageLayout's filter band) set\n // --bfrs-filterbar-bg to blend the bar with their own sheet. Standalone,\n // the bar sits on the list page sheet (#FBFCFB), themed by\n // colors.surfacePage; its fallback keeps it outside a .bfrs scope.\n backgroundColor:\n \"var(--bfrs-filterbar-bg, hsl(var(--bfrs-color-surface-page, 120 14.29% 98.63%) / var(--tw-bg-opacity, 1)))\"\n },\n ownerState.sticky && {\n position: \"sticky\",\n top: 0,\n zIndex: 30\n }\n]);\n\nconst FilterBarRow = /*#__PURE__*/ styled(\"div\", {\n label: \"AgenticFilterBar-row\"\n})({\n display: \"flex\",\n flexWrap: \"wrap\",\n alignItems: \"center\",\n gap: \".75rem\",\n paddingLeft: \"1.25rem\",\n paddingRight: \"1.25rem\",\n paddingTop: \".625rem\",\n paddingBottom: \".625rem\"\n});\n\n/* `&&` reproduces the old tailwind-merge resolution deterministically: the\n * responsive width must beat the Input root's own `width:100%`. */\nconst FilterBarSearch = /*#__PURE__*/ styled(Input, {\n label: \"AgenticFilterBar-search\"\n})({\n \"&&\": {\n width: \"100%\",\n \"@media (min-width:640px)\": {\n width: \"16rem\"\n }\n }\n});\n\nconst FilterBarCountBadge = /*#__PURE__*/ styled(Badge, {\n label: \"AgenticFilterBar-countBadge\"\n})({\n marginLeft: \".25rem\"\n});\n\nconst FilterBarSpacer = /*#__PURE__*/ styled(\"div\", {\n label: \"AgenticFilterBar-spacer\"\n})({\n minWidth: \".5rem\",\n flex: \"1 1 0%\"\n});\n\nconst FilterBarChipsRow = /*#__PURE__*/ styled(\"div\", {\n label: \"AgenticFilterBar-chipsRow\"\n})({\n display: \"flex\",\n flexWrap: \"wrap\",\n alignItems: \"center\",\n gap: \".5rem\",\n borderTopWidth: \"1px\",\n \"--tw-border-opacity\": \"1\",\n borderColor: \"hsl(var(--bfrs-color-border) / var(--tw-border-opacity, 1))\",\n backgroundColor: \"hsl(var(--bfrs-color-surface-muted) / .5)\",\n paddingLeft: \"1.25rem\",\n paddingRight: \"1.25rem\",\n paddingTop: \".5rem\",\n paddingBottom: \".5rem\"\n});\n\nexport const FilterBar = forwardRef<HTMLDivElement, FilterBarProps>(\n (\n {\n className,\n searchValue,\n onSearchChange,\n onClearSearch,\n searchPlaceholder = \"Search\",\n searchInput,\n filterTrigger,\n onOpenFilters,\n activeFiltersCount = 0,\n filterChips = [],\n onClearAllFilters,\n primaryAction,\n secondaryActions,\n sticky,\n rowClassName,\n chipsRowClassName,\n spacer = true,\n children,\n ...props\n },\n ref\n ) => {\n // Render the row when it holds any content — search, inline filter controls\n // (children), the \"More Filters\" trigger, or actions. Consumers legitimately\n // place their filter cluster in secondaryActions (e.g. the finance filter bar),\n // so those keep the row too. The row is omitted only when it is entirely empty.\n const hasRowContent =\n Boolean(searchInput) ||\n Boolean(onSearchChange) ||\n Boolean(filterTrigger) ||\n Boolean(onOpenFilters) ||\n Boolean(secondaryActions) ||\n Boolean(primaryAction) ||\n Children.toArray(children).length > 0;\n const hasChips = filterChips.length > 0 || activeFiltersCount > 0;\n\n // Nothing to show at all → omit the bar entirely rather than leave an empty\n // bordered strip.\n if (!hasRowContent && !hasChips) return null;\n\n return (\n <FilterBarRoot ref={ref} ownerState={{ sticky: Boolean(sticky) }} className={className} {...props}>\n {hasRowContent && (\n <FilterBarRow className={rowClassName}>\n {searchInput ??\n (onSearchChange && (\n <FilterBarSearch\n size=\"sm\"\n value={searchValue ?? \"\"}\n onChange={(event) => onSearchChange(event.target.value)}\n onClear={onClearSearch}\n placeholder={searchPlaceholder}\n leftIcon={<MagnifyingGlass size={14} />}\n aria-label={searchPlaceholder}\n />\n ))}\n {children}\n {filterTrigger ??\n (onOpenFilters && (\n <Button variant=\"secondary\" size=\"sm\" leftIcon={<Funnel size={13} />} onClick={onOpenFilters}>\n More Filters\n {activeFiltersCount > 0 && <FilterBarCountBadge tone=\"primary\" count={activeFiltersCount} />}\n </Button>\n ))}\n {spacer && <FilterBarSpacer />}\n {secondaryActions}\n {primaryAction}\n </FilterBarRow>\n )}\n {hasChips && (\n <FilterBarChipsRow className={chipsRowClassName}>\n {filterChips.map((chip) => (\n <Chip key={chip.id} tone=\"neutral\" onRemove={chip.onRemove}>\n {chip.label}\n </Chip>\n ))}\n {filterChips.length === 0 && activeFiltersCount > 0 && <Chip tone=\"neutral\">{activeFiltersCount} filters applied</Chip>}\n {onClearAllFilters && (\n <Button variant=\"link\" size=\"sm\" onClick={onClearAllFilters}>\n Clear all\n </Button>\n )}\n </FilterBarChipsRow>\n )}\n </FilterBarRoot>\n );\n }\n);\n\nFilterBar.displayName = \"FilterBar\";\n"],"names":["FilterBarRoot","propName","ownerState","FilterBarRow","FilterBarSearch","Input","FilterBarCountBadge","Badge","FilterBarSpacer","FilterBarChipsRow","FilterBar","forwardRef","className","searchValue","onSearchChange","onClearSearch","searchPlaceholder","searchInput","filterTrigger","onOpenFilters","activeFiltersCount","filterChips","onClearAllFilters","primaryAction","secondaryActions","sticky","rowClassName","chipsRowClassName","spacer","children","props","ref","hasRowContent","Children","hasChips","jsxs","jsx","event","MagnifyingGlass","Button","Funnel","chip","Chip"],"mappings":";;;;;;;;;AAYA,MAAMA,sBAAqC,OAAO;AAAA,EAChD,OAAO;AAAA,EACP,mBAAmB,CAACC,MAAaA,MAAa;AAChD,CAAC,EAAuC,CAAC,EAAE,YAAAC,QAAiB;AAAA,EAC1D;AAAA,IACE,mBAAmB;AAAA,IACnB,uBAAuB;AAAA,IACvB,aAAa;AAAA,IACb,mBAAmB;AAAA;AAAA;AAAA;AAAA;AAAA,IAKnB,iBACE;AAAA,EAAA;AAAA,EAEJA,EAAW,UAAU;AAAA,IACnB,UAAU;AAAA,IACV,KAAK;AAAA,IACL,QAAQ;AAAA,EAAA;AAEZ,CAAC,GAEKC,sBAAoC,OAAO;AAAA,EAC/C,OAAO;AACT,CAAC,EAAE;AAAA,EACD,SAAS;AAAA,EACT,UAAU;AAAA,EACV,YAAY;AAAA,EACZ,KAAK;AAAA,EACL,aAAa;AAAA,EACb,cAAc;AAAA,EACd,YAAY;AAAA,EACZ,eAAe;AACjB,CAAC,GAIKC,sBAAuCC,GAAO;AAAA,EAClD,OAAO;AACT,CAAC,EAAE;AAAA,EACD,MAAM;AAAA,IACJ,OAAO;AAAA,IACP,4BAA4B;AAAA,MAC1B,OAAO;AAAA,IAAA;AAAA,EACT;AAEJ,CAAC,GAEKC,sBAA2CC,GAAO;AAAA,EACtD,OAAO;AACT,CAAC,EAAE;AAAA,EACD,YAAY;AACd,CAAC,GAEKC,sBAAuC,OAAO;AAAA,EAClD,OAAO;AACT,CAAC,EAAE;AAAA,EACD,UAAU;AAAA,EACV,MAAM;AACR,C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tB,UAAU,CAACwB,MAAUvB,EAAeuB,EAAM,OAAO,KAAK;AAAA,YACtD,SAAStB;AAAA,YACT,aAAaC;AAAA,YACb,UAAU,gBAAAoB,EAACE,GAAA,EAAgB,MAAM,GAAA,CAAI;AAAA,YACrC,cAAYtB;AAAA,UAAA;AAAA,QAAA;AAAA,QAGjBa;AAAA,QACAX,MACEC,KACC,gBAAAgB,EAACI,GAAA,EAAO,SAAQ,aAAY,MAAK,MAAK,4BAAWC,GAAA,EAAO,MAAM,GAAA,CAAI,GAAI,SAASrB,GAAe,UAAA;AAAA,UAAA;AAAA,UAE3FC,IAAqB,KAAK,gBAAAgB,EAAC9B,KAAoB,MAAK,WAAU,OAAOc,EAAA,CAAoB;AAAA,QAAA,EAAA,CAC5F;AAAA,QAEHQ,uBAAWpB,GAAA,EAAgB;AAAA,QAC3BgB;AAAA,QACAD;AAAA,MAAA,GACH;AAAA,MAEDW,KACC,gBAAAC,EAAC1B,GAAA,EAAkB,WAAWkB,GAC3B,UAAA;AAAA,QAAAN,EAAY,IAAI,CAACoB,MAChB,gBAAAL,EAACM,KAAmB,MAAK,WAAU,UAAUD,EAAK,UAC/C,UAAAA,EAAK,SADGA,EAAK,EAEhB,CACD;AAAA,QACApB,EAAY,WAAW,KAAKD,IAAqB,KAAK,gBAAAe,EAACO,GAAA,EAAK,MAAK,WAAW,UAAA;AAAA,UAAAtB;AAAA,UAAmB;AAAA,QAAA,GAAgB;AAAA,QAC/GE,uBACEiB,GAAA,EAAO,SAAQ,QAAO,MAAK,MAAK,SAASjB,GAAmB,UAAA,YAAA,CAE7D;AAAA,MAAA,EAAA,CAEJ;AAAA,IAAA,GAEJ;AAAA,EAEJ;AACF;AAEAZ,EAAU,cAAc;"}
|
|
@@ -10,7 +10,9 @@ const W = /* @__PURE__ */ e("div", {
|
|
|
10
10
|
flexDirection: "column",
|
|
11
11
|
// The root owns the page sheet color; inner strips (tabs list, FilterBar)
|
|
12
12
|
// are set transparent below so the whole layout reads as one surface.
|
|
13
|
-
|
|
13
|
+
// colors.surfacePage themes it. The fallback is the token's own #FBFCFB
|
|
14
|
+
// channels, so a layout rendered outside a .bfrs scope keeps its sheet.
|
|
15
|
+
backgroundColor: "hsl(var(--bfrs-color-surface-page, 120 14.29% 98.63%))"
|
|
14
16
|
}), B = /* @__PURE__ */ e("div", {
|
|
15
17
|
label: "AgenticListPageLayout-header"
|
|
16
18
|
})({
|
|
@@ -20,7 +22,7 @@ const W = /* @__PURE__ */ e("div", {
|
|
|
20
22
|
flexWrap: "wrap",
|
|
21
23
|
gap: ".75rem",
|
|
22
24
|
padding: ".75rem 1.25rem .625rem"
|
|
23
|
-
}),
|
|
25
|
+
}), H = /* @__PURE__ */ e("h1", {
|
|
24
26
|
label: "AgenticListPageLayout-title"
|
|
25
27
|
})({
|
|
26
28
|
overflow: "hidden",
|
|
@@ -30,14 +32,14 @@ const W = /* @__PURE__ */ e("div", {
|
|
|
30
32
|
fontWeight: 600,
|
|
31
33
|
lineHeight: "1.5rem",
|
|
32
34
|
color: "hsl(var(--bfrs-color-text-primary))"
|
|
33
|
-
}),
|
|
35
|
+
}), I = /* @__PURE__ */ e("div", {
|
|
34
36
|
label: "AgenticListPageLayout-actions"
|
|
35
37
|
})({
|
|
36
38
|
display: "flex",
|
|
37
39
|
alignItems: "center",
|
|
38
40
|
flexWrap: "wrap",
|
|
39
41
|
gap: ".5rem"
|
|
40
|
-
}),
|
|
42
|
+
}), S = /* @__PURE__ */ e("div", {
|
|
41
43
|
label: "AgenticListPageLayout-kpis"
|
|
42
44
|
})({
|
|
43
45
|
display: "flex",
|
|
@@ -51,19 +53,19 @@ const W = /* @__PURE__ */ e("div", {
|
|
|
51
53
|
flex: "1 1 0%",
|
|
52
54
|
minWidth: "10rem"
|
|
53
55
|
}
|
|
54
|
-
}),
|
|
56
|
+
}), T = /* @__PURE__ */ e("div", {
|
|
55
57
|
label: "AgenticListPageLayout-bannerAboveTabs"
|
|
56
58
|
})({
|
|
57
59
|
padding: ".75rem 1.25rem 0"
|
|
58
|
-
}),
|
|
60
|
+
}), j = /* @__PURE__ */ e("div", {
|
|
59
61
|
label: "AgenticListPageLayout-banner"
|
|
60
62
|
})({
|
|
61
63
|
padding: ".75rem 1.25rem 0"
|
|
62
|
-
}),
|
|
64
|
+
}), C = /* @__PURE__ */ e("div", {
|
|
63
65
|
label: "AgenticListPageLayout-bannerBelowFilters"
|
|
64
66
|
})({
|
|
65
67
|
padding: ".75rem 1.25rem 0"
|
|
66
|
-
}),
|
|
68
|
+
}), D = /* @__PURE__ */ e("div", {
|
|
67
69
|
label: "AgenticListPageLayout-tabs"
|
|
68
70
|
})({
|
|
69
71
|
// No horizontal gutter here: the line-variant Tabs list carries its own
|
|
@@ -74,7 +76,7 @@ const W = /* @__PURE__ */ e("div", {
|
|
|
74
76
|
// The tab strip doesn't paint its own surface — the layout root's sheet
|
|
75
77
|
// color shows through, whatever it is.
|
|
76
78
|
"--bfrs-tabs-list-bg": "transparent"
|
|
77
|
-
}),
|
|
79
|
+
}), k = /* @__PURE__ */ e("div", {
|
|
78
80
|
label: "AgenticListPageLayout-filters"
|
|
79
81
|
})({
|
|
80
82
|
display: "flex",
|
|
@@ -83,11 +85,11 @@ const W = /* @__PURE__ */ e("div", {
|
|
|
83
85
|
gap: ".75rem",
|
|
84
86
|
padding: ".75rem 1.25rem",
|
|
85
87
|
// Match the line-variant Tabs divider so the tabs and filter band read as one
|
|
86
|
-
// continuous list-page separator.
|
|
88
|
+
// continuous list-page separator, so it follows states.tabsDivider too.
|
|
87
89
|
borderBottomWidth: "1px",
|
|
88
90
|
borderBottomStyle: "solid",
|
|
89
91
|
"--tw-border-opacity": "1",
|
|
90
|
-
borderColor: "hsl(var(--bfrs-color-border) / var(--tw-border-opacity, 1))",
|
|
92
|
+
borderColor: "hsl(var(--bfrs-color-tabs-divider, var(--bfrs-color-border)) / var(--tw-border-opacity, 1))",
|
|
91
93
|
// A slotted FilterBar shouldn't paint its own surface either (see root).
|
|
92
94
|
"--bfrs-filterbar-bg": "transparent",
|
|
93
95
|
// Filters stay on one line per the list-page spec; overflow scrolls instead
|
|
@@ -102,7 +104,7 @@ const W = /* @__PURE__ */ e("div", {
|
|
|
102
104
|
"& > *:only-child": {
|
|
103
105
|
flexGrow: 1
|
|
104
106
|
}
|
|
105
|
-
}),
|
|
107
|
+
}), F = /* @__PURE__ */ e("div", {
|
|
106
108
|
label: "AgenticListPageLayout-table"
|
|
107
109
|
})({
|
|
108
110
|
minWidth: "0px",
|
|
@@ -127,15 +129,15 @@ const W = /* @__PURE__ */ e("div", {
|
|
|
127
129
|
kpis: i,
|
|
128
130
|
bannerAboveTabs: r,
|
|
129
131
|
banner: l,
|
|
130
|
-
bannerBelowFilters:
|
|
131
|
-
tabs:
|
|
132
|
+
bannerBelowFilters: s,
|
|
133
|
+
tabs: o,
|
|
132
134
|
filters: n,
|
|
133
135
|
table: d,
|
|
134
136
|
headerClassName: p,
|
|
135
137
|
titleClassName: L,
|
|
136
|
-
actionsClassName:
|
|
137
|
-
kpisClassName:
|
|
138
|
-
bannerAboveTabsClassName:
|
|
138
|
+
actionsClassName: f,
|
|
139
|
+
kpisClassName: b,
|
|
140
|
+
bannerAboveTabsClassName: y,
|
|
139
141
|
bannerClassName: u,
|
|
140
142
|
bannerBelowFiltersClassName: x,
|
|
141
143
|
tabsClassName: h,
|
|
@@ -144,16 +146,16 @@ const W = /* @__PURE__ */ e("div", {
|
|
|
144
146
|
...w
|
|
145
147
|
}, A) => /* @__PURE__ */ c(W, { ref: A, className: g, ...w, children: [
|
|
146
148
|
/* @__PURE__ */ c(B, { className: p, children: [
|
|
147
|
-
/* @__PURE__ */ a(
|
|
148
|
-
t && /* @__PURE__ */ a(
|
|
149
|
+
/* @__PURE__ */ a(H, { className: L, children: m }),
|
|
150
|
+
t && /* @__PURE__ */ a(I, { className: f, children: t })
|
|
149
151
|
] }),
|
|
150
|
-
i && /* @__PURE__ */ a(
|
|
151
|
-
r && /* @__PURE__ */ a(
|
|
152
|
-
|
|
153
|
-
l && /* @__PURE__ */ a(
|
|
154
|
-
n && /* @__PURE__ */ a(
|
|
155
|
-
|
|
156
|
-
d && /* @__PURE__ */ a(
|
|
152
|
+
i && /* @__PURE__ */ a(S, { className: b, children: i }),
|
|
153
|
+
r && /* @__PURE__ */ a(T, { className: y, children: r }),
|
|
154
|
+
o && /* @__PURE__ */ a(D, { className: h, children: o }),
|
|
155
|
+
l && /* @__PURE__ */ a(j, { className: u, children: l }),
|
|
156
|
+
n && /* @__PURE__ */ a(k, { className: P, children: n }),
|
|
157
|
+
s && /* @__PURE__ */ a(C, { className: x, children: s }),
|
|
158
|
+
d && /* @__PURE__ */ a(F, { className: v, children: d })
|
|
157
159
|
] })
|
|
158
160
|
);
|
|
159
161
|
R.displayName = "ListPageLayout";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListPageLayout.js","sources":["../../../../src/components/layout/ListPageLayout/ListPageLayout.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport styled from \"@emotion/styled\";\nimport type { ListPageLayoutProps } from \"./ListPageLayout.types\";\n\n/* Spacing and typography follow the Shiprocket 4.0 Agentic list-page spec\n * (Figma node 1680:36874, Orders): 20px page gutter, header band 12px/10px\n * vertical padding with a strong bottom border, 28px-tall filter controls\n * vertically centred in their band, 20px bottom margin under the table. */\n\nconst ListPageLayoutRoot = /*#__PURE__*/ styled(\"div\", {\n label: \"AgenticListPageLayout-root\"\n})({\n display: \"flex\",\n minWidth: \"0px\",\n minHeight: \"100%\",\n flexDirection: \"column\",\n // The root owns the page sheet color; inner strips (tabs list, FilterBar)\n // are set transparent below so the whole layout reads as one surface.\n backgroundColor: \"#FBFCFB\"\n});\n\nconst ListPageLayoutHeader = /*#__PURE__*/ styled(\"div\", {\n label: \"AgenticListPageLayout-header\"\n})({\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"space-between\",\n flexWrap: \"wrap\",\n gap: \".75rem\",\n padding: \".75rem 1.25rem .625rem\"\n});\n\nconst ListPageLayoutTitle = /*#__PURE__*/ styled(\"h1\", {\n label: \"AgenticListPageLayout-title\"\n})({\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n whiteSpace: \"nowrap\",\n fontSize: \"20px\",\n fontWeight: 600,\n lineHeight: \"1.5rem\",\n color: \"hsl(var(--bfrs-color-text-primary))\"\n});\n\nconst ListPageLayoutActions = /*#__PURE__*/ styled(\"div\", {\n label: \"AgenticListPageLayout-actions\"\n})({\n display: \"flex\",\n alignItems: \"center\",\n flexWrap: \"wrap\",\n gap: \".5rem\"\n});\n\nconst ListPageLayoutKpis = /*#__PURE__*/ styled(\"div\", {\n label: \"AgenticListPageLayout-kpis\"\n})({\n display: \"flex\",\n alignItems: \"stretch\",\n flexWrap: \"wrap\",\n gap: \".75rem\",\n padding: \".75rem 1.25rem 0\",\n // Cards share the band's full width equally; the min width lets rows wrap\n // on narrow screens instead of crushing the cards.\n \"& > *\": {\n flex: \"1 1 0%\",\n minWidth: \"10rem\"\n }\n});\n\nconst ListPageLayoutBannerAboveTabs = /*#__PURE__*/ styled(\"div\", {\n label: \"AgenticListPageLayout-bannerAboveTabs\"\n})({\n padding: \".75rem 1.25rem 0\"\n});\n\nconst ListPageLayoutBanner = /*#__PURE__*/ styled(\"div\", {\n label: \"AgenticListPageLayout-banner\"\n})({\n padding: \".75rem 1.25rem 0\"\n});\n\nconst ListPageLayoutBannerBelowFilters = /*#__PURE__*/ styled(\"div\", {\n label: \"AgenticListPageLayout-bannerBelowFilters\"\n})({\n padding: \".75rem 1.25rem 0\"\n});\n\nconst ListPageLayoutTabs = /*#__PURE__*/ styled(\"div\", {\n label: \"AgenticListPageLayout-tabs\"\n})({\n // No horizontal gutter here: the line-variant Tabs list carries its own\n // 1.25rem padding, so adding the band gutter would double-indent the labels.\n // With the list spanning the full band its divider needs no bleed either.\n padding: \".5rem 0 0\",\n \"--bfrs-tabs-divider-bleed\": \"0px\",\n // The tab strip doesn't paint its own surface — the layout root's sheet\n // color shows through, whatever it is.\n \"--bfrs-tabs-list-bg\": \"transparent\"\n});\n\nconst ListPageLayoutFilters = /*#__PURE__*/ styled(\"div\", {\n label: \"AgenticListPageLayout-filters\"\n})({\n display: \"flex\",\n alignItems: \"center\",\n flexWrap: \"nowrap\",\n gap: \".75rem\",\n padding: \".75rem 1.25rem\",\n // Match the line-variant Tabs divider so the tabs and filter band read as one\n // continuous list-page separator.\n borderBottomWidth: \"1px\",\n borderBottomStyle: \"solid\",\n \"--tw-border-opacity\": \"1\",\n borderColor: \"hsl(var(--bfrs-color-border) / var(--tw-border-opacity, 1))\",\n // A slotted FilterBar shouldn't paint its own surface either (see root).\n \"--bfrs-filterbar-bg\": \"transparent\",\n // Filters stay on one line per the list-page spec; overflow scrolls instead\n // of wrapping, and controls keep their intrinsic width.\n overflowX: \"auto\",\n \"& > *\": {\n flexShrink: 0\n },\n // A single composite child (e.g. FilterBar) spans the whole band so its\n // right-aligned actions reach the band edge; loose controls keep their\n // intrinsic widths.\n \"& > *:only-child\": {\n flexGrow: 1\n }\n});\n\nconst ListPageLayoutTable = /*#__PURE__*/ styled(\"div\", {\n label: \"AgenticListPageLayout-table\"\n})({\n minWidth: \"0px\",\n minHeight: \"0px\",\n display: \"flex\",\n flexDirection: \"column\",\n flex: \"1 1 auto\",\n padding: \".75rem 1.25rem 1.25rem\",\n \"--bfrs-data-table-flex\": \"1 1 auto\",\n \"& > *\": {\n minWidth: \"0px\",\n minHeight: \"0px\",\n display: \"flex\",\n flex: \"1 1 auto\",\n flexDirection: \"column\"\n }\n});\n\nexport const ListPageLayout = forwardRef<HTMLDivElement, ListPageLayoutProps>(\n (\n {\n className,\n title,\n actions,\n kpis,\n bannerAboveTabs,\n banner,\n bannerBelowFilters,\n tabs,\n filters,\n table,\n headerClassName,\n titleClassName,\n actionsClassName,\n kpisClassName,\n bannerAboveTabsClassName,\n bannerClassName,\n bannerBelowFiltersClassName,\n tabsClassName,\n filtersClassName,\n tableClassName,\n ...props\n },\n ref\n ) => (\n <ListPageLayoutRoot ref={ref} className={className} {...props}>\n <ListPageLayoutHeader className={headerClassName}>\n <ListPageLayoutTitle className={titleClassName}>{title}</ListPageLayoutTitle>\n {actions && <ListPageLayoutActions className={actionsClassName}>{actions}</ListPageLayoutActions>}\n </ListPageLayoutHeader>\n {kpis && <ListPageLayoutKpis className={kpisClassName}>{kpis}</ListPageLayoutKpis>}\n {bannerAboveTabs && (\n <ListPageLayoutBannerAboveTabs className={bannerAboveTabsClassName}>{bannerAboveTabs}</ListPageLayoutBannerAboveTabs>\n )}\n {tabs && <ListPageLayoutTabs className={tabsClassName}>{tabs}</ListPageLayoutTabs>}\n {banner && <ListPageLayoutBanner className={bannerClassName}>{banner}</ListPageLayoutBanner>}\n {filters && <ListPageLayoutFilters className={filtersClassName}>{filters}</ListPageLayoutFilters>}\n {bannerBelowFilters && (\n <ListPageLayoutBannerBelowFilters className={bannerBelowFiltersClassName}>{bannerBelowFilters}</ListPageLayoutBannerBelowFilters>\n )}\n {table && <ListPageLayoutTable className={tableClassName}>{table}</ListPageLayoutTable>}\n </ListPageLayoutRoot>\n )\n);\n\nListPageLayout.displayName = \"ListPageLayout\";\n"],"names":["ListPageLayoutRoot","ListPageLayoutHeader","ListPageLayoutTitle","ListPageLayoutActions","ListPageLayoutKpis","ListPageLayoutBannerAboveTabs","ListPageLayoutBanner","ListPageLayoutBannerBelowFilters","ListPageLayoutTabs","ListPageLayoutFilters","ListPageLayoutTable","ListPageLayout","forwardRef","className","title","actions","kpis","bannerAboveTabs","banner","bannerBelowFilters","tabs","filters","table","headerClassName","titleClassName","actionsClassName","kpisClassName","bannerAboveTabsClassName","bannerClassName","bannerBelowFiltersClassName","tabsClassName","filtersClassName","tableClassName","props","ref","jsxs","jsx"],"mappings":";;;AASA,MAAMA,sBAA0C,OAAO;AAAA,EACrD,OAAO;AACT,CAAC,EAAE;AAAA,EACD,SAAS;AAAA,EACT,UAAU;AAAA,EACV,WAAW;AAAA,EACX,eAAe;AAAA;AAAA;AAAA,EA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AA;AAAA,MAAA,gBAAAa,EAAClC,GAAA,EAAoB,WAAWsB,GAAiB,UAAAV,GAAM;AAAA,MACtDC,KAAW,gBAAAqB,EAACjC,GAAA,EAAsB,WAAWsB,GAAmB,UAAAV,EAAA,CAAQ;AAAA,IAAA,GAC3E;AAAA,IACCC,KAAQ,gBAAAoB,EAAChC,GAAA,EAAmB,WAAWsB,GAAgB,UAAAV,GAAK;AAAA,IAC5DC,KACC,gBAAAmB,EAAC/B,GAAA,EAA8B,WAAWsB,GAA2B,UAAAV,GAAgB;AAAA,IAEtFG,KAAQ,gBAAAgB,EAAC5B,GAAA,EAAmB,WAAWsB,GAAgB,UAAAV,GAAK;AAAA,IAC5DF,KAAU,gBAAAkB,EAAC9B,GAAA,EAAqB,WAAWsB,GAAkB,UAAAV,GAAO;AAAA,IACpEG,KAAW,gBAAAe,EAAC3B,GAAA,EAAsB,WAAWsB,GAAmB,UAAAV,GAAQ;AAAA,IACxEF,KACC,gBAAAiB,EAAC7B,GAAA,EAAiC,WAAWsB,GAA8B,UAAAV,GAAmB;AAAA,IAE/FG,KAAS,gBAAAc,EAAC1B,GAAA,EAAoB,WAAWsB,GAAiB,UAAAV,EAAA,CAAM;AAAA,EAAA,EAAA,CACnE;AAEJ;AAEAX,EAAe,cAAc;"}
|
|
1
|
+
{"version":3,"file":"ListPageLayout.js","sources":["../../../../src/components/layout/ListPageLayout/ListPageLayout.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport styled from \"@emotion/styled\";\nimport type { ListPageLayoutProps } from \"./ListPageLayout.types\";\n\n/* Spacing and typography follow the Shiprocket 4.0 Agentic list-page spec\n * (Figma node 1680:36874, Orders): 20px page gutter, header band 12px/10px\n * vertical padding with a strong bottom border, 28px-tall filter controls\n * vertically centred in their band, 20px bottom margin under the table. */\n\nconst ListPageLayoutRoot = /*#__PURE__*/ styled(\"div\", {\n label: \"AgenticListPageLayout-root\"\n})({\n display: \"flex\",\n minWidth: \"0px\",\n minHeight: \"100%\",\n flexDirection: \"column\",\n // The root owns the page sheet color; inner strips (tabs list, FilterBar)\n // are set transparent below so the whole layout reads as one surface.\n // colors.surfacePage themes it. The fallback is the token's own #FBFCFB\n // channels, so a layout rendered outside a .bfrs scope keeps its sheet.\n backgroundColor: \"hsl(var(--bfrs-color-surface-page, 120 14.29% 98.63%))\"\n});\n\nconst ListPageLayoutHeader = /*#__PURE__*/ styled(\"div\", {\n label: \"AgenticListPageLayout-header\"\n})({\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"space-between\",\n flexWrap: \"wrap\",\n gap: \".75rem\",\n padding: \".75rem 1.25rem .625rem\"\n});\n\nconst ListPageLayoutTitle = /*#__PURE__*/ styled(\"h1\", {\n label: \"AgenticListPageLayout-title\"\n})({\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n whiteSpace: \"nowrap\",\n fontSize: \"20px\",\n fontWeight: 600,\n lineHeight: \"1.5rem\",\n color: \"hsl(var(--bfrs-color-text-primary))\"\n});\n\nconst ListPageLayoutActions = /*#__PURE__*/ styled(\"div\", {\n label: \"AgenticListPageLayout-actions\"\n})({\n display: \"flex\",\n alignItems: \"center\",\n flexWrap: \"wrap\",\n gap: \".5rem\"\n});\n\nconst ListPageLayoutKpis = /*#__PURE__*/ styled(\"div\", {\n label: \"AgenticListPageLayout-kpis\"\n})({\n display: \"flex\",\n alignItems: \"stretch\",\n flexWrap: \"wrap\",\n gap: \".75rem\",\n padding: \".75rem 1.25rem 0\",\n // Cards share the band's full width equally; the min width lets rows wrap\n // on narrow screens instead of crushing the cards.\n \"& > *\": {\n flex: \"1 1 0%\",\n minWidth: \"10rem\"\n }\n});\n\nconst ListPageLayoutBannerAboveTabs = /*#__PURE__*/ styled(\"div\", {\n label: \"AgenticListPageLayout-bannerAboveTabs\"\n})({\n padding: \".75rem 1.25rem 0\"\n});\n\nconst ListPageLayoutBanner = /*#__PURE__*/ styled(\"div\", {\n label: \"AgenticListPageLayout-banner\"\n})({\n padding: \".75rem 1.25rem 0\"\n});\n\nconst ListPageLayoutBannerBelowFilters = /*#__PURE__*/ styled(\"div\", {\n label: \"AgenticListPageLayout-bannerBelowFilters\"\n})({\n padding: \".75rem 1.25rem 0\"\n});\n\nconst ListPageLayoutTabs = /*#__PURE__*/ styled(\"div\", {\n label: \"AgenticListPageLayout-tabs\"\n})({\n // No horizontal gutter here: the line-variant Tabs list carries its own\n // 1.25rem padding, so adding the band gutter would double-indent the labels.\n // With the list spanning the full band its divider needs no bleed either.\n padding: \".5rem 0 0\",\n \"--bfrs-tabs-divider-bleed\": \"0px\",\n // The tab strip doesn't paint its own surface — the layout root's sheet\n // color shows through, whatever it is.\n \"--bfrs-tabs-list-bg\": \"transparent\"\n});\n\nconst ListPageLayoutFilters = /*#__PURE__*/ styled(\"div\", {\n label: \"AgenticListPageLayout-filters\"\n})({\n display: \"flex\",\n alignItems: \"center\",\n flexWrap: \"nowrap\",\n gap: \".75rem\",\n padding: \".75rem 1.25rem\",\n // Match the line-variant Tabs divider so the tabs and filter band read as one\n // continuous list-page separator, so it follows states.tabsDivider too.\n borderBottomWidth: \"1px\",\n borderBottomStyle: \"solid\",\n \"--tw-border-opacity\": \"1\",\n borderColor: \"hsl(var(--bfrs-color-tabs-divider, var(--bfrs-color-border)) / var(--tw-border-opacity, 1))\",\n // A slotted FilterBar shouldn't paint its own surface either (see root).\n \"--bfrs-filterbar-bg\": \"transparent\",\n // Filters stay on one line per the list-page spec; overflow scrolls instead\n // of wrapping, and controls keep their intrinsic width.\n overflowX: \"auto\",\n \"& > *\": {\n flexShrink: 0\n },\n // A single composite child (e.g. FilterBar) spans the whole band so its\n // right-aligned actions reach the band edge; loose controls keep their\n // intrinsic widths.\n \"& > *:only-child\": {\n flexGrow: 1\n }\n});\n\nconst ListPageLayoutTable = /*#__PURE__*/ styled(\"div\", {\n label: \"AgenticListPageLayout-table\"\n})({\n minWidth: \"0px\",\n minHeight: \"0px\",\n display: \"flex\",\n flexDirection: \"column\",\n flex: \"1 1 auto\",\n padding: \".75rem 1.25rem 1.25rem\",\n \"--bfrs-data-table-flex\": \"1 1 auto\",\n \"& > *\": {\n minWidth: \"0px\",\n minHeight: \"0px\",\n display: \"flex\",\n flex: \"1 1 auto\",\n flexDirection: \"column\"\n }\n});\n\nexport const ListPageLayout = forwardRef<HTMLDivElement, ListPageLayoutProps>(\n (\n {\n className,\n title,\n actions,\n kpis,\n bannerAboveTabs,\n banner,\n bannerBelowFilters,\n tabs,\n filters,\n table,\n headerClassName,\n titleClassName,\n actionsClassName,\n kpisClassName,\n bannerAboveTabsClassName,\n bannerClassName,\n bannerBelowFiltersClassName,\n tabsClassName,\n filtersClassName,\n tableClassName,\n ...props\n },\n ref\n ) => (\n <ListPageLayoutRoot ref={ref} className={className} {...props}>\n <ListPageLayoutHeader className={headerClassName}>\n <ListPageLayoutTitle className={titleClassName}>{title}</ListPageLayoutTitle>\n {actions && <ListPageLayoutActions className={actionsClassName}>{actions}</ListPageLayoutActions>}\n </ListPageLayoutHeader>\n {kpis && <ListPageLayoutKpis className={kpisClassName}>{kpis}</ListPageLayoutKpis>}\n {bannerAboveTabs && (\n <ListPageLayoutBannerAboveTabs className={bannerAboveTabsClassName}>{bannerAboveTabs}</ListPageLayoutBannerAboveTabs>\n )}\n {tabs && <ListPageLayoutTabs className={tabsClassName}>{tabs}</ListPageLayoutTabs>}\n {banner && <ListPageLayoutBanner className={bannerClassName}>{banner}</ListPageLayoutBanner>}\n {filters && <ListPageLayoutFilters className={filtersClassName}>{filters}</ListPageLayoutFilters>}\n {bannerBelowFilters && (\n <ListPageLayoutBannerBelowFilters className={bannerBelowFiltersClassName}>{bannerBelowFilters}</ListPageLayoutBannerBelowFilters>\n )}\n {table && <ListPageLayoutTable className={tableClassName}>{table}</ListPageLayoutTable>}\n </ListPageLayoutRoot>\n )\n);\n\nListPageLayout.displayName = \"ListPageLayout\";\n"],"names":["ListPageLayoutRoot","ListPageLayoutHeader","ListPageLayoutTitle","ListPageLayoutActions","ListPageLayoutKpis","ListPageLayoutBannerAboveTabs","ListPageLayoutBanner","ListPageLayoutBannerBelowFilters","ListPageLayoutTabs","ListPageLayoutFilters","ListPageLayoutTable","ListPageLayout","forwardRef","className","title","actions","kpis","bannerAboveTabs","banner","bannerBelowFilters","tabs","filters","table","headerClassName","titleClassName","actionsClassName","kpisClassName","bannerAboveTabsClassName","bannerClassName","bannerBelowFiltersClassName","tabsClassName","filtersClassName","tableClassName","props","ref","jsxs","jsx"],"mappings":";;;AASA,MAAMA,sBAA0C,OAAO;AAAA,EACrD,OAAO;AACT,CAAC,EAAE;AAAA,EACD,SAAS;AAAA,EACT,UAAU;AAAA,EACV,WAAW;AAAA,EACX,eAAe;AAAA;AAAA;AAAA;AAAA;AAAA,EAKf,iBAAiB;AACnB,CAAC,GAEKC,sBAA4C,OAAO;AAAA,EACvD,OAAO;AACT,CAAC,EAAE;AAAA,EACD,SAAS;AAAA,EACT,YAAY;AAAA,EACZ,gBAAgB;AAAA,EAChB,UAAU;AAAA,EACV,KAAK;AAAA,EACL,SAAS;AACX,CAAC,GAEKC,sBAA2C,MAAM;AAAA,EACrD,OAAO;AACT,CAAC,EAAE;AAAA,EACD,UAAU;AAAA,EACV,cAAc;AAAA,EACd,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,OAAO;AACT,CAAC,GAEKC,sBAA6C,OAAO;AAAA,EACxD,OAAO;AACT,CAAC,EAAE;AAAA,EACD,SAAS;AAAA,EACT,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,KAAK;AACP,CAAC,GAEKC,sBAA0C,OAAO;AAAA,EACrD,OAAO;AACT,CAAC,EAAE;AAAA,EACD,SAAS;AAAA,EACT,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,KAAK;AAAA,EACL,SAAS;AAAA;AAAA;AAAA,EAGT,SAAS;AAAA,IACP,MAAM;AAAA,IACN,UAAU;AAAA,EAAA;AAEd,CAAC,GAEKC,sBAAqD,OAAO;AAAA,EAChE,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e,cAAc;"}
|
|
@@ -16,7 +16,9 @@ const H = /* @__PURE__ */ e("div", {
|
|
|
16
16
|
"--tw-border-opacity": "1",
|
|
17
17
|
borderColor: "hsl(var(--bfrs-color-border-strong) / var(--tw-border-opacity, 1))",
|
|
18
18
|
"--tw-bg-opacity": "1",
|
|
19
|
-
|
|
19
|
+
// The list page sheet (#FBFCFB), themed by colors.surfacePage like
|
|
20
|
+
// ListPageLayout; the fallback keeps it outside a .bfrs scope.
|
|
21
|
+
backgroundColor: "hsl(var(--bfrs-color-surface-page, 120 14.29% 98.63%) / var(--tw-bg-opacity, 1))",
|
|
20
22
|
paddingLeft: "1.25rem",
|
|
21
23
|
paddingRight: "1.25rem",
|
|
22
24
|
paddingTop: ".75rem",
|
|
@@ -84,14 +86,14 @@ const H = /* @__PURE__ */ e("div", {
|
|
|
84
86
|
justifyContent: "flex-end"
|
|
85
87
|
}
|
|
86
88
|
}), W = b(
|
|
87
|
-
({ className: t, title: c, description:
|
|
89
|
+
({ className: t, title: c, description: o, eyebrow: i, breadcrumb: p, onBack: l, backLabel: s = "Go back", actions: n, secondaryActions: d, sticky: m, titleClassName: g, descriptionClassName: f, ...x }, h) => /* @__PURE__ */ a(H, { ref: h, ownerState: { sticky: !!m }, className: t, ...x, children: [
|
|
88
90
|
/* @__PURE__ */ a(v, { children: [
|
|
89
91
|
l && /* @__PURE__ */ r(y, { "aria-label": s, icon: /* @__PURE__ */ r(w, { size: 16 }), size: "sm", variant: "outline", onClick: l }),
|
|
90
92
|
/* @__PURE__ */ a(P, { children: [
|
|
91
93
|
p,
|
|
92
|
-
|
|
94
|
+
i && /* @__PURE__ */ r(u, { children: i }),
|
|
93
95
|
/* @__PURE__ */ r(A, { className: g, children: c }),
|
|
94
|
-
|
|
96
|
+
o && /* @__PURE__ */ r(k, { className: f, children: o })
|
|
95
97
|
] })
|
|
96
98
|
] }),
|
|
97
99
|
(n || d) && /* @__PURE__ */ a(S, { children: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageHeader.js","sources":["../../../../src/components/layout/PageHeader/PageHeader.tsx"],"sourcesContent":["import { ArrowLeft } from \"@phosphor-icons/react\";\nimport { forwardRef } from \"react\";\nimport styled from \"@emotion/styled\";\nimport { IconButton } from \"@/components/primitives/Button\";\nimport type { PageHeaderProps } from \"./PageHeader.types\";\n\ninterface PageHeaderOwnerState {\n sticky: boolean;\n}\n\n/* Exact compiled output of the pre-migration Tailwind utilities, including\n * the sm: responsive rules (min-width:640px). Verified against the frozen\n * baseline. */\n\nconst PageHeaderRoot = /*#__PURE__*/ styled(\"div\", {\n label: \"AgenticPageHeader-root\",\n shouldForwardProp: (propName) => propName !== \"ownerState\"\n})<{ ownerState: PageHeaderOwnerState }>(({ ownerState }) => [\n {\n display: \"flex\",\n minHeight: \"52px\",\n flexDirection: \"column\",\n gap: \".75rem\",\n borderBottomWidth: \"1px\",\n \"--tw-border-opacity\": \"1\",\n borderColor: \"hsl(var(--bfrs-color-border-strong) / var(--tw-border-opacity, 1))\",\n \"--tw-bg-opacity\": \"1\",\n backgroundColor: \"
|
|
1
|
+
{"version":3,"file":"PageHeader.js","sources":["../../../../src/components/layout/PageHeader/PageHeader.tsx"],"sourcesContent":["import { ArrowLeft } from \"@phosphor-icons/react\";\nimport { forwardRef } from \"react\";\nimport styled from \"@emotion/styled\";\nimport { IconButton } from \"@/components/primitives/Button\";\nimport type { PageHeaderProps } from \"./PageHeader.types\";\n\ninterface PageHeaderOwnerState {\n sticky: boolean;\n}\n\n/* Exact compiled output of the pre-migration Tailwind utilities, including\n * the sm: responsive rules (min-width:640px). Verified against the frozen\n * baseline. */\n\nconst PageHeaderRoot = /*#__PURE__*/ styled(\"div\", {\n label: \"AgenticPageHeader-root\",\n shouldForwardProp: (propName) => propName !== \"ownerState\"\n})<{ ownerState: PageHeaderOwnerState }>(({ ownerState }) => [\n {\n display: \"flex\",\n minHeight: \"52px\",\n flexDirection: \"column\",\n gap: \".75rem\",\n borderBottomWidth: \"1px\",\n \"--tw-border-opacity\": \"1\",\n borderColor: \"hsl(var(--bfrs-color-border-strong) / var(--tw-border-opacity, 1))\",\n \"--tw-bg-opacity\": \"1\",\n // The list page sheet (#FBFCFB), themed by colors.surfacePage like\n // ListPageLayout; the fallback keeps it outside a .bfrs scope.\n backgroundColor: \"hsl(var(--bfrs-color-surface-page, 120 14.29% 98.63%) / var(--tw-bg-opacity, 1))\",\n paddingLeft: \"1.25rem\",\n paddingRight: \"1.25rem\",\n paddingTop: \".75rem\",\n paddingBottom: \".75rem\",\n \"@media (min-width:640px)\": {\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: \"space-between\"\n }\n },\n ownerState.sticky && {\n position: \"sticky\",\n top: 0,\n zIndex: 40\n }\n]);\n\nconst PageHeaderLead = /*#__PURE__*/ styled(\"div\", {\n label: \"AgenticPageHeader-lead\"\n})({\n display: \"flex\",\n minWidth: \"0px\",\n alignItems: \"flex-start\",\n gap: \".75rem\"\n});\n\nconst PageHeaderTitleBlock = /*#__PURE__*/ styled(\"div\", {\n label: \"AgenticPageHeader-titleBlock\"\n})({\n minWidth: \"0px\"\n});\n\nconst PageHeaderEyebrow = /*#__PURE__*/ styled(\"div\", {\n label: \"AgenticPageHeader-eyebrow\"\n})({\n marginBottom: \".25rem\",\n fontSize: \"10.5px\",\n fontWeight: 700,\n textTransform: \"uppercase\",\n letterSpacing: \".08em\",\n \"--tw-text-opacity\": \"1\",\n color: \"hsl(var(--bfrs-color-primary) / var(--tw-text-opacity, 1))\"\n});\n\nconst PageHeaderTitle = /*#__PURE__*/ styled(\"h1\", {\n label: \"AgenticPageHeader-title\"\n})({\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n whiteSpace: \"nowrap\",\n fontSize: \"20px\",\n fontWeight: 600,\n lineHeight: \"1.5rem\",\n \"--tw-text-opacity\": \"1\",\n color: \"hsl(var(--bfrs-color-text-primary) / var(--tw-text-opacity, 1))\"\n});\n\nconst PageHeaderDescription = /*#__PURE__*/ styled(\"p\", {\n label: \"AgenticPageHeader-description\"\n})({\n marginTop: \".25rem\",\n maxWidth: \"42rem\",\n fontSize: \"12.5px\",\n lineHeight: \"1.25rem\",\n \"--tw-text-opacity\": \"1\",\n color: \"hsl(var(--bfrs-color-text-muted) / var(--tw-text-opacity, 1))\"\n});\n\nconst PageHeaderActions = /*#__PURE__*/ styled(\"div\", {\n label: \"AgenticPageHeader-actions\"\n})({\n display: \"flex\",\n flexWrap: \"wrap\",\n alignItems: \"center\",\n gap: \".5rem\",\n \"@media (min-width:640px)\": {\n justifyContent: \"flex-end\"\n }\n});\n\nexport const PageHeader = forwardRef<HTMLDivElement, PageHeaderProps>(\n ({ className, title, description, eyebrow, breadcrumb, onBack, backLabel = \"Go back\", actions, secondaryActions, sticky, titleClassName, descriptionClassName, ...props }, ref) => (\n <PageHeaderRoot ref={ref} ownerState={{ sticky: Boolean(sticky) }} className={className} {...props}>\n <PageHeaderLead>\n {onBack && <IconButton aria-label={backLabel} icon={<ArrowLeft size={16} />} size=\"sm\" variant=\"outline\" onClick={onBack} />}\n <PageHeaderTitleBlock>\n {breadcrumb}\n {eyebrow && <PageHeaderEyebrow>{eyebrow}</PageHeaderEyebrow>}\n <PageHeaderTitle className={titleClassName}>{title}</PageHeaderTitle>\n {description && <PageHeaderDescription className={descriptionClassName}>{description}</PageHeaderDescription>}\n </PageHeaderTitleBlock>\n </PageHeaderLead>\n {(actions || secondaryActions) && (\n <PageHeaderActions>\n {secondaryActions}\n {actions}\n </PageHeaderActions>\n )}\n </PageHeaderRoot>\n )\n);\n\nPageHeader.displayName = \"PageHeader\";\n"],"names":["PageHeaderRoot","propName","ownerState","PageHeaderLead","PageHeaderTitleBlock","PageHeaderEyebrow","PageHeaderTitle","PageHeaderDescription","PageHeaderActions","PageHeader","forwardRef","className","title","description","eyebrow","breadcrumb","onBack","backLabel","actions","secondaryActions","sticky","titleClassName","descriptionClassName","props","ref","jsxs","jsx","IconButton","ArrowLeft"],"mappings":";;;;;AAcA,MAA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ACjB,GAAA,EACE,UAAA;AAAA,MAAAW;AAAA,MACAD;AAAA,IAAA,EAAA,CACH;AAAA,EAAA,EAAA,CAEJ;AAEJ;AAEAT,EAAW,cAAc;"}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { jsxs as i, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { Root as p, Trigger as m, Portal as g, Content as h, Separator as f, Label as b, Item as u } from "../../../node_modules/@radix-ui/react-dropdown-menu/dist/index.js";
|
|
3
|
-
import { Check as
|
|
4
|
-
import
|
|
5
|
-
import { kfContentIn as
|
|
3
|
+
import { Check as v } from "../../../node_modules/@phosphor-icons/react/dist/csr/Check.es.js";
|
|
4
|
+
import o from "@emotion/styled";
|
|
5
|
+
import { kfContentIn as w } from "../../../lib/emotionTw.js";
|
|
6
6
|
import { floatingCollisionPadding as x } from "../../ui/overlays/overlayPositioning.js";
|
|
7
|
-
import { BfrsPortalScope as
|
|
8
|
-
const
|
|
7
|
+
import { BfrsPortalScope as y } from "../../ui/providers/BfrsProvider/BfrsProvider.js";
|
|
8
|
+
const S = {
|
|
9
9
|
xs: { paddingLeft: ".625rem", paddingRight: ".625rem", paddingTop: ".375rem", paddingBottom: ".375rem", fontSize: "12px" },
|
|
10
10
|
sm: { paddingLeft: ".75rem", paddingRight: ".75rem", paddingTop: ".5rem", paddingBottom: ".5rem", fontSize: ".75rem", lineHeight: "1rem" },
|
|
11
11
|
md: { paddingLeft: ".875rem", paddingRight: ".875rem", paddingTop: ".625rem", paddingBottom: ".625rem", fontSize: ".875rem", lineHeight: "1.25rem" },
|
|
12
12
|
lg: { paddingLeft: "1rem", paddingRight: "1rem", paddingTop: ".75rem", paddingBottom: ".75rem", fontSize: ".875rem", lineHeight: "1.25rem" }
|
|
13
|
-
},
|
|
13
|
+
}, A = /* @__PURE__ */ o(h, {
|
|
14
14
|
label: "AgenticActionMenu-content"
|
|
15
15
|
})({
|
|
16
16
|
zIndex: 1e3,
|
|
@@ -25,11 +25,11 @@ const A = {
|
|
|
25
25
|
"--tw-shadow": "var(--bfrs-shadow-elevated)",
|
|
26
26
|
"--tw-shadow-colored": "var(--bfrs-shadow-elevated)",
|
|
27
27
|
boxShadow: "var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)",
|
|
28
|
-
...
|
|
28
|
+
...w,
|
|
29
29
|
animation: "bfrs-bfrs-content-in var(--bfrs-motion-normal) var(--bfrs-ease-out)",
|
|
30
30
|
maxHeight: "min(24rem,var(--radix-dropdown-menu-content-available-height))",
|
|
31
31
|
overflow: "auto"
|
|
32
|
-
}), M = /* @__PURE__ */
|
|
32
|
+
}), M = /* @__PURE__ */ o(f, {
|
|
33
33
|
label: "AgenticActionMenu-separator"
|
|
34
34
|
})({
|
|
35
35
|
marginTop: ".25rem",
|
|
@@ -37,7 +37,7 @@ const A = {
|
|
|
37
37
|
height: "1px",
|
|
38
38
|
"--tw-bg-opacity": "1",
|
|
39
39
|
backgroundColor: "hsl(var(--bfrs-color-border) / var(--tw-bg-opacity, 1))"
|
|
40
|
-
}), I = /* @__PURE__ */
|
|
40
|
+
}), I = /* @__PURE__ */ o(b, {
|
|
41
41
|
label: "AgenticActionMenu-sectionLabel"
|
|
42
42
|
})({
|
|
43
43
|
paddingLeft: ".75rem",
|
|
@@ -50,10 +50,10 @@ const A = {
|
|
|
50
50
|
letterSpacing: ".08em",
|
|
51
51
|
"--tw-text-opacity": "1",
|
|
52
52
|
color: "hsl(var(--bfrs-color-text-muted) / var(--tw-text-opacity, 1))"
|
|
53
|
-
}), L = /* @__PURE__ */
|
|
53
|
+
}), L = /* @__PURE__ */ o(u, {
|
|
54
54
|
label: "AgenticActionMenu-item",
|
|
55
|
-
shouldForwardProp: (
|
|
56
|
-
})(({ ownerState:
|
|
55
|
+
shouldForwardProp: (r) => r !== "ownerState"
|
|
56
|
+
})(({ ownerState: r }) => [
|
|
57
57
|
{
|
|
58
58
|
display: "flex",
|
|
59
59
|
cursor: "pointer",
|
|
@@ -75,15 +75,22 @@ const A = {
|
|
|
75
75
|
},
|
|
76
76
|
"&[data-highlighted]": {
|
|
77
77
|
"--tw-bg-opacity": "1",
|
|
78
|
-
backgroundColor: "hsl(var(--bfrs-color-
|
|
78
|
+
backgroundColor: "hsl(var(--bfrs-color-option-hover) / var(--tw-bg-opacity, 1))"
|
|
79
79
|
}
|
|
80
80
|
},
|
|
81
|
-
|
|
82
|
-
|
|
81
|
+
S[r.size],
|
|
82
|
+
// Destructive rows stay danger red, highlighted or not. The others take the
|
|
83
|
+
// option hover text, which is unset by default, so they keep text-secondary.
|
|
84
|
+
r.destructive ? {
|
|
83
85
|
"--tw-text-opacity": "1",
|
|
84
86
|
color: "hsl(var(--bfrs-color-danger) / var(--tw-text-opacity, 1))"
|
|
87
|
+
} : {
|
|
88
|
+
"&[data-highlighted]": {
|
|
89
|
+
"--tw-text-opacity": "1",
|
|
90
|
+
color: "hsl(var(--bfrs-color-option-hover-text, var(--bfrs-color-text-secondary)) / var(--tw-text-opacity, 1))"
|
|
91
|
+
}
|
|
85
92
|
}
|
|
86
|
-
]), C = /* @__PURE__ */
|
|
93
|
+
]), C = /* @__PURE__ */ o("span", {
|
|
87
94
|
label: "AgenticActionMenu-itemIcon"
|
|
88
95
|
})({
|
|
89
96
|
display: "flex",
|
|
@@ -92,7 +99,7 @@ const A = {
|
|
|
92
99
|
flexShrink: 0,
|
|
93
100
|
alignItems: "center",
|
|
94
101
|
justifyContent: "center"
|
|
95
|
-
}), z = /* @__PURE__ */
|
|
102
|
+
}), z = /* @__PURE__ */ o("span", {
|
|
96
103
|
label: "AgenticActionMenu-itemLabel"
|
|
97
104
|
})({
|
|
98
105
|
minWidth: "0px",
|
|
@@ -100,12 +107,12 @@ const A = {
|
|
|
100
107
|
overflow: "hidden",
|
|
101
108
|
textOverflow: "ellipsis",
|
|
102
109
|
whiteSpace: "nowrap"
|
|
103
|
-
}), k = /* @__PURE__ */
|
|
110
|
+
}), k = /* @__PURE__ */ o("span", {
|
|
104
111
|
label: "AgenticActionMenu-itemBadge"
|
|
105
112
|
})({
|
|
106
113
|
marginLeft: ".5rem",
|
|
107
114
|
flexShrink: 0
|
|
108
|
-
}), B = /* @__PURE__ */
|
|
115
|
+
}), B = /* @__PURE__ */ o("span", {
|
|
109
116
|
label: "AgenticActionMenu-itemShortcut"
|
|
110
117
|
})({
|
|
111
118
|
marginLeft: ".75rem",
|
|
@@ -115,17 +122,17 @@ const A = {
|
|
|
115
122
|
"--tw-text-opacity": "1",
|
|
116
123
|
color: "hsl(var(--bfrs-color-text-muted) / var(--tw-text-opacity, 1))"
|
|
117
124
|
});
|
|
118
|
-
function U({ trigger:
|
|
125
|
+
function U({ trigger: r, items: a, align: d = "end", side: c = "bottom", size: l = "md", className: s }) {
|
|
119
126
|
return /* @__PURE__ */ i(p, { children: [
|
|
120
|
-
/* @__PURE__ */ t(m, { asChild: !0, children:
|
|
121
|
-
/* @__PURE__ */ t(g, { children: /* @__PURE__ */ t(
|
|
127
|
+
/* @__PURE__ */ t(m, { asChild: !0, children: r }),
|
|
128
|
+
/* @__PURE__ */ t(g, { children: /* @__PURE__ */ t(y, { children: /* @__PURE__ */ t(A, { align: d, side: c, sideOffset: 6, collisionPadding: x, className: s, children: a.map((e, n) => e.divider ? /* @__PURE__ */ t(M, {}, e.id ?? `divider-${n}`) : e.section ? /* @__PURE__ */ t(I, { children: e.section }, e.id ?? `section-${n}`) : /* @__PURE__ */ i(
|
|
122
129
|
L,
|
|
123
130
|
{
|
|
124
131
|
disabled: e.disabled,
|
|
125
132
|
onSelect: e.onSelect,
|
|
126
133
|
ownerState: { size: l, destructive: !!e.destructive },
|
|
127
134
|
children: [
|
|
128
|
-
/* @__PURE__ */ t(C, { children: e.checked ? /* @__PURE__ */ t(
|
|
135
|
+
/* @__PURE__ */ t(C, { children: e.checked ? /* @__PURE__ */ t(v, { size: 14, weight: "bold" }) : e.icon }),
|
|
129
136
|
/* @__PURE__ */ t(z, { children: e.label }),
|
|
130
137
|
e.badge && /* @__PURE__ */ t(k, { children: e.badge }),
|
|
131
138
|
e.shortcut && /* @__PURE__ */ t(B, { children: e.shortcut })
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionMenu.js","sources":["../../../../src/components/navigation/ActionMenu/ActionMenu.tsx"],"sourcesContent":["import * as DropdownMenu from \"@radix-ui/react-dropdown-menu\";\nimport { Check } from \"@phosphor-icons/react\";\nimport styled from \"@emotion/styled\";\nimport type { CSSObject } from \"@emotion/react\";\nimport { kfContentIn } from \"@/lib/emotionTw\";\nimport { BfrsPortalScope } from \"@/components/ui/providers/BfrsProvider\";\nimport { floatingCollisionPadding } from \"@/components/ui/overlays/overlayPositioning\";\nimport type { ActionMenuProps } from \"./ActionMenu.types\";\n\ntype ActionMenuSize = \"xs\" | \"sm\" | \"md\" | \"lg\";\n\n/* Exact compiled output of the pre-migration Tailwind utilities, in the same\n * class-list emission order. Verified against the frozen baseline. */\n\nconst actionMenuItemSize: Record<ActionMenuSize, CSSObject> = {\n xs: { paddingLeft: \".625rem\", paddingRight: \".625rem\", paddingTop: \".375rem\", paddingBottom: \".375rem\", fontSize: \"12px\" },\n sm: { paddingLeft: \".75rem\", paddingRight: \".75rem\", paddingTop: \".5rem\", paddingBottom: \".5rem\", fontSize: \".75rem\", lineHeight: \"1rem\" },\n md: { paddingLeft: \".875rem\", paddingRight: \".875rem\", paddingTop: \".625rem\", paddingBottom: \".625rem\", fontSize: \".875rem\", lineHeight: \"1.25rem\" },\n lg: { paddingLeft: \"1rem\", paddingRight: \"1rem\", paddingTop: \".75rem\", paddingBottom: \".75rem\", fontSize: \".875rem\", lineHeight: \"1.25rem\" }\n};\n\nconst ActionMenuContent = /*#__PURE__*/ styled(DropdownMenu.Content, {\n label: \"AgenticActionMenu-content\"\n})({\n zIndex: 1000,\n minWidth: \"12rem\",\n borderRadius: \"var(--bfrs-radius-lg)\",\n borderWidth: \"1px\",\n \"--tw-border-opacity\": \"1\",\n borderColor: \"hsl(var(--bfrs-color-border) / var(--tw-border-opacity, 1))\",\n \"--tw-bg-opacity\": \"1\",\n backgroundColor: \"hsl(var(--bfrs-color-surface-card) / var(--tw-bg-opacity, 1))\",\n padding: \".25rem\",\n \"--tw-shadow\": \"var(--bfrs-shadow-elevated)\",\n \"--tw-shadow-colored\": \"var(--bfrs-shadow-elevated)\",\n boxShadow: \"var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)\",\n ...kfContentIn,\n animation: \"bfrs-bfrs-content-in var(--bfrs-motion-normal) var(--bfrs-ease-out)\",\n maxHeight: \"min(24rem,var(--radix-dropdown-menu-content-available-height))\",\n overflow: \"auto\"\n});\n\nconst ActionMenuSeparator = /*#__PURE__*/ styled(DropdownMenu.Separator, {\n label: \"AgenticActionMenu-separator\"\n})({\n marginTop: \".25rem\",\n marginBottom: \".25rem\",\n height: \"1px\",\n \"--tw-bg-opacity\": \"1\",\n backgroundColor: \"hsl(var(--bfrs-color-border) / var(--tw-bg-opacity, 1))\"\n});\n\nconst ActionMenuSectionLabel = /*#__PURE__*/ styled(DropdownMenu.Label, {\n label: \"AgenticActionMenu-sectionLabel\"\n})({\n paddingLeft: \".75rem\",\n paddingRight: \".75rem\",\n paddingTop: \".375rem\",\n paddingBottom: \".375rem\",\n fontSize: \"10px\",\n fontWeight: 700,\n textTransform: \"uppercase\",\n letterSpacing: \".08em\",\n \"--tw-text-opacity\": \"1\",\n color: \"hsl(var(--bfrs-color-text-muted) / var(--tw-text-opacity, 1))\"\n});\n\ninterface ActionMenuItemOwnerState {\n size: ActionMenuSize;\n destructive: boolean;\n}\n\nconst ActionMenuItem = /*#__PURE__*/ styled(DropdownMenu.Item, {\n label: \"AgenticActionMenu-item\",\n shouldForwardProp: (propName) => propName !== \"ownerState\"\n})<{ ownerState: ActionMenuItemOwnerState }>(({ ownerState }) => [\n {\n display: \"flex\",\n cursor: \"pointer\",\n WebkitUserSelect: \"none\",\n MozUserSelect: \"none\",\n userSelect: \"none\",\n alignItems: \"center\",\n gap: \".5rem\",\n borderRadius: \"var(--bfrs-radius-md)\",\n \"--tw-text-opacity\": \"1\",\n color: \"hsl(var(--bfrs-color-text-secondary) / var(--tw-text-opacity, 1))\",\n outline: \"2px solid transparent\",\n outlineOffset: \"2px\",\n \"&[data-disabled]\": {\n pointerEvents: \"none\",\n cursor: \"default\",\n \"--tw-text-opacity\": \"1\",\n color: \"hsl(var(--bfrs-color-text-disabled) / var(--tw-text-opacity, 1))\"\n },\n \"&[data-highlighted]\": {\n \"--tw-bg-opacity\": \"1\",\n backgroundColor: \"hsl(var(--bfrs-color-primary-soft) / var(--tw-bg-opacity, 1))\"\n }\n },\n actionMenuItemSize[ownerState.size],\n ownerState.destructive && {\n \"--tw-text-opacity\": \"1\",\n color: \"hsl(var(--bfrs-color-danger) / var(--tw-text-opacity, 1))\"\n }\n]);\n\nconst ActionMenuItemIcon = /*#__PURE__*/ styled(\"span\", {\n label: \"AgenticActionMenu-itemIcon\"\n})({\n display: \"flex\",\n width: \"1rem\",\n height: \"1rem\",\n flexShrink: 0,\n alignItems: \"center\",\n justifyContent: \"center\"\n});\n\nconst ActionMenuItemLabel = /*#__PURE__*/ styled(\"span\", {\n label: \"AgenticActionMenu-itemLabel\"\n})({\n minWidth: \"0px\",\n flex: \"1 1 0%\",\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n whiteSpace: \"nowrap\"\n});\n\nconst ActionMenuItemBadge = /*#__PURE__*/ styled(\"span\", {\n label: \"AgenticActionMenu-itemBadge\"\n})({\n marginLeft: \".5rem\",\n flexShrink: 0\n});\n\nconst ActionMenuItemShortcut = /*#__PURE__*/ styled(\"span\", {\n label: \"AgenticActionMenu-itemShortcut\"\n})({\n marginLeft: \".75rem\",\n flexShrink: 0,\n fontSize: \".75rem\",\n lineHeight: \"1rem\",\n \"--tw-text-opacity\": \"1\",\n color: \"hsl(var(--bfrs-color-text-muted) / var(--tw-text-opacity, 1))\"\n});\n\nexport function ActionMenu({ trigger, items, align = \"end\", side = \"bottom\", size = \"md\", className }: ActionMenuProps) {\n return (\n <DropdownMenu.Root>\n <DropdownMenu.Trigger asChild>{trigger}</DropdownMenu.Trigger>\n <DropdownMenu.Portal>\n <BfrsPortalScope>\n <ActionMenuContent align={align} side={side} sideOffset={6} collisionPadding={floatingCollisionPadding} className={className}>\n {items.map((item, index) => {\n if (item.divider) return <ActionMenuSeparator key={item.id ?? `divider-${index}`} />;\n if (item.section) {\n return <ActionMenuSectionLabel key={item.id ?? `section-${index}`}>{item.section}</ActionMenuSectionLabel>;\n }\n\n return (\n <ActionMenuItem\n key={item.id ?? index}\n disabled={item.disabled}\n onSelect={item.onSelect}\n ownerState={{ size, destructive: Boolean(item.destructive) }}\n >\n <ActionMenuItemIcon>{item.checked ? <Check size={14} weight=\"bold\" /> : item.icon}</ActionMenuItemIcon>\n <ActionMenuItemLabel>{item.label}</ActionMenuItemLabel>\n {item.badge && <ActionMenuItemBadge>{item.badge}</ActionMenuItemBadge>}\n {item.shortcut && <ActionMenuItemShortcut>{item.shortcut}</ActionMenuItemShortcut>}\n </ActionMenuItem>\n );\n })}\n </ActionMenuContent>\n </BfrsPortalScope>\n </DropdownMenu.Portal>\n </DropdownMenu.Root>\n );\n}\n"],"names":["actionMenuItemSize","ActionMenuContent","styled","DropdownMenu.Content","kfContentIn","ActionMenuSeparator","DropdownMenu.Separator","ActionMenuSectionLabel","DropdownMenu.Label","ActionMenuItem","DropdownMenu.Item","propName","ownerState","ActionMenuItemIcon","ActionMenuItemLabel","ActionMenuItemBadge","ActionMenuItemShortcut","ActionMenu","trigger","items","align","side","size","className","jsxs","DropdownMenu.Root","jsx","DropdownMenu.Trigger","DropdownMenu.Portal","BfrsPortalScope","floatingCollisionPadding","item","index","Check"],"mappings":";;;;;;;AAcA,MAAMA,IAAwD;AAAA,EAC5D,IAAI,EAAE,aAAa,WAAW,cAAc,WAAW,YAAY,WAAW,eAAe,WAAW,UAAU,OAAA;AAAA,EAClH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["import * as DropdownMenu from \"@radix-ui/react-dropdown-menu\";\nimport { Check } from \"@phosphor-icons/react\";\nimport styled from \"@emotion/styled\";\nimport type { CSSObject } from \"@emotion/react\";\nimport { kfContentIn } from \"@/lib/emotionTw\";\nimport { BfrsPortalScope } from \"@/components/ui/providers/BfrsProvider\";\nimport { floatingCollisionPadding } from \"@/components/ui/overlays/overlayPositioning\";\nimport type { ActionMenuProps } from \"./ActionMenu.types\";\n\ntype ActionMenuSize = \"xs\" | \"sm\" | \"md\" | \"lg\";\n\n/* Exact compiled output of the pre-migration Tailwind utilities, in the same\n * class-list emission order. Verified against the frozen baseline. */\n\nconst actionMenuItemSize: Record<ActionMenuSize, CSSObject> = {\n xs: { paddingLeft: \".625rem\", paddingRight: \".625rem\", paddingTop: \".375rem\", paddingBottom: \".375rem\", fontSize: \"12px\" },\n sm: { paddingLeft: \".75rem\", paddingRight: \".75rem\", paddingTop: \".5rem\", paddingBottom: \".5rem\", fontSize: \".75rem\", lineHeight: \"1rem\" },\n md: { paddingLeft: \".875rem\", paddingRight: \".875rem\", paddingTop: \".625rem\", paddingBottom: \".625rem\", fontSize: \".875rem\", lineHeight: \"1.25rem\" },\n lg: { paddingLeft: \"1rem\", paddingRight: \"1rem\", paddingTop: \".75rem\", paddingBottom: \".75rem\", fontSize: \".875rem\", lineHeight: \"1.25rem\" }\n};\n\nconst ActionMenuContent = /*#__PURE__*/ styled(DropdownMenu.Content, {\n label: \"AgenticActionMenu-content\"\n})({\n zIndex: 1000,\n minWidth: \"12rem\",\n borderRadius: \"var(--bfrs-radius-lg)\",\n borderWidth: \"1px\",\n \"--tw-border-opacity\": \"1\",\n borderColor: \"hsl(var(--bfrs-color-border) / var(--tw-border-opacity, 1))\",\n \"--tw-bg-opacity\": \"1\",\n backgroundColor: \"hsl(var(--bfrs-color-surface-card) / var(--tw-bg-opacity, 1))\",\n padding: \".25rem\",\n \"--tw-shadow\": \"var(--bfrs-shadow-elevated)\",\n \"--tw-shadow-colored\": \"var(--bfrs-shadow-elevated)\",\n boxShadow: \"var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)\",\n ...kfContentIn,\n animation: \"bfrs-bfrs-content-in var(--bfrs-motion-normal) var(--bfrs-ease-out)\",\n maxHeight: \"min(24rem,var(--radix-dropdown-menu-content-available-height))\",\n overflow: \"auto\"\n});\n\nconst ActionMenuSeparator = /*#__PURE__*/ styled(DropdownMenu.Separator, {\n label: \"AgenticActionMenu-separator\"\n})({\n marginTop: \".25rem\",\n marginBottom: \".25rem\",\n height: \"1px\",\n \"--tw-bg-opacity\": \"1\",\n backgroundColor: \"hsl(var(--bfrs-color-border) / var(--tw-bg-opacity, 1))\"\n});\n\nconst ActionMenuSectionLabel = /*#__PURE__*/ styled(DropdownMenu.Label, {\n label: \"AgenticActionMenu-sectionLabel\"\n})({\n paddingLeft: \".75rem\",\n paddingRight: \".75rem\",\n paddingTop: \".375rem\",\n paddingBottom: \".375rem\",\n fontSize: \"10px\",\n fontWeight: 700,\n textTransform: \"uppercase\",\n letterSpacing: \".08em\",\n \"--tw-text-opacity\": \"1\",\n color: \"hsl(var(--bfrs-color-text-muted) / var(--tw-text-opacity, 1))\"\n});\n\ninterface ActionMenuItemOwnerState {\n size: ActionMenuSize;\n destructive: boolean;\n}\n\nconst ActionMenuItem = /*#__PURE__*/ styled(DropdownMenu.Item, {\n label: \"AgenticActionMenu-item\",\n shouldForwardProp: (propName) => propName !== \"ownerState\"\n})<{ ownerState: ActionMenuItemOwnerState }>(({ ownerState }) => [\n {\n display: \"flex\",\n cursor: \"pointer\",\n WebkitUserSelect: \"none\",\n MozUserSelect: \"none\",\n userSelect: \"none\",\n alignItems: \"center\",\n gap: \".5rem\",\n borderRadius: \"var(--bfrs-radius-md)\",\n \"--tw-text-opacity\": \"1\",\n color: \"hsl(var(--bfrs-color-text-secondary) / var(--tw-text-opacity, 1))\",\n outline: \"2px solid transparent\",\n outlineOffset: \"2px\",\n \"&[data-disabled]\": {\n pointerEvents: \"none\",\n cursor: \"default\",\n \"--tw-text-opacity\": \"1\",\n color: \"hsl(var(--bfrs-color-text-disabled) / var(--tw-text-opacity, 1))\"\n },\n \"&[data-highlighted]\": {\n \"--tw-bg-opacity\": \"1\",\n backgroundColor: \"hsl(var(--bfrs-color-option-hover) / var(--tw-bg-opacity, 1))\"\n }\n },\n actionMenuItemSize[ownerState.size],\n // Destructive rows stay danger red, highlighted or not. The others take the\n // option hover text, which is unset by default, so they keep text-secondary.\n ownerState.destructive\n ? {\n \"--tw-text-opacity\": \"1\",\n color: \"hsl(var(--bfrs-color-danger) / var(--tw-text-opacity, 1))\"\n }\n : {\n \"&[data-highlighted]\": {\n \"--tw-text-opacity\": \"1\",\n color: \"hsl(var(--bfrs-color-option-hover-text, var(--bfrs-color-text-secondary)) / var(--tw-text-opacity, 1))\"\n }\n }\n]);\n\nconst ActionMenuItemIcon = /*#__PURE__*/ styled(\"span\", {\n label: \"AgenticActionMenu-itemIcon\"\n})({\n display: \"flex\",\n width: \"1rem\",\n height: \"1rem\",\n flexShrink: 0,\n alignItems: \"center\",\n justifyContent: \"center\"\n});\n\nconst ActionMenuItemLabel = /*#__PURE__*/ styled(\"span\", {\n label: \"AgenticActionMenu-itemLabel\"\n})({\n minWidth: \"0px\",\n flex: \"1 1 0%\",\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n whiteSpace: \"nowrap\"\n});\n\nconst ActionMenuItemBadge = /*#__PURE__*/ styled(\"span\", {\n label: \"AgenticActionMenu-itemBadge\"\n})({\n marginLeft: \".5rem\",\n flexShrink: 0\n});\n\nconst ActionMenuItemShortcut = /*#__PURE__*/ styled(\"span\", {\n label: \"AgenticActionMenu-itemShortcut\"\n})({\n marginLeft: \".75rem\",\n flexShrink: 0,\n fontSize: \".75rem\",\n lineHeight: \"1rem\",\n \"--tw-text-opacity\": \"1\",\n color: \"hsl(var(--bfrs-color-text-muted) / var(--tw-text-opacity, 1))\"\n});\n\nexport function ActionMenu({ trigger, items, align = \"end\", side = \"bottom\", size = \"md\", className }: ActionMenuProps) {\n return (\n <DropdownMenu.Root>\n <DropdownMenu.Trigger asChild>{trigger}</DropdownMenu.Trigger>\n <DropdownMenu.Portal>\n <BfrsPortalScope>\n <ActionMenuContent align={align} side={side} sideOffset={6} collisionPadding={floatingCollisionPadding} className={className}>\n {items.map((item, index) => {\n if (item.divider) return <ActionMenuSeparator key={item.id ?? `divider-${index}`} />;\n if (item.section) {\n return <ActionMenuSectionLabel key={item.id ?? `section-${index}`}>{item.section}</ActionMenuSectionLabel>;\n }\n\n return (\n <ActionMenuItem\n key={item.id ?? index}\n disabled={item.disabled}\n onSelect={item.onSelect}\n ownerState={{ size, destructive: Boolean(item.destructive) }}\n >\n <ActionMenuItemIcon>{item.checked ? <Check size={14} weight=\"bold\" /> : item.icon}</ActionMenuItemIcon>\n <ActionMenuItemLabel>{item.label}</ActionMenuItemLabel>\n {item.badge && <ActionMenuItemBadge>{item.badge}</ActionMenuItemBadge>}\n {item.shortcut && <ActionMenuItemShortcut>{item.shortcut}</ActionMenuItemShortcut>}\n </ActionMenuItem>\n );\n })}\n </ActionMenuContent>\n </BfrsPortalScope>\n </DropdownMenu.Portal>\n </DropdownMenu.Root>\n );\n}\n"],"names":["actionMenuItemSize","ActionMenuContent","styled","DropdownMenu.Content","kfContentIn","ActionMenuSeparator","DropdownMenu.Separator","ActionMenuSectionLabel","DropdownMenu.Label","ActionMenuItem","DropdownMenu.Item","propName","ownerState","ActionMenuItemIcon","ActionMenuItemLabel","ActionMenuItemBadge","ActionMenuItemShortcut","ActionMenu","trigger","items","align","side","size","className","jsxs","DropdownMenu.Root","jsx","DropdownMenu.Trigger","DropdownMenu.Portal","BfrsPortalScope","floatingCollisionPadding","item","index","Check"],"mappings":";;;;;;;AAcA,MAAMA,IAAwD;AAAA,EAC5D,IAAI,EAAE,aAAa,WAAW,cAAc,WAAW,YAAY,WAAW,eAAe,WAAW,UAAU,OAAA;AAAA,EAClH,IAAI,E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