@raydenui/ui 0.7.0 → 0.8.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/dist/index.js CHANGED
@@ -1,9 +1,12 @@
1
- import { forwardRef, useId, createContext, Children, isValidElement, cloneElement, useRef, useState, useCallback, useMemo, useEffect, useContext } from 'react';
1
+ import { forwardRef, createContext, useState, useCallback, useId, useMemo, Children, isValidElement, cloneElement, useRef, useEffect, useContext } from 'react';
2
2
  import { clsx } from 'clsx';
3
3
  import { twMerge } from 'tailwind-merge';
4
4
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
5
+ import { Chart, CategoryScale, LinearScale, PointElement, LineElement, BarElement, ArcElement, RadialLinearScale, Filler, Tooltip, Legend } from 'chart.js';
6
+ import { PolarArea, Bubble, Scatter, Radar, Doughnut, Pie, Bar, Line } from 'react-chartjs-2';
7
+ import { createPortal } from 'react-dom';
5
8
 
6
- // src/components/Button/Button.tsx
9
+ // src/components/Accordion/Accordion.tsx
7
10
  function cn(...inputs) {
8
11
  return twMerge(clsx(inputs));
9
12
  }
@@ -5194,17 +5197,17 @@ var zoomOutIcon = {
5194
5197
  var icons = {
5195
5198
  "3d": threeDIcon,
5196
5199
  "AI-stars": AIStarsIcon,
5197
- "AR": ARIcon,
5198
- "BTC": BTCIcon,
5199
- "ETH": ETHIcon,
5200
- "NFT": NFTIcon,
5200
+ AR: ARIcon,
5201
+ BTC: BTCIcon,
5202
+ ETH: ETHIcon,
5203
+ NFT: NFTIcon,
5201
5204
  "NFT-add": NFTAddIcon,
5202
5205
  "NFT-profile": NFTProfileIcon,
5203
5206
  "NFT-remove": NFTRemoveIcon,
5204
5207
  "QR-code": QRCodeIcon,
5205
5208
  "VR-goggles": VRGogglesIcon,
5206
- "airplane": airplaneIcon,
5207
- "airpod": airpodIcon,
5209
+ airplane: airplaneIcon,
5210
+ airpod: airpodIcon,
5208
5211
  "alarm-clock": alarmClockIcon,
5209
5212
  "align-center": alignCenterIcon,
5210
5213
  "align-justify": alignJustifyIcon,
@@ -5221,65 +5224,65 @@ var icons = {
5221
5224
  "arrow-up-left": arrowUpLeftIcon,
5222
5225
  "arrow-up-right": arrowUpRightIcon,
5223
5226
  "arrow-up-split": arrowUpSplitIcon,
5224
- "at": atIcon,
5225
- "backward": backwardIcon,
5226
- "badge": badgeIcon,
5227
- "bag": bagIcon,
5228
- "ball": ballIcon,
5229
- "bank": bankIcon,
5227
+ at: atIcon,
5228
+ backward: backwardIcon,
5229
+ badge: badgeIcon,
5230
+ bag: bagIcon,
5231
+ ball: ballIcon,
5232
+ bank: bankIcon,
5230
5233
  "bar-chart-h": barChartHIcon,
5231
5234
  "bar-chart-v": barChartVIcon,
5232
- "battery": batteryIcon,
5235
+ battery: batteryIcon,
5233
5236
  "battery-charging": batteryChargingIcon,
5234
5237
  "battery-empty": batteryEmptyIcon,
5235
- "bed": bedIcon,
5238
+ bed: bedIcon,
5236
5239
  "beizer-curve": beizerCurveIcon,
5237
- "bell": bellIcon,
5240
+ bell: bellIcon,
5238
5241
  "bell-slash": bellSlashIcon,
5239
- "bicycle": bicycleIcon,
5240
- "bin": binIcon,
5241
- "bluetooth": bluetoothIcon,
5242
- "bold": boldIcon,
5243
- "book": bookIcon,
5242
+ bicycle: bicycleIcon,
5243
+ bin: binIcon,
5244
+ bluetooth: bluetoothIcon,
5245
+ bold: boldIcon,
5246
+ book: bookIcon,
5244
5247
  "book-open": bookOpenIcon,
5245
- "bookmark": bookmarkIcon,
5248
+ bookmark: bookmarkIcon,
5246
5249
  "bookmark-add": bookmarkAddIcon,
5247
- "bookmarks": bookmarksIcon,
5248
- "books": booksIcon,
5249
- "bot": botIcon,
5250
- "box": boxIcon,
5250
+ bookmarks: bookmarksIcon,
5251
+ books: booksIcon,
5252
+ bot: botIcon,
5253
+ box: boxIcon,
5251
5254
  "box-1": box1Icon,
5252
- "branch": branchIcon,
5253
- "brush": brushIcon,
5254
- "bug": bugIcon,
5255
+ branch: branchIcon,
5256
+ brush: brushIcon,
5257
+ bug: bugIcon,
5255
5258
  "building-1": building1Icon,
5256
5259
  "building-2": building2Icon,
5257
5260
  "building-3": building3Icon,
5258
5261
  "building-4": building4Icon,
5259
5262
  "building-5": building5Icon,
5260
5263
  "building-6": building6Icon,
5261
- "bulb": bulbIcon,
5264
+ bulb: bulbIcon,
5262
5265
  "bulb-slash": bulbSlashIcon,
5263
- "bus": busIcon,
5264
- "calendar": calendarIcon,
5266
+ bus: busIcon,
5267
+ calendar: calendarIcon,
5265
5268
  "calendar-add": calendarAddIcon,
5266
5269
  "calendar-alt": calendarAltIcon,
5267
5270
  "calendar-cross": calendarCrossIcon,
5268
5271
  "calendar-remove": calendarRemoveIcon,
5269
5272
  "calendar-tick": calendarTickIcon,
5270
- "call": callIcon,
5273
+ call: callIcon,
5271
5274
  "call-add": callAddIcon,
5272
5275
  "call-cross": callCrossIcon,
5273
5276
  "call-incoming": callIncomingIcon,
5274
5277
  "call-outgoing": callOutgoingIcon,
5275
5278
  "call-remove": callRemoveIcon,
5276
5279
  "call-ringing": callRingingIcon,
5277
- "camera": cameraIcon,
5280
+ camera: cameraIcon,
5278
5281
  "camera-slash": cameraSlashIcon,
5279
5282
  "candles-h": candlesHIcon,
5280
5283
  "candles-v": candlesVIcon,
5281
- "car": carIcon,
5282
- "card": cardIcon,
5284
+ car: carIcon,
5285
+ card: cardIcon,
5283
5286
  "card-add": cardAddIcon,
5284
5287
  "card-cross": cardCrossIcon,
5285
5288
  "card-fund": cardFundIcon,
@@ -5288,20 +5291,20 @@ var icons = {
5288
5291
  "card-remove": cardRemoveIcon,
5289
5292
  "card-tick": cardTickIcon,
5290
5293
  "card-withdraw": cardWithdrawIcon,
5291
- "cart": cartIcon,
5294
+ cart: cartIcon,
5292
5295
  "cart-add": cartAddIcon,
5293
5296
  "cart-check": cartCheckIcon,
5294
5297
  "cart-cross": cartCrossIcon,
5295
5298
  "cart-minus": cartMinusIcon,
5296
- "chart": chartIcon,
5299
+ chart: chartIcon,
5297
5300
  "chart-down": chartDownIcon,
5298
5301
  "chart-up": chartUpIcon,
5299
- "chat": chatIcon,
5302
+ chat: chatIcon,
5300
5303
  "chat-alt": chatAltIcon,
5301
- "chats": chatsIcon,
5302
- "check": checkIcon,
5304
+ chats: chatsIcon,
5305
+ check: checkIcon,
5303
5306
  "check-circle": checkCircleIcon,
5304
- "checkbox": checkboxIcon,
5307
+ checkbox: checkboxIcon,
5305
5308
  "checkbox-checked": checkboxCheckedIcon,
5306
5309
  "chevron-down": chevronDownIcon,
5307
5310
  "chevron-h": chevronHIcon,
@@ -5309,9 +5312,9 @@ var icons = {
5309
5312
  "chevron-right": chevronRightIcon,
5310
5313
  "chevron-up": chevronUpIcon,
5311
5314
  "chevron-v": chevronVIcon,
5312
- "clipboard": clipboardIcon,
5313
- "clock": clockIcon,
5314
- "cloud": cloudIcon,
5315
+ clipboard: clipboardIcon,
5316
+ clock: clockIcon,
5317
+ cloud: cloudIcon,
5315
5318
  "cloud-1": cloud1Icon,
5316
5319
  "cloud-download": cloudDownloadIcon,
5317
5320
  "cloud-info": cloudInfoIcon,
@@ -5320,19 +5323,19 @@ var icons = {
5320
5323
  "cloud-slash": cloudSlashIcon,
5321
5324
  "cloud-snowy": cloudSnowyIcon,
5322
5325
  "cloud-upload": cloudUploadIcon,
5323
- "clouds": cloudsIcon,
5324
- "code": codeIcon,
5326
+ clouds: cloudsIcon,
5327
+ code: codeIcon,
5325
5328
  "code-2": code2Icon,
5326
5329
  "coin-stack": coinStackIcon,
5327
5330
  "coin-swap": coinSwapIcon,
5328
- "coins": coinsIcon,
5331
+ coins: coinsIcon,
5329
5332
  "coins-alt": coinsAltIcon,
5330
5333
  "color-picker": colorPickerIcon,
5331
- "column": columnIcon,
5332
- "compass": compassIcon,
5334
+ column: columnIcon,
5335
+ compass: compassIcon,
5333
5336
  "conical-flask": conicalFlaskIcon,
5334
- "copy": copyIcon,
5335
- "corner": cornerIcon,
5337
+ copy: copyIcon,
5338
+ corner: cornerIcon,
5336
5339
  "corner-down-left": cornerDownLeftIcon,
5337
5340
  "corner-down-right": cornerDownRightIcon,
5338
5341
  "corner-left-down": cornerLeftDownIcon,
@@ -5341,43 +5344,43 @@ var icons = {
5341
5344
  "corner-right-up": cornerRightUpIcon,
5342
5345
  "corner-up-left": cornerUpLeftIcon,
5343
5346
  "corner-up-right": cornerUpRightIcon,
5344
- "crop": cropIcon,
5345
- "cup": cupIcon,
5346
- "cursor": cursorIcon,
5347
- "data": dataIcon,
5348
- "devices": devicesIcon,
5349
- "dislike": dislikeIcon,
5350
- "division": divisionIcon,
5351
- "dollar": dollarIcon,
5347
+ crop: cropIcon,
5348
+ cup: cupIcon,
5349
+ cursor: cursorIcon,
5350
+ data: dataIcon,
5351
+ devices: devicesIcon,
5352
+ dislike: dislikeIcon,
5353
+ division: divisionIcon,
5354
+ dollar: dollarIcon,
5352
5355
  "dots-h": dotsHIcon,
5353
5356
  "dots-h-circle": dotsHCircleIcon,
5354
5357
  "dots-v": dotsVIcon,
5355
5358
  "dots-v-circle": dotsVCircleIcon,
5356
- "download": downloadIcon,
5357
- "elements": elementsIcon,
5358
- "emoji": emojiIcon,
5359
+ download: downloadIcon,
5360
+ elements: elementsIcon,
5361
+ emoji: emojiIcon,
5359
5362
  "emoji-add": emojiAddIcon,
5360
- "euro": euroIcon,
5361
- "expand": expandIcon,
5362
- "eye": eyeIcon,
5363
+ euro: euroIcon,
5364
+ expand: expandIcon,
5365
+ eye: eyeIcon,
5363
5366
  "eye-slash": eyeSlashIcon,
5364
5367
  "face-id": faceIdIcon,
5365
- "feather": featherIcon,
5368
+ feather: featherIcon,
5366
5369
  "feather-AI": featherAIIcon,
5367
5370
  "feather-add": featherAddIcon,
5368
- "file": fileIcon,
5371
+ file: fileIcon,
5369
5372
  "file-alt": fileAltIcon,
5370
5373
  "file-cloud": fileCloudIcon,
5371
5374
  "file-code": fileCodeIcon,
5372
5375
  "file-download": fileDownloadIcon,
5373
5376
  "file-upload": fileUploadIcon,
5374
- "filter": filterIcon,
5377
+ filter: filterIcon,
5375
5378
  "filter-alt": filterAltIcon,
5376
- "fingerprint": fingerprintIcon,
5379
+ fingerprint: fingerprintIcon,
5377
5380
  "first-aid": firstAidIcon,
5378
- "flag": flagIcon,
5379
- "flower": flowerIcon,
5380
- "folder": folderIcon,
5381
+ flag: flagIcon,
5382
+ flower: flowerIcon,
5383
+ folder: folderIcon,
5381
5384
  "folder-add": folderAddIcon,
5382
5385
  "folder-cloud": folderCloudIcon,
5383
5386
  "folder-cross": folderCrossIcon,
@@ -5387,29 +5390,29 @@ var icons = {
5387
5390
  "folder-shield": folderShieldIcon,
5388
5391
  "folder-upload": folderUploadIcon,
5389
5392
  "folder-user": folderUserIcon,
5390
- "fork": forkIcon,
5391
- "forward": forwardIcon,
5393
+ fork: forkIcon,
5394
+ forward: forwardIcon,
5392
5395
  "game-pad": gamePadIcon,
5393
5396
  "gear-AI": gearAIIcon,
5394
- "gem": gemIcon,
5395
- "gift": giftIcon,
5396
- "globe": globeIcon,
5397
+ gem: gemIcon,
5398
+ gift: giftIcon,
5399
+ globe: globeIcon,
5397
5400
  "globe-alt": globeAltIcon,
5398
- "gps": gpsIcon,
5399
- "grid": gridIcon,
5401
+ gps: gpsIcon,
5402
+ grid: gridIcon,
5400
5403
  "grid-2": grid2Icon,
5401
- "hashtag": hashtagIcon,
5402
- "heading": headingIcon,
5403
- "headphones": headphonesIcon,
5404
- "headset": headsetIcon,
5404
+ hashtag: hashtagIcon,
5405
+ heading: headingIcon,
5406
+ headphones: headphonesIcon,
5407
+ headset: headsetIcon,
5405
5408
  "health-plus": healthPlusIcon,
5406
- "heart": heartIcon,
5409
+ heart: heartIcon,
5407
5410
  "heart-beat": heartBeatIcon,
5408
5411
  "heart-beat-wave": heartBeatWaveIcon,
5409
- "history": historyIcon,
5410
- "home": homeIcon,
5412
+ history: historyIcon,
5413
+ home: homeIcon,
5411
5414
  "home-alt": homeAltIcon,
5412
- "image": imageIcon,
5415
+ image: imageIcon,
5413
5416
  "image-add": imageAddIcon,
5414
5417
  "image-check": imageCheckIcon,
5415
5418
  "image-circle": imageCircleIcon,
@@ -5418,167 +5421,167 @@ var icons = {
5418
5421
  "info-circle": infoCircleIcon,
5419
5422
  "info-hexagon": infoHexagonIcon,
5420
5423
  "info-triangle": infoTriangleIcon,
5421
- "italics": italicsIcon,
5422
- "key": keyIcon,
5423
- "keyboard": keyboardIcon,
5424
- "lamp": lampIcon,
5425
- "laptop": laptopIcon,
5426
- "layer": layerIcon,
5427
- "lifebuoy": lifebuoyIcon,
5428
- "lightning": lightningIcon,
5424
+ italics: italicsIcon,
5425
+ key: keyIcon,
5426
+ keyboard: keyboardIcon,
5427
+ lamp: lampIcon,
5428
+ laptop: laptopIcon,
5429
+ layer: layerIcon,
5430
+ lifebuoy: lifebuoyIcon,
5431
+ lightning: lightningIcon,
5429
5432
  "lightning-off": lightningOffIcon,
5430
- "like": likeIcon,
5433
+ like: likeIcon,
5431
5434
  "line-height": lineHeightIcon,
5432
- "link": linkIcon,
5435
+ link: linkIcon,
5433
5436
  "link-detach": linkDetachIcon,
5434
- "list": listIcon,
5437
+ list: listIcon,
5435
5438
  "list-add": listAddIcon,
5436
- "lock": lockIcon,
5439
+ lock: lockIcon,
5437
5440
  "lock-open": lockOpenIcon,
5438
- "loudspeaker": loudspeakerIcon,
5441
+ loudspeaker: loudspeakerIcon,
5439
5442
  "magic-wand": magicWandIcon,
5440
- "mail": mailIcon,
5443
+ mail: mailIcon,
5441
5444
  "mail-add": mailAddIcon,
5442
5445
  "mail-check": mailCheckIcon,
5443
5446
  "mail-cross": mailCrossIcon,
5444
5447
  "mail-remove": mailRemoveIcon,
5445
- "map": mapIcon,
5448
+ map: mapIcon,
5446
5449
  "map-alt": mapAltIcon,
5447
5450
  "map-marker": mapMarkerIcon,
5448
- "media": mediaIcon,
5449
- "merge": mergeIcon,
5450
- "message": messageIcon,
5451
+ media: mediaIcon,
5452
+ merge: mergeIcon,
5453
+ message: messageIcon,
5451
5454
  "message-alt": messageAltIcon,
5452
- "messages": messagesIcon,
5453
- "microphone": microphoneIcon,
5455
+ messages: messagesIcon,
5456
+ microphone: microphoneIcon,
5454
5457
  "microphone-slash": microphoneSlashIcon,
5455
- "minus": minusIcon,
5458
+ minus: minusIcon,
5456
5459
  "minus-circle": minusCircleIcon,
5457
- "mobile": mobileIcon,
5458
- "money": moneyIcon,
5460
+ mobile: mobileIcon,
5461
+ money: moneyIcon,
5459
5462
  "money-1": money1Icon,
5460
5463
  "money-2": money2Icon,
5461
- "moon": moonIcon,
5464
+ moon: moonIcon,
5462
5465
  "moon-cloud": moonCloudIcon,
5463
5466
  "moon-stars": moonStarsIcon,
5464
- "mouse": mouseIcon,
5465
- "move": moveIcon,
5466
- "multiply": multiplyIcon,
5467
+ mouse: mouseIcon,
5468
+ move: moveIcon,
5469
+ multiply: multiplyIcon,
5467
5470
  "multiply-circle": multiplyCircleIcon,
5468
- "music": musicIcon,
5471
+ music: musicIcon,
5469
5472
  "music-AI": musicAIIcon,
5470
5473
  "music-note": musicNoteIcon,
5471
- "naira": nairaIcon,
5472
- "navigation": navigationIcon,
5474
+ naira: nairaIcon,
5475
+ navigation: navigationIcon,
5473
5476
  "navigation-alt": navigationAltIcon,
5474
- "newspaper": newspaperIcon,
5475
- "next": nextIcon,
5477
+ newspaper: newspaperIcon,
5478
+ next: nextIcon,
5476
5479
  "paint-brush": paintBrushIcon,
5477
5480
  "paint-bucket": paintBucketIcon,
5478
- "palette": paletteIcon,
5481
+ palette: paletteIcon,
5479
5482
  "paper-clip": paperClipIcon,
5480
5483
  "paragraph-spacing": paragraphSpacingIcon,
5481
- "pause": pauseIcon,
5482
- "pc": pcIcon,
5484
+ pause: pauseIcon,
5485
+ pc: pcIcon,
5483
5486
  "pc-lock": pcLockIcon,
5484
5487
  "pc-speaker": pcSpeakerIcon,
5485
5488
  "pc-user": pcUserIcon,
5486
- "pencil": pencilIcon,
5489
+ pencil: pencilIcon,
5487
5490
  "pencil-edit": pencilEditIcon,
5488
5491
  "pie-chart": pieChartIcon,
5489
- "pin": pinIcon,
5492
+ pin: pinIcon,
5490
5493
  "pin-alt": pinAltIcon,
5491
- "plant": plantIcon,
5494
+ plant: plantIcon,
5492
5495
  "plant-2": plant2Icon,
5493
- "play": playIcon,
5494
- "playlist": playlistIcon,
5495
- "plus": plusIcon,
5496
+ play: playIcon,
5497
+ playlist: playlistIcon,
5498
+ plus: plusIcon,
5496
5499
  "plus-circle": plusCircleIcon,
5497
- "pounds": poundsIcon,
5498
- "power": powerIcon,
5499
- "previous": previousIcon,
5500
- "printer": printerIcon,
5501
- "processor": processorIcon,
5500
+ pounds: poundsIcon,
5501
+ power: powerIcon,
5502
+ previous: previousIcon,
5503
+ printer: printerIcon,
5504
+ processor: processorIcon,
5502
5505
  "pull-request": pullRequestIcon,
5503
5506
  "question-circle": questionCircleIcon,
5504
- "quote": quoteIcon,
5507
+ quote: quoteIcon,
5505
5508
  "radio-button": radioButtonIcon,
5506
5509
  "radio-selected": radioSelectedIcon,
5507
- "receipt": receiptIcon,
5508
- "redo": redoIcon,
5509
- "refresh": refreshIcon,
5510
- "repeat": repeatIcon,
5510
+ receipt: receiptIcon,
5511
+ redo: redoIcon,
5512
+ refresh: refreshIcon,
5513
+ repeat: repeatIcon,
5511
5514
  "repeat-once": repeatOnceIcon,
5512
5515
  "road-sign": roadSignIcon,
5513
- "rocket": rocketIcon,
5516
+ rocket: rocketIcon,
5514
5517
  "rocket-alt": rocketAltIcon,
5515
5518
  "rotate-left": rotateLeftIcon,
5516
5519
  "rotate-right": rotateRightIcon,
5517
- "route": routeIcon,
5518
- "row": rowIcon,
5519
- "save": saveIcon,
5520
- "scan": scanIcon,
5521
- "scissor": scissorIcon,
5522
- "screenshot": screenshotIcon,
5523
- "search": searchIcon,
5524
- "send": sendIcon,
5520
+ route: routeIcon,
5521
+ row: rowIcon,
5522
+ save: saveIcon,
5523
+ scan: scanIcon,
5524
+ scissor: scissorIcon,
5525
+ screenshot: screenshotIcon,
5526
+ search: searchIcon,
5527
+ send: sendIcon,
5525
5528
  "send-AI": sendAIIcon,
5526
5529
  "send-alt": sendAltIcon,
5527
- "server": serverIcon,
5530
+ server: serverIcon,
5528
5531
  "server-alt": serverAltIcon,
5529
- "settings": settingsIcon,
5532
+ settings: settingsIcon,
5530
5533
  "settings-1": settings1Icon,
5531
5534
  "settings-2": settings2Icon,
5532
- "share": shareIcon,
5535
+ share: shareIcon,
5533
5536
  "share-alt": shareAltIcon,
5534
- "shield": shieldIcon,
5537
+ shield: shieldIcon,
5535
5538
  "shield-cross": shieldCrossIcon,
5536
5539
  "shield-tick": shieldTickIcon,
5537
- "ship": shipIcon,
5538
- "shower": showerIcon,
5539
- "shrink": shrinkIcon,
5540
+ ship: shipIcon,
5541
+ shower: showerIcon,
5542
+ shrink: shrinkIcon,
5540
5543
  "shrink-alt": shrinkAltIcon,
5541
- "shuffle": shuffleIcon,
5544
+ shuffle: shuffleIcon,
5542
5545
  "sign-in": signInIcon,
5543
5546
  "sign-out": signOutIcon,
5544
- "signal": signalIcon,
5547
+ signal: signalIcon,
5545
5548
  "signal-off": signalOffIcon,
5546
- "sim": simIcon,
5547
- "snooze": snoozeIcon,
5548
- "snowflake": snowflakeIcon,
5549
- "sofa": sofaIcon,
5550
- "speaker": speakerIcon,
5551
- "star": starIcon,
5552
- "stars": starsIcon,
5553
- "stop": stopIcon,
5554
- "stopwatch": stopwatchIcon,
5555
- "store": storeIcon,
5556
- "strikethrough": strikethroughIcon,
5557
- "subscript": subscriptIcon,
5558
- "suitcase": suitcaseIcon,
5559
- "sun": sunIcon,
5549
+ sim: simIcon,
5550
+ snooze: snoozeIcon,
5551
+ snowflake: snowflakeIcon,
5552
+ sofa: sofaIcon,
5553
+ speaker: speakerIcon,
5554
+ star: starIcon,
5555
+ stars: starsIcon,
5556
+ stop: stopIcon,
5557
+ stopwatch: stopwatchIcon,
5558
+ store: storeIcon,
5559
+ strikethrough: strikethroughIcon,
5560
+ subscript: subscriptIcon,
5561
+ suitcase: suitcaseIcon,
5562
+ sun: sunIcon,
5560
5563
  "sun-cloud": sunCloudIcon,
5561
- "superscript": superscriptIcon,
5562
- "support": supportIcon,
5564
+ superscript: superscriptIcon,
5565
+ support: supportIcon,
5563
5566
  "switch-diagonal": switchDiagonalIcon,
5564
5567
  "switch-horizontal": switchHorizontalIcon,
5565
5568
  "switch-vertical": switchVerticalIcon,
5566
- "tablet": tabletIcon,
5567
- "target": targetIcon,
5568
- "taxi": taxiIcon,
5569
- "terminal": terminalIcon,
5570
- "text": textIcon,
5571
- "thermometer": thermometerIcon,
5572
- "ticket": ticketIcon,
5573
- "tissue": tissueIcon,
5574
- "train": trainIcon,
5575
- "trophy": trophyIcon,
5576
- "truck": truckIcon,
5577
- "tv": tvIcon,
5578
- "underline": underlineIcon,
5579
- "undo": undoIcon,
5580
- "upload": uploadIcon,
5581
- "user": userIcon,
5569
+ tablet: tabletIcon,
5570
+ target: targetIcon,
5571
+ taxi: taxiIcon,
5572
+ terminal: terminalIcon,
5573
+ text: textIcon,
5574
+ thermometer: thermometerIcon,
5575
+ ticket: ticketIcon,
5576
+ tissue: tissueIcon,
5577
+ train: trainIcon,
5578
+ trophy: trophyIcon,
5579
+ truck: truckIcon,
5580
+ tv: tvIcon,
5581
+ underline: underlineIcon,
5582
+ undo: undoIcon,
5583
+ upload: uploadIcon,
5584
+ user: userIcon,
5582
5585
  "user-add": userAddIcon,
5583
5586
  "user-circle": userCircleIcon,
5584
5587
  "user-cross": userCrossIcon,
@@ -5586,16 +5589,16 @@ var icons = {
5586
5589
  "user-heart": userHeartIcon,
5587
5590
  "user-remove": userRemoveIcon,
5588
5591
  "user-tick": userTickIcon,
5589
- "users": usersIcon,
5590
- "verified": verifiedIcon,
5591
- "video": videoIcon,
5592
+ users: usersIcon,
5593
+ verified: verifiedIcon,
5594
+ video: videoIcon,
5592
5595
  "video-slash": videoSlashIcon,
5593
5596
  "voice-note": voiceNoteIcon,
5594
- "volume": volumeIcon,
5597
+ volume: volumeIcon,
5595
5598
  "volume-low": volumeLowIcon,
5596
5599
  "volume-mute": volumeMuteIcon,
5597
5600
  "volume-slash": volumeSlashIcon,
5598
- "wallet": walletIcon,
5601
+ wallet: walletIcon,
5599
5602
  "wallet-add": walletAddIcon,
5600
5603
  "wallet-check": walletCheckIcon,
5601
5604
  "wallet-cross": walletCrossIcon,
@@ -5603,9 +5606,9 @@ var icons = {
5603
5606
  "wallet-remove": walletRemoveIcon,
5604
5607
  "wallet-withdraw": walletWithdrawIcon,
5605
5608
  "water-drop": waterDropIcon,
5606
- "wifi": wifiIcon,
5607
- "wristwatch": wristwatchIcon,
5608
- "yen": yenIcon,
5609
+ wifi: wifiIcon,
5610
+ wristwatch: wristwatchIcon,
5611
+ yen: yenIcon,
5609
5612
  "zoom-in": zoomInIcon,
5610
5613
  "zoom-out": zoomOutIcon
5611
5614
  };
@@ -5652,6 +5655,177 @@ function resolveIcon(icon, size = "md") {
5652
5655
  if (isIconName(icon)) return /* @__PURE__ */ jsx(Icon, { name: icon, size });
5653
5656
  return icon;
5654
5657
  }
5658
+ var AccordionContext = createContext(null);
5659
+ var AccordionItemContext = createContext(null);
5660
+ function useAccordionContext() {
5661
+ const ctx = useContext(AccordionContext);
5662
+ if (!ctx) throw new Error("Accordion compound components must be used within <Accordion>");
5663
+ return ctx;
5664
+ }
5665
+ function useAccordionItemContext() {
5666
+ const ctx = useContext(AccordionItemContext);
5667
+ if (!ctx) throw new Error("AccordionTrigger/Content must be used within <AccordionItem>");
5668
+ return ctx;
5669
+ }
5670
+ function ChevronDown({ className }) {
5671
+ return /* @__PURE__ */ jsx(
5672
+ "svg",
5673
+ {
5674
+ className,
5675
+ viewBox: "0 0 24 24",
5676
+ fill: "none",
5677
+ stroke: "currentColor",
5678
+ strokeWidth: 2,
5679
+ strokeLinecap: "round",
5680
+ strokeLinejoin: "round",
5681
+ children: /* @__PURE__ */ jsx("path", { d: "M6 9l6 6 6-6" })
5682
+ }
5683
+ );
5684
+ }
5685
+ var Accordion = forwardRef(
5686
+ ({
5687
+ type = "default",
5688
+ multiple = false,
5689
+ value: controlledValue,
5690
+ defaultValue = [],
5691
+ onValueChange,
5692
+ className,
5693
+ children,
5694
+ ...rest
5695
+ }, ref) => {
5696
+ const [uncontrolledValue, setUncontrolledValue] = useState(defaultValue);
5697
+ const openItems = controlledValue ?? uncontrolledValue;
5698
+ const toggle = useCallback(
5699
+ (itemValue) => {
5700
+ const next = openItems.includes(itemValue) ? openItems.filter((v) => v !== itemValue) : multiple ? [...openItems, itemValue] : [itemValue];
5701
+ if (!controlledValue) setUncontrolledValue(next);
5702
+ onValueChange?.(next);
5703
+ },
5704
+ [openItems, multiple, controlledValue, onValueChange]
5705
+ );
5706
+ return /* @__PURE__ */ jsx(AccordionContext.Provider, { value: { type, openItems, toggle }, children: /* @__PURE__ */ jsx(
5707
+ "div",
5708
+ {
5709
+ ref,
5710
+ className: cn(
5711
+ "w-full",
5712
+ type === "nested" && "flex flex-col gap-3",
5713
+ className
5714
+ ),
5715
+ ...rest,
5716
+ children
5717
+ }
5718
+ ) });
5719
+ }
5720
+ );
5721
+ Accordion.displayName = "Accordion";
5722
+ var AccordionItem = forwardRef(
5723
+ ({ value, disabled = false, className, children, ...rest }, ref) => {
5724
+ const { type, openItems } = useAccordionContext();
5725
+ const isOpen = openItems.includes(value);
5726
+ const generatedId = useId();
5727
+ const triggerId = `accordion-trigger-${generatedId}`;
5728
+ const contentId = `accordion-content-${generatedId}`;
5729
+ return /* @__PURE__ */ jsx(AccordionItemContext.Provider, { value: { value, isOpen, disabled, triggerId, contentId }, children: /* @__PURE__ */ jsx(
5730
+ "div",
5731
+ {
5732
+ ref,
5733
+ className: cn(
5734
+ "border-solid transition-colors",
5735
+ type === "default" ? cn(
5736
+ "border-b",
5737
+ isOpen ? "border-primary-300" : "border-grey-100"
5738
+ ) : cn(
5739
+ "border rounded-[10px]",
5740
+ isOpen ? "border-primary-300" : "border-grey-75"
5741
+ ),
5742
+ className
5743
+ ),
5744
+ ...rest,
5745
+ children
5746
+ }
5747
+ ) });
5748
+ }
5749
+ );
5750
+ AccordionItem.displayName = "AccordionItem";
5751
+ var AccordionTrigger = forwardRef(
5752
+ ({
5753
+ leadingIcon,
5754
+ leadingNumber,
5755
+ leadingLogo,
5756
+ badge,
5757
+ hideChevron = false,
5758
+ className,
5759
+ children,
5760
+ ...rest
5761
+ }, ref) => {
5762
+ const { toggle } = useAccordionContext();
5763
+ const { value, isOpen, disabled, triggerId, contentId } = useAccordionItemContext();
5764
+ return /* @__PURE__ */ jsxs(
5765
+ "button",
5766
+ {
5767
+ ref,
5768
+ id: triggerId,
5769
+ type: "button",
5770
+ disabled,
5771
+ "aria-expanded": isOpen,
5772
+ "aria-controls": contentId,
5773
+ onClick: () => toggle(value),
5774
+ className: cn(
5775
+ "flex items-center gap-3 px-4 py-6 w-full text-left transition-colors",
5776
+ !isOpen && !disabled && "hover:bg-grey-50",
5777
+ disabled && "opacity-50 cursor-not-allowed",
5778
+ className
5779
+ ),
5780
+ ...rest,
5781
+ children: [
5782
+ leadingNumber && /* @__PURE__ */ jsx("span", { className: "shrink-0 flex items-center justify-center bg-grey-700 text-white text-base font-medium leading-[1.48] rounded-xl px-2 py-1 min-w-[37px]", children: leadingNumber }),
5783
+ leadingLogo && /* @__PURE__ */ jsx("span", { className: "shrink-0", children: leadingLogo }),
5784
+ leadingIcon && /* @__PURE__ */ jsx("span", { className: "shrink-0 size-6 text-grey-500", children: resolveIcon(leadingIcon, "md") }),
5785
+ /* @__PURE__ */ jsx("span", { className: "flex-1 min-w-0 text-lg font-semibold text-grey-900 leading-[1.54]", children }),
5786
+ badge != null && /* @__PURE__ */ jsx("span", { className: "shrink-0 bg-primary-50 text-primary-400 text-sm font-medium rounded-full px-3 py-2 leading-[1.45]", children: badge }),
5787
+ !hideChevron && /* @__PURE__ */ jsx(
5788
+ ChevronDown,
5789
+ {
5790
+ className: cn(
5791
+ "shrink-0 size-6 text-grey-500 transition-transform duration-200",
5792
+ isOpen && "rotate-180"
5793
+ )
5794
+ }
5795
+ )
5796
+ ]
5797
+ }
5798
+ );
5799
+ }
5800
+ );
5801
+ AccordionTrigger.displayName = "AccordionTrigger";
5802
+ var AccordionContent = forwardRef(
5803
+ ({ className, children, ...rest }, ref) => {
5804
+ const { isOpen, triggerId, contentId } = useAccordionItemContext();
5805
+ return /* @__PURE__ */ jsx(
5806
+ "div",
5807
+ {
5808
+ ref,
5809
+ id: contentId,
5810
+ role: "region",
5811
+ "aria-labelledby": triggerId,
5812
+ className: cn(
5813
+ "grid transition-[grid-template-rows] duration-200 ease-out",
5814
+ isOpen ? "grid-rows-[1fr]" : "grid-rows-[0fr]"
5815
+ ),
5816
+ children: /* @__PURE__ */ jsx("div", { className: "overflow-hidden", children: /* @__PURE__ */ jsx(
5817
+ "div",
5818
+ {
5819
+ className: cn("px-4 pb-6 text-base text-grey-500 leading-[1.48]", className),
5820
+ ...rest,
5821
+ children
5822
+ }
5823
+ ) })
5824
+ }
5825
+ );
5826
+ }
5827
+ );
5828
+ AccordionContent.displayName = "AccordionContent";
5655
5829
  var solidVariants = {
5656
5830
  primary: "bg-primary-500 text-white hover:bg-primary-400 focus-visible:bg-primary-700 disabled:bg-grey-300 disabled:text-white dark:disabled:bg-grey-200",
5657
5831
  secondary: "bg-white dark:bg-grey-50 text-primary-600 border-[1.5px] border-primary-600 hover:bg-primary-50 hover:border-primary-600 focus-visible:bg-primary-50 focus-visible:border-primary-700 focus-visible:border-2 disabled:bg-white dark:disabled:bg-grey-50 disabled:border-2 disabled:border-grey-100 disabled:text-grey-400",
@@ -5699,7 +5873,7 @@ var Button = forwardRef(
5699
5873
  ...rest
5700
5874
  }, ref) => {
5701
5875
  const variantClasses = appearance === "outlined" ? outlinedVariants[variant] : solidVariants[variant];
5702
- const sizeConfig2 = sizeClasses[size];
5876
+ const sizeConfig3 = sizeClasses[size];
5703
5877
  const paddingKey = iconPosition === "icon-only" ? "icon-only" : iconPosition !== "none" ? "icon" : "none";
5704
5878
  const iconSizeClass = size === "sm" ? "size-5" : "size-6";
5705
5879
  const resolvedIcon = resolveIcon(icon, size === "sm" ? "md" : "lg");
@@ -5710,8 +5884,8 @@ var Button = forwardRef(
5710
5884
  disabled,
5711
5885
  className: cn(
5712
5886
  "inline-flex items-center justify-center gap-2 font-semibold transition-colors focus-visible:outline-none cursor-pointer disabled:cursor-not-allowed",
5713
- sizeConfig2.base,
5714
- sizeConfig2[paddingKey],
5887
+ sizeConfig3.base,
5888
+ sizeConfig3[paddingKey],
5715
5889
  variantClasses,
5716
5890
  className
5717
5891
  ),
@@ -5755,6 +5929,18 @@ var ButtonGroupItem = forwardRef(
5755
5929
  }
5756
5930
  );
5757
5931
  ButtonGroupItem.displayName = "ButtonGroupItem";
5932
+ var inputFrameSize = {
5933
+ xs: "px-2.5 py-2 gap-2",
5934
+ sm: "p-3 gap-3",
5935
+ md: "px-4 py-3 gap-3",
5936
+ lg: "px-4 py-3 gap-3"
5937
+ };
5938
+ var addonHeight = {
5939
+ xs: "",
5940
+ sm: "h-10",
5941
+ md: "h-12",
5942
+ lg: "h-14"
5943
+ };
5758
5944
  var Input = forwardRef(
5759
5945
  ({
5760
5946
  size = "sm",
@@ -5765,6 +5951,8 @@ var Input = forwardRef(
5765
5951
  leadingIcon,
5766
5952
  trailingIcon,
5767
5953
  addonRight,
5954
+ leadingAddon,
5955
+ trailingAddon,
5768
5956
  readOnly,
5769
5957
  disabled,
5770
5958
  className,
@@ -5777,21 +5965,101 @@ var Input = forwardRef(
5777
5965
  const inputId = id || generatedId;
5778
5966
  const hasError = !!error;
5779
5967
  const hasSuccess = !!success;
5968
+ const hasAddon = !!leadingAddon || !!trailingAddon;
5780
5969
  const bottomText = hasError ? typeof error === "string" ? error : void 0 : hasSuccess ? typeof success === "string" ? success : void 0 : helperText;
5781
5970
  const descriptionId = bottomText ? `${inputId}-description` : void 0;
5782
- const borderColor = hasError ? "border-error-200 focus-within:border-error-200" : hasSuccess ? "border-success-200 focus-within:border-success-200" : "border-grey-300 hover:border-primary-100 focus-within:border-primary-200";
5783
- return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col gap-2 w-full", wrapperClassName), children: [
5971
+ const borderColor = hasError ? "border-error-400 focus-within:border-error-400" : hasSuccess ? "border-success-400 focus-within:border-success-400" : "border-grey-300 hover:border-primary-100 focus-within:border-primary-400";
5972
+ const inputBg = readOnly ? "bg-grey-100" : disabled ? "bg-grey-50" : "bg-white dark:bg-grey-50";
5973
+ if (hasAddon) {
5974
+ return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col gap-1 w-full", wrapperClassName), children: [
5975
+ label && /* @__PURE__ */ jsx("label", { htmlFor: inputId, className: "text-sm font-medium text-grey-900 leading-[1.45]", children: label }),
5976
+ /* @__PURE__ */ jsxs("div", { className: cn("flex items-stretch", addonHeight[size]), children: [
5977
+ leadingAddon && /* @__PURE__ */ jsx(
5978
+ "div",
5979
+ {
5980
+ className: cn(
5981
+ "flex items-center gap-1 px-3 py-2 bg-grey-50 border border-r-0 border-grey-300 rounded-l-lg overflow-hidden shrink-0",
5982
+ "text-sm font-medium text-grey-700"
5983
+ ),
5984
+ children: leadingAddon
5985
+ }
5986
+ ),
5987
+ /* @__PURE__ */ jsxs(
5988
+ "div",
5989
+ {
5990
+ className: cn(
5991
+ "flex flex-1 items-center border overflow-hidden transition-colors",
5992
+ inputFrameSize[size],
5993
+ inputBg,
5994
+ borderColor,
5995
+ !leadingAddon && !trailingAddon && "rounded-lg",
5996
+ leadingAddon && !trailingAddon && "rounded-r-lg",
5997
+ !leadingAddon && trailingAddon && "rounded-l-lg",
5998
+ leadingAddon && trailingAddon && "",
5999
+ disabled && "cursor-not-allowed"
6000
+ ),
6001
+ children: [
6002
+ leadingIcon && /* @__PURE__ */ jsx("span", { className: "shrink-0 size-6 text-grey-400", children: resolveIcon(leadingIcon, "md") }),
6003
+ /* @__PURE__ */ jsx(
6004
+ "input",
6005
+ {
6006
+ ref,
6007
+ id: inputId,
6008
+ readOnly,
6009
+ disabled,
6010
+ required,
6011
+ "aria-invalid": hasError || void 0,
6012
+ "aria-required": required || void 0,
6013
+ "aria-describedby": descriptionId,
6014
+ className: cn(
6015
+ "flex-1 min-w-0 bg-transparent text-sm text-grey-900 placeholder:text-grey-400 outline-none disabled:cursor-not-allowed",
6016
+ className
6017
+ ),
6018
+ ...rest
6019
+ }
6020
+ ),
6021
+ addonRight && /* @__PURE__ */ jsx("span", { className: "shrink-0 text-sm text-grey-500", children: addonRight }),
6022
+ trailingIcon && /* @__PURE__ */ jsx("span", { className: "shrink-0 size-6 text-grey-400", children: resolveIcon(trailingIcon, "md") })
6023
+ ]
6024
+ }
6025
+ ),
6026
+ trailingAddon && /* @__PURE__ */ jsx(
6027
+ "div",
6028
+ {
6029
+ className: cn(
6030
+ "flex items-center gap-1 px-3 py-2 bg-grey-50 border border-l-0 border-grey-300 rounded-r-lg overflow-hidden shrink-0",
6031
+ "text-sm font-medium text-grey-700"
6032
+ ),
6033
+ children: trailingAddon
6034
+ }
6035
+ )
6036
+ ] }),
6037
+ bottomText && /* @__PURE__ */ jsx(
6038
+ "p",
6039
+ {
6040
+ id: descriptionId,
6041
+ className: cn(
6042
+ "text-sm leading-[1.45]",
6043
+ hasError ? "text-error-400" : hasSuccess ? "text-success-400" : "text-grey-500"
6044
+ ),
6045
+ children: bottomText
6046
+ }
6047
+ )
6048
+ ] });
6049
+ }
6050
+ return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col gap-1 w-full", wrapperClassName), children: [
5784
6051
  label && /* @__PURE__ */ jsx("label", { htmlFor: inputId, className: "text-sm font-medium text-grey-900 leading-[1.45]", children: label }),
5785
6052
  /* @__PURE__ */ jsxs(
5786
6053
  "div",
5787
6054
  {
5788
6055
  className: cn(
5789
- "flex items-center gap-3 border rounded-md overflow-hidden transition-colors",
5790
- size === "sm" ? "h-9 px-3 py-2" : "h-14 p-4",
6056
+ "flex items-center border rounded-lg overflow-hidden transition-colors",
6057
+ inputFrameSize[size],
6058
+ addonHeight[size],
5791
6059
  readOnly ? "bg-grey-100 border-grey-300" : disabled ? "bg-grey-50 border-grey-200 cursor-not-allowed" : cn("bg-white dark:bg-grey-50", borderColor)
5792
6060
  ),
5793
6061
  children: [
5794
- leadingIcon && /* @__PURE__ */ jsx("span", { className: "shrink-0 size-5 text-grey-400", children: resolveIcon(leadingIcon, "md") }),
6062
+ leadingIcon && /* @__PURE__ */ jsx("span", { className: "shrink-0 size-6 text-grey-400", children: resolveIcon(leadingIcon, "md") }),
5795
6063
  /* @__PURE__ */ jsx(
5796
6064
  "input",
5797
6065
  {
@@ -5811,7 +6079,7 @@ var Input = forwardRef(
5811
6079
  }
5812
6080
  ),
5813
6081
  addonRight && /* @__PURE__ */ jsx("span", { className: "shrink-0 text-sm text-grey-500", children: addonRight }),
5814
- trailingIcon && /* @__PURE__ */ jsx("span", { className: "shrink-0 size-5 text-grey-400", children: resolveIcon(trailingIcon, "md") })
6082
+ trailingIcon && /* @__PURE__ */ jsx("span", { className: "shrink-0 size-6 text-grey-400", children: resolveIcon(trailingIcon, "md") })
5815
6083
  ]
5816
6084
  }
5817
6085
  ),
@@ -5821,7 +6089,7 @@ var Input = forwardRef(
5821
6089
  id: descriptionId,
5822
6090
  className: cn(
5823
6091
  "text-sm leading-[1.45]",
5824
- hasError ? "text-error-500" : hasSuccess ? "text-success-600" : "text-grey-500"
6092
+ hasError ? "text-error-400" : hasSuccess ? "text-success-400" : "text-grey-500"
5825
6093
  ),
5826
6094
  children: bottomText
5827
6095
  }
@@ -5838,6 +6106,8 @@ function useTabsContext() {
5838
6106
  }
5839
6107
  function Tabs({
5840
6108
  variant = "line",
6109
+ size = "sm",
6110
+ orientation = "horizontal",
5841
6111
  value,
5842
6112
  defaultValue = "",
5843
6113
  onValueChange,
@@ -5861,17 +6131,20 @@ function Tabs({
5861
6131
  tabsRef.current.delete(tabValue);
5862
6132
  }
5863
6133
  }, []);
6134
+ const isVertical = orientation === "vertical";
6135
+ const arrowNext = isVertical ? "ArrowDown" : "ArrowRight";
6136
+ const arrowPrev = isVertical ? "ArrowUp" : "ArrowLeft";
5864
6137
  const handleKeyDown = (e) => {
5865
6138
  const tabs = Array.from(tabsRef.current.entries()).filter(([, el]) => !el.disabled).map(([val, el]) => ({ value: val, element: el }));
5866
6139
  if (tabs.length === 0) return;
5867
6140
  const currentIndex = tabs.findIndex((t) => t.element === document.activeElement);
5868
6141
  let nextIndex;
5869
6142
  switch (e.key) {
5870
- case "ArrowRight":
6143
+ case arrowNext:
5871
6144
  e.preventDefault();
5872
6145
  nextIndex = currentIndex < tabs.length - 1 ? currentIndex + 1 : 0;
5873
6146
  break;
5874
- case "ArrowLeft":
6147
+ case arrowPrev:
5875
6148
  e.preventDefault();
5876
6149
  nextIndex = currentIndex > 0 ? currentIndex - 1 : tabs.length - 1;
5877
6150
  break;
@@ -5893,31 +6166,93 @@ function Tabs({
5893
6166
  }
5894
6167
  };
5895
6168
  const contextValue = useMemo(
5896
- () => ({ activeValue, onSelect, variant, registerTab }),
5897
- [activeValue, onSelect, variant, registerTab]
6169
+ () => ({ activeValue, onSelect, variant, size, orientation, registerTab }),
6170
+ [activeValue, onSelect, variant, size, orientation, registerTab]
5898
6171
  );
5899
6172
  return /* @__PURE__ */ jsx(TabsContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx(
5900
6173
  "div",
5901
6174
  {
5902
6175
  className: cn(
5903
6176
  "inline-flex",
5904
- variant === "line" ? "border-b border-grey-200" : "gap-1",
6177
+ isVertical ? "flex-col" : "",
6178
+ variant === "line" && !isVertical && "border-b border-grey-200",
6179
+ variant === "line" && isVertical && "border-r border-grey-200",
6180
+ variant === "pill" && (isVertical ? "gap-1" : "gap-1"),
6181
+ variant === "segmented" && "border border-grey-100 rounded-lg p-0.5 gap-0.5 overflow-hidden",
5905
6182
  className
5906
6183
  ),
5907
6184
  role: "tablist",
6185
+ "aria-orientation": orientation,
5908
6186
  onKeyDown: handleKeyDown,
5909
6187
  children
5910
6188
  }
5911
6189
  ) });
5912
6190
  }
6191
+ var textSize = { sm: "text-xs", md: "text-sm", lg: "text-base" };
6192
+ var iconSize = { sm: "size-4", md: "size-5", lg: "size-6" };
6193
+ var iconResolveSize = { sm: "sm", md: "md", lg: "md" };
6194
+ var badgeText = { sm: "text-xs", md: "text-xs", lg: "text-sm" };
6195
+ var linePadding = {
6196
+ sm: "px-2 pt-1 pb-1.5",
6197
+ md: "px-3 pt-1.5 pb-2",
6198
+ lg: "px-4 pt-2 pb-2.5"
6199
+ };
6200
+ var pillPadding = {
6201
+ sm: "px-2 py-1",
6202
+ md: "px-3 py-1.5",
6203
+ lg: "px-4 py-2"
6204
+ };
6205
+ var segmentedPadding = {
6206
+ sm: "px-2 py-1",
6207
+ md: "px-3 py-1.5",
6208
+ lg: "px-4 py-2"
6209
+ };
5913
6210
  function Tab({ value, icon, badge, disabled = false, children, className }) {
5914
- const { activeValue, onSelect, variant, registerTab } = useTabsContext();
6211
+ const { activeValue, onSelect, variant, size, orientation, registerTab } = useTabsContext();
5915
6212
  const isActive = activeValue === value;
5916
6213
  const buttonRef = useRef(null);
6214
+ const isVertical = orientation === "vertical";
5917
6215
  useEffect(() => {
5918
6216
  registerTab(value, buttonRef.current);
5919
6217
  return () => registerTab(value, null);
5920
6218
  }, [value, registerTab]);
6219
+ const resolvedIcon = icon ? /* @__PURE__ */ jsx("span", { className: cn("shrink-0", iconSize[size]), children: resolveIcon(icon, iconResolveSize[size]) }) : null;
6220
+ const badgeEl = badge !== void 0 ? /* @__PURE__ */ jsx(
6221
+ "span",
6222
+ {
6223
+ className: cn(
6224
+ "inline-flex items-center justify-center px-1.5 rounded-full font-medium tracking-tight",
6225
+ badgeText[size],
6226
+ variant === "segmented" && isActive ? "bg-primary-500 text-white" : isActive ? "bg-primary-50 text-primary-500" : disabled ? "bg-grey-200 text-grey-400" : "bg-grey-100 text-grey-500"
6227
+ ),
6228
+ children: badge
6229
+ }
6230
+ ) : null;
6231
+ if (variant === "segmented") {
6232
+ return /* @__PURE__ */ jsxs(
6233
+ "button",
6234
+ {
6235
+ ref: buttonRef,
6236
+ role: "tab",
6237
+ "aria-selected": isActive,
6238
+ tabIndex: isActive ? 0 : -1,
6239
+ disabled,
6240
+ onClick: () => !disabled && onSelect(value),
6241
+ className: cn(
6242
+ "inline-flex items-center gap-1.5 rounded-md overflow-hidden transition-colors cursor-pointer",
6243
+ segmentedPadding[size],
6244
+ textSize[size],
6245
+ isActive ? "bg-primary-50 text-grey-900" : disabled ? "text-grey-300 cursor-not-allowed" : "text-grey-500 hover:bg-grey-50",
6246
+ className
6247
+ ),
6248
+ children: [
6249
+ resolvedIcon,
6250
+ /* @__PURE__ */ jsx("span", { className: "font-normal leading-[1.45] whitespace-nowrap", children }),
6251
+ badgeEl
6252
+ ]
6253
+ }
6254
+ );
6255
+ }
5921
6256
  if (variant === "pill") {
5922
6257
  return /* @__PURE__ */ jsxs(
5923
6258
  "button",
@@ -5929,78 +6264,821 @@ function Tab({ value, icon, badge, disabled = false, children, className }) {
5929
6264
  disabled,
5930
6265
  onClick: () => !disabled && onSelect(value),
5931
6266
  className: cn(
5932
- "inline-flex items-center gap-2 h-9 px-3 py-2 rounded-md text-sm font-medium transition-colors cursor-pointer",
5933
- isActive ? "bg-primary-50 text-primary-400" : disabled ? "border border-grey-300 text-grey-300 cursor-not-allowed" : "border border-grey-300 text-grey-700 hover:bg-grey-50",
6267
+ "inline-flex items-center gap-1.5 rounded-full transition-colors cursor-pointer",
6268
+ pillPadding[size],
6269
+ textSize[size],
6270
+ isActive ? "bg-primary-50 text-primary-400" : disabled ? "text-grey-300 cursor-not-allowed" : "text-grey-500 hover:bg-grey-50",
5934
6271
  className
5935
6272
  ),
5936
6273
  children: [
5937
- icon && /* @__PURE__ */ jsx("span", { className: "shrink-0 size-4", children: resolveIcon(icon, "sm") }),
5938
- children,
5939
- badge !== void 0 && /* @__PURE__ */ jsx(
6274
+ resolvedIcon,
6275
+ /* @__PURE__ */ jsx("span", { className: "font-normal leading-[1.45] whitespace-nowrap", children }),
6276
+ badgeEl
6277
+ ]
6278
+ }
6279
+ );
6280
+ }
6281
+ return /* @__PURE__ */ jsxs(
6282
+ "button",
6283
+ {
6284
+ ref: buttonRef,
6285
+ role: "tab",
6286
+ "aria-selected": isActive,
6287
+ tabIndex: isActive ? 0 : -1,
6288
+ disabled,
6289
+ onClick: () => !disabled && onSelect(value),
6290
+ className: cn(
6291
+ "relative inline-flex cursor-pointer",
6292
+ isVertical ? "flex-row" : "flex-col items-center",
6293
+ disabled && "cursor-not-allowed",
6294
+ className
6295
+ ),
6296
+ children: [
6297
+ /* @__PURE__ */ jsxs("div", { className: cn("flex items-center gap-1.5", linePadding[size]), children: [
6298
+ resolvedIcon,
6299
+ /* @__PURE__ */ jsx(
5940
6300
  "span",
5941
6301
  {
5942
6302
  className: cn(
5943
- "inline-flex items-center justify-center px-2 rounded-full text-xs font-medium tracking-tight",
5944
- isActive ? "bg-primary-400 text-white" : disabled ? "bg-grey-200 text-grey-50" : "bg-grey-100 text-grey-700"
6303
+ "font-normal leading-[1.45] whitespace-nowrap transition-colors",
6304
+ textSize[size],
6305
+ isActive ? "text-grey-900" : disabled ? "text-grey-300" : "text-grey-500"
5945
6306
  ),
5946
- children: badge
6307
+ children
6308
+ }
6309
+ ),
6310
+ badgeEl
6311
+ ] }),
6312
+ isVertical ? /* @__PURE__ */ jsx(
6313
+ "div",
6314
+ {
6315
+ className: cn(
6316
+ "w-0.5 self-stretch transition-colors",
6317
+ isActive ? "bg-primary-400" : "bg-grey-100"
6318
+ )
6319
+ }
6320
+ ) : /* @__PURE__ */ jsx(
6321
+ "div",
6322
+ {
6323
+ className: cn(
6324
+ "h-0.5 w-full transition-colors",
6325
+ isActive ? "bg-primary-400" : "bg-grey-100"
6326
+ )
6327
+ }
6328
+ )
6329
+ ]
6330
+ }
6331
+ );
6332
+ }
6333
+
6334
+ // src/components/Chart/theme.ts
6335
+ var chartColors = {
6336
+ primary: [
6337
+ "#F56630",
6338
+ // primary-400
6339
+ "#FA9874",
6340
+ // primary-200
6341
+ "#FCB59A",
6342
+ // primary-100
6343
+ "#FCD2C2",
6344
+ // primary-75
6345
+ "#FFECE5"
6346
+ // primary-50
6347
+ ],
6348
+ semantic: [
6349
+ "#F56630",
6350
+ // primary-400 (orange)
6351
+ "#0F973D",
6352
+ // success-400 (green)
6353
+ "#1671D9",
6354
+ // secondary-400 (blue)
6355
+ "#F3A218",
6356
+ // warning-400 (amber)
6357
+ "#D42620",
6358
+ // error-400 (red)
6359
+ "#0BA5EC"
6360
+ // info-400 (cyan)
6361
+ ],
6362
+ extended: [
6363
+ "#F56630",
6364
+ "#0F973D",
6365
+ "#1671D9",
6366
+ "#F3A218",
6367
+ "#D42620",
6368
+ "#0BA5EC",
6369
+ "#475CCC",
6370
+ // indigo
6371
+ "#8D8484",
6372
+ // office-brown
6373
+ "#F77A4A",
6374
+ // primary-300
6375
+ "#40B869"
6376
+ // success-300
6377
+ ],
6378
+ grey: {
6379
+ 50: "#F9FAFB",
6380
+ 100: "#F0F2F5",
6381
+ 200: "#E4E7EC",
6382
+ 300: "#D0D5DD",
6383
+ 400: "#98A2B3",
6384
+ 500: "#667185",
6385
+ 700: "#344054",
6386
+ 900: "#101928"
6387
+ }
6388
+ };
6389
+ var chartFont = {
6390
+ family: "'Inter', ui-sans-serif, system-ui, sans-serif",
6391
+ size: 12,
6392
+ weight: "normal"
6393
+ };
6394
+ function hexToRgba(hex, alpha) {
6395
+ const r = parseInt(hex.slice(1, 3), 16);
6396
+ const g = parseInt(hex.slice(3, 5), 16);
6397
+ const b = parseInt(hex.slice(5, 7), 16);
6398
+ return `rgba(${r}, ${g}, ${b}, ${alpha})`;
6399
+ }
6400
+ function createGradientFill(ctx, color, height) {
6401
+ const gradient = ctx.createLinearGradient(0, 0, 0, height);
6402
+ gradient.addColorStop(0, hexToRgba(color, 0.2));
6403
+ gradient.addColorStop(1, hexToRgba(color, 0.01));
6404
+ return gradient;
6405
+ }
6406
+ Chart.register(
6407
+ CategoryScale,
6408
+ LinearScale,
6409
+ PointElement,
6410
+ LineElement,
6411
+ BarElement,
6412
+ ArcElement,
6413
+ RadialLinearScale,
6414
+ Filler,
6415
+ Tooltip,
6416
+ Legend
6417
+ );
6418
+ function getDefaultOptions(type) {
6419
+ const base = {
6420
+ responsive: true,
6421
+ maintainAspectRatio: false,
6422
+ plugins: {
6423
+ legend: {
6424
+ display: true,
6425
+ position: "bottom",
6426
+ labels: {
6427
+ font: { ...chartFont, size: 12 },
6428
+ color: chartColors.grey[500],
6429
+ padding: 16,
6430
+ usePointStyle: true,
6431
+ pointStyle: "circle",
6432
+ boxWidth: 8,
6433
+ boxHeight: 8
6434
+ }
6435
+ },
6436
+ tooltip: {
6437
+ backgroundColor: chartColors.grey[900],
6438
+ titleFont: { ...chartFont, weight: "bold", size: 13 },
6439
+ bodyFont: { ...chartFont, size: 12 },
6440
+ cornerRadius: 8,
6441
+ padding: 12,
6442
+ boxPadding: 6,
6443
+ usePointStyle: true
6444
+ }
6445
+ }
6446
+ };
6447
+ if (type === "line" || type === "bar" || type === "scatter" || type === "bubble") {
6448
+ base.scales = {
6449
+ x: {
6450
+ grid: { color: chartColors.grey[100], drawTicks: false },
6451
+ ticks: { font: chartFont, color: chartColors.grey[400], padding: 8 },
6452
+ border: { display: false }
6453
+ },
6454
+ y: {
6455
+ grid: { color: chartColors.grey[100], drawTicks: false },
6456
+ ticks: { font: chartFont, color: chartColors.grey[400], padding: 8 },
6457
+ border: { display: false }
6458
+ }
6459
+ };
6460
+ }
6461
+ if (type === "line") {
6462
+ base.elements = {
6463
+ line: { tension: 0.4, borderWidth: 2 },
6464
+ point: { radius: 0, hoverRadius: 5, hitRadius: 20 }
6465
+ };
6466
+ }
6467
+ if (type === "bar") {
6468
+ base.elements = {
6469
+ bar: { borderRadius: 4 }
6470
+ };
6471
+ }
6472
+ if (type === "radar") {
6473
+ base.scales = {
6474
+ r: {
6475
+ grid: { color: chartColors.grey[200] },
6476
+ angleLines: { color: chartColors.grey[200] },
6477
+ pointLabels: { font: { ...chartFont, size: 11 }, color: chartColors.grey[500] },
6478
+ ticks: { display: false }
6479
+ }
6480
+ };
6481
+ }
6482
+ if (type === "polar-area") {
6483
+ base.scales = {
6484
+ r: {
6485
+ grid: { color: chartColors.grey[200] },
6486
+ ticks: { display: false }
6487
+ }
6488
+ };
6489
+ }
6490
+ return base;
6491
+ }
6492
+ function deepMerge(target, source) {
6493
+ const output = { ...target };
6494
+ for (const key of Object.keys(source)) {
6495
+ if (source[key] && typeof source[key] === "object" && !Array.isArray(source[key]) && target[key] && typeof target[key] === "object") {
6496
+ output[key] = deepMerge(target[key], source[key]);
6497
+ } else {
6498
+ output[key] = source[key];
6499
+ }
6500
+ }
6501
+ return output;
6502
+ }
6503
+ var chartComponentMap = {
6504
+ line: Line,
6505
+ bar: Bar,
6506
+ pie: Pie,
6507
+ doughnut: Doughnut,
6508
+ radar: Radar,
6509
+ scatter: Scatter,
6510
+ bubble: Bubble,
6511
+ "polar-area": PolarArea
6512
+ };
6513
+ var RaydenChart = forwardRef(
6514
+ ({ type, data, options, height = 300, width, className, ...rest }, ref) => {
6515
+ const mergedOptions = useMemo(
6516
+ () => deepMerge(getDefaultOptions(type), options ?? {}),
6517
+ [type, options]
6518
+ );
6519
+ const ChartComponent = chartComponentMap[type];
6520
+ return /* @__PURE__ */ jsx(
6521
+ "div",
6522
+ {
6523
+ ref,
6524
+ className: cn("relative", className),
6525
+ style: { height, width },
6526
+ ...rest,
6527
+ children: /* @__PURE__ */ jsx(ChartComponent, { data, options: mergedOptions })
6528
+ }
6529
+ );
6530
+ }
6531
+ );
6532
+ RaydenChart.displayName = "RaydenChart";
6533
+ function MinusIcon({ className }) {
6534
+ return /* @__PURE__ */ jsx("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", children: /* @__PURE__ */ jsx("path", { d: "M5 12h14" }) });
6535
+ }
6536
+ function PlusIcon({ className }) {
6537
+ return /* @__PURE__ */ jsx("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", children: /* @__PURE__ */ jsx("path", { d: "M12 5v14M5 12h14" }) });
6538
+ }
6539
+ var buttonSize = {
6540
+ sm: "size-8 rounded-[10px]",
6541
+ md: "size-10 rounded-xl",
6542
+ lg: "size-12 rounded-xl"
6543
+ };
6544
+ var iconSize2 = {
6545
+ sm: "size-4",
6546
+ md: "size-5",
6547
+ lg: "size-6"
6548
+ };
6549
+ var containerShape = {
6550
+ rounded: { sm: "rounded-[10px]", md: "rounded-xl", lg: "rounded-xl" },
6551
+ block: { sm: "", md: "", lg: "" },
6552
+ pill: { sm: "rounded-full", md: "rounded-[28px]", lg: "rounded-[28px]" }
6553
+ };
6554
+ var valueText = {
6555
+ sm: "text-sm w-7",
6556
+ md: "text-sm w-7",
6557
+ lg: "text-base w-7"
6558
+ };
6559
+ var Counter = forwardRef(
6560
+ ({
6561
+ value: controlledValue,
6562
+ onChange,
6563
+ defaultValue = 0,
6564
+ size = "sm",
6565
+ shape = "rounded",
6566
+ min = 0,
6567
+ max = Infinity,
6568
+ step = 1,
6569
+ disabled = false,
6570
+ className,
6571
+ ...rest
6572
+ }, ref) => {
6573
+ const [uncontrolled, setUncontrolled] = useState(defaultValue);
6574
+ const val = controlledValue ?? uncontrolled;
6575
+ const update = useCallback(
6576
+ (next) => {
6577
+ const clamped = Math.min(max, Math.max(min, next));
6578
+ if (controlledValue === void 0) setUncontrolled(clamped);
6579
+ onChange?.(clamped);
6580
+ },
6581
+ [controlledValue, onChange, min, max]
6582
+ );
6583
+ const canDecrement = val > min;
6584
+ const canIncrement = val < max;
6585
+ return /* @__PURE__ */ jsxs(
6586
+ "div",
6587
+ {
6588
+ ref,
6589
+ className: cn(
6590
+ "inline-flex items-center border border-grey-300 overflow-hidden",
6591
+ containerShape[shape][size],
6592
+ disabled && "opacity-50",
6593
+ className
6594
+ ),
6595
+ ...rest,
6596
+ children: [
6597
+ /* @__PURE__ */ jsx(
6598
+ "button",
6599
+ {
6600
+ type: "button",
6601
+ disabled: disabled || !canDecrement,
6602
+ onClick: () => update(val - step),
6603
+ className: cn(
6604
+ "flex items-center justify-center p-2.5 text-grey-900 cursor-pointer transition-colors hover:bg-grey-100",
6605
+ buttonSize[size],
6606
+ (disabled || !canDecrement) && "text-grey-300 cursor-not-allowed hover:bg-transparent"
6607
+ ),
6608
+ "aria-label": "Decrease",
6609
+ children: /* @__PURE__ */ jsx(MinusIcon, { className: iconSize2[size] })
6610
+ }
6611
+ ),
6612
+ /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center shrink-0", children: /* @__PURE__ */ jsx(
6613
+ "span",
6614
+ {
6615
+ className: cn(
6616
+ "font-medium text-grey-900 text-center leading-[1.45]",
6617
+ valueText[size]
6618
+ ),
6619
+ children: val
6620
+ }
6621
+ ) }),
6622
+ /* @__PURE__ */ jsx(
6623
+ "button",
6624
+ {
6625
+ type: "button",
6626
+ disabled: disabled || !canIncrement,
6627
+ onClick: () => update(val + step),
6628
+ className: cn(
6629
+ "flex items-center justify-center p-2.5 text-grey-900 cursor-pointer transition-colors hover:bg-grey-100",
6630
+ buttonSize[size],
6631
+ (disabled || !canIncrement) && "text-grey-300 cursor-not-allowed hover:bg-transparent"
6632
+ ),
6633
+ "aria-label": "Increase",
6634
+ children: /* @__PURE__ */ jsx(PlusIcon, { className: iconSize2[size] })
5947
6635
  }
5948
6636
  )
5949
6637
  ]
5950
6638
  }
5951
6639
  );
5952
6640
  }
5953
- return /* @__PURE__ */ jsxs(
5954
- "button",
5955
- {
5956
- ref: buttonRef,
5957
- role: "tab",
5958
- "aria-selected": isActive,
5959
- tabIndex: isActive ? 0 : -1,
5960
- disabled,
5961
- onClick: () => !disabled && onSelect(value),
5962
- className: cn(
5963
- "relative inline-flex flex-col items-center cursor-pointer",
5964
- disabled && "cursor-not-allowed",
5965
- className
5966
- ),
5967
- children: [
5968
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 px-4 pt-4 pb-[15px]", children: [
5969
- icon && /* @__PURE__ */ jsx("span", { className: "shrink-0 size-5", children: resolveIcon(icon, "md") }),
5970
- /* @__PURE__ */ jsx(
5971
- "span",
5972
- {
5973
- className: cn(
5974
- "text-sm font-medium transition-colors",
5975
- isActive ? "text-primary-400" : disabled ? "text-grey-300" : "text-grey-700 hover:text-grey-700"
5976
- ),
5977
- children
5978
- }
5979
- ),
5980
- badge !== void 0 && /* @__PURE__ */ jsx(
5981
- "span",
5982
- {
5983
- className: cn(
5984
- "inline-flex items-center justify-center px-2 rounded-full text-xs font-medium tracking-tight",
5985
- isActive ? "bg-primary-400 text-white" : disabled ? "bg-grey-200 text-grey-50" : "bg-grey-100 text-grey-700"
5986
- ),
5987
- children: badge
5988
- }
5989
- )
5990
- ] }),
5991
- /* @__PURE__ */ jsx(
5992
- "div",
5993
- {
5994
- className: cn(
5995
- "h-px w-full transition-colors",
5996
- isActive ? "bg-primary-400" : disabled ? "bg-grey-200" : "bg-grey-200 group-hover:bg-grey-500"
5997
- )
5998
- }
5999
- )
6000
- ]
6001
- }
6002
- );
6003
- }
6641
+ );
6642
+ Counter.displayName = "Counter";
6643
+ var ncSize = {
6644
+ sm: { container: "p-1 rounded-[4px]", text: "text-xs size-4" },
6645
+ md: { container: "p-1 rounded-md size-7", text: "text-sm" },
6646
+ lg: { container: "p-2 rounded-md size-9", text: "text-base" }
6647
+ };
6648
+ var ncColor = {
6649
+ orange: { bg: "bg-primary-400", text: "text-white" },
6650
+ red: { bg: "bg-error-400", text: "text-white" },
6651
+ grey: { bg: "bg-grey-300", text: "text-white" },
6652
+ white: { bg: "bg-white dark:bg-grey-50", text: "text-grey-600" }
6653
+ };
6654
+ var NumberCounter = forwardRef(
6655
+ ({ value, size = "sm", color = "orange", className, ...rest }, ref) => {
6656
+ const s = ncSize[size];
6657
+ const c = ncColor[color];
6658
+ return /* @__PURE__ */ jsx(
6659
+ "div",
6660
+ {
6661
+ ref,
6662
+ className: cn(
6663
+ "inline-flex items-center justify-center",
6664
+ s.container,
6665
+ c.bg,
6666
+ className
6667
+ ),
6668
+ ...rest,
6669
+ children: /* @__PURE__ */ jsx("span", { className: cn("font-semibold text-center leading-[1.45] tracking-tight", s.text, c.text), children: value })
6670
+ }
6671
+ );
6672
+ }
6673
+ );
6674
+ NumberCounter.displayName = "NumberCounter";
6675
+ var MONTH_NAMES = [
6676
+ "January",
6677
+ "February",
6678
+ "March",
6679
+ "April",
6680
+ "May",
6681
+ "June",
6682
+ "July",
6683
+ "August",
6684
+ "September",
6685
+ "October",
6686
+ "November",
6687
+ "December"
6688
+ ];
6689
+ var DAY_LABELS = ["M", "T", "W", "T", "F", "S", "S"];
6690
+ function getDaysInMonth(year, month) {
6691
+ return new Date(year, month + 1, 0).getDate();
6692
+ }
6693
+ function getFirstDayOfWeek(year, month) {
6694
+ const day = new Date(year, month, 1).getDay();
6695
+ return day === 0 ? 6 : day - 1;
6696
+ }
6697
+ function isSameDay(a, b) {
6698
+ if (!a || !b) return false;
6699
+ return a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth() && a.getDate() === b.getDate();
6700
+ }
6701
+ function isToday(date) {
6702
+ return isSameDay(date, /* @__PURE__ */ new Date());
6703
+ }
6704
+ function isBetween(date, start, end) {
6705
+ if (!start || !end) return false;
6706
+ const t = date.getTime();
6707
+ const s = Math.min(start.getTime(), end.getTime());
6708
+ const e = Math.max(start.getTime(), end.getTime());
6709
+ return t > s && t < e;
6710
+ }
6711
+ function isDateDisabled(date, minDate, maxDate) {
6712
+ if (minDate && date < minDate) return true;
6713
+ if (maxDate && date > maxDate) return true;
6714
+ return false;
6715
+ }
6716
+ function ChevronLeft({ className }) {
6717
+ return /* @__PURE__ */ jsx("svg", { className, viewBox: "0 0 14 14", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsx("path", { d: "M9 3L5 7l4 4" }) });
6718
+ }
6719
+ function ChevronRight({ className }) {
6720
+ return /* @__PURE__ */ jsx("svg", { className, viewBox: "0 0 14 14", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsx("path", { d: "M5 3l4 4-4 4" }) });
6721
+ }
6722
+ function ChevronDown2({ className }) {
6723
+ return /* @__PURE__ */ jsx("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsx("path", { d: "M6 9l6 6 6-6" }) });
6724
+ }
6725
+ function DayCell({ day, state, onClick }) {
6726
+ const isInteractive = state !== "disabled";
6727
+ const cellClasses = cn(
6728
+ "flex items-center justify-center w-10 h-10 text-sm font-medium relative select-none",
6729
+ state === "selected" && "bg-primary-400 text-white rounded-[10px]",
6730
+ state === "start-range" && "bg-primary-400 text-white rounded-l-[10px]",
6731
+ state === "end-range" && "bg-primary-400 text-white rounded-r-[10px]",
6732
+ state === "mid-range" && "bg-primary-50 text-primary-400",
6733
+ state === "disabled" && "text-grey-300",
6734
+ state === "default" && "text-grey-900 hover:bg-grey-75 rounded-[10px]",
6735
+ state === "today" && "text-grey-900 hover:bg-grey-75 rounded-[10px]",
6736
+ isInteractive && "cursor-pointer"
6737
+ );
6738
+ return /* @__PURE__ */ jsxs(
6739
+ "button",
6740
+ {
6741
+ type: "button",
6742
+ className: cellClasses,
6743
+ onClick: isInteractive ? onClick : void 0,
6744
+ disabled: !isInteractive,
6745
+ tabIndex: isInteractive ? 0 : -1,
6746
+ children: [
6747
+ day,
6748
+ state === "today" && /* @__PURE__ */ jsx("span", { className: "absolute bottom-[5px] left-1/2 -translate-x-1/2 size-1 rounded-full bg-primary-400" })
6749
+ ]
6750
+ }
6751
+ );
6752
+ }
6753
+ function MonthGrid({
6754
+ year,
6755
+ month,
6756
+ selectedDate,
6757
+ rangeStart,
6758
+ rangeEnd,
6759
+ isRange,
6760
+ minDate,
6761
+ maxDate,
6762
+ onDayClick
6763
+ }) {
6764
+ const daysInMonth = getDaysInMonth(year, month);
6765
+ const firstDay = getFirstDayOfWeek(year, month);
6766
+ const prevMonthDays = getDaysInMonth(year, month - 1);
6767
+ const cells = [];
6768
+ for (let i = firstDay - 1; i >= 0; i--) {
6769
+ const d = prevMonthDays - i;
6770
+ cells.push({ day: d, state: "disabled", date: new Date(year, month - 1, d) });
6771
+ }
6772
+ for (let d = 1; d <= daysInMonth; d++) {
6773
+ const date = new Date(year, month, d);
6774
+ let state = "default";
6775
+ if (isDateDisabled(date, minDate, maxDate)) {
6776
+ state = "disabled";
6777
+ } else if (isRange && rangeStart && rangeEnd) {
6778
+ const start = rangeStart.getTime() <= rangeEnd.getTime() ? rangeStart : rangeEnd;
6779
+ const end = rangeStart.getTime() <= rangeEnd.getTime() ? rangeEnd : rangeStart;
6780
+ if (isSameDay(date, start)) state = "start-range";
6781
+ else if (isSameDay(date, end)) state = "end-range";
6782
+ else if (isBetween(date, start, end)) state = "mid-range";
6783
+ } else if (isRange && rangeStart && !rangeEnd && isSameDay(date, rangeStart)) {
6784
+ state = "selected";
6785
+ } else if (!isRange && isSameDay(date, selectedDate)) {
6786
+ state = "selected";
6787
+ }
6788
+ if (state === "default" && isToday(date)) {
6789
+ state = "today";
6790
+ }
6791
+ cells.push({ day: d, state, date });
6792
+ }
6793
+ const remaining = 42 - cells.length;
6794
+ for (let d = 1; d <= remaining; d++) {
6795
+ cells.push({ day: d, state: "disabled", date: new Date(year, month + 1, d) });
6796
+ }
6797
+ const rows = [];
6798
+ for (let i = 0; i < cells.length; i += 7) {
6799
+ rows.push(cells.slice(i, i + 7));
6800
+ }
6801
+ if (rows.length === 6 && rows[5].every((c) => c.state === "disabled")) {
6802
+ rows.pop();
6803
+ }
6804
+ return /* @__PURE__ */ jsxs("div", { className: "flex flex-col", children: [
6805
+ /* @__PURE__ */ jsx("div", { className: "flex h-10 items-center", children: DAY_LABELS.map((label, i) => /* @__PURE__ */ jsx(
6806
+ "div",
6807
+ {
6808
+ className: "flex items-center justify-center w-10 h-10 text-sm font-medium text-grey-400",
6809
+ children: label
6810
+ },
6811
+ i
6812
+ )) }),
6813
+ rows.map((row, ri) => /* @__PURE__ */ jsx("div", { className: "flex h-10 items-center", children: row.map((cell, ci) => /* @__PURE__ */ jsx(
6814
+ DayCell,
6815
+ {
6816
+ day: cell.day,
6817
+ state: cell.state,
6818
+ onClick: () => onDayClick(cell.date)
6819
+ },
6820
+ ci
6821
+ )) }, ri))
6822
+ ] });
6823
+ }
6824
+ function YearGrid({ baseYear, selectedYear, onYearClick }) {
6825
+ const years = [];
6826
+ for (let i = 0; i < 20; i++) {
6827
+ years.push(baseYear + i);
6828
+ }
6829
+ const rows = [];
6830
+ for (let i = 0; i < years.length; i += 4) {
6831
+ rows.push(years.slice(i, i + 4));
6832
+ }
6833
+ return /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-2 w-full", children: rows.map((row, ri) => /* @__PURE__ */ jsx("div", { className: "flex gap-4 h-10 items-center w-full", children: row.map((year) => /* @__PURE__ */ jsx(
6834
+ "button",
6835
+ {
6836
+ type: "button",
6837
+ className: cn(
6838
+ "flex-1 flex items-center justify-center py-2.5 px-4 rounded-[10px] text-sm font-medium cursor-pointer select-none",
6839
+ year === selectedYear ? "bg-primary-400 text-white" : "text-grey-900 hover:bg-grey-75"
6840
+ ),
6841
+ onClick: () => onYearClick(year),
6842
+ children: year
6843
+ },
6844
+ year
6845
+ )) }, ri)) });
6846
+ }
6847
+ function NavButton({
6848
+ direction,
6849
+ onClick,
6850
+ hidden
6851
+ }) {
6852
+ return /* @__PURE__ */ jsx(
6853
+ "button",
6854
+ {
6855
+ type: "button",
6856
+ onClick,
6857
+ className: cn(
6858
+ "flex items-center justify-center p-2 rounded-lg bg-grey-75 hover:bg-grey-200 transition-colors cursor-pointer",
6859
+ hidden && "opacity-0 pointer-events-none"
6860
+ ),
6861
+ children: direction === "left" ? /* @__PURE__ */ jsx(ChevronLeft, { className: "size-3.5 text-grey-700" }) : /* @__PURE__ */ jsx(ChevronRight, { className: "size-3.5 text-grey-700" })
6862
+ }
6863
+ );
6864
+ }
6865
+ var DatePicker = forwardRef(
6866
+ ({
6867
+ mode = "single",
6868
+ value,
6869
+ rangeValue,
6870
+ onChange,
6871
+ onRangeChange,
6872
+ showFooter = false,
6873
+ onDone,
6874
+ onClear,
6875
+ minDate,
6876
+ maxDate,
6877
+ className,
6878
+ ...rest
6879
+ }, ref) => {
6880
+ const now = /* @__PURE__ */ new Date();
6881
+ const initialDate = value ?? rangeValue?.[0] ?? now;
6882
+ const [viewMonth, setViewMonth] = useState(initialDate.getMonth());
6883
+ const [viewYear, setViewYear] = useState(initialDate.getFullYear());
6884
+ const [yearBase, setYearBase] = useState(Math.floor(initialDate.getFullYear() / 20) * 20);
6885
+ const [rangeStart, setRangeStart] = useState(rangeValue?.[0] ?? null);
6886
+ const [rangeEnd, setRangeEnd] = useState(rangeValue?.[1] ?? null);
6887
+ const goToPrevMonth = useCallback(() => {
6888
+ setViewMonth((m) => {
6889
+ if (m === 0) {
6890
+ setViewYear((y) => y - 1);
6891
+ return 11;
6892
+ }
6893
+ return m - 1;
6894
+ });
6895
+ }, []);
6896
+ const goToNextMonth = useCallback(() => {
6897
+ setViewMonth((m) => {
6898
+ if (m === 11) {
6899
+ setViewYear((y) => y + 1);
6900
+ return 0;
6901
+ }
6902
+ return m + 1;
6903
+ });
6904
+ }, []);
6905
+ const handleDayClick = useCallback(
6906
+ (date) => {
6907
+ if (mode === "single") {
6908
+ onChange?.(date);
6909
+ } else if (mode === "range") {
6910
+ if (!rangeStart || rangeStart && rangeEnd) {
6911
+ setRangeStart(date);
6912
+ setRangeEnd(null);
6913
+ onRangeChange?.([date, null]);
6914
+ } else {
6915
+ setRangeEnd(date);
6916
+ onRangeChange?.([rangeStart, date]);
6917
+ }
6918
+ }
6919
+ },
6920
+ [mode, onChange, onRangeChange, rangeStart, rangeEnd]
6921
+ );
6922
+ const handleYearClick = useCallback(
6923
+ (year) => {
6924
+ const newDate = new Date(year, value?.getMonth() ?? 0, 1);
6925
+ onChange?.(newDate);
6926
+ setViewYear(year);
6927
+ },
6928
+ [onChange, value]
6929
+ );
6930
+ const handleClear = useCallback(() => {
6931
+ if (mode === "range") {
6932
+ setRangeStart(null);
6933
+ setRangeEnd(null);
6934
+ onRangeChange?.([null, null]);
6935
+ } else {
6936
+ onChange?.(null);
6937
+ }
6938
+ onClear?.();
6939
+ }, [mode, onChange, onRangeChange, onClear]);
6940
+ const secondMonth = useMemo(() => {
6941
+ const m = viewMonth + 1;
6942
+ return { month: m > 11 ? 0 : m, year: m > 11 ? viewYear + 1 : viewYear };
6943
+ }, [viewMonth, viewYear]);
6944
+ const monthYearLabel = `${MONTH_NAMES[viewMonth]} ${viewYear}`;
6945
+ const secondMonthLabel = `${MONTH_NAMES[secondMonth.month]} ${secondMonth.year}`;
6946
+ return /* @__PURE__ */ jsxs(
6947
+ "div",
6948
+ {
6949
+ ref,
6950
+ className: cn(
6951
+ "bg-white dark:bg-grey-50 border border-grey-75 rounded-2xl p-5 shadow-soft-xs",
6952
+ "flex flex-col gap-6",
6953
+ mode !== "range" && "w-[340px]",
6954
+ className
6955
+ ),
6956
+ ...rest,
6957
+ children: [
6958
+ mode === "single" && /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-4", children: [
6959
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between w-full", children: [
6960
+ /* @__PURE__ */ jsx(NavButton, { direction: "left", onClick: goToPrevMonth }),
6961
+ /* @__PURE__ */ jsxs(
6962
+ "button",
6963
+ {
6964
+ type: "button",
6965
+ className: "flex items-center gap-2 text-sm font-medium text-grey-700 cursor-default",
6966
+ children: [
6967
+ monthYearLabel,
6968
+ /* @__PURE__ */ jsx(ChevronDown2, { className: "size-6 text-grey-500" })
6969
+ ]
6970
+ }
6971
+ ),
6972
+ /* @__PURE__ */ jsx(NavButton, { direction: "right", onClick: goToNextMonth })
6973
+ ] }),
6974
+ /* @__PURE__ */ jsx(
6975
+ MonthGrid,
6976
+ {
6977
+ year: viewYear,
6978
+ month: viewMonth,
6979
+ selectedDate: value,
6980
+ minDate,
6981
+ maxDate,
6982
+ onDayClick: handleDayClick
6983
+ }
6984
+ )
6985
+ ] }) }),
6986
+ mode === "range" && /* @__PURE__ */ jsxs("div", { className: "flex gap-8", children: [
6987
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-4", children: [
6988
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-10 w-[280px]", children: [
6989
+ /* @__PURE__ */ jsx(NavButton, { direction: "left", onClick: goToPrevMonth }),
6990
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
6991
+ /* @__PURE__ */ jsx("span", { className: "text-sm font-medium text-grey-700", children: monthYearLabel }),
6992
+ /* @__PURE__ */ jsx(ChevronDown2, { className: "size-6 text-grey-500" })
6993
+ ] }),
6994
+ /* @__PURE__ */ jsx(NavButton, { direction: "right", hidden: true })
6995
+ ] }),
6996
+ /* @__PURE__ */ jsx(
6997
+ MonthGrid,
6998
+ {
6999
+ year: viewYear,
7000
+ month: viewMonth,
7001
+ rangeStart,
7002
+ rangeEnd,
7003
+ isRange: true,
7004
+ minDate,
7005
+ maxDate,
7006
+ onDayClick: handleDayClick
7007
+ }
7008
+ )
7009
+ ] }),
7010
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-4", children: [
7011
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between w-[280px]", children: [
7012
+ /* @__PURE__ */ jsx(NavButton, { direction: "left", hidden: true }),
7013
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
7014
+ /* @__PURE__ */ jsx("span", { className: "text-sm font-medium text-grey-700", children: secondMonthLabel }),
7015
+ /* @__PURE__ */ jsx(ChevronDown2, { className: "size-6 text-grey-500" })
7016
+ ] }),
7017
+ /* @__PURE__ */ jsx(NavButton, { direction: "right", onClick: goToNextMonth })
7018
+ ] }),
7019
+ /* @__PURE__ */ jsx(
7020
+ MonthGrid,
7021
+ {
7022
+ year: secondMonth.year,
7023
+ month: secondMonth.month,
7024
+ rangeStart,
7025
+ rangeEnd,
7026
+ isRange: true,
7027
+ minDate,
7028
+ maxDate,
7029
+ onDayClick: handleDayClick
7030
+ }
7031
+ )
7032
+ ] })
7033
+ ] }),
7034
+ mode === "year" && /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-4 items-center w-full", children: [
7035
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
7036
+ /* @__PURE__ */ jsxs("span", { className: "text-sm font-medium text-grey-700", children: [
7037
+ yearBase,
7038
+ "\u2013",
7039
+ yearBase + 19
7040
+ ] }),
7041
+ /* @__PURE__ */ jsx(ChevronDown2, { className: "size-6 text-grey-500" })
7042
+ ] }),
7043
+ /* @__PURE__ */ jsx(
7044
+ YearGrid,
7045
+ {
7046
+ baseYear: yearBase,
7047
+ selectedYear: value?.getFullYear(),
7048
+ onYearClick: handleYearClick
7049
+ }
7050
+ ),
7051
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-4 mt-2", children: [
7052
+ /* @__PURE__ */ jsx(NavButton, { direction: "left", onClick: () => setYearBase((b) => b - 20) }),
7053
+ /* @__PURE__ */ jsx(NavButton, { direction: "right", onClick: () => setYearBase((b) => b + 20) })
7054
+ ] })
7055
+ ] }),
7056
+ showFooter && /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between border-t border-grey-100 pt-4", children: [
7057
+ /* @__PURE__ */ jsx(
7058
+ "button",
7059
+ {
7060
+ type: "button",
7061
+ onClick: handleClear,
7062
+ className: "text-sm font-semibold text-grey-400 hover:text-grey-600 px-2 cursor-pointer",
7063
+ children: "Clear"
7064
+ }
7065
+ ),
7066
+ /* @__PURE__ */ jsx(
7067
+ "button",
7068
+ {
7069
+ type: "button",
7070
+ onClick: onDone,
7071
+ className: "bg-primary-400 text-white text-sm font-semibold px-5 py-2.5 rounded-lg hover:bg-primary-500 cursor-pointer",
7072
+ children: "Done"
7073
+ }
7074
+ )
7075
+ ] })
7076
+ ]
7077
+ }
7078
+ );
7079
+ }
7080
+ );
7081
+ DatePicker.displayName = "DatePicker";
6004
7082
  var Chip = forwardRef(
6005
7083
  ({
6006
7084
  variant = "input",
@@ -6059,29 +7137,39 @@ var Chip = forwardRef(
6059
7137
  }
6060
7138
  );
6061
7139
  Chip.displayName = "Chip";
7140
+ var SEGMENT_COUNT = 10;
7141
+ var trackHeight = {
7142
+ sm: "h-1",
7143
+ md: "h-2",
7144
+ lg: "h-3"
7145
+ };
6062
7146
  var clampValue = (value) => Math.min(100, Math.max(0, value));
6063
7147
  function ProgressBar({
6064
7148
  value = 0,
6065
7149
  size = "lg",
7150
+ type = "basic",
6066
7151
  label,
6067
7152
  metadata,
6068
7153
  showPercentage = true,
7154
+ percentagePosition = "bottom",
6069
7155
  className,
6070
7156
  ...rest
6071
7157
  }) {
6072
7158
  const clamped = clampValue(value);
6073
- return /* @__PURE__ */ jsxs("div", { className: cn("w-full", className), ...rest, children: [
6074
- (label || showPercentage) && /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mb-2", children: [
6075
- label && /* @__PURE__ */ jsx("span", { className: "text-sm font-medium text-grey-900", children: label }),
6076
- showPercentage && /* @__PURE__ */ jsxs("span", { className: "text-sm font-medium text-grey-900", children: [
7159
+ const filledSegments = Math.round(clamped / 100 * SEGMENT_COUNT);
7160
+ const metadataItems = Array.isArray(metadata) ? metadata : metadata ? [metadata] : [];
7161
+ return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col gap-2 w-full", className), ...rest, children: [
7162
+ (label || showPercentage && percentagePosition === "top") && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
7163
+ label && /* @__PURE__ */ jsx("span", { className: "flex-1 text-sm font-medium text-grey-900 leading-[1.45]", children: label }),
7164
+ showPercentage && percentagePosition === "top" && /* @__PURE__ */ jsxs("span", { className: "text-sm font-semibold text-grey-500 leading-[1.45]", children: [
6077
7165
  Math.round(clamped),
6078
7166
  "%"
6079
7167
  ] })
6080
7168
  ] }),
6081
- /* @__PURE__ */ jsx(
7169
+ type === "basic" ? /* @__PURE__ */ jsx(
6082
7170
  "div",
6083
7171
  {
6084
- className: cn("w-full rounded-full bg-grey-100", size === "lg" ? "h-3" : "h-2"),
7172
+ className: cn("w-full rounded-full bg-grey-200", trackHeight[size]),
6085
7173
  role: "progressbar",
6086
7174
  "aria-valuenow": clamped,
6087
7175
  "aria-valuemin": 0,
@@ -6091,14 +7179,42 @@ function ProgressBar({
6091
7179
  {
6092
7180
  className: cn(
6093
7181
  "rounded-full bg-primary-400 transition-all duration-300",
6094
- size === "lg" ? "h-3" : "h-2"
7182
+ trackHeight[size]
6095
7183
  ),
6096
7184
  style: { width: `${clamped}%` }
6097
7185
  }
6098
7186
  )
6099
7187
  }
7188
+ ) : /* @__PURE__ */ jsx(
7189
+ "div",
7190
+ {
7191
+ className: cn("flex gap-0.5 w-full", trackHeight[size]),
7192
+ role: "progressbar",
7193
+ "aria-valuenow": clamped,
7194
+ "aria-valuemin": 0,
7195
+ "aria-valuemax": 100,
7196
+ children: Array.from({ length: SEGMENT_COUNT }, (_, i) => /* @__PURE__ */ jsx(
7197
+ "div",
7198
+ {
7199
+ className: cn(
7200
+ "flex-1 rounded-full transition-colors duration-300",
7201
+ i < filledSegments ? "bg-primary-400" : "bg-grey-100"
7202
+ )
7203
+ },
7204
+ i
7205
+ ))
7206
+ }
6100
7207
  ),
6101
- metadata && /* @__PURE__ */ jsx("div", { className: "flex justify-end mt-1", children: /* @__PURE__ */ jsx("span", { className: "text-sm text-grey-500", children: metadata }) })
7208
+ (metadataItems.length > 0 || showPercentage && percentagePosition === "bottom") && /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
7209
+ metadataItems.length > 0 && /* @__PURE__ */ jsx("div", { className: "flex flex-1 items-center gap-1", children: metadataItems.map((item, i) => /* @__PURE__ */ jsxs("span", { className: "contents", children: [
7210
+ i > 0 && /* @__PURE__ */ jsx("span", { className: "text-xs text-grey-400 leading-[1.45]", children: "\u2022" }),
7211
+ /* @__PURE__ */ jsx("span", { className: "text-sm font-medium text-grey-500 leading-[1.45]", children: item })
7212
+ ] }, i)) }),
7213
+ showPercentage && percentagePosition === "bottom" && /* @__PURE__ */ jsxs("span", { className: "flex-1 text-sm font-semibold text-grey-500 text-right leading-[1.45]", children: [
7214
+ Math.round(clamped),
7215
+ "%"
7216
+ ] })
7217
+ ] })
6102
7218
  ] });
6103
7219
  }
6104
7220
  var sizeConfig = {
@@ -6108,10 +7224,13 @@ var sizeConfig = {
6108
7224
  lg: { dimension: 90, strokeWidth: 7, fontSize: 16 },
6109
7225
  xl: { dimension: 120, strokeWidth: 8, fontSize: 18 }
6110
7226
  };
7227
+ var SEGMENT_COUNT2 = 10;
7228
+ var SEGMENT_GAP_DEGREES = 6;
6111
7229
  var clampValue2 = (value) => Math.min(100, Math.max(0, value));
6112
7230
  function ProgressCircle({
6113
7231
  value = 0,
6114
7232
  size = "md",
7233
+ variant = "default",
6115
7234
  showText = true,
6116
7235
  className,
6117
7236
  ...rest
@@ -6120,6 +7239,57 @@ function ProgressCircle({
6120
7239
  const config = sizeConfig[size];
6121
7240
  const radius = (config.dimension - config.strokeWidth) / 2;
6122
7241
  const circumference = 2 * Math.PI * radius;
7242
+ if (variant === "segmented") {
7243
+ const filledSegments = Math.round(clamped / 100 * SEGMENT_COUNT2);
7244
+ const totalGapDegrees = SEGMENT_COUNT2 * SEGMENT_GAP_DEGREES;
7245
+ const segmentDegrees = (360 - totalGapDegrees) / SEGMENT_COUNT2;
7246
+ const segmentLength = segmentDegrees / 360 * circumference;
7247
+ const gapLength = SEGMENT_GAP_DEGREES / 360 * circumference;
7248
+ return /* @__PURE__ */ jsxs(
7249
+ "div",
7250
+ {
7251
+ className: cn("relative inline-flex items-center justify-center", className),
7252
+ style: { width: config.dimension, height: config.dimension },
7253
+ role: "progressbar",
7254
+ "aria-valuenow": clamped,
7255
+ "aria-valuemin": 0,
7256
+ "aria-valuemax": 100,
7257
+ ...rest,
7258
+ children: [
7259
+ /* @__PURE__ */ jsx("svg", { width: config.dimension, height: config.dimension, className: "-rotate-90", children: Array.from({ length: SEGMENT_COUNT2 }, (_, i) => {
7260
+ const segmentOffset = i * ((segmentLength + gapLength) / circumference) * circumference;
7261
+ return /* @__PURE__ */ jsx(
7262
+ "circle",
7263
+ {
7264
+ cx: config.dimension / 2,
7265
+ cy: config.dimension / 2,
7266
+ r: radius,
7267
+ fill: "none",
7268
+ stroke: i < filledSegments ? "#F56630" : "#F0F2F5",
7269
+ strokeWidth: config.strokeWidth,
7270
+ strokeLinecap: "round",
7271
+ strokeDasharray: `${segmentLength} ${circumference - segmentLength}`,
7272
+ strokeDashoffset: -segmentOffset,
7273
+ className: "transition-colors duration-300"
7274
+ },
7275
+ i
7276
+ );
7277
+ }) }),
7278
+ showText && /* @__PURE__ */ jsxs(
7279
+ "span",
7280
+ {
7281
+ className: "absolute font-semibold text-grey-900",
7282
+ style: { fontSize: config.fontSize },
7283
+ children: [
7284
+ Math.round(clamped),
7285
+ "%"
7286
+ ]
7287
+ }
7288
+ )
7289
+ ]
7290
+ }
7291
+ );
7292
+ }
6123
7293
  const offset = circumference - clamped / 100 * circumference;
6124
7294
  return /* @__PURE__ */ jsxs(
6125
7295
  "div",
@@ -6160,14 +7330,130 @@ function ProgressCircle({
6160
7330
  }
6161
7331
  )
6162
7332
  ] }),
6163
- showText && /* @__PURE__ */ jsxs("span", { className: "absolute font-semibold text-black", style: { fontSize: config.fontSize }, children: [
6164
- Math.round(clamped),
6165
- "%"
6166
- ] })
7333
+ showText && /* @__PURE__ */ jsxs(
7334
+ "span",
7335
+ {
7336
+ className: "absolute font-semibold text-grey-900",
7337
+ style: { fontSize: config.fontSize },
7338
+ children: [
7339
+ Math.round(clamped),
7340
+ "%"
7341
+ ]
7342
+ }
7343
+ )
6167
7344
  ]
6168
7345
  }
6169
7346
  );
6170
7347
  }
7348
+ var statusColors = {
7349
+ information: {
7350
+ bold: { bg: "bg-[#4a9fed]", divider: "bg-[#f0f7ff]" },
7351
+ subtle: { bg: "bg-[#f0f7ff]", text: "text-grey-900", descText: "text-grey-600", divider: "bg-[#0063ad]" }
7352
+ },
7353
+ success: {
7354
+ bold: { bg: "bg-success-400", divider: "bg-success-50" },
7355
+ subtle: { bg: "bg-success-50", text: "text-grey-900", descText: "text-grey-600", divider: "bg-success-400" }
7356
+ },
7357
+ error: {
7358
+ bold: { bg: "bg-error-400", divider: "bg-error-50" },
7359
+ subtle: { bg: "bg-error-50", text: "text-grey-900", descText: "text-grey-600", divider: "bg-error-400" }
7360
+ },
7361
+ warning: {
7362
+ bold: { bg: "bg-warning-400", divider: "bg-warning-50" },
7363
+ subtle: { bg: "bg-warning-50", text: "text-grey-900", descText: "text-grey-600", divider: "bg-warning-700" }
7364
+ },
7365
+ feature: {
7366
+ bold: { bg: "bg-grey-900", divider: "bg-grey-100" },
7367
+ subtle: { bg: "bg-grey-50", text: "text-black", descText: "text-black", divider: "bg-grey-300" }
7368
+ },
7369
+ opportunity: {
7370
+ bold: { bg: "bg-[#475ccc]", divider: "bg-[#b1bae9]" },
7371
+ subtle: { bg: "bg-[#f7f8fd]", text: "text-grey-900", descText: "text-grey-600", divider: "bg-[#b1bae9]" }
7372
+ }
7373
+ };
7374
+ function InfoIcon({ className }) {
7375
+ return /* @__PURE__ */ jsxs("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: [
7376
+ /* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "10" }),
7377
+ /* @__PURE__ */ jsx("path", { d: "M12 16v-4M12 8h.01" })
7378
+ ] });
7379
+ }
7380
+ function CloseIcon({ className }) {
7381
+ return /* @__PURE__ */ jsx("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsx("path", { d: "M18 6L6 18M6 6l12 12" }) });
7382
+ }
7383
+ var Banner = forwardRef(
7384
+ ({
7385
+ status = "information",
7386
+ emphasis = "subtle",
7387
+ size = "lg",
7388
+ title,
7389
+ description,
7390
+ icon,
7391
+ buttonLabel,
7392
+ onButtonClick,
7393
+ dismissible = true,
7394
+ onDismiss,
7395
+ className,
7396
+ ...rest
7397
+ }, ref) => {
7398
+ const colors = statusColors[status];
7399
+ const isBold = emphasis === "bold";
7400
+ const colorSet = isBold ? colors.bold : colors.subtle;
7401
+ const textColor = isBold ? "text-white" : colorSet.text;
7402
+ const descColor = isBold ? "text-white" : colorSet.descText;
7403
+ const buttonColor = isBold ? "text-white" : "text-grey-600";
7404
+ const iconSize4 = size === "sm" ? "size-4" : "size-6";
7405
+ const textSize2 = size === "sm" ? "text-xs" : "text-sm";
7406
+ return /* @__PURE__ */ jsxs(
7407
+ "div",
7408
+ {
7409
+ ref,
7410
+ role: "alert",
7411
+ className: cn(
7412
+ "flex items-center justify-between overflow-hidden rounded-[4px] w-full",
7413
+ colorSet.bg,
7414
+ size === "sm" ? "h-10 px-3 py-2" : "h-12 px-8 py-3",
7415
+ className
7416
+ ),
7417
+ ...rest,
7418
+ children: [
7419
+ /* @__PURE__ */ jsxs("div", { className: cn("flex flex-1 items-center", size === "sm" ? "gap-2" : "gap-3"), children: [
7420
+ icon ? /* @__PURE__ */ jsx("span", { className: cn("shrink-0", iconSize4, textColor), children: resolveIcon(icon, size === "sm" ? "sm" : "md") }) : /* @__PURE__ */ jsx(InfoIcon, { className: cn("shrink-0", iconSize4, textColor) }),
7421
+ /* @__PURE__ */ jsx("span", { className: cn("font-semibold leading-[1.45] whitespace-nowrap", textSize2, textColor), children: title }),
7422
+ description && /* @__PURE__ */ jsx("span", { className: cn("leading-[1.45] whitespace-nowrap", textSize2, descColor), children: description }),
7423
+ buttonLabel && /* @__PURE__ */ jsx(
7424
+ "button",
7425
+ {
7426
+ type: "button",
7427
+ onClick: onButtonClick,
7428
+ className: cn(
7429
+ "shrink-0 font-semibold leading-[1.45] whitespace-nowrap cursor-pointer",
7430
+ textSize2,
7431
+ buttonColor,
7432
+ isBold && "text-white underline"
7433
+ ),
7434
+ children: buttonLabel
7435
+ }
7436
+ )
7437
+ ] }),
7438
+ dismissible && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 self-stretch shrink-0", children: [
7439
+ /* @__PURE__ */ jsx("div", { className: cn("w-px self-stretch", colorSet.divider) }),
7440
+ /* @__PURE__ */ jsx(
7441
+ "button",
7442
+ {
7443
+ type: "button",
7444
+ onClick: onDismiss,
7445
+ "aria-label": "Dismiss banner",
7446
+ className: cn("shrink-0 cursor-pointer", iconSize4, textColor),
7447
+ children: /* @__PURE__ */ jsx(CloseIcon, { className: "size-full" })
7448
+ }
7449
+ )
7450
+ ] })
7451
+ ]
7452
+ }
7453
+ );
7454
+ }
7455
+ );
7456
+ Banner.displayName = "Banner";
6171
7457
  var colorStyles = {
6172
7458
  orange: {
6173
7459
  filled: "bg-primary-400 text-white",
@@ -6221,21 +7507,21 @@ function Badge({
6221
7507
  ...rest
6222
7508
  }) {
6223
7509
  const colorClass = colorStyles[color][type];
6224
- const sizeConfig2 = sizeStyles[size];
7510
+ const sizeConfig3 = sizeStyles[size];
6225
7511
  return /* @__PURE__ */ jsxs(
6226
7512
  "span",
6227
7513
  {
6228
7514
  className: cn(
6229
7515
  "inline-flex items-center rounded-xl font-medium whitespace-nowrap",
6230
- sizeConfig2.container,
7516
+ sizeConfig3.container,
6231
7517
  colorClass,
6232
7518
  className
6233
7519
  ),
6234
7520
  ...rest,
6235
7521
  children: [
6236
- leadingIcon && /* @__PURE__ */ jsx("span", { className: cn("shrink-0", sizeConfig2.icon), children: resolveIcon(leadingIcon, "xs") }),
7522
+ leadingIcon && /* @__PURE__ */ jsx("span", { className: cn("shrink-0", sizeConfig3.icon), children: resolveIcon(leadingIcon, "xs") }),
6237
7523
  children,
6238
- trailingIcon && /* @__PURE__ */ jsx("span", { className: cn("shrink-0", sizeConfig2.icon), children: resolveIcon(trailingIcon, "xs") })
7524
+ trailingIcon && /* @__PURE__ */ jsx("span", { className: cn("shrink-0", sizeConfig3.icon), children: resolveIcon(trailingIcon, "xs") })
6239
7525
  ]
6240
7526
  }
6241
7527
  );
@@ -6470,7 +7756,7 @@ function Arrow({ position, theme }) {
6470
7756
  }
6471
7757
  ) });
6472
7758
  }
6473
- var Tooltip = forwardRef(
7759
+ var Tooltip2 = forwardRef(
6474
7760
  ({
6475
7761
  theme = "light",
6476
7762
  position = "top-left",
@@ -6557,7 +7843,7 @@ var Tooltip = forwardRef(
6557
7843
  );
6558
7844
  }
6559
7845
  );
6560
- Tooltip.displayName = "Tooltip";
7846
+ Tooltip2.displayName = "Tooltip";
6561
7847
  function range(start, end) {
6562
7848
  const arr = [];
6563
7849
  for (let i = start; i <= end; i++) arr.push(i);
@@ -6585,8 +7871,8 @@ function getPageNumbers(currentPage, totalPages, siblingCount) {
6585
7871
  const middleRange = range(leftSiblingIndex, rightSiblingIndex);
6586
7872
  return [1, "...", ...middleRange, "...", totalPages];
6587
7873
  }
6588
- var ChevronLeft = () => /* @__PURE__ */ jsx(Icon, { name: "chevron-left", size: "md" });
6589
- var ChevronRight = () => /* @__PURE__ */ jsx(Icon, { name: "chevron-right", size: "md" });
7874
+ var ChevronLeft2 = () => /* @__PURE__ */ jsx(Icon, { name: "chevron-left", size: "md" });
7875
+ var ChevronRight2 = () => /* @__PURE__ */ jsx(Icon, { name: "chevron-right", size: "md" });
6590
7876
  function Pagination({
6591
7877
  currentPage,
6592
7878
  totalPages,
@@ -6607,7 +7893,7 @@ function Pagination({
6607
7893
  className: "inline-flex items-center gap-2 rounded-lg border border-grey-300 bg-white dark:bg-grey-50 px-3 py-2 text-sm font-semibold text-grey-700 cursor-pointer hover:bg-grey-50 disabled:opacity-50 disabled:cursor-not-allowed",
6608
7894
  "aria-label": "Previous page",
6609
7895
  children: [
6610
- /* @__PURE__ */ jsx(ChevronLeft, {}),
7896
+ /* @__PURE__ */ jsx(ChevronLeft2, {}),
6611
7897
  /* @__PURE__ */ jsx("span", { children: "Previous" })
6612
7898
  ]
6613
7899
  }
@@ -6645,7 +7931,7 @@ function Pagination({
6645
7931
  "aria-label": "Next page",
6646
7932
  children: [
6647
7933
  /* @__PURE__ */ jsx("span", { children: "Next" }),
6648
- /* @__PURE__ */ jsx(ChevronRight, {})
7934
+ /* @__PURE__ */ jsx(ChevronRight2, {})
6649
7935
  ]
6650
7936
  }
6651
7937
  )
@@ -6782,35 +8068,72 @@ var Toggle = forwardRef(
6782
8068
  }
6783
8069
  );
6784
8070
  Toggle.displayName = "Toggle";
6785
- function Breadcrumb({ items, separator = "/", className, ...rest }) {
8071
+ function ChevronRight3({ className }) {
8072
+ return /* @__PURE__ */ jsx("svg", { className, viewBox: "0 0 20 20", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsx("path", { d: "M7.5 5l5 5-5 5" }) });
8073
+ }
8074
+ function DoubleChevronRight({ className }) {
8075
+ return /* @__PURE__ */ jsx("svg", { className, viewBox: "0 0 20 20", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsx("path", { d: "M5.5 5l5 5-5 5M10.5 5l5 5-5 5" }) });
8076
+ }
8077
+ function SeparatorElement({ type }) {
8078
+ switch (type) {
8079
+ case "chevron":
8080
+ return /* @__PURE__ */ jsx(ChevronRight3, { className: "size-5 text-grey-300" });
8081
+ case "double-chevron":
8082
+ return /* @__PURE__ */ jsx(DoubleChevronRight, { className: "size-5 text-grey-300" });
8083
+ case "slash":
8084
+ return /* @__PURE__ */ jsx("span", { className: "text-sm font-medium text-grey-300 w-4 text-center", children: "/" });
8085
+ }
8086
+ }
8087
+ function Breadcrumb({
8088
+ items,
8089
+ separator = "chevron",
8090
+ hasBorders = false,
8091
+ className,
8092
+ ...rest
8093
+ }) {
6786
8094
  return /* @__PURE__ */ jsx(
6787
8095
  "nav",
6788
8096
  {
6789
8097
  "aria-label": "Breadcrumb",
6790
- className: cn("border-y border-grey-200 px-4 py-2.5", className),
8098
+ className: cn(
8099
+ "py-2.5",
8100
+ hasBorders && "border-y border-grey-100",
8101
+ className
8102
+ ),
6791
8103
  ...rest,
6792
- children: /* @__PURE__ */ jsx("ol", { className: "flex items-center gap-2 text-sm", children: items.map((item, i) => /* @__PURE__ */ jsxs("li", { className: "flex items-center gap-2", children: [
6793
- i > 0 && /* @__PURE__ */ jsx("span", { className: "text-grey-400", "aria-hidden": true, children: separator }),
6794
- item.icon && /* @__PURE__ */ jsx("span", { className: "size-4 shrink-0", children: resolveIcon(item.icon, "sm") }),
6795
- item.href && !item.disabled && !item.active ? /* @__PURE__ */ jsx(
6796
- "a",
6797
- {
6798
- href: item.href,
6799
- className: cn("text-grey-500 hover:text-primary-300 transition-colors"),
6800
- children: item.label
6801
- }
6802
- ) : /* @__PURE__ */ jsx(
6803
- "span",
6804
- {
6805
- className: cn(
6806
- item.active && "text-primary-500 font-medium",
6807
- item.disabled && "text-grey-400 cursor-not-allowed",
6808
- !item.active && !item.disabled && "text-grey-500"
6809
- ),
6810
- "aria-current": item.active ? "page" : void 0,
6811
- children: item.label
6812
- }
6813
- )
8104
+ children: /* @__PURE__ */ jsx("ol", { className: "flex items-center gap-4 text-sm font-medium", children: items.map((item, i) => /* @__PURE__ */ jsxs("li", { className: "flex items-center gap-4", children: [
8105
+ i > 0 && /* @__PURE__ */ jsx("span", { "aria-hidden": true, children: /* @__PURE__ */ jsx(SeparatorElement, { type: separator }) }),
8106
+ /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-2", children: [
8107
+ item.icon && /* @__PURE__ */ jsx(
8108
+ "span",
8109
+ {
8110
+ className: cn(
8111
+ "size-5 shrink-0",
8112
+ item.active ? "text-primary-400" : item.disabled ? "text-grey-300" : "text-grey-500 group-hover:text-grey-700"
8113
+ ),
8114
+ children: resolveIcon(item.icon, "sm")
8115
+ }
8116
+ ),
8117
+ item.href && !item.disabled && !item.active ? /* @__PURE__ */ jsx(
8118
+ "a",
8119
+ {
8120
+ href: item.href,
8121
+ className: "text-grey-500 hover:text-grey-700 hover:underline transition-colors",
8122
+ children: item.label
8123
+ }
8124
+ ) : /* @__PURE__ */ jsx(
8125
+ "span",
8126
+ {
8127
+ className: cn(
8128
+ item.active && "text-primary-400",
8129
+ item.disabled && "text-grey-300 cursor-not-allowed",
8130
+ !item.active && !item.disabled && "text-grey-500"
8131
+ ),
8132
+ "aria-current": item.active ? "page" : void 0,
8133
+ children: item.label
8134
+ }
8135
+ )
8136
+ ] })
6814
8137
  ] }, i)) })
6815
8138
  }
6816
8139
  );
@@ -6831,7 +8154,7 @@ var initialsFontSize = {
6831
8154
  xl: "text-[18px] leading-[1.45]",
6832
8155
  "2xl": "text-[20px] leading-[1.2] tracking-[-0.4px]"
6833
8156
  };
6834
- var iconSize = {
8157
+ var iconSize3 = {
6835
8158
  xs: "xs",
6836
8159
  sm: "sm",
6837
8160
  md: "md",
@@ -6906,7 +8229,7 @@ var Avatar = forwardRef(
6906
8229
  ...rest,
6907
8230
  children: [
6908
8231
  type === "image" ? /* @__PURE__ */ jsx("div", { className: "absolute inset-0 rounded-full border-[1.5px] border-white overflow-hidden", children: src ? /* @__PURE__ */ jsx("img", { src, alt, className: "size-full object-cover rounded-full" }) : /* @__PURE__ */ jsx("div", { className: "size-full bg-grey-200 rounded-full" }) }) : /* @__PURE__ */ jsx("div", { className: "absolute inset-0 rounded-full bg-primary-50" }),
6909
- type === "icon" && /* @__PURE__ */ jsx("div", { className: "absolute inset-0 flex items-center justify-center text-grey-900", children: icon ? resolveIcon(icon, iconSize[size]) : /* @__PURE__ */ jsx(Icon, { name: "user", size: iconSize[size] }) }),
8232
+ type === "icon" && /* @__PURE__ */ jsx("div", { className: "absolute inset-0 flex items-center justify-center text-grey-900", children: icon ? resolveIcon(icon, iconSize3[size]) : /* @__PURE__ */ jsx(Icon, { name: "user", size: iconSize3[size] }) }),
6910
8233
  type === "initials" && /* @__PURE__ */ jsx(
6911
8234
  "div",
6912
8235
  {
@@ -6914,40 +8237,212 @@ var Avatar = forwardRef(
6914
8237
  "absolute inset-0 flex items-center justify-center font-semibold text-grey-900",
6915
8238
  initialsFontSize[size]
6916
8239
  ),
6917
- children: initials
8240
+ children: initials
8241
+ }
8242
+ ),
8243
+ /* @__PURE__ */ jsx(StatusIndicator, { status, size })
8244
+ ]
8245
+ }
8246
+ );
8247
+ }
8248
+ );
8249
+ Avatar.displayName = "Avatar";
8250
+ var groupAvatarSize = {
8251
+ sm: "xs",
8252
+ md: "sm",
8253
+ lg: "md"
8254
+ };
8255
+ var groupOverlap = {
8256
+ sm: "-ml-1.5",
8257
+ md: "-ml-1.5",
8258
+ lg: "-ml-[11px]"
8259
+ };
8260
+ var AvatarGroup = forwardRef(
8261
+ ({ size = "md", max, className, children, ...rest }, ref) => {
8262
+ const childArray = Children.toArray(children).filter(isValidElement);
8263
+ const avatarSize = groupAvatarSize[size];
8264
+ const overlap = groupOverlap[size];
8265
+ const visible = max ? childArray.slice(0, max) : childArray;
8266
+ const overflowCount = max ? childArray.length - max : 0;
8267
+ return /* @__PURE__ */ jsxs("div", { ref, className: cn("inline-flex items-center", className), ...rest, children: [
8268
+ visible.map((child, i) => /* @__PURE__ */ jsx("div", { className: cn(i > 0 && overlap, "relative"), children: isValidElement(child) ? cloneElement(child, { size: avatarSize, status: "none" }) : child }, i)),
8269
+ overflowCount > 0 && /* @__PURE__ */ jsx("div", { className: cn(overlap, "relative"), children: /* @__PURE__ */ jsx(Avatar, { type: "initials", size: avatarSize, initials: `+${overflowCount}` }) })
8270
+ ] });
8271
+ }
8272
+ );
8273
+ AvatarGroup.displayName = "AvatarGroup";
8274
+ function CloseIcon2({ className }) {
8275
+ return /* @__PURE__ */ jsx("svg", { className, viewBox: "0 0 12 12", fill: "none", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsx("path", { d: "M9 3L3 9M3 3l6 6" }) });
8276
+ }
8277
+ function BoxIcon({ className }) {
8278
+ return /* @__PURE__ */ jsxs("svg", { className, viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: 1.2, strokeLinecap: "round", strokeLinejoin: "round", children: [
8279
+ /* @__PURE__ */ jsx("path", { d: "M2.67 4.67L8 7.33l5.33-2.66M8 14V7.33" }),
8280
+ /* @__PURE__ */ jsx("path", { d: "M13.33 10.67V5.33a1.33 1.33 0 00-.66-1.15L8.67 2a1.33 1.33 0 00-1.34 0L3.33 4.18A1.33 1.33 0 002.67 5.33v5.34a1.33 1.33 0 00.66 1.15L7.33 14a1.33 1.33 0 001.34 0l4-2.18a1.33 1.33 0 00.66-1.15z" })
8281
+ ] });
8282
+ }
8283
+ var sizeClasses2 = {
8284
+ sm: "w-[400px]",
8285
+ md: "w-[500px]",
8286
+ lg: "w-[640px]"
8287
+ };
8288
+ var Modal = forwardRef(
8289
+ ({
8290
+ open,
8291
+ onClose,
8292
+ size = "sm",
8293
+ title,
8294
+ description,
8295
+ icon,
8296
+ showClose = true,
8297
+ primaryLabel = "Save",
8298
+ onPrimaryClick,
8299
+ secondaryLabel,
8300
+ onSecondaryClick,
8301
+ footerOrientation = "horizontal",
8302
+ closeOnOverlay = true,
8303
+ closeOnEscape = true,
8304
+ blur = true,
8305
+ children,
8306
+ className,
8307
+ ...rest
8308
+ }, ref) => {
8309
+ const overlayRef = useRef(null);
8310
+ useEffect(() => {
8311
+ if (!open || !closeOnEscape) return;
8312
+ const handler = (e) => {
8313
+ if (e.key === "Escape") onClose();
8314
+ };
8315
+ document.addEventListener("keydown", handler);
8316
+ return () => document.removeEventListener("keydown", handler);
8317
+ }, [open, closeOnEscape, onClose]);
8318
+ useEffect(() => {
8319
+ if (!open) return;
8320
+ const prev = document.body.style.overflow;
8321
+ document.body.style.overflow = "hidden";
8322
+ return () => {
8323
+ document.body.style.overflow = prev;
8324
+ };
8325
+ }, [open]);
8326
+ const handleOverlayClick = useCallback(
8327
+ (e) => {
8328
+ if (closeOnOverlay && e.target === overlayRef.current) onClose();
8329
+ },
8330
+ [closeOnOverlay, onClose]
8331
+ );
8332
+ if (!open) return null;
8333
+ const isVertical = footerOrientation === "vertical";
8334
+ const modal = /* @__PURE__ */ jsxs(
8335
+ "div",
8336
+ {
8337
+ ref: overlayRef,
8338
+ className: cn(
8339
+ "fixed inset-0 z-50 flex items-center justify-center",
8340
+ blur && "backdrop-blur-md"
8341
+ ),
8342
+ onClick: handleOverlayClick,
8343
+ role: "presentation",
8344
+ children: [
8345
+ /* @__PURE__ */ jsx("div", { className: "absolute inset-0 bg-black/60" }),
8346
+ /* @__PURE__ */ jsxs(
8347
+ "div",
8348
+ {
8349
+ ref,
8350
+ role: "dialog",
8351
+ "aria-modal": "true",
8352
+ "aria-labelledby": title ? "modal-title" : void 0,
8353
+ "aria-describedby": description ? "modal-desc" : void 0,
8354
+ className: cn(
8355
+ "relative flex flex-col bg-white dark:bg-grey-50 rounded-xl shadow-soft-xl overflow-hidden",
8356
+ sizeClasses2[size],
8357
+ className
8358
+ ),
8359
+ ...rest,
8360
+ children: [
8361
+ (title || showClose) && /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-2 pt-5 pb-2 px-4", children: [
8362
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-1 gap-4 items-start min-w-0", children: [
8363
+ icon !== void 0 ? /* @__PURE__ */ jsx("span", { className: "shrink-0 flex items-center justify-center p-2.5 bg-primary-50 rounded-[20px]", children: /* @__PURE__ */ jsx("span", { className: "size-4", children: icon }) }) : title ? /* @__PURE__ */ jsx("span", { className: "shrink-0 flex items-center justify-center p-2.5 bg-primary-50 rounded-[20px]", children: /* @__PURE__ */ jsx(BoxIcon, { className: "size-4 text-primary-400" }) }) : null,
8364
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col flex-1 min-w-0", children: [
8365
+ title && /* @__PURE__ */ jsx(
8366
+ "h2",
8367
+ {
8368
+ id: "modal-title",
8369
+ className: "text-xl font-semibold text-grey-700 leading-[1.2] tracking-[-0.4px]",
8370
+ children: title
8371
+ }
8372
+ ),
8373
+ description && /* @__PURE__ */ jsx("p", { id: "modal-desc", className: "text-sm text-grey-500 leading-[1.45]", children: description })
8374
+ ] })
8375
+ ] }),
8376
+ showClose && /* @__PURE__ */ jsx(
8377
+ "button",
8378
+ {
8379
+ type: "button",
8380
+ onClick: onClose,
8381
+ "aria-label": "Close modal",
8382
+ className: "shrink-0 flex items-center justify-center p-1.5 bg-grey-75 rounded-xl hover:bg-grey-200 transition-colors cursor-pointer",
8383
+ children: /* @__PURE__ */ jsx(CloseIcon2, { className: "size-3" })
8384
+ }
8385
+ )
8386
+ ] }),
8387
+ children && /* @__PURE__ */ jsx("div", { className: "flex-1 px-4 py-4 overflow-y-auto", children }),
8388
+ (primaryLabel || secondaryLabel) && /* @__PURE__ */ jsx(
8389
+ "div",
8390
+ {
8391
+ className: cn(
8392
+ "py-5",
8393
+ isVertical ? "flex flex-col gap-5 items-center px-4" : "flex items-center justify-end gap-3 px-4"
8394
+ ),
8395
+ children: isVertical ? /* @__PURE__ */ jsxs(Fragment, { children: [
8396
+ /* @__PURE__ */ jsx(
8397
+ "button",
8398
+ {
8399
+ type: "button",
8400
+ onClick: onPrimaryClick,
8401
+ className: "w-full bg-primary-400 text-white text-sm font-semibold p-2 rounded-xl hover:bg-primary-500 transition-colors cursor-pointer",
8402
+ children: primaryLabel
8403
+ }
8404
+ ),
8405
+ secondaryLabel && /* @__PURE__ */ jsx(
8406
+ "button",
8407
+ {
8408
+ type: "button",
8409
+ onClick: onSecondaryClick ?? onClose,
8410
+ className: "w-full border-[1.5px] border-primary-400 text-primary-400 text-sm font-semibold p-2 rounded-xl hover:bg-primary-50 transition-colors cursor-pointer",
8411
+ children: secondaryLabel
8412
+ }
8413
+ )
8414
+ ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
8415
+ secondaryLabel && /* @__PURE__ */ jsx(
8416
+ "button",
8417
+ {
8418
+ type: "button",
8419
+ onClick: onSecondaryClick ?? onClose,
8420
+ className: "flex-1 border-[1.5px] border-primary-400 text-primary-400 text-sm font-semibold p-2 rounded-xl hover:bg-primary-50 transition-colors cursor-pointer",
8421
+ children: secondaryLabel
8422
+ }
8423
+ ),
8424
+ /* @__PURE__ */ jsx(
8425
+ "button",
8426
+ {
8427
+ type: "button",
8428
+ onClick: onPrimaryClick,
8429
+ className: "flex-1 bg-primary-400 text-white text-sm font-semibold p-2 rounded-xl hover:bg-primary-500 transition-colors cursor-pointer",
8430
+ children: primaryLabel
8431
+ }
8432
+ )
8433
+ ] })
8434
+ }
8435
+ )
8436
+ ]
6918
8437
  }
6919
- ),
6920
- /* @__PURE__ */ jsx(StatusIndicator, { status, size })
8438
+ )
6921
8439
  ]
6922
8440
  }
6923
8441
  );
8442
+ return createPortal(modal, document.body);
6924
8443
  }
6925
8444
  );
6926
- Avatar.displayName = "Avatar";
6927
- var groupAvatarSize = {
6928
- sm: "xs",
6929
- md: "sm",
6930
- lg: "md"
6931
- };
6932
- var groupOverlap = {
6933
- sm: "-ml-1.5",
6934
- md: "-ml-1.5",
6935
- lg: "-ml-[11px]"
6936
- };
6937
- var AvatarGroup = forwardRef(
6938
- ({ size = "md", max, className, children, ...rest }, ref) => {
6939
- const childArray = Children.toArray(children).filter(isValidElement);
6940
- const avatarSize = groupAvatarSize[size];
6941
- const overlap = groupOverlap[size];
6942
- const visible = max ? childArray.slice(0, max) : childArray;
6943
- const overflowCount = max ? childArray.length - max : 0;
6944
- return /* @__PURE__ */ jsxs("div", { ref, className: cn("inline-flex items-center", className), ...rest, children: [
6945
- visible.map((child, i) => /* @__PURE__ */ jsx("div", { className: cn(i > 0 && overlap, "relative"), children: isValidElement(child) ? cloneElement(child, { size: avatarSize, status: "none" }) : child }, i)),
6946
- overflowCount > 0 && /* @__PURE__ */ jsx("div", { className: cn(overlap, "relative"), children: /* @__PURE__ */ jsx(Avatar, { type: "initials", size: avatarSize, initials: `+${overflowCount}` }) })
6947
- ] });
6948
- }
6949
- );
6950
- AvatarGroup.displayName = "AvatarGroup";
8445
+ Modal.displayName = "Modal";
6951
8446
  var trendStyles = {
6952
8447
  up: "bg-primary-50 text-primary-700",
6953
8448
  down: "bg-error-50 text-error-700"
@@ -11623,6 +13118,564 @@ var DropdownMenuSeparator = forwardRef(
11623
13118
  ({ className, ...rest }, ref) => /* @__PURE__ */ jsx("div", { ref, role: "separator", className: cn("my-1 h-px bg-grey-100", className), ...rest })
11624
13119
  );
11625
13120
  DropdownMenuSeparator.displayName = "DropdownMenuSeparator";
13121
+ var sizeMap2 = {
13122
+ xs: 20,
13123
+ sm: 24,
13124
+ md: 32,
13125
+ lg: 40,
13126
+ xl: 48,
13127
+ "2xl": 56,
13128
+ "3xl": 64
13129
+ };
13130
+ function ThinSpinner({ size, color }) {
13131
+ const r = size / 2 - 2;
13132
+ const c = size / 2;
13133
+ return /* @__PURE__ */ jsxs("svg", { width: size, height: size, viewBox: `0 0 ${size} ${size}`, className: "animate-spin", children: [
13134
+ /* @__PURE__ */ jsx("circle", { cx: c, cy: c, r, fill: "none", stroke: "currentColor", strokeWidth: 1.5, opacity: 0.2, className: color }),
13135
+ /* @__PURE__ */ jsx("circle", { cx: c, cy: c, r, fill: "none", stroke: "currentColor", strokeWidth: 1.5, strokeDasharray: `${r * Math.PI * 0.75} ${r * Math.PI * 1.25}`, strokeLinecap: "round", className: color })
13136
+ ] });
13137
+ }
13138
+ function BoldSpinner({ size, color }) {
13139
+ const sw = Math.max(2.5, size * 0.1);
13140
+ const r = size / 2 - sw;
13141
+ const c = size / 2;
13142
+ return /* @__PURE__ */ jsxs("svg", { width: size, height: size, viewBox: `0 0 ${size} ${size}`, className: "animate-spin", children: [
13143
+ /* @__PURE__ */ jsx("circle", { cx: c, cy: c, r, fill: "none", stroke: "currentColor", strokeWidth: sw, opacity: 0.2, className: color }),
13144
+ /* @__PURE__ */ jsx("circle", { cx: c, cy: c, r, fill: "none", stroke: "currentColor", strokeWidth: sw, strokeDasharray: `${r * Math.PI * 0.75} ${r * Math.PI * 1.25}`, strokeLinecap: "round", className: color })
13145
+ ] });
13146
+ }
13147
+ function DuoToneSpinner({ size, color }) {
13148
+ const sw = Math.max(2, size * 0.08);
13149
+ const r = size / 2 - sw;
13150
+ const c = size / 2;
13151
+ return /* @__PURE__ */ jsxs("svg", { width: size, height: size, viewBox: `0 0 ${size} ${size}`, className: "animate-spin", children: [
13152
+ /* @__PURE__ */ jsx("circle", { cx: c, cy: c, r, fill: "none", stroke: "currentColor", strokeWidth: sw, opacity: 0.15, className: color }),
13153
+ /* @__PURE__ */ jsx("circle", { cx: c, cy: c, r, fill: "none", stroke: "currentColor", strokeWidth: sw, strokeDasharray: `${r * Math.PI} ${r * Math.PI}`, strokeLinecap: "round", className: color })
13154
+ ] });
13155
+ }
13156
+ function BufferingThinSpinner({ size, color }) {
13157
+ const r = size / 2 - 2;
13158
+ const c = size / 2;
13159
+ const circumference = 2 * Math.PI * r;
13160
+ return /* @__PURE__ */ jsxs("svg", { width: size, height: size, viewBox: `0 0 ${size} ${size}`, children: [
13161
+ /* @__PURE__ */ jsx("circle", { cx: c, cy: c, r, fill: "none", stroke: "currentColor", strokeWidth: 1.5, opacity: 0.2, className: color }),
13162
+ /* @__PURE__ */ jsx("circle", { cx: c, cy: c, r, fill: "none", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", className: cn(color, "animate-[spinner-dash_1.5s_ease-in-out_infinite]"), style: { strokeDasharray: circumference, transformOrigin: "center" } })
13163
+ ] });
13164
+ }
13165
+ function BufferingBoldSpinner({ size, color }) {
13166
+ const sw = Math.max(2.5, size * 0.1);
13167
+ const r = size / 2 - sw;
13168
+ const c = size / 2;
13169
+ const circumference = 2 * Math.PI * r;
13170
+ return /* @__PURE__ */ jsxs("svg", { width: size, height: size, viewBox: `0 0 ${size} ${size}`, children: [
13171
+ /* @__PURE__ */ jsx("circle", { cx: c, cy: c, r, fill: "none", stroke: "currentColor", strokeWidth: sw, opacity: 0.2, className: color }),
13172
+ /* @__PURE__ */ jsx("circle", { cx: c, cy: c, r, fill: "none", stroke: "currentColor", strokeWidth: sw, strokeLinecap: "round", className: cn(color, "animate-[spinner-dash_1.5s_ease-in-out_infinite]"), style: { strokeDasharray: circumference, transformOrigin: "center" } })
13173
+ ] });
13174
+ }
13175
+ function DotSpinner({ size, color }) {
13176
+ const dotSize = Math.max(3, size * 0.15);
13177
+ const c = size / 2;
13178
+ const r = size / 2 - dotSize;
13179
+ return /* @__PURE__ */ jsx("svg", { width: size, height: size, viewBox: `0 0 ${size} ${size}`, className: "animate-spin", children: [0, 1, 2, 3, 4, 5, 6, 7].map((i) => {
13180
+ const angle = i * 45 * Math.PI / 180;
13181
+ const x = c + r * Math.cos(angle);
13182
+ const y = c + r * Math.sin(angle);
13183
+ return /* @__PURE__ */ jsx("circle", { cx: x, cy: y, r: dotSize / 2, fill: "currentColor", opacity: 0.15 + i / 8 * 0.85, className: color }, i);
13184
+ }) });
13185
+ }
13186
+ function JugglingSpinner({ size, color }) {
13187
+ const dotSize = Math.max(3, size * 0.18);
13188
+ return /* @__PURE__ */ jsx("svg", { width: size, height: size, viewBox: `0 0 ${size} ${size}`, children: [0, 1, 2].map((i) => {
13189
+ const cx = size / 2 + (i - 1) * (size * 0.35);
13190
+ return /* @__PURE__ */ jsx("circle", { cx, cy: size / 2, r: dotSize / 2, fill: "currentColor", className: cn(color, "animate-[juggle_1.4s_ease-in-out_infinite]"), style: { animationDelay: `${i * 0.16}s` } }, i);
13191
+ }) });
13192
+ }
13193
+ var Spinner = forwardRef(
13194
+ ({
13195
+ type = "thin",
13196
+ size = "md",
13197
+ colorStyle = "brand",
13198
+ label,
13199
+ labelPosition = "after",
13200
+ className,
13201
+ ...rest
13202
+ }, ref) => {
13203
+ const px = sizeMap2[size];
13204
+ const color = colorStyle === "brand" ? "text-primary-400" : "text-white";
13205
+ const labelColor = colorStyle === "brand" ? "text-grey-900" : "text-white";
13206
+ const spinnerEl = (() => {
13207
+ switch (type) {
13208
+ case "thin":
13209
+ return /* @__PURE__ */ jsx(ThinSpinner, { size: px, color });
13210
+ case "bold":
13211
+ return /* @__PURE__ */ jsx(BoldSpinner, { size: px, color });
13212
+ case "duo-tone":
13213
+ return /* @__PURE__ */ jsx(DuoToneSpinner, { size: px, color });
13214
+ case "buffering-thin":
13215
+ return /* @__PURE__ */ jsx(BufferingThinSpinner, { size: px, color });
13216
+ case "buffering-bold":
13217
+ return /* @__PURE__ */ jsx(BufferingBoldSpinner, { size: px, color });
13218
+ case "dot":
13219
+ return /* @__PURE__ */ jsx(DotSpinner, { size: px, color });
13220
+ case "juggling":
13221
+ return /* @__PURE__ */ jsx(JugglingSpinner, { size: px, color });
13222
+ }
13223
+ })();
13224
+ const isVertical = labelPosition === "above" || labelPosition === "below";
13225
+ const isReversed = labelPosition === "before" || labelPosition === "above";
13226
+ return /* @__PURE__ */ jsxs(
13227
+ "div",
13228
+ {
13229
+ ref,
13230
+ role: "status",
13231
+ "aria-label": label || "Loading",
13232
+ className: cn(
13233
+ "inline-flex items-center gap-2",
13234
+ isVertical && "flex-col",
13235
+ isReversed && (isVertical ? "flex-col-reverse" : "flex-row-reverse"),
13236
+ className
13237
+ ),
13238
+ ...rest,
13239
+ children: [
13240
+ /* @__PURE__ */ jsx("div", { className: "shrink-0", style: { width: px, height: px }, children: spinnerEl }),
13241
+ label && /* @__PURE__ */ jsx("span", { className: cn("text-sm leading-[1.45] whitespace-nowrap", labelColor), children: label })
13242
+ ]
13243
+ }
13244
+ );
13245
+ }
13246
+ );
13247
+ Spinner.displayName = "Spinner";
13248
+ function CheckIcon({ className }) {
13249
+ return /* @__PURE__ */ jsx("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 3, strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsx("path", { d: "M5 12l5 5L20 7" }) });
13250
+ }
13251
+ function StepCircle({
13252
+ status,
13253
+ indicator,
13254
+ stepNumber,
13255
+ icon
13256
+ }) {
13257
+ const isCompleted = status === "completed";
13258
+ const isActive = status === "active";
13259
+ const isDisabled = status === "disabled";
13260
+ return /* @__PURE__ */ jsx(
13261
+ "div",
13262
+ {
13263
+ className: cn(
13264
+ "shrink-0 flex items-center justify-center rounded-full size-6 border transition-colors",
13265
+ isCompleted && "bg-primary-400 border-primary-400 text-white",
13266
+ isActive && "bg-primary-50 border-primary-400 text-primary-400",
13267
+ !isCompleted && !isActive && !isDisabled && "bg-white dark:bg-grey-50 border-grey-300",
13268
+ isDisabled && "bg-grey-100 border-grey-200 text-grey-300"
13269
+ ),
13270
+ children: isCompleted ? icon ?? /* @__PURE__ */ jsx(CheckIcon, { className: "size-3.5" }) : indicator === "dot" ? /* @__PURE__ */ jsx(
13271
+ "div",
13272
+ {
13273
+ className: cn(
13274
+ "size-2 rounded-full border",
13275
+ isActive ? "bg-primary-400 border-primary-400" : isDisabled ? "bg-grey-300 border-grey-300" : "bg-grey-400 border-grey-300"
13276
+ )
13277
+ }
13278
+ ) : indicator === "number" ? /* @__PURE__ */ jsx("span", { className: cn("text-xs font-medium", isActive ? "text-primary-400" : isDisabled ? "text-grey-300" : "text-grey-500"), children: stepNumber }) : icon ?? /* @__PURE__ */ jsx(
13279
+ "div",
13280
+ {
13281
+ className: cn(
13282
+ "size-2 rounded-full",
13283
+ isActive ? "bg-primary-400" : isDisabled ? "bg-grey-300" : "bg-grey-400"
13284
+ )
13285
+ }
13286
+ )
13287
+ }
13288
+ );
13289
+ }
13290
+ function Connector({
13291
+ orientation,
13292
+ completed
13293
+ }) {
13294
+ return orientation === "horizontal" ? /* @__PURE__ */ jsx("div", { className: cn("flex-1 h-0.5 rounded-full", completed ? "bg-primary-400" : "bg-grey-300") }) : /* @__PURE__ */ jsx("div", { className: cn("w-0.5 flex-1 min-h-[20px] ml-[11px] rounded-full", completed ? "bg-primary-400" : "bg-grey-300") });
13295
+ }
13296
+ function resolveStatuses(steps, activeStep) {
13297
+ if (activeStep !== void 0) {
13298
+ return steps.map((s, i) => {
13299
+ if (s.status === "disabled") return "disabled";
13300
+ if (i < activeStep) return "completed";
13301
+ if (i === activeStep) return "active";
13302
+ return "incomplete";
13303
+ });
13304
+ }
13305
+ return steps.map((s) => s.status ?? "incomplete");
13306
+ }
13307
+ var Stepper = forwardRef(
13308
+ ({
13309
+ steps,
13310
+ activeStep,
13311
+ orientation = "horizontal",
13312
+ indicator = "dot",
13313
+ className,
13314
+ ...rest
13315
+ }, ref) => {
13316
+ const statuses = resolveStatuses(steps, activeStep);
13317
+ if (orientation === "vertical") {
13318
+ return /* @__PURE__ */ jsx("div", { ref, className: cn("flex flex-col", className), ...rest, children: steps.map((step, i) => {
13319
+ const status = statuses[i];
13320
+ const isLast = i === steps.length - 1;
13321
+ return /* @__PURE__ */ jsxs("div", { className: "flex gap-3", children: [
13322
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center", children: [
13323
+ /* @__PURE__ */ jsx(StepCircle, { status, indicator, stepNumber: i + 1, icon: step.icon }),
13324
+ !isLast && /* @__PURE__ */ jsx(Connector, { orientation: "vertical", completed: status === "completed" })
13325
+ ] }),
13326
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col pb-6", children: [
13327
+ /* @__PURE__ */ jsx(
13328
+ "span",
13329
+ {
13330
+ className: cn(
13331
+ "text-sm font-medium leading-[1.45]",
13332
+ status === "active" ? "text-grey-900" : status === "disabled" ? "text-grey-300" : "text-grey-600"
13333
+ ),
13334
+ children: step.title
13335
+ }
13336
+ ),
13337
+ step.description && /* @__PURE__ */ jsx("span", { className: "text-xs text-grey-500 leading-[1.45]", children: step.description })
13338
+ ] })
13339
+ ] }, i);
13340
+ }) });
13341
+ }
13342
+ return /* @__PURE__ */ jsx("div", { ref, className: cn("flex items-start w-full", className), ...rest, children: steps.map((step, i) => {
13343
+ const status = statuses[i];
13344
+ const isLast = i === steps.length - 1;
13345
+ return /* @__PURE__ */ jsxs("div", { className: "flex flex-col flex-1 items-center gap-2.5", children: [
13346
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 w-full", children: [
13347
+ /* @__PURE__ */ jsx(Connector, { orientation: "horizontal", completed: i > 0 && statuses[i - 1] === "completed" }),
13348
+ /* @__PURE__ */ jsx(StepCircle, { status, indicator, stepNumber: i + 1, icon: step.icon }),
13349
+ /* @__PURE__ */ jsx(Connector, { orientation: "horizontal", completed: !isLast && status === "completed" })
13350
+ ] }),
13351
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-0.5 text-center w-full", children: [
13352
+ /* @__PURE__ */ jsx(
13353
+ "span",
13354
+ {
13355
+ className: cn(
13356
+ "text-xs font-medium leading-[1.45] tracking-tight",
13357
+ status === "active" ? "text-grey-700" : status === "disabled" ? "text-grey-300" : "text-grey-600"
13358
+ ),
13359
+ children: step.title
13360
+ }
13361
+ ),
13362
+ step.description && /* @__PURE__ */ jsx("span", { className: "text-xs text-grey-500 leading-[1.45] truncate", children: step.description })
13363
+ ] })
13364
+ ] }, i);
13365
+ }) });
13366
+ }
13367
+ );
13368
+ Stepper.displayName = "Stepper";
13369
+ var LinearStepper = forwardRef(
13370
+ ({ currentStep, totalSteps, showLabel = true, className, ...rest }, ref) => {
13371
+ const pct = Math.min(100, Math.max(0, currentStep / totalSteps * 100));
13372
+ return /* @__PURE__ */ jsxs("div", { ref, className: cn("flex flex-col gap-2 w-full", className), ...rest, children: [
13373
+ showLabel && /* @__PURE__ */ jsxs("p", { className: "text-sm font-semibold leading-[1.45]", children: [
13374
+ /* @__PURE__ */ jsx("span", { className: "text-grey-900", children: currentStep }),
13375
+ /* @__PURE__ */ jsxs("span", { className: "text-grey-400", children: [
13376
+ " / ",
13377
+ totalSteps,
13378
+ " complete"
13379
+ ] })
13380
+ ] }),
13381
+ /* @__PURE__ */ jsx("div", { className: "bg-grey-200 rounded-full p-1 w-full overflow-hidden", children: /* @__PURE__ */ jsx(
13382
+ "div",
13383
+ {
13384
+ className: "h-2 bg-primary-400 rounded-[10px] transition-all duration-300",
13385
+ style: { width: `${pct}%` }
13386
+ }
13387
+ ) })
13388
+ ] });
13389
+ }
13390
+ );
13391
+ LinearStepper.displayName = "LinearStepper";
13392
+ var SegmentedStepper = forwardRef(
13393
+ ({ currentStep, totalSteps, showLabel = true, className, ...rest }, ref) => {
13394
+ return /* @__PURE__ */ jsxs("div", { ref, className: cn("flex flex-col gap-2 w-full", className), ...rest, children: [
13395
+ showLabel && /* @__PURE__ */ jsxs("p", { className: "text-sm font-semibold leading-[1.45]", children: [
13396
+ /* @__PURE__ */ jsx("span", { className: "text-grey-900", children: currentStep }),
13397
+ /* @__PURE__ */ jsxs("span", { className: "text-grey-400", children: [
13398
+ " / ",
13399
+ totalSteps,
13400
+ " complete"
13401
+ ] })
13402
+ ] }),
13403
+ /* @__PURE__ */ jsx("div", { className: "bg-grey-200 rounded-full p-1 w-full overflow-hidden", children: /* @__PURE__ */ jsx("div", { className: "flex gap-1 h-2 w-full", children: Array.from({ length: totalSteps }, (_, i) => /* @__PURE__ */ jsx(
13404
+ "div",
13405
+ {
13406
+ className: cn(
13407
+ "flex-1 rounded-[14px] border border-grey-50 transition-colors",
13408
+ i < currentStep ? "bg-primary-400" : "bg-grey-50"
13409
+ )
13410
+ },
13411
+ i
13412
+ )) }) })
13413
+ ] });
13414
+ }
13415
+ );
13416
+ SegmentedStepper.displayName = "SegmentedStepper";
13417
+ var sizeConfig2 = {
13418
+ sm: { track: "h-1", handle: "size-3.5", handleSize: 14, border: "border-[2.333px]" },
13419
+ md: { track: "h-2", handle: "size-4", handleSize: 16, border: "border-[2.667px]" },
13420
+ lg: { track: "h-3", handle: "size-5", handleSize: 20, border: "border-[3.333px]" }
13421
+ };
13422
+ function clamp(val, min, max) {
13423
+ return Math.min(max, Math.max(min, val));
13424
+ }
13425
+ function getPercent(val, min, max) {
13426
+ return (val - min) / (max - min) * 100;
13427
+ }
13428
+ function getValueFromPosition(clientX, rect, min, max, step) {
13429
+ const pct = clamp((clientX - rect.left) / rect.width, 0, 1);
13430
+ const raw = min + pct * (max - min);
13431
+ const stepped = Math.round(raw / step) * step;
13432
+ return clamp(stepped, min, max);
13433
+ }
13434
+ var Slider = forwardRef(
13435
+ ({
13436
+ value: controlledValue,
13437
+ onChange,
13438
+ size = "lg",
13439
+ label,
13440
+ metadata,
13441
+ showPercentage = true,
13442
+ min = 0,
13443
+ max = 100,
13444
+ step = 1,
13445
+ disabled = false,
13446
+ className,
13447
+ ...rest
13448
+ }, ref) => {
13449
+ const [uncontrolled, setUncontrolled] = useState(0);
13450
+ const val = controlledValue ?? uncontrolled;
13451
+ const trackRef = useRef(null);
13452
+ const config = sizeConfig2[size];
13453
+ const pct = getPercent(val, min, max);
13454
+ const metaItems = Array.isArray(metadata) ? metadata : metadata ? [metadata] : [];
13455
+ const updateValue = useCallback(
13456
+ (clientX) => {
13457
+ if (disabled || !trackRef.current) return;
13458
+ const rect = trackRef.current.getBoundingClientRect();
13459
+ const v = getValueFromPosition(clientX, rect, min, max, step);
13460
+ if (controlledValue === void 0) setUncontrolled(v);
13461
+ onChange?.(v);
13462
+ },
13463
+ [disabled, min, max, step, controlledValue, onChange]
13464
+ );
13465
+ const handlePointerDown = useCallback(
13466
+ (e) => {
13467
+ if (disabled) return;
13468
+ e.preventDefault();
13469
+ e.target.setPointerCapture(e.pointerId);
13470
+ updateValue(e.clientX);
13471
+ },
13472
+ [disabled, updateValue]
13473
+ );
13474
+ const handlePointerMove = useCallback(
13475
+ (e) => {
13476
+ if (disabled || !e.buttons) return;
13477
+ updateValue(e.clientX);
13478
+ },
13479
+ [disabled, updateValue]
13480
+ );
13481
+ return /* @__PURE__ */ jsxs(
13482
+ "div",
13483
+ {
13484
+ ref,
13485
+ className: cn("flex flex-col gap-2 w-full", disabled && "opacity-50", className),
13486
+ ...rest,
13487
+ children: [
13488
+ label && /* @__PURE__ */ jsx("span", { className: "text-sm font-medium text-grey-900 leading-[1.45]", children: label }),
13489
+ /* @__PURE__ */ jsxs(
13490
+ "div",
13491
+ {
13492
+ ref: trackRef,
13493
+ className: cn(
13494
+ "relative w-full rounded-full bg-grey-200 cursor-pointer",
13495
+ config.track,
13496
+ disabled && "cursor-not-allowed"
13497
+ ),
13498
+ onPointerDown: handlePointerDown,
13499
+ onPointerMove: handlePointerMove,
13500
+ role: "slider",
13501
+ "aria-valuenow": val,
13502
+ "aria-valuemin": min,
13503
+ "aria-valuemax": max,
13504
+ tabIndex: disabled ? -1 : 0,
13505
+ children: [
13506
+ /* @__PURE__ */ jsx(
13507
+ "div",
13508
+ {
13509
+ className: cn("absolute left-0 top-0 rounded-full bg-primary-400", config.track),
13510
+ style: { width: `${pct}%` }
13511
+ }
13512
+ ),
13513
+ /* @__PURE__ */ jsx(
13514
+ "div",
13515
+ {
13516
+ className: cn(
13517
+ "absolute top-1/2 -translate-y-1/2 rounded-full bg-primary-500 border-white border-solid shadow-sm",
13518
+ config.handle,
13519
+ config.border
13520
+ ),
13521
+ style: { left: `${pct}%`, transform: `translate(-50%, -50%)` }
13522
+ }
13523
+ )
13524
+ ]
13525
+ }
13526
+ ),
13527
+ (metaItems.length > 0 || showPercentage) && /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
13528
+ metaItems.length > 0 && /* @__PURE__ */ jsx("div", { className: "flex flex-1 items-center gap-1", children: metaItems.map((item, i) => /* @__PURE__ */ jsxs("span", { className: "contents", children: [
13529
+ i > 0 && /* @__PURE__ */ jsx("span", { className: "text-xs text-grey-400", children: "\u2022" }),
13530
+ /* @__PURE__ */ jsx("span", { className: "text-sm font-medium text-grey-500 leading-[1.45]", children: item })
13531
+ ] }, i)) }),
13532
+ showPercentage && /* @__PURE__ */ jsxs("span", { className: "flex-1 text-sm font-semibold text-grey-500 text-right leading-[1.45]", children: [
13533
+ Math.round(pct),
13534
+ "%"
13535
+ ] })
13536
+ ] })
13537
+ ]
13538
+ }
13539
+ );
13540
+ }
13541
+ );
13542
+ Slider.displayName = "Slider";
13543
+ var RangeSlider = forwardRef(
13544
+ ({
13545
+ value: controlledValue,
13546
+ onChange,
13547
+ size = "lg",
13548
+ label,
13549
+ showLabels = true,
13550
+ min = 0,
13551
+ max = 100,
13552
+ step = 1,
13553
+ disabled = false,
13554
+ className,
13555
+ ...rest
13556
+ }, ref) => {
13557
+ const [uncontrolled, setUncontrolled] = useState([25, 75]);
13558
+ const val = controlledValue ?? uncontrolled;
13559
+ const trackRef = useRef(null);
13560
+ const dragging = useRef(null);
13561
+ const config = sizeConfig2[size];
13562
+ const lowPct = getPercent(val[0], min, max);
13563
+ const highPct = getPercent(val[1], min, max);
13564
+ const update = useCallback(
13565
+ (newVal) => {
13566
+ if (controlledValue === void 0) setUncontrolled(newVal);
13567
+ onChange?.(newVal);
13568
+ },
13569
+ [controlledValue, onChange]
13570
+ );
13571
+ const handlePointerDown = useCallback(
13572
+ (e) => {
13573
+ if (disabled || !trackRef.current) return;
13574
+ e.preventDefault();
13575
+ e.target.setPointerCapture(e.pointerId);
13576
+ const rect = trackRef.current.getBoundingClientRect();
13577
+ const v = getValueFromPosition(e.clientX, rect, min, max, step);
13578
+ const distLow = Math.abs(v - val[0]);
13579
+ const distHigh = Math.abs(v - val[1]);
13580
+ dragging.current = distLow <= distHigh ? "low" : "high";
13581
+ if (dragging.current === "low") {
13582
+ update([clamp(v, min, val[1]), val[1]]);
13583
+ } else {
13584
+ update([val[0], clamp(v, val[0], max)]);
13585
+ }
13586
+ },
13587
+ [disabled, min, max, step, val, update]
13588
+ );
13589
+ const handlePointerMove = useCallback(
13590
+ (e) => {
13591
+ if (disabled || !e.buttons || !trackRef.current || !dragging.current) return;
13592
+ const rect = trackRef.current.getBoundingClientRect();
13593
+ const v = getValueFromPosition(e.clientX, rect, min, max, step);
13594
+ if (dragging.current === "low") {
13595
+ update([clamp(v, min, val[1]), val[1]]);
13596
+ } else {
13597
+ update([val[0], clamp(v, val[0], max)]);
13598
+ }
13599
+ },
13600
+ [disabled, min, max, step, val, update]
13601
+ );
13602
+ const handlePointerUp = useCallback(() => {
13603
+ dragging.current = null;
13604
+ }, []);
13605
+ return /* @__PURE__ */ jsxs(
13606
+ "div",
13607
+ {
13608
+ ref,
13609
+ className: cn("flex flex-col gap-2 w-full", disabled && "opacity-50", className),
13610
+ ...rest,
13611
+ children: [
13612
+ label && /* @__PURE__ */ jsx("span", { className: "text-sm font-medium text-grey-900 leading-[1.45]", children: label }),
13613
+ /* @__PURE__ */ jsxs(
13614
+ "div",
13615
+ {
13616
+ ref: trackRef,
13617
+ className: cn(
13618
+ "relative w-full rounded-full bg-grey-200 cursor-pointer",
13619
+ config.track,
13620
+ disabled && "cursor-not-allowed"
13621
+ ),
13622
+ onPointerDown: handlePointerDown,
13623
+ onPointerMove: handlePointerMove,
13624
+ onPointerUp: handlePointerUp,
13625
+ role: "slider",
13626
+ "aria-valuenow": val[0],
13627
+ "aria-valuemin": min,
13628
+ "aria-valuemax": max,
13629
+ tabIndex: disabled ? -1 : 0,
13630
+ children: [
13631
+ /* @__PURE__ */ jsx(
13632
+ "div",
13633
+ {
13634
+ className: cn("absolute top-0 rounded-full bg-primary-400", config.track),
13635
+ style: { left: `${lowPct}%`, width: `${highPct - lowPct}%` }
13636
+ }
13637
+ ),
13638
+ /* @__PURE__ */ jsx(
13639
+ "div",
13640
+ {
13641
+ className: cn(
13642
+ "absolute top-1/2 rounded-full bg-primary-500 border-white border-solid shadow-sm z-10",
13643
+ config.handle,
13644
+ config.border
13645
+ ),
13646
+ style: { left: `${lowPct}%`, transform: `translate(-50%, -50%)` }
13647
+ }
13648
+ ),
13649
+ /* @__PURE__ */ jsx(
13650
+ "div",
13651
+ {
13652
+ className: cn(
13653
+ "absolute top-1/2 rounded-full bg-primary-500 border-white border-solid shadow-sm z-10",
13654
+ config.handle,
13655
+ config.border
13656
+ ),
13657
+ style: { left: `${highPct}%`, transform: `translate(-50%, -50%)` }
13658
+ }
13659
+ )
13660
+ ]
13661
+ }
13662
+ ),
13663
+ showLabels && /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
13664
+ /* @__PURE__ */ jsxs("span", { className: "text-sm font-medium text-grey-500 leading-[1.45]", children: [
13665
+ Math.round(getPercent(val[0], min, max)),
13666
+ "%"
13667
+ ] }),
13668
+ /* @__PURE__ */ jsxs("span", { className: "text-sm font-semibold text-grey-500 text-right leading-[1.45]", children: [
13669
+ Math.round(getPercent(val[1], min, max)),
13670
+ "%"
13671
+ ] })
13672
+ ] })
13673
+ ]
13674
+ }
13675
+ );
13676
+ }
13677
+ );
13678
+ RangeSlider.displayName = "RangeSlider";
11626
13679
  var SelectContext = createContext(null);
11627
13680
  function useSelectContext() {
11628
13681
  const ctx = useContext(SelectContext);
@@ -12280,4 +14333,4 @@ function useRaydenRadio({
12280
14333
  };
12281
14334
  }
12282
14335
 
12283
- export { ActivityContent, ActivityItem, Alert, Avatar, AvatarGroup, Badge, Breadcrumb, Button, ButtonGroup, ButtonGroupItem, Checkbox, Chip, Divider, DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, EmptyStateIllustration, FileUpload, FileUploadDropZone, FileUploadItem, Icon, Input, MetricsCard, Pagination, ProgressBar, ProgressCircle, Radio, Select, SelectOption, SidebarMenu, SidebarMenuItem, SidebarMenuSection, SidebarMenuSub, SidebarMenuSubItem, Tab, Table, TableBody, TableCell, TableHead, TableHeader, TableRow, Tabs, ThemeProvider, Toggle, Tooltip, cn, illustrationNames, useRaydenCheckbox, useRaydenInput, useRaydenRadio, useRaydenSelect, useRaydenToggle, useResolvedTheme, useTheme };
14336
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, ActivityContent, ActivityItem, Alert, Avatar, AvatarGroup, Badge, Banner, Breadcrumb, Button, ButtonGroup, ButtonGroupItem, Checkbox, Chip, Counter, DatePicker, Divider, DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, EmptyStateIllustration, FileUpload, FileUploadDropZone, FileUploadItem, Icon, Input, LinearStepper, MetricsCard, Modal, NumberCounter, Pagination, ProgressBar, ProgressCircle, Radio, RangeSlider, RaydenChart, SegmentedStepper, Select, SelectOption, SidebarMenu, SidebarMenuItem, SidebarMenuSection, SidebarMenuSub, SidebarMenuSubItem, Slider, Spinner, Stepper, Tab, Table, TableBody, TableCell, TableHead, TableHeader, TableRow, Tabs, ThemeProvider, Toggle, Tooltip2 as Tooltip, chartColors, chartFont, cn, createGradientFill, hexToRgba, illustrationNames, useRaydenCheckbox, useRaydenInput, useRaydenRadio, useRaydenSelect, useRaydenToggle, useResolvedTheme, useTheme };