@northlight/ui 2.36.7 → 2.36.8

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.
@@ -23,6 +23,24 @@
23
23
 
24
24
  var NorthlightIcons__namespace = /*#__PURE__*/_interopNamespaceDefault(NorthlightIcons);
25
25
 
26
+ var __defProp$2u = Object.defineProperty;
27
+ var __getOwnPropSymbols$2u = Object.getOwnPropertySymbols;
28
+ var __hasOwnProp$2u = Object.prototype.hasOwnProperty;
29
+ var __propIsEnum$2u = Object.prototype.propertyIsEnumerable;
30
+ var __defNormalProp$2u = (obj, key, value) => key in obj ? __defProp$2u(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
31
+ var __spreadValues$2u = (a, b) => {
32
+ for (var prop in b || (b = {}))
33
+ if (__hasOwnProp$2u.call(b, prop))
34
+ __defNormalProp$2u(a, prop, b[prop]);
35
+ if (__getOwnPropSymbols$2u)
36
+ for (var prop of __getOwnPropSymbols$2u(b)) {
37
+ if (__propIsEnum$2u.call(b, prop))
38
+ __defNormalProp$2u(a, prop, b[prop]);
39
+ }
40
+ return a;
41
+ };
42
+ const Accordion = (props) => /* @__PURE__ */ React.createElement(react.Accordion, __spreadValues$2u({}, props));
43
+
26
44
  var __defProp$2t = Object.defineProperty;
27
45
  var __getOwnPropSymbols$2t = Object.getOwnPropertySymbols;
28
46
  var __hasOwnProp$2t = Object.prototype.hasOwnProperty;
@@ -39,7 +57,7 @@
39
57
  }
40
58
  return a;
41
59
  };
42
- const Accordion = (props) => /* @__PURE__ */ React.createElement(react.Accordion, __spreadValues$2t({}, props));
60
+ const AccordionButton = (props) => /* @__PURE__ */ React.createElement(react.AccordionButton, __spreadValues$2t({}, props));
43
61
 
44
62
  var __defProp$2s = Object.defineProperty;
45
63
  var __getOwnPropSymbols$2s = Object.getOwnPropertySymbols;
@@ -57,7 +75,7 @@
57
75
  }
58
76
  return a;
59
77
  };
60
- const AccordionButton = (props) => /* @__PURE__ */ React.createElement(react.AccordionButton, __spreadValues$2s({}, props));
78
+ const AccordionPanel = (props) => /* @__PURE__ */ React.createElement(react.AccordionPanel, __spreadValues$2s({}, props));
61
79
 
62
80
  var __defProp$2r = Object.defineProperty;
63
81
  var __getOwnPropSymbols$2r = Object.getOwnPropertySymbols;
@@ -75,25 +93,7 @@
75
93
  }
76
94
  return a;
77
95
  };
78
- const AccordionPanel = (props) => /* @__PURE__ */ React.createElement(react.AccordionPanel, __spreadValues$2r({}, props));
79
-
80
- var __defProp$2q = Object.defineProperty;
81
- var __getOwnPropSymbols$2q = Object.getOwnPropertySymbols;
82
- var __hasOwnProp$2q = Object.prototype.hasOwnProperty;
83
- var __propIsEnum$2q = Object.prototype.propertyIsEnumerable;
84
- var __defNormalProp$2q = (obj, key, value) => key in obj ? __defProp$2q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
85
- var __spreadValues$2q = (a, b) => {
86
- for (var prop in b || (b = {}))
87
- if (__hasOwnProp$2q.call(b, prop))
88
- __defNormalProp$2q(a, prop, b[prop]);
89
- if (__getOwnPropSymbols$2q)
90
- for (var prop of __getOwnPropSymbols$2q(b)) {
91
- if (__propIsEnum$2q.call(b, prop))
92
- __defNormalProp$2q(a, prop, b[prop]);
93
- }
94
- return a;
95
- };
96
- const AccordionItem = (props) => /* @__PURE__ */ React.createElement(react.AccordionItem, __spreadValues$2q({}, props));
96
+ const AccordionItem = (props) => /* @__PURE__ */ React.createElement(react.AccordionItem, __spreadValues$2r({}, props));
97
97
 
98
98
  const useDebounce = (value, delay) => {
99
99
  const [debouncedValue, setDebouncedValue] = React.useState(value);
@@ -245,55 +245,65 @@
245
245
  };
246
246
 
247
247
  const isBetween = (point, min, max) => point >= min && point <= max;
248
+ const isEventInsideRect = (ref, event) => {
249
+ let clientX;
250
+ let clientY;
251
+ if (event instanceof MouseEvent) {
252
+ clientX = event.clientX;
253
+ clientY = event.clientY;
254
+ } else if (event instanceof TouchEvent && event.changedTouches[0]) {
255
+ clientX = event.changedTouches[0].clientX;
256
+ clientY = event.changedTouches[0].clientY;
257
+ }
258
+ if (ramda.isNil(clientX) || ramda.isNil(clientY))
259
+ return true;
260
+ const {
261
+ top,
262
+ right,
263
+ left,
264
+ bottom
265
+ } = ref.current.getBoundingClientRect();
266
+ return isBetween(clientX, left, right) && isBetween(clientY, top, bottom);
267
+ };
268
+ const isHtmlElementRef = (ref) => !ramda.isNil(ref.current);
248
269
  const useOutsideRectClick = (ref, callback) => {
249
270
  const stateRef = React.useRef({
250
- isPointerDown: false,
271
+ isPointerDownOutsideRect: false,
251
272
  ignoreEmulatedMouseEvents: false
252
273
  });
253
274
  const state = stateRef.current;
254
275
  React.useEffect(() => {
255
276
  const handleMouseClick = (event) => {
256
- let clientX;
257
- let clientY;
258
- if (event instanceof MouseEvent) {
259
- clientX = event.clientX;
260
- clientY = event.clientY;
261
- } else if (event instanceof TouchEvent && event.changedTouches[0]) {
262
- clientX = event.changedTouches[0].clientX;
263
- clientY = event.changedTouches[0].clientY;
264
- }
265
- if (ramda.isNil(clientX) || ramda.isNil(clientY))
266
- return;
267
- if (ramda.isNil(ref == null ? void 0 : ref.current))
277
+ if (!isHtmlElementRef(ref)) {
268
278
  return;
269
- const {
270
- top,
271
- right,
272
- left,
273
- bottom
274
- } = ref.current.getBoundingClientRect();
275
- const isInBound = isBetween(clientX, left, right) && isBetween(clientY, top, bottom);
279
+ }
280
+ const isInBound = isEventInsideRect(ref, event);
276
281
  if (isInBound)
277
282
  return;
278
283
  callback(event);
279
284
  };
280
- const onPointerDown = () => {
281
- state.isPointerDown = true;
285
+ const onPointerDown = (event) => {
286
+ if (!isHtmlElementRef(ref)) {
287
+ return;
288
+ }
289
+ if (!isEventInsideRect(ref, event)) {
290
+ state.isPointerDownOutsideRect = true;
291
+ }
282
292
  };
283
293
  const onMouseUp = (event) => {
284
294
  if (state.ignoreEmulatedMouseEvents) {
285
295
  state.ignoreEmulatedMouseEvents = false;
286
296
  return;
287
297
  }
288
- if (state.isPointerDown) {
289
- state.isPointerDown = false;
298
+ if (state.isPointerDownOutsideRect) {
299
+ state.isPointerDownOutsideRect = false;
290
300
  handleMouseClick(event);
291
301
  }
292
302
  };
293
303
  const onTouchEnd = (event) => {
294
304
  state.ignoreEmulatedMouseEvents = true;
295
- if (state.isPointerDown) {
296
- state.isPointerDown = false;
305
+ if (state.isPointerDownOutsideRect) {
306
+ state.isPointerDownOutsideRect = false;
297
307
  handleMouseClick(event);
298
308
  }
299
309
  };
@@ -412,6 +422,24 @@
412
422
  return fieldError;
413
423
  }
414
424
 
425
+ var __defProp$2q = Object.defineProperty;
426
+ var __getOwnPropSymbols$2q = Object.getOwnPropertySymbols;
427
+ var __hasOwnProp$2q = Object.prototype.hasOwnProperty;
428
+ var __propIsEnum$2q = Object.prototype.propertyIsEnumerable;
429
+ var __defNormalProp$2q = (obj, key, value) => key in obj ? __defProp$2q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
430
+ var __spreadValues$2q = (a, b) => {
431
+ for (var prop in b || (b = {}))
432
+ if (__hasOwnProp$2q.call(b, prop))
433
+ __defNormalProp$2q(a, prop, b[prop]);
434
+ if (__getOwnPropSymbols$2q)
435
+ for (var prop of __getOwnPropSymbols$2q(b)) {
436
+ if (__propIsEnum$2q.call(b, prop))
437
+ __defNormalProp$2q(a, prop, b[prop]);
438
+ }
439
+ return a;
440
+ };
441
+ const passPropsToChild = (child, styles) => React.isValidElement(child) ? React.cloneElement(child, __spreadValues$2q({}, styles)) : child;
442
+
415
443
  var __defProp$2p = Object.defineProperty;
416
444
  var __getOwnPropSymbols$2p = Object.getOwnPropertySymbols;
417
445
  var __hasOwnProp$2p = Object.prototype.hasOwnProperty;
@@ -428,27 +456,9 @@
428
456
  }
429
457
  return a;
430
458
  };
431
- const passPropsToChild = (child, styles) => React.isValidElement(child) ? React.cloneElement(child, __spreadValues$2p({}, styles)) : child;
432
-
433
- var __defProp$2o = Object.defineProperty;
434
- var __getOwnPropSymbols$2o = Object.getOwnPropertySymbols;
435
- var __hasOwnProp$2o = Object.prototype.hasOwnProperty;
436
- var __propIsEnum$2o = Object.prototype.propertyIsEnumerable;
437
- var __defNormalProp$2o = (obj, key, value) => key in obj ? __defProp$2o(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
438
- var __spreadValues$2o = (a, b) => {
439
- for (var prop in b || (b = {}))
440
- if (__hasOwnProp$2o.call(b, prop))
441
- __defNormalProp$2o(a, prop, b[prop]);
442
- if (__getOwnPropSymbols$2o)
443
- for (var prop of __getOwnPropSymbols$2o(b)) {
444
- if (__propIsEnum$2o.call(b, prop))
445
- __defNormalProp$2o(a, prop, b[prop]);
446
- }
447
- return a;
448
- };
449
459
  const getChildrenWithProps = (children, styles, predicate = ramda.T) => {
450
460
  const childrenAsArr = React.Children.toArray(children);
451
- const childrenWithoutFocus = childrenAsArr.map((child, i) => predicate(child, i) ? passPropsToChild(child, __spreadValues$2o({}, styles)) : child);
461
+ const childrenWithoutFocus = childrenAsArr.map((child, i) => predicate(child, i) ? passPropsToChild(child, __spreadValues$2p({}, styles)) : child);
452
462
  return childrenWithoutFocus;
453
463
  };
454
464
 
@@ -522,80 +532,80 @@
522
532
  };
523
533
  };
524
534
 
525
- var __defProp$2n = Object.defineProperty;
526
- var __defProps$x = Object.defineProperties;
527
- var __getOwnPropDescs$x = Object.getOwnPropertyDescriptors;
528
- var __getOwnPropSymbols$2n = Object.getOwnPropertySymbols;
529
- var __hasOwnProp$2n = Object.prototype.hasOwnProperty;
530
- var __propIsEnum$2n = Object.prototype.propertyIsEnumerable;
531
- var __defNormalProp$2n = (obj, key, value) => key in obj ? __defProp$2n(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
532
- var __spreadValues$2n = (a, b) => {
535
+ var __defProp$2o = Object.defineProperty;
536
+ var __defProps$y = Object.defineProperties;
537
+ var __getOwnPropDescs$y = Object.getOwnPropertyDescriptors;
538
+ var __getOwnPropSymbols$2o = Object.getOwnPropertySymbols;
539
+ var __hasOwnProp$2o = Object.prototype.hasOwnProperty;
540
+ var __propIsEnum$2o = Object.prototype.propertyIsEnumerable;
541
+ var __defNormalProp$2o = (obj, key, value) => key in obj ? __defProp$2o(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
542
+ var __spreadValues$2o = (a, b) => {
533
543
  for (var prop in b || (b = {}))
534
- if (__hasOwnProp$2n.call(b, prop))
535
- __defNormalProp$2n(a, prop, b[prop]);
536
- if (__getOwnPropSymbols$2n)
537
- for (var prop of __getOwnPropSymbols$2n(b)) {
538
- if (__propIsEnum$2n.call(b, prop))
539
- __defNormalProp$2n(a, prop, b[prop]);
544
+ if (__hasOwnProp$2o.call(b, prop))
545
+ __defNormalProp$2o(a, prop, b[prop]);
546
+ if (__getOwnPropSymbols$2o)
547
+ for (var prop of __getOwnPropSymbols$2o(b)) {
548
+ if (__propIsEnum$2o.call(b, prop))
549
+ __defNormalProp$2o(a, prop, b[prop]);
540
550
  }
541
551
  return a;
542
552
  };
543
- var __spreadProps$x = (a, b) => __defProps$x(a, __getOwnPropDescs$x(b));
553
+ var __spreadProps$y = (a, b) => __defProps$y(a, __getOwnPropDescs$y(b));
544
554
  const customSelectStyles = {
545
- container: (provided) => __spreadProps$x(__spreadValues$2n({}, provided), {
555
+ container: (provided) => __spreadProps$y(__spreadValues$2o({}, provided), {
546
556
  width: "100%",
547
557
  color: "text.default"
548
558
  }),
549
- option: (provided, state) => __spreadProps$x(__spreadValues$2n({}, provided), {
559
+ option: (provided, state) => __spreadProps$y(__spreadValues$2o({}, provided), {
550
560
  background: state.isFocused && "background.select.option-focus",
551
561
  overflowWrap: "anywhere",
552
562
  _active: {
553
563
  background: "background.select.option-active"
554
564
  }
555
565
  }),
556
- valueContainer: (provided) => __spreadProps$x(__spreadValues$2n({}, provided), {
566
+ valueContainer: (provided) => __spreadProps$y(__spreadValues$2o({}, provided), {
557
567
  paddingInlineStart: "padding-inline.select.default"
558
568
  }),
559
- downChevron: (provided) => __spreadProps$x(__spreadValues$2n({}, provided), {
569
+ downChevron: (provided) => __spreadProps$y(__spreadValues$2o({}, provided), {
560
570
  color: "icon.select.default"
561
571
  }),
562
- placeholder: (provided) => __spreadProps$x(__spreadValues$2n({}, provided), {
572
+ placeholder: (provided) => __spreadProps$y(__spreadValues$2o({}, provided), {
563
573
  color: "text.select.placeholder"
564
574
  }),
565
575
  multiValue: (provided, state) => {
566
576
  var _a;
567
577
  const background = state.data.isFixed ? "background.select.option-disabled" : (_a = state.data.color) != null ? _a : provided.bgColor;
568
- return __spreadProps$x(__spreadValues$2n({}, provided), {
578
+ return __spreadProps$y(__spreadValues$2o({}, provided), {
569
579
  bgColor: background,
570
580
  color: getContrastColor(background)
571
581
  });
572
582
  },
573
- menuList: (provided) => __spreadProps$x(__spreadValues$2n({}, provided), {
583
+ menuList: (provided) => __spreadProps$y(__spreadValues$2o({}, provided), {
574
584
  bgColor: "background.default"
575
585
  })
576
586
  };
577
587
 
578
- var __defProp$2m = Object.defineProperty;
579
- var __defProps$w = Object.defineProperties;
580
- var __getOwnPropDescs$w = Object.getOwnPropertyDescriptors;
581
- var __getOwnPropSymbols$2m = Object.getOwnPropertySymbols;
582
- var __hasOwnProp$2m = Object.prototype.hasOwnProperty;
583
- var __propIsEnum$2m = Object.prototype.propertyIsEnumerable;
584
- var __defNormalProp$2m = (obj, key, value) => key in obj ? __defProp$2m(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
585
- var __spreadValues$2m = (a, b) => {
588
+ var __defProp$2n = Object.defineProperty;
589
+ var __defProps$x = Object.defineProperties;
590
+ var __getOwnPropDescs$x = Object.getOwnPropertyDescriptors;
591
+ var __getOwnPropSymbols$2n = Object.getOwnPropertySymbols;
592
+ var __hasOwnProp$2n = Object.prototype.hasOwnProperty;
593
+ var __propIsEnum$2n = Object.prototype.propertyIsEnumerable;
594
+ var __defNormalProp$2n = (obj, key, value) => key in obj ? __defProp$2n(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
595
+ var __spreadValues$2n = (a, b) => {
586
596
  for (var prop in b || (b = {}))
587
- if (__hasOwnProp$2m.call(b, prop))
588
- __defNormalProp$2m(a, prop, b[prop]);
589
- if (__getOwnPropSymbols$2m)
590
- for (var prop of __getOwnPropSymbols$2m(b)) {
591
- if (__propIsEnum$2m.call(b, prop))
592
- __defNormalProp$2m(a, prop, b[prop]);
597
+ if (__hasOwnProp$2n.call(b, prop))
598
+ __defNormalProp$2n(a, prop, b[prop]);
599
+ if (__getOwnPropSymbols$2n)
600
+ for (var prop of __getOwnPropSymbols$2n(b)) {
601
+ if (__propIsEnum$2n.call(b, prop))
602
+ __defNormalProp$2n(a, prop, b[prop]);
593
603
  }
594
604
  return a;
595
605
  };
596
- var __spreadProps$w = (a, b) => __defProps$w(a, __getOwnPropDescs$w(b));
597
- const tagsInputStyles = (isFocused, borderColor) => __spreadProps$w(__spreadValues$2m({}, customSelectStyles), {
598
- container: (provided) => __spreadProps$w(__spreadValues$2m({}, provided), {
606
+ var __spreadProps$x = (a, b) => __defProps$x(a, __getOwnPropDescs$x(b));
607
+ const tagsInputStyles = (isFocused, borderColor) => __spreadProps$x(__spreadValues$2n({}, customSelectStyles), {
608
+ container: (provided) => __spreadProps$x(__spreadValues$2n({}, provided), {
599
609
  w: "full",
600
610
  height: "100%",
601
611
  resize: "vertical",
@@ -608,12 +618,12 @@
608
618
  color: "text.default",
609
619
  boxShadow: isFocused ? `0 0 0 1px ${borderColor}` : "none"
610
620
  }),
611
- control: (provided) => __spreadProps$w(__spreadValues$2m({}, provided), {
621
+ control: (provided) => __spreadProps$x(__spreadValues$2n({}, provided), {
612
622
  minHeight: "20",
613
623
  height: "100%",
614
624
  alignItems: "start"
615
625
  }),
616
- valueContainer: (provided) => __spreadProps$w(__spreadValues$2m({}, provided), {
626
+ valueContainer: (provided) => __spreadProps$x(__spreadValues$2n({}, provided), {
617
627
  paddingInlineStart: "padding-inline.select.default",
618
628
  overflowY: "auto",
619
629
  maxH: "100%"
@@ -1231,7 +1241,9 @@
1231
1241
  },
1232
1242
  _focus: {
1233
1243
  borderColor: color.border.input.focus,
1234
- bg: color.background.input["outline-focus"]
1244
+ bg: color.background.input["outline-focus"],
1245
+ boxShadow: "none",
1246
+ borderWidth: borderWidth.sm
1235
1247
  },
1236
1248
  _invalid: {
1237
1249
  bg: color.background.input["outline-error"],
@@ -1567,6 +1579,21 @@
1567
1579
  })
1568
1580
  };
1569
1581
 
1582
+ const themeMap = {
1583
+ camphouseLightTheme: {
1584
+ green: "moss",
1585
+ pink: "rose",
1586
+ orange: "coral",
1587
+ gray: "smoke"
1588
+ },
1589
+ webappTheme: {},
1590
+ tottTheme: {}
1591
+ };
1592
+ const processColorSchemeBasedOnTheme = ({
1593
+ currentTheme,
1594
+ colorScheme
1595
+ }) => ramda.defaultTo(colorScheme, themeMap[currentTheme][colorScheme]);
1596
+
1570
1597
  const Tag$1 = {
1571
1598
  parts: ["container"],
1572
1599
  baseStyle: {
@@ -1592,8 +1619,9 @@
1592
1619
  }
1593
1620
  },
1594
1621
  variants: {
1595
- solid: ({ theme: { colors }, bgColor, colorScheme }) => {
1596
- const tagBgColor = bgColor != null ? bgColor : colors[colorScheme] && colors[colorScheme][500] ? colors[colorScheme][500] : colorScheme;
1622
+ solid: ({ theme: { colors }, bgColor, colorScheme, currentTheme }) => {
1623
+ const processedColorScheme = processColorSchemeBasedOnTheme({ currentTheme, colorScheme });
1624
+ const tagBgColor = bgColor != null ? bgColor : colors[processedColorScheme] && colors[processedColorScheme][500] ? colors[processedColorScheme][500] : processedColorScheme;
1597
1625
  const tagColor = getContrastColor(react.useToken("colors", tagBgColor));
1598
1626
  return {
1599
1627
  container: {
@@ -1602,8 +1630,9 @@
1602
1630
  }
1603
1631
  };
1604
1632
  },
1605
- subtle: ({ theme: { colors }, colorScheme, bgColor }) => {
1606
- const tagBgColor = bgColor != null ? bgColor : colors[colorScheme] && colors[colorScheme][100] ? colors[colorScheme][100] : colorScheme;
1633
+ subtle: ({ theme: { colors }, colorScheme, bgColor, currentTheme }) => {
1634
+ const processedColorScheme = processColorSchemeBasedOnTheme({ currentTheme, colorScheme });
1635
+ const tagBgColor = bgColor != null ? bgColor : colors[processedColorScheme] && colors[processedColorScheme][100] ? colors[processedColorScheme][100] : processedColorScheme;
1607
1636
  const tagColor = getContrastColor(react.useToken("colors", tagBgColor));
1608
1637
  return {
1609
1638
  container: {
@@ -1888,19 +1917,19 @@
1888
1917
  })
1889
1918
  };
1890
1919
 
1891
- var __defProp$2l = Object.defineProperty;
1892
- var __getOwnPropSymbols$2l = Object.getOwnPropertySymbols;
1893
- var __hasOwnProp$2l = Object.prototype.hasOwnProperty;
1894
- var __propIsEnum$2l = Object.prototype.propertyIsEnumerable;
1895
- var __defNormalProp$2l = (obj, key, value) => key in obj ? __defProp$2l(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1896
- var __spreadValues$2l = (a, b) => {
1920
+ var __defProp$2m = Object.defineProperty;
1921
+ var __getOwnPropSymbols$2m = Object.getOwnPropertySymbols;
1922
+ var __hasOwnProp$2m = Object.prototype.hasOwnProperty;
1923
+ var __propIsEnum$2m = Object.prototype.propertyIsEnumerable;
1924
+ var __defNormalProp$2m = (obj, key, value) => key in obj ? __defProp$2m(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1925
+ var __spreadValues$2m = (a, b) => {
1897
1926
  for (var prop in b || (b = {}))
1898
- if (__hasOwnProp$2l.call(b, prop))
1899
- __defNormalProp$2l(a, prop, b[prop]);
1900
- if (__getOwnPropSymbols$2l)
1901
- for (var prop of __getOwnPropSymbols$2l(b)) {
1902
- if (__propIsEnum$2l.call(b, prop))
1903
- __defNormalProp$2l(a, prop, b[prop]);
1927
+ if (__hasOwnProp$2m.call(b, prop))
1928
+ __defNormalProp$2m(a, prop, b[prop]);
1929
+ if (__getOwnPropSymbols$2m)
1930
+ for (var prop of __getOwnPropSymbols$2m(b)) {
1931
+ if (__propIsEnum$2m.call(b, prop))
1932
+ __defNormalProp$2m(a, prop, b[prop]);
1904
1933
  }
1905
1934
  return a;
1906
1935
  };
@@ -1925,7 +1954,7 @@
1925
1954
  bgColor: "background.default",
1926
1955
  borderRadius: "input.outline"
1927
1956
  },
1928
- dateSelect: __spreadValues$2l({
1957
+ dateSelect: __spreadValues$2m({
1929
1958
  fontWeight: "semibold",
1930
1959
  border: "none",
1931
1960
  padding: "1",
@@ -3274,19 +3303,19 @@
3274
3303
  }
3275
3304
  };
3276
3305
 
3277
- var __defProp$2k = Object.defineProperty;
3278
- var __getOwnPropSymbols$2k = Object.getOwnPropertySymbols;
3279
- var __hasOwnProp$2k = Object.prototype.hasOwnProperty;
3280
- var __propIsEnum$2k = Object.prototype.propertyIsEnumerable;
3281
- var __defNormalProp$2k = (obj, key, value) => key in obj ? __defProp$2k(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3282
- var __spreadValues$2k = (a, b) => {
3306
+ var __defProp$2l = Object.defineProperty;
3307
+ var __getOwnPropSymbols$2l = Object.getOwnPropertySymbols;
3308
+ var __hasOwnProp$2l = Object.prototype.hasOwnProperty;
3309
+ var __propIsEnum$2l = Object.prototype.propertyIsEnumerable;
3310
+ var __defNormalProp$2l = (obj, key, value) => key in obj ? __defProp$2l(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3311
+ var __spreadValues$2l = (a, b) => {
3283
3312
  for (var prop in b || (b = {}))
3284
- if (__hasOwnProp$2k.call(b, prop))
3285
- __defNormalProp$2k(a, prop, b[prop]);
3286
- if (__getOwnPropSymbols$2k)
3287
- for (var prop of __getOwnPropSymbols$2k(b)) {
3288
- if (__propIsEnum$2k.call(b, prop))
3289
- __defNormalProp$2k(a, prop, b[prop]);
3313
+ if (__hasOwnProp$2l.call(b, prop))
3314
+ __defNormalProp$2l(a, prop, b[prop]);
3315
+ if (__getOwnPropSymbols$2l)
3316
+ for (var prop of __getOwnPropSymbols$2l(b)) {
3317
+ if (__propIsEnum$2l.call(b, prop))
3318
+ __defNormalProp$2l(a, prop, b[prop]);
3290
3319
  }
3291
3320
  return a;
3292
3321
  };
@@ -3342,7 +3371,7 @@
3342
3371
  const FilePicker$1 = {
3343
3372
  parts: ["filePicker", "fileItem", "multiFilePicker"],
3344
3373
  baseStyle: ({ theme: { sizes, colors }, hasLoaded, isImage, isInvalid, currentTheme, sx }) => ({
3345
- filePicker: ramda.merge(__spreadValues$2k(__spreadValues$2k({
3374
+ filePicker: ramda.merge(__spreadValues$2l(__spreadValues$2l({
3346
3375
  display: "flex",
3347
3376
  flexDirection: "column",
3348
3377
  alignItems: "center",
@@ -3355,7 +3384,7 @@
3355
3384
  borderStyle: "dashed",
3356
3385
  borderRadius: "lg"
3357
3386
  }, getInvalidColorStyles(isInvalid, isImage, currentTheme)), thickRing), sx),
3358
- multiFilePicker: __spreadValues$2k(__spreadValues$2k({
3387
+ multiFilePicker: __spreadValues$2l(__spreadValues$2l({
3359
3388
  width: "full",
3360
3389
  maxWidth: "inherit",
3361
3390
  height: "32",
@@ -3380,8 +3409,8 @@
3380
3409
  }),
3381
3410
  variants: {
3382
3411
  ai: ({ isInvalid }) => ({
3383
- filePicker: __spreadValues$2k({}, getAiColorStyles(isInvalid)),
3384
- multiFilePicker: __spreadValues$2k({}, getAiColorStyles(isInvalid))
3412
+ filePicker: __spreadValues$2l({}, getAiColorStyles(isInvalid)),
3413
+ multiFilePicker: __spreadValues$2l({}, getAiColorStyles(isInvalid))
3385
3414
  })
3386
3415
  }
3387
3416
  };
@@ -3512,31 +3541,35 @@
3512
3541
  };
3513
3542
 
3514
3543
  const Badge$1 = {
3515
- baseStyle: ({ colorScheme, theme: { colors } }) => {
3516
- const bgColor = colorScheme === "mediatoolBlue" ? colors[colorScheme][100] : colors[colorScheme] && colors[colorScheme][100];
3517
- const textColor = colorScheme === "mediatoolBlue" ? colors[colorScheme][800] : colors[colorScheme] && colors[colorScheme][800];
3544
+ baseStyle: ({ colorScheme, theme: { colors }, currentTheme }) => {
3545
+ const processedColorScheme = processColorSchemeBasedOnTheme({ currentTheme, colorScheme });
3546
+ const bgColor = processedColorScheme === "mediatoolBlue" ? colors[processedColorScheme][100] : colors[processedColorScheme] && colors[processedColorScheme][100];
3547
+ const textColor = processedColorScheme === "mediatoolBlue" ? colors[processedColorScheme][800] : colors[processedColorScheme] && colors[processedColorScheme][800];
3518
3548
  return {
3519
3549
  bgColor,
3520
3550
  color: textColor
3521
3551
  };
3522
3552
  },
3523
3553
  variants: {
3524
- solid: ({ colorScheme, theme: { colors } }) => {
3525
- const bgColor = colorScheme === "mediatoolBlue" ? colors[colorScheme][500] : colors[colorScheme] && colors[colorScheme][500];
3554
+ solid: ({ colorScheme, theme: { colors }, currentTheme }) => {
3555
+ const processedColorScheme = processColorSchemeBasedOnTheme({ currentTheme, colorScheme });
3556
+ const bgColor = processedColorScheme === "mediatoolBlue" ? colors[processedColorScheme][500] : colors[processedColorScheme] && colors[processedColorScheme][500];
3526
3557
  return {
3527
3558
  bgColor,
3528
- color: getContrastColor(bgColor != null ? bgColor : react.useToken("colors", colorScheme))
3559
+ color: getContrastColor(bgColor != null ? bgColor : react.useToken("colors", processedColorScheme))
3529
3560
  };
3530
3561
  },
3531
- outline: ({ colorScheme, theme: { colors } }) => {
3532
- const textColor = colorScheme === "mediatoolBlue" ? colors[colorScheme][500] : colors[colorScheme] && colors[colorScheme][700];
3562
+ outline: ({ colorScheme, theme: { colors }, currentTheme }) => {
3563
+ const processedColorScheme = processColorSchemeBasedOnTheme({ currentTheme, colorScheme });
3564
+ const textColor = processedColorScheme === "mediatoolBlue" ? colors[processedColorScheme][500] : colors[processedColorScheme] && colors[processedColorScheme][700];
3533
3565
  return {
3534
3566
  bgColor: "mono.transparent",
3535
3567
  color: textColor
3536
3568
  };
3537
3569
  },
3538
- ghost: ({ colorScheme, theme: { colors } }) => {
3539
- const textColor = colorScheme === "mediatoolBlue" ? colors[colorScheme][500] : colors[colorScheme] && colors[colorScheme][700];
3570
+ ghost: ({ colorScheme, theme: { colors }, currentTheme }) => {
3571
+ const processedColorScheme = processColorSchemeBasedOnTheme({ currentTheme, colorScheme });
3572
+ const textColor = processedColorScheme === "mediatoolBlue" ? colors[processedColorScheme][500] : colors[processedColorScheme] && colors[processedColorScheme][700];
3540
3573
  return {
3541
3574
  bgColor: "mono.transparent",
3542
3575
  color: textColor
@@ -3641,6 +3674,39 @@
3641
3674
  Tooltip: Tooltip$1
3642
3675
  });
3643
3676
 
3677
+ var __defProp$2k = Object.defineProperty;
3678
+ var __defProps$w = Object.defineProperties;
3679
+ var __getOwnPropDescs$w = Object.getOwnPropertyDescriptors;
3680
+ var __getOwnPropSymbols$2k = Object.getOwnPropertySymbols;
3681
+ var __hasOwnProp$2k = Object.prototype.hasOwnProperty;
3682
+ var __propIsEnum$2k = Object.prototype.propertyIsEnumerable;
3683
+ var __defNormalProp$2k = (obj, key, value) => key in obj ? __defProp$2k(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3684
+ var __spreadValues$2k = (a, b) => {
3685
+ for (var prop in b || (b = {}))
3686
+ if (__hasOwnProp$2k.call(b, prop))
3687
+ __defNormalProp$2k(a, prop, b[prop]);
3688
+ if (__getOwnPropSymbols$2k)
3689
+ for (var prop of __getOwnPropSymbols$2k(b)) {
3690
+ if (__propIsEnum$2k.call(b, prop))
3691
+ __defNormalProp$2k(a, prop, b[prop]);
3692
+ }
3693
+ return a;
3694
+ };
3695
+ var __spreadProps$w = (a, b) => __defProps$w(a, __getOwnPropDescs$w(b));
3696
+ const WebappSkin = {
3697
+ colors: __spreadProps$w(__spreadValues$2k(__spreadValues$2k({}, tokens.WebappSystemTokensSet.st.color), tokens.WebappComponentsTokensSet.color), {
3698
+ text: __spreadValues$2k(__spreadValues$2k({}, tokens.WebappSystemTokensSet.st.color.text), tokens.WebappComponentsTokensSet.color.text),
3699
+ border: __spreadValues$2k(__spreadValues$2k({}, tokens.WebappSystemTokensSet.st.color.border), tokens.WebappComponentsTokensSet.color.border)
3700
+ }),
3701
+ sizes: tokens.WebappComponentsTokensSet.sizing,
3702
+ space: tokens.WebappComponentsTokensSet.spacing,
3703
+ radii: __spreadValues$2k(__spreadValues$2k({}, tokens.WebappSystemTokensSet.st.borderRadius), tokens.WebappComponentsTokensSet.borderRadius),
3704
+ borders: __spreadValues$2k(__spreadValues$2k({}, tokens.WebappSystemTokensSet.st.borderWidth), tokens.WebappComponentsTokensSet.borderWidth),
3705
+ opacity: tokens.WebappComponentsTokensSet.opacity,
3706
+ typography: tokens.typography,
3707
+ shadows: __spreadValues$2k({}, tokens.WebappSystemTokensSet.st.boxShadow)
3708
+ };
3709
+
3644
3710
  var __defProp$2j = Object.defineProperty;
3645
3711
  var __defProps$v = Object.defineProperties;
3646
3712
  var __getOwnPropDescs$v = Object.getOwnPropertyDescriptors;
@@ -3660,18 +3726,17 @@
3660
3726
  return a;
3661
3727
  };
3662
3728
  var __spreadProps$v = (a, b) => __defProps$v(a, __getOwnPropDescs$v(b));
3663
- const WebappSkin = {
3664
- colors: __spreadProps$v(__spreadValues$2j(__spreadValues$2j({}, tokens.WebappSystemTokensSet.st.color), tokens.WebappComponentsTokensSet.color), {
3665
- text: __spreadValues$2j(__spreadValues$2j({}, tokens.WebappSystemTokensSet.st.color.text), tokens.WebappComponentsTokensSet.color.text),
3666
- border: __spreadValues$2j(__spreadValues$2j({}, tokens.WebappSystemTokensSet.st.color.border), tokens.WebappComponentsTokensSet.color.border)
3729
+ const TottSkin = {
3730
+ colors: __spreadProps$v(__spreadValues$2j(__spreadValues$2j({}, tokens.TottSystemTokensSet.st.color), tokens.TottComponentsTokensSet.color), {
3731
+ border: __spreadValues$2j(__spreadValues$2j({}, tokens.TottSystemTokensSet.st.color.border), tokens.TottComponentsTokensSet.color.border)
3667
3732
  }),
3668
- sizes: tokens.WebappComponentsTokensSet.sizing,
3669
- space: tokens.WebappComponentsTokensSet.spacing,
3670
- radii: __spreadValues$2j(__spreadValues$2j({}, tokens.WebappSystemTokensSet.st.borderRadius), tokens.WebappComponentsTokensSet.borderRadius),
3671
- borders: __spreadValues$2j(__spreadValues$2j({}, tokens.WebappSystemTokensSet.st.borderWidth), tokens.WebappComponentsTokensSet.borderWidth),
3672
- opacity: tokens.WebappComponentsTokensSet.opacity,
3733
+ sizes: tokens.TottComponentsTokensSet.sizing,
3734
+ space: tokens.TottComponentsTokensSet.spacing,
3735
+ radii: __spreadValues$2j(__spreadValues$2j({}, tokens.TottSystemTokensSet.st.borderRadius), tokens.TottComponentsTokensSet.borderRadius),
3736
+ borders: __spreadValues$2j(__spreadValues$2j({}, tokens.TottSystemTokensSet.st.borderWidth), tokens.TottComponentsTokensSet.borderWidth),
3737
+ opacity: tokens.TottComponentsTokensSet.opacity,
3673
3738
  typography: tokens.typography,
3674
- shadows: __spreadValues$2j({}, tokens.WebappSystemTokensSet.st.boxShadow)
3739
+ shadows: __spreadValues$2j({}, tokens.TottSystemTokensSet.st.boxShadow)
3675
3740
  };
3676
3741
 
3677
3742
  var __defProp$2i = Object.defineProperty;
@@ -3693,17 +3758,18 @@
3693
3758
  return a;
3694
3759
  };
3695
3760
  var __spreadProps$u = (a, b) => __defProps$u(a, __getOwnPropDescs$u(b));
3696
- const TottSkin = {
3697
- colors: __spreadProps$u(__spreadValues$2i(__spreadValues$2i({}, tokens.TottSystemTokensSet.st.color), tokens.TottComponentsTokensSet.color), {
3698
- border: __spreadValues$2i(__spreadValues$2i({}, tokens.TottSystemTokensSet.st.color.border), tokens.TottComponentsTokensSet.color.border)
3761
+ const CamphouseLightSkin = {
3762
+ colors: __spreadProps$u(__spreadValues$2i(__spreadValues$2i({}, tokens.CamphouseLightSystemTokensSet.st.color), tokens.CamphouseLightComponentsTokensSet.color), {
3763
+ text: __spreadValues$2i(__spreadValues$2i({}, tokens.CamphouseLightSystemTokensSet.st.color.text), tokens.CamphouseLightComponentsTokensSet.color.text),
3764
+ border: __spreadValues$2i(__spreadValues$2i({}, tokens.CamphouseLightSystemTokensSet.st.color.border), tokens.CamphouseLightComponentsTokensSet.color.border)
3699
3765
  }),
3700
- sizes: tokens.TottComponentsTokensSet.sizing,
3701
- space: tokens.TottComponentsTokensSet.spacing,
3702
- radii: __spreadValues$2i(__spreadValues$2i({}, tokens.TottSystemTokensSet.st.borderRadius), tokens.TottComponentsTokensSet.borderRadius),
3703
- borders: __spreadValues$2i(__spreadValues$2i({}, tokens.TottSystemTokensSet.st.borderWidth), tokens.TottComponentsTokensSet.borderWidth),
3704
- opacity: tokens.TottComponentsTokensSet.opacity,
3766
+ sizes: tokens.CamphouseLightComponentsTokensSet.sizing,
3767
+ space: tokens.CamphouseLightComponentsTokensSet.spacing,
3768
+ radii: __spreadValues$2i(__spreadValues$2i({}, tokens.CamphouseLightSystemTokensSet.st.borderRadius), tokens.CamphouseLightComponentsTokensSet.borderRadius),
3769
+ borders: __spreadValues$2i(__spreadValues$2i({}, tokens.CamphouseLightSystemTokensSet.st.borderWidth), tokens.CamphouseLightComponentsTokensSet.borderWidth),
3770
+ opacity: tokens.CamphouseLightComponentsTokensSet.opacity,
3705
3771
  typography: tokens.typography,
3706
- shadows: __spreadValues$2i({}, tokens.TottSystemTokensSet.st.boxShadow)
3772
+ shadows: __spreadValues$2i({}, tokens.CamphouseLightSystemTokensSet.st.boxShadow)
3707
3773
  };
3708
3774
 
3709
3775
  var __defProp$2h = Object.defineProperty;
@@ -3765,6 +3831,7 @@
3765
3831
  };
3766
3832
  const theme = react.extendTheme(overrides, WebappSkin);
3767
3833
  const tottTheme = react.extendTheme(overrides, TottSkin);
3834
+ const camphouseLightTheme = react.extendTheme(overrides, CamphouseLightSkin);
3768
3835
 
3769
3836
  var __defProp$2g = Object.defineProperty;
3770
3837
  var __defProps$t = Object.defineProperties;
@@ -4971,7 +5038,8 @@
4971
5038
  "iconAs"
4972
5039
  ]);
4973
5040
  const IconComponent = iconAs ? NorthlightIcons__namespace[iconAs] : NorthlightIcons.MediatoolLogoSolid;
4974
- return /* @__PURE__ */ React.createElement(react.Badge, __spreadValues$1X({ ref }, rest), /* @__PURE__ */ React.createElement(react.Flex, { align: "center", gap: "1" }, withIcon && iconPosition === "left" && IconComponent && /* @__PURE__ */ React.createElement(Icon, { as: IconComponent, boxSize: "3" }), children, withIcon && iconPosition === "right" && IconComponent && /* @__PURE__ */ React.createElement(Icon, { as: IconComponent, boxSize: "3" })));
5041
+ const currentTheme = useCurrentTheme();
5042
+ return /* @__PURE__ */ React.createElement(react.Badge, __spreadValues$1X({ ref, currentTheme }, rest), /* @__PURE__ */ React.createElement(react.Flex, { align: "center", gap: "1" }, withIcon && iconPosition === "left" && IconComponent && /* @__PURE__ */ React.createElement(Icon, { as: IconComponent, boxSize: "3" }), children, withIcon && iconPosition === "right" && IconComponent && /* @__PURE__ */ React.createElement(Icon, { as: IconComponent, boxSize: "3" })));
4975
5043
  });
4976
5044
 
4977
5045
  var __defProp$1W = Object.defineProperty;
@@ -6061,7 +6129,7 @@
6061
6129
  }
6062
6130
  return target;
6063
6131
  };
6064
- const FlipButton = (props) => {
6132
+ const FlipButton = React.forwardRef((props, wrapperRef) => {
6065
6133
  const _a = props, {
6066
6134
  children,
6067
6135
  size,
@@ -6124,13 +6192,14 @@
6124
6192
  sx: ramda.mergeAll([button, isFocused ? focusStyles : {}, { flexDirection: iconPlacement === "left" ? "row" : "row-reverse" }]),
6125
6193
  "aria-checked": isSelected,
6126
6194
  "aria-disabled": isDisabled,
6127
- as: "label"
6195
+ as: "label",
6196
+ ref: wrapperRef
6128
6197
  },
6129
6198
  /* @__PURE__ */ React.createElement("input", __spreadValues$1H({}, flipButtonProps)),
6130
6199
  icon && iconPlacement !== "none" ? /* @__PURE__ */ React.createElement(Icon, { as: icon || NorthlightIcons.CheckSolid, sx: buttonIcon }) : isSelected && iconPlacement !== "none" && /* @__PURE__ */ React.createElement(react.SlideFade, { in: isSelected }, /* @__PURE__ */ React.createElement(Icon, { as: icon || NorthlightIcons.CheckSolid, sx: buttonIcon })),
6131
6200
  /* @__PURE__ */ React.createElement(react.Text, { textAlign: "center" }, children)
6132
6201
  );
6133
- };
6202
+ });
6134
6203
 
6135
6204
  var __defProp$1G = Object.defineProperty;
6136
6205
  var __defProps$p = Object.defineProperties;
@@ -9774,13 +9843,15 @@
9774
9843
  "bgColor",
9775
9844
  "colorScheme"
9776
9845
  ]);
9846
+ const currentTheme = useCurrentTheme();
9777
9847
  return /* @__PURE__ */ React.createElement(
9778
9848
  react.Tag,
9779
9849
  __spreadValues$$({
9780
9850
  bgColor,
9781
9851
  colorScheme,
9782
9852
  ref,
9783
- variant
9853
+ variant,
9854
+ currentTheme
9784
9855
  }, rest),
9785
9856
  children
9786
9857
  );
@@ -15692,6 +15763,7 @@
15692
15763
  exports.Tooltip = Tooltip;
15693
15764
  exports.addAlpha = addAlpha;
15694
15765
  exports.advancedParseFloat = advancedParseFloat;
15766
+ exports.camphouseLightTheme = camphouseLightTheme;
15695
15767
  exports.clamp = clamp;
15696
15768
  exports.createDebounceFunctionInstance = createDebounceFunctionInstance;
15697
15769
  exports.getChildrenWithProps = getChildrenWithProps;