@papernote/ui 1.9.2 → 1.9.3

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/dist/index.js CHANGED
@@ -10172,7 +10172,7 @@ function getPopoverPlacement(position) {
10172
10172
  * />
10173
10173
  * ```
10174
10174
  */
10175
- function NotificationBell({ notifications, unreadCount: providedUnreadCount, onMarkAsRead, onMarkAllRead, onNotificationClick, onViewAll, loading = false, dropdownPosition = 'bottom-right', maxHeight = '400px', size = 'md', emptyMessage = 'No notifications', viewAllText = 'View all notifications', disabled = false, className = '', variant = 'compact', showUnreadInHeader = false, bellStyle = 'ghost', }) {
10175
+ function NotificationBell({ notifications, unreadCount: providedUnreadCount, onMarkAsRead, onMarkAllRead, onNotificationClick, onViewAll, loading = false, dropdownPosition = 'bottom-right', maxHeight = '400px', size = 'md', emptyMessage = 'No notifications', viewAllText = 'View all notifications', disabled = false, className = '', variant = 'compact', showUnreadInHeader = false, bellStyle = 'ghost', icon: customIcon, }) {
10176
10176
  const [isOpen, setIsOpen] = React.useState(false);
10177
10177
  // Calculate unread count if not provided
10178
10178
  const unreadCount = React.useMemo(() => {
@@ -10217,6 +10217,8 @@ function NotificationBell({ notifications, unreadCount: providedUnreadCount, onM
10217
10217
  md: 'p-3',
10218
10218
  lg: 'p-4',
10219
10219
  };
10220
+ // Default bell icon or custom icon
10221
+ const bellIcon = customIcon || jsxRuntime.jsx(lucideReact.Bell, { className: `${iconSizes[size]} text-ink-600` });
10220
10222
  // Trigger button
10221
10223
  const triggerButton = bellStyle === 'outlined' ? (jsxRuntime.jsxs("div", { className: "relative inline-block", children: [jsxRuntime.jsx("button", { className: `
10222
10224
  ${outlinedSizeClasses[size]}
@@ -10228,16 +10230,16 @@ function NotificationBell({ notifications, unreadCount: providedUnreadCount, onM
10228
10230
  ${className}
10229
10231
  `, disabled: disabled, "aria-label": unreadCount > 0
10230
10232
  ? `Notifications - ${unreadCount} unread`
10231
- : 'Notifications', children: jsxRuntime.jsx(lucideReact.Bell, { className: `${iconSizes[size]} text-ink-600` }) }), unreadCount > 0 && (jsxRuntime.jsx("span", { className: `
10233
+ : 'Notifications', children: bellIcon }), unreadCount > 0 && (jsxRuntime.jsx("span", { className: `
10232
10234
  absolute -top-1 -right-1
10233
10235
  flex items-center justify-center
10234
10236
  min-w-[18px] h-[18px] px-1.5
10235
10237
  rounded-full text-white font-semibold text-[11px]
10236
10238
  bg-error-500 shadow-sm
10237
10239
  pointer-events-none
10238
- `, "aria-label": `${unreadCount > 99 ? '99+' : unreadCount} notifications`, children: unreadCount > 99 ? '99+' : unreadCount }))] })) : (jsxRuntime.jsx(Button, { variant: "ghost", iconOnly: true, size: size, disabled: disabled, badge: unreadCount > 0 ? unreadCount : undefined, badgeVariant: "error", "aria-label": unreadCount > 0
10240
+ `, "aria-label": `${unreadCount > 99 ? '99+' : unreadCount} notifications`, children: unreadCount > 99 ? '99+' : unreadCount }))] })) : (jsxRuntime.jsx(Button, { variant: "ghost", iconOnly: true, size: size, disabled: disabled, icon: bellIcon, badge: unreadCount > 0 ? unreadCount : undefined, badgeVariant: "error", "aria-label": unreadCount > 0
10239
10241
  ? `Notifications - ${unreadCount} unread`
10240
- : 'Notifications', className: className, children: jsxRuntime.jsx(lucideReact.Bell, { className: iconSizes[size] }) }));
10242
+ : 'Notifications', className: className }));
10241
10243
  // Header title with optional unread count
10242
10244
  const headerTitle = showUnreadInHeader && unreadCount > 0
10243
10245
  ? `Notifications (${unreadCount} unread)`
@@ -11293,52 +11295,44 @@ function getAugmentedNamespace(n) {
11293
11295
  * (A1, A1:C5, ...)
11294
11296
  */
11295
11297
 
11296
- var collection;
11297
- var hasRequiredCollection;
11298
-
11299
- function requireCollection () {
11300
- if (hasRequiredCollection) return collection;
11301
- hasRequiredCollection = 1;
11302
- class Collection {
11298
+ let Collection$3 = class Collection {
11303
11299
 
11304
- constructor(data, refs) {
11305
- if (data == null && refs == null) {
11306
- this._data = [];
11307
- this._refs = [];
11308
- } else {
11309
- if (data.length !== refs.length)
11310
- throw Error('Collection: data length should match references length.');
11311
- this._data = data;
11312
- this._refs = refs;
11313
- }
11314
- }
11300
+ constructor(data, refs) {
11301
+ if (data == null && refs == null) {
11302
+ this._data = [];
11303
+ this._refs = [];
11304
+ } else {
11305
+ if (data.length !== refs.length)
11306
+ throw Error('Collection: data length should match references length.');
11307
+ this._data = data;
11308
+ this._refs = refs;
11309
+ }
11310
+ }
11315
11311
 
11316
- get data() {
11317
- return this._data;
11318
- }
11312
+ get data() {
11313
+ return this._data;
11314
+ }
11319
11315
 
11320
- get refs() {
11321
- return this._refs;
11322
- }
11316
+ get refs() {
11317
+ return this._refs;
11318
+ }
11323
11319
 
11324
- get length() {
11325
- return this._data.length;
11326
- }
11320
+ get length() {
11321
+ return this._data.length;
11322
+ }
11327
11323
 
11328
- /**
11329
- * Add data and references to this collection.
11330
- * @param {{}} obj - data
11331
- * @param {{}} ref - reference
11332
- */
11333
- add(obj, ref) {
11334
- this._data.push(obj);
11335
- this._refs.push(ref);
11336
- }
11337
- }
11324
+ /**
11325
+ * Add data and references to this collection.
11326
+ * @param {{}} obj - data
11327
+ * @param {{}} ref - reference
11328
+ */
11329
+ add(obj, ref) {
11330
+ this._data.push(obj);
11331
+ this._refs.push(ref);
11332
+ }
11333
+ };
11338
11334
 
11339
- collection = Collection;
11340
- return collection;
11341
- }
11335
+ var collection = Collection$3;
11342
11336
 
11343
11337
  var helpers;
11344
11338
  var hasRequiredHelpers;
@@ -11347,7 +11341,7 @@ function requireHelpers () {
11347
11341
  if (hasRequiredHelpers) return helpers;
11348
11342
  hasRequiredHelpers = 1;
11349
11343
  const FormulaError = requireError();
11350
- const Collection = requireCollection();
11344
+ const Collection = collection;
11351
11345
 
11352
11346
  const Types = {
11353
11347
  NUMBER: 0,
@@ -21001,7 +20995,7 @@ var engineering = EngineeringFunctions;
21001
20995
 
21002
20996
  const FormulaError$b = requireError();
21003
20997
  const {FormulaHelpers: FormulaHelpers$8, Types: Types$6, WildCard, Address: Address$3} = requireHelpers();
21004
- const Collection$2 = requireCollection();
20998
+ const Collection$2 = collection;
21005
20999
  const H$5 = FormulaHelpers$8;
21006
21000
 
21007
21001
  const ReferenceFunctions$1 = {
@@ -32629,7 +32623,7 @@ var parsing = {
32629
32623
  const FormulaError$4 = requireError();
32630
32624
  const {Address: Address$1} = requireHelpers();
32631
32625
  const {Prefix: Prefix$1, Postfix: Postfix$1, Infix: Infix$1, Operators: Operators$1} = operators;
32632
- const Collection$1 = requireCollection();
32626
+ const Collection$1 = collection;
32633
32627
  const MAX_ROW$1 = 1048576, MAX_COLUMN$1 = 16384;
32634
32628
  const {NotAllInputParsedException} = require$$4;
32635
32629
 
@@ -33391,7 +33385,7 @@ var hooks$1 = {
33391
33385
  const FormulaError$2 = requireError();
33392
33386
  const {FormulaHelpers: FormulaHelpers$1, Types, Address} = requireHelpers();
33393
33387
  const {Prefix, Postfix, Infix, Operators} = operators;
33394
- const Collection = requireCollection();
33388
+ const Collection = collection;
33395
33389
  const MAX_ROW = 1048576, MAX_COLUMN = 16384;
33396
33390
 
33397
33391
  let Utils$1 = class Utils {