@hopgoldy/cube-ui 0.1.1 → 0.2.0

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/README.md CHANGED
@@ -82,6 +82,27 @@ export const LoginPage = () => (
82
82
  );
83
83
  ```
84
84
 
85
- `CubePage` is the single page-level container every page renders: it lays out scrollable content and an optional mobile-only action bar, and lets the page override `CubeApp`'s header-left slot via `desktopHeaderLeft` for as long as it stays mounted. `ActionIcon` and `ActionButton` are the shared mobile action-bar primitives, matching the pattern already used in cube-xxx apps.
85
+ `CubePage` is the single page-level container every page renders: it lays out scrollable content and an optional mobile-only action bar, and lets the page override `CubeApp`'s header-left slot via `desktopHeaderLeft` for as long as it stays mounted. `ActionIcon` and `ActionButton` are the shared mobile action-bar primitives, matching the pattern already used in cube-xxx apps. `ActionSearch` is the matching search field that fills the remaining action-bar width.
86
+
87
+ `CubeSearchPage` is the shared search-page shell: desktop `Input.Search` plus optional filters, a mobile action bar (back, optional filter drawer, search), and pending / loading / empty states via `EmptyTip`. Apps pass result rows as children and filter UI (for example `ColorList`) through the `filters` slot — item cards and data fetching stay in the app.
88
+
89
+ ```tsx
90
+ import { ColorList, CubeSearchPage } from "@hopgoldy/cube-ui";
91
+
92
+ <CubeSearchPage
93
+ keyword={keyword}
94
+ onSearch={setKeyword}
95
+ onBack={() => navigate(-1)}
96
+ desktopHeaderLeft="搜索凭证"
97
+ pending={!keyword && colors.length === 0}
98
+ loading={isSearching}
99
+ empty={items.length === 0}
100
+ emptyTitle="没有找到相关凭证"
101
+ filters={<ColorList value={colors[0] || ""} onChange={onSelectColor} />}
102
+ mobileFilterTitle="凭证筛选"
103
+ >
104
+ {items.map(renderItem)}
105
+ </CubeSearchPage>
106
+ ```
86
107
 
87
108
  This package is intentionally UI-only. It does not depend on routers, HTTP clients, application stores, or authentication logic.
package/dist/index.css CHANGED
@@ -281,4 +281,74 @@
281
281
  .cube-page-action-icon {
282
282
  flex-shrink: 0;
283
283
  }
284
+ .cube-page-action-search {
285
+ flex: 1;
286
+ min-width: 0;
287
+ }
288
+
289
+ /* src/empty-tip/empty-tip.css */
290
+ .cube-empty-tip-title {
291
+ font-weight: 700;
292
+ font-size: 1rem;
293
+ }
294
+ .cube-empty-tip-subtitle {
295
+ color: #9ca3af;
296
+ }
297
+
298
+ /* src/color-list/color-list.css */
299
+ .cube-color-dot {
300
+ width: 1.5rem;
301
+ height: 1.5rem;
302
+ padding: 0;
303
+ border: none;
304
+ border-radius: 9999px;
305
+ cursor: pointer;
306
+ transition: box-shadow 0.15s ease;
307
+ }
308
+ .cube-color-dot:hover {
309
+ box-shadow: 0 0 0 4px #d1d5db;
310
+ }
311
+ html.dark .cube-color-dot:hover,
312
+ [data-theme=dark] .cube-color-dot:hover {
313
+ box-shadow: 0 0 0 4px #737373;
314
+ }
315
+ .cube-color-dot-selected {
316
+ box-shadow: 0 0 0 4px #9ca3af;
317
+ }
318
+ .cube-color-dot-selected:hover {
319
+ box-shadow: 0 0 0 4px #9ca3af;
320
+ }
321
+ html.dark .cube-color-dot-selected,
322
+ [data-theme=dark] .cube-color-dot-selected,
323
+ html.dark .cube-color-dot-selected:hover,
324
+ [data-theme=dark] .cube-color-dot-selected:hover {
325
+ box-shadow: 0 0 0 4px #4b5563;
326
+ }
327
+ .cube-color-dot-clear {
328
+ border: 2px solid #ef4444;
329
+ position: relative;
330
+ overflow: hidden;
331
+ background-color: transparent;
332
+ }
333
+ .cube-color-dot-clear::after {
334
+ content: "";
335
+ position: absolute;
336
+ left: -1px;
337
+ top: 10px;
338
+ width: 25px;
339
+ height: 2px;
340
+ background: #ef4444;
341
+ transform: rotate(45deg);
342
+ }
343
+
344
+ /* src/search-page/search-page.css */
345
+ .cube-search-page {
346
+ width: 100%;
347
+ box-sizing: border-box;
348
+ padding: 1rem;
349
+ }
350
+ .cube-search-page-input,
351
+ .cube-search-page-results {
352
+ width: 100%;
353
+ }
284
354
  /*# sourceMappingURL=index.css.map */
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/styles.css","../src/app-header/app-header.css","../src/account-menu/account-menu.css","../src/about-dialog/about-dialog.css","../src/cube-app/cube-app.css","../src/mobile-account-sheet/mobile-account-sheet.css","../src/loading/loading.css","../src/page/page.css"],"sourcesContent":[":root {\n --cube-header-height: 3rem;\n --cube-sidebar-width: 15rem;\n --cube-mobile-action-height: 40px;\n --cube-border-color: #d1d5db;\n --cube-dark-border-color: #374151;\n --cube-surface-color: #ffffff;\n --cube-dark-surface-color: #141414;\n}\n",".cube-app-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n height: var(--cube-header-height, 3rem);\n padding: 0.5rem 1rem;\n overflow: hidden;\n box-sizing: border-box;\n color: inherit;\n background: var(--cube-surface-color, #fff);\n border-bottom: 1px solid var(--cube-border-color, #d1d5db);\n transition: color 200ms ease, background-color 200ms ease,\n border-color 200ms ease;\n}\n\n.dark .cube-app-header,\n[data-theme=\"dark\"] .cube-app-header {\n background: var(--cube-dark-surface-color, #141414);\n border-bottom-color: var(--cube-dark-border-color, #374151);\n}\n\n.cube-app-header-leading {\n display: flex;\n flex: 1 1 auto;\n align-items: center;\n min-width: 0;\n overflow: hidden;\n}\n\n.cube-app-header-toggle {\n display: inline-flex;\n flex: 0 0 auto;\n align-items: center;\n justify-content: center;\n padding: 0;\n margin: 0 1rem 0 0;\n font: inherit;\n font-size: 1.25rem;\n color: inherit;\n cursor: pointer;\n background: transparent;\n border: 0;\n}\n\n.cube-app-header-toggle:focus-visible {\n outline: 2px solid #1677ff;\n outline-offset: 3px;\n border-radius: 2px;\n}\n\n.cube-app-header-title {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.cube-app-header-actions {\n display: flex;\n flex: 0 0 auto;\n align-items: center;\n gap: 0.5rem;\n margin-left: 0.5rem;\n}\n",".cube-account-trigger {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n padding: 0.25rem;\n margin: 0;\n font: inherit;\n font-size: 1.25rem;\n line-height: 1;\n color: inherit;\n cursor: pointer;\n background: transparent;\n border: 0;\n}\n\n.cube-account-trigger:focus-visible {\n outline: 2px solid #1677ff;\n outline-offset: 3px;\n border-radius: 50%;\n}\n\n.cube-account-menu {\n width: 16rem;\n max-width: calc(100vw - 2rem);\n}\n\n.cube-account-menu-stats {\n display: flex;\n justify-content: space-around;\n gap: 1rem;\n margin-bottom: 1rem;\n}\n\n.cube-account-menu-items {\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n}\n\n.cube-account-menu-footer {\n margin-top: 0.5rem;\n}\n",".cube-about-body {\n margin-bottom: 1rem;\n}\n\n.cube-about-description {\n margin: 1rem 0 0.5rem;\n font-size: 1rem;\n line-height: 1.5;\n}\n\n.cube-about-item {\n padding: 0.5rem;\n color: #6b7280;\n background: #f3f4f6;\n border-radius: 0.375rem;\n}\n\n.dark .cube-about-item,\n[data-theme=\"dark\"] .cube-about-item {\n color: #e5e7eb;\n background: #262626;\n}\n\n.cube-about-item-label {\n color: inherit;\n white-space: nowrap;\n}\n\n.cube-about-item-value {\n min-width: 0;\n overflow: hidden;\n text-align: right;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.cube-about-link {\n color: inherit;\n text-decoration: none;\n}\n\n.cube-about-powered-by {\n color: #6b7280;\n}\n\n.dark .cube-about-powered-by,\n[data-theme=\"dark\"] .cube-about-powered-by {\n color: #e5e7eb;\n}\n",".cube-app-root {\n display: flex;\n width: 100%;\n height: 100%;\n overflow: hidden;\n}\n\n.cube-app-sidebar {\n display: flex;\n flex-direction: column;\n flex-shrink: 0;\n overflow: hidden;\n transition: width 200ms ease;\n}\n\n.cube-app-sidebar-top,\n.cube-app-sidebar-bottom {\n flex-shrink: 0;\n}\n\n.cube-app-sidebar-list {\n flex: 1 1 auto;\n min-height: 0;\n overflow-y: auto;\n}\n\n.cube-app-desktop-area {\n flex-grow: 1;\n min-width: 0;\n height: 100%;\n overflow: hidden;\n transition: width 200ms ease;\n}\n\n.cube-app-content {\n height: calc(100% - var(--cube-header-height, 3rem) - 1px);\n overflow-y: auto;\n}\n\n.cube-app-search-button {\n width: 15rem;\n}\n\n.cube-app-mobile-root {\n width: 100vw;\n height: 100%;\n overflow: hidden;\n}\n\n.cube-app-mobile-content {\n width: 100%;\n height: 100%;\n overflow-y: auto;\n}\n",".cube-sheet-card {\n padding: 0.5rem 0.75rem;\n background: var(--cube-surface-color, #fff);\n border: 1px solid var(--cube-border-color, #d1d5db);\n border-radius: 0.5rem;\n}\n\n.dark .cube-sheet-card,\n[data-theme=\"dark\"] .cube-sheet-card {\n background: var(--cube-dark-surface-color, #141414);\n border-color: var(--cube-dark-border-color, #374151);\n}\n\n.cube-sheet-cell {\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n padding: 0.375rem 0;\n font: inherit;\n color: inherit;\n text-align: left;\n cursor: pointer;\n background: transparent;\n border: 0;\n}\n\n.cube-sheet-split-line {\n height: 1px;\n margin: 0.25rem 0;\n background: var(--cube-border-color, #d1d5db);\n}\n\n.dark .cube-sheet-split-line,\n[data-theme=\"dark\"] .cube-sheet-split-line {\n background: var(--cube-dark-border-color, #374151);\n}\n",".cube-page-loading {\n width: 100%;\n height: 100%;\n}\n\n.cube-delayed-loading {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n margin: 1.5rem 0;\n}\n\n.dark .cube-delayed-loading,\n[data-theme=\"dark\"] .cube-delayed-loading {\n color: #9ca3af;\n}\n",".cube-page-container {\n width: 100%;\n height: 100%;\n overflow: hidden;\n}\n\n.cube-page-content {\n position: relative;\n height: 100%;\n overflow-y: auto;\n}\n\n@media (max-width: 767px) {\n .cube-page-content {\n height: calc(100% - var(--cube-mobile-action-height, 40px) - 1rem);\n }\n}\n\n.cube-page-action-bar {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 0.5rem;\n height: var(--cube-mobile-action-height, 40px);\n padding: 0.5rem;\n}\n\n.cube-page-action-icon {\n flex-shrink: 0;\n}\n"],"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":3,"sources":["../src/styles.css","../src/app-header/app-header.css","../src/account-menu/account-menu.css","../src/about-dialog/about-dialog.css","../src/cube-app/cube-app.css","../src/mobile-account-sheet/mobile-account-sheet.css","../src/loading/loading.css","../src/page/page.css","../src/empty-tip/empty-tip.css","../src/color-list/color-list.css","../src/search-page/search-page.css"],"sourcesContent":[":root {\n --cube-header-height: 3rem;\n --cube-sidebar-width: 15rem;\n --cube-mobile-action-height: 40px;\n --cube-border-color: #d1d5db;\n --cube-dark-border-color: #374151;\n --cube-surface-color: #ffffff;\n --cube-dark-surface-color: #141414;\n}\n",".cube-app-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n height: var(--cube-header-height, 3rem);\n padding: 0.5rem 1rem;\n overflow: hidden;\n box-sizing: border-box;\n color: inherit;\n background: var(--cube-surface-color, #fff);\n border-bottom: 1px solid var(--cube-border-color, #d1d5db);\n transition: color 200ms ease, background-color 200ms ease,\n border-color 200ms ease;\n}\n\n.dark .cube-app-header,\n[data-theme=\"dark\"] .cube-app-header {\n background: var(--cube-dark-surface-color, #141414);\n border-bottom-color: var(--cube-dark-border-color, #374151);\n}\n\n.cube-app-header-leading {\n display: flex;\n flex: 1 1 auto;\n align-items: center;\n min-width: 0;\n overflow: hidden;\n}\n\n.cube-app-header-toggle {\n display: inline-flex;\n flex: 0 0 auto;\n align-items: center;\n justify-content: center;\n padding: 0;\n margin: 0 1rem 0 0;\n font: inherit;\n font-size: 1.25rem;\n color: inherit;\n cursor: pointer;\n background: transparent;\n border: 0;\n}\n\n.cube-app-header-toggle:focus-visible {\n outline: 2px solid #1677ff;\n outline-offset: 3px;\n border-radius: 2px;\n}\n\n.cube-app-header-title {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.cube-app-header-actions {\n display: flex;\n flex: 0 0 auto;\n align-items: center;\n gap: 0.5rem;\n margin-left: 0.5rem;\n}\n",".cube-account-trigger {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n padding: 0.25rem;\n margin: 0;\n font: inherit;\n font-size: 1.25rem;\n line-height: 1;\n color: inherit;\n cursor: pointer;\n background: transparent;\n border: 0;\n}\n\n.cube-account-trigger:focus-visible {\n outline: 2px solid #1677ff;\n outline-offset: 3px;\n border-radius: 50%;\n}\n\n.cube-account-menu {\n width: 16rem;\n max-width: calc(100vw - 2rem);\n}\n\n.cube-account-menu-stats {\n display: flex;\n justify-content: space-around;\n gap: 1rem;\n margin-bottom: 1rem;\n}\n\n.cube-account-menu-items {\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n}\n\n.cube-account-menu-footer {\n margin-top: 0.5rem;\n}\n",".cube-about-body {\n margin-bottom: 1rem;\n}\n\n.cube-about-description {\n margin: 1rem 0 0.5rem;\n font-size: 1rem;\n line-height: 1.5;\n}\n\n.cube-about-item {\n padding: 0.5rem;\n color: #6b7280;\n background: #f3f4f6;\n border-radius: 0.375rem;\n}\n\n.dark .cube-about-item,\n[data-theme=\"dark\"] .cube-about-item {\n color: #e5e7eb;\n background: #262626;\n}\n\n.cube-about-item-label {\n color: inherit;\n white-space: nowrap;\n}\n\n.cube-about-item-value {\n min-width: 0;\n overflow: hidden;\n text-align: right;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.cube-about-link {\n color: inherit;\n text-decoration: none;\n}\n\n.cube-about-powered-by {\n color: #6b7280;\n}\n\n.dark .cube-about-powered-by,\n[data-theme=\"dark\"] .cube-about-powered-by {\n color: #e5e7eb;\n}\n",".cube-app-root {\n display: flex;\n width: 100%;\n height: 100%;\n overflow: hidden;\n}\n\n.cube-app-sidebar {\n display: flex;\n flex-direction: column;\n flex-shrink: 0;\n overflow: hidden;\n transition: width 200ms ease;\n}\n\n.cube-app-sidebar-top,\n.cube-app-sidebar-bottom {\n flex-shrink: 0;\n}\n\n.cube-app-sidebar-list {\n flex: 1 1 auto;\n min-height: 0;\n overflow-y: auto;\n}\n\n.cube-app-desktop-area {\n flex-grow: 1;\n min-width: 0;\n height: 100%;\n overflow: hidden;\n transition: width 200ms ease;\n}\n\n.cube-app-content {\n height: calc(100% - var(--cube-header-height, 3rem) - 1px);\n overflow-y: auto;\n}\n\n.cube-app-search-button {\n width: 15rem;\n}\n\n.cube-app-mobile-root {\n width: 100vw;\n height: 100%;\n overflow: hidden;\n}\n\n.cube-app-mobile-content {\n width: 100%;\n height: 100%;\n overflow-y: auto;\n}\n",".cube-sheet-card {\n padding: 0.5rem 0.75rem;\n background: var(--cube-surface-color, #fff);\n border: 1px solid var(--cube-border-color, #d1d5db);\n border-radius: 0.5rem;\n}\n\n.dark .cube-sheet-card,\n[data-theme=\"dark\"] .cube-sheet-card {\n background: var(--cube-dark-surface-color, #141414);\n border-color: var(--cube-dark-border-color, #374151);\n}\n\n.cube-sheet-cell {\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n padding: 0.375rem 0;\n font: inherit;\n color: inherit;\n text-align: left;\n cursor: pointer;\n background: transparent;\n border: 0;\n}\n\n.cube-sheet-split-line {\n height: 1px;\n margin: 0.25rem 0;\n background: var(--cube-border-color, #d1d5db);\n}\n\n.dark .cube-sheet-split-line,\n[data-theme=\"dark\"] .cube-sheet-split-line {\n background: var(--cube-dark-border-color, #374151);\n}\n",".cube-page-loading {\n width: 100%;\n height: 100%;\n}\n\n.cube-delayed-loading {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n margin: 1.5rem 0;\n}\n\n.dark .cube-delayed-loading,\n[data-theme=\"dark\"] .cube-delayed-loading {\n color: #9ca3af;\n}\n",".cube-page-container {\n width: 100%;\n height: 100%;\n overflow: hidden;\n}\n\n.cube-page-content {\n position: relative;\n height: 100%;\n overflow-y: auto;\n}\n\n@media (max-width: 767px) {\n .cube-page-content {\n height: calc(100% - var(--cube-mobile-action-height, 40px) - 1rem);\n }\n}\n\n.cube-page-action-bar {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 0.5rem;\n height: var(--cube-mobile-action-height, 40px);\n padding: 0.5rem;\n}\n\n.cube-page-action-icon {\n flex-shrink: 0;\n}\n\n.cube-page-action-search {\n flex: 1;\n min-width: 0;\n}\n",".cube-empty-tip-title {\n font-weight: 700;\n font-size: 1rem;\n}\n\n.cube-empty-tip-subtitle {\n color: #9ca3af;\n}\n",".cube-color-dot {\n width: 1.5rem;\n height: 1.5rem;\n padding: 0;\n border: none;\n border-radius: 9999px;\n cursor: pointer;\n transition: box-shadow 0.15s ease;\n}\n\n.cube-color-dot:hover {\n box-shadow: 0 0 0 4px #d1d5db;\n}\n\nhtml.dark .cube-color-dot:hover,\n[data-theme=\"dark\"] .cube-color-dot:hover {\n box-shadow: 0 0 0 4px #737373;\n}\n\n.cube-color-dot-selected {\n box-shadow: 0 0 0 4px #9ca3af;\n}\n\n.cube-color-dot-selected:hover {\n box-shadow: 0 0 0 4px #9ca3af;\n}\n\nhtml.dark .cube-color-dot-selected,\n[data-theme=\"dark\"] .cube-color-dot-selected,\nhtml.dark .cube-color-dot-selected:hover,\n[data-theme=\"dark\"] .cube-color-dot-selected:hover {\n box-shadow: 0 0 0 4px #4b5563;\n}\n\n.cube-color-dot-clear {\n border: 2px solid #ef4444;\n position: relative;\n overflow: hidden;\n background-color: transparent;\n}\n\n.cube-color-dot-clear::after {\n content: \"\";\n position: absolute;\n left: -1px;\n top: 10px;\n width: 25px;\n height: 2px;\n background: #ef4444;\n transform: rotate(45deg);\n}\n",".cube-search-page {\n width: 100%;\n box-sizing: border-box;\n padding: 1rem;\n}\n\n.cube-search-page-input,\n.cube-search-page-results {\n width: 100%;\n}\n"],"mappings":";AAAA;AACE,wBAAsB;AACtB,wBAAsB;AACtB,+BAA6B;AAC7B,uBAAqB;AACrB,4BAA0B;AAC1B,wBAAsB;AACtB,6BAA2B;AAC7B;;;ACRA,CAAC;AACC,WAAS;AACT,eAAa;AACb,mBAAiB;AACjB,SAAO;AACP,UAAQ,IAAI,oBAAoB,EAAE;AAClC,WAAS,OAAO;AAChB,YAAU;AACV,cAAY;AACZ,SAAO;AAC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AAI,CAAC,KAAK,CAdT,cAcwB;AACzB,CAAC,iBAAmB,CAfnB,cAekC;AACjC,cAAY,EAAE,EAAE,EAAE,IAAI;AACxB;AAEA,CAAC;AACC,cAAY,EAAE,EAAE,EAAE,IAAI;AACxB;AAEA,CAJC,uBAIuB;AACtB,cAAY,EAAE,EAAE,EAAE,IAAI;AACxB;AAEA,IAAI,CAbC,KAaK,CART;AASD,CAAC,iBAAmB,CATnB;AAUD,IAAI,CAfC,KAeK,CAVT,uBAUiC;AAClC,CAAC,iBAAmB,CAXnB,uBAW2C;AAC1C,cAAY,EAAE,EAAE,EAAE,IAAI;AACxB;AAEA,CAAC;AACC,UAAQ,IAAI,MAAM;AAClB,YAAU;AACV,YAAU;AACV,oBAAkB;AACpB;AAEA,CAPC,oBAOoB;AACnB,WAAS;AACT,YAAU;AACV,QAAM;AACN,OAAK;AACL,SAAO;AACP,UAAQ;AACR,cAAY;AACZ,aAAW,OAAO;AACpB;;;AClDA,CAAC;AACC,SAAO;AACP,cAAY;AACZ,WAAS;AACX;AAEA,CAAC;AACD,CAAC;AACC,SAAO;AACT;","names":[]}
package/dist/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import * as react from 'react';
2
2
  import { PropsWithChildren, ReactNode, Key, HTMLAttributes } from 'react';
3
- import { ButtonProps } from 'antd';
3
+ import { ButtonProps, FlexProps } from 'antd';
4
+ import { SearchProps } from 'antd/es/input';
4
5
 
5
6
  declare const DEFAULT_MOBILE_BREAKPOINT = 767;
6
7
  interface UseMediaQueryOptions {
@@ -119,10 +120,58 @@ declare const DelayedLoading: ({ tip, delay, className, ...props }: DelayedLoadi
119
120
 
120
121
  declare const ActionIcon: ({ className, size, ...props }: ButtonProps) => react.JSX.Element;
121
122
  declare const ActionButton: ({ children, type, block, size, ...props }: ButtonProps) => react.JSX.Element;
123
+ /** Mobile action-bar search field (fills remaining width). */
124
+ declare const ActionSearch: ({ className, ...props }: SearchProps) => react.JSX.Element;
122
125
  interface CubePageProps extends PropsWithChildren {
123
126
  desktopHeaderLeft?: ReactNode;
124
127
  mobileActionBar?: ReactNode;
125
128
  }
126
129
  declare const CubePage: ({ desktopHeaderLeft, mobileActionBar, children }: CubePageProps) => react.JSX.Element;
127
130
 
128
- export { type AboutAppInfo, type AboutAuthorInfo, type AboutItem, type AccountMenuItem, type AccountMenuStat, ActionButton, ActionIcon, CubeApp, type CubeAppAboutInfo, type CubeAppContextValue, type CubeAppProps, CubeConfigProvider, type CubeConfigProviderProps, CubePage, type CubePageProps, DEFAULT_MOBILE_BREAKPOINT, DelayedLoading, type DelayedLoadingProps, DesktopOnly, MobileAccountSheet, type MobileAccountSheetProps, MobileOnly, PageLoading, type PageLoadingProps, type ResponsiveProps, type UseMediaQueryOptions, useCubeAppContext, useCubeAppHeaderLeft, useIsMobile, useMediaQuery };
131
+ interface EmptyTipProps {
132
+ className?: string;
133
+ title?: ReactNode;
134
+ subTitle?: ReactNode;
135
+ extra?: ReactNode;
136
+ }
137
+ declare const EmptyTip: ({ title, subTitle, extra, className }: EmptyTipProps) => react.JSX.Element;
138
+
139
+ declare const MARK_COLORS_MAP: Record<string, string>;
140
+ declare const MARK_COLORS: readonly ["c1", "c2", "c3", "c4", "c5", "c6", "c7", "c8", "c9", "c10", "c11", "c12", "c13", "c14", "c15", "c16"];
141
+ declare const MARK_COLORS_WITH_EMPTY: readonly ["c1", "c2", "c3", "c4", "c5", "c6", "c7", "c8", "c9", "c10", "c11", "c12", "c13", "c14", "c15", "c16", ""];
142
+ declare const getColorValue: (colorCode: string) => string | undefined;
143
+ interface ColorListProps {
144
+ value?: string;
145
+ onChange?(value: string): void;
146
+ flexProps?: Omit<FlexProps, "children">;
147
+ }
148
+ /** Single-select color dots (includes a clear/empty option), matching Cube search filters. */
149
+ declare const ColorList: ({ value, onChange, flexProps }: ColorListProps) => react.JSX.Element;
150
+
151
+ interface CubeSearchPageProps {
152
+ /** Last committed keyword; used as the search inputs' default value. */
153
+ keyword?: string;
154
+ placeholder?: string;
155
+ searchButtonLabel?: string;
156
+ onSearch(value: string): void;
157
+ onBack(): void;
158
+ desktopHeaderLeft?: ReactNode;
159
+ /** Filter UI (colors, tags, …). Desktop: in the page body. Mobile: in a bottom drawer. */
160
+ filters?: ReactNode;
161
+ mobileFilterTitle?: string;
162
+ mobileFilterIcon?: ReactNode;
163
+ /** True before the first search (no keyword / filters committed). */
164
+ pending?: boolean;
165
+ loading?: boolean;
166
+ /** True after a search that returned no rows. Ignored while pending or loading. */
167
+ empty?: boolean;
168
+ pendingHint?: ReactNode;
169
+ loadingTitle?: ReactNode;
170
+ loadingHint?: ReactNode;
171
+ emptyTitle?: ReactNode;
172
+ emptyHint?: ReactNode;
173
+ children?: ReactNode;
174
+ }
175
+ declare const CubeSearchPage: ({ keyword, placeholder, searchButtonLabel, onSearch, onBack, desktopHeaderLeft, filters, mobileFilterTitle, mobileFilterIcon, pending, loading, empty, pendingHint, loadingTitle, loadingHint, emptyTitle, emptyHint, children, }: CubeSearchPageProps) => react.JSX.Element;
176
+
177
+ export { type AboutAppInfo, type AboutAuthorInfo, type AboutItem, type AccountMenuItem, type AccountMenuStat, ActionButton, ActionIcon, ActionSearch, ColorList, type ColorListProps, CubeApp, type CubeAppAboutInfo, type CubeAppContextValue, type CubeAppProps, CubeConfigProvider, type CubeConfigProviderProps, CubePage, type CubePageProps, CubeSearchPage, type CubeSearchPageProps, DEFAULT_MOBILE_BREAKPOINT, DelayedLoading, type DelayedLoadingProps, DesktopOnly, EmptyTip, type EmptyTipProps, MARK_COLORS, MARK_COLORS_MAP, MARK_COLORS_WITH_EMPTY, MobileAccountSheet, type MobileAccountSheetProps, MobileOnly, PageLoading, type PageLoadingProps, type ResponsiveProps, type UseMediaQueryOptions, getColorValue, useCubeAppContext, useCubeAppHeaderLeft, useIsMobile, useMediaQuery };
package/dist/index.js CHANGED
@@ -494,7 +494,8 @@ var DelayedLoading = ({
494
494
  };
495
495
 
496
496
  // src/page/page.tsx
497
- import { Button as Button4 } from "antd";
497
+ import { Button as Button4, Input } from "antd";
498
+ import { SearchOutlined as SearchOutlined2 } from "@ant-design/icons";
498
499
  import { jsx as jsx9, jsxs as jsxs6 } from "react/jsx-runtime";
499
500
  var PageContainer = ({ children }) => /* @__PURE__ */ jsx9("div", { className: "cube-page-container", children });
500
501
  var PageContent = ({ children }) => /* @__PURE__ */ jsx9("div", { className: "cube-page-content", children });
@@ -507,6 +508,17 @@ var ActionButton = ({
507
508
  size = "large",
508
509
  ...props
509
510
  }) => /* @__PURE__ */ jsx9(Button4, { block, size, type, ...props, children });
511
+ var ActionSearch = ({ className, ...props }) => /* @__PURE__ */ jsx9(
512
+ Input.Search,
513
+ {
514
+ placeholder: "\u8F93\u5165\u5173\u952E\u5B57\u641C\u7D22",
515
+ enterButton: /* @__PURE__ */ jsx9(SearchOutlined2, {}),
516
+ size: "large",
517
+ autoFocus: true,
518
+ ...props,
519
+ className: ["cube-page-action-search", className].filter(Boolean).join(" ")
520
+ }
521
+ );
510
522
  var CubePage = ({ desktopHeaderLeft, mobileActionBar, children }) => {
511
523
  useCubeAppHeaderLeft(desktopHeaderLeft);
512
524
  return /* @__PURE__ */ jsxs6(PageContainer, { children: [
@@ -514,18 +526,215 @@ var CubePage = ({ desktopHeaderLeft, mobileActionBar, children }) => {
514
526
  mobileActionBar ? /* @__PURE__ */ jsx9(PageActionBar, { children: mobileActionBar }) : null
515
527
  ] });
516
528
  };
529
+
530
+ // src/empty-tip/empty-tip.tsx
531
+ import { Flex as Flex4 } from "antd";
532
+ import { jsx as jsx10, jsxs as jsxs7 } from "react/jsx-runtime";
533
+ var EmptyTip = ({ title, subTitle, extra, className }) => /* @__PURE__ */ jsxs7(
534
+ Flex4,
535
+ {
536
+ vertical: true,
537
+ gap: 4,
538
+ align: "center",
539
+ justify: "center",
540
+ className: ["cube-empty-tip", className].filter(Boolean).join(" "),
541
+ children: [
542
+ title ? /* @__PURE__ */ jsx10("div", { className: "cube-empty-tip-title", children: title }) : null,
543
+ subTitle ? /* @__PURE__ */ jsx10("div", { className: "cube-empty-tip-subtitle", children: subTitle }) : null,
544
+ extra ? /* @__PURE__ */ jsx10("div", { children: extra }) : null
545
+ ]
546
+ }
547
+ );
548
+
549
+ // src/color-list/color-list.tsx
550
+ import { Flex as Flex5 } from "antd";
551
+ import { jsx as jsx11 } from "react/jsx-runtime";
552
+ var MARK_COLORS_MAP = {
553
+ c1: "#ef4444",
554
+ c2: "#f97316",
555
+ c3: "#f59e0b",
556
+ c4: "#eab308",
557
+ c5: "#84cc16",
558
+ c6: "#22c55e",
559
+ c7: "#10b981",
560
+ c8: "#14b8a6",
561
+ c9: "#06b6d4",
562
+ c10: "#0ea5e9",
563
+ c11: "#3b82f6",
564
+ c12: "#6366f1",
565
+ c13: "#8b5cf6",
566
+ c14: "#a855f7",
567
+ c15: "#d946ef",
568
+ c16: "#ec4899"
569
+ };
570
+ var MARK_COLORS = [
571
+ "c1",
572
+ "c2",
573
+ "c3",
574
+ "c4",
575
+ "c5",
576
+ "c6",
577
+ "c7",
578
+ "c8",
579
+ "c9",
580
+ "c10",
581
+ "c11",
582
+ "c12",
583
+ "c13",
584
+ "c14",
585
+ "c15",
586
+ "c16"
587
+ ];
588
+ var MARK_COLORS_WITH_EMPTY = [...MARK_COLORS, ""];
589
+ var getColorValue = (colorCode) => MARK_COLORS_MAP[colorCode];
590
+ var ColorItem = ({ colorCode, selected, onClick }) => {
591
+ const classes = ["cube-color-dot"];
592
+ if (selected) classes.push("cube-color-dot-selected");
593
+ if (colorCode === "") classes.push("cube-color-dot-clear");
594
+ return /* @__PURE__ */ jsx11(
595
+ "button",
596
+ {
597
+ type: "button",
598
+ "aria-label": colorCode === "" ? "\u6E05\u9664\u989C\u8272" : `\u989C\u8272 ${colorCode}`,
599
+ className: classes.join(" "),
600
+ style: { backgroundColor: MARK_COLORS_MAP[colorCode] },
601
+ onClick: () => onClick(colorCode)
602
+ }
603
+ );
604
+ };
605
+ var ColorList = ({ value, onChange, flexProps }) => /* @__PURE__ */ jsx11(Flex5, { wrap: true, gap: 8, ...flexProps, children: MARK_COLORS_WITH_EMPTY.map((colorCode) => /* @__PURE__ */ jsx11(
606
+ ColorItem,
607
+ {
608
+ colorCode,
609
+ selected: value === colorCode,
610
+ onClick: (next) => onChange?.(next)
611
+ },
612
+ colorCode || "clear"
613
+ )) });
614
+
615
+ // src/search-page/search-page.tsx
616
+ import { useState as useState4 } from "react";
617
+ import { Button as Button5, Col, Drawer as Drawer2, Flex as Flex6, Input as Input2, Row } from "antd";
618
+ import { FilterOutlined, LeftOutlined } from "@ant-design/icons";
619
+ import { Fragment as Fragment5, jsx as jsx12, jsxs as jsxs8 } from "react/jsx-runtime";
620
+ var CubeSearchPage = ({
621
+ keyword = "",
622
+ placeholder = "\u8BF7\u8F93\u5165\u5173\u952E\u5B57\uFF0C\u56DE\u8F66\u641C\u7D22",
623
+ searchButtonLabel = "\u641C\u7D22",
624
+ onSearch,
625
+ onBack,
626
+ desktopHeaderLeft,
627
+ filters,
628
+ mobileFilterTitle = "\u7B5B\u9009",
629
+ mobileFilterIcon,
630
+ pending = false,
631
+ loading = false,
632
+ empty = false,
633
+ pendingHint = "\u53EF\u4F7F\u7528\u5173\u952E\u8BCD\u548C\u989C\u8272\u8FDB\u884C\u641C\u7D22",
634
+ loadingTitle = "\u6B63\u5728\u641C\u7D22\u4E2D...",
635
+ loadingHint = "\u8BF7\u7A0D\u5019",
636
+ emptyTitle = "\u6CA1\u6709\u627E\u5230\u76F8\u5173\u7ED3\u679C",
637
+ emptyHint = "\u8BF7\u5C1D\u8BD5\u5176\u4ED6\u5173\u952E\u5B57",
638
+ children
639
+ }) => {
640
+ const [filterOpen, setFilterOpen] = useState4(false);
641
+ const hasFilters = filters != null;
642
+ const renderBody = () => {
643
+ if (loading) {
644
+ return /* @__PURE__ */ jsx12(EmptyTip, { title: loadingTitle, subTitle: loadingHint });
645
+ }
646
+ if (pending) {
647
+ return /* @__PURE__ */ jsx12(EmptyTip, { subTitle: pendingHint });
648
+ }
649
+ if (empty) {
650
+ return /* @__PURE__ */ jsx12("div", { "data-testid": "search-empty-tip", children: /* @__PURE__ */ jsx12(EmptyTip, { title: emptyTitle, subTitle: emptyHint }) });
651
+ }
652
+ return /* @__PURE__ */ jsx12(
653
+ Flex6,
654
+ {
655
+ vertical: true,
656
+ align: "center",
657
+ gap: 8,
658
+ className: "cube-search-page-results",
659
+ "data-testid": "search-result-list",
660
+ children
661
+ }
662
+ );
663
+ };
664
+ return /* @__PURE__ */ jsxs8(Fragment5, { children: [
665
+ /* @__PURE__ */ jsx12(
666
+ CubePage,
667
+ {
668
+ desktopHeaderLeft,
669
+ mobileActionBar: /* @__PURE__ */ jsxs8(Fragment5, { children: [
670
+ /* @__PURE__ */ jsx12(ActionIcon, { icon: /* @__PURE__ */ jsx12(LeftOutlined, {}), "aria-label": "\u8FD4\u56DE", onClick: onBack }),
671
+ hasFilters ? /* @__PURE__ */ jsx12(
672
+ ActionIcon,
673
+ {
674
+ icon: mobileFilterIcon ?? /* @__PURE__ */ jsx12(FilterOutlined, {}),
675
+ "aria-label": "\u6253\u5F00\u7B5B\u9009",
676
+ onClick: () => setFilterOpen(true)
677
+ }
678
+ ) : null,
679
+ /* @__PURE__ */ jsx12(ActionSearch, { defaultValue: keyword, onSearch })
680
+ ] }),
681
+ children: /* @__PURE__ */ jsxs8(Flex6, { vertical: true, gap: 16, align: "center", className: "cube-search-page", children: [
682
+ /* @__PURE__ */ jsx12(DesktopOnly, { children: /* @__PURE__ */ jsx12(
683
+ Input2.Search,
684
+ {
685
+ placeholder,
686
+ enterButton: searchButtonLabel,
687
+ autoFocus: true,
688
+ size: "large",
689
+ defaultValue: keyword,
690
+ onSearch,
691
+ className: "cube-search-page-input",
692
+ "data-testid": "search-keyword-input"
693
+ }
694
+ ) }),
695
+ hasFilters ? /* @__PURE__ */ jsx12(DesktopOnly, { children: filters }) : null,
696
+ renderBody()
697
+ ] })
698
+ }
699
+ ),
700
+ hasFilters ? /* @__PURE__ */ jsx12(MobileOnly, { children: /* @__PURE__ */ jsx12(
701
+ Drawer2,
702
+ {
703
+ title: mobileFilterTitle,
704
+ open: filterOpen,
705
+ onClose: () => setFilterOpen(false),
706
+ placement: "bottom",
707
+ closable: false,
708
+ styles: {
709
+ footer: { padding: 8, border: "none" },
710
+ header: { textAlign: "center", padding: 8 }
711
+ },
712
+ footer: /* @__PURE__ */ jsx12(Row, { gutter: 8, children: /* @__PURE__ */ jsx12(Col, { flex: "1", children: /* @__PURE__ */ jsx12(Button5, { block: true, size: "large", onClick: () => setFilterOpen(false), children: "\u786E\u5B9A" }) }) }),
713
+ children: /* @__PURE__ */ jsx12(Flex6, { vertical: true, gap: 16, className: "cube-search-page-drawer", align: "center", children: filters })
714
+ }
715
+ ) }) : null
716
+ ] });
717
+ };
517
718
  export {
518
719
  ActionButton,
519
720
  ActionIcon,
721
+ ActionSearch,
722
+ ColorList,
520
723
  CubeApp,
521
724
  CubeConfigProvider,
522
725
  CubePage,
726
+ CubeSearchPage,
523
727
  DEFAULT_MOBILE_BREAKPOINT,
524
728
  DelayedLoading,
525
729
  DesktopOnly,
730
+ EmptyTip,
731
+ MARK_COLORS,
732
+ MARK_COLORS_MAP,
733
+ MARK_COLORS_WITH_EMPTY,
526
734
  MobileAccountSheet,
527
735
  MobileOnly,
528
736
  PageLoading,
737
+ getColorValue,
529
738
  useCubeAppContext,
530
739
  useCubeAppHeaderLeft,
531
740
  useIsMobile,
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/responsive/responsive.tsx","../src/cube-config-provider/cube-config-provider.tsx","../src/cube-app/cube-app.tsx","../src/app-header/app-header.tsx","../src/account-menu/account-menu-button.tsx","../src/account-menu/account-menu.tsx","../src/about-dialog/about-dialog.tsx","../src/mobile-account-sheet/mobile-account-sheet.tsx","../src/loading/loading.tsx","../src/page/page.tsx"],"sourcesContent":["import { type PropsWithChildren, type ReactNode, useCallback, useMemo, useSyncExternalStore } from \"react\";\n\nexport const DEFAULT_MOBILE_BREAKPOINT = 767;\n\nexport interface UseMediaQueryOptions {\n defaultMatches?: boolean;\n}\n\nexport interface ResponsiveProps extends PropsWithChildren {\n defaultMatches?: boolean;\n}\n\nexport const useMediaQuery = (query: string, options: UseMediaQueryOptions = {}): boolean => {\n const { defaultMatches = false } = options;\n const mediaQueryList = useMemo(\n () =>\n typeof window !== \"undefined\" && typeof window.matchMedia === \"function\"\n ? window.matchMedia(query)\n : null,\n [query],\n );\n\n const subscribe = useCallback(\n (notify: () => void) => {\n if (!mediaQueryList) return () => undefined;\n mediaQueryList.addEventListener(\"change\", notify);\n return () => mediaQueryList.removeEventListener(\"change\", notify);\n },\n [mediaQueryList],\n );\n\n const getSnapshot = useCallback(\n () => mediaQueryList?.matches ?? defaultMatches,\n [defaultMatches, mediaQueryList],\n );\n const getServerSnapshot = useCallback(() => defaultMatches, [defaultMatches]);\n\n return useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);\n};\n\nexport const useIsMobile = ({ defaultMatches }: UseMediaQueryOptions = {}): boolean =>\n useMediaQuery(`(max-width: ${DEFAULT_MOBILE_BREAKPOINT}px)`, { defaultMatches });\n\nexport const MobileOnly = ({ children, defaultMatches }: ResponsiveProps): ReactNode => {\n const isMobile = useIsMobile({ defaultMatches });\n return isMobile ? children : null;\n};\n\nexport const DesktopOnly = ({ children, defaultMatches }: ResponsiveProps): ReactNode => {\n const isMobile = useIsMobile({ defaultMatches });\n return isMobile ? null : children;\n};\n","import { useMemo, type ReactNode } from \"react\";\nimport { ConfigProvider } from \"antd\";\nimport zhCN from \"antd/locale/zh_CN\";\nimport { useIsMobile } from \"../responsive/responsive\";\n\nexport interface CubeConfigProviderProps {\n children: ReactNode;\n\n primaryColor?: string;\n}\n\nconst DEFAULT_PRIMARY_COLOR = \"#ec008c\";\n\n/**\n * Applies the fixed Cube antd configuration (`zh_CN` locale, `primaryColor` token, a larger\n * base font size on mobile) without rendering any application shell. Mount it on its own for\n * pages that should share the Cube theme but live outside `CubeApp` — `CubeApp` itself wraps\n * this component internally.\n */\nexport const CubeConfigProvider = ({ children, primaryColor }: CubeConfigProviderProps) => {\n const isMobile = useIsMobile();\n\n const theme = useMemo(\n () => ({\n token: {\n colorPrimary: primaryColor ?? DEFAULT_PRIMARY_COLOR,\n lineWidth: 2,\n controlOutlineWidth: 1,\n ...(isMobile ? { fontSize: 16 } : {}),\n },\n components: {\n Card: {\n colorBorderSecondary: \"var(--cube-border-color, #d1d5db)\",\n lineHeight: 1.6,\n },\n },\n }),\n [primaryColor, isMobile],\n );\n\n return (\n <ConfigProvider locale={zhCN} theme={theme}>\n {children}\n </ConfigProvider>\n );\n};\n","import {\n createContext,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useState,\n type CSSProperties,\n type ReactNode,\n} from \"react\";\nimport { Button } from \"antd\";\nimport { SearchOutlined, SmileOutlined } from \"@ant-design/icons\";\nimport { useIsMobile } from \"../responsive/responsive\";\nimport { CubeConfigProvider } from \"../cube-config-provider/cube-config-provider\";\nimport { AppHeader } from \"../app-header/app-header\";\nimport { AccountMenuButton } from \"../account-menu/account-menu-button\";\nimport { AccountMenu, type AccountMenuItem, type AccountMenuStat } from \"../account-menu/account-menu\";\nimport {\n AboutDialog,\n type AboutAppInfo,\n type AboutAuthorInfo,\n type AboutItem,\n} from \"../about-dialog/about-dialog\";\nimport \"./cube-app.css\";\n\nexport interface CubeAppAboutInfo extends AboutAppInfo {\n contactEmail?: string;\n author?: AboutAuthorInfo;\n items?: AboutItem[];\n}\n\nexport interface CubeAppContextValue {\n accountMenuStats?: AccountMenuStat[];\n accountMenuItems?: AccountMenuItem[];\n onLogoutBtnClick?(): void;\n userName?: ReactNode;\n openAbout(): void;\n setHeaderLeft(node: ReactNode): void;\n}\n\nconst CubeAppContext = createContext<CubeAppContextValue>({\n openAbout: () => undefined,\n setHeaderLeft: () => undefined,\n});\n\n/**\n * Reads the account/about configuration passed to `CubeApp`. Only needed by components\n * mounted elsewhere in the route tree (e.g. `MobileAccountSheet`) — `CubeApp` itself\n * already has this data as props.\n */\nexport const useCubeAppContext = (): CubeAppContextValue => useContext(CubeAppContext);\n\n/**\n * Lets the currently mounted page override `CubeApp`'s `headerLeft` slot. Resets to the\n * default `headerLeft` prop when the calling component unmounts.\n */\nexport const useCubeAppHeaderLeft = (node: ReactNode): void => {\n const { setHeaderLeft } = useCubeAppContext();\n\n useEffect(() => {\n setHeaderLeft(node);\n return () => setHeaderLeft(undefined);\n }, [node, setHeaderLeft]);\n};\n\nexport interface CubeAppProps {\n children: ReactNode;\n\n primaryColor?: string;\n\n accountMenuStats?: AccountMenuStat[];\n accountMenuItems?: AccountMenuItem[];\n onLogoutBtnClick?(): void;\n userName?: ReactNode;\n about: CubeAppAboutInfo;\n\n sidebarTop?: ReactNode;\n sidebarList?: ReactNode;\n sidebarBottom?: ReactNode;\n\n headerLeft?: ReactNode;\n headerRight?: ReactNode;\n headerSearchBtnLabel?: string;\n onHeaderSearchBtnClick?(): void;\n}\n\nconst SIDEBAR_WIDTH = \"var(--cube-sidebar-width, 15rem)\";\n\nexport const CubeApp = ({\n children,\n primaryColor,\n accountMenuStats,\n accountMenuItems,\n onLogoutBtnClick,\n userName,\n about,\n sidebarTop,\n sidebarList,\n sidebarBottom,\n headerLeft,\n headerRight,\n headerSearchBtnLabel,\n onHeaderSearchBtnClick,\n}: CubeAppProps) => {\n const isMobile = useIsMobile();\n const [collapsed, setCollapsed] = useState(false);\n const toggleSidebar = useCallback(() => setCollapsed((value) => !value), []);\n const [aboutOpen, setAboutOpen] = useState(false);\n const [headerLeftOverride, setHeaderLeftOverride] = useState<ReactNode>(undefined);\n\n const itemsWithAbout = useMemo<AccountMenuItem[]>(\n () => [\n ...(accountMenuItems ?? []),\n {\n key: \"cube-app-about\",\n label: \"关于\",\n icon: <SmileOutlined />,\n onClick: () => setAboutOpen(true),\n },\n ],\n [accountMenuItems],\n );\n\n const contextValue = useMemo<CubeAppContextValue>(\n () => ({\n accountMenuStats,\n accountMenuItems: itemsWithAbout,\n onLogoutBtnClick,\n userName,\n openAbout: () => setAboutOpen(true),\n setHeaderLeft: setHeaderLeftOverride,\n }),\n [accountMenuStats, itemsWithAbout, onLogoutBtnClick, userName],\n );\n\n const renderAccountMenuButton = () => (\n <AccountMenuButton\n content={({ close }) => (\n <AccountMenu\n stats={accountMenuStats}\n items={itemsWithAbout.map((item) => ({\n ...item,\n onClick: () => {\n item.onClick?.();\n close();\n },\n }))}\n footer={\n onLogoutBtnClick ? (\n <Button\n block\n danger\n aria-label=\"登出\"\n onClick={() => {\n onLogoutBtnClick();\n close();\n }}\n >\n 登出\n </Button>\n ) : undefined\n }\n />\n )}\n />\n );\n\n const renderShell = () => {\n if (isMobile) {\n return (\n <div className={\"cube-app-mobile-root\"} data-testid=\"cube-app-shell-mobile\">\n <main className={\"cube-app-mobile-content\"}>{children}</main>\n </div>\n );\n }\n\n const sidebarStyle: CSSProperties = {\n width: collapsed ? \"0px\" : SIDEBAR_WIDTH,\n };\n const contentStyle: CSSProperties = {\n width: collapsed ? \"100vw\" : `calc(100vw - ${SIDEBAR_WIDTH})`,\n };\n\n return (\n <div className={\"cube-app-root\"} data-testid=\"cube-app-shell\">\n <aside\n className={\"cube-app-sidebar\"}\n style={sidebarStyle}\n data-testid=\"cube-app-shell-sidebar\"\n aria-hidden={collapsed}\n >\n {sidebarTop ? <div className={\"cube-app-sidebar-top\"}>{sidebarTop}</div> : null}\n <div className={\"cube-app-sidebar-list\"}>{sidebarList}</div>\n {sidebarBottom ? <div className={\"cube-app-sidebar-bottom\"}>{sidebarBottom}</div> : null}\n </aside>\n <div className={\"cube-app-desktop-area\"} style={contentStyle}>\n <AppHeader\n title={headerLeftOverride ?? headerLeft}\n collapsed={collapsed}\n onToggleSidebar={toggleSidebar}\n actions={\n <>\n {headerRight}\n {onHeaderSearchBtnClick ? (\n <Button\n className={\"cube-app-search-button\"}\n icon={<SearchOutlined aria-hidden />}\n aria-label={headerSearchBtnLabel ?? \"\\u641c\\u7d22\"}\n onClick={onHeaderSearchBtnClick}\n >\n {headerSearchBtnLabel ?? \"\\u641c\\u7d22\"}\n </Button>\n ) : null}\n {renderAccountMenuButton()}\n </>\n }\n />\n <main className={\"cube-app-content\"}>{children}</main>\n </div>\n </div>\n );\n };\n\n return (\n <CubeConfigProvider primaryColor={primaryColor}>\n <CubeAppContext.Provider value={contextValue}>\n {renderShell()}\n <AboutDialog\n open={aboutOpen}\n onClose={() => setAboutOpen(false)}\n app={about}\n contactEmail={about.contactEmail}\n author={about.author}\n items={about.items}\n />\n </CubeAppContext.Provider>\n </CubeConfigProvider>\n );\n};\n","import type { HTMLAttributes, ReactNode } from \"react\";\nimport { MenuFoldOutlined, MenuUnfoldOutlined } from \"@ant-design/icons\";\nimport \"./app-header.css\";\n\nexport interface AppHeaderProps extends Omit<HTMLAttributes<HTMLElement>, \"title\"> {\n title?: ReactNode;\n actions?: ReactNode;\n collapsed?: boolean;\n showSidebarToggle?: boolean;\n onToggleSidebar?(): void;\n}\n\nexport const AppHeader = ({\n title,\n actions,\n collapsed = false,\n onToggleSidebar,\n showSidebarToggle = onToggleSidebar !== undefined,\n className,\n ...headerProps\n}: AppHeaderProps) => {\n const label = collapsed ? \"展开侧边栏\" : \"收起侧边栏\";\n const ToggleIcon = collapsed ? MenuUnfoldOutlined : MenuFoldOutlined;\n\n return (\n <header className={[\"cube-app-header\", className].filter(Boolean).join(\" \")} {...headerProps}>\n <div className={\"cube-app-header-leading\"}>\n {showSidebarToggle ? (\n <button\n type=\"button\"\n className={\"cube-app-header-toggle\"}\n aria-label={label}\n aria-expanded={!collapsed}\n onClick={onToggleSidebar}\n >\n <ToggleIcon aria-hidden />\n </button>\n ) : null}\n <div className={\"cube-app-header-title\"}>{title}</div>\n </div>\n {actions ? <div className={\"cube-app-header-actions\"}>{actions}</div> : null}\n </header>\n );\n};\n","import { type ReactNode, useState } from \"react\";\nimport { UserOutlined } from \"@ant-design/icons\";\nimport { Popover } from \"antd\";\nimport \"./account-menu.css\";\n\nexport interface AccountMenuRenderContext {\n close(): void;\n}\n\nexport interface AccountMenuButtonProps {\n content: ReactNode | ((context: AccountMenuRenderContext) => ReactNode);\n}\n\nexport const AccountMenuButton = ({ content }: AccountMenuButtonProps) => {\n const [open, setOpen] = useState(false);\n const close = () => setOpen(false);\n const renderedContent = typeof content === \"function\" ? content({ close }) : content;\n\n return (\n <Popover\n placement=\"bottomRight\"\n trigger=\"click\"\n content={renderedContent}\n open={open}\n onOpenChange={setOpen}\n arrow\n >\n <button\n type=\"button\"\n className={\"cube-account-trigger\"}\n aria-label=\"打开用户菜单\"\n aria-expanded={open}\n aria-haspopup=\"dialog\"\n >\n <UserOutlined aria-hidden />\n </button>\n </Popover>\n );\n};\n","import type { Key, ReactNode } from \"react\";\nimport { Button, Statistic } from \"antd\";\nimport \"./account-menu.css\";\n\nexport interface AccountMenuStat {\n key: Key;\n title: ReactNode;\n value: string | number;\n icon?: ReactNode;\n}\n\nexport interface AccountMenuItem {\n key: Key;\n label: ReactNode;\n icon?: ReactNode;\n danger?: boolean;\n disabled?: boolean;\n onClick?(): void;\n}\n\nexport interface AccountMenuProps {\n stats?: AccountMenuStat[];\n items?: AccountMenuItem[];\n footer?: ReactNode;\n}\n\nexport const AccountMenu = ({ stats = [], items = [], footer }: AccountMenuProps) => (\n <div className={\"cube-account-menu\"}>\n {stats.length > 0 ? (\n <div className={\"cube-account-menu-stats\"}>\n {stats.map((stat) => (\n <Statistic key={stat.key} title={stat.title} value={stat.value} prefix={stat.icon} />\n ))}\n </div>\n ) : null}\n {items.length > 0 ? (\n <div className={\"cube-account-menu-items\"}>\n {items.map((item) => (\n <Button\n key={item.key}\n block\n icon={item.icon}\n danger={item.danger}\n disabled={item.disabled}\n aria-label={typeof item.label === \"string\" ? item.label : undefined}\n onClick={item.onClick}\n >\n {item.label}\n </Button>\n ))}\n </div>\n ) : null}\n {footer ? <div className={\"cube-account-menu-footer\"}>{footer}</div> : null}\n </div>\n);\n","import type { Key, ReactNode } from \"react\";\nimport { BarcodeOutlined, GithubOutlined, SendOutlined } from \"@ant-design/icons\";\nimport { Flex, Modal } from \"antd\";\nimport \"./about-dialog.css\";\n\nexport interface AboutAppInfo {\n name: string;\n version?: string;\n repository?: string;\n description?: ReactNode;\n}\n\nexport interface AboutAuthorInfo {\n name: string;\n url?: string;\n}\n\nexport interface AboutItem {\n key: Key;\n icon?: ReactNode;\n label: ReactNode;\n value: ReactNode;\n href?: string;\n}\n\nexport interface AboutDialogProps {\n open: boolean;\n onClose(): void;\n app: AboutAppInfo;\n contactEmail?: string;\n author?: AboutAuthorInfo;\n items?: AboutItem[];\n}\n\nconst renderItem = (item: AboutItem) => {\n const content = (\n <div className={\"cube-about-item\"}>\n <Flex justify=\"space-between\" gap={16}>\n <div className={\"cube-about-item-label\"}>\n {item.icon ? <>{item.icon} &nbsp;</> : null}\n {item.label}\n </div>\n <div className={\"cube-about-item-value\"}>{item.value}</div>\n </Flex>\n </div>\n );\n\n return item.href ? (\n <a key={item.key} href={item.href} className={\"cube-about-link\"}>\n {content}\n </a>\n ) : (\n <div key={item.key}>{content}</div>\n );\n};\n\nexport const AboutDialog = ({\n open,\n onClose,\n app,\n contactEmail,\n author,\n items = [],\n}: AboutDialogProps) => {\n const defaultItems: AboutItem[] = [];\n\n if (contactEmail) {\n defaultItems.push({\n key: \"contact\",\n icon: <SendOutlined />,\n label: \"联系我\",\n value: contactEmail,\n href: `mailto:${contactEmail}?&subject=${encodeURIComponent(\n `${app.name} 相关`,\n )}`,\n });\n }\n\n if (app.version) {\n defaultItems.push({\n key: \"version\",\n icon: <BarcodeOutlined />,\n label: \"当前版本\",\n value: app.version,\n });\n }\n\n if (app.repository) {\n defaultItems.push({\n key: \"repository\",\n icon: <GithubOutlined />,\n label: \"开源地址\",\n value: \"github\",\n href: app.repository,\n });\n }\n\n const renderedItems = [...defaultItems, ...items];\n\n return (\n <Modal\n open={open}\n onCancel={onClose}\n onOk={onClose}\n title={`关于应用 ${app.name}`}\n footer={(_, { OkBtn }) => (\n <Flex\n align=\"center\"\n justify={author ? \"space-between\" : \"flex-end\"}\n gap={16}\n >\n {author ? (\n <div className={\"cube-about-powered-by\"}>\n Powered by 💗{\" \"}\n {author.url ? (\n <a href={author.url}>{author.name}</a>\n ) : (\n author.name\n )}\n </div>\n ) : null}\n <OkBtn />\n </Flex>\n )}\n >\n <Flex gap={16} vertical className={\"cube-about-body\"}>\n {app.description ? (\n <div className={\"cube-about-description\"}>{app.description}</div>\n ) : null}\n {renderedItems.map(renderItem)}\n </Flex>\n </Modal>\n );\n};\n","import { Fragment, type ReactNode } from \"react\";\nimport { Button, Drawer, Flex, Statistic } from \"antd\";\nimport { useCubeAppContext } from \"../cube-app/cube-app\";\nimport \"./mobile-account-sheet.css\";\n\nexport interface MobileAccountSheetProps {\n visible: boolean;\n onVisibleChange(visible: boolean): void;\n}\n\ninterface CellProps {\n title: ReactNode;\n extra?: ReactNode;\n onClick?(): void;\n}\n\nconst Cell = ({ title, extra, onClick }: CellProps) =>\n onClick ? (\n <button type=\"button\" className={\"cube-sheet-cell\"} onClick={onClick}>\n <span>{title}</span>\n {extra ? <span>{extra}</span> : null}\n </button>\n ) : (\n <div className={\"cube-sheet-cell\"}>\n <span>{title}</span>\n {extra ? <span>{extra}</span> : null}\n </div>\n );\n\nexport const MobileAccountSheet = ({ visible, onVisibleChange }: MobileAccountSheetProps) => {\n const { accountMenuStats, accountMenuItems, onLogoutBtnClick, userName } = useCubeAppContext();\n const close = () => onVisibleChange(false);\n\n return (\n <Drawer\n open={visible}\n onClose={close}\n placement=\"left\"\n width=\"100%\"\n closable={false}\n styles={{\n header: { display: \"none\" },\n body: { padding: 12 },\n footer: { padding: 8, borderTop: \"none\" },\n }}\n footer={\n <Button block size=\"large\" type=\"primary\" aria-label=\"返回\" onClick={close}>\n 返回\n </Button>\n }\n >\n <Flex vertical gap={12}>\n {accountMenuStats && accountMenuStats.length > 0 ? (\n <div className={\"cube-sheet-card\"}>\n <Flex justify=\"space-around\">\n {accountMenuStats.map((stat) => (\n <Statistic key={stat.key} title={stat.title} value={stat.value} prefix={stat.icon} />\n ))}\n </Flex>\n </div>\n ) : null}\n\n {userName ? (\n <div className={\"cube-sheet-card\"}>\n <Cell title=\"登录用户\" extra={userName} />\n </div>\n ) : null}\n\n {accountMenuItems && accountMenuItems.length > 0 ? (\n <div className={\"cube-sheet-card\"}>\n {accountMenuItems.map((item, index) => (\n <Fragment key={item.key}>\n <Cell\n title={\n <>\n {item.icon} &nbsp;{item.label}\n </>\n }\n onClick={() => {\n item.onClick?.();\n close();\n }}\n />\n {index !== accountMenuItems.length - 1 ? <div className={\"cube-sheet-split-line\"} /> : null}\n </Fragment>\n ))}\n </div>\n ) : null}\n\n {onLogoutBtnClick ? (\n <div className={\"cube-sheet-card\"}>\n <Cell\n title=\"登出\"\n onClick={() => {\n onLogoutBtnClick();\n close();\n }}\n />\n </div>\n ) : null}\n </Flex>\n </Drawer>\n );\n};\n","import { type HTMLAttributes, useEffect, useState } from \"react\";\nimport { Flex } from \"antd\";\nimport \"./loading.css\";\n\nexport interface PageLoadingProps {\n tip?: string;\n}\n\nexport const PageLoading = ({ tip = \"加载中...\" }: PageLoadingProps) => (\n <Flex justify=\"center\" align=\"center\" className={\"cube-page-loading\"}>\n {tip}\n </Flex>\n);\n\nexport interface DelayedLoadingProps extends HTMLAttributes<HTMLDivElement> {\n tip?: string;\n delay?: number;\n}\n\nexport const DelayedLoading = ({\n tip = \"页面加载中...\",\n delay = 500,\n className,\n ...props\n}: DelayedLoadingProps) => {\n const [visible, setVisible] = useState(false);\n\n useEffect(() => {\n const timer = window.setTimeout(() => setVisible(true), delay);\n return () => window.clearTimeout(timer);\n }, [delay]);\n\n if (!visible) return null;\n\n return (\n <div\n className={[\"cube-delayed-loading\", className].filter(Boolean).join(\" \")}\n {...props}\n >\n {tip}\n </div>\n );\n};\n","import type { PropsWithChildren, ReactNode } from \"react\";\nimport { Button, type ButtonProps } from \"antd\";\nimport { useCubeAppHeaderLeft } from \"../cube-app/cube-app\";\nimport { MobileOnly } from \"../responsive/responsive\";\nimport \"./page.css\";\n\nconst PageContainer = ({ children }: PropsWithChildren) => <div className={\"cube-page-container\"}>{children}</div>;\n\nconst PageContent = ({ children }: PropsWithChildren) => <div className={\"cube-page-content\"}>{children}</div>;\n\nconst PageActionBar = ({ children }: PropsWithChildren) => (\n <MobileOnly>\n <div className={\"cube-page-action-bar\"}>{children}</div>\n </MobileOnly>\n);\n\nexport const ActionIcon = ({ className, size = \"large\", ...props }: ButtonProps) => (\n <Button className={[\"cube-page-action-icon\", className].filter(Boolean).join(\" \")} size={size} {...props} />\n);\n\nexport const ActionButton = ({\n children,\n type = \"primary\",\n block = true,\n size = \"large\",\n ...props\n}: ButtonProps) => (\n <Button block={block} size={size} type={type} {...props}>\n {children}\n </Button>\n);\n\nexport interface CubePageProps extends PropsWithChildren {\n desktopHeaderLeft?: ReactNode;\n mobileActionBar?: ReactNode;\n}\n\nexport const CubePage = ({ desktopHeaderLeft, mobileActionBar, children }: CubePageProps) => {\n useCubeAppHeaderLeft(desktopHeaderLeft);\n\n return (\n <PageContainer>\n <PageContent>{children}</PageContent>\n {mobileActionBar ? <PageActionBar>{mobileActionBar}</PageActionBar> : null}\n </PageContainer>\n );\n};\n"],"mappings":";AAAA,SAAiD,aAAa,SAAS,4BAA4B;AAE5F,IAAM,4BAA4B;AAUlC,IAAM,gBAAgB,CAAC,OAAe,UAAgC,CAAC,MAAe;AAC3F,QAAM,EAAE,iBAAiB,MAAM,IAAI;AACnC,QAAM,iBAAiB;AAAA,IACrB,MACE,OAAO,WAAW,eAAe,OAAO,OAAO,eAAe,aAC1D,OAAO,WAAW,KAAK,IACvB;AAAA,IACN,CAAC,KAAK;AAAA,EACR;AAEA,QAAM,YAAY;AAAA,IAChB,CAAC,WAAuB;AACtB,UAAI,CAAC,eAAgB,QAAO,MAAM;AAClC,qBAAe,iBAAiB,UAAU,MAAM;AAChD,aAAO,MAAM,eAAe,oBAAoB,UAAU,MAAM;AAAA,IAClE;AAAA,IACA,CAAC,c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AAyB,SAAS,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG,GAAG,MAAa,GAAG,OAAO;AAGrG,IAAM,eAAe,CAAC;AAAA,EAC3B;AAAA,EACA,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,GAAG;AACL,MACE,gBAAAF,KAACE,SAAA,EAAO,OAAc,MAAY,MAAa,GAAG,OAC/C,UACH;AAQK,IAAM,WAAW,CAAC,EAAE,mBAAmB,iBAAiB,SAAS,MAAqB;AAC3F,uBAAqB,iBAAiB;AAEtC,SACE,gBAAAD,MAAC,iBACC;AAAA,oBAAAD,KAAC,eAAa,UAAS;AAAA,IACtB,kBAAkB,gBAAAA,KAAC,iBAAe,2BAAgB,IAAmB;AAAA,KACxE;AAEJ;","names":["useMemo","useMemo","useCallback","useMemo","useState","Button","jsx","jsx","jsx","jsxs","jsx","jsxs","Fragment","jsx","jsxs","useState","useCallback","useMemo","Button","Fragment","Button","Flex","Statistic","Fragment","jsx","jsxs","Button","Flex","Statistic","useEffect","useState","Flex","jsx","Flex","useState","useEffect","Button","jsx","jsxs","Button"]}
1
+ {"version":3,"sources":["../src/responsive/responsive.tsx","../src/cube-config-provider/cube-config-provider.tsx","../src/cube-app/cube-app.tsx","../src/app-header/app-header.tsx","../src/account-menu/account-menu-button.tsx","../src/account-menu/account-menu.tsx","../src/about-dialog/about-dialog.tsx","../src/mobile-account-sheet/mobile-account-sheet.tsx","../src/loading/loading.tsx","../src/page/page.tsx","../src/empty-tip/empty-tip.tsx","../src/color-list/color-list.tsx","../src/search-page/search-page.tsx"],"sourcesContent":["import { type PropsWithChildren, type ReactNode, useCallback, useMemo, useSyncExternalStore } from \"react\";\n\nexport const DEFAULT_MOBILE_BREAKPOINT = 767;\n\nexport interface UseMediaQueryOptions {\n defaultMatches?: boolean;\n}\n\nexport interface ResponsiveProps extends PropsWithChildren {\n defaultMatches?: boolean;\n}\n\nexport const useMediaQuery = (query: string, options: UseMediaQueryOptions = {}): boolean => {\n const { defaultMatches = false } = options;\n const mediaQueryList = useMemo(\n () =>\n typeof window !== \"undefined\" && typeof window.matchMedia === \"function\"\n ? window.matchMedia(query)\n : null,\n [query],\n );\n\n const subscribe = useCallback(\n (notify: () => void) => {\n if (!mediaQueryList) return () => undefined;\n mediaQueryList.addEventListener(\"change\", notify);\n return () => mediaQueryList.removeEventListener(\"change\", notify);\n },\n [mediaQueryList],\n );\n\n const getSnapshot = useCallback(\n () => mediaQueryList?.matches ?? defaultMatches,\n [defaultMatches, mediaQueryList],\n );\n const getServerSnapshot = useCallback(() => defaultMatches, [defaultMatches]);\n\n return useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);\n};\n\nexport const useIsMobile = ({ defaultMatches }: UseMediaQueryOptions = {}): boolean =>\n useMediaQuery(`(max-width: ${DEFAULT_MOBILE_BREAKPOINT}px)`, { defaultMatches });\n\nexport const MobileOnly = ({ children, defaultMatches }: ResponsiveProps): ReactNode => {\n const isMobile = useIsMobile({ defaultMatches });\n return isMobile ? children : null;\n};\n\nexport const DesktopOnly = ({ children, defaultMatches }: ResponsiveProps): ReactNode => {\n const isMobile = useIsMobile({ defaultMatches });\n return isMobile ? null : children;\n};\n","import { useMemo, type ReactNode } from \"react\";\nimport { ConfigProvider } from \"antd\";\nimport zhCN from \"antd/locale/zh_CN\";\nimport { useIsMobile } from \"../responsive/responsive\";\n\nexport interface CubeConfigProviderProps {\n children: ReactNode;\n\n primaryColor?: string;\n}\n\nconst DEFAULT_PRIMARY_COLOR = \"#ec008c\";\n\n/**\n * Applies the fixed Cube antd configuration (`zh_CN` locale, `primaryColor` token, a larger\n * base font size on mobile) without rendering any application shell. Mount it on its own for\n * pages that should share the Cube theme but live outside `CubeApp` — `CubeApp` itself wraps\n * this component internally.\n */\nexport const CubeConfigProvider = ({ children, primaryColor }: CubeConfigProviderProps) => {\n const isMobile = useIsMobile();\n\n const theme = useMemo(\n () => ({\n token: {\n colorPrimary: primaryColor ?? DEFAULT_PRIMARY_COLOR,\n lineWidth: 2,\n controlOutlineWidth: 1,\n ...(isMobile ? { fontSize: 16 } : {}),\n },\n components: {\n Card: {\n colorBorderSecondary: \"var(--cube-border-color, #d1d5db)\",\n lineHeight: 1.6,\n },\n },\n }),\n [primaryColor, isMobile],\n );\n\n return (\n <ConfigProvider locale={zhCN} theme={theme}>\n {children}\n </ConfigProvider>\n );\n};\n","import {\n createContext,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useState,\n type CSSProperties,\n type ReactNode,\n} from \"react\";\nimport { Button } from \"antd\";\nimport { SearchOutlined, SmileOutlined } from \"@ant-design/icons\";\nimport { useIsMobile } from \"../responsive/responsive\";\nimport { CubeConfigProvider } from \"../cube-config-provider/cube-config-provider\";\nimport { AppHeader } from \"../app-header/app-header\";\nimport { AccountMenuButton } from \"../account-menu/account-menu-button\";\nimport { AccountMenu, type AccountMenuItem, type AccountMenuStat } from \"../account-menu/account-menu\";\nimport {\n AboutDialog,\n type AboutAppInfo,\n type AboutAuthorInfo,\n type AboutItem,\n} from \"../about-dialog/about-dialog\";\nimport \"./cube-app.css\";\n\nexport interface CubeAppAboutInfo extends AboutAppInfo {\n contactEmail?: string;\n author?: AboutAuthorInfo;\n items?: AboutItem[];\n}\n\nexport interface CubeAppContextValue {\n accountMenuStats?: AccountMenuStat[];\n accountMenuItems?: AccountMenuItem[];\n onLogoutBtnClick?(): void;\n userName?: ReactNode;\n openAbout(): void;\n setHeaderLeft(node: ReactNode): void;\n}\n\nconst CubeAppContext = createContext<CubeAppContextValue>({\n openAbout: () => undefined,\n setHeaderLeft: () => undefined,\n});\n\n/**\n * Reads the account/about configuration passed to `CubeApp`. Only needed by components\n * mounted elsewhere in the route tree (e.g. `MobileAccountSheet`) — `CubeApp` itself\n * already has this data as props.\n */\nexport const useCubeAppContext = (): CubeAppContextValue => useContext(CubeAppContext);\n\n/**\n * Lets the currently mounted page override `CubeApp`'s `headerLeft` slot. Resets to the\n * default `headerLeft` prop when the calling component unmounts.\n */\nexport const useCubeAppHeaderLeft = (node: ReactNode): void => {\n const { setHeaderLeft } = useCubeAppContext();\n\n useEffect(() => {\n setHeaderLeft(node);\n return () => setHeaderLeft(undefined);\n }, [node, setHeaderLeft]);\n};\n\nexport interface CubeAppProps {\n children: ReactNode;\n\n primaryColor?: string;\n\n accountMenuStats?: AccountMenuStat[];\n accountMenuItems?: AccountMenuItem[];\n onLogoutBtnClick?(): void;\n userName?: ReactNode;\n about: CubeAppAboutInfo;\n\n sidebarTop?: ReactNode;\n sidebarList?: ReactNode;\n sidebarBottom?: ReactNode;\n\n headerLeft?: ReactNode;\n headerRight?: ReactNode;\n headerSearchBtnLabel?: string;\n onHeaderSearchBtnClick?(): void;\n}\n\nconst SIDEBAR_WIDTH = \"var(--cube-sidebar-width, 15rem)\";\n\nexport const CubeApp = ({\n children,\n primaryColor,\n accountMenuStats,\n accountMenuItems,\n onLogoutBtnClick,\n userName,\n about,\n sidebarTop,\n sidebarList,\n sidebarBottom,\n headerLeft,\n headerRight,\n headerSearchBtnLabel,\n onHeaderSearchBtnClick,\n}: CubeAppProps) => {\n const isMobile = useIsMobile();\n const [collapsed, setCollapsed] = useState(false);\n const toggleSidebar = useCallback(() => setCollapsed((value) => !value), []);\n const [aboutOpen, setAboutOpen] = useState(false);\n const [headerLeftOverride, setHeaderLeftOverride] = useState<ReactNode>(undefined);\n\n const itemsWithAbout = useMemo<AccountMenuItem[]>(\n () => [\n ...(accountMenuItems ?? []),\n {\n key: \"cube-app-about\",\n label: \"关于\",\n icon: <SmileOutlined />,\n onClick: () => setAboutOpen(true),\n },\n ],\n [accountMenuItems],\n );\n\n const contextValue = useMemo<CubeAppContextValue>(\n () => ({\n accountMenuStats,\n accountMenuItems: itemsWithAbout,\n onLogoutBtnClick,\n userName,\n openAbout: () => setAboutOpen(true),\n setHeaderLeft: setHeaderLeftOverride,\n }),\n [accountMenuStats, itemsWithAbout, onLogoutBtnClick, userName],\n );\n\n const renderAccountMenuButton = () => (\n <AccountMenuButton\n content={({ close }) => (\n <AccountMenu\n stats={accountMenuStats}\n items={itemsWithAbout.map((item) => ({\n ...item,\n onClick: () => {\n item.onClick?.();\n close();\n },\n }))}\n footer={\n onLogoutBtnClick ? (\n <Button\n block\n danger\n aria-label=\"登出\"\n onClick={() => {\n onLogoutBtnClick();\n close();\n }}\n >\n 登出\n </Button>\n ) : undefined\n }\n />\n )}\n />\n );\n\n const renderShell = () => {\n if (isMobile) {\n return (\n <div className={\"cube-app-mobile-root\"} data-testid=\"cube-app-shell-mobile\">\n <main className={\"cube-app-mobile-content\"}>{children}</main>\n </div>\n );\n }\n\n const sidebarStyle: CSSProperties = {\n width: collapsed ? \"0px\" : SIDEBAR_WIDTH,\n };\n const contentStyle: CSSProperties = {\n width: collapsed ? \"100vw\" : `calc(100vw - ${SIDEBAR_WIDTH})`,\n };\n\n return (\n <div className={\"cube-app-root\"} data-testid=\"cube-app-shell\">\n <aside\n className={\"cube-app-sidebar\"}\n style={sidebarStyle}\n data-testid=\"cube-app-shell-sidebar\"\n aria-hidden={collapsed}\n >\n {sidebarTop ? <div className={\"cube-app-sidebar-top\"}>{sidebarTop}</div> : null}\n <div className={\"cube-app-sidebar-list\"}>{sidebarList}</div>\n {sidebarBottom ? <div className={\"cube-app-sidebar-bottom\"}>{sidebarBottom}</div> : null}\n </aside>\n <div className={\"cube-app-desktop-area\"} style={contentStyle}>\n <AppHeader\n title={headerLeftOverride ?? headerLeft}\n collapsed={collapsed}\n onToggleSidebar={toggleSidebar}\n actions={\n <>\n {headerRight}\n {onHeaderSearchBtnClick ? (\n <Button\n className={\"cube-app-search-button\"}\n icon={<SearchOutlined aria-hidden />}\n aria-label={headerSearchBtnLabel ?? \"\\u641c\\u7d22\"}\n onClick={onHeaderSearchBtnClick}\n >\n {headerSearchBtnLabel ?? \"\\u641c\\u7d22\"}\n </Button>\n ) : null}\n {renderAccountMenuButton()}\n </>\n }\n />\n <main className={\"cube-app-content\"}>{children}</main>\n </div>\n </div>\n );\n };\n\n return (\n <CubeConfigProvider primaryColor={primaryColor}>\n <CubeAppContext.Provider value={contextValue}>\n {renderShell()}\n <AboutDialog\n open={aboutOpen}\n onClose={() => setAboutOpen(false)}\n app={about}\n contactEmail={about.contactEmail}\n author={about.author}\n items={about.items}\n />\n </CubeAppContext.Provider>\n </CubeConfigProvider>\n );\n};\n","import type { HTMLAttributes, ReactNode } from \"react\";\nimport { MenuFoldOutlined, MenuUnfoldOutlined } from \"@ant-design/icons\";\nimport \"./app-header.css\";\n\nexport interface AppHeaderProps extends Omit<HTMLAttributes<HTMLElement>, \"title\"> {\n title?: ReactNode;\n actions?: ReactNode;\n collapsed?: boolean;\n showSidebarToggle?: boolean;\n onToggleSidebar?(): void;\n}\n\nexport const AppHeader = ({\n title,\n actions,\n collapsed = false,\n onToggleSidebar,\n showSidebarToggle = onToggleSidebar !== undefined,\n className,\n ...headerProps\n}: AppHeaderProps) => {\n const label = collapsed ? \"展开侧边栏\" : \"收起侧边栏\";\n const ToggleIcon = collapsed ? MenuUnfoldOutlined : MenuFoldOutlined;\n\n return (\n <header className={[\"cube-app-header\", className].filter(Boolean).join(\" \")} {...headerProps}>\n <div className={\"cube-app-header-leading\"}>\n {showSidebarToggle ? (\n <button\n type=\"button\"\n className={\"cube-app-header-toggle\"}\n aria-label={label}\n aria-expanded={!collapsed}\n onClick={onToggleSidebar}\n >\n <ToggleIcon aria-hidden />\n </button>\n ) : null}\n <div className={\"cube-app-header-title\"}>{title}</div>\n </div>\n {actions ? <div className={\"cube-app-header-actions\"}>{actions}</div> : null}\n </header>\n );\n};\n","import { type ReactNode, useState } from \"react\";\nimport { UserOutlined } from \"@ant-design/icons\";\nimport { Popover } from \"antd\";\nimport \"./account-menu.css\";\n\nexport interface AccountMenuRenderContext {\n close(): void;\n}\n\nexport interface AccountMenuButtonProps {\n content: ReactNode | ((context: AccountMenuRenderContext) => ReactNode);\n}\n\nexport const AccountMenuButton = ({ content }: AccountMenuButtonProps) => {\n const [open, setOpen] = useState(false);\n const close = () => setOpen(false);\n const renderedContent = typeof content === \"function\" ? content({ close }) : content;\n\n return (\n <Popover\n placement=\"bottomRight\"\n trigger=\"click\"\n content={renderedContent}\n open={open}\n onOpenChange={setOpen}\n arrow\n >\n <button\n type=\"button\"\n className={\"cube-account-trigger\"}\n aria-label=\"打开用户菜单\"\n aria-expanded={open}\n aria-haspopup=\"dialog\"\n >\n <UserOutlined aria-hidden />\n </button>\n </Popover>\n );\n};\n","import type { Key, ReactNode } from \"react\";\nimport { Button, Statistic } from \"antd\";\nimport \"./account-menu.css\";\n\nexport interface AccountMenuStat {\n key: Key;\n title: ReactNode;\n value: string | number;\n icon?: ReactNode;\n}\n\nexport interface AccountMenuItem {\n key: Key;\n label: ReactNode;\n icon?: ReactNode;\n danger?: boolean;\n disabled?: boolean;\n onClick?(): void;\n}\n\nexport interface AccountMenuProps {\n stats?: AccountMenuStat[];\n items?: AccountMenuItem[];\n footer?: ReactNode;\n}\n\nexport const AccountMenu = ({ stats = [], items = [], footer }: AccountMenuProps) => (\n <div className={\"cube-account-menu\"}>\n {stats.length > 0 ? (\n <div className={\"cube-account-menu-stats\"}>\n {stats.map((stat) => (\n <Statistic key={stat.key} title={stat.title} value={stat.value} prefix={stat.icon} />\n ))}\n </div>\n ) : null}\n {items.length > 0 ? (\n <div className={\"cube-account-menu-items\"}>\n {items.map((item) => (\n <Button\n key={item.key}\n block\n icon={item.icon}\n danger={item.danger}\n disabled={item.disabled}\n aria-label={typeof item.label === \"string\" ? item.label : undefined}\n onClick={item.onClick}\n >\n {item.label}\n </Button>\n ))}\n </div>\n ) : null}\n {footer ? <div className={\"cube-account-menu-footer\"}>{footer}</div> : null}\n </div>\n);\n","import type { Key, ReactNode } from \"react\";\nimport { BarcodeOutlined, GithubOutlined, SendOutlined } from \"@ant-design/icons\";\nimport { Flex, Modal } from \"antd\";\nimport \"./about-dialog.css\";\n\nexport interface AboutAppInfo {\n name: string;\n version?: string;\n repository?: string;\n description?: ReactNode;\n}\n\nexport interface AboutAuthorInfo {\n name: string;\n url?: string;\n}\n\nexport interface AboutItem {\n key: Key;\n icon?: ReactNode;\n label: ReactNode;\n value: ReactNode;\n href?: string;\n}\n\nexport interface AboutDialogProps {\n open: boolean;\n onClose(): void;\n app: AboutAppInfo;\n contactEmail?: string;\n author?: AboutAuthorInfo;\n items?: AboutItem[];\n}\n\nconst renderItem = (item: AboutItem) => {\n const content = (\n <div className={\"cube-about-item\"}>\n <Flex justify=\"space-between\" gap={16}>\n <div className={\"cube-about-item-label\"}>\n {item.icon ? <>{item.icon} &nbsp;</> : null}\n {item.label}\n </div>\n <div className={\"cube-about-item-value\"}>{item.value}</div>\n </Flex>\n </div>\n );\n\n return item.href ? (\n <a key={item.key} href={item.href} className={\"cube-about-link\"}>\n {content}\n </a>\n ) : (\n <div key={item.key}>{content}</div>\n );\n};\n\nexport const AboutDialog = ({\n open,\n onClose,\n app,\n contactEmail,\n author,\n items = [],\n}: AboutDialogProps) => {\n const defaultItems: AboutItem[] = [];\n\n if (contactEmail) {\n defaultItems.push({\n key: \"contact\",\n icon: <SendOutlined />,\n label: \"联系我\",\n value: contactEmail,\n href: `mailto:${contactEmail}?&subject=${encodeURIComponent(\n `${app.name} 相关`,\n )}`,\n });\n }\n\n if (app.version) {\n defaultItems.push({\n key: \"version\",\n icon: <BarcodeOutlined />,\n label: \"当前版本\",\n value: app.version,\n });\n }\n\n if (app.repository) {\n defaultItems.push({\n key: \"repository\",\n icon: <GithubOutlined />,\n label: \"开源地址\",\n value: \"github\",\n href: app.repository,\n });\n }\n\n const renderedItems = [...defaultItems, ...items];\n\n return (\n <Modal\n open={open}\n onCancel={onClose}\n onOk={onClose}\n title={`关于应用 ${app.name}`}\n footer={(_, { OkBtn }) => (\n <Flex\n align=\"center\"\n justify={author ? \"space-between\" : \"flex-end\"}\n gap={16}\n >\n {author ? (\n <div className={\"cube-about-powered-by\"}>\n Powered by 💗{\" \"}\n {author.url ? (\n <a href={author.url}>{author.name}</a>\n ) : (\n author.name\n )}\n </div>\n ) : null}\n <OkBtn />\n </Flex>\n )}\n >\n <Flex gap={16} vertical className={\"cube-about-body\"}>\n {app.description ? (\n <div className={\"cube-about-description\"}>{app.description}</div>\n ) : null}\n {renderedItems.map(renderItem)}\n </Flex>\n </Modal>\n );\n};\n","import { Fragment, type ReactNode } from \"react\";\nimport { Button, Drawer, Flex, Statistic } from \"antd\";\nimport { useCubeAppContext } from \"../cube-app/cube-app\";\nimport \"./mobile-account-sheet.css\";\n\nexport interface MobileAccountSheetProps {\n visible: boolean;\n onVisibleChange(visible: boolean): void;\n}\n\ninterface CellProps {\n title: ReactNode;\n extra?: ReactNode;\n onClick?(): void;\n}\n\nconst Cell = ({ title, extra, onClick }: CellProps) =>\n onClick ? (\n <button type=\"button\" className={\"cube-sheet-cell\"} onClick={onClick}>\n <span>{title}</span>\n {extra ? <span>{extra}</span> : null}\n </button>\n ) : (\n <div className={\"cube-sheet-cell\"}>\n <span>{title}</span>\n {extra ? <span>{extra}</span> : null}\n </div>\n );\n\nexport const MobileAccountSheet = ({ visible, onVisibleChange }: MobileAccountSheetProps) => {\n const { accountMenuStats, accountMenuItems, onLogoutBtnClick, userName } = useCubeAppContext();\n const close = () => onVisibleChange(false);\n\n return (\n <Drawer\n open={visible}\n onClose={close}\n placement=\"left\"\n width=\"100%\"\n closable={false}\n styles={{\n header: { display: \"none\" },\n body: { padding: 12 },\n footer: { padding: 8, borderTop: \"none\" },\n }}\n footer={\n <Button block size=\"large\" type=\"primary\" aria-label=\"返回\" onClick={close}>\n 返回\n </Button>\n }\n >\n <Flex vertical gap={12}>\n {accountMenuStats && accountMenuStats.length > 0 ? (\n <div className={\"cube-sheet-card\"}>\n <Flex justify=\"space-around\">\n {accountMenuStats.map((stat) => (\n <Statistic key={stat.key} title={stat.title} value={stat.value} prefix={stat.icon} />\n ))}\n </Flex>\n </div>\n ) : null}\n\n {userName ? (\n <div className={\"cube-sheet-card\"}>\n <Cell title=\"登录用户\" extra={userName} />\n </div>\n ) : null}\n\n {accountMenuItems && accountMenuItems.length > 0 ? (\n <div className={\"cube-sheet-card\"}>\n {accountMenuItems.map((item, index) => (\n <Fragment key={item.key}>\n <Cell\n title={\n <>\n {item.icon} &nbsp;{item.label}\n </>\n }\n onClick={() => {\n item.onClick?.();\n close();\n }}\n />\n {index !== accountMenuItems.length - 1 ? <div className={\"cube-sheet-split-line\"} /> : null}\n </Fragment>\n ))}\n </div>\n ) : null}\n\n {onLogoutBtnClick ? (\n <div className={\"cube-sheet-card\"}>\n <Cell\n title=\"登出\"\n onClick={() => {\n onLogoutBtnClick();\n close();\n }}\n />\n </div>\n ) : null}\n </Flex>\n </Drawer>\n );\n};\n","import { type HTMLAttributes, useEffect, useState } from \"react\";\nimport { Flex } from \"antd\";\nimport \"./loading.css\";\n\nexport interface PageLoadingProps {\n tip?: string;\n}\n\nexport const PageLoading = ({ tip = \"加载中...\" }: PageLoadingProps) => (\n <Flex justify=\"center\" align=\"center\" className={\"cube-page-loading\"}>\n {tip}\n </Flex>\n);\n\nexport interface DelayedLoadingProps extends HTMLAttributes<HTMLDivElement> {\n tip?: string;\n delay?: number;\n}\n\nexport const DelayedLoading = ({\n tip = \"页面加载中...\",\n delay = 500,\n className,\n ...props\n}: DelayedLoadingProps) => {\n const [visible, setVisible] = useState(false);\n\n useEffect(() => {\n const timer = window.setTimeout(() => setVisible(true), delay);\n return () => window.clearTimeout(timer);\n }, [delay]);\n\n if (!visible) return null;\n\n return (\n <div\n className={[\"cube-delayed-loading\", className].filter(Boolean).join(\" \")}\n {...props}\n >\n {tip}\n </div>\n );\n};\n","import type { PropsWithChildren, ReactNode } from \"react\";\nimport { Button, Input, type ButtonProps } from \"antd\";\nimport type { SearchProps } from \"antd/es/input\";\nimport { SearchOutlined } from \"@ant-design/icons\";\nimport { useCubeAppHeaderLeft } from \"../cube-app/cube-app\";\nimport { MobileOnly } from \"../responsive/responsive\";\nimport \"./page.css\";\n\nconst PageContainer = ({ children }: PropsWithChildren) => <div className={\"cube-page-container\"}>{children}</div>;\n\nconst PageContent = ({ children }: PropsWithChildren) => <div className={\"cube-page-content\"}>{children}</div>;\n\nconst PageActionBar = ({ children }: PropsWithChildren) => (\n <MobileOnly>\n <div className={\"cube-page-action-bar\"}>{children}</div>\n </MobileOnly>\n);\n\nexport const ActionIcon = ({ className, size = \"large\", ...props }: ButtonProps) => (\n <Button className={[\"cube-page-action-icon\", className].filter(Boolean).join(\" \")} size={size} {...props} />\n);\n\nexport const ActionButton = ({\n children,\n type = \"primary\",\n block = true,\n size = \"large\",\n ...props\n}: ButtonProps) => (\n <Button block={block} size={size} type={type} {...props}>\n {children}\n </Button>\n);\n\n/** Mobile action-bar search field (fills remaining width). */\nexport const ActionSearch = ({ className, ...props }: SearchProps) => (\n <Input.Search\n placeholder=\"输入关键字搜索\"\n enterButton={<SearchOutlined />}\n size=\"large\"\n autoFocus\n {...props}\n className={[\"cube-page-action-search\", className].filter(Boolean).join(\" \")}\n />\n);\n\nexport interface CubePageProps extends PropsWithChildren {\n desktopHeaderLeft?: ReactNode;\n mobileActionBar?: ReactNode;\n}\n\nexport const CubePage = ({ desktopHeaderLeft, mobileActionBar, children }: CubePageProps) => {\n useCubeAppHeaderLeft(desktopHeaderLeft);\n\n return (\n <PageContainer>\n <PageContent>{children}</PageContent>\n {mobileActionBar ? <PageActionBar>{mobileActionBar}</PageActionBar> : null}\n </PageContainer>\n );\n};\n","import type { ReactNode } from \"react\";\nimport { Flex } from \"antd\";\nimport \"./empty-tip.css\";\n\nexport interface EmptyTipProps {\n className?: string;\n title?: ReactNode;\n subTitle?: ReactNode;\n extra?: ReactNode;\n}\n\nexport const EmptyTip = ({ title, subTitle, extra, className }: EmptyTipProps) => (\n <Flex\n vertical\n gap={4}\n align=\"center\"\n justify=\"center\"\n className={[\"cube-empty-tip\", className].filter(Boolean).join(\" \")}\n >\n {title ? <div className=\"cube-empty-tip-title\">{title}</div> : null}\n {subTitle ? <div className=\"cube-empty-tip-subtitle\">{subTitle}</div> : null}\n {extra ? <div>{extra}</div> : null}\n </Flex>\n);\n","import { Flex, type FlexProps } from \"antd\";\nimport \"./color-list.css\";\n\nexport const MARK_COLORS_MAP: Record<string, string> = {\n c1: \"#ef4444\",\n c2: \"#f97316\",\n c3: \"#f59e0b\",\n c4: \"#eab308\",\n c5: \"#84cc16\",\n c6: \"#22c55e\",\n c7: \"#10b981\",\n c8: \"#14b8a6\",\n c9: \"#06b6d4\",\n c10: \"#0ea5e9\",\n c11: \"#3b82f6\",\n c12: \"#6366f1\",\n c13: \"#8b5cf6\",\n c14: \"#a855f7\",\n c15: \"#d946ef\",\n c16: \"#ec4899\",\n};\n\nexport const MARK_COLORS = [\n \"c1\",\n \"c2\",\n \"c3\",\n \"c4\",\n \"c5\",\n \"c6\",\n \"c7\",\n \"c8\",\n \"c9\",\n \"c10\",\n \"c11\",\n \"c12\",\n \"c13\",\n \"c14\",\n \"c15\",\n \"c16\",\n] as const;\n\nexport const MARK_COLORS_WITH_EMPTY = [...MARK_COLORS, \"\"] as const;\n\nexport const getColorValue = (colorCode: string): string | undefined => MARK_COLORS_MAP[colorCode];\n\ninterface ColorItemProps {\n colorCode: string;\n selected: boolean;\n onClick(colorCode: string): void;\n}\n\nconst ColorItem = ({ colorCode, selected, onClick }: ColorItemProps) => {\n const classes = [\"cube-color-dot\"];\n if (selected) classes.push(\"cube-color-dot-selected\");\n if (colorCode === \"\") classes.push(\"cube-color-dot-clear\");\n\n return (\n <button\n type=\"button\"\n aria-label={colorCode === \"\" ? \"清除颜色\" : `颜色 ${colorCode}`}\n className={classes.join(\" \")}\n style={{ backgroundColor: MARK_COLORS_MAP[colorCode] }}\n onClick={() => onClick(colorCode)}\n />\n );\n};\n\nexport interface ColorListProps {\n value?: string;\n onChange?(value: string): void;\n flexProps?: Omit<FlexProps, \"children\">;\n}\n\n/** Single-select color dots (includes a clear/empty option), matching Cube search filters. */\nexport const ColorList = ({ value, onChange, flexProps }: ColorListProps) => (\n <Flex wrap gap={8} {...flexProps}>\n {MARK_COLORS_WITH_EMPTY.map((colorCode) => (\n <ColorItem\n key={colorCode || \"clear\"}\n colorCode={colorCode}\n selected={value === colorCode}\n onClick={(next) => onChange?.(next)}\n />\n ))}\n </Flex>\n);\n","import { type ReactNode, useState } from \"react\";\nimport { Button, Col, Drawer, Flex, Input, Row } from \"antd\";\nimport { FilterOutlined, LeftOutlined } from \"@ant-design/icons\";\nimport { ActionIcon, ActionSearch, CubePage } from \"../page/page\";\nimport { DesktopOnly, MobileOnly } from \"../responsive/responsive\";\nimport { EmptyTip } from \"../empty-tip/empty-tip\";\nimport \"./search-page.css\";\n\nexport interface CubeSearchPageProps {\n /** Last committed keyword; used as the search inputs' default value. */\n keyword?: string;\n placeholder?: string;\n searchButtonLabel?: string;\n onSearch(value: string): void;\n onBack(): void;\n desktopHeaderLeft?: ReactNode;\n /** Filter UI (colors, tags, …). Desktop: in the page body. Mobile: in a bottom drawer. */\n filters?: ReactNode;\n mobileFilterTitle?: string;\n mobileFilterIcon?: ReactNode;\n /** True before the first search (no keyword / filters committed). */\n pending?: boolean;\n loading?: boolean;\n /** True after a search that returned no rows. Ignored while pending or loading. */\n empty?: boolean;\n pendingHint?: ReactNode;\n loadingTitle?: ReactNode;\n loadingHint?: ReactNode;\n emptyTitle?: ReactNode;\n emptyHint?: ReactNode;\n children?: ReactNode;\n}\n\nexport const CubeSearchPage = ({\n keyword = \"\",\n placeholder = \"请输入关键字,回车搜索\",\n searchButtonLabel = \"搜索\",\n onSearch,\n onBack,\n desktopHeaderLeft,\n filters,\n mobileFilterTitle = \"筛选\",\n mobileFilterIcon,\n pending = false,\n loading = false,\n empty = false,\n pendingHint = \"可使用关键词和颜色进行搜索\",\n loadingTitle = \"正在搜索中...\",\n loadingHint = \"请稍候\",\n emptyTitle = \"没有找到相关结果\",\n emptyHint = \"请尝试其他关键字\",\n children,\n}: CubeSearchPageProps) => {\n const [filterOpen, setFilterOpen] = useState(false);\n const hasFilters = filters != null;\n\n const renderBody = () => {\n if (loading) {\n return <EmptyTip title={loadingTitle} subTitle={loadingHint} />;\n }\n if (pending) {\n return <EmptyTip subTitle={pendingHint} />;\n }\n if (empty) {\n return (\n <div data-testid=\"search-empty-tip\">\n <EmptyTip title={emptyTitle} subTitle={emptyHint} />\n </div>\n );\n }\n\n return (\n <Flex\n vertical\n align=\"center\"\n gap={8}\n className=\"cube-search-page-results\"\n data-testid=\"search-result-list\"\n >\n {children}\n </Flex>\n );\n };\n\n return (\n <>\n <CubePage\n desktopHeaderLeft={desktopHeaderLeft}\n mobileActionBar={\n <>\n <ActionIcon icon={<LeftOutlined />} aria-label=\"返回\" onClick={onBack} />\n {hasFilters ? (\n <ActionIcon\n icon={mobileFilterIcon ?? <FilterOutlined />}\n aria-label=\"打开筛选\"\n onClick={() => setFilterOpen(true)}\n />\n ) : null}\n <ActionSearch defaultValue={keyword} onSearch={onSearch} />\n </>\n }\n >\n <Flex vertical gap={16} align=\"center\" className=\"cube-search-page\">\n <DesktopOnly>\n <Input.Search\n placeholder={placeholder}\n enterButton={searchButtonLabel}\n autoFocus\n size=\"large\"\n defaultValue={keyword}\n onSearch={onSearch}\n className=\"cube-search-page-input\"\n data-testid=\"search-keyword-input\"\n />\n </DesktopOnly>\n {hasFilters ? <DesktopOnly>{filters}</DesktopOnly> : null}\n {renderBody()}\n </Flex>\n </CubePage>\n\n {hasFilters ? (\n <MobileOnly>\n <Drawer\n title={mobileFilterTitle}\n open={filterOpen}\n onClose={() => setFilterOpen(false)}\n placement=\"bottom\"\n closable={false}\n styles={{\n footer: { padding: 8, border: \"none\" },\n header: { textAlign: \"center\", padding: 8 },\n }}\n footer={\n <Row gutter={8}>\n <Col flex=\"1\">\n <Button block size=\"large\" onClick={() => setFilterOpen(false)}>\n 确定\n </Button>\n </Col>\n </Row>\n }\n >\n <Flex vertical gap={16} className=\"cube-search-page-drawer\" align=\"center\">\n {filters}\n </Flex>\n </Drawer>\n </MobileOnly>\n ) : null}\n </>\n );\n};\n"],"mappings":";AAAA,SAAiD,aAAa,SAAS,4BAA4B;AAE5F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;AAAA;AAAA,UACd,GACF;AAAA,UACC,aAAa,gBAAAJ,MAAC,eAAa,mBAAQ,IAAiB;AAAA,UACpD,WAAW;AAAA,WACd;AAAA;AAAA,IACF;AAAA,IAEC,aACC,gBAAAA,MAAC,cACC,0BAAAA;AAAA,MAACK;AAAA,MAAA;AAAA,QACC,OAAO;AAAA,QACP,MAAM;AAAA,QACN,SAAS,MAAM,cAAc,KAAK;AAAA,QAClC,WAAU;AAAA,QACV,UAAU;AAAA,QACV,QAAQ;AAAA,UACN,QAAQ,EAAE,SAAS,GAAG,QAAQ,OAAO;AAAA,UACrC,QAAQ,EAAE,WAAW,UAAU,SAAS,EAAE;AAAA,QAC5C;AAAA,QACA,QACE,gBAAAL,MAAC,OAAI,QAAQ,GACX,0BAAAA,MAAC,OAAI,MAAK,KACR,0BAAAA,MAACM,SAAA,EAAO,OAAK,MAAC,MAAK,SAAQ,SAAS,MAAM,cAAc,KAAK,GAAG,0BAEhE,GACF,GACF;AAAA,QAGF,0BAAAN,MAACG,OAAA,EAAK,UAAQ,MAAC,KAAK,IAAI,WAAU,2BAA0B,OAAM,UAC/D,mBACH;AAAA;AAAA,IACF,GACF,IACE;AAAA,KACN;AAEJ;","names":["useMemo","useMemo","useCallback","useMemo","useState","Button","jsx","jsx","jsx","jsxs","jsx","jsxs","Fragment","jsx","jsxs","useState","useCallback","useMemo","Button","Fragment","Button","Flex","Statistic","Fragment","jsx","jsxs","Button","Flex","Statistic","useEffect","useState","Flex","jsx","Flex","useState","useEffect","Button","SearchOutlined","jsx","jsxs","Button","SearchOutlined","Flex","jsx","jsxs","Flex","Flex","jsx","Flex","useState","Button","Drawer","Flex","Input","Fragment","jsx","jsxs","useState","Flex","Input","Drawer","Button"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hopgoldy/cube-ui",
3
- "version": "0.1.1",
3
+ "version": "0.2.0",
4
4
  "description": "Shared responsive application shell and UI primitives for Cube applications",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/HoPGoldy/cube-module#readme",