@parrot-co/parrot-ui 0.0.67 → 0.0.68

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/main.js CHANGED
@@ -46,6 +46,8 @@ $parcel$export(module.exports, "Sticker", () => $a15741e0d788b3da$export$ea98c60
46
46
  $parcel$export(module.exports, "DropdownMenu", () => $39b5e387b93e95b5$export$e44a253a59704894);
47
47
  $parcel$export(module.exports, "Tabs", () => $33f331db51cbeb3d$export$1aaa3deaa90ea306);
48
48
  $parcel$export(module.exports, "Table", () => $3dd82f03c348455b$export$54ec01a60f47d33d);
49
+ $parcel$export(module.exports, "Timeline", () => $c07c6db9734c74af$export$e6a97ba2cae5bb94);
50
+ $parcel$export(module.exports, "Modal", () => $ceb05569908c0e0d$export$2b77a92f1a5ad772);
49
51
  $parcel$export(module.exports, "parrot", () => $80923bc9c1ba824c$export$3817b7a54a07cec7);
50
52
  $parcel$export(module.exports, "ParrotTheme", () => $80923bc9c1ba824c$export$bca14c5b3b88a9c9);
51
53
  $parcel$export(module.exports, "ParrotThemeConfig", () => $80923bc9c1ba824c$export$e506a1d27d1eaa20);
@@ -1075,7 +1077,7 @@ function $02a166a5043d2558$export$ccdcc3b9d72a654(color, variant) {
1075
1077
  background: "white",
1076
1078
  color: "$gray12",
1077
1079
  fill: "$gray12",
1078
- border: variant === "outline" ? "1.5px solid $gray5" : "none",
1080
+ border: variant === "plain" ? "none" : "1.5px solid $gray5",
1079
1081
  "&:focus": {
1080
1082
  boxShadow: $02a166a5043d2558$export$71074ab0ed740397("violet")
1081
1083
  }
@@ -1521,29 +1523,23 @@ var $66ede1fa66acd93e$export$2e2bcd8739ae039 = $66ede1fa66acd93e$var$InputError;
1521
1523
 
1522
1524
 
1523
1525
 
1524
-
1525
- const $04e5d96aee536e27$var$Socket = (0, $80923bc9c1ba824c$export$3817b7a54a07cec7)("div", {
1526
+ const $04e5d96aee536e27$var$Socket = (0, $80923bc9c1ba824c$export$3817b7a54a07cec7)("span", {
1526
1527
  display: "flex",
1527
1528
  height: "100%",
1529
+ alignItems: "center",
1528
1530
  variants: {
1529
1531
  side: {
1530
1532
  left: {
1531
- pl: 8
1533
+ pr: 4
1532
1534
  },
1533
1535
  right: {
1534
- pr: 8
1536
+ pl: 4
1535
1537
  }
1536
1538
  }
1537
1539
  }
1538
1540
  });
1539
1541
  const $04e5d96aee536e27$var$Sockets = /*#__PURE__*/ (0, ($parcel$interopDefault($E4F9t$react))).forwardRef(({ append: append , prepend: prepend , children: children , ...props }, ref)=>{
1540
- return /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsxs)((0, $00118e4526047a1f$export$2e2bcd8739ae039), {
1541
- align: "center",
1542
- justify: "center",
1543
- gap: 2,
1544
- stretchX: true,
1545
- ref: ref,
1546
- ...props,
1542
+ return /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsxs)((0, $04e5d96aee536e27$import$867d6c90a4013129$ffb0004e005737fa), {
1547
1543
  children: [
1548
1544
  prepend && /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)($04e5d96aee536e27$var$Socket, {
1549
1545
  side: "left",
@@ -2074,6 +2070,9 @@ const $c88148a2f2e3c74c$export$b28585a458fee016 = /*#__PURE__*/ (0, ($parcel$int
2074
2070
  ...props,
2075
2071
  type: showPassword ? "text" : "password",
2076
2072
  append: /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)((0, $8d4373b1a05e63fb$export$353f5b6fc5456de1), {
2073
+ css: {
2074
+ marginRight: 6
2075
+ },
2077
2076
  variant: "solid",
2078
2077
  color: "white",
2079
2078
  size: "xs",
@@ -2240,10 +2239,17 @@ const $51cace3b4418a1cf$export$74cd3087fed3724d = (0, $80923bc9c1ba824c$export$3
2240
2239
  alignItems: "center",
2241
2240
  justifyContent: "center",
2242
2241
  boxSizing: "border-box",
2242
+ "&[data-focused=true]": {
2243
+ boxShadow: "$focusRing"
2244
+ },
2243
2245
  "&[data-checked='true']": {
2244
2246
  background: "$violet10",
2245
2247
  borderColor: "transparent"
2246
2248
  },
2249
+ "&[data-indeterminate=true]": {
2250
+ background: "$gray4",
2251
+ borderColor: "transparent"
2252
+ },
2247
2253
  defaultVariants: {
2248
2254
  size: "sm",
2249
2255
  appearance: "flushed",
@@ -2294,7 +2300,7 @@ const $51cace3b4418a1cf$export$74cd3087fed3724d = (0, $80923bc9c1ba824c$export$3
2294
2300
  size: "sm",
2295
2301
  shape: "round",
2296
2302
  css: {
2297
- borderRadius: 6
2303
+ borderRadius: 4
2298
2304
  }
2299
2305
  },
2300
2306
  {
@@ -2322,13 +2328,12 @@ const $51cace3b4418a1cf$export$74cd3087fed3724d = (0, $80923bc9c1ba824c$export$3
2322
2328
  });
2323
2329
 
2324
2330
 
2331
+
2325
2332
  const $869aa95ca6defa25$export$48513f6b9f8ce62d = /*#__PURE__*/ (0, ($parcel$interopDefault($E4F9t$react))).forwardRef((props, ref)=>{
2326
2333
  const { appearance: appearance , size: size , ...otherProps } = props;
2327
2334
  // check if checkbox is rendered in a group context
2328
2335
  const groupState = (0, ($parcel$interopDefault($E4F9t$react))).useContext((0, $b8075849c644c9bf$export$f9c6924e160136d1));
2329
2336
  const isWithinGroup = groupState != null;
2330
- // if it is, use the group state to determine the checkbox state
2331
- // otherwise, use the toggle state hook
2332
2337
  const singleState = (0, $E4F9t$reactstately.useToggleState)(props);
2333
2338
  const inputRef = (0, ($parcel$interopDefault($E4F9t$react))).useRef(null);
2334
2339
  const single = (0, $E4F9t$reactaria.useCheckbox)(otherProps, singleState, inputRef);
@@ -2336,7 +2341,7 @@ const $869aa95ca6defa25$export$48513f6b9f8ce62d = /*#__PURE__*/ (0, ($parcel$int
2336
2341
  const { isFocusVisible: isFocusVisible , focusProps: focusProps } = (0, $E4F9t$reactaria.useFocusRing)();
2337
2342
  const inputProps = isWithinGroup ? group?.inputProps : single.inputProps;
2338
2343
  const state = isWithinGroup ? groupState : singleState;
2339
- const isSelected = isWithinGroup ? groupState.isSelected(props.value) : state.isSelected;
2344
+ const isSelected = isWithinGroup ? groupState.isSelected(props.value ?? "") : state.isSelected;
2340
2345
  return /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsxs)((0, $51cace3b4418a1cf$export$eea83358d9434634), {
2341
2346
  "data-disabled": inputProps?.disabled,
2342
2347
  ref: ref,
@@ -2349,27 +2354,39 @@ const $869aa95ca6defa25$export$48513f6b9f8ce62d = /*#__PURE__*/ (0, ($parcel$int
2349
2354
  ...focusProps
2350
2355
  })
2351
2356
  }),
2352
- /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)((0, $51cace3b4418a1cf$export$74cd3087fed3724d), {
2357
+ /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsxs)((0, $51cace3b4418a1cf$export$74cd3087fed3724d), {
2358
+ "data-focused": isFocusVisible,
2353
2359
  "aria-hidden": "true",
2354
2360
  "data-checked": isSelected,
2361
+ "data-indeterminate": props.isIndeterminate,
2355
2362
  size: size,
2356
2363
  appearance: appearance,
2357
- children: /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)("svg", {
2358
- stroke: "white",
2359
- width: "0.75rem",
2360
- height: "0.75rem",
2361
- viewBox: "0 0 18 18",
2362
- children: /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)("polyline", {
2363
- points: "1 9 7 14 15 4",
2364
- fill: "none",
2365
- strokeWidth: 3,
2366
- strokeDasharray: 22,
2367
- strokeDashoffset: isSelected ? 44 : 66,
2368
- style: {
2369
- transition: "all 400ms"
2364
+ children: [
2365
+ isSelected && /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)("svg", {
2366
+ stroke: "white",
2367
+ width: "0.75rem",
2368
+ height: "0.75rem",
2369
+ viewBox: "0 0 18 18",
2370
+ children: /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)("polyline", {
2371
+ points: "1 9 7 14 15 4",
2372
+ fill: "none",
2373
+ strokeWidth: 3,
2374
+ strokeDasharray: 22,
2375
+ strokeDashoffset: isSelected ? 44 : 66,
2376
+ style: {
2377
+ transition: "all 400ms"
2378
+ }
2379
+ })
2380
+ }),
2381
+ props.isIndeterminate && /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)((0, $7003944ca9ba7b6a$export$2e2bcd8739ae039), {
2382
+ css: {
2383
+ background: "$gray11",
2384
+ width: "70%",
2385
+ height: 2,
2386
+ borderRadius: 4
2370
2387
  }
2371
2388
  })
2372
- })
2389
+ ]
2373
2390
  }),
2374
2391
  otherProps.children
2375
2392
  ]
@@ -3428,6 +3445,7 @@ const $8fff24416ec1775a$export$f7513421c53ce141 = (0, $80923bc9c1ba824c$export$3
3428
3445
 
3429
3446
 
3430
3447
 
3448
+
3431
3449
  function $e12b0eb570e3e94c$export$d41d9ab3de2def3d(text) {
3432
3450
  const str = String(text);
3433
3451
  let hash = 0;
@@ -3444,6 +3462,10 @@ function $e12b0eb570e3e94c$export$d41d9ab3de2def3d(text) {
3444
3462
  function $e12b0eb570e3e94c$export$d560c7e4a29451c2() {
3445
3463
  return Math.random().toString(36);
3446
3464
  }
3465
+ function $e12b0eb570e3e94c$export$e4369cabd7e84cd9(string) {
3466
+ const hash = $e12b0eb570e3e94c$export$d41d9ab3de2def3d(string);
3467
+ return (0, $02a166a5043d2558$export$36308cce1deef340)[hash % (0, $02a166a5043d2558$export$36308cce1deef340).length];
3468
+ }
3447
3469
 
3448
3470
 
3449
3471
  const $53cff1de4d77d0c5$export$e2255cf6045e8d47 = /*#__PURE__*/ $E4F9t$react.forwardRef(({ src: src , alt: alt , name: name , color: color , variant: variant = "light" , fallback: fallback , children: children , ...props }, ref)=>{
@@ -3934,12 +3956,15 @@ const $33f331db51cbeb3d$export$1aaa3deaa90ea306 = {
3934
3956
 
3935
3957
 
3936
3958
 
3937
- const $e1b9bb7437d6292e$export$7a4af5518e2bbe67 = (0, $80923bc9c1ba824c$export$3817b7a54a07cec7)("div", (0, $02a166a5043d2558$export$5a7eb6284e7684f5), {
3959
+ const $e1b9bb7437d6292e$export$7a4af5518e2bbe67 = (0, $80923bc9c1ba824c$export$3817b7a54a07cec7)("span", (0, $02a166a5043d2558$export$5a7eb6284e7684f5), {
3960
+ "$$tag-base-height": "14px",
3938
3961
  display: "inline-flex",
3939
3962
  alignItems: "center",
3940
3963
  justifyContent: "center",
3941
3964
  fontFamily: "$sans",
3942
3965
  boxSizing: "border-box",
3966
+ lineHeight: 1.2,
3967
+ height: "$$tag-base-height",
3943
3968
  defaultVariants: {
3944
3969
  color: "gray",
3945
3970
  variant: "light",
@@ -3949,135 +3974,59 @@ const $e1b9bb7437d6292e$export$7a4af5518e2bbe67 = (0, $80923bc9c1ba824c$export$3
3949
3974
  variants: {
3950
3975
  size: {
3951
3976
  "3xs": {
3952
- height: 14,
3953
- px: 8,
3977
+ "$$tag-base-height": "14px",
3978
+ px: 4,
3954
3979
  fontSize: 11
3955
3980
  },
3956
3981
  "2xs": {
3957
- height: 16,
3958
- px: 8,
3982
+ "$$tag-base-height": "16px",
3983
+ px: 4,
3959
3984
  fontSize: 12
3960
3985
  },
3961
3986
  xs: {
3962
- height: 20,
3963
- px: 8,
3964
- fontSize: 13
3987
+ "$$tag-base-height": "20px",
3988
+ px: 4,
3989
+ fontSize: 12
3965
3990
  },
3966
3991
  sm: {
3967
- height: 24,
3968
- px: 8,
3969
- fontSize: 14
3992
+ "$$tag-base-height": "24px",
3993
+ px: 6,
3994
+ fontSize: 13
3970
3995
  },
3971
3996
  md: {
3972
- height: 28,
3973
- px: 12,
3997
+ "$$tag-base-height": "28px",
3998
+ px: 6,
3974
3999
  fontSize: 14
3975
4000
  },
3976
4001
  lg: {
3977
- height: 32,
3978
- px: 12,
4002
+ "$$tag-base-height": "32px",
4003
+ px: 6,
3979
4004
  fontSize: 14
3980
4005
  }
3981
4006
  },
3982
4007
  shape: {
3983
- pill: {},
3984
- round: {},
4008
+ pill: {
4009
+ borderRadius: "calc($$tag-base-height / 2)"
4010
+ },
4011
+ round: {
4012
+ borderRadius: "calc($$tag-base-height / 4)"
4013
+ },
3985
4014
  sharp: {
3986
4015
  borderRadius: 0
3987
4016
  }
3988
4017
  }
3989
- },
3990
- compoundVariants: [
3991
- {
3992
- size: "3xs",
3993
- shape: "round",
3994
- css: {
3995
- borderRadius: 4
3996
- }
3997
- },
3998
- {
3999
- size: "2xs",
4000
- shape: "round",
4001
- css: {
4002
- borderRadius: 4
4003
- }
4004
- },
4005
- {
4006
- size: "xs",
4007
- shape: "round",
4008
- css: {
4009
- borderRadius: 6
4010
- }
4011
- },
4012
- {
4013
- size: "sm",
4014
- shape: "round",
4015
- css: {
4016
- borderRadius: 6
4017
- }
4018
- },
4019
- {
4020
- size: "md",
4021
- shape: "round",
4022
- css: {
4023
- borderRadius: 6
4024
- }
4025
- },
4026
- {
4027
- size: "lg",
4028
- shape: "round",
4029
- css: {
4030
- borderRadius: 8
4031
- }
4032
- },
4033
- {
4034
- size: "3xs",
4035
- shape: "pill",
4036
- css: {
4037
- borderRadius: 10
4038
- }
4039
- },
4040
- {
4041
- size: "2xs",
4042
- shape: "pill",
4043
- css: {
4044
- borderRadius: 10
4045
- }
4046
- },
4047
- {
4048
- size: "xs",
4049
- shape: "pill",
4050
- css: {
4051
- borderRadius: 12
4052
- }
4053
- },
4054
- {
4055
- size: "sm",
4056
- shape: "pill",
4057
- css: {
4058
- borderRadius: 14
4059
- }
4060
- },
4061
- {
4062
- size: "md",
4063
- shape: "pill",
4064
- css: {
4065
- borderRadius: 16
4066
- }
4067
- },
4068
- {
4069
- size: "lg",
4070
- shape: "pill",
4071
- css: {
4072
- borderRadius: 20
4073
- }
4074
- }
4075
- ]
4018
+ }
4076
4019
  });
4077
4020
 
4078
4021
 
4079
- const $232939a9dd93729d$export$3288d34c523a1192 = /*#__PURE__*/ (0, ($parcel$interopDefault($E4F9t$react))).forwardRef(({ prepend: prepend , append: append , children: children , ...props }, ref)=>{
4022
+
4023
+ const $232939a9dd93729d$export$3288d34c523a1192 = /*#__PURE__*/ (0, ($parcel$interopDefault($E4F9t$react))).forwardRef(({ prepend: prepend , append: append , children: children , hashValue: hashValue , color: color , ...props }, ref)=>{
4024
+ const randomColor = (0, ($parcel$interopDefault($E4F9t$react))).useMemo(()=>{
4025
+ if (hashValue) return (0, $e12b0eb570e3e94c$export$e4369cabd7e84cd9)(hashValue);
4026
+ return "gray";
4027
+ }, []);
4080
4028
  return /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)((0, $e1b9bb7437d6292e$export$7a4af5518e2bbe67), {
4029
+ color: color ?? randomColor,
4081
4030
  ref: ref,
4082
4031
  ...props,
4083
4032
  children: /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)((0, $04e5d96aee536e27$export$2e2bcd8739ae039), {
@@ -4708,10 +4657,458 @@ function $39b5e387b93e95b5$export$e44a253a59704894(props) {
4708
4657
 
4709
4658
 
4710
4659
 
4711
- const $3dd82f03c348455b$export$54ec01a60f47d33d = /*#__PURE__*/ $E4F9t$react.forwardRef((props, ref)=>{
4712
- return /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)("div", {});
4660
+
4661
+
4662
+
4663
+
4664
+ const $96aabcfbe9019d87$export$a6cc9d741fb2f287 = (0, $80923bc9c1ba824c$export$3817b7a54a07cec7)("table", {
4665
+ borderCollapse: "collapse",
4666
+ width: "100%"
4667
+ });
4668
+ const $96aabcfbe9019d87$export$96f9bf5ade461735 = (0, $80923bc9c1ba824c$export$3817b7a54a07cec7)("tbody", {});
4669
+ const $96aabcfbe9019d87$export$8a602e750662ba27 = (0, $80923bc9c1ba824c$export$3817b7a54a07cec7)("tr", {});
4670
+ const $96aabcfbe9019d87$export$2306c7347640f5e4 = (0, $80923bc9c1ba824c$export$3817b7a54a07cec7)("td", {
4671
+ fontFamily: "$sans",
4672
+ borderBottom: "1px solid $gray3",
4673
+ py: 8,
4674
+ fontSize: "$3",
4675
+ variants: {
4676
+ isHeader: {
4677
+ true: {
4678
+ color: "$gray10",
4679
+ fontWeight: "$regular",
4680
+ textAlign: "left",
4681
+ fontSize: "$3"
4682
+ }
4683
+ }
4684
+ }
4685
+ });
4686
+
4687
+
4688
+
4689
+
4690
+
4691
+ // export function Checkbox(props: AriaCheckboxProps) {
4692
+ // const { ...otherProps } = props;
4693
+ // const ref = React.useRef(null);
4694
+ // const state = useToggleState(otherProps);
4695
+ // const { inputProps } = useCheckbox(otherProps, state, ref);
4696
+ // return (
4697
+ // <>
4698
+ // <input {...inputProps} ref={ref} />
4699
+ // </>
4700
+ // );
4701
+ // }
4702
+ const $3dd82f03c348455b$var$TableWrapper = /*#__PURE__*/ $E4F9t$react.forwardRef((props, ref)=>{
4703
+ const state = (0, $E4F9t$reactstately.useTableState)({
4704
+ ...props,
4705
+ showSelectionCheckboxes: true
4706
+ });
4707
+ const tableRef = $E4F9t$react.useRef(null);
4708
+ const { collection: collection } = state;
4709
+ const { gridProps: gridProps } = (0, $E4F9t$reactaria.useTable)(props, state, tableRef);
4710
+ return /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)((0, $00118e4526047a1f$export$2e2bcd8739ae039), {
4711
+ stretchX: true,
4712
+ ref: ref,
4713
+ children: /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsxs)((0, $96aabcfbe9019d87$export$a6cc9d741fb2f287), {
4714
+ ...gridProps,
4715
+ ref: tableRef,
4716
+ children: [
4717
+ /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)($3dd82f03c348455b$var$TableRowGroup, {
4718
+ type: "thead",
4719
+ children: collection.headerRows.map((headerRow)=>{
4720
+ return /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)($3dd82f03c348455b$var$HeaderRow, {
4721
+ state: state,
4722
+ item: headerRow,
4723
+ children: [
4724
+ ...headerRow.childNodes
4725
+ ].map((column)=>{
4726
+ return column.props.isSelectionCell ? /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)($3dd82f03c348455b$var$SelectAllCell, {
4727
+ state: state,
4728
+ column: column
4729
+ }, column.key) : /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)($3dd82f03c348455b$var$ColumnHeader, {
4730
+ state: state,
4731
+ column: column
4732
+ }, column.key);
4733
+ })
4734
+ }, headerRow.key);
4735
+ })
4736
+ }),
4737
+ /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)($3dd82f03c348455b$var$TableRowGroup, {
4738
+ type: "tbody",
4739
+ children: [
4740
+ ...collection.body.childNodes
4741
+ ].map((row)=>{
4742
+ return /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)($3dd82f03c348455b$var$TableRow, {
4743
+ item: row,
4744
+ state: state,
4745
+ children: [
4746
+ ...row.childNodes
4747
+ ].map((cell)=>{
4748
+ return cell.props.isSelectionCell ? /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)($3dd82f03c348455b$var$CheckboxCell, {
4749
+ cell: cell,
4750
+ state: state
4751
+ }, cell.key) : /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)($3dd82f03c348455b$var$TableCell, {
4752
+ cell: cell,
4753
+ state: state
4754
+ }, cell.key);
4755
+ })
4756
+ }, row.key);
4757
+ })
4758
+ })
4759
+ ]
4760
+ })
4761
+ });
4762
+ });
4763
+ function $3dd82f03c348455b$var$TableRowGroup({ type: type , children: children }) {
4764
+ const { rowGroupProps: rowGroupProps } = (0, $E4F9t$reactaria.useTableRowGroup)();
4765
+ return /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)((0, $96aabcfbe9019d87$export$96f9bf5ade461735), {
4766
+ as: type,
4767
+ ...rowGroupProps,
4768
+ children: children
4769
+ });
4770
+ }
4771
+ function $3dd82f03c348455b$var$HeaderRow({ item: item , state: state , children: children }) {
4772
+ const ref = $E4F9t$react.useRef(null);
4773
+ const { rowProps: rowProps } = (0, $E4F9t$reactaria.useTableHeaderRow)({
4774
+ node: item
4775
+ }, state, ref);
4776
+ return /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)("tr", {
4777
+ ...rowProps,
4778
+ ref: ref,
4779
+ children: children
4780
+ });
4781
+ }
4782
+ function $3dd82f03c348455b$var$ColumnHeader({ column: column , state: state }) {
4783
+ const ref = $E4F9t$react.useRef(null);
4784
+ const { columnHeaderProps: columnHeaderProps } = (0, $E4F9t$reactaria.useTableColumnHeader)({
4785
+ node: column
4786
+ }, state, ref);
4787
+ const { isFocusVisible: isFocusVisible , focusProps: focusProps } = (0, $E4F9t$reactaria.useFocusRing)();
4788
+ function getSortIcon() {
4789
+ if (state.sortDescriptor?.direction === "ascending") return /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)((0, $E4F9t$reacticonshi.HiSortAscending), {
4790
+ size: 16
4791
+ });
4792
+ if (state.sortDescriptor?.direction === "descending") return /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)((0, $E4F9t$reacticonshi.HiSortDescending), {
4793
+ size: 16
4794
+ });
4795
+ return /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)((0, $E4F9t$reacticonshi.HiSelector), {
4796
+ size: 16
4797
+ });
4798
+ }
4799
+ return /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)((0, $96aabcfbe9019d87$export$2306c7347640f5e4), {
4800
+ isHeader: true,
4801
+ "data-focused": isFocusVisible,
4802
+ as: "th",
4803
+ ref: ref,
4804
+ ...(0, $E4F9t$reactaria.mergeProps)(focusProps, columnHeaderProps),
4805
+ children: /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsxs)((0, $00118e4526047a1f$export$2e2bcd8739ae039), {
4806
+ align: "center",
4807
+ gap: 2,
4808
+ children: [
4809
+ column.rendered,
4810
+ column.props.allowsSorting && getSortIcon()
4811
+ ]
4812
+ })
4813
+ });
4814
+ }
4815
+ function $3dd82f03c348455b$var$TableRow({ item: item , children: children , state: state }) {
4816
+ const ref = $E4F9t$react.useRef(null);
4817
+ const { rowProps: rowProps , isPressed: isPressed } = (0, $E4F9t$reactaria.useTableRow)({
4818
+ node: item
4819
+ }, state, ref);
4820
+ const { isFocusVisible: isFocusVisible , focusProps: focusProps } = (0, $E4F9t$reactaria.useFocusRing)();
4821
+ return /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)((0, $96aabcfbe9019d87$export$8a602e750662ba27), {
4822
+ ref: ref,
4823
+ "data-pressed": isPressed,
4824
+ "data-focused": isFocusVisible,
4825
+ ...(0, $E4F9t$reactaria.mergeProps)(focusProps, rowProps),
4826
+ children: children
4827
+ });
4828
+ }
4829
+ function $3dd82f03c348455b$var$TableCell({ cell: cell , state: state }) {
4830
+ const ref = $E4F9t$react.useRef(null);
4831
+ const { gridCellProps: gridCellProps } = (0, $E4F9t$reactaria.useTableCell)({
4832
+ node: cell
4833
+ }, state, ref);
4834
+ const { isFocusVisible: isFocusVisible , focusProps: focusProps } = (0, $E4F9t$reactaria.useFocusRing)();
4835
+ return /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)((0, $96aabcfbe9019d87$export$2306c7347640f5e4), {
4836
+ "data-focused": isFocusVisible,
4837
+ ref: ref,
4838
+ ...(0, $E4F9t$reactaria.mergeProps)(focusProps, gridCellProps),
4839
+ children: cell.rendered
4840
+ });
4841
+ }
4842
+ function $3dd82f03c348455b$var$CheckboxCell({ cell: cell , state: state }) {
4843
+ const ref = $E4F9t$react.useRef(null);
4844
+ const { gridCellProps: gridCellProps } = (0, $E4F9t$reactaria.useTableCell)({
4845
+ node: cell
4846
+ }, state, ref);
4847
+ const { checkboxProps: checkboxProps } = (0, $E4F9t$reactaria.useTableSelectionCheckbox)({
4848
+ key: cell.parentKey ?? (0, $e12b0eb570e3e94c$export$d560c7e4a29451c2)()
4849
+ }, state);
4850
+ return /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)((0, $96aabcfbe9019d87$export$2306c7347640f5e4), {
4851
+ css: {
4852
+ width: 40
4853
+ },
4854
+ ...gridCellProps,
4855
+ ref: ref,
4856
+ children: /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)((0, $869aa95ca6defa25$export$48513f6b9f8ce62d), {
4857
+ appearance: "outline",
4858
+ ...checkboxProps
4859
+ })
4860
+ });
4861
+ }
4862
+ function $3dd82f03c348455b$var$SelectAllCell({ column: column , state: state }) {
4863
+ const ref = $E4F9t$react.useRef(null);
4864
+ const { columnHeaderProps: columnHeaderProps } = (0, $E4F9t$reactaria.useTableColumnHeader)({
4865
+ node: column
4866
+ }, state, ref);
4867
+ const { checkboxProps: checkboxProps } = (0, $E4F9t$reactaria.useTableSelectAllCheckbox)(state);
4868
+ return /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)((0, $96aabcfbe9019d87$export$2306c7347640f5e4), {
4869
+ as: "th",
4870
+ ...columnHeaderProps,
4871
+ ref: ref,
4872
+ children: state.selectionManager.selectionMode === "single" ? /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)((0, $E4F9t$reactaria.VisuallyHidden), {
4873
+ children: checkboxProps["aria-label"]
4874
+ }) : /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)((0, $869aa95ca6defa25$export$48513f6b9f8ce62d), {
4875
+ appearance: "outline",
4876
+ ...checkboxProps
4877
+ })
4878
+ });
4879
+ }
4880
+ function $3dd82f03c348455b$export$54ec01a60f47d33d({ columns: columns , data: data , ...props }) {
4881
+ function findColumnDefByKey(key) {
4882
+ return columns?.find((column)=>column.key === key);
4883
+ }
4884
+ function renderCell(item, key) {
4885
+ const columnDef = findColumnDefByKey(key);
4886
+ if (!columnDef) return null;
4887
+ if (columnDef?.render) return columnDef.render(item[columnDef.dataIndex], item);
4888
+ return item[columnDef?.dataIndex];
4889
+ }
4890
+ return /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsxs)($3dd82f03c348455b$var$TableWrapper, {
4891
+ ...props,
4892
+ children: [
4893
+ /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)($3dd82f03c348455b$export$54ec01a60f47d33d.Header, {
4894
+ columns: columns,
4895
+ children: (column)=>/*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)($3dd82f03c348455b$export$54ec01a60f47d33d.Column, {
4896
+ allowsSorting: column.allowSorting,
4897
+ children: column?.title
4898
+ })
4899
+ }),
4900
+ /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)($3dd82f03c348455b$export$54ec01a60f47d33d.Body, {
4901
+ items: data,
4902
+ children: (item)=>/*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)($3dd82f03c348455b$export$54ec01a60f47d33d.Row, {
4903
+ children: (columnKey)=>/*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)($3dd82f03c348455b$export$54ec01a60f47d33d.Cell, {
4904
+ children: renderCell(item, columnKey)
4905
+ })
4906
+ })
4907
+ })
4908
+ ]
4909
+ });
4910
+ }
4911
+ $3dd82f03c348455b$export$54ec01a60f47d33d.Header = (0, $E4F9t$reactstately.TableHeader);
4912
+ $3dd82f03c348455b$export$54ec01a60f47d33d.Body = (0, $E4F9t$reactstately.TableBody);
4913
+ $3dd82f03c348455b$export$54ec01a60f47d33d.Column = (0, $E4F9t$reactstately.Column);
4914
+ $3dd82f03c348455b$export$54ec01a60f47d33d.Row = (0, $E4F9t$reactstately.Row);
4915
+ $3dd82f03c348455b$export$54ec01a60f47d33d.Cell = (0, $E4F9t$reactstately.Cell);
4916
+ $3dd82f03c348455b$var$TableWrapper.displayName = "Table";
4917
+
4918
+
4919
+
4920
+
4921
+
4922
+
4923
+
4924
+
4925
+
4926
+
4927
+
4928
+
4929
+ const $b93150847fb5275f$export$801126757ee0703d = (0, $80923bc9c1ba824c$export$3817b7a54a07cec7)((0, $00118e4526047a1f$export$2e2bcd8739ae039), {
4930
+ size: "auto",
4931
+ defaultVariants: {
4932
+ justify: "center"
4933
+ }
4934
+ });
4935
+ const $b93150847fb5275f$export$757c414c7d55357c = (0, $80923bc9c1ba824c$export$3817b7a54a07cec7)((0, $7003944ca9ba7b6a$export$2e2bcd8739ae039), {
4936
+ borderInlineStart: "1px solid $gray4",
4937
+ height: "100%",
4938
+ width: 1
4939
+ });
4940
+ const $b93150847fb5275f$export$70e89defd31d36ee = (0, $80923bc9c1ba824c$export$3817b7a54a07cec7)((0, $7003944ca9ba7b6a$export$2e2bcd8739ae039), (0, $02a166a5043d2558$export$5a7eb6284e7684f5), {
4941
+ size: 12,
4942
+ borderRadius: 16,
4943
+ borderWidth: "3px !important"
4944
+ });
4945
+ const $b93150847fb5275f$export$c187897b30d9e78 = (0, $80923bc9c1ba824c$export$3817b7a54a07cec7)((0, $00118e4526047a1f$export$2e2bcd8739ae039), {
4946
+ position: "relative"
4947
+ });
4948
+ const $b93150847fb5275f$export$17fcda98577239c4 = (0, $80923bc9c1ba824c$export$3817b7a54a07cec7)((0, $00118e4526047a1f$export$2e2bcd8739ae039), {
4949
+ pb: 20,
4950
+ pl: 12
4951
+ });
4952
+
4953
+
4954
+ function $c07c6db9734c74af$export$e6a97ba2cae5bb94({ items: items , render: render , labelKey: labelKey , getIndicator: getIndicator , hideLastItemTail: hideLastItemTail = true }) {
4955
+ return /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)((0, $7003944ca9ba7b6a$export$2e2bcd8739ae039), {
4956
+ children: items.map((item, index)=>{
4957
+ const indicator = getIndicator?.(item) ?? /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)((0, $b93150847fb5275f$export$70e89defd31d36ee), {
4958
+ color: "blue",
4959
+ variant: "outline"
4960
+ });
4961
+ const content = render?.(item) ?? item[labelKey];
4962
+ const isLast = index === items.length - 1;
4963
+ return /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsxs)((0, $b93150847fb5275f$export$c187897b30d9e78), {
4964
+ children: [
4965
+ /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsxs)((0, $00118e4526047a1f$export$2e2bcd8739ae039), {
4966
+ align: "center",
4967
+ stack: true,
4968
+ children: [
4969
+ /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)((0, $b93150847fb5275f$export$801126757ee0703d), {
4970
+ className: "indicator-container",
4971
+ children: indicator
4972
+ }),
4973
+ isLast && hideLastItemTail ? null : /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)((0, $b93150847fb5275f$export$757c414c7d55357c), {})
4974
+ ]
4975
+ }),
4976
+ /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)((0, $b93150847fb5275f$export$17fcda98577239c4), {
4977
+ stretchX: true,
4978
+ children: content
4979
+ })
4980
+ ]
4981
+ }, index);
4982
+ })
4983
+ });
4984
+ }
4985
+
4986
+
4987
+
4988
+
4989
+
4990
+
4991
+
4992
+
4993
+
4994
+
4995
+
4996
+
4997
+
4998
+ const $ceb05569908c0e0d$var$ModalOverlay = (0, $80923bc9c1ba824c$export$3817b7a54a07cec7)((0, $7003944ca9ba7b6a$export$2e2bcd8739ae039), {
4999
+ position: "fixed",
5000
+ top: 0,
5001
+ right: 0,
5002
+ bottom: 0,
5003
+ left: 0,
5004
+ display: "flex",
5005
+ alignItems: "center",
5006
+ justifyContent: "center",
5007
+ background: "$blackA8"
5008
+ });
5009
+ const $ceb05569908c0e0d$var$ModalContent = (0, $80923bc9c1ba824c$export$3817b7a54a07cec7)((0, $7003944ca9ba7b6a$export$2e2bcd8739ae039), {
5010
+ background: "white",
5011
+ borderRadius: 12
5012
+ });
5013
+ const $ceb05569908c0e0d$var$ModalFooter = (0, $80923bc9c1ba824c$export$3817b7a54a07cec7)((0, $00118e4526047a1f$export$2e2bcd8739ae039), {
5014
+ p: 16
4713
5015
  });
4714
- $3dd82f03c348455b$export$54ec01a60f47d33d.displayName = "Table";
5016
+ const $ceb05569908c0e0d$var$ModalHead = (0, $80923bc9c1ba824c$export$3817b7a54a07cec7)((0, $00118e4526047a1f$export$2e2bcd8739ae039), {
5017
+ p: 16,
5018
+ borderBottom: "1px solid $gray3"
5019
+ });
5020
+ const $ceb05569908c0e0d$var$ModalBody = (0, $80923bc9c1ba824c$export$3817b7a54a07cec7)((0, $00118e4526047a1f$export$2e2bcd8739ae039), {
5021
+ p: 16
5022
+ });
5023
+ function $ceb05569908c0e0d$export$c6fdb837b070b4ff({ state: state , children: children , ...props }) {
5024
+ const modalRef = $E4F9t$react.useRef(null);
5025
+ const { modalProps: modalProps , underlayProps: underlayProps } = (0, $E4F9t$reactaria.useModalOverlay)(props, state, modalRef);
5026
+ if (!state.isOpen) return null;
5027
+ return /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)((0, $E4F9t$reactaria.Overlay), {
5028
+ children: /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)($ceb05569908c0e0d$var$ModalOverlay, {
5029
+ ...underlayProps,
5030
+ children: /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)((0, $7003944ca9ba7b6a$export$2e2bcd8739ae039), {
5031
+ ...modalProps,
5032
+ ref: modalRef,
5033
+ children: children
5034
+ })
5035
+ })
5036
+ });
5037
+ }
5038
+ function $ceb05569908c0e0d$var$Dialog({ width: width = 400 , title: title , onCancel: onCancel , onConfirm: onConfirm , confirmLabel: confirmLabel = "Confirm" , cancelLabel: cancelLabel = "Cancel" , description: description , children: children , state: state , confirmButtonProps: confirmButtonProps , cancelButtonProps: cancelButtonProps }) {
5039
+ const dialogRef = $E4F9t$react.useRef(null);
5040
+ const { dialogProps: dialogProps , titleProps: titleProps } = (0, $E4F9t$reactaria.useDialog)({
5041
+ role: "alertdialog"
5042
+ }, dialogRef);
5043
+ return /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsxs)($ceb05569908c0e0d$var$ModalContent, {
5044
+ css: {
5045
+ width: width
5046
+ },
5047
+ ref: dialogRef,
5048
+ ...dialogProps,
5049
+ children: [
5050
+ /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsxs)($ceb05569908c0e0d$var$ModalHead, {
5051
+ stack: true,
5052
+ gap: 2,
5053
+ className: "modal-head",
5054
+ children: [
5055
+ title && /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)((0, $6fb5722ea7b379d7$export$2e2bcd8739ae039), {
5056
+ weight: "medium",
5057
+ size: "lg",
5058
+ color: "black",
5059
+ ...titleProps,
5060
+ as: "div",
5061
+ children: title
5062
+ }),
5063
+ description && /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)((0, $6fb5722ea7b379d7$export$2e2bcd8739ae039), {
5064
+ lineHeight: "base",
5065
+ size: "sm",
5066
+ color: "light",
5067
+ as: "div",
5068
+ children: description
5069
+ })
5070
+ ]
5071
+ }),
5072
+ /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)((0, $00118e4526047a1f$export$2e2bcd8739ae039), {
5073
+ className: "modal-body",
5074
+ children: children
5075
+ }),
5076
+ (onConfirm || onCancel) && /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsxs)($ceb05569908c0e0d$var$ModalFooter, {
5077
+ gap: 2,
5078
+ justify: "end",
5079
+ stretchX: true,
5080
+ children: [
5081
+ onCancel && /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)((0, $8d4373b1a05e63fb$export$353f5b6fc5456de1), {
5082
+ ...cancelButtonProps,
5083
+ onPress: state.close,
5084
+ variant: "outline",
5085
+ color: "gray",
5086
+ children: cancelLabel
5087
+ }),
5088
+ onConfirm && /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)((0, $8d4373b1a05e63fb$export$353f5b6fc5456de1), {
5089
+ ...confirmButtonProps,
5090
+ children: confirmLabel
5091
+ })
5092
+ ]
5093
+ })
5094
+ ]
5095
+ });
5096
+ }
5097
+ function $ceb05569908c0e0d$export$2b77a92f1a5ad772(props) {
5098
+ return /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)($ceb05569908c0e0d$export$c6fdb837b070b4ff, {
5099
+ ...props,
5100
+ children: /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)($ceb05569908c0e0d$var$Dialog, {
5101
+ ...props
5102
+ })
5103
+ });
5104
+ }
5105
+ function $ceb05569908c0e0d$export$33ffd74ebf07f060(props = {}) {
5106
+ const state = (0, $E4F9t$reactstately.useOverlayTriggerState)(props);
5107
+ return state;
5108
+ }
5109
+ $ceb05569908c0e0d$export$2b77a92f1a5ad772.Body = $ceb05569908c0e0d$var$ModalBody;
5110
+ $ceb05569908c0e0d$export$2b77a92f1a5ad772.Footer = $ceb05569908c0e0d$var$ModalFooter;
5111
+ $ceb05569908c0e0d$export$2b77a92f1a5ad772.useModal = $ceb05569908c0e0d$export$33ffd74ebf07f060;
4715
5112
 
4716
5113
 
4717
5114