From b57decdf8fee5cf9f173d3cde94b31f641fd80c0 Mon Sep 17 00:00:00 2001 From: Jingjing <8jjxie@gmail.com> Date: Thu, 11 Dec 2025 14:03:17 +0100 Subject: [PATCH] feat: add pin item to selection bar --- .../components/selections/AppSelections.jsx | 8 +- .../src/components/selections/More.jsx | 17 +- .../src/components/selections/MultiState.jsx | 4 +- .../src/components/selections/OneField.jsx | 285 ++++++++++-------- .../src/components/selections/PinItem.jsx | 51 ++++ .../components/selections/SelectedFields.jsx | 81 ++++- .../selections/__tests__/pin-item.test.jsx | 207 +++++++++++++ .../__tests__/selected-fields.test.jsx | 10 +- .../components/selections/single-public.js | 32 ++ .../src/components/selections/utils.js | 87 ++++++ apis/nucleus/src/index.js | 1 + 11 files changed, 632 insertions(+), 151 deletions(-) create mode 100644 apis/nucleus/src/components/selections/PinItem.jsx create mode 100644 apis/nucleus/src/components/selections/__tests__/pin-item.test.jsx create mode 100644 apis/nucleus/src/components/selections/single-public.js create mode 100644 apis/nucleus/src/components/selections/utils.js diff --git a/apis/nucleus/src/components/selections/AppSelections.jsx b/apis/nucleus/src/components/selections/AppSelections.jsx index 8c6ae63fa..b188d4b34 100644 --- a/apis/nucleus/src/components/selections/AppSelections.jsx +++ b/apis/nucleus/src/components/selections/AppSelections.jsx @@ -10,7 +10,7 @@ import Nav from './Nav'; import useAppSelections from '../../hooks/useAppSelections'; import uid from '../../object/uid'; -function AppSelections({ app }) { +function AppSelections({ app, halo }) { const theme = useTheme(); const [appSelections] = useAppSelections(app); if (!appSelections) return null; @@ -33,7 +33,7 @@ function AppSelections({ app }) {