@raydenui/ui 0.7.0 → 0.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/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,167 @@ 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("w-full", type === "nested" && "flex flex-col gap-3", className),
5711
+ ...rest,
5712
+ children
5713
+ }
5714
+ ) });
5715
+ }
5716
+ );
5717
+ Accordion.displayName = "Accordion";
5718
+ var AccordionItem = forwardRef(
5719
+ ({ value, disabled = false, className, children, ...rest }, ref) => {
5720
+ const { type, openItems } = useAccordionContext();
5721
+ const isOpen = openItems.includes(value);
5722
+ const generatedId = useId();
5723
+ const triggerId = `accordion-trigger-${generatedId}`;
5724
+ const contentId = `accordion-content-${generatedId}`;
5725
+ return /* @__PURE__ */ jsx(AccordionItemContext.Provider, { value: { value, isOpen, disabled, triggerId, contentId }, children: /* @__PURE__ */ jsx(
5726
+ "div",
5727
+ {
5728
+ ref,
5729
+ className: cn(
5730
+ "border-solid transition-colors",
5731
+ type === "default" ? cn("border-b", isOpen ? "border-primary-300" : "border-grey-100") : cn("border rounded-[10px]", isOpen ? "border-primary-300" : "border-grey-75"),
5732
+ className
5733
+ ),
5734
+ ...rest,
5735
+ children
5736
+ }
5737
+ ) });
5738
+ }
5739
+ );
5740
+ AccordionItem.displayName = "AccordionItem";
5741
+ var AccordionTrigger = forwardRef(
5742
+ ({
5743
+ leadingIcon,
5744
+ leadingNumber,
5745
+ leadingLogo,
5746
+ badge,
5747
+ hideChevron = false,
5748
+ className,
5749
+ children,
5750
+ ...rest
5751
+ }, ref) => {
5752
+ const { toggle } = useAccordionContext();
5753
+ const { value, isOpen, disabled, triggerId, contentId } = useAccordionItemContext();
5754
+ return /* @__PURE__ */ jsxs(
5755
+ "button",
5756
+ {
5757
+ ref,
5758
+ id: triggerId,
5759
+ type: "button",
5760
+ disabled,
5761
+ "aria-expanded": isOpen,
5762
+ "aria-controls": contentId,
5763
+ onClick: () => toggle(value),
5764
+ className: cn(
5765
+ "flex items-center gap-3 px-4 py-6 w-full text-left transition-colors",
5766
+ !isOpen && !disabled && "hover:bg-grey-50",
5767
+ disabled && "opacity-50 cursor-not-allowed",
5768
+ className
5769
+ ),
5770
+ ...rest,
5771
+ children: [
5772
+ 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 }),
5773
+ leadingLogo && /* @__PURE__ */ jsx("span", { className: "shrink-0", children: leadingLogo }),
5774
+ leadingIcon && /* @__PURE__ */ jsx("span", { className: "shrink-0 size-6 text-grey-500", children: resolveIcon(leadingIcon, "md") }),
5775
+ /* @__PURE__ */ jsx("span", { className: "flex-1 min-w-0 text-lg font-semibold text-grey-900 leading-[1.54]", children }),
5776
+ 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 }),
5777
+ !hideChevron && /* @__PURE__ */ jsx(
5778
+ ChevronDown,
5779
+ {
5780
+ className: cn(
5781
+ "shrink-0 size-6 text-grey-500 transition-transform duration-200",
5782
+ isOpen && "rotate-180"
5783
+ )
5784
+ }
5785
+ )
5786
+ ]
5787
+ }
5788
+ );
5789
+ }
5790
+ );
5791
+ AccordionTrigger.displayName = "AccordionTrigger";
5792
+ var AccordionContent = forwardRef(
5793
+ ({ className, children, ...rest }, ref) => {
5794
+ const { isOpen, triggerId, contentId } = useAccordionItemContext();
5795
+ return /* @__PURE__ */ jsx(
5796
+ "div",
5797
+ {
5798
+ ref,
5799
+ id: contentId,
5800
+ role: "region",
5801
+ "aria-labelledby": triggerId,
5802
+ className: cn(
5803
+ "grid transition-[grid-template-rows] duration-200 ease-out",
5804
+ isOpen ? "grid-rows-[1fr]" : "grid-rows-[0fr]"
5805
+ ),
5806
+ children: /* @__PURE__ */ jsx("div", { className: "overflow-hidden", children: /* @__PURE__ */ jsx(
5807
+ "div",
5808
+ {
5809
+ className: cn("px-4 pb-6 text-base text-grey-500 leading-[1.48]", className),
5810
+ ...rest,
5811
+ children
5812
+ }
5813
+ ) })
5814
+ }
5815
+ );
5816
+ }
5817
+ );
5818
+ AccordionContent.displayName = "AccordionContent";
5655
5819
  var solidVariants = {
5656
5820
  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
5821
  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 +5863,7 @@ var Button = forwardRef(
5699
5863
  ...rest
5700
5864
  }, ref) => {
5701
5865
  const variantClasses = appearance === "outlined" ? outlinedVariants[variant] : solidVariants[variant];
5702
- const sizeConfig2 = sizeClasses[size];
5866
+ const sizeConfig3 = sizeClasses[size];
5703
5867
  const paddingKey = iconPosition === "icon-only" ? "icon-only" : iconPosition !== "none" ? "icon" : "none";
5704
5868
  const iconSizeClass = size === "sm" ? "size-5" : "size-6";
5705
5869
  const resolvedIcon = resolveIcon(icon, size === "sm" ? "md" : "lg");
@@ -5710,8 +5874,8 @@ var Button = forwardRef(
5710
5874
  disabled,
5711
5875
  className: cn(
5712
5876
  "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],
5877
+ sizeConfig3.base,
5878
+ sizeConfig3[paddingKey],
5715
5879
  variantClasses,
5716
5880
  className
5717
5881
  ),
@@ -5755,6 +5919,18 @@ var ButtonGroupItem = forwardRef(
5755
5919
  }
5756
5920
  );
5757
5921
  ButtonGroupItem.displayName = "ButtonGroupItem";
5922
+ var inputFrameSize = {
5923
+ xs: "px-2.5 py-2 gap-2",
5924
+ sm: "p-3 gap-3",
5925
+ md: "px-4 py-3 gap-3",
5926
+ lg: "px-4 py-3 gap-3"
5927
+ };
5928
+ var addonHeight = {
5929
+ xs: "",
5930
+ sm: "h-10",
5931
+ md: "h-12",
5932
+ lg: "h-14"
5933
+ };
5758
5934
  var Input = forwardRef(
5759
5935
  ({
5760
5936
  size = "sm",
@@ -5765,6 +5941,8 @@ var Input = forwardRef(
5765
5941
  leadingIcon,
5766
5942
  trailingIcon,
5767
5943
  addonRight,
5944
+ leadingAddon,
5945
+ trailingAddon,
5768
5946
  readOnly,
5769
5947
  disabled,
5770
5948
  className,
@@ -5777,21 +5955,101 @@ var Input = forwardRef(
5777
5955
  const inputId = id || generatedId;
5778
5956
  const hasError = !!error;
5779
5957
  const hasSuccess = !!success;
5958
+ const hasAddon = !!leadingAddon || !!trailingAddon;
5780
5959
  const bottomText = hasError ? typeof error === "string" ? error : void 0 : hasSuccess ? typeof success === "string" ? success : void 0 : helperText;
5781
5960
  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: [
5961
+ 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";
5962
+ const inputBg = readOnly ? "bg-grey-100" : disabled ? "bg-grey-50" : "bg-white dark:bg-grey-50";
5963
+ if (hasAddon) {
5964
+ return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col gap-1 w-full", wrapperClassName), children: [
5965
+ label && /* @__PURE__ */ jsx("label", { htmlFor: inputId, className: "text-sm font-medium text-grey-900 leading-[1.45]", children: label }),
5966
+ /* @__PURE__ */ jsxs("div", { className: cn("flex items-stretch", addonHeight[size]), children: [
5967
+ leadingAddon && /* @__PURE__ */ jsx(
5968
+ "div",
5969
+ {
5970
+ className: cn(
5971
+ "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",
5972
+ "text-sm font-medium text-grey-700"
5973
+ ),
5974
+ children: leadingAddon
5975
+ }
5976
+ ),
5977
+ /* @__PURE__ */ jsxs(
5978
+ "div",
5979
+ {
5980
+ className: cn(
5981
+ "flex flex-1 items-center border overflow-hidden transition-colors",
5982
+ inputFrameSize[size],
5983
+ inputBg,
5984
+ borderColor,
5985
+ !leadingAddon && !trailingAddon && "rounded-lg",
5986
+ leadingAddon && !trailingAddon && "rounded-r-lg",
5987
+ !leadingAddon && trailingAddon && "rounded-l-lg",
5988
+ leadingAddon && trailingAddon && "",
5989
+ disabled && "cursor-not-allowed"
5990
+ ),
5991
+ children: [
5992
+ leadingIcon && /* @__PURE__ */ jsx("span", { className: "shrink-0 size-6 text-grey-400", "aria-hidden": "true", children: resolveIcon(leadingIcon, "md") }),
5993
+ /* @__PURE__ */ jsx(
5994
+ "input",
5995
+ {
5996
+ ref,
5997
+ id: inputId,
5998
+ readOnly,
5999
+ disabled,
6000
+ required,
6001
+ "aria-invalid": hasError || void 0,
6002
+ "aria-required": required || void 0,
6003
+ "aria-describedby": descriptionId,
6004
+ className: cn(
6005
+ "flex-1 min-w-0 bg-transparent text-sm text-grey-900 placeholder:text-grey-400 outline-none disabled:cursor-not-allowed",
6006
+ className
6007
+ ),
6008
+ ...rest
6009
+ }
6010
+ ),
6011
+ addonRight && /* @__PURE__ */ jsx("span", { className: "shrink-0 text-sm text-grey-500", children: addonRight }),
6012
+ trailingIcon && /* @__PURE__ */ jsx("span", { className: "shrink-0 size-6 text-grey-400", "aria-hidden": "true", children: resolveIcon(trailingIcon, "md") })
6013
+ ]
6014
+ }
6015
+ ),
6016
+ trailingAddon && /* @__PURE__ */ jsx(
6017
+ "div",
6018
+ {
6019
+ className: cn(
6020
+ "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",
6021
+ "text-sm font-medium text-grey-700"
6022
+ ),
6023
+ children: trailingAddon
6024
+ }
6025
+ )
6026
+ ] }),
6027
+ bottomText && /* @__PURE__ */ jsx(
6028
+ "p",
6029
+ {
6030
+ id: descriptionId,
6031
+ className: cn(
6032
+ "text-sm leading-[1.45]",
6033
+ hasError ? "text-error-400" : hasSuccess ? "text-success-400" : "text-grey-500"
6034
+ ),
6035
+ children: bottomText
6036
+ }
6037
+ )
6038
+ ] });
6039
+ }
6040
+ return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col gap-1 w-full", wrapperClassName), children: [
5784
6041
  label && /* @__PURE__ */ jsx("label", { htmlFor: inputId, className: "text-sm font-medium text-grey-900 leading-[1.45]", children: label }),
5785
6042
  /* @__PURE__ */ jsxs(
5786
6043
  "div",
5787
6044
  {
5788
6045
  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",
6046
+ "flex items-center border rounded-lg overflow-hidden transition-colors",
6047
+ inputFrameSize[size],
6048
+ addonHeight[size],
5791
6049
  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
6050
  ),
5793
6051
  children: [
5794
- leadingIcon && /* @__PURE__ */ jsx("span", { className: "shrink-0 size-5 text-grey-400", children: resolveIcon(leadingIcon, "md") }),
6052
+ leadingIcon && /* @__PURE__ */ jsx("span", { className: "shrink-0 size-6 text-grey-400", "aria-hidden": "true", children: resolveIcon(leadingIcon, "md") }),
5795
6053
  /* @__PURE__ */ jsx(
5796
6054
  "input",
5797
6055
  {
@@ -5811,7 +6069,7 @@ var Input = forwardRef(
5811
6069
  }
5812
6070
  ),
5813
6071
  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") })
6072
+ trailingIcon && /* @__PURE__ */ jsx("span", { className: "shrink-0 size-6 text-grey-400", "aria-hidden": "true", children: resolveIcon(trailingIcon, "md") })
5815
6073
  ]
5816
6074
  }
5817
6075
  ),
@@ -5821,7 +6079,7 @@ var Input = forwardRef(
5821
6079
  id: descriptionId,
5822
6080
  className: cn(
5823
6081
  "text-sm leading-[1.45]",
5824
- hasError ? "text-error-500" : hasSuccess ? "text-success-600" : "text-grey-500"
6082
+ hasError ? "text-error-400" : hasSuccess ? "text-success-400" : "text-grey-500"
5825
6083
  ),
5826
6084
  children: bottomText
5827
6085
  }
@@ -5838,6 +6096,8 @@ function useTabsContext() {
5838
6096
  }
5839
6097
  function Tabs({
5840
6098
  variant = "line",
6099
+ size = "sm",
6100
+ orientation = "horizontal",
5841
6101
  value,
5842
6102
  defaultValue = "",
5843
6103
  onValueChange,
@@ -5861,17 +6121,20 @@ function Tabs({
5861
6121
  tabsRef.current.delete(tabValue);
5862
6122
  }
5863
6123
  }, []);
6124
+ const isVertical = orientation === "vertical";
6125
+ const arrowNext = isVertical ? "ArrowDown" : "ArrowRight";
6126
+ const arrowPrev = isVertical ? "ArrowUp" : "ArrowLeft";
5864
6127
  const handleKeyDown = (e) => {
5865
6128
  const tabs = Array.from(tabsRef.current.entries()).filter(([, el]) => !el.disabled).map(([val, el]) => ({ value: val, element: el }));
5866
6129
  if (tabs.length === 0) return;
5867
6130
  const currentIndex = tabs.findIndex((t) => t.element === document.activeElement);
5868
6131
  let nextIndex;
5869
6132
  switch (e.key) {
5870
- case "ArrowRight":
6133
+ case arrowNext:
5871
6134
  e.preventDefault();
5872
6135
  nextIndex = currentIndex < tabs.length - 1 ? currentIndex + 1 : 0;
5873
6136
  break;
5874
- case "ArrowLeft":
6137
+ case arrowPrev:
5875
6138
  e.preventDefault();
5876
6139
  nextIndex = currentIndex > 0 ? currentIndex - 1 : tabs.length - 1;
5877
6140
  break;
@@ -5893,31 +6156,93 @@ function Tabs({
5893
6156
  }
5894
6157
  };
5895
6158
  const contextValue = useMemo(
5896
- () => ({ activeValue, onSelect, variant, registerTab }),
5897
- [activeValue, onSelect, variant, registerTab]
6159
+ () => ({ activeValue, onSelect, variant, size, orientation, registerTab }),
6160
+ [activeValue, onSelect, variant, size, orientation, registerTab]
5898
6161
  );
5899
6162
  return /* @__PURE__ */ jsx(TabsContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx(
5900
6163
  "div",
5901
6164
  {
5902
6165
  className: cn(
5903
6166
  "inline-flex",
5904
- variant === "line" ? "border-b border-grey-200" : "gap-1",
6167
+ isVertical ? "flex-col" : "",
6168
+ variant === "line" && !isVertical && "border-b border-grey-200",
6169
+ variant === "line" && isVertical && "border-r border-grey-200",
6170
+ variant === "pill" && (isVertical ? "gap-1" : "gap-1"),
6171
+ variant === "segmented" && "border border-grey-100 rounded-lg p-0.5 gap-0.5 overflow-hidden",
5905
6172
  className
5906
6173
  ),
5907
6174
  role: "tablist",
6175
+ "aria-orientation": orientation,
5908
6176
  onKeyDown: handleKeyDown,
5909
6177
  children
5910
6178
  }
5911
6179
  ) });
5912
6180
  }
6181
+ var textSize = { sm: "text-xs", md: "text-sm", lg: "text-base" };
6182
+ var iconSize = { sm: "size-4", md: "size-5", lg: "size-6" };
6183
+ var iconResolveSize = { sm: "sm", md: "md", lg: "md" };
6184
+ var badgeText = { sm: "text-xs", md: "text-xs", lg: "text-sm" };
6185
+ var linePadding = {
6186
+ sm: "px-2 pt-1 pb-1.5",
6187
+ md: "px-3 pt-1.5 pb-2",
6188
+ lg: "px-4 pt-2 pb-2.5"
6189
+ };
6190
+ var pillPadding = {
6191
+ sm: "px-2 py-1",
6192
+ md: "px-3 py-1.5",
6193
+ lg: "px-4 py-2"
6194
+ };
6195
+ var segmentedPadding = {
6196
+ sm: "px-2 py-1",
6197
+ md: "px-3 py-1.5",
6198
+ lg: "px-4 py-2"
6199
+ };
5913
6200
  function Tab({ value, icon, badge, disabled = false, children, className }) {
5914
- const { activeValue, onSelect, variant, registerTab } = useTabsContext();
6201
+ const { activeValue, onSelect, variant, size, orientation, registerTab } = useTabsContext();
5915
6202
  const isActive = activeValue === value;
5916
6203
  const buttonRef = useRef(null);
6204
+ const isVertical = orientation === "vertical";
5917
6205
  useEffect(() => {
5918
6206
  registerTab(value, buttonRef.current);
5919
6207
  return () => registerTab(value, null);
5920
6208
  }, [value, registerTab]);
6209
+ const resolvedIcon = icon ? /* @__PURE__ */ jsx("span", { className: cn("shrink-0", iconSize[size]), children: resolveIcon(icon, iconResolveSize[size]) }) : null;
6210
+ const badgeEl = badge !== void 0 ? /* @__PURE__ */ jsx(
6211
+ "span",
6212
+ {
6213
+ className: cn(
6214
+ "inline-flex items-center justify-center px-1.5 rounded-full font-medium tracking-tight",
6215
+ badgeText[size],
6216
+ 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"
6217
+ ),
6218
+ children: badge
6219
+ }
6220
+ ) : null;
6221
+ if (variant === "segmented") {
6222
+ return /* @__PURE__ */ jsxs(
6223
+ "button",
6224
+ {
6225
+ ref: buttonRef,
6226
+ role: "tab",
6227
+ "aria-selected": isActive,
6228
+ tabIndex: isActive ? 0 : -1,
6229
+ disabled,
6230
+ onClick: () => !disabled && onSelect(value),
6231
+ className: cn(
6232
+ "inline-flex items-center gap-1.5 rounded-md overflow-hidden transition-colors cursor-pointer",
6233
+ segmentedPadding[size],
6234
+ textSize[size],
6235
+ isActive ? "bg-primary-50 text-grey-900" : disabled ? "text-grey-300 cursor-not-allowed" : "text-grey-500 hover:bg-grey-50",
6236
+ className
6237
+ ),
6238
+ children: [
6239
+ resolvedIcon,
6240
+ /* @__PURE__ */ jsx("span", { className: "font-normal leading-[1.45] whitespace-nowrap", children }),
6241
+ badgeEl
6242
+ ]
6243
+ }
6244
+ );
6245
+ }
5921
6246
  if (variant === "pill") {
5922
6247
  return /* @__PURE__ */ jsxs(
5923
6248
  "button",
@@ -5929,23 +6254,16 @@ function Tab({ value, icon, badge, disabled = false, children, className }) {
5929
6254
  disabled,
5930
6255
  onClick: () => !disabled && onSelect(value),
5931
6256
  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",
6257
+ "inline-flex items-center gap-1.5 rounded-full transition-colors cursor-pointer",
6258
+ pillPadding[size],
6259
+ textSize[size],
6260
+ isActive ? "bg-primary-50 text-primary-400" : disabled ? "text-grey-300 cursor-not-allowed" : "text-grey-500 hover:bg-grey-50",
5934
6261
  className
5935
6262
  ),
5936
6263
  children: [
5937
- icon && /* @__PURE__ */ jsx("span", { className: "shrink-0 size-4", children: resolveIcon(icon, "sm") }),
5938
- children,
5939
- badge !== void 0 && /* @__PURE__ */ jsx(
5940
- "span",
5941
- {
5942
- 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"
5945
- ),
5946
- children: badge
5947
- }
5948
- )
6264
+ resolvedIcon,
6265
+ /* @__PURE__ */ jsx("span", { className: "font-normal leading-[1.45] whitespace-nowrap", children }),
6266
+ badgeEl
5949
6267
  ]
5950
6268
  }
5951
6269
  );
@@ -5960,40 +6278,41 @@ function Tab({ value, icon, badge, disabled = false, children, className }) {
5960
6278
  disabled,
5961
6279
  onClick: () => !disabled && onSelect(value),
5962
6280
  className: cn(
5963
- "relative inline-flex flex-col items-center cursor-pointer",
6281
+ "relative inline-flex cursor-pointer",
6282
+ isVertical ? "flex-row" : "flex-col items-center",
5964
6283
  disabled && "cursor-not-allowed",
5965
6284
  className
5966
6285
  ),
5967
6286
  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") }),
6287
+ /* @__PURE__ */ jsxs("div", { className: cn("flex items-center gap-1.5", linePadding[size]), children: [
6288
+ resolvedIcon,
5970
6289
  /* @__PURE__ */ jsx(
5971
6290
  "span",
5972
6291
  {
5973
6292
  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"
6293
+ "font-normal leading-[1.45] whitespace-nowrap transition-colors",
6294
+ textSize[size],
6295
+ isActive ? "text-grey-900" : disabled ? "text-grey-300" : "text-grey-500"
5976
6296
  ),
5977
6297
  children
5978
6298
  }
5979
6299
  ),
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
- )
6300
+ badgeEl
5990
6301
  ] }),
5991
- /* @__PURE__ */ jsx(
6302
+ isVertical ? /* @__PURE__ */ jsx(
5992
6303
  "div",
5993
6304
  {
5994
6305
  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"
6306
+ "w-0.5 self-stretch transition-colors",
6307
+ isActive ? "bg-primary-400" : "bg-grey-100"
6308
+ )
6309
+ }
6310
+ ) : /* @__PURE__ */ jsx(
6311
+ "div",
6312
+ {
6313
+ className: cn(
6314
+ "h-0.5 w-full transition-colors",
6315
+ isActive ? "bg-primary-400" : "bg-grey-100"
5997
6316
  )
5998
6317
  }
5999
6318
  )
@@ -6001,56 +6320,318 @@ function Tab({ value, icon, badge, disabled = false, children, className }) {
6001
6320
  }
6002
6321
  );
6003
6322
  }
6004
- var Chip = forwardRef(
6323
+
6324
+ // src/components/Chart/theme.ts
6325
+ var chartColors = {
6326
+ primary: [
6327
+ "#F56630",
6328
+ // primary-400
6329
+ "#FA9874",
6330
+ // primary-200
6331
+ "#FCB59A",
6332
+ // primary-100
6333
+ "#FCD2C2",
6334
+ // primary-75
6335
+ "#FFECE5"
6336
+ // primary-50
6337
+ ],
6338
+ semantic: [
6339
+ "#F56630",
6340
+ // primary-400 (orange)
6341
+ "#0F973D",
6342
+ // success-400 (green)
6343
+ "#1671D9",
6344
+ // secondary-400 (blue)
6345
+ "#F3A218",
6346
+ // warning-400 (amber)
6347
+ "#D42620",
6348
+ // error-400 (red)
6349
+ "#0BA5EC"
6350
+ // info-400 (cyan)
6351
+ ],
6352
+ extended: [
6353
+ "#F56630",
6354
+ "#0F973D",
6355
+ "#1671D9",
6356
+ "#F3A218",
6357
+ "#D42620",
6358
+ "#0BA5EC",
6359
+ "#475CCC",
6360
+ // indigo
6361
+ "#8D8484",
6362
+ // office-brown
6363
+ "#F77A4A",
6364
+ // primary-300
6365
+ "#40B869"
6366
+ // success-300
6367
+ ],
6368
+ grey: {
6369
+ 50: "#F9FAFB",
6370
+ 100: "#F0F2F5",
6371
+ 200: "#E4E7EC",
6372
+ 300: "#D0D5DD",
6373
+ 400: "#98A2B3",
6374
+ 500: "#667185",
6375
+ 700: "#344054",
6376
+ 900: "#101928"
6377
+ }
6378
+ };
6379
+ var chartFont = {
6380
+ family: "'Inter', ui-sans-serif, system-ui, sans-serif",
6381
+ size: 12,
6382
+ weight: "normal"
6383
+ };
6384
+ function hexToRgba(hex, alpha) {
6385
+ const r = parseInt(hex.slice(1, 3), 16);
6386
+ const g = parseInt(hex.slice(3, 5), 16);
6387
+ const b = parseInt(hex.slice(5, 7), 16);
6388
+ return `rgba(${r}, ${g}, ${b}, ${alpha})`;
6389
+ }
6390
+ function createGradientFill(ctx, color, height) {
6391
+ const gradient = ctx.createLinearGradient(0, 0, 0, height);
6392
+ gradient.addColorStop(0, hexToRgba(color, 0.2));
6393
+ gradient.addColorStop(1, hexToRgba(color, 0.01));
6394
+ return gradient;
6395
+ }
6396
+ Chart.register(
6397
+ CategoryScale,
6398
+ LinearScale,
6399
+ PointElement,
6400
+ LineElement,
6401
+ BarElement,
6402
+ ArcElement,
6403
+ RadialLinearScale,
6404
+ Filler,
6405
+ Tooltip,
6406
+ Legend
6407
+ );
6408
+ function getDefaultOptions(type) {
6409
+ const base = {
6410
+ responsive: true,
6411
+ maintainAspectRatio: false,
6412
+ plugins: {
6413
+ legend: {
6414
+ display: true,
6415
+ position: "bottom",
6416
+ labels: {
6417
+ font: { ...chartFont, size: 12 },
6418
+ color: chartColors.grey[500],
6419
+ padding: 16,
6420
+ usePointStyle: true,
6421
+ pointStyle: "circle",
6422
+ boxWidth: 8,
6423
+ boxHeight: 8
6424
+ }
6425
+ },
6426
+ tooltip: {
6427
+ backgroundColor: chartColors.grey[900],
6428
+ titleFont: { ...chartFont, weight: "bold", size: 13 },
6429
+ bodyFont: { ...chartFont, size: 12 },
6430
+ cornerRadius: 8,
6431
+ padding: 12,
6432
+ boxPadding: 6,
6433
+ usePointStyle: true
6434
+ }
6435
+ }
6436
+ };
6437
+ if (type === "line" || type === "bar" || type === "scatter" || type === "bubble") {
6438
+ base.scales = {
6439
+ x: {
6440
+ grid: { color: chartColors.grey[100], drawTicks: false },
6441
+ ticks: { font: chartFont, color: chartColors.grey[400], padding: 8 },
6442
+ border: { display: false }
6443
+ },
6444
+ y: {
6445
+ grid: { color: chartColors.grey[100], drawTicks: false },
6446
+ ticks: { font: chartFont, color: chartColors.grey[400], padding: 8 },
6447
+ border: { display: false }
6448
+ }
6449
+ };
6450
+ }
6451
+ if (type === "line") {
6452
+ base.elements = {
6453
+ line: { tension: 0.4, borderWidth: 2 },
6454
+ point: { radius: 0, hoverRadius: 5, hitRadius: 20 }
6455
+ };
6456
+ }
6457
+ if (type === "bar") {
6458
+ base.elements = {
6459
+ bar: { borderRadius: 4 }
6460
+ };
6461
+ }
6462
+ if (type === "radar") {
6463
+ base.scales = {
6464
+ r: {
6465
+ grid: { color: chartColors.grey[200] },
6466
+ angleLines: { color: chartColors.grey[200] },
6467
+ pointLabels: { font: { ...chartFont, size: 11 }, color: chartColors.grey[500] },
6468
+ ticks: { display: false }
6469
+ }
6470
+ };
6471
+ }
6472
+ if (type === "polar-area") {
6473
+ base.scales = {
6474
+ r: {
6475
+ grid: { color: chartColors.grey[200] },
6476
+ ticks: { display: false }
6477
+ }
6478
+ };
6479
+ }
6480
+ return base;
6481
+ }
6482
+ function deepMerge(target, source) {
6483
+ const output = { ...target };
6484
+ for (const key of Object.keys(source)) {
6485
+ if (source[key] && typeof source[key] === "object" && !Array.isArray(source[key]) && target[key] && typeof target[key] === "object") {
6486
+ output[key] = deepMerge(target[key], source[key]);
6487
+ } else {
6488
+ output[key] = source[key];
6489
+ }
6490
+ }
6491
+ return output;
6492
+ }
6493
+ var chartComponentMap = {
6494
+ line: Line,
6495
+ bar: Bar,
6496
+ pie: Pie,
6497
+ doughnut: Doughnut,
6498
+ radar: Radar,
6499
+ scatter: Scatter,
6500
+ bubble: Bubble,
6501
+ "polar-area": PolarArea
6502
+ };
6503
+ var RaydenChart = forwardRef(
6504
+ ({ type, data, options, height = 300, width, className, ...rest }, ref) => {
6505
+ const mergedOptions = useMemo(
6506
+ () => deepMerge(getDefaultOptions(type), options ?? {}),
6507
+ [type, options]
6508
+ );
6509
+ const ChartComponent = chartComponentMap[type];
6510
+ return /* @__PURE__ */ jsx("div", { ref, className: cn("relative", className), style: { height, width }, ...rest, children: /* @__PURE__ */ jsx(ChartComponent, { data, options: mergedOptions }) });
6511
+ }
6512
+ );
6513
+ RaydenChart.displayName = "RaydenChart";
6514
+ function MinusIcon({ className }) {
6515
+ return /* @__PURE__ */ jsx(
6516
+ "svg",
6517
+ {
6518
+ className,
6519
+ viewBox: "0 0 24 24",
6520
+ fill: "none",
6521
+ stroke: "currentColor",
6522
+ strokeWidth: 2,
6523
+ strokeLinecap: "round",
6524
+ children: /* @__PURE__ */ jsx("path", { d: "M5 12h14" })
6525
+ }
6526
+ );
6527
+ }
6528
+ function PlusIcon({ className }) {
6529
+ return /* @__PURE__ */ jsx(
6530
+ "svg",
6531
+ {
6532
+ className,
6533
+ viewBox: "0 0 24 24",
6534
+ fill: "none",
6535
+ stroke: "currentColor",
6536
+ strokeWidth: 2,
6537
+ strokeLinecap: "round",
6538
+ children: /* @__PURE__ */ jsx("path", { d: "M12 5v14M5 12h14" })
6539
+ }
6540
+ );
6541
+ }
6542
+ var buttonSize = {
6543
+ sm: "size-8 rounded-[10px]",
6544
+ md: "size-10 rounded-xl",
6545
+ lg: "size-12 rounded-xl"
6546
+ };
6547
+ var iconSize2 = {
6548
+ sm: "size-4",
6549
+ md: "size-5",
6550
+ lg: "size-6"
6551
+ };
6552
+ var containerShape = {
6553
+ rounded: { sm: "rounded-[10px]", md: "rounded-xl", lg: "rounded-xl" },
6554
+ block: { sm: "", md: "", lg: "" },
6555
+ pill: { sm: "rounded-full", md: "rounded-[28px]", lg: "rounded-[28px]" }
6556
+ };
6557
+ var valueText = {
6558
+ sm: "text-sm w-7",
6559
+ md: "text-sm w-7",
6560
+ lg: "text-base w-7"
6561
+ };
6562
+ var Counter = forwardRef(
6005
6563
  ({
6006
- variant = "input",
6007
- icon,
6564
+ value: controlledValue,
6565
+ onChange,
6566
+ defaultValue = 0,
6567
+ size = "sm",
6568
+ shape = "rounded",
6569
+ min = 0,
6570
+ max = Infinity,
6571
+ step = 1,
6008
6572
  disabled = false,
6009
- onClose,
6010
- onDropdown,
6011
6573
  className,
6012
- children,
6013
6574
  ...rest
6014
6575
  }, ref) => {
6576
+ const [uncontrolled, setUncontrolled] = useState(defaultValue);
6577
+ const val = controlledValue ?? uncontrolled;
6578
+ const update = useCallback(
6579
+ (next) => {
6580
+ const clamped = Math.min(max, Math.max(min, next));
6581
+ if (controlledValue === void 0) setUncontrolled(clamped);
6582
+ onChange?.(clamped);
6583
+ },
6584
+ [controlledValue, onChange, min, max]
6585
+ );
6586
+ const canDecrement = val > min;
6587
+ const canIncrement = val < max;
6015
6588
  return /* @__PURE__ */ jsxs(
6016
6589
  "div",
6017
6590
  {
6018
6591
  ref,
6019
6592
  className: cn(
6020
- "inline-flex items-center gap-1 rounded-md border px-2 py-1 text-sm font-medium transition-colors",
6021
- disabled ? "border-grey-200 bg-grey-100 text-grey-300 cursor-not-allowed" : "border-grey-300 bg-white dark:bg-grey-50 text-grey-700 cursor-default focus-within:bg-[#FBF1F1] focus-within:border-primary-600",
6593
+ "inline-flex items-center border border-grey-300 overflow-hidden",
6594
+ containerShape[shape][size],
6595
+ disabled && "opacity-50",
6022
6596
  className
6023
6597
  ),
6024
6598
  ...rest,
6025
6599
  children: [
6026
- icon && /* @__PURE__ */ jsx("span", { className: "shrink-0 size-4", children: resolveIcon(icon, "sm") }),
6027
- /* @__PURE__ */ jsx("span", { children }),
6028
- variant === "input" && onClose && /* @__PURE__ */ jsx(
6600
+ /* @__PURE__ */ jsx(
6029
6601
  "button",
6030
6602
  {
6031
6603
  type: "button",
6032
- onClick: onClose,
6033
- disabled,
6604
+ disabled: disabled || !canDecrement,
6605
+ onClick: () => update(val - step),
6034
6606
  className: cn(
6035
- "shrink-0 size-4 inline-flex items-center justify-center rounded-sm",
6036
- disabled ? "cursor-not-allowed text-grey-300" : "cursor-pointer text-grey-500 hover:text-grey-700"
6607
+ "flex items-center justify-center p-2.5 text-grey-900 cursor-pointer transition-colors hover:bg-grey-100",
6608
+ buttonSize[size],
6609
+ (disabled || !canDecrement) && "text-grey-300 cursor-not-allowed hover:bg-transparent"
6037
6610
  ),
6038
- "aria-label": "Remove",
6039
- children: /* @__PURE__ */ jsx(Icon, { name: "multiply", size: "xs" })
6611
+ "aria-label": "Decrease",
6612
+ children: /* @__PURE__ */ jsx(MinusIcon, { className: iconSize2[size] })
6040
6613
  }
6041
6614
  ),
6042
- variant === "filter" && /* @__PURE__ */ jsx(
6615
+ /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center shrink-0", children: /* @__PURE__ */ jsx(
6616
+ "span",
6617
+ {
6618
+ className: cn("font-medium text-grey-900 text-center leading-[1.45]", valueText[size]),
6619
+ children: val
6620
+ }
6621
+ ) }),
6622
+ /* @__PURE__ */ jsx(
6043
6623
  "button",
6044
6624
  {
6045
6625
  type: "button",
6046
- onClick: onDropdown,
6047
- disabled,
6626
+ disabled: disabled || !canIncrement,
6627
+ onClick: () => update(val + step),
6048
6628
  className: cn(
6049
- "shrink-0 size-4 inline-flex items-center justify-center",
6050
- disabled ? "cursor-not-allowed text-grey-300" : "cursor-pointer text-grey-500 hover:text-grey-700"
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"
6051
6632
  ),
6052
- "aria-label": "Open filter",
6053
- children: /* @__PURE__ */ jsx(Icon, { name: "chevron-down", size: "xs" })
6633
+ "aria-label": "Increase",
6634
+ children: /* @__PURE__ */ jsx(PlusIcon, { className: iconSize2[size] })
6054
6635
  }
6055
6636
  )
6056
6637
  ]
@@ -6058,30 +6639,596 @@ var Chip = forwardRef(
6058
6639
  );
6059
6640
  }
6060
6641
  );
6061
- Chip.displayName = "Chip";
6062
- var clampValue = (value) => Math.min(100, Math.max(0, value));
6063
- function ProgressBar({
6064
- value = 0,
6065
- size = "lg",
6066
- label,
6067
- metadata,
6068
- showPercentage = true,
6069
- className,
6070
- ...rest
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("inline-flex items-center justify-center", s.container, c.bg, className),
6663
+ ...rest,
6664
+ children: /* @__PURE__ */ jsx(
6665
+ "span",
6666
+ {
6667
+ className: cn("font-semibold text-center leading-[1.45] tracking-tight", s.text, c.text),
6668
+ children: value
6669
+ }
6670
+ )
6671
+ }
6672
+ );
6673
+ }
6674
+ );
6675
+ NumberCounter.displayName = "NumberCounter";
6676
+ var MONTH_NAMES = [
6677
+ "January",
6678
+ "February",
6679
+ "March",
6680
+ "April",
6681
+ "May",
6682
+ "June",
6683
+ "July",
6684
+ "August",
6685
+ "September",
6686
+ "October",
6687
+ "November",
6688
+ "December"
6689
+ ];
6690
+ var DAY_LABELS = ["M", "T", "W", "T", "F", "S", "S"];
6691
+ function getDaysInMonth(year, month) {
6692
+ return new Date(year, month + 1, 0).getDate();
6693
+ }
6694
+ function getFirstDayOfWeek(year, month) {
6695
+ const day = new Date(year, month, 1).getDay();
6696
+ return day === 0 ? 6 : day - 1;
6697
+ }
6698
+ function isSameDay(a, b) {
6699
+ if (!a || !b) return false;
6700
+ return a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth() && a.getDate() === b.getDate();
6701
+ }
6702
+ function isToday(date) {
6703
+ return isSameDay(date, /* @__PURE__ */ new Date());
6704
+ }
6705
+ function isBetween(date, start, end) {
6706
+ if (!start || !end) return false;
6707
+ const t = date.getTime();
6708
+ const s = Math.min(start.getTime(), end.getTime());
6709
+ const e = Math.max(start.getTime(), end.getTime());
6710
+ return t > s && t < e;
6711
+ }
6712
+ function isDateDisabled(date, minDate, maxDate) {
6713
+ if (minDate && date < minDate) return true;
6714
+ if (maxDate && date > maxDate) return true;
6715
+ return false;
6716
+ }
6717
+ function ChevronLeft({ className }) {
6718
+ return /* @__PURE__ */ jsx(
6719
+ "svg",
6720
+ {
6721
+ className,
6722
+ viewBox: "0 0 14 14",
6723
+ fill: "none",
6724
+ stroke: "currentColor",
6725
+ strokeWidth: 2,
6726
+ strokeLinecap: "round",
6727
+ strokeLinejoin: "round",
6728
+ "aria-hidden": "true",
6729
+ children: /* @__PURE__ */ jsx("path", { d: "M9 3L5 7l4 4" })
6730
+ }
6731
+ );
6732
+ }
6733
+ function ChevronRight({ className }) {
6734
+ return /* @__PURE__ */ jsx(
6735
+ "svg",
6736
+ {
6737
+ className,
6738
+ viewBox: "0 0 14 14",
6739
+ fill: "none",
6740
+ stroke: "currentColor",
6741
+ strokeWidth: 2,
6742
+ strokeLinecap: "round",
6743
+ strokeLinejoin: "round",
6744
+ "aria-hidden": "true",
6745
+ children: /* @__PURE__ */ jsx("path", { d: "M5 3l4 4-4 4" })
6746
+ }
6747
+ );
6748
+ }
6749
+ function ChevronDown2({ className }) {
6750
+ return /* @__PURE__ */ jsx(
6751
+ "svg",
6752
+ {
6753
+ className,
6754
+ viewBox: "0 0 24 24",
6755
+ fill: "none",
6756
+ stroke: "currentColor",
6757
+ strokeWidth: 2,
6758
+ strokeLinecap: "round",
6759
+ strokeLinejoin: "round",
6760
+ "aria-hidden": "true",
6761
+ children: /* @__PURE__ */ jsx("path", { d: "M6 9l6 6 6-6" })
6762
+ }
6763
+ );
6764
+ }
6765
+ function DayCell({ day, state, fullDate, onClick }) {
6766
+ const isInteractive = state !== "disabled";
6767
+ const cellClasses = cn(
6768
+ "flex items-center justify-center w-10 h-10 text-sm font-medium relative select-none",
6769
+ state === "selected" && "bg-primary-400 text-white rounded-[10px]",
6770
+ state === "start-range" && "bg-primary-400 text-white rounded-l-[10px]",
6771
+ state === "end-range" && "bg-primary-400 text-white rounded-r-[10px]",
6772
+ state === "mid-range" && "bg-primary-50 text-primary-400",
6773
+ state === "disabled" && "text-grey-300",
6774
+ state === "default" && "text-grey-900 hover:bg-grey-75 rounded-[10px]",
6775
+ state === "today" && "text-grey-900 hover:bg-grey-75 rounded-[10px]",
6776
+ isInteractive && "cursor-pointer"
6777
+ );
6778
+ const dateLabel = fullDate.toLocaleDateString("en-US", {
6779
+ weekday: "long",
6780
+ year: "numeric",
6781
+ month: "long",
6782
+ day: "numeric"
6783
+ });
6784
+ const stateLabel = state === "today" ? "Today, " : state === "selected" ? "Selected, " : state === "start-range" ? "Start of range, " : state === "end-range" ? "End of range, " : state === "mid-range" ? "In selected range, " : "";
6785
+ return /* @__PURE__ */ jsxs(
6786
+ "button",
6787
+ {
6788
+ type: "button",
6789
+ className: cellClasses,
6790
+ onClick: isInteractive ? onClick : void 0,
6791
+ disabled: !isInteractive,
6792
+ tabIndex: isInteractive ? 0 : -1,
6793
+ "aria-label": `${stateLabel}${dateLabel}`,
6794
+ "aria-current": state === "today" ? "date" : void 0,
6795
+ "aria-pressed": state === "selected" || state === "start-range" || state === "end-range" ? true : void 0,
6796
+ children: [
6797
+ day,
6798
+ state === "today" && /* @__PURE__ */ jsx("span", { className: "absolute bottom-[5px] left-1/2 -translate-x-1/2 size-1 rounded-full bg-primary-400", "aria-hidden": "true" })
6799
+ ]
6800
+ }
6801
+ );
6802
+ }
6803
+ function MonthGrid({
6804
+ year,
6805
+ month,
6806
+ selectedDate,
6807
+ rangeStart,
6808
+ rangeEnd,
6809
+ isRange,
6810
+ minDate,
6811
+ maxDate,
6812
+ onDayClick
6813
+ }) {
6814
+ const daysInMonth = getDaysInMonth(year, month);
6815
+ const firstDay = getFirstDayOfWeek(year, month);
6816
+ const prevMonthDays = getDaysInMonth(year, month - 1);
6817
+ const cells = [];
6818
+ for (let i = firstDay - 1; i >= 0; i--) {
6819
+ const d = prevMonthDays - i;
6820
+ cells.push({ day: d, state: "disabled", date: new Date(year, month - 1, d) });
6821
+ }
6822
+ for (let d = 1; d <= daysInMonth; d++) {
6823
+ const date = new Date(year, month, d);
6824
+ let state = "default";
6825
+ if (isDateDisabled(date, minDate, maxDate)) {
6826
+ state = "disabled";
6827
+ } else if (isRange && rangeStart && rangeEnd) {
6828
+ const start = rangeStart.getTime() <= rangeEnd.getTime() ? rangeStart : rangeEnd;
6829
+ const end = rangeStart.getTime() <= rangeEnd.getTime() ? rangeEnd : rangeStart;
6830
+ if (isSameDay(date, start)) state = "start-range";
6831
+ else if (isSameDay(date, end)) state = "end-range";
6832
+ else if (isBetween(date, start, end)) state = "mid-range";
6833
+ } else if (isRange && rangeStart && !rangeEnd && isSameDay(date, rangeStart)) {
6834
+ state = "selected";
6835
+ } else if (!isRange && isSameDay(date, selectedDate)) {
6836
+ state = "selected";
6837
+ }
6838
+ if (state === "default" && isToday(date)) {
6839
+ state = "today";
6840
+ }
6841
+ cells.push({ day: d, state, date });
6842
+ }
6843
+ const remaining = 42 - cells.length;
6844
+ for (let d = 1; d <= remaining; d++) {
6845
+ cells.push({ day: d, state: "disabled", date: new Date(year, month + 1, d) });
6846
+ }
6847
+ const rows = [];
6848
+ for (let i = 0; i < cells.length; i += 7) {
6849
+ rows.push(cells.slice(i, i + 7));
6850
+ }
6851
+ if (rows.length === 6 && rows[5].every((c) => c.state === "disabled")) {
6852
+ rows.pop();
6853
+ }
6854
+ const fullDayNames = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"];
6855
+ return /* @__PURE__ */ jsxs("div", { className: "flex flex-col", role: "grid", "aria-label": "Calendar", children: [
6856
+ /* @__PURE__ */ jsx("div", { className: "flex h-10 items-center", role: "row", children: DAY_LABELS.map((label, i) => /* @__PURE__ */ jsx(
6857
+ "div",
6858
+ {
6859
+ role: "columnheader",
6860
+ "aria-label": fullDayNames[i],
6861
+ className: "flex items-center justify-center w-10 h-10 text-sm font-medium text-grey-400",
6862
+ children: label
6863
+ },
6864
+ i
6865
+ )) }),
6866
+ rows.map((row, ri) => /* @__PURE__ */ jsx("div", { className: "flex h-10 items-center", role: "row", children: row.map((cell, ci) => /* @__PURE__ */ jsx(
6867
+ DayCell,
6868
+ {
6869
+ day: cell.day,
6870
+ state: cell.state,
6871
+ fullDate: cell.date,
6872
+ onClick: () => onDayClick(cell.date)
6873
+ },
6874
+ ci
6875
+ )) }, ri))
6876
+ ] });
6877
+ }
6878
+ function YearGrid({ baseYear, selectedYear, onYearClick }) {
6879
+ const years = [];
6880
+ for (let i = 0; i < 20; i++) {
6881
+ years.push(baseYear + i);
6882
+ }
6883
+ const rows = [];
6884
+ for (let i = 0; i < years.length; i += 4) {
6885
+ rows.push(years.slice(i, i + 4));
6886
+ }
6887
+ return /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-2 w-full", role: "grid", "aria-label": "Year selection", children: rows.map((row, ri) => /* @__PURE__ */ jsx("div", { className: "flex gap-4 h-10 items-center w-full", role: "row", children: row.map((year) => /* @__PURE__ */ jsx(
6888
+ "button",
6889
+ {
6890
+ type: "button",
6891
+ "aria-label": year === selectedYear ? `${year}, selected` : String(year),
6892
+ "aria-pressed": year === selectedYear || void 0,
6893
+ className: cn(
6894
+ "flex-1 flex items-center justify-center py-2.5 px-4 rounded-[10px] text-sm font-medium cursor-pointer select-none",
6895
+ year === selectedYear ? "bg-primary-400 text-white" : "text-grey-900 hover:bg-grey-75"
6896
+ ),
6897
+ onClick: () => onYearClick(year),
6898
+ children: year
6899
+ },
6900
+ year
6901
+ )) }, ri)) });
6902
+ }
6903
+ function NavButton({
6904
+ direction,
6905
+ onClick,
6906
+ hidden
6907
+ }) {
6908
+ return /* @__PURE__ */ jsx(
6909
+ "button",
6910
+ {
6911
+ type: "button",
6912
+ onClick,
6913
+ "aria-label": direction === "left" ? "Previous month" : "Next month",
6914
+ "aria-hidden": hidden || void 0,
6915
+ tabIndex: hidden ? -1 : void 0,
6916
+ className: cn(
6917
+ "flex items-center justify-center p-2 rounded-lg bg-grey-75 hover:bg-grey-200 transition-colors cursor-pointer",
6918
+ hidden && "opacity-0 pointer-events-none"
6919
+ ),
6920
+ children: direction === "left" ? /* @__PURE__ */ jsx(ChevronLeft, { className: "size-3.5 text-grey-700" }) : /* @__PURE__ */ jsx(ChevronRight, { className: "size-3.5 text-grey-700" })
6921
+ }
6922
+ );
6923
+ }
6924
+ var DatePicker = forwardRef(
6925
+ ({
6926
+ mode = "single",
6927
+ value,
6928
+ rangeValue,
6929
+ onChange,
6930
+ onRangeChange,
6931
+ showFooter = false,
6932
+ onDone,
6933
+ onClear,
6934
+ minDate,
6935
+ maxDate,
6936
+ className,
6937
+ ...rest
6938
+ }, ref) => {
6939
+ const now = /* @__PURE__ */ new Date();
6940
+ const initialDate = value ?? rangeValue?.[0] ?? now;
6941
+ const [viewMonth, setViewMonth] = useState(initialDate.getMonth());
6942
+ const [viewYear, setViewYear] = useState(initialDate.getFullYear());
6943
+ const [yearBase, setYearBase] = useState(Math.floor(initialDate.getFullYear() / 20) * 20);
6944
+ const [rangeStart, setRangeStart] = useState(rangeValue?.[0] ?? null);
6945
+ const [rangeEnd, setRangeEnd] = useState(rangeValue?.[1] ?? null);
6946
+ const goToPrevMonth = useCallback(() => {
6947
+ setViewMonth((m) => {
6948
+ if (m === 0) {
6949
+ setViewYear((y) => y - 1);
6950
+ return 11;
6951
+ }
6952
+ return m - 1;
6953
+ });
6954
+ }, []);
6955
+ const goToNextMonth = useCallback(() => {
6956
+ setViewMonth((m) => {
6957
+ if (m === 11) {
6958
+ setViewYear((y) => y + 1);
6959
+ return 0;
6960
+ }
6961
+ return m + 1;
6962
+ });
6963
+ }, []);
6964
+ const handleDayClick = useCallback(
6965
+ (date) => {
6966
+ if (mode === "single") {
6967
+ onChange?.(date);
6968
+ } else if (mode === "range") {
6969
+ if (!rangeStart || rangeStart && rangeEnd) {
6970
+ setRangeStart(date);
6971
+ setRangeEnd(null);
6972
+ onRangeChange?.([date, null]);
6973
+ } else {
6974
+ setRangeEnd(date);
6975
+ onRangeChange?.([rangeStart, date]);
6976
+ }
6977
+ }
6978
+ },
6979
+ [mode, onChange, onRangeChange, rangeStart, rangeEnd]
6980
+ );
6981
+ const handleYearClick = useCallback(
6982
+ (year) => {
6983
+ const newDate = new Date(year, value?.getMonth() ?? 0, 1);
6984
+ onChange?.(newDate);
6985
+ setViewYear(year);
6986
+ },
6987
+ [onChange, value]
6988
+ );
6989
+ const handleClear = useCallback(() => {
6990
+ if (mode === "range") {
6991
+ setRangeStart(null);
6992
+ setRangeEnd(null);
6993
+ onRangeChange?.([null, null]);
6994
+ } else {
6995
+ onChange?.(null);
6996
+ }
6997
+ onClear?.();
6998
+ }, [mode, onChange, onRangeChange, onClear]);
6999
+ const secondMonth = useMemo(() => {
7000
+ const m = viewMonth + 1;
7001
+ return { month: m > 11 ? 0 : m, year: m > 11 ? viewYear + 1 : viewYear };
7002
+ }, [viewMonth, viewYear]);
7003
+ const monthYearLabel = `${MONTH_NAMES[viewMonth]} ${viewYear}`;
7004
+ const secondMonthLabel = `${MONTH_NAMES[secondMonth.month]} ${secondMonth.year}`;
7005
+ return /* @__PURE__ */ jsxs(
7006
+ "div",
7007
+ {
7008
+ ref,
7009
+ className: cn(
7010
+ "bg-white dark:bg-grey-50 border border-grey-75 rounded-2xl p-5 shadow-soft-xs",
7011
+ "flex flex-col gap-6",
7012
+ mode !== "range" && "w-[340px]",
7013
+ className
7014
+ ),
7015
+ ...rest,
7016
+ children: [
7017
+ mode === "single" && /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-4", children: [
7018
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between w-full", children: [
7019
+ /* @__PURE__ */ jsx(NavButton, { direction: "left", onClick: goToPrevMonth }),
7020
+ /* @__PURE__ */ jsxs(
7021
+ "button",
7022
+ {
7023
+ type: "button",
7024
+ className: "flex items-center gap-2 text-sm font-medium text-grey-700 cursor-default",
7025
+ children: [
7026
+ monthYearLabel,
7027
+ /* @__PURE__ */ jsx(ChevronDown2, { className: "size-6 text-grey-500" })
7028
+ ]
7029
+ }
7030
+ ),
7031
+ /* @__PURE__ */ jsx(NavButton, { direction: "right", onClick: goToNextMonth })
7032
+ ] }),
7033
+ /* @__PURE__ */ jsx(
7034
+ MonthGrid,
7035
+ {
7036
+ year: viewYear,
7037
+ month: viewMonth,
7038
+ selectedDate: value,
7039
+ minDate,
7040
+ maxDate,
7041
+ onDayClick: handleDayClick
7042
+ }
7043
+ )
7044
+ ] }) }),
7045
+ mode === "range" && /* @__PURE__ */ jsxs("div", { className: "flex gap-8", children: [
7046
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-4", children: [
7047
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-10 w-[280px]", children: [
7048
+ /* @__PURE__ */ jsx(NavButton, { direction: "left", onClick: goToPrevMonth }),
7049
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
7050
+ /* @__PURE__ */ jsx("span", { className: "text-sm font-medium text-grey-700", children: monthYearLabel }),
7051
+ /* @__PURE__ */ jsx(ChevronDown2, { className: "size-6 text-grey-500" })
7052
+ ] }),
7053
+ /* @__PURE__ */ jsx(NavButton, { direction: "right", hidden: true })
7054
+ ] }),
7055
+ /* @__PURE__ */ jsx(
7056
+ MonthGrid,
7057
+ {
7058
+ year: viewYear,
7059
+ month: viewMonth,
7060
+ rangeStart,
7061
+ rangeEnd,
7062
+ isRange: true,
7063
+ minDate,
7064
+ maxDate,
7065
+ onDayClick: handleDayClick
7066
+ }
7067
+ )
7068
+ ] }),
7069
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-4", children: [
7070
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between w-[280px]", children: [
7071
+ /* @__PURE__ */ jsx(NavButton, { direction: "left", hidden: true }),
7072
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
7073
+ /* @__PURE__ */ jsx("span", { className: "text-sm font-medium text-grey-700", children: secondMonthLabel }),
7074
+ /* @__PURE__ */ jsx(ChevronDown2, { className: "size-6 text-grey-500" })
7075
+ ] }),
7076
+ /* @__PURE__ */ jsx(NavButton, { direction: "right", onClick: goToNextMonth })
7077
+ ] }),
7078
+ /* @__PURE__ */ jsx(
7079
+ MonthGrid,
7080
+ {
7081
+ year: secondMonth.year,
7082
+ month: secondMonth.month,
7083
+ rangeStart,
7084
+ rangeEnd,
7085
+ isRange: true,
7086
+ minDate,
7087
+ maxDate,
7088
+ onDayClick: handleDayClick
7089
+ }
7090
+ )
7091
+ ] })
7092
+ ] }),
7093
+ mode === "year" && /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-4 items-center w-full", children: [
7094
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
7095
+ /* @__PURE__ */ jsxs("span", { className: "text-sm font-medium text-grey-700", children: [
7096
+ yearBase,
7097
+ "\u2013",
7098
+ yearBase + 19
7099
+ ] }),
7100
+ /* @__PURE__ */ jsx(ChevronDown2, { className: "size-6 text-grey-500" })
7101
+ ] }),
7102
+ /* @__PURE__ */ jsx(
7103
+ YearGrid,
7104
+ {
7105
+ baseYear: yearBase,
7106
+ selectedYear: value?.getFullYear(),
7107
+ onYearClick: handleYearClick
7108
+ }
7109
+ ),
7110
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-4 mt-2", children: [
7111
+ /* @__PURE__ */ jsx(NavButton, { direction: "left", onClick: () => setYearBase((b) => b - 20) }),
7112
+ /* @__PURE__ */ jsx(NavButton, { direction: "right", onClick: () => setYearBase((b) => b + 20) })
7113
+ ] })
7114
+ ] }),
7115
+ showFooter && /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between border-t border-grey-100 pt-4", children: [
7116
+ /* @__PURE__ */ jsx(
7117
+ "button",
7118
+ {
7119
+ type: "button",
7120
+ onClick: handleClear,
7121
+ className: "text-sm font-semibold text-grey-400 hover:text-grey-600 px-2 cursor-pointer",
7122
+ children: "Clear"
7123
+ }
7124
+ ),
7125
+ /* @__PURE__ */ jsx(
7126
+ "button",
7127
+ {
7128
+ type: "button",
7129
+ onClick: onDone,
7130
+ className: "bg-primary-400 text-white text-sm font-semibold px-5 py-2.5 rounded-lg hover:bg-primary-500 cursor-pointer",
7131
+ children: "Done"
7132
+ }
7133
+ )
7134
+ ] })
7135
+ ]
7136
+ }
7137
+ );
7138
+ }
7139
+ );
7140
+ DatePicker.displayName = "DatePicker";
7141
+ var Chip = forwardRef(
7142
+ ({
7143
+ variant = "input",
7144
+ icon,
7145
+ disabled = false,
7146
+ onClose,
7147
+ onDropdown,
7148
+ className,
7149
+ children,
7150
+ ...rest
7151
+ }, ref) => {
7152
+ return /* @__PURE__ */ jsxs(
7153
+ "div",
7154
+ {
7155
+ ref,
7156
+ className: cn(
7157
+ "inline-flex items-center gap-1 rounded-md border px-2 py-1 text-sm font-medium transition-colors",
7158
+ disabled ? "border-grey-200 bg-grey-100 text-grey-300 cursor-not-allowed" : "border-grey-300 bg-white dark:bg-grey-50 text-grey-700 cursor-default focus-within:bg-[#FBF1F1] focus-within:border-primary-600",
7159
+ className
7160
+ ),
7161
+ ...rest,
7162
+ children: [
7163
+ icon && /* @__PURE__ */ jsx("span", { className: "shrink-0 size-4", children: resolveIcon(icon, "sm") }),
7164
+ /* @__PURE__ */ jsx("span", { children }),
7165
+ variant === "input" && onClose && /* @__PURE__ */ jsx(
7166
+ "button",
7167
+ {
7168
+ type: "button",
7169
+ onClick: onClose,
7170
+ disabled,
7171
+ className: cn(
7172
+ "shrink-0 size-4 inline-flex items-center justify-center rounded-sm",
7173
+ disabled ? "cursor-not-allowed text-grey-300" : "cursor-pointer text-grey-500 hover:text-grey-700"
7174
+ ),
7175
+ "aria-label": "Remove",
7176
+ children: /* @__PURE__ */ jsx(Icon, { name: "multiply", size: "xs" })
7177
+ }
7178
+ ),
7179
+ variant === "filter" && /* @__PURE__ */ jsx(
7180
+ "button",
7181
+ {
7182
+ type: "button",
7183
+ onClick: onDropdown,
7184
+ disabled,
7185
+ className: cn(
7186
+ "shrink-0 size-4 inline-flex items-center justify-center",
7187
+ disabled ? "cursor-not-allowed text-grey-300" : "cursor-pointer text-grey-500 hover:text-grey-700"
7188
+ ),
7189
+ "aria-label": "Open filter",
7190
+ children: /* @__PURE__ */ jsx(Icon, { name: "chevron-down", size: "xs" })
7191
+ }
7192
+ )
7193
+ ]
7194
+ }
7195
+ );
7196
+ }
7197
+ );
7198
+ Chip.displayName = "Chip";
7199
+ var SEGMENT_COUNT = 10;
7200
+ var trackHeight = {
7201
+ sm: "h-1",
7202
+ md: "h-2",
7203
+ lg: "h-3"
7204
+ };
7205
+ var clampValue = (value) => Math.min(100, Math.max(0, value));
7206
+ function ProgressBar({
7207
+ value = 0,
7208
+ size = "lg",
7209
+ type = "basic",
7210
+ label,
7211
+ metadata,
7212
+ showPercentage = true,
7213
+ percentagePosition = "bottom",
7214
+ className,
7215
+ ...rest
6071
7216
  }) {
6072
7217
  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: [
7218
+ const filledSegments = Math.round(clamped / 100 * SEGMENT_COUNT);
7219
+ const metadataItems = Array.isArray(metadata) ? metadata : metadata ? [metadata] : [];
7220
+ return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col gap-2 w-full", className), ...rest, children: [
7221
+ (label || showPercentage && percentagePosition === "top") && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
7222
+ label && /* @__PURE__ */ jsx("span", { className: "flex-1 text-sm font-medium text-grey-900 leading-[1.45]", children: label }),
7223
+ showPercentage && percentagePosition === "top" && /* @__PURE__ */ jsxs("span", { className: "text-sm font-semibold text-grey-500 leading-[1.45]", children: [
6077
7224
  Math.round(clamped),
6078
7225
  "%"
6079
7226
  ] })
6080
7227
  ] }),
6081
- /* @__PURE__ */ jsx(
7228
+ type === "basic" ? /* @__PURE__ */ jsx(
6082
7229
  "div",
6083
7230
  {
6084
- className: cn("w-full rounded-full bg-grey-100", size === "lg" ? "h-3" : "h-2"),
7231
+ className: cn("w-full rounded-full bg-grey-200", trackHeight[size]),
6085
7232
  role: "progressbar",
6086
7233
  "aria-valuenow": clamped,
6087
7234
  "aria-valuemin": 0,
@@ -6091,14 +7238,42 @@ function ProgressBar({
6091
7238
  {
6092
7239
  className: cn(
6093
7240
  "rounded-full bg-primary-400 transition-all duration-300",
6094
- size === "lg" ? "h-3" : "h-2"
7241
+ trackHeight[size]
6095
7242
  ),
6096
7243
  style: { width: `${clamped}%` }
6097
7244
  }
6098
7245
  )
6099
7246
  }
7247
+ ) : /* @__PURE__ */ jsx(
7248
+ "div",
7249
+ {
7250
+ className: cn("flex gap-0.5 w-full", trackHeight[size]),
7251
+ role: "progressbar",
7252
+ "aria-valuenow": clamped,
7253
+ "aria-valuemin": 0,
7254
+ "aria-valuemax": 100,
7255
+ children: Array.from({ length: SEGMENT_COUNT }, (_, i) => /* @__PURE__ */ jsx(
7256
+ "div",
7257
+ {
7258
+ className: cn(
7259
+ "flex-1 rounded-full transition-colors duration-300",
7260
+ i < filledSegments ? "bg-primary-400" : "bg-grey-100"
7261
+ )
7262
+ },
7263
+ i
7264
+ ))
7265
+ }
6100
7266
  ),
6101
- metadata && /* @__PURE__ */ jsx("div", { className: "flex justify-end mt-1", children: /* @__PURE__ */ jsx("span", { className: "text-sm text-grey-500", children: metadata }) })
7267
+ (metadataItems.length > 0 || showPercentage && percentagePosition === "bottom") && /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
7268
+ 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: [
7269
+ i > 0 && /* @__PURE__ */ jsx("span", { className: "text-xs text-grey-400 leading-[1.45]", children: "\u2022" }),
7270
+ /* @__PURE__ */ jsx("span", { className: "text-sm font-medium text-grey-500 leading-[1.45]", children: item })
7271
+ ] }, i)) }),
7272
+ showPercentage && percentagePosition === "bottom" && /* @__PURE__ */ jsxs("span", { className: "flex-1 text-sm font-semibold text-grey-500 text-right leading-[1.45]", children: [
7273
+ Math.round(clamped),
7274
+ "%"
7275
+ ] })
7276
+ ] })
6102
7277
  ] });
6103
7278
  }
6104
7279
  var sizeConfig = {
@@ -6108,10 +7283,13 @@ var sizeConfig = {
6108
7283
  lg: { dimension: 90, strokeWidth: 7, fontSize: 16 },
6109
7284
  xl: { dimension: 120, strokeWidth: 8, fontSize: 18 }
6110
7285
  };
7286
+ var SEGMENT_COUNT2 = 10;
7287
+ var SEGMENT_GAP_DEGREES = 6;
6111
7288
  var clampValue2 = (value) => Math.min(100, Math.max(0, value));
6112
7289
  function ProgressCircle({
6113
7290
  value = 0,
6114
7291
  size = "md",
7292
+ variant = "default",
6115
7293
  showText = true,
6116
7294
  className,
6117
7295
  ...rest
@@ -6120,6 +7298,57 @@ function ProgressCircle({
6120
7298
  const config = sizeConfig[size];
6121
7299
  const radius = (config.dimension - config.strokeWidth) / 2;
6122
7300
  const circumference = 2 * Math.PI * radius;
7301
+ if (variant === "segmented") {
7302
+ const filledSegments = Math.round(clamped / 100 * SEGMENT_COUNT2);
7303
+ const totalGapDegrees = SEGMENT_COUNT2 * SEGMENT_GAP_DEGREES;
7304
+ const segmentDegrees = (360 - totalGapDegrees) / SEGMENT_COUNT2;
7305
+ const segmentLength = segmentDegrees / 360 * circumference;
7306
+ const gapLength = SEGMENT_GAP_DEGREES / 360 * circumference;
7307
+ return /* @__PURE__ */ jsxs(
7308
+ "div",
7309
+ {
7310
+ className: cn("relative inline-flex items-center justify-center", className),
7311
+ style: { width: config.dimension, height: config.dimension },
7312
+ role: "progressbar",
7313
+ "aria-valuenow": clamped,
7314
+ "aria-valuemin": 0,
7315
+ "aria-valuemax": 100,
7316
+ ...rest,
7317
+ children: [
7318
+ /* @__PURE__ */ jsx("svg", { width: config.dimension, height: config.dimension, className: "-rotate-90", children: Array.from({ length: SEGMENT_COUNT2 }, (_, i) => {
7319
+ const segmentOffset = i * ((segmentLength + gapLength) / circumference) * circumference;
7320
+ return /* @__PURE__ */ jsx(
7321
+ "circle",
7322
+ {
7323
+ cx: config.dimension / 2,
7324
+ cy: config.dimension / 2,
7325
+ r: radius,
7326
+ fill: "none",
7327
+ stroke: i < filledSegments ? "#F56630" : "#F0F2F5",
7328
+ strokeWidth: config.strokeWidth,
7329
+ strokeLinecap: "round",
7330
+ strokeDasharray: `${segmentLength} ${circumference - segmentLength}`,
7331
+ strokeDashoffset: -segmentOffset,
7332
+ className: "transition-colors duration-300"
7333
+ },
7334
+ i
7335
+ );
7336
+ }) }),
7337
+ showText && /* @__PURE__ */ jsxs(
7338
+ "span",
7339
+ {
7340
+ className: "absolute font-semibold text-grey-900",
7341
+ style: { fontSize: config.fontSize },
7342
+ children: [
7343
+ Math.round(clamped),
7344
+ "%"
7345
+ ]
7346
+ }
7347
+ )
7348
+ ]
7349
+ }
7350
+ );
7351
+ }
6123
7352
  const offset = circumference - clamped / 100 * circumference;
6124
7353
  return /* @__PURE__ */ jsxs(
6125
7354
  "div",
@@ -6160,14 +7389,190 @@ function ProgressCircle({
6160
7389
  }
6161
7390
  )
6162
7391
  ] }),
6163
- showText && /* @__PURE__ */ jsxs("span", { className: "absolute font-semibold text-black", style: { fontSize: config.fontSize }, children: [
6164
- Math.round(clamped),
6165
- "%"
6166
- ] })
7392
+ showText && /* @__PURE__ */ jsxs(
7393
+ "span",
7394
+ {
7395
+ className: "absolute font-semibold text-grey-900",
7396
+ style: { fontSize: config.fontSize },
7397
+ children: [
7398
+ Math.round(clamped),
7399
+ "%"
7400
+ ]
7401
+ }
7402
+ )
7403
+ ]
7404
+ }
7405
+ );
7406
+ }
7407
+ var statusColors = {
7408
+ information: {
7409
+ bold: { bg: "bg-[#4a9fed]", divider: "bg-[#f0f7ff]" },
7410
+ subtle: {
7411
+ bg: "bg-[#f0f7ff]",
7412
+ text: "text-grey-900",
7413
+ descText: "text-grey-600",
7414
+ divider: "bg-[#0063ad]"
7415
+ }
7416
+ },
7417
+ success: {
7418
+ bold: { bg: "bg-success-400", divider: "bg-success-50" },
7419
+ subtle: {
7420
+ bg: "bg-success-50",
7421
+ text: "text-grey-900",
7422
+ descText: "text-grey-600",
7423
+ divider: "bg-success-400"
7424
+ }
7425
+ },
7426
+ error: {
7427
+ bold: { bg: "bg-error-400", divider: "bg-error-50" },
7428
+ subtle: {
7429
+ bg: "bg-error-50",
7430
+ text: "text-grey-900",
7431
+ descText: "text-grey-600",
7432
+ divider: "bg-error-400"
7433
+ }
7434
+ },
7435
+ warning: {
7436
+ bold: { bg: "bg-warning-400", divider: "bg-warning-50" },
7437
+ subtle: {
7438
+ bg: "bg-warning-50",
7439
+ text: "text-grey-900",
7440
+ descText: "text-grey-600",
7441
+ divider: "bg-warning-700"
7442
+ }
7443
+ },
7444
+ feature: {
7445
+ bold: { bg: "bg-grey-900", divider: "bg-grey-100" },
7446
+ subtle: {
7447
+ bg: "bg-grey-50",
7448
+ text: "text-black",
7449
+ descText: "text-black",
7450
+ divider: "bg-grey-300"
7451
+ }
7452
+ },
7453
+ opportunity: {
7454
+ bold: { bg: "bg-[#475ccc]", divider: "bg-[#b1bae9]" },
7455
+ subtle: {
7456
+ bg: "bg-[#f7f8fd]",
7457
+ text: "text-grey-900",
7458
+ descText: "text-grey-600",
7459
+ divider: "bg-[#b1bae9]"
7460
+ }
7461
+ }
7462
+ };
7463
+ function InfoIcon({ className }) {
7464
+ return /* @__PURE__ */ jsxs(
7465
+ "svg",
7466
+ {
7467
+ className,
7468
+ viewBox: "0 0 24 24",
7469
+ fill: "none",
7470
+ stroke: "currentColor",
7471
+ strokeWidth: 2,
7472
+ strokeLinecap: "round",
7473
+ strokeLinejoin: "round",
7474
+ children: [
7475
+ /* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "10" }),
7476
+ /* @__PURE__ */ jsx("path", { d: "M12 16v-4M12 8h.01" })
6167
7477
  ]
6168
7478
  }
6169
7479
  );
6170
7480
  }
7481
+ function CloseIcon({ className }) {
7482
+ return /* @__PURE__ */ jsx(
7483
+ "svg",
7484
+ {
7485
+ className,
7486
+ viewBox: "0 0 24 24",
7487
+ fill: "none",
7488
+ stroke: "currentColor",
7489
+ strokeWidth: 2,
7490
+ strokeLinecap: "round",
7491
+ strokeLinejoin: "round",
7492
+ children: /* @__PURE__ */ jsx("path", { d: "M18 6L6 18M6 6l12 12" })
7493
+ }
7494
+ );
7495
+ }
7496
+ var Banner = forwardRef(
7497
+ ({
7498
+ status = "information",
7499
+ emphasis = "subtle",
7500
+ size = "lg",
7501
+ title,
7502
+ description,
7503
+ icon,
7504
+ buttonLabel,
7505
+ onButtonClick,
7506
+ dismissible = true,
7507
+ onDismiss,
7508
+ className,
7509
+ ...rest
7510
+ }, ref) => {
7511
+ const colors = statusColors[status];
7512
+ const isBold = emphasis === "bold";
7513
+ const colorSet = isBold ? colors.bold : colors.subtle;
7514
+ const textColor = isBold ? "text-white" : colorSet.text;
7515
+ const descColor = isBold ? "text-white" : colorSet.descText;
7516
+ const buttonColor = isBold ? "text-white" : "text-grey-600";
7517
+ const iconSize4 = size === "sm" ? "size-4" : "size-6";
7518
+ const textSize2 = size === "sm" ? "text-xs" : "text-sm";
7519
+ return /* @__PURE__ */ jsxs(
7520
+ "div",
7521
+ {
7522
+ ref,
7523
+ role: "alert",
7524
+ className: cn(
7525
+ "flex items-center justify-between overflow-hidden rounded-[4px] w-full",
7526
+ colorSet.bg,
7527
+ size === "sm" ? "h-10 px-3 py-2" : "h-12 px-8 py-3",
7528
+ className
7529
+ ),
7530
+ ...rest,
7531
+ children: [
7532
+ /* @__PURE__ */ jsxs("div", { className: cn("flex flex-1 items-center", size === "sm" ? "gap-2" : "gap-3"), children: [
7533
+ 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) }),
7534
+ /* @__PURE__ */ jsx(
7535
+ "span",
7536
+ {
7537
+ className: cn("font-semibold leading-[1.45] whitespace-nowrap", textSize2, textColor),
7538
+ children: title
7539
+ }
7540
+ ),
7541
+ description && /* @__PURE__ */ jsx("span", { className: cn("leading-[1.45] whitespace-nowrap", textSize2, descColor), children: description }),
7542
+ buttonLabel && /* @__PURE__ */ jsx(
7543
+ "button",
7544
+ {
7545
+ type: "button",
7546
+ onClick: onButtonClick,
7547
+ className: cn(
7548
+ "shrink-0 font-semibold leading-[1.45] whitespace-nowrap cursor-pointer",
7549
+ textSize2,
7550
+ buttonColor,
7551
+ isBold && "text-white underline"
7552
+ ),
7553
+ children: buttonLabel
7554
+ }
7555
+ )
7556
+ ] }),
7557
+ dismissible && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 self-stretch shrink-0", children: [
7558
+ /* @__PURE__ */ jsx("div", { className: cn("w-px self-stretch", colorSet.divider) }),
7559
+ /* @__PURE__ */ jsx(
7560
+ "button",
7561
+ {
7562
+ type: "button",
7563
+ onClick: onDismiss,
7564
+ "aria-label": "Dismiss banner",
7565
+ className: cn("shrink-0 cursor-pointer", iconSize4, textColor),
7566
+ children: /* @__PURE__ */ jsx(CloseIcon, { className: "size-full" })
7567
+ }
7568
+ )
7569
+ ] })
7570
+ ]
7571
+ }
7572
+ );
7573
+ }
7574
+ );
7575
+ Banner.displayName = "Banner";
6171
7576
  var colorStyles = {
6172
7577
  orange: {
6173
7578
  filled: "bg-primary-400 text-white",
@@ -6221,21 +7626,21 @@ function Badge({
6221
7626
  ...rest
6222
7627
  }) {
6223
7628
  const colorClass = colorStyles[color][type];
6224
- const sizeConfig2 = sizeStyles[size];
7629
+ const sizeConfig3 = sizeStyles[size];
6225
7630
  return /* @__PURE__ */ jsxs(
6226
7631
  "span",
6227
7632
  {
6228
7633
  className: cn(
6229
7634
  "inline-flex items-center rounded-xl font-medium whitespace-nowrap",
6230
- sizeConfig2.container,
7635
+ sizeConfig3.container,
6231
7636
  colorClass,
6232
7637
  className
6233
7638
  ),
6234
7639
  ...rest,
6235
7640
  children: [
6236
- leadingIcon && /* @__PURE__ */ jsx("span", { className: cn("shrink-0", sizeConfig2.icon), children: resolveIcon(leadingIcon, "xs") }),
7641
+ leadingIcon && /* @__PURE__ */ jsx("span", { className: cn("shrink-0", sizeConfig3.icon), children: resolveIcon(leadingIcon, "xs") }),
6237
7642
  children,
6238
- trailingIcon && /* @__PURE__ */ jsx("span", { className: cn("shrink-0", sizeConfig2.icon), children: resolveIcon(trailingIcon, "xs") })
7643
+ trailingIcon && /* @__PURE__ */ jsx("span", { className: cn("shrink-0", sizeConfig3.icon), children: resolveIcon(trailingIcon, "xs") })
6239
7644
  ]
6240
7645
  }
6241
7646
  );
@@ -6470,7 +7875,7 @@ function Arrow({ position, theme }) {
6470
7875
  }
6471
7876
  ) });
6472
7877
  }
6473
- var Tooltip = forwardRef(
7878
+ var Tooltip2 = forwardRef(
6474
7879
  ({
6475
7880
  theme = "light",
6476
7881
  position = "top-left",
@@ -6557,7 +7962,7 @@ var Tooltip = forwardRef(
6557
7962
  );
6558
7963
  }
6559
7964
  );
6560
- Tooltip.displayName = "Tooltip";
7965
+ Tooltip2.displayName = "Tooltip";
6561
7966
  function range(start, end) {
6562
7967
  const arr = [];
6563
7968
  for (let i = start; i <= end; i++) arr.push(i);
@@ -6585,8 +7990,8 @@ function getPageNumbers(currentPage, totalPages, siblingCount) {
6585
7990
  const middleRange = range(leftSiblingIndex, rightSiblingIndex);
6586
7991
  return [1, "...", ...middleRange, "...", totalPages];
6587
7992
  }
6588
- var ChevronLeft = () => /* @__PURE__ */ jsx(Icon, { name: "chevron-left", size: "md" });
6589
- var ChevronRight = () => /* @__PURE__ */ jsx(Icon, { name: "chevron-right", size: "md" });
7993
+ var ChevronLeft2 = () => /* @__PURE__ */ jsx(Icon, { name: "chevron-left", size: "md" });
7994
+ var ChevronRight2 = () => /* @__PURE__ */ jsx(Icon, { name: "chevron-right", size: "md" });
6590
7995
  function Pagination({
6591
7996
  currentPage,
6592
7997
  totalPages,
@@ -6607,7 +8012,7 @@ function Pagination({
6607
8012
  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
8013
  "aria-label": "Previous page",
6609
8014
  children: [
6610
- /* @__PURE__ */ jsx(ChevronLeft, {}),
8015
+ /* @__PURE__ */ jsx(ChevronLeft2, {}),
6611
8016
  /* @__PURE__ */ jsx("span", { children: "Previous" })
6612
8017
  ]
6613
8018
  }
@@ -6645,7 +8050,7 @@ function Pagination({
6645
8050
  "aria-label": "Next page",
6646
8051
  children: [
6647
8052
  /* @__PURE__ */ jsx("span", { children: "Next" }),
6648
- /* @__PURE__ */ jsx(ChevronRight, {})
8053
+ /* @__PURE__ */ jsx(ChevronRight2, {})
6649
8054
  ]
6650
8055
  }
6651
8056
  )
@@ -6782,35 +8187,92 @@ var Toggle = forwardRef(
6782
8187
  }
6783
8188
  );
6784
8189
  Toggle.displayName = "Toggle";
6785
- function Breadcrumb({ items, separator = "/", className, ...rest }) {
8190
+ function ChevronRight3({ className }) {
8191
+ return /* @__PURE__ */ jsx(
8192
+ "svg",
8193
+ {
8194
+ className,
8195
+ viewBox: "0 0 20 20",
8196
+ fill: "none",
8197
+ stroke: "currentColor",
8198
+ strokeWidth: 2,
8199
+ strokeLinecap: "round",
8200
+ strokeLinejoin: "round",
8201
+ children: /* @__PURE__ */ jsx("path", { d: "M7.5 5l5 5-5 5" })
8202
+ }
8203
+ );
8204
+ }
8205
+ function DoubleChevronRight({ className }) {
8206
+ return /* @__PURE__ */ jsx(
8207
+ "svg",
8208
+ {
8209
+ className,
8210
+ viewBox: "0 0 20 20",
8211
+ fill: "none",
8212
+ stroke: "currentColor",
8213
+ strokeWidth: 2,
8214
+ strokeLinecap: "round",
8215
+ strokeLinejoin: "round",
8216
+ children: /* @__PURE__ */ jsx("path", { d: "M5.5 5l5 5-5 5M10.5 5l5 5-5 5" })
8217
+ }
8218
+ );
8219
+ }
8220
+ function SeparatorElement({ type }) {
8221
+ switch (type) {
8222
+ case "chevron":
8223
+ return /* @__PURE__ */ jsx(ChevronRight3, { className: "size-5 text-grey-300" });
8224
+ case "double-chevron":
8225
+ return /* @__PURE__ */ jsx(DoubleChevronRight, { className: "size-5 text-grey-300" });
8226
+ case "slash":
8227
+ return /* @__PURE__ */ jsx("span", { className: "text-sm font-medium text-grey-300 w-4 text-center", children: "/" });
8228
+ }
8229
+ }
8230
+ function Breadcrumb({
8231
+ items,
8232
+ separator = "chevron",
8233
+ hasBorders = false,
8234
+ className,
8235
+ ...rest
8236
+ }) {
6786
8237
  return /* @__PURE__ */ jsx(
6787
8238
  "nav",
6788
8239
  {
6789
8240
  "aria-label": "Breadcrumb",
6790
- className: cn("border-y border-grey-200 px-4 py-2.5", className),
8241
+ className: cn("py-2.5", hasBorders && "border-y border-grey-100", className),
6791
8242
  ...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
- )
8243
+ 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: [
8244
+ i > 0 && /* @__PURE__ */ jsx("span", { "aria-hidden": true, children: /* @__PURE__ */ jsx(SeparatorElement, { type: separator }) }),
8245
+ /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-2", children: [
8246
+ item.icon && /* @__PURE__ */ jsx(
8247
+ "span",
8248
+ {
8249
+ className: cn(
8250
+ "size-5 shrink-0",
8251
+ item.active ? "text-primary-400" : item.disabled ? "text-grey-300" : "text-grey-500 group-hover:text-grey-700"
8252
+ ),
8253
+ children: resolveIcon(item.icon, "sm")
8254
+ }
8255
+ ),
8256
+ item.href && !item.disabled && !item.active ? /* @__PURE__ */ jsx(
8257
+ "a",
8258
+ {
8259
+ href: item.href,
8260
+ className: "text-grey-500 hover:text-grey-700 hover:underline transition-colors",
8261
+ children: item.label
8262
+ }
8263
+ ) : /* @__PURE__ */ jsx(
8264
+ "span",
8265
+ {
8266
+ className: cn(
8267
+ item.active && "text-primary-400",
8268
+ item.disabled && "text-grey-300 cursor-not-allowed",
8269
+ !item.active && !item.disabled && "text-grey-500"
8270
+ ),
8271
+ "aria-current": item.active ? "page" : void 0,
8272
+ children: item.label
8273
+ }
8274
+ )
8275
+ ] })
6814
8276
  ] }, i)) })
6815
8277
  }
6816
8278
  );
@@ -6831,7 +8293,7 @@ var initialsFontSize = {
6831
8293
  xl: "text-[18px] leading-[1.45]",
6832
8294
  "2xl": "text-[20px] leading-[1.2] tracking-[-0.4px]"
6833
8295
  };
6834
- var iconSize = {
8296
+ var iconSize3 = {
6835
8297
  xs: "xs",
6836
8298
  sm: "sm",
6837
8299
  md: "md",
@@ -6906,7 +8368,7 @@ var Avatar = forwardRef(
6906
8368
  ...rest,
6907
8369
  children: [
6908
8370
  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] }) }),
8371
+ 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
8372
  type === "initials" && /* @__PURE__ */ jsx(
6911
8373
  "div",
6912
8374
  {
@@ -6948,6 +8410,202 @@ var AvatarGroup = forwardRef(
6948
8410
  }
6949
8411
  );
6950
8412
  AvatarGroup.displayName = "AvatarGroup";
8413
+ function CloseIcon2({ className }) {
8414
+ return /* @__PURE__ */ jsx(
8415
+ "svg",
8416
+ {
8417
+ className,
8418
+ viewBox: "0 0 12 12",
8419
+ fill: "none",
8420
+ stroke: "currentColor",
8421
+ strokeWidth: 1.5,
8422
+ strokeLinecap: "round",
8423
+ strokeLinejoin: "round",
8424
+ children: /* @__PURE__ */ jsx("path", { d: "M9 3L3 9M3 3l6 6" })
8425
+ }
8426
+ );
8427
+ }
8428
+ function BoxIcon({ className }) {
8429
+ return /* @__PURE__ */ jsxs(
8430
+ "svg",
8431
+ {
8432
+ className,
8433
+ viewBox: "0 0 16 16",
8434
+ fill: "none",
8435
+ stroke: "currentColor",
8436
+ strokeWidth: 1.2,
8437
+ strokeLinecap: "round",
8438
+ strokeLinejoin: "round",
8439
+ children: [
8440
+ /* @__PURE__ */ jsx("path", { d: "M2.67 4.67L8 7.33l5.33-2.66M8 14V7.33" }),
8441
+ /* @__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" })
8442
+ ]
8443
+ }
8444
+ );
8445
+ }
8446
+ var sizeClasses2 = {
8447
+ sm: "w-[400px]",
8448
+ md: "w-[500px]",
8449
+ lg: "w-[640px]"
8450
+ };
8451
+ var Modal = forwardRef(
8452
+ ({
8453
+ open,
8454
+ onClose,
8455
+ size = "sm",
8456
+ title,
8457
+ description,
8458
+ icon,
8459
+ showClose = true,
8460
+ primaryLabel = "Save",
8461
+ onPrimaryClick,
8462
+ secondaryLabel,
8463
+ onSecondaryClick,
8464
+ footerOrientation = "horizontal",
8465
+ closeOnOverlay = true,
8466
+ closeOnEscape = true,
8467
+ blur = true,
8468
+ children,
8469
+ className,
8470
+ ...rest
8471
+ }, ref) => {
8472
+ const overlayRef = useRef(null);
8473
+ useEffect(() => {
8474
+ if (!open || !closeOnEscape) return;
8475
+ const handler = (e) => {
8476
+ if (e.key === "Escape") onClose();
8477
+ };
8478
+ document.addEventListener("keydown", handler);
8479
+ return () => document.removeEventListener("keydown", handler);
8480
+ }, [open, closeOnEscape, onClose]);
8481
+ useEffect(() => {
8482
+ if (!open) return;
8483
+ const prev = document.body.style.overflow;
8484
+ document.body.style.overflow = "hidden";
8485
+ return () => {
8486
+ document.body.style.overflow = prev;
8487
+ };
8488
+ }, [open]);
8489
+ const handleOverlayClick = useCallback(
8490
+ (e) => {
8491
+ if (closeOnOverlay && e.target === overlayRef.current) onClose();
8492
+ },
8493
+ [closeOnOverlay, onClose]
8494
+ );
8495
+ if (!open) return null;
8496
+ const isVertical = footerOrientation === "vertical";
8497
+ const modal = /* @__PURE__ */ jsxs(
8498
+ "div",
8499
+ {
8500
+ ref: overlayRef,
8501
+ className: cn(
8502
+ "fixed inset-0 z-50 flex items-center justify-center",
8503
+ blur && "backdrop-blur-md"
8504
+ ),
8505
+ onClick: handleOverlayClick,
8506
+ role: "presentation",
8507
+ children: [
8508
+ /* @__PURE__ */ jsx("div", { className: "absolute inset-0 bg-black/60" }),
8509
+ /* @__PURE__ */ jsxs(
8510
+ "div",
8511
+ {
8512
+ ref,
8513
+ role: "dialog",
8514
+ "aria-modal": "true",
8515
+ "aria-labelledby": title ? "modal-title" : void 0,
8516
+ "aria-describedby": description ? "modal-desc" : void 0,
8517
+ className: cn(
8518
+ "relative flex flex-col bg-white dark:bg-grey-50 rounded-xl shadow-soft-xl overflow-hidden",
8519
+ sizeClasses2[size],
8520
+ className
8521
+ ),
8522
+ ...rest,
8523
+ children: [
8524
+ (title || showClose) && /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-2 pt-5 pb-2 px-4", children: [
8525
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-1 gap-4 items-start min-w-0", children: [
8526
+ 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,
8527
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col flex-1 min-w-0", children: [
8528
+ title && /* @__PURE__ */ jsx(
8529
+ "h2",
8530
+ {
8531
+ id: "modal-title",
8532
+ className: "text-xl font-semibold text-grey-700 leading-[1.2] tracking-[-0.4px]",
8533
+ children: title
8534
+ }
8535
+ ),
8536
+ description && /* @__PURE__ */ jsx("p", { id: "modal-desc", className: "text-sm text-grey-500 leading-[1.45]", children: description })
8537
+ ] })
8538
+ ] }),
8539
+ showClose && /* @__PURE__ */ jsx(
8540
+ "button",
8541
+ {
8542
+ type: "button",
8543
+ onClick: onClose,
8544
+ "aria-label": "Close modal",
8545
+ className: "shrink-0 flex items-center justify-center p-1.5 bg-grey-75 rounded-xl hover:bg-grey-200 transition-colors cursor-pointer",
8546
+ children: /* @__PURE__ */ jsx(CloseIcon2, { className: "size-3" })
8547
+ }
8548
+ )
8549
+ ] }),
8550
+ children && /* @__PURE__ */ jsx("div", { className: "flex-1 px-4 py-4 overflow-y-auto", children }),
8551
+ (primaryLabel || secondaryLabel) && /* @__PURE__ */ jsx(
8552
+ "div",
8553
+ {
8554
+ className: cn(
8555
+ "py-5",
8556
+ isVertical ? "flex flex-col gap-5 items-center px-4" : "flex items-center justify-end gap-3 px-4"
8557
+ ),
8558
+ children: isVertical ? /* @__PURE__ */ jsxs(Fragment, { children: [
8559
+ /* @__PURE__ */ jsx(
8560
+ "button",
8561
+ {
8562
+ type: "button",
8563
+ onClick: onPrimaryClick,
8564
+ className: "w-full bg-primary-400 text-white text-sm font-semibold p-2 rounded-xl hover:bg-primary-500 transition-colors cursor-pointer",
8565
+ children: primaryLabel
8566
+ }
8567
+ ),
8568
+ secondaryLabel && /* @__PURE__ */ jsx(
8569
+ "button",
8570
+ {
8571
+ type: "button",
8572
+ onClick: onSecondaryClick ?? onClose,
8573
+ 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",
8574
+ children: secondaryLabel
8575
+ }
8576
+ )
8577
+ ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
8578
+ secondaryLabel && /* @__PURE__ */ jsx(
8579
+ "button",
8580
+ {
8581
+ type: "button",
8582
+ onClick: onSecondaryClick ?? onClose,
8583
+ 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",
8584
+ children: secondaryLabel
8585
+ }
8586
+ ),
8587
+ /* @__PURE__ */ jsx(
8588
+ "button",
8589
+ {
8590
+ type: "button",
8591
+ onClick: onPrimaryClick,
8592
+ className: "flex-1 bg-primary-400 text-white text-sm font-semibold p-2 rounded-xl hover:bg-primary-500 transition-colors cursor-pointer",
8593
+ children: primaryLabel
8594
+ }
8595
+ )
8596
+ ] })
8597
+ }
8598
+ )
8599
+ ]
8600
+ }
8601
+ )
8602
+ ]
8603
+ }
8604
+ );
8605
+ return createPortal(modal, document.body);
8606
+ }
8607
+ );
8608
+ Modal.displayName = "Modal";
6951
8609
  var trendStyles = {
6952
8610
  up: "bg-primary-50 text-primary-700",
6953
8611
  down: "bg-error-50 text-error-700"
@@ -7374,6 +9032,8 @@ var FileUploadDropZone = forwardRef(
7374
9032
  "div",
7375
9033
  {
7376
9034
  ref,
9035
+ role: "region",
9036
+ "aria-label": "File upload dropzone",
7377
9037
  className: cn(
7378
9038
  "flex flex-col items-center justify-center rounded-xl p-8 transition-colors",
7379
9039
  state === "dragging" ? "border-2 border-dashed border-primary-400 bg-primary-50/10" : state === "uploading" || state === "success" || state === "error" ? "border border-grey-200 bg-white dark:bg-grey-50" : "border-2 border-dashed border-grey-300 bg-white dark:bg-grey-50",
@@ -7394,11 +9054,12 @@ var FileUploadDropZone = forwardRef(
7394
9054
  multiple,
7395
9055
  onChange: handleFileChange,
7396
9056
  className: "sr-only",
7397
- tabIndex: -1
9057
+ tabIndex: -1,
9058
+ "aria-label": multiple ? "Choose files to upload" : "Choose file to upload"
7398
9059
  }
7399
9060
  ),
7400
9061
  (state === "default" || state === "dragging") && /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-4", children: [
7401
- /* @__PURE__ */ jsx(UploadStateIcon, { state: "default", size: 56 }),
9062
+ /* @__PURE__ */ jsx(UploadStateIcon, { state: "default", size: 56, "aria-hidden": "true" }),
7402
9063
  /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-1", children: [
7403
9064
  /* @__PURE__ */ jsxs("p", { className: "text-body-sm font-medium text-grey-600", children: [
7404
9065
  "Click to upload ",
@@ -7408,12 +9069,12 @@ var FileUploadDropZone = forwardRef(
7408
9069
  ] }),
7409
9070
  /* @__PURE__ */ jsx(Button, { variant: "primary", size: "sm", onClick: handleBrowse, children: "Browse Files" })
7410
9071
  ] }),
7411
- state === "uploading" && uploadingFile && /* @__PURE__ */ jsxs("div", { className: "flex w-full flex-col items-center gap-4", children: [
7412
- /* @__PURE__ */ jsx(FileTypeIcon, { type: getFileType(uploadingFile.name) }),
9072
+ state === "uploading" && uploadingFile && /* @__PURE__ */ jsxs("div", { className: "flex w-full flex-col items-center gap-4", "aria-live": "polite", "aria-atomic": "true", children: [
9073
+ /* @__PURE__ */ jsx(FileTypeIcon, { type: getFileType(uploadingFile.name), "aria-hidden": "true" }),
7413
9074
  /* @__PURE__ */ jsxs("div", { className: "flex w-full max-w-xs flex-col gap-2", children: [
7414
9075
  /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
7415
9076
  /* @__PURE__ */ jsx("span", { className: "text-body-sm font-medium text-grey-700 truncate", children: uploadingFile.name }),
7416
- /* @__PURE__ */ jsxs("span", { className: "text-body-xs font-medium text-grey-500 ml-2 shrink-0", children: [
9077
+ /* @__PURE__ */ jsxs("span", { className: "text-body-xs font-medium text-grey-500 ml-2 shrink-0", "aria-label": `Upload progress: ${Math.round(uploadingFile.progress)} percent`, children: [
7417
9078
  Math.round(uploadingFile.progress),
7418
9079
  "%"
7419
9080
  ] })
@@ -7421,8 +9082,8 @@ var FileUploadDropZone = forwardRef(
7421
9082
  /* @__PURE__ */ jsx(ProgressBar, { value: uploadingFile.progress, size: "sm", showPercentage: false })
7422
9083
  ] })
7423
9084
  ] }),
7424
- state === "success" && /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-4", children: [
7425
- /* @__PURE__ */ jsx(UploadStateIcon, { state: "success", size: 56 }),
9085
+ state === "success" && /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-4", role: "status", children: [
9086
+ /* @__PURE__ */ jsx(UploadStateIcon, { state: "success", size: 56, "aria-hidden": "true" }),
7426
9087
  /* @__PURE__ */ jsx("div", { className: "flex flex-col items-center gap-1", children: /* @__PURE__ */ jsx("p", { className: "text-body-sm font-semibold text-grey-800", children: "Document Uploaded Successfully" }) }),
7427
9088
  /* @__PURE__ */ jsx(
7428
9089
  "button",
@@ -7434,8 +9095,8 @@ var FileUploadDropZone = forwardRef(
7434
9095
  }
7435
9096
  )
7436
9097
  ] }),
7437
- state === "error" && /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-4", children: [
7438
- /* @__PURE__ */ jsx(UploadStateIcon, { state: "error", size: 56 }),
9098
+ state === "error" && /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-4", role: "alert", children: [
9099
+ /* @__PURE__ */ jsx(UploadStateIcon, { state: "error", size: 56, "aria-hidden": "true" }),
7439
9100
  /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-1", children: [
7440
9101
  /* @__PURE__ */ jsx("p", { className: "text-body-sm font-semibold text-grey-800", children: "Failed to Upload" }),
7441
9102
  errorMessage && /* @__PURE__ */ jsx("p", { className: "text-body-xs text-grey-400", children: errorMessage })
@@ -7767,7 +9428,7 @@ var SidebarMenu = forwardRef(
7767
9428
  "nav",
7768
9429
  {
7769
9430
  ref,
7770
- role: "navigation",
9431
+ "aria-label": "Main navigation",
7771
9432
  className: cn(
7772
9433
  "flex flex-col gap-3 overflow-y-auto rounded-xl py-6",
7773
9434
  ts.container,
@@ -7857,7 +9518,7 @@ var SidebarMenuItem = forwardRef(
7857
9518
  onClick: () => {
7858
9519
  if (!disabled && !isExpandable) onSelect(value);
7859
9520
  },
7860
- title: typeof labelContent === "string" ? labelContent : void 0,
9521
+ "aria-label": typeof labelContent === "string" ? labelContent : void 0,
7861
9522
  className: cn(
7862
9523
  "flex size-11 cursor-pointer items-center justify-center rounded transition-colors",
7863
9524
  highlighted ? cn(ts.selectedBg, ts.selectedIcon) : cn(ts.defaultIcon, ts.hoverBg),
@@ -7876,6 +9537,8 @@ var SidebarMenuItem = forwardRef(
7876
9537
  ref,
7877
9538
  type: "button",
7878
9539
  role: "menuitem",
9540
+ "aria-expanded": isExpandable ? open : void 0,
9541
+ "aria-haspopup": isExpandable ? "menu" : void 0,
7879
9542
  disabled,
7880
9543
  onClick: handleClick,
7881
9544
  className: cn(
@@ -7903,6 +9566,7 @@ var SidebarMenuItem = forwardRef(
7903
9566
  {
7904
9567
  name: open ? "chevron-up" : "chevron-down",
7905
9568
  size: "sm",
9569
+ "aria-hidden": "true",
7906
9570
  className: cn(
7907
9571
  "ml-1 shrink-0 transition-transform",
7908
9572
  highlighted ? ts.selectedIcon : ts.defaultIcon
@@ -11367,6 +13031,7 @@ var TableHead = forwardRef(
11367
13031
  {
11368
13032
  name: sortDirection === "asc" ? "chevron-up" : "chevron-down",
11369
13033
  size: "sm",
13034
+ "aria-hidden": "true",
11370
13035
  className: cn("shrink-0", sortDirection ? "text-grey-700" : "text-grey-400")
11371
13036
  }
11372
13037
  )
@@ -11623,6 +13288,760 @@ var DropdownMenuSeparator = forwardRef(
11623
13288
  ({ className, ...rest }, ref) => /* @__PURE__ */ jsx("div", { ref, role: "separator", className: cn("my-1 h-px bg-grey-100", className), ...rest })
11624
13289
  );
11625
13290
  DropdownMenuSeparator.displayName = "DropdownMenuSeparator";
13291
+ var sizeMap2 = {
13292
+ xs: 20,
13293
+ sm: 24,
13294
+ md: 32,
13295
+ lg: 40,
13296
+ xl: 48,
13297
+ "2xl": 56,
13298
+ "3xl": 64
13299
+ };
13300
+ function ThinSpinner({ size, color }) {
13301
+ const r = size / 2 - 2;
13302
+ const c = size / 2;
13303
+ return /* @__PURE__ */ jsxs("svg", { width: size, height: size, viewBox: `0 0 ${size} ${size}`, className: "animate-spin", children: [
13304
+ /* @__PURE__ */ jsx(
13305
+ "circle",
13306
+ {
13307
+ cx: c,
13308
+ cy: c,
13309
+ r,
13310
+ fill: "none",
13311
+ stroke: "currentColor",
13312
+ strokeWidth: 1.5,
13313
+ opacity: 0.2,
13314
+ className: color
13315
+ }
13316
+ ),
13317
+ /* @__PURE__ */ jsx(
13318
+ "circle",
13319
+ {
13320
+ cx: c,
13321
+ cy: c,
13322
+ r,
13323
+ fill: "none",
13324
+ stroke: "currentColor",
13325
+ strokeWidth: 1.5,
13326
+ strokeDasharray: `${r * Math.PI * 0.75} ${r * Math.PI * 1.25}`,
13327
+ strokeLinecap: "round",
13328
+ className: color
13329
+ }
13330
+ )
13331
+ ] });
13332
+ }
13333
+ function BoldSpinner({ size, color }) {
13334
+ const sw = Math.max(2.5, size * 0.1);
13335
+ const r = size / 2 - sw;
13336
+ const c = size / 2;
13337
+ return /* @__PURE__ */ jsxs("svg", { width: size, height: size, viewBox: `0 0 ${size} ${size}`, className: "animate-spin", children: [
13338
+ /* @__PURE__ */ jsx(
13339
+ "circle",
13340
+ {
13341
+ cx: c,
13342
+ cy: c,
13343
+ r,
13344
+ fill: "none",
13345
+ stroke: "currentColor",
13346
+ strokeWidth: sw,
13347
+ opacity: 0.2,
13348
+ className: color
13349
+ }
13350
+ ),
13351
+ /* @__PURE__ */ jsx(
13352
+ "circle",
13353
+ {
13354
+ cx: c,
13355
+ cy: c,
13356
+ r,
13357
+ fill: "none",
13358
+ stroke: "currentColor",
13359
+ strokeWidth: sw,
13360
+ strokeDasharray: `${r * Math.PI * 0.75} ${r * Math.PI * 1.25}`,
13361
+ strokeLinecap: "round",
13362
+ className: color
13363
+ }
13364
+ )
13365
+ ] });
13366
+ }
13367
+ function DuoToneSpinner({ size, color }) {
13368
+ const sw = Math.max(2, size * 0.08);
13369
+ const r = size / 2 - sw;
13370
+ const c = size / 2;
13371
+ return /* @__PURE__ */ jsxs("svg", { width: size, height: size, viewBox: `0 0 ${size} ${size}`, className: "animate-spin", children: [
13372
+ /* @__PURE__ */ jsx(
13373
+ "circle",
13374
+ {
13375
+ cx: c,
13376
+ cy: c,
13377
+ r,
13378
+ fill: "none",
13379
+ stroke: "currentColor",
13380
+ strokeWidth: sw,
13381
+ opacity: 0.15,
13382
+ className: color
13383
+ }
13384
+ ),
13385
+ /* @__PURE__ */ jsx(
13386
+ "circle",
13387
+ {
13388
+ cx: c,
13389
+ cy: c,
13390
+ r,
13391
+ fill: "none",
13392
+ stroke: "currentColor",
13393
+ strokeWidth: sw,
13394
+ strokeDasharray: `${r * Math.PI} ${r * Math.PI}`,
13395
+ strokeLinecap: "round",
13396
+ className: color
13397
+ }
13398
+ )
13399
+ ] });
13400
+ }
13401
+ function BufferingThinSpinner({ size, color }) {
13402
+ const r = size / 2 - 2;
13403
+ const c = size / 2;
13404
+ const circumference = 2 * Math.PI * r;
13405
+ return /* @__PURE__ */ jsxs("svg", { width: size, height: size, viewBox: `0 0 ${size} ${size}`, children: [
13406
+ /* @__PURE__ */ jsx(
13407
+ "circle",
13408
+ {
13409
+ cx: c,
13410
+ cy: c,
13411
+ r,
13412
+ fill: "none",
13413
+ stroke: "currentColor",
13414
+ strokeWidth: 1.5,
13415
+ opacity: 0.2,
13416
+ className: color
13417
+ }
13418
+ ),
13419
+ /* @__PURE__ */ jsx(
13420
+ "circle",
13421
+ {
13422
+ cx: c,
13423
+ cy: c,
13424
+ r,
13425
+ fill: "none",
13426
+ stroke: "currentColor",
13427
+ strokeWidth: 1.5,
13428
+ strokeLinecap: "round",
13429
+ className: cn(color, "animate-[spinner-dash_1.5s_ease-in-out_infinite]"),
13430
+ style: { strokeDasharray: circumference, transformOrigin: "center" }
13431
+ }
13432
+ )
13433
+ ] });
13434
+ }
13435
+ function BufferingBoldSpinner({ size, color }) {
13436
+ const sw = Math.max(2.5, size * 0.1);
13437
+ const r = size / 2 - sw;
13438
+ const c = size / 2;
13439
+ const circumference = 2 * Math.PI * r;
13440
+ return /* @__PURE__ */ jsxs("svg", { width: size, height: size, viewBox: `0 0 ${size} ${size}`, children: [
13441
+ /* @__PURE__ */ jsx(
13442
+ "circle",
13443
+ {
13444
+ cx: c,
13445
+ cy: c,
13446
+ r,
13447
+ fill: "none",
13448
+ stroke: "currentColor",
13449
+ strokeWidth: sw,
13450
+ opacity: 0.2,
13451
+ className: color
13452
+ }
13453
+ ),
13454
+ /* @__PURE__ */ jsx(
13455
+ "circle",
13456
+ {
13457
+ cx: c,
13458
+ cy: c,
13459
+ r,
13460
+ fill: "none",
13461
+ stroke: "currentColor",
13462
+ strokeWidth: sw,
13463
+ strokeLinecap: "round",
13464
+ className: cn(color, "animate-[spinner-dash_1.5s_ease-in-out_infinite]"),
13465
+ style: { strokeDasharray: circumference, transformOrigin: "center" }
13466
+ }
13467
+ )
13468
+ ] });
13469
+ }
13470
+ function DotSpinner({ size, color }) {
13471
+ const dotSize = Math.max(3, size * 0.15);
13472
+ const c = size / 2;
13473
+ const r = size / 2 - dotSize;
13474
+ 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) => {
13475
+ const angle = i * 45 * Math.PI / 180;
13476
+ const x = c + r * Math.cos(angle);
13477
+ const y = c + r * Math.sin(angle);
13478
+ return /* @__PURE__ */ jsx(
13479
+ "circle",
13480
+ {
13481
+ cx: x,
13482
+ cy: y,
13483
+ r: dotSize / 2,
13484
+ fill: "currentColor",
13485
+ opacity: 0.15 + i / 8 * 0.85,
13486
+ className: color
13487
+ },
13488
+ i
13489
+ );
13490
+ }) });
13491
+ }
13492
+ function JugglingSpinner({ size, color }) {
13493
+ const dotSize = Math.max(3, size * 0.18);
13494
+ return /* @__PURE__ */ jsx("svg", { width: size, height: size, viewBox: `0 0 ${size} ${size}`, children: [0, 1, 2].map((i) => {
13495
+ const cx = size / 2 + (i - 1) * (size * 0.35);
13496
+ return /* @__PURE__ */ jsx(
13497
+ "circle",
13498
+ {
13499
+ cx,
13500
+ cy: size / 2,
13501
+ r: dotSize / 2,
13502
+ fill: "currentColor",
13503
+ className: cn(color, "animate-[juggle_1.4s_ease-in-out_infinite]"),
13504
+ style: { animationDelay: `${i * 0.16}s` }
13505
+ },
13506
+ i
13507
+ );
13508
+ }) });
13509
+ }
13510
+ var Spinner = forwardRef(
13511
+ ({
13512
+ type = "thin",
13513
+ size = "md",
13514
+ colorStyle = "brand",
13515
+ label,
13516
+ labelPosition = "after",
13517
+ className,
13518
+ ...rest
13519
+ }, ref) => {
13520
+ const px = sizeMap2[size];
13521
+ const color = colorStyle === "brand" ? "text-primary-400" : "text-white";
13522
+ const labelColor = colorStyle === "brand" ? "text-grey-900" : "text-white";
13523
+ const spinnerEl = (() => {
13524
+ switch (type) {
13525
+ case "thin":
13526
+ return /* @__PURE__ */ jsx(ThinSpinner, { size: px, color });
13527
+ case "bold":
13528
+ return /* @__PURE__ */ jsx(BoldSpinner, { size: px, color });
13529
+ case "duo-tone":
13530
+ return /* @__PURE__ */ jsx(DuoToneSpinner, { size: px, color });
13531
+ case "buffering-thin":
13532
+ return /* @__PURE__ */ jsx(BufferingThinSpinner, { size: px, color });
13533
+ case "buffering-bold":
13534
+ return /* @__PURE__ */ jsx(BufferingBoldSpinner, { size: px, color });
13535
+ case "dot":
13536
+ return /* @__PURE__ */ jsx(DotSpinner, { size: px, color });
13537
+ case "juggling":
13538
+ return /* @__PURE__ */ jsx(JugglingSpinner, { size: px, color });
13539
+ }
13540
+ })();
13541
+ const isVertical = labelPosition === "above" || labelPosition === "below";
13542
+ const isReversed = labelPosition === "before" || labelPosition === "above";
13543
+ return /* @__PURE__ */ jsxs(
13544
+ "div",
13545
+ {
13546
+ ref,
13547
+ role: "status",
13548
+ "aria-label": label || "Loading",
13549
+ className: cn(
13550
+ "inline-flex items-center gap-2",
13551
+ isVertical && "flex-col",
13552
+ isReversed && (isVertical ? "flex-col-reverse" : "flex-row-reverse"),
13553
+ className
13554
+ ),
13555
+ ...rest,
13556
+ children: [
13557
+ /* @__PURE__ */ jsx("div", { className: "shrink-0", style: { width: px, height: px }, children: spinnerEl }),
13558
+ label && /* @__PURE__ */ jsx("span", { className: cn("text-sm leading-[1.45] whitespace-nowrap", labelColor), children: label })
13559
+ ]
13560
+ }
13561
+ );
13562
+ }
13563
+ );
13564
+ Spinner.displayName = "Spinner";
13565
+ function CheckIcon({ className }) {
13566
+ return /* @__PURE__ */ jsx(
13567
+ "svg",
13568
+ {
13569
+ className,
13570
+ viewBox: "0 0 24 24",
13571
+ fill: "none",
13572
+ stroke: "currentColor",
13573
+ strokeWidth: 3,
13574
+ strokeLinecap: "round",
13575
+ strokeLinejoin: "round",
13576
+ children: /* @__PURE__ */ jsx("path", { d: "M5 12l5 5L20 7" })
13577
+ }
13578
+ );
13579
+ }
13580
+ function StepCircle({
13581
+ status,
13582
+ indicator,
13583
+ stepNumber,
13584
+ icon
13585
+ }) {
13586
+ const isCompleted = status === "completed";
13587
+ const isActive = status === "active";
13588
+ const isDisabled = status === "disabled";
13589
+ return /* @__PURE__ */ jsx(
13590
+ "div",
13591
+ {
13592
+ className: cn(
13593
+ "shrink-0 flex items-center justify-center rounded-full size-6 border transition-colors",
13594
+ isCompleted && "bg-primary-400 border-primary-400 text-white",
13595
+ isActive && "bg-primary-50 border-primary-400 text-primary-400",
13596
+ !isCompleted && !isActive && !isDisabled && "bg-white dark:bg-grey-50 border-grey-300",
13597
+ isDisabled && "bg-grey-100 border-grey-200 text-grey-300"
13598
+ ),
13599
+ children: isCompleted ? icon ?? /* @__PURE__ */ jsx(CheckIcon, { className: "size-3.5" }) : indicator === "dot" ? /* @__PURE__ */ jsx(
13600
+ "div",
13601
+ {
13602
+ className: cn(
13603
+ "size-2 rounded-full border",
13604
+ isActive ? "bg-primary-400 border-primary-400" : isDisabled ? "bg-grey-300 border-grey-300" : "bg-grey-400 border-grey-300"
13605
+ )
13606
+ }
13607
+ ) : indicator === "number" ? /* @__PURE__ */ jsx(
13608
+ "span",
13609
+ {
13610
+ className: cn(
13611
+ "text-xs font-medium",
13612
+ isActive ? "text-primary-400" : isDisabled ? "text-grey-300" : "text-grey-500"
13613
+ ),
13614
+ children: stepNumber
13615
+ }
13616
+ ) : icon ?? /* @__PURE__ */ jsx(
13617
+ "div",
13618
+ {
13619
+ className: cn(
13620
+ "size-2 rounded-full",
13621
+ isActive ? "bg-primary-400" : isDisabled ? "bg-grey-300" : "bg-grey-400"
13622
+ )
13623
+ }
13624
+ )
13625
+ }
13626
+ );
13627
+ }
13628
+ function Connector({
13629
+ orientation,
13630
+ completed
13631
+ }) {
13632
+ return orientation === "horizontal" ? /* @__PURE__ */ jsx(
13633
+ "div",
13634
+ {
13635
+ className: cn("flex-1 h-0.5 rounded-full", completed ? "bg-primary-400" : "bg-grey-300")
13636
+ }
13637
+ ) : /* @__PURE__ */ jsx(
13638
+ "div",
13639
+ {
13640
+ className: cn(
13641
+ "w-0.5 flex-1 min-h-[20px] ml-[11px] rounded-full",
13642
+ completed ? "bg-primary-400" : "bg-grey-300"
13643
+ )
13644
+ }
13645
+ );
13646
+ }
13647
+ function resolveStatuses(steps, activeStep) {
13648
+ if (activeStep !== void 0) {
13649
+ return steps.map((s, i) => {
13650
+ if (s.status === "disabled") return "disabled";
13651
+ if (i < activeStep) return "completed";
13652
+ if (i === activeStep) return "active";
13653
+ return "incomplete";
13654
+ });
13655
+ }
13656
+ return steps.map((s) => s.status ?? "incomplete");
13657
+ }
13658
+ var Stepper = forwardRef(
13659
+ ({ steps, activeStep, orientation = "horizontal", indicator = "dot", className, ...rest }, ref) => {
13660
+ const statuses = resolveStatuses(steps, activeStep);
13661
+ if (orientation === "vertical") {
13662
+ return /* @__PURE__ */ jsx("div", { ref, className: cn("flex flex-col", className), ...rest, children: steps.map((step, i) => {
13663
+ const status = statuses[i];
13664
+ const isLast = i === steps.length - 1;
13665
+ return /* @__PURE__ */ jsxs("div", { className: "flex gap-3", children: [
13666
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center", children: [
13667
+ /* @__PURE__ */ jsx(
13668
+ StepCircle,
13669
+ {
13670
+ status,
13671
+ indicator,
13672
+ stepNumber: i + 1,
13673
+ icon: step.icon
13674
+ }
13675
+ ),
13676
+ !isLast && /* @__PURE__ */ jsx(Connector, { orientation: "vertical", completed: status === "completed" })
13677
+ ] }),
13678
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col pb-6", children: [
13679
+ /* @__PURE__ */ jsx(
13680
+ "span",
13681
+ {
13682
+ className: cn(
13683
+ "text-sm font-medium leading-[1.45]",
13684
+ status === "active" ? "text-grey-900" : status === "disabled" ? "text-grey-300" : "text-grey-600"
13685
+ ),
13686
+ children: step.title
13687
+ }
13688
+ ),
13689
+ step.description && /* @__PURE__ */ jsx("span", { className: "text-xs text-grey-500 leading-[1.45]", children: step.description })
13690
+ ] })
13691
+ ] }, i);
13692
+ }) });
13693
+ }
13694
+ return /* @__PURE__ */ jsx("div", { ref, className: cn("flex items-start w-full", className), ...rest, children: steps.map((step, i) => {
13695
+ const status = statuses[i];
13696
+ const isLast = i === steps.length - 1;
13697
+ return /* @__PURE__ */ jsxs("div", { className: "flex flex-col flex-1 items-center gap-2.5", children: [
13698
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 w-full", children: [
13699
+ /* @__PURE__ */ jsx(
13700
+ Connector,
13701
+ {
13702
+ orientation: "horizontal",
13703
+ completed: i > 0 && statuses[i - 1] === "completed"
13704
+ }
13705
+ ),
13706
+ /* @__PURE__ */ jsx(
13707
+ StepCircle,
13708
+ {
13709
+ status,
13710
+ indicator,
13711
+ stepNumber: i + 1,
13712
+ icon: step.icon
13713
+ }
13714
+ ),
13715
+ /* @__PURE__ */ jsx(Connector, { orientation: "horizontal", completed: !isLast && status === "completed" })
13716
+ ] }),
13717
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-0.5 text-center w-full", children: [
13718
+ /* @__PURE__ */ jsx(
13719
+ "span",
13720
+ {
13721
+ className: cn(
13722
+ "text-xs font-medium leading-[1.45] tracking-tight",
13723
+ status === "active" ? "text-grey-700" : status === "disabled" ? "text-grey-300" : "text-grey-600"
13724
+ ),
13725
+ children: step.title
13726
+ }
13727
+ ),
13728
+ step.description && /* @__PURE__ */ jsx("span", { className: "text-xs text-grey-500 leading-[1.45] truncate", children: step.description })
13729
+ ] })
13730
+ ] }, i);
13731
+ }) });
13732
+ }
13733
+ );
13734
+ Stepper.displayName = "Stepper";
13735
+ var LinearStepper = forwardRef(
13736
+ ({ currentStep, totalSteps, showLabel = true, className, ...rest }, ref) => {
13737
+ const pct = Math.min(100, Math.max(0, currentStep / totalSteps * 100));
13738
+ return /* @__PURE__ */ jsxs("div", { ref, className: cn("flex flex-col gap-2 w-full", className), ...rest, children: [
13739
+ showLabel && /* @__PURE__ */ jsxs("p", { className: "text-sm font-semibold leading-[1.45]", children: [
13740
+ /* @__PURE__ */ jsx("span", { className: "text-grey-900", children: currentStep }),
13741
+ /* @__PURE__ */ jsxs("span", { className: "text-grey-400", children: [
13742
+ " / ",
13743
+ totalSteps,
13744
+ " complete"
13745
+ ] })
13746
+ ] }),
13747
+ /* @__PURE__ */ jsx("div", { className: "bg-grey-200 rounded-full p-1 w-full overflow-hidden", children: /* @__PURE__ */ jsx(
13748
+ "div",
13749
+ {
13750
+ className: "h-2 bg-primary-400 rounded-[10px] transition-all duration-300",
13751
+ style: { width: `${pct}%` }
13752
+ }
13753
+ ) })
13754
+ ] });
13755
+ }
13756
+ );
13757
+ LinearStepper.displayName = "LinearStepper";
13758
+ var SegmentedStepper = forwardRef(
13759
+ ({ currentStep, totalSteps, showLabel = true, className, ...rest }, ref) => {
13760
+ return /* @__PURE__ */ jsxs("div", { ref, className: cn("flex flex-col gap-2 w-full", className), ...rest, children: [
13761
+ showLabel && /* @__PURE__ */ jsxs("p", { className: "text-sm font-semibold leading-[1.45]", children: [
13762
+ /* @__PURE__ */ jsx("span", { className: "text-grey-900", children: currentStep }),
13763
+ /* @__PURE__ */ jsxs("span", { className: "text-grey-400", children: [
13764
+ " / ",
13765
+ totalSteps,
13766
+ " complete"
13767
+ ] })
13768
+ ] }),
13769
+ /* @__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(
13770
+ "div",
13771
+ {
13772
+ className: cn(
13773
+ "flex-1 rounded-[14px] border border-grey-50 transition-colors",
13774
+ i < currentStep ? "bg-primary-400" : "bg-grey-50"
13775
+ )
13776
+ },
13777
+ i
13778
+ )) }) })
13779
+ ] });
13780
+ }
13781
+ );
13782
+ SegmentedStepper.displayName = "SegmentedStepper";
13783
+ var sizeConfig2 = {
13784
+ sm: { track: "h-1", handle: "size-3.5", handleSize: 14, border: "border-[2.333px]" },
13785
+ md: { track: "h-2", handle: "size-4", handleSize: 16, border: "border-[2.667px]" },
13786
+ lg: { track: "h-3", handle: "size-5", handleSize: 20, border: "border-[3.333px]" }
13787
+ };
13788
+ function clamp(val, min, max) {
13789
+ return Math.min(max, Math.max(min, val));
13790
+ }
13791
+ function getPercent(val, min, max) {
13792
+ return (val - min) / (max - min) * 100;
13793
+ }
13794
+ function getValueFromPosition(clientX, rect, min, max, step) {
13795
+ const pct = clamp((clientX - rect.left) / rect.width, 0, 1);
13796
+ const raw = min + pct * (max - min);
13797
+ const stepped = Math.round(raw / step) * step;
13798
+ return clamp(stepped, min, max);
13799
+ }
13800
+ var Slider = forwardRef(
13801
+ ({
13802
+ value: controlledValue,
13803
+ onChange,
13804
+ size = "lg",
13805
+ label,
13806
+ metadata,
13807
+ showPercentage = true,
13808
+ min = 0,
13809
+ max = 100,
13810
+ step = 1,
13811
+ disabled = false,
13812
+ className,
13813
+ ...rest
13814
+ }, ref) => {
13815
+ const [uncontrolled, setUncontrolled] = useState(0);
13816
+ const val = controlledValue ?? uncontrolled;
13817
+ const trackRef = useRef(null);
13818
+ const config = sizeConfig2[size];
13819
+ const pct = getPercent(val, min, max);
13820
+ const metaItems = Array.isArray(metadata) ? metadata : metadata ? [metadata] : [];
13821
+ const updateValue = useCallback(
13822
+ (clientX) => {
13823
+ if (disabled || !trackRef.current) return;
13824
+ const rect = trackRef.current.getBoundingClientRect();
13825
+ const v = getValueFromPosition(clientX, rect, min, max, step);
13826
+ if (controlledValue === void 0) setUncontrolled(v);
13827
+ onChange?.(v);
13828
+ },
13829
+ [disabled, min, max, step, controlledValue, onChange]
13830
+ );
13831
+ const handlePointerDown = useCallback(
13832
+ (e) => {
13833
+ if (disabled) return;
13834
+ e.preventDefault();
13835
+ e.target.setPointerCapture(e.pointerId);
13836
+ updateValue(e.clientX);
13837
+ },
13838
+ [disabled, updateValue]
13839
+ );
13840
+ const handlePointerMove = useCallback(
13841
+ (e) => {
13842
+ if (disabled || !e.buttons) return;
13843
+ updateValue(e.clientX);
13844
+ },
13845
+ [disabled, updateValue]
13846
+ );
13847
+ return /* @__PURE__ */ jsxs(
13848
+ "div",
13849
+ {
13850
+ ref,
13851
+ className: cn("flex flex-col gap-2 w-full", disabled && "opacity-50", className),
13852
+ ...rest,
13853
+ children: [
13854
+ label && /* @__PURE__ */ jsx("span", { className: "text-sm font-medium text-grey-900 leading-[1.45]", children: label }),
13855
+ /* @__PURE__ */ jsxs(
13856
+ "div",
13857
+ {
13858
+ ref: trackRef,
13859
+ className: cn(
13860
+ "relative w-full rounded-full bg-grey-200 cursor-pointer",
13861
+ config.track,
13862
+ disabled && "cursor-not-allowed"
13863
+ ),
13864
+ onPointerDown: handlePointerDown,
13865
+ onPointerMove: handlePointerMove,
13866
+ role: "slider",
13867
+ "aria-valuenow": val,
13868
+ "aria-valuemin": min,
13869
+ "aria-valuemax": max,
13870
+ tabIndex: disabled ? -1 : 0,
13871
+ children: [
13872
+ /* @__PURE__ */ jsx(
13873
+ "div",
13874
+ {
13875
+ className: cn("absolute left-0 top-0 rounded-full bg-primary-400", config.track),
13876
+ style: { width: `${pct}%` }
13877
+ }
13878
+ ),
13879
+ /* @__PURE__ */ jsx(
13880
+ "div",
13881
+ {
13882
+ className: cn(
13883
+ "absolute top-1/2 -translate-y-1/2 rounded-full bg-primary-500 border-white border-solid shadow-sm",
13884
+ config.handle,
13885
+ config.border
13886
+ ),
13887
+ style: { left: `${pct}%`, transform: `translate(-50%, -50%)` }
13888
+ }
13889
+ )
13890
+ ]
13891
+ }
13892
+ ),
13893
+ (metaItems.length > 0 || showPercentage) && /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
13894
+ 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: [
13895
+ i > 0 && /* @__PURE__ */ jsx("span", { className: "text-xs text-grey-400", children: "\u2022" }),
13896
+ /* @__PURE__ */ jsx("span", { className: "text-sm font-medium text-grey-500 leading-[1.45]", children: item })
13897
+ ] }, i)) }),
13898
+ showPercentage && /* @__PURE__ */ jsxs("span", { className: "flex-1 text-sm font-semibold text-grey-500 text-right leading-[1.45]", children: [
13899
+ Math.round(pct),
13900
+ "%"
13901
+ ] })
13902
+ ] })
13903
+ ]
13904
+ }
13905
+ );
13906
+ }
13907
+ );
13908
+ Slider.displayName = "Slider";
13909
+ var RangeSlider = forwardRef(
13910
+ ({
13911
+ value: controlledValue,
13912
+ onChange,
13913
+ size = "lg",
13914
+ label,
13915
+ showLabels = true,
13916
+ min = 0,
13917
+ max = 100,
13918
+ step = 1,
13919
+ disabled = false,
13920
+ className,
13921
+ ...rest
13922
+ }, ref) => {
13923
+ const [uncontrolled, setUncontrolled] = useState([25, 75]);
13924
+ const val = controlledValue ?? uncontrolled;
13925
+ const trackRef = useRef(null);
13926
+ const dragging = useRef(null);
13927
+ const config = sizeConfig2[size];
13928
+ const lowPct = getPercent(val[0], min, max);
13929
+ const highPct = getPercent(val[1], min, max);
13930
+ const update = useCallback(
13931
+ (newVal) => {
13932
+ if (controlledValue === void 0) setUncontrolled(newVal);
13933
+ onChange?.(newVal);
13934
+ },
13935
+ [controlledValue, onChange]
13936
+ );
13937
+ const handlePointerDown = useCallback(
13938
+ (e) => {
13939
+ if (disabled || !trackRef.current) return;
13940
+ e.preventDefault();
13941
+ e.target.setPointerCapture(e.pointerId);
13942
+ const rect = trackRef.current.getBoundingClientRect();
13943
+ const v = getValueFromPosition(e.clientX, rect, min, max, step);
13944
+ const distLow = Math.abs(v - val[0]);
13945
+ const distHigh = Math.abs(v - val[1]);
13946
+ dragging.current = distLow <= distHigh ? "low" : "high";
13947
+ if (dragging.current === "low") {
13948
+ update([clamp(v, min, val[1]), val[1]]);
13949
+ } else {
13950
+ update([val[0], clamp(v, val[0], max)]);
13951
+ }
13952
+ },
13953
+ [disabled, min, max, step, val, update]
13954
+ );
13955
+ const handlePointerMove = useCallback(
13956
+ (e) => {
13957
+ if (disabled || !e.buttons || !trackRef.current || !dragging.current) return;
13958
+ const rect = trackRef.current.getBoundingClientRect();
13959
+ const v = getValueFromPosition(e.clientX, rect, min, max, step);
13960
+ if (dragging.current === "low") {
13961
+ update([clamp(v, min, val[1]), val[1]]);
13962
+ } else {
13963
+ update([val[0], clamp(v, val[0], max)]);
13964
+ }
13965
+ },
13966
+ [disabled, min, max, step, val, update]
13967
+ );
13968
+ const handlePointerUp = useCallback(() => {
13969
+ dragging.current = null;
13970
+ }, []);
13971
+ return /* @__PURE__ */ jsxs(
13972
+ "div",
13973
+ {
13974
+ ref,
13975
+ className: cn("flex flex-col gap-2 w-full", disabled && "opacity-50", className),
13976
+ ...rest,
13977
+ children: [
13978
+ label && /* @__PURE__ */ jsx("span", { className: "text-sm font-medium text-grey-900 leading-[1.45]", children: label }),
13979
+ /* @__PURE__ */ jsxs(
13980
+ "div",
13981
+ {
13982
+ ref: trackRef,
13983
+ className: cn(
13984
+ "relative w-full rounded-full bg-grey-200 cursor-pointer",
13985
+ config.track,
13986
+ disabled && "cursor-not-allowed"
13987
+ ),
13988
+ onPointerDown: handlePointerDown,
13989
+ onPointerMove: handlePointerMove,
13990
+ onPointerUp: handlePointerUp,
13991
+ role: "slider",
13992
+ "aria-valuenow": val[0],
13993
+ "aria-valuemin": min,
13994
+ "aria-valuemax": max,
13995
+ tabIndex: disabled ? -1 : 0,
13996
+ children: [
13997
+ /* @__PURE__ */ jsx(
13998
+ "div",
13999
+ {
14000
+ className: cn("absolute top-0 rounded-full bg-primary-400", config.track),
14001
+ style: { left: `${lowPct}%`, width: `${highPct - lowPct}%` }
14002
+ }
14003
+ ),
14004
+ /* @__PURE__ */ jsx(
14005
+ "div",
14006
+ {
14007
+ className: cn(
14008
+ "absolute top-1/2 rounded-full bg-primary-500 border-white border-solid shadow-sm z-10",
14009
+ config.handle,
14010
+ config.border
14011
+ ),
14012
+ style: { left: `${lowPct}%`, transform: `translate(-50%, -50%)` }
14013
+ }
14014
+ ),
14015
+ /* @__PURE__ */ jsx(
14016
+ "div",
14017
+ {
14018
+ className: cn(
14019
+ "absolute top-1/2 rounded-full bg-primary-500 border-white border-solid shadow-sm z-10",
14020
+ config.handle,
14021
+ config.border
14022
+ ),
14023
+ style: { left: `${highPct}%`, transform: `translate(-50%, -50%)` }
14024
+ }
14025
+ )
14026
+ ]
14027
+ }
14028
+ ),
14029
+ showLabels && /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
14030
+ /* @__PURE__ */ jsxs("span", { className: "text-sm font-medium text-grey-500 leading-[1.45]", children: [
14031
+ Math.round(getPercent(val[0], min, max)),
14032
+ "%"
14033
+ ] }),
14034
+ /* @__PURE__ */ jsxs("span", { className: "text-sm font-semibold text-grey-500 text-right leading-[1.45]", children: [
14035
+ Math.round(getPercent(val[1], min, max)),
14036
+ "%"
14037
+ ] })
14038
+ ] })
14039
+ ]
14040
+ }
14041
+ );
14042
+ }
14043
+ );
14044
+ RangeSlider.displayName = "RangeSlider";
11626
14045
  var SelectContext = createContext(null);
11627
14046
  function useSelectContext() {
11628
14047
  const ctx = useContext(SelectContext);
@@ -11663,6 +14082,8 @@ var Select = forwardRef(
11663
14082
  const [open, setOpen] = useState(false);
11664
14083
  const value = controlledValue ?? internalValue;
11665
14084
  const listboxId = useId();
14085
+ const labelId = useId();
14086
+ const helperId = useId();
11666
14087
  const containerRef = useRef(null);
11667
14088
  const triggerRef = useRef(null);
11668
14089
  const listRef = useRef(null);
@@ -11759,7 +14180,7 @@ var Select = forwardRef(
11759
14180
  className: cn("relative flex flex-col gap-2 w-full", wrapperClassName),
11760
14181
  ...rest,
11761
14182
  children: [
11762
- label && /* @__PURE__ */ jsx("label", { className: "text-sm font-medium text-grey-900 leading-[1.45]", children: label }),
14183
+ label && /* @__PURE__ */ jsx("label", { id: labelId, className: "text-sm font-medium text-grey-900 leading-[1.45]", children: label }),
11763
14184
  /* @__PURE__ */ jsxs(
11764
14185
  "button",
11765
14186
  {
@@ -11769,6 +14190,8 @@ var Select = forwardRef(
11769
14190
  "aria-expanded": open,
11770
14191
  "aria-haspopup": "listbox",
11771
14192
  "aria-controls": listboxId,
14193
+ "aria-labelledby": label ? labelId : void 0,
14194
+ "aria-describedby": helperText ? helperId : void 0,
11772
14195
  disabled,
11773
14196
  onClick: () => !disabled && setOpen(!open),
11774
14197
  className: cn(
@@ -11795,6 +14218,7 @@ var Select = forwardRef(
11795
14218
  {
11796
14219
  name: "chevron-down",
11797
14220
  size: "md",
14221
+ "aria-hidden": "true",
11798
14222
  className: cn(
11799
14223
  "shrink-0 transition-transform",
11800
14224
  open && "rotate-180",
@@ -11805,7 +14229,7 @@ var Select = forwardRef(
11805
14229
  ]
11806
14230
  }
11807
14231
  ),
11808
- helperText && /* @__PURE__ */ jsx("p", { className: "text-sm text-grey-500 leading-[1.45]", children: helperText }),
14232
+ helperText && /* @__PURE__ */ jsx("p", { id: helperId, className: "text-sm text-grey-500 leading-[1.45]", children: helperText }),
11809
14233
  open && /* @__PURE__ */ jsx(SelectContext.Provider, { value: { value, onSelect, open }, children: /* @__PURE__ */ jsx(
11810
14234
  "div",
11811
14235
  {
@@ -11909,7 +14333,7 @@ var ActivityItem = forwardRef(
11909
14333
  }, ref) => {
11910
14334
  const hasConnectorAbove = connector === "middle" || connector === "last";
11911
14335
  const hasConnectorBelow = connector === "top" || connector === "middle";
11912
- return /* @__PURE__ */ jsxs("div", { ref, className: cn("flex gap-3 items-start", className), ...rest, children: [
14336
+ return /* @__PURE__ */ jsxs("article", { ref, className: cn("flex gap-3 items-start", className), ...rest, children: [
11913
14337
  /* @__PURE__ */ jsxs(
11914
14338
  "div",
11915
14339
  {
@@ -11918,9 +14342,9 @@ var ActivityItem = forwardRef(
11918
14342
  (connector === "last" || !connector) && "justify-start"
11919
14343
  ),
11920
14344
  children: [
11921
- hasConnectorAbove && /* @__PURE__ */ jsx("div", { className: "h-2 w-px bg-grey-100" }),
14345
+ hasConnectorAbove && /* @__PURE__ */ jsx("div", { className: "h-2 w-px bg-grey-100", "aria-hidden": "true" }),
11922
14346
  /* @__PURE__ */ jsx("div", { className: "shrink-0 size-8", children: avatar }),
11923
- hasConnectorBelow && /* @__PURE__ */ jsx("div", { className: "flex-1 w-px bg-grey-100" })
14347
+ hasConnectorBelow && /* @__PURE__ */ jsx("div", { className: "flex-1 w-px bg-grey-100", "aria-hidden": "true" })
11924
14348
  ]
11925
14349
  }
11926
14350
  ),
@@ -11937,7 +14361,8 @@ var ActivityItem = forwardRef(
11937
14361
  /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1 w-full", children: [
11938
14362
  /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between w-full", children: [
11939
14363
  /* @__PURE__ */ jsx("div", { className: "flex flex-1 items-start gap-1 min-w-0", children: /* @__PURE__ */ jsx("span", { className: "text-body-sm leading-5 text-grey-600", children: text }) }),
11940
- unread && /* @__PURE__ */ jsx("span", { className: "shrink-0 size-2 rounded-full bg-[#04802E] border-[1.5px] border-white" })
14364
+ unread && /* @__PURE__ */ jsx("span", { className: "shrink-0 size-2 rounded-full bg-[#04802E] border-[1.5px] border-white", "aria-hidden": "true" }),
14365
+ unread && /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Unread" })
11941
14366
  ] }),
11942
14367
  (date || time || link || badge) && /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-1 w-full", children: [
11943
14368
  /* @__PURE__ */ jsxs("div", { className: "flex flex-1 items-start min-w-0", children: [
@@ -12280,4 +14705,4 @@ function useRaydenRadio({
12280
14705
  };
12281
14706
  }
12282
14707
 
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 };
14708
+ 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 };