@rbxts/react-clean-ui 1.1.0 → 1.2.2

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.
Files changed (89) hide show
  1. package/out/Components/Chart/BarChart.d.ts +1 -0
  2. package/out/Components/Chart/BarChart.luau +149 -112
  3. package/out/Components/Chart/Pie.d.ts +1 -0
  4. package/out/Components/Chart/Pie.luau +21 -5
  5. package/out/Components/Decorator/BoxShadow.d.ts +1 -0
  6. package/out/Components/Decorator/BoxShadow.luau +12 -5
  7. package/out/Components/Decorator/Corners.d.ts +1 -0
  8. package/out/Components/Decorator/Corners.luau +8 -3
  9. package/out/Components/Decorator/Padding.d.ts +3 -1
  10. package/out/Components/Decorator/Padding.luau +11 -6
  11. package/out/Components/Input/Button.d.ts +1 -0
  12. package/out/Components/Input/Button.luau +44 -33
  13. package/out/Components/Input/Checkbox.d.ts +1 -0
  14. package/out/Components/Input/Checkbox.luau +22 -16
  15. package/out/Components/Input/HoverButton.d.ts +1 -0
  16. package/out/Components/Input/HoverButton.luau +44 -40
  17. package/out/Components/Input/Increment.d.ts +1 -0
  18. package/out/Components/Input/Increment.luau +10 -3
  19. package/out/Components/Input/Input.d.ts +3 -1
  20. package/out/Components/Input/Input.luau +85 -66
  21. package/out/Components/Input/Select.d.ts +9 -0
  22. package/out/Components/Input/Select.luau +311 -34
  23. package/out/Components/Input/Slider.luau +44 -29
  24. package/out/Components/Input/Switch.d.ts +9 -0
  25. package/out/Components/Input/Switch.luau +147 -0
  26. package/out/Components/Input/index.d.ts +1 -0
  27. package/out/Components/Input/init.luau +3 -0
  28. package/out/Components/Interaction/Modal.d.ts +14 -0
  29. package/out/Components/Interaction/Modal.luau +276 -0
  30. package/out/Components/Interaction/Toast.d.ts +2 -1
  31. package/out/Components/Interaction/Toast.luau +53 -28
  32. package/out/Components/Interaction/Tooltip.luau +36 -24
  33. package/out/Components/Interaction/index.d.ts +1 -0
  34. package/out/Components/Interaction/init.luau +3 -0
  35. package/out/Components/Layout/Accordion.d.ts +1 -0
  36. package/out/Components/Layout/Accordion.luau +51 -55
  37. package/out/Components/Layout/Column.d.ts +1 -0
  38. package/out/Components/Layout/Column.luau +11 -6
  39. package/out/Components/Layout/Container.d.ts +1 -0
  40. package/out/Components/Layout/Container.luau +22 -16
  41. package/out/Components/Layout/Draggable.luau +25 -3
  42. package/out/Components/Layout/Fieldset.d.ts +1 -0
  43. package/out/Components/Layout/Fieldset.luau +14 -42
  44. package/out/Components/Layout/FlexItem.luau +7 -0
  45. package/out/Components/Layout/Group.d.ts +1 -0
  46. package/out/Components/Layout/Group.luau +16 -33
  47. package/out/Components/Layout/HStack.d.ts +4 -0
  48. package/out/Components/Layout/HStack.luau +17 -10
  49. package/out/Components/Layout/Pagination.d.ts +32 -0
  50. package/out/Components/Layout/Pagination.luau +405 -0
  51. package/out/Components/Layout/Row.d.ts +1 -0
  52. package/out/Components/Layout/Row.luau +20 -48
  53. package/out/Components/Layout/Scroller.d.ts +1 -0
  54. package/out/Components/Layout/Scroller.luau +26 -34
  55. package/out/Components/Layout/Table.d.ts +31 -0
  56. package/out/Components/Layout/Table.luau +342 -0
  57. package/out/Components/Layout/Tabs.d.ts +18 -9
  58. package/out/Components/Layout/Tabs.luau +134 -119
  59. package/out/Components/Layout/VStack.d.ts +3 -0
  60. package/out/Components/Layout/VStack.luau +17 -10
  61. package/out/Components/Layout/index.d.ts +2 -0
  62. package/out/Components/Layout/init.luau +6 -0
  63. package/out/Components/Navigation/Menu.d.ts +1 -0
  64. package/out/Components/Navigation/Menu.luau +12 -3
  65. package/out/Components/Surface/Box.d.ts +1 -0
  66. package/out/Components/Surface/Box.luau +12 -4
  67. package/out/Components/Surface/Card.d.ts +1 -0
  68. package/out/Components/Surface/Card.luau +54 -51
  69. package/out/Components/Surface/Icon.d.ts +1 -0
  70. package/out/Components/Surface/Icon.luau +25 -16
  71. package/out/Components/Typography/Text.d.ts +1 -0
  72. package/out/Components/Typography/Text.luau +57 -47
  73. package/out/Contexts/index.d.ts +1 -0
  74. package/out/Contexts/init.luau +3 -0
  75. package/out/Contexts/modal.context.d.ts +15 -0
  76. package/out/Contexts/modal.context.luau +26 -0
  77. package/out/Contexts/toast.context.d.ts +1 -0
  78. package/out/Providers/app.provider.luau +2 -1
  79. package/out/Providers/index.d.ts +1 -0
  80. package/out/Providers/init.luau +3 -0
  81. package/out/Providers/modal.provider.d.ts +6 -0
  82. package/out/Providers/modal.provider.luau +86 -0
  83. package/out/Providers/overlay.provider.luau +1 -0
  84. package/out/Theme/theme.template.d.ts +85 -0
  85. package/out/Theme/themes/dark.theme.luau +103 -0
  86. package/out/Theme/themes/default.theme.luau +130 -0
  87. package/out/Theme/themes/sandstone.theme.luau +103 -0
  88. package/out/Theme/themes/wooden.theme.luau +122 -0
  89. package/package.json +1 -1
@@ -43,5 +43,6 @@ export interface BarChartData {
43
43
  }
44
44
  export interface BarChartProps {
45
45
  data: BarChartData;
46
+ name?: string;
46
47
  }
47
48
  export declare function BarChart(props: BarChartProps): React.JSX.Element;
@@ -409,9 +409,18 @@ local function BarChart(props)
409
409
  animationTween:setGoal(1)
410
410
  end
411
411
  end, { animationTween, barTheme.tweenTime })
412
+ local _attributes = {}
413
+ local _condition_6 = props.name
414
+ if _condition_6 == nil then
415
+ _condition_6 = "BarChart"
416
+ end
417
+ _attributes.name = _condition_6
418
+ _attributes.Size = UDim2.fromScale(1, 1)
412
419
  local _exp_3 = showYAxis and React.createElement(Container, {
420
+ name = "YAxisContainer",
413
421
  Size = UDim2.new(0, yAxisSize, 1, -xAxisSize),
414
422
  }, React.createElement("frame", {
423
+ key = "YAxisLine",
415
424
  Size = UDim2.new(0, getLineThickness(yLine, barTheme.axis), 1, 0),
416
425
  Position = UDim2.new(1, -yAxisSpacing, 0, 0),
417
426
  AnchorPoint = Vector2.new(1, 0),
@@ -419,57 +428,61 @@ local function BarChart(props)
419
428
  BackgroundColor3 = getLineColor(yLine, barTheme.axis),
420
429
  BackgroundTransparency = getLineTransparency(yLine, barTheme.axis),
421
430
  }))
422
- local _condition_6 = showYAxis and chartRange > 0
423
- if _condition_6 then
431
+ local _condition_7 = showYAxis and chartRange > 0
432
+ if _condition_7 then
424
433
  -- ▼ ReadonlyArray.map ▼
425
434
  local _newValue_2 = table.create(#gridValues)
426
435
  local _callback_4 = function(value)
427
- local _attributes = {}
436
+ local _attributes_1 = {
437
+ key = "Tick",
438
+ }
428
439
  local _result_13 = yAxis
429
440
  if _result_13 ~= nil then
430
441
  _result_13 = _result_13.tickSize
431
442
  end
432
- local _condition_7 = _result_13
433
- if _condition_7 == nil then
434
- _condition_7 = barTheme.yAxis.tickSize
443
+ local _condition_8 = _result_13
444
+ if _condition_8 == nil then
445
+ _condition_8 = barTheme.yAxis.tickSize
435
446
  end
436
447
  local _result_14 = yAxis
437
448
  if _result_14 ~= nil then
438
449
  _result_14 = _result_14.tickThickness
439
450
  end
440
- local _condition_8 = _result_14
441
- if _condition_8 == nil then
442
- _condition_8 = barTheme.yAxis.tickThickness
451
+ local _condition_9 = _result_14
452
+ if _condition_9 == nil then
453
+ _condition_9 = barTheme.yAxis.tickThickness
443
454
  end
444
- _attributes.Size = UDim2.new(0, _condition_7, 0, _condition_8)
445
- _attributes.Position = UDim2.new(0, -yAxisSpacing, 0, 0)
446
- _attributes.AnchorPoint = Vector2.new(1, 0)
447
- _attributes.BorderSizePixel = 0
455
+ _attributes_1.Size = UDim2.new(0, _condition_8, 0, _condition_9)
456
+ _attributes_1.Position = UDim2.new(0, -yAxisSpacing, 0, 0)
457
+ _attributes_1.AnchorPoint = Vector2.new(1, 0)
458
+ _attributes_1.BorderSizePixel = 0
448
459
  local _result_15 = yAxis
449
460
  if _result_15 ~= nil then
450
461
  _result_15 = _result_15.tickColor
451
462
  end
452
- local _condition_9 = _result_15
453
- if _condition_9 == nil then
454
- _condition_9 = barTheme.yAxis.tickColor
463
+ local _condition_10 = _result_15
464
+ if _condition_10 == nil then
465
+ _condition_10 = barTheme.yAxis.tickColor
455
466
  end
456
- _attributes.BackgroundColor3 = _condition_9
467
+ _attributes_1.BackgroundColor3 = _condition_10
457
468
  local _result_16 = yAxis
458
469
  if _result_16 ~= nil then
459
470
  _result_16 = _result_16.tickTransparency
460
471
  end
461
- local _condition_10 = _result_16
462
- if _condition_10 == nil then
463
- _condition_10 = barTheme.yAxis.tickTransparency
472
+ local _condition_11 = _result_16
473
+ if _condition_11 == nil then
474
+ _condition_11 = barTheme.yAxis.tickTransparency
464
475
  end
465
- _attributes.BackgroundTransparency = _condition_10
476
+ _attributes_1.BackgroundTransparency = _condition_11
466
477
  return React.createElement("frame", {
478
+ key = `GridLine-{value}`,
467
479
  Size = UDim2.new(1, 0, 0, getLineThickness(gridStyle or {}, barTheme.gridLines)),
468
480
  Position = UDim2.new(0, 0, getYPosition(value), 0),
469
481
  BorderSizePixel = 0,
470
482
  BackgroundColor3 = getLineColor(gridStyle or {}, barTheme.gridLines),
471
483
  BackgroundTransparency = getLineTransparency(gridStyle or {}, barTheme.gridLines),
472
- }, React.createElement("frame", _attributes), React.createElement(Text, {
484
+ }, React.createElement("frame", _attributes_1), React.createElement(Text, {
485
+ name = "GridLineLabel",
473
486
  text = `{value}`,
474
487
  TextWrap = false,
475
488
  AnchorPoint = Vector2.new(1, 0.5),
@@ -480,10 +493,10 @@ local function BarChart(props)
480
493
  _newValue_2[_k] = _callback_4(_v, _k - 1, gridValues)
481
494
  end
482
495
  -- ▲ ReadonlyArray.map ▲
483
- _condition_6 = _newValue_2
496
+ _condition_7 = _newValue_2
484
497
  end
485
- local _condition_7 = chartRange > 0
486
- if _condition_7 then
498
+ local _condition_8 = chartRange > 0
499
+ if _condition_8 then
487
500
  local _exp_4 = props.data.labels
488
501
  -- ▼ ReadonlyArray.map ▼
489
502
  local _newValue_2 = table.create(#_exp_4)
@@ -494,20 +507,20 @@ local function BarChart(props)
494
507
  -- ▼ ReadonlyArray.map ▼
495
508
  local _newValue_3 = table.create(#_exp_5)
496
509
  local _callback_5 = function(dataset, datasetIndex)
497
- local _condition_8 = dataset.values[index + 1]
498
- if _condition_8 == nil then
499
- _condition_8 = 0
510
+ local _condition_9 = dataset.values[index + 1]
511
+ if _condition_9 == nil then
512
+ _condition_9 = 0
500
513
  end
501
- local value = _condition_8
514
+ local value = _condition_9
502
515
  local _result_14 = dataset.labels
503
516
  if _result_14 ~= nil then
504
517
  _result_14 = _result_14[index + 1]
505
518
  end
506
- local _condition_9 = _result_14
507
- if _condition_9 == nil then
508
- _condition_9 = label
519
+ local _condition_10 = _result_14
520
+ if _condition_10 == nil then
521
+ _condition_10 = label
509
522
  end
510
- local tooltipLabel = _condition_9
523
+ local tooltipLabel = _condition_10
511
524
  local _exp_6 = props.data.datasets
512
525
  -- ▼ ReadonlyArray.reduce ▼
513
526
  local _result_15 = 0
@@ -515,11 +528,11 @@ local function BarChart(props)
515
528
  if previousIndex >= datasetIndex then
516
529
  return sum
517
530
  end
518
- local _condition_10 = previousDataset.values[index + 1]
519
- if _condition_10 == nil then
520
- _condition_10 = 0
531
+ local _condition_11 = previousDataset.values[index + 1]
532
+ if _condition_11 == nil then
533
+ _condition_11 = 0
521
534
  end
522
- local previousValue = _condition_10
535
+ local previousValue = _condition_11
523
536
  return if (value >= 0) == (previousValue >= 0) then sum + previousValue else sum
524
537
  end
525
538
  for _i = 1, #_exp_6 do
@@ -535,15 +548,15 @@ local function BarChart(props)
535
548
  -- ▼ ReadonlyArray.some ▼
536
549
  local _result_17 = false
537
550
  local _callback_7 = function(otherDataset, otherIndex)
538
- local _condition_10 = otherIndex > datasetIndex
539
- if _condition_10 then
540
- local _condition_11 = otherDataset.values[index + 1]
541
- if _condition_11 == nil then
542
- _condition_11 = 0
551
+ local _condition_11 = otherIndex > datasetIndex
552
+ if _condition_11 then
553
+ local _condition_12 = otherDataset.values[index + 1]
554
+ if _condition_12 == nil then
555
+ _condition_12 = 0
543
556
  end
544
- _condition_10 = _condition_11 > 0
557
+ _condition_11 = _condition_12 > 0
545
558
  end
546
- return _condition_10
559
+ return _condition_11
547
560
  end
548
561
  for _k, _v in _exp_7 do
549
562
  if _callback_7(_v, _k - 1, _exp_7) then
@@ -554,21 +567,21 @@ local function BarChart(props)
554
567
  -- ▲ ReadonlyArray.some ▲
555
568
  _result_16 = not _result_17
556
569
  else
557
- local _condition_10 = positiveSums[index + 1] <= 0 and value < 0
558
- if _condition_10 then
570
+ local _condition_11 = positiveSums[index + 1] <= 0 and value < 0
571
+ if _condition_11 then
559
572
  local _exp_7 = props.data.datasets
560
573
  -- ▼ ReadonlyArray.some ▼
561
574
  local _result_17 = false
562
575
  local _callback_7 = function(otherDataset, otherIndex)
563
- local _condition_11 = otherIndex < datasetIndex
564
- if _condition_11 then
565
- local _condition_12 = otherDataset.values[index + 1]
566
- if _condition_12 == nil then
567
- _condition_12 = 0
576
+ local _condition_12 = otherIndex < datasetIndex
577
+ if _condition_12 then
578
+ local _condition_13 = otherDataset.values[index + 1]
579
+ if _condition_13 == nil then
580
+ _condition_13 = 0
568
581
  end
569
- _condition_11 = _condition_12 < 0
582
+ _condition_12 = _condition_13 < 0
570
583
  end
571
- return _condition_11
584
+ return _condition_12
572
585
  end
573
586
  for _k, _v in _exp_7 do
574
587
  if _callback_7(_v, _k - 1, _exp_7) then
@@ -577,12 +590,14 @@ local function BarChart(props)
577
590
  end
578
591
  end
579
592
  -- ▲ ReadonlyArray.some ▲
580
- _condition_10 = not _result_17
593
+ _condition_11 = not _result_17
581
594
  end
582
- _result_16 = _condition_10
595
+ _result_16 = _condition_11
583
596
  end
584
597
  local isTopSegment = _result_16
585
598
  local segment = React.createElement(Container, {
599
+ key = `Segment-{datasetIndex}`,
600
+ name = `Segment-{datasetIndex}`,
586
601
  Size = animationProgress:map(function(progress)
587
602
  return UDim2.fromScale(1, math.abs(value) / chartRange * progress)
588
603
  end),
@@ -592,10 +607,12 @@ local function BarChart(props)
592
607
  BackgroundTransparency = 0,
593
608
  BackgroundColor3 = getBarColor(dataset, datasetIndex, index),
594
609
  }, React.createElement("uistroke", {
610
+ key = "Stroke",
595
611
  Color = barTheme.borderColor,
596
612
  Thickness = barTheme.borderThickness,
597
613
  ApplyStrokeMode = Enum.ApplyStrokeMode.Border,
598
614
  }), isTopSegment and React.createElement("uicorner", {
615
+ key = "Corners",
599
616
  TopLeftRadius = barCornerRadius,
600
617
  TopRightRadius = barCornerRadius,
601
618
  BottomLeftRadius = UDim.new(0, 0),
@@ -611,11 +628,13 @@ local function BarChart(props)
611
628
  end
612
629
  -- ▲ ReadonlyArray.map ▲
613
630
  _result_13 = React.createElement(Container, {
631
+ name = "StackedBar",
614
632
  Size = UDim2.fromScale(1, 1),
615
633
  }, _newValue_3, combinedTooltips and React.createElement(Tooltip, {
616
634
  content = getCombinedTooltip(index),
617
635
  placement = "Center",
618
636
  }, React.createElement(Container, {
637
+ name = "CombinedTooltipTarget",
619
638
  Size = animationProgress:map(function(progress)
620
639
  return UDim2.fromScale(1, (positiveExtents[index + 1] - negativeExtents[index + 1]) / chartRange * progress)
621
640
  end),
@@ -629,34 +648,34 @@ local function BarChart(props)
629
648
  -- ▼ ReadonlyArray.map ▼
630
649
  local _newValue_3 = table.create(#_exp_5)
631
650
  local _callback_5 = function(dataset, datasetIndex)
632
- local _condition_8 = dataset.values[index + 1]
633
- if _condition_8 == nil then
634
- _condition_8 = 0
651
+ local _condition_9 = dataset.values[index + 1]
652
+ if _condition_9 == nil then
653
+ _condition_9 = 0
635
654
  end
636
- local value = _condition_8
655
+ local value = _condition_9
637
656
  local _result_14 = dataset.labels
638
657
  if _result_14 ~= nil then
639
658
  _result_14 = _result_14[index + 1]
640
659
  end
641
- local _condition_9 = _result_14
642
- if _condition_9 == nil then
643
- _condition_9 = label
660
+ local _condition_10 = _result_14
661
+ if _condition_10 == nil then
662
+ _condition_10 = label
644
663
  end
645
- local tooltipLabel = _condition_9
664
+ local tooltipLabel = _condition_10
646
665
  local magnitude = math.abs(value)
647
666
  local _exp_6 = props.data.datasets
648
667
  -- ▼ ReadonlyArray.some ▼
649
668
  local _result_15 = false
650
669
  local _callback_6 = function(otherDataset, otherIndex)
651
- local _condition_10 = otherIndex > datasetIndex
652
- if _condition_10 then
653
- local _condition_11 = otherDataset.values[index + 1]
654
- if _condition_11 == nil then
655
- _condition_11 = 0
670
+ local _condition_11 = otherIndex > datasetIndex
671
+ if _condition_11 then
672
+ local _condition_12 = otherDataset.values[index + 1]
673
+ if _condition_12 == nil then
674
+ _condition_12 = 0
656
675
  end
657
- _condition_10 = _condition_11 == value
676
+ _condition_11 = _condition_12 == value
658
677
  end
659
- return _condition_10
678
+ return _condition_11
660
679
  end
661
680
  for _k, _v in _exp_6 do
662
681
  if _callback_6(_v, _k - 1, _exp_6) then
@@ -673,11 +692,11 @@ local function BarChart(props)
673
692
  -- ▼ ReadonlyArray.reduce ▼
674
693
  local _result_16 = 0
675
694
  local _callback_7 = function(covered, otherDataset)
676
- local _condition_10 = otherDataset.values[index + 1]
677
- if _condition_10 == nil then
678
- _condition_10 = 0
695
+ local _condition_11 = otherDataset.values[index + 1]
696
+ if _condition_11 == nil then
697
+ _condition_11 = 0
679
698
  end
680
- local otherValue = _condition_10
699
+ local otherValue = _condition_11
681
700
  local otherMagnitude = math.abs(otherValue)
682
701
  local sameDirection = (value >= 0) == (otherValue >= 0)
683
702
  return if sameDirection and otherMagnitude < magnitude then math.max(covered, otherMagnitude) else covered
@@ -692,11 +711,11 @@ local function BarChart(props)
692
711
  -- ▼ ReadonlyArray.filter ▼
693
712
  local _newValue_4 = {}
694
713
  local _callback_8 = function(otherDataset)
695
- local _condition_10 = otherDataset.values[index + 1]
696
- if _condition_10 == nil then
697
- _condition_10 = 0
714
+ local _condition_11 = otherDataset.values[index + 1]
715
+ if _condition_11 == nil then
716
+ _condition_11 = 0
698
717
  end
699
- return math.abs(_condition_10) > magnitude
718
+ return math.abs(_condition_11) > magnitude
700
719
  end
701
720
  local _length = 0
702
721
  for _k, _v in _exp_8 do
@@ -712,11 +731,11 @@ local function BarChart(props)
712
731
  -- ▼ ReadonlyArray.some ▼
713
732
  local _result_17 = false
714
733
  local _callback_9 = function(otherDataset)
715
- local _condition_10 = otherDataset.values[index + 1]
716
- if _condition_10 == nil then
717
- _condition_10 = 0
734
+ local _condition_11 = otherDataset.values[index + 1]
735
+ if _condition_11 == nil then
736
+ _condition_11 = 0
718
737
  end
719
- local otherValue = _condition_10
738
+ local otherValue = _condition_11
720
739
  return (value >= 0) == (otherValue >= 0) and math.abs(otherValue) > magnitude
721
740
  end
722
741
  for _k, _v in _exp_9 do
@@ -728,6 +747,8 @@ local function BarChart(props)
728
747
  -- ▲ ReadonlyArray.some ▲
729
748
  local isTallest = not _result_17
730
749
  local visibleSection = React.createElement(Container, {
750
+ key = `Segment-{datasetIndex}`,
751
+ name = `Segment-{datasetIndex}`,
731
752
  Size = animationProgress:map(function(progress)
732
753
  return UDim2.fromScale(1, visibleMagnitude / chartRange * progress)
733
754
  end),
@@ -738,10 +759,12 @@ local function BarChart(props)
738
759
  BackgroundTransparency = unstackedTransparency,
739
760
  BackgroundColor3 = getBarColor(dataset, datasetIndex, index),
740
761
  }, React.createElement("uistroke", {
762
+ key = "Stroke",
741
763
  Color = barTheme.borderColor,
742
764
  Thickness = barTheme.borderThickness,
743
765
  ApplyStrokeMode = Enum.ApplyStrokeMode.Border,
744
766
  }), isTallest and React.createElement("uicorner", {
767
+ key = "Corners",
745
768
  TopLeftRadius = barCornerRadius,
746
769
  TopRightRadius = barCornerRadius,
747
770
  BottomLeftRadius = UDim.new(0, 0),
@@ -757,11 +780,13 @@ local function BarChart(props)
757
780
  end
758
781
  -- ▲ ReadonlyArray.map ▲
759
782
  _result_13 = React.createElement(Container, {
783
+ name = "UnstackedBar",
760
784
  Size = UDim2.fromScale(1, 1),
761
785
  }, _newValue_3, combinedTooltips and React.createElement(Tooltip, {
762
786
  content = getCombinedTooltip(index),
763
787
  placement = "Center",
764
788
  }, React.createElement(Container, {
789
+ name = "CombinedTooltipTarget",
765
790
  Size = animationProgress:map(function(progress)
766
791
  return UDim2.fromScale(1, (positiveExtents[index + 1] - negativeExtents[index + 1]) / chartRange * progress)
767
792
  end),
@@ -772,6 +797,8 @@ local function BarChart(props)
772
797
  })))
773
798
  end
774
799
  return React.createElement(Container, {
800
+ key = `BarGroup-{index}`,
801
+ name = `BarGroup-{index}`,
775
802
  Size = UDim2.fromScale(0, 1),
776
803
  }, _result_13)
777
804
  end
@@ -779,7 +806,8 @@ local function BarChart(props)
779
806
  _newValue_2[_k] = _callback_4(_v, _k - 1, _exp_4)
780
807
  end
781
808
  -- ▲ ReadonlyArray.map ▲
782
- _condition_7 = React.createElement(Container, {
809
+ _condition_8 = React.createElement(Container, {
810
+ name = "BarsContainer",
783
811
  Size = UDim2.fromScale(1, 1),
784
812
  }, React.createElement(HStack, {
785
813
  HorizontalFlex = Enum.UIFlexAlignment.Fill,
@@ -788,11 +816,13 @@ local function BarChart(props)
788
816
  }, _newValue_2))
789
817
  end
790
818
  local _exp_4 = React.createElement(Container, {
819
+ name = "ChartArea",
791
820
  Size = UDim2.new(1, 0, 1, -xAxisSize),
792
- }, _condition_6, _condition_7)
793
- local _condition_8 = showXAxis
794
- if _condition_8 then
821
+ }, _condition_7, _condition_8)
822
+ local _condition_9 = showXAxis
823
+ if _condition_9 then
795
824
  local _exp_5 = React.createElement("frame", {
825
+ key = "XAxisLine",
796
826
  Size = UDim2.new(1, 0, 0, getLineThickness(xLine, barTheme.axis)),
797
827
  Position = UDim2.new(0, 0, 0, xAxisSpacing),
798
828
  BorderSizePixel = 0,
@@ -802,51 +832,57 @@ local function BarChart(props)
802
832
  local _exp_6 = props.data.labels
803
833
  -- ▼ ReadonlyArray.map ▼
804
834
  local _newValue_2 = table.create(#_exp_6)
805
- local _callback_4 = function(label)
806
- local _attributes = {}
835
+ local _callback_4 = function(label, index)
836
+ local _attributes_1 = {
837
+ key = "Tick",
838
+ }
807
839
  local _result_13 = xAxis
808
840
  if _result_13 ~= nil then
809
841
  _result_13 = _result_13.tickThickness
810
842
  end
811
- local _condition_9 = _result_13
812
- if _condition_9 == nil then
813
- _condition_9 = barTheme.xAxis.tickThickness
843
+ local _condition_10 = _result_13
844
+ if _condition_10 == nil then
845
+ _condition_10 = barTheme.xAxis.tickThickness
814
846
  end
815
847
  local _result_14 = xAxis
816
848
  if _result_14 ~= nil then
817
849
  _result_14 = _result_14.tickSize
818
850
  end
819
- local _condition_10 = _result_14
820
- if _condition_10 == nil then
821
- _condition_10 = barTheme.xAxis.tickSize
851
+ local _condition_11 = _result_14
852
+ if _condition_11 == nil then
853
+ _condition_11 = barTheme.xAxis.tickSize
822
854
  end
823
- _attributes.Size = UDim2.new(0, _condition_9, 0, _condition_10)
824
- _attributes.Position = UDim2.new(0.5, 0, 0, xAxisSpacing)
825
- _attributes.AnchorPoint = Vector2.new(0.5, 0)
826
- _attributes.BorderSizePixel = 0
855
+ _attributes_1.Size = UDim2.new(0, _condition_10, 0, _condition_11)
856
+ _attributes_1.Position = UDim2.new(0.5, 0, 0, xAxisSpacing)
857
+ _attributes_1.AnchorPoint = Vector2.new(0.5, 0)
858
+ _attributes_1.BorderSizePixel = 0
827
859
  local _result_15 = xAxis
828
860
  if _result_15 ~= nil then
829
861
  _result_15 = _result_15.tickColor
830
862
  end
831
- local _condition_11 = _result_15
832
- if _condition_11 == nil then
833
- _condition_11 = barTheme.xAxis.tickColor
863
+ local _condition_12 = _result_15
864
+ if _condition_12 == nil then
865
+ _condition_12 = barTheme.xAxis.tickColor
834
866
  end
835
- _attributes.BackgroundColor3 = _condition_11
867
+ _attributes_1.BackgroundColor3 = _condition_12
836
868
  local _result_16 = xAxis
837
869
  if _result_16 ~= nil then
838
870
  _result_16 = _result_16.tickTransparency
839
871
  end
840
- local _condition_12 = _result_16
841
- if _condition_12 == nil then
842
- _condition_12 = barTheme.xAxis.tickTransparency
872
+ local _condition_13 = _result_16
873
+ if _condition_13 == nil then
874
+ _condition_13 = barTheme.xAxis.tickTransparency
843
875
  end
844
- _attributes.BackgroundTransparency = _condition_12
876
+ _attributes_1.BackgroundTransparency = _condition_13
845
877
  return React.createElement(Container, {
878
+ key = `XAxisTick-{index}`,
879
+ name = `XAxisTick-{index}`,
846
880
  Size = UDim2.fromScale(0, 1),
847
- }, React.createElement("frame", _attributes), React.createElement(Container, {
881
+ }, React.createElement("frame", _attributes_1), React.createElement(Container, {
882
+ name = "XAxisLabel",
848
883
  center = true,
849
884
  }, React.createElement(Text, {
885
+ name = "XAxisLabelText",
850
886
  text = label,
851
887
  TextWrapped = false,
852
888
  })))
@@ -855,25 +891,26 @@ local function BarChart(props)
855
891
  _newValue_2[_k] = _callback_4(_v, _k - 1, _exp_6)
856
892
  end
857
893
  -- ▲ ReadonlyArray.map ▲
858
- _condition_8 = React.createElement(Container, {
894
+ _condition_9 = React.createElement(Container, {
895
+ name = "XAxisContainer",
859
896
  Size = UDim2.new(1, 0, 0, xAxisSize),
860
897
  }, _exp_5, React.createElement(Container, {
898
+ name = "XAxisLabels",
861
899
  Size = UDim2.fromScale(1, 1),
862
900
  }, React.createElement(HStack, {
863
901
  HorizontalFlex = Enum.UIFlexAlignment.Fill,
864
902
  Padding = barSpacing,
865
903
  }, _newValue_2)))
866
904
  end
867
- return React.createElement(Container, {
868
- Size = UDim2.fromScale(1, 1),
869
- }, React.createElement(HStack, {
905
+ return React.createElement(Container, _attributes, React.createElement(HStack, {
870
906
  HorizontalFlex = Enum.UIFlexAlignment.Fill,
871
907
  spacing = "None",
872
908
  }, _exp_3, React.createElement(Container, {
909
+ name = "PlotArea",
873
910
  Size = UDim2.new(1, -yAxisSize, 1, 0),
874
911
  }, React.createElement(VStack, {
875
912
  spacing = "None",
876
- }, _exp_4, _condition_8))))
913
+ }, _exp_4, _condition_9))))
877
914
  end
878
915
  return {
879
916
  BarChart = BarChart,
@@ -14,6 +14,7 @@ type PieValue = {
14
14
  };
15
15
  interface PieProps {
16
16
  key?: string;
17
+ name?: string;
17
18
  values: PieValue[];
18
19
  ['label-distance']?: number;
19
20
  ['label-hover']?: boolean;
@@ -30,6 +30,7 @@ local function Segment(props)
30
30
  anchor = Vector2.new(0.5, 0)
31
31
  end
32
32
  return React.createElement("frame", {
33
+ key = "SegmentWedge",
33
34
  Size = UDim2.fromScale(sizeX, sizeY),
34
35
  AnchorPoint = anchor,
35
36
  Position = UDim2.fromScale(0.5, 0.5),
@@ -38,14 +39,17 @@ local function Segment(props)
38
39
  BackgroundTransparency = 1,
39
40
  BackgroundColor3 = Color3.fromHex("#FFFFFF"),
40
41
  }, React.createElement("frame", {
42
+ key = "SegmentFill",
41
43
  BackgroundColor3 = props.color,
42
44
  Size = UDim2.fromScale(if sizeX == 1 then 1 else 2, if sizeY == 1 then 1 else 2),
43
45
  AnchorPoint = Vector2.new(0.5, 0.5),
44
46
  BorderSizePixel = 0,
45
47
  Position = UDim2.fromScale(anchor.X, anchor.Y),
46
48
  }, React.createElement("uicorner", {
49
+ key = "Corners",
47
50
  CornerRadius = UDim.new(0.5, 0),
48
51
  }), React.createElement("uigradient", {
52
+ key = "Gradient",
49
53
  Transparency = NumberSequence.new({ NumberSequenceKeypoint.new(0, 1), NumberSequenceKeypoint.new(0.4999, 1), NumberSequenceKeypoint.new(0.5, 0), NumberSequenceKeypoint.new(1, 0) }),
50
54
  Rotation = zeroed + props.fill * 180,
51
55
  })))
@@ -146,6 +150,7 @@ local function Pie(props)
146
150
  local background = if not (type(label) == "string") and label.BackgroundColor3 ~= nil then label.BackgroundColor3 else theme.components.charts.pie.labels.backgroundColor or theme.components.box.backgroundColor
147
151
  local border = if not (type(label) == "string") and label.BorderColor3 ~= nil then label.BorderColor3 else theme.components.charts.pie.labels.borderColor or theme.components.box.borderColor
148
152
  local _attributes = {
153
+ key = `PieLabel-{index}`,
149
154
  Size = UDim2.fromScale(0, 0),
150
155
  AutomaticSize = Enum.AutomaticSize.XY,
151
156
  AnchorPoint = Vector2.new(0.5, 0.5),
@@ -158,6 +163,7 @@ local function Pie(props)
158
163
  end
159
164
  _attributes.BackgroundTransparency = _condition_1
160
165
  local _exp_2 = React.createElement(Text, {
166
+ name = "PieLabelText",
161
167
  text = text,
162
168
  typography = TypographyHelper:getTypography(theme, "md", theme.components.charts.pie.labels.typography),
163
169
  })
@@ -168,7 +174,9 @@ local function Pie(props)
168
174
  end
169
175
  _attributes_1.radius = _condition_2
170
176
  local _exp_3 = React.createElement(Corners, _attributes_1)
171
- local _attributes_2 = {}
177
+ local _attributes_2 = {
178
+ key = "Stroke",
179
+ }
172
180
  local _condition_3 = theme.components.charts.pie.labels.borderThickness
173
181
  if _condition_3 == nil then
174
182
  _condition_3 = theme.components.box.borderThickness
@@ -182,6 +190,7 @@ local function Pie(props)
182
190
  table.insert(labels, _arg0_1)
183
191
  elseif label.content ~= nil then
184
192
  local _arg0_1 = React.createElement("frame", {
193
+ key = `PieLabel-{index}`,
185
194
  Size = UDim2.fromScale(0, 0),
186
195
  AutomaticSize = Enum.AutomaticSize.XY,
187
196
  AnchorPoint = Vector2.new(0.5, 0.5),
@@ -214,10 +223,16 @@ local function Pie(props)
214
223
  end
215
224
  end
216
225
  end
217
- return React.createElement("canvasgroup", {
218
- BackgroundTransparency = 1,
219
- Size = UDim2.fromScale(1, 1),
220
- }, shadowPadding, React.createElement("frame", {
226
+ local _attributes = {}
227
+ local _condition = props.name
228
+ if _condition == nil then
229
+ _condition = "Pie"
230
+ end
231
+ _attributes.key = _condition
232
+ _attributes.BackgroundTransparency = 1
233
+ _attributes.Size = UDim2.fromScale(1, 1)
234
+ return React.createElement("canvasgroup", _attributes, shadowPadding, React.createElement("frame", {
235
+ key = "HitArea",
221
236
  BackgroundTransparency = 1,
222
237
  Size = UDim2.fromScale(1, 1),
223
238
  Event = {
@@ -273,6 +288,7 @@ local function Pie(props)
273
288
  }, segments, labels, theme.components.charts.pie.boxShadow ~= nil and React.createElement(BoxShadow, {
274
289
  completeShadow = theme.components.charts.pie.boxShadow,
275
290
  }), React.createElement("uicorner", {
291
+ key = "Corners",
276
292
  CornerRadius = UDim.new(1, 0),
277
293
  })))
278
294
  end
@@ -6,6 +6,7 @@ interface BoxShadowProps extends ShadowElementProps {
6
6
  color?: Color3;
7
7
  transparency?: number;
8
8
  zindex?: number;
9
+ name?: string;
9
10
  }
10
11
  export declare function BoxShadow(props: BoxShadowProps): React.JSX.Element | undefined;
11
12
  export {};
@@ -50,13 +50,20 @@ local function BoxShadow(props)
50
50
  _object[_left_3] = _condition_1
51
51
  shadowProps = _object
52
52
  end
53
- local _attributes = table.clone(shadowProps)
54
- setmetatable(_attributes, nil)
55
- local _condition = props.zindex
53
+ local _attributes = {}
54
+ local _condition = props.name
56
55
  if _condition == nil then
57
- _condition = -1
56
+ _condition = "BoxShadow"
58
57
  end
59
- _attributes.ZIndex = _condition
58
+ _attributes.key = _condition
59
+ for _k, _v in shadowProps do
60
+ _attributes[_k] = _v
61
+ end
62
+ local _condition_1 = props.zindex
63
+ if _condition_1 == nil then
64
+ _condition_1 = -1
65
+ end
66
+ _attributes.ZIndex = _condition_1
60
67
  return React.createElement("uishadow", _attributes)
61
68
  end
62
69
  return {