@parrot-co/parrot-ui 0.0.66 → 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
@@ -45,6 +45,12 @@ $parcel$export(module.exports, "IconTray", () => $d9681b77772be59b$export$50e381
45
45
  $parcel$export(module.exports, "Sticker", () => $a15741e0d788b3da$export$ea98c603db73aee7);
46
46
  $parcel$export(module.exports, "DropdownMenu", () => $39b5e387b93e95b5$export$e44a253a59704894);
47
47
  $parcel$export(module.exports, "Tabs", () => $33f331db51cbeb3d$export$1aaa3deaa90ea306);
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);
51
+ $parcel$export(module.exports, "parrot", () => $80923bc9c1ba824c$export$3817b7a54a07cec7);
52
+ $parcel$export(module.exports, "ParrotTheme", () => $80923bc9c1ba824c$export$bca14c5b3b88a9c9);
53
+ $parcel$export(module.exports, "ParrotThemeConfig", () => $80923bc9c1ba824c$export$e506a1d27d1eaa20);
48
54
  /* eslint-disable @typescript-eslint/no-explicit-any */
49
55
 
50
56
  const $80923bc9c1ba824c$export$8f45430ccf837300 = {
@@ -107,7 +113,8 @@ const $80923bc9c1ba824c$export$8f45430ccf837300 = {
107
113
  whiteA: $E4F9t$radixuicolors.whiteA,
108
114
  blackA: $E4F9t$radixuicolors.blackA
109
115
  };
110
- const { styled: $80923bc9c1ba824c$export$3817b7a54a07cec7 , css: $80923bc9c1ba824c$export$dbf350e5966cf602 , keyframes: $80923bc9c1ba824c$export$d25ddfdf17c3ad3e , config: $80923bc9c1ba824c$export$e506a1d27d1eaa20 } = (0, $E4F9t$stitchesreact.createStitches)({
116
+ const { styled: $80923bc9c1ba824c$export$3817b7a54a07cec7 , css: $80923bc9c1ba824c$export$dbf350e5966cf602 , keyframes: $80923bc9c1ba824c$export$d25ddfdf17c3ad3e , config: $80923bc9c1ba824c$export$e506a1d27d1eaa20 , theme: $80923bc9c1ba824c$export$bca14c5b3b88a9c9 } = (0, $E4F9t$stitchesreact.createStitches)({
117
+ prefix: "parrot-ui",
111
118
  theme: {
112
119
  colors: {
113
120
  ...(0, $E4F9t$radixuicolors.gray),
@@ -1070,7 +1077,7 @@ function $02a166a5043d2558$export$ccdcc3b9d72a654(color, variant) {
1070
1077
  background: "white",
1071
1078
  color: "$gray12",
1072
1079
  fill: "$gray12",
1073
- border: variant === "outline" ? "1.5px solid $gray5" : "none",
1080
+ border: variant === "plain" ? "none" : "1.5px solid $gray5",
1074
1081
  "&:focus": {
1075
1082
  boxShadow: $02a166a5043d2558$export$71074ab0ed740397("violet")
1076
1083
  }
@@ -1516,29 +1523,23 @@ var $66ede1fa66acd93e$export$2e2bcd8739ae039 = $66ede1fa66acd93e$var$InputError;
1516
1523
 
1517
1524
 
1518
1525
 
1519
-
1520
- const $04e5d96aee536e27$var$Socket = (0, $80923bc9c1ba824c$export$3817b7a54a07cec7)("div", {
1526
+ const $04e5d96aee536e27$var$Socket = (0, $80923bc9c1ba824c$export$3817b7a54a07cec7)("span", {
1521
1527
  display: "flex",
1522
1528
  height: "100%",
1529
+ alignItems: "center",
1523
1530
  variants: {
1524
1531
  side: {
1525
1532
  left: {
1526
- pl: 8
1533
+ pr: 4
1527
1534
  },
1528
1535
  right: {
1529
- pr: 8
1536
+ pl: 4
1530
1537
  }
1531
1538
  }
1532
1539
  }
1533
1540
  });
1534
1541
  const $04e5d96aee536e27$var$Sockets = /*#__PURE__*/ (0, ($parcel$interopDefault($E4F9t$react))).forwardRef(({ append: append , prepend: prepend , children: children , ...props }, ref)=>{
1535
- return /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsxs)((0, $00118e4526047a1f$export$2e2bcd8739ae039), {
1536
- align: "center",
1537
- justify: "center",
1538
- gap: 2,
1539
- stretchX: true,
1540
- ref: ref,
1541
- ...props,
1542
+ return /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsxs)((0, $04e5d96aee536e27$import$867d6c90a4013129$ffb0004e005737fa), {
1542
1543
  children: [
1543
1544
  prepend && /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)($04e5d96aee536e27$var$Socket, {
1544
1545
  side: "left",
@@ -2069,6 +2070,9 @@ const $c88148a2f2e3c74c$export$b28585a458fee016 = /*#__PURE__*/ (0, ($parcel$int
2069
2070
  ...props,
2070
2071
  type: showPassword ? "text" : "password",
2071
2072
  append: /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)((0, $8d4373b1a05e63fb$export$353f5b6fc5456de1), {
2073
+ css: {
2074
+ marginRight: 6
2075
+ },
2072
2076
  variant: "solid",
2073
2077
  color: "white",
2074
2078
  size: "xs",
@@ -2235,10 +2239,17 @@ const $51cace3b4418a1cf$export$74cd3087fed3724d = (0, $80923bc9c1ba824c$export$3
2235
2239
  alignItems: "center",
2236
2240
  justifyContent: "center",
2237
2241
  boxSizing: "border-box",
2242
+ "&[data-focused=true]": {
2243
+ boxShadow: "$focusRing"
2244
+ },
2238
2245
  "&[data-checked='true']": {
2239
2246
  background: "$violet10",
2240
2247
  borderColor: "transparent"
2241
2248
  },
2249
+ "&[data-indeterminate=true]": {
2250
+ background: "$gray4",
2251
+ borderColor: "transparent"
2252
+ },
2242
2253
  defaultVariants: {
2243
2254
  size: "sm",
2244
2255
  appearance: "flushed",
@@ -2289,7 +2300,7 @@ const $51cace3b4418a1cf$export$74cd3087fed3724d = (0, $80923bc9c1ba824c$export$3
2289
2300
  size: "sm",
2290
2301
  shape: "round",
2291
2302
  css: {
2292
- borderRadius: 6
2303
+ borderRadius: 4
2293
2304
  }
2294
2305
  },
2295
2306
  {
@@ -2317,13 +2328,12 @@ const $51cace3b4418a1cf$export$74cd3087fed3724d = (0, $80923bc9c1ba824c$export$3
2317
2328
  });
2318
2329
 
2319
2330
 
2331
+
2320
2332
  const $869aa95ca6defa25$export$48513f6b9f8ce62d = /*#__PURE__*/ (0, ($parcel$interopDefault($E4F9t$react))).forwardRef((props, ref)=>{
2321
2333
  const { appearance: appearance , size: size , ...otherProps } = props;
2322
2334
  // check if checkbox is rendered in a group context
2323
2335
  const groupState = (0, ($parcel$interopDefault($E4F9t$react))).useContext((0, $b8075849c644c9bf$export$f9c6924e160136d1));
2324
2336
  const isWithinGroup = groupState != null;
2325
- // if it is, use the group state to determine the checkbox state
2326
- // otherwise, use the toggle state hook
2327
2337
  const singleState = (0, $E4F9t$reactstately.useToggleState)(props);
2328
2338
  const inputRef = (0, ($parcel$interopDefault($E4F9t$react))).useRef(null);
2329
2339
  const single = (0, $E4F9t$reactaria.useCheckbox)(otherProps, singleState, inputRef);
@@ -2331,7 +2341,7 @@ const $869aa95ca6defa25$export$48513f6b9f8ce62d = /*#__PURE__*/ (0, ($parcel$int
2331
2341
  const { isFocusVisible: isFocusVisible , focusProps: focusProps } = (0, $E4F9t$reactaria.useFocusRing)();
2332
2342
  const inputProps = isWithinGroup ? group?.inputProps : single.inputProps;
2333
2343
  const state = isWithinGroup ? groupState : singleState;
2334
- const isSelected = isWithinGroup ? groupState.isSelected(props.value) : state.isSelected;
2344
+ const isSelected = isWithinGroup ? groupState.isSelected(props.value ?? "") : state.isSelected;
2335
2345
  return /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsxs)((0, $51cace3b4418a1cf$export$eea83358d9434634), {
2336
2346
  "data-disabled": inputProps?.disabled,
2337
2347
  ref: ref,
@@ -2344,27 +2354,39 @@ const $869aa95ca6defa25$export$48513f6b9f8ce62d = /*#__PURE__*/ (0, ($parcel$int
2344
2354
  ...focusProps
2345
2355
  })
2346
2356
  }),
2347
- /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)((0, $51cace3b4418a1cf$export$74cd3087fed3724d), {
2357
+ /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsxs)((0, $51cace3b4418a1cf$export$74cd3087fed3724d), {
2358
+ "data-focused": isFocusVisible,
2348
2359
  "aria-hidden": "true",
2349
2360
  "data-checked": isSelected,
2361
+ "data-indeterminate": props.isIndeterminate,
2350
2362
  size: size,
2351
2363
  appearance: appearance,
2352
- children: /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)("svg", {
2353
- stroke: "white",
2354
- width: "0.75rem",
2355
- height: "0.75rem",
2356
- viewBox: "0 0 18 18",
2357
- children: /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)("polyline", {
2358
- points: "1 9 7 14 15 4",
2359
- fill: "none",
2360
- strokeWidth: 3,
2361
- strokeDasharray: 22,
2362
- strokeDashoffset: isSelected ? 44 : 66,
2363
- style: {
2364
- 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
2365
2387
  }
2366
2388
  })
2367
- })
2389
+ ]
2368
2390
  }),
2369
2391
  otherProps.children
2370
2392
  ]
@@ -3423,6 +3445,7 @@ const $8fff24416ec1775a$export$f7513421c53ce141 = (0, $80923bc9c1ba824c$export$3
3423
3445
 
3424
3446
 
3425
3447
 
3448
+
3426
3449
  function $e12b0eb570e3e94c$export$d41d9ab3de2def3d(text) {
3427
3450
  const str = String(text);
3428
3451
  let hash = 0;
@@ -3439,6 +3462,10 @@ function $e12b0eb570e3e94c$export$d41d9ab3de2def3d(text) {
3439
3462
  function $e12b0eb570e3e94c$export$d560c7e4a29451c2() {
3440
3463
  return Math.random().toString(36);
3441
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
+ }
3442
3469
 
3443
3470
 
3444
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)=>{
@@ -3929,12 +3956,15 @@ const $33f331db51cbeb3d$export$1aaa3deaa90ea306 = {
3929
3956
 
3930
3957
 
3931
3958
 
3932
- 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",
3933
3961
  display: "inline-flex",
3934
3962
  alignItems: "center",
3935
3963
  justifyContent: "center",
3936
3964
  fontFamily: "$sans",
3937
3965
  boxSizing: "border-box",
3966
+ lineHeight: 1.2,
3967
+ height: "$$tag-base-height",
3938
3968
  defaultVariants: {
3939
3969
  color: "gray",
3940
3970
  variant: "light",
@@ -3944,135 +3974,59 @@ const $e1b9bb7437d6292e$export$7a4af5518e2bbe67 = (0, $80923bc9c1ba824c$export$3
3944
3974
  variants: {
3945
3975
  size: {
3946
3976
  "3xs": {
3947
- height: 14,
3948
- px: 8,
3977
+ "$$tag-base-height": "14px",
3978
+ px: 4,
3949
3979
  fontSize: 11
3950
3980
  },
3951
3981
  "2xs": {
3952
- height: 16,
3953
- px: 8,
3982
+ "$$tag-base-height": "16px",
3983
+ px: 4,
3954
3984
  fontSize: 12
3955
3985
  },
3956
3986
  xs: {
3957
- height: 20,
3958
- px: 8,
3959
- fontSize: 13
3987
+ "$$tag-base-height": "20px",
3988
+ px: 4,
3989
+ fontSize: 12
3960
3990
  },
3961
3991
  sm: {
3962
- height: 24,
3963
- px: 8,
3964
- fontSize: 14
3992
+ "$$tag-base-height": "24px",
3993
+ px: 6,
3994
+ fontSize: 13
3965
3995
  },
3966
3996
  md: {
3967
- height: 28,
3968
- px: 12,
3997
+ "$$tag-base-height": "28px",
3998
+ px: 6,
3969
3999
  fontSize: 14
3970
4000
  },
3971
4001
  lg: {
3972
- height: 32,
3973
- px: 12,
4002
+ "$$tag-base-height": "32px",
4003
+ px: 6,
3974
4004
  fontSize: 14
3975
4005
  }
3976
4006
  },
3977
4007
  shape: {
3978
- pill: {},
3979
- round: {},
4008
+ pill: {
4009
+ borderRadius: "calc($$tag-base-height / 2)"
4010
+ },
4011
+ round: {
4012
+ borderRadius: "calc($$tag-base-height / 4)"
4013
+ },
3980
4014
  sharp: {
3981
4015
  borderRadius: 0
3982
4016
  }
3983
4017
  }
3984
- },
3985
- compoundVariants: [
3986
- {
3987
- size: "3xs",
3988
- shape: "round",
3989
- css: {
3990
- borderRadius: 4
3991
- }
3992
- },
3993
- {
3994
- size: "2xs",
3995
- shape: "round",
3996
- css: {
3997
- borderRadius: 4
3998
- }
3999
- },
4000
- {
4001
- size: "xs",
4002
- shape: "round",
4003
- css: {
4004
- borderRadius: 6
4005
- }
4006
- },
4007
- {
4008
- size: "sm",
4009
- shape: "round",
4010
- css: {
4011
- borderRadius: 6
4012
- }
4013
- },
4014
- {
4015
- size: "md",
4016
- shape: "round",
4017
- css: {
4018
- borderRadius: 6
4019
- }
4020
- },
4021
- {
4022
- size: "lg",
4023
- shape: "round",
4024
- css: {
4025
- borderRadius: 8
4026
- }
4027
- },
4028
- {
4029
- size: "3xs",
4030
- shape: "pill",
4031
- css: {
4032
- borderRadius: 10
4033
- }
4034
- },
4035
- {
4036
- size: "2xs",
4037
- shape: "pill",
4038
- css: {
4039
- borderRadius: 10
4040
- }
4041
- },
4042
- {
4043
- size: "xs",
4044
- shape: "pill",
4045
- css: {
4046
- borderRadius: 12
4047
- }
4048
- },
4049
- {
4050
- size: "sm",
4051
- shape: "pill",
4052
- css: {
4053
- borderRadius: 14
4054
- }
4055
- },
4056
- {
4057
- size: "md",
4058
- shape: "pill",
4059
- css: {
4060
- borderRadius: 16
4061
- }
4062
- },
4063
- {
4064
- size: "lg",
4065
- shape: "pill",
4066
- css: {
4067
- borderRadius: 20
4068
- }
4069
- }
4070
- ]
4018
+ }
4071
4019
  });
4072
4020
 
4073
4021
 
4074
- 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
+ }, []);
4075
4028
  return /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)((0, $e1b9bb7437d6292e$export$7a4af5518e2bbe67), {
4029
+ color: color ?? randomColor,
4076
4030
  ref: ref,
4077
4031
  ...props,
4078
4032
  children: /*#__PURE__*/ (0, $E4F9t$reactjsxruntime.jsx)((0, $04e5d96aee536e27$export$2e2bcd8739ae039), {
@@ -4703,4 +4657,463 @@ function $39b5e387b93e95b5$export$e44a253a59704894(props) {
4703
4657
 
4704
4658
 
4705
4659
 
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
5015
+ });
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;
5112
+
5113
+
5114
+
5115
+
5116
+
5117
+
5118
+
4706
5119
  //# sourceMappingURL=main.js.map