@newtonedev/components 0.1.18 → 0.1.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/dist/composites/actions/Button/Button.d.ts.map +1 -1
  2. package/dist/composites/actions/Button/Button.styles.d.ts +1 -0
  3. package/dist/composites/actions/Button/Button.styles.d.ts.map +1 -1
  4. package/dist/index.cjs +850 -509
  5. package/dist/index.cjs.map +1 -1
  6. package/dist/index.d.ts +11 -4
  7. package/dist/index.d.ts.map +1 -1
  8. package/dist/index.js +808 -470
  9. package/dist/index.js.map +1 -1
  10. package/dist/layout/Page/Page.d.ts +30 -0
  11. package/dist/layout/Page/Page.d.ts.map +1 -0
  12. package/dist/layout/Page/Page.types.d.ts +60 -0
  13. package/dist/layout/Page/Page.types.d.ts.map +1 -0
  14. package/dist/layout/Page/index.d.ts +3 -0
  15. package/dist/layout/Page/index.d.ts.map +1 -0
  16. package/dist/layout/Section/Section.d.ts +23 -0
  17. package/dist/layout/Section/Section.d.ts.map +1 -0
  18. package/dist/layout/Section/Section.styles.d.ts +20 -0
  19. package/dist/layout/Section/Section.styles.d.ts.map +1 -0
  20. package/dist/layout/Section/Section.types.d.ts +74 -0
  21. package/dist/layout/Section/Section.types.d.ts.map +1 -0
  22. package/dist/layout/Section/index.d.ts +3 -0
  23. package/dist/layout/Section/index.d.ts.map +1 -0
  24. package/dist/layout/Viewport/Viewport.d.ts +22 -0
  25. package/dist/layout/Viewport/Viewport.d.ts.map +1 -0
  26. package/dist/layout/Viewport/Viewport.types.d.ts +34 -0
  27. package/dist/layout/Viewport/Viewport.types.d.ts.map +1 -0
  28. package/dist/layout/Viewport/index.d.ts +3 -0
  29. package/dist/layout/Viewport/index.d.ts.map +1 -0
  30. package/dist/{primitives → layout}/Wrapper/Wrapper.d.ts +1 -16
  31. package/dist/layout/Wrapper/Wrapper.d.ts.map +1 -0
  32. package/dist/{primitives → layout}/Wrapper/Wrapper.styles.d.ts +1 -2
  33. package/dist/layout/Wrapper/Wrapper.styles.d.ts.map +1 -0
  34. package/dist/{primitives → layout}/Wrapper/Wrapper.types.d.ts +1 -3
  35. package/dist/layout/Wrapper/Wrapper.types.d.ts.map +1 -0
  36. package/dist/layout/Wrapper/index.d.ts.map +1 -0
  37. package/dist/layout/index.d.ts +9 -0
  38. package/dist/layout/index.d.ts.map +1 -0
  39. package/dist/primitives/Card/Card.d.ts +15 -0
  40. package/dist/primitives/Card/Card.d.ts.map +1 -0
  41. package/dist/primitives/Card/Card.styles.d.ts +40 -0
  42. package/dist/primitives/Card/Card.styles.d.ts.map +1 -0
  43. package/dist/primitives/Card/Card.types.d.ts +101 -0
  44. package/dist/primitives/Card/Card.types.d.ts.map +1 -0
  45. package/dist/primitives/Card/index.d.ts +3 -0
  46. package/dist/primitives/Card/index.d.ts.map +1 -0
  47. package/dist/primitives/Frame/Frame.d.ts +1 -1
  48. package/dist/primitives/Frame/Frame.d.ts.map +1 -1
  49. package/dist/primitives/Frame/Frame.styles.d.ts +0 -6
  50. package/dist/primitives/Frame/Frame.styles.d.ts.map +1 -1
  51. package/dist/primitives/Frame/Frame.types.d.ts +1 -15
  52. package/dist/primitives/Frame/Frame.types.d.ts.map +1 -1
  53. package/dist/primitives/index.d.ts +2 -2
  54. package/dist/primitives/index.d.ts.map +1 -1
  55. package/package.json +2 -2
  56. package/src/composites/actions/Button/Button.styles.ts +58 -19
  57. package/src/composites/actions/Button/Button.tsx +18 -3
  58. package/src/composites/display/Chip/Chip.tsx +1 -1
  59. package/src/composites/form-controls/TextInput/TextInput.styles.ts +4 -4
  60. package/src/index.ts +18 -5
  61. package/src/layout/Page/Page.tsx +103 -0
  62. package/src/layout/Page/Page.types.ts +69 -0
  63. package/src/layout/Page/index.ts +2 -0
  64. package/src/layout/Section/Section.styles.ts +90 -0
  65. package/src/layout/Section/Section.tsx +57 -0
  66. package/src/layout/Section/Section.types.ts +85 -0
  67. package/src/layout/Section/index.ts +2 -0
  68. package/src/layout/Viewport/Viewport.tsx +52 -0
  69. package/src/layout/Viewport/Viewport.types.ts +40 -0
  70. package/src/layout/Viewport/index.ts +2 -0
  71. package/src/{primitives → layout}/Wrapper/Wrapper.styles.ts +2 -20
  72. package/src/{primitives → layout}/Wrapper/Wrapper.tsx +1 -31
  73. package/src/{primitives → layout}/Wrapper/Wrapper.types.ts +1 -4
  74. package/src/layout/index.ts +15 -0
  75. package/src/primitives/Card/Card.styles.ts +182 -0
  76. package/src/primitives/Card/Card.tsx +197 -0
  77. package/src/primitives/Card/Card.types.ts +155 -0
  78. package/src/primitives/Card/index.ts +2 -0
  79. package/src/primitives/Frame/Frame.styles.ts +0 -32
  80. package/src/primitives/Frame/Frame.tsx +5 -52
  81. package/src/primitives/Frame/Frame.types.ts +1 -22
  82. package/src/primitives/Text/Text.tsx +1 -1
  83. package/src/primitives/index.ts +3 -3
  84. package/dist/primitives/Wrapper/Wrapper.d.ts.map +0 -1
  85. package/dist/primitives/Wrapper/Wrapper.styles.d.ts.map +0 -1
  86. package/dist/primitives/Wrapper/Wrapper.types.d.ts.map +0 -1
  87. package/dist/primitives/Wrapper/index.d.ts.map +0 -1
  88. /package/dist/{primitives → layout}/Wrapper/index.d.ts +0 -0
  89. /package/src/{primitives → layout}/Wrapper/index.ts +0 -0
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { useTokens, useNewtoneTheme, useFrameContext, useBreakpoint, useTypographyCalibrations, useLocalCalibration, enqueueObservation, computeTokens, _ThemeContext, FrameContext } from 'newtone-api';
2
2
  export { DEFAULT_FONT_SIZES, DEFAULT_LINE_HEIGHTS, DEFAULT_ROLE_SCALES, DEFAULT_THEME_CONFIG, DEFAULT_THEME_MAPPINGS, ERROR_DEFAULTS, FrameContext, NON_PRIMARY_RELATIVE_DEFAULTS, NewtoneProvider, PRIMARY_DEFAULTS, SECONDARY_DEFAULTS, SUCCESS_DEFAULTS, TERTIARY_DEFAULTS, WARNING_DEFAULTS, buildGoogleFontsUrl, computeColors, computeSwatches, computeTokens, enqueueObservation, measureAvgCharWidth, resolveTheme, useBreakpoint, useFrameContext, useLocalCalibration, useNewtoneTheme, useScheme, useTokens, useTypographyCalibrations } from 'newtone-api';
3
- import React16, { createContext, useState, useMemo, useEffect, useContext, useCallback, useRef } from 'react';
4
- import { Text, View, Pressable, TextInput as TextInput$1, ScrollView, PanResponder, Animated, StyleSheet } from 'react-native';
3
+ import React19, { createContext, useState, useMemo, useEffect, useContext, useCallback, useRef } from 'react';
4
+ import { StyleSheet, Platform, Text, View, ScrollView, Pressable, TextInput as TextInput$1, PanResponder, Animated } from 'react-native';
5
5
  import { SEMANTIC_WEIGHT_MAP, ROLE_DEFAULT_WEIGHTS, BREAKPOINT_ROLE_SCALE, scaleRoleStep, resolveResponsiveSize, estimateLineWidths, REFERENCE_LINE_HEIGHT_RATIO, buildFontFeatureSettings } from '@newtonedev/fonts';
6
6
  import { srgbToHex, gamutMapToSrgb } from 'newtone';
7
7
 
@@ -181,10 +181,7 @@ function getFrameStyles(input) {
181
181
  left,
182
182
  zIndex,
183
183
  overflow,
184
- opacity,
185
- radius,
186
- bordered = false,
187
- disabled = false
184
+ radius
188
185
  } = input;
189
186
  const container = {};
190
187
  const appearanceTokens = tokens.colors[theme][appearance];
@@ -237,10 +234,6 @@ function getFrameStyles(input) {
237
234
  }
238
235
  }
239
236
  if (overflow) container.overflow = overflow;
240
- if (bordered) {
241
- container.borderWidth = 1;
242
- container.borderColor = appearanceTokens.fontTertiary;
243
- }
244
237
  if (frameElevation === 2) {
245
238
  container.shadowColor = "#000";
246
239
  container.shadowOffset = { width: 0, height: 2 };
@@ -248,14 +241,6 @@ function getFrameStyles(input) {
248
241
  container.shadowRadius = 6;
249
242
  container.elevation = 4;
250
243
  }
251
- if (opacity !== void 0) {
252
- container.opacity = opacity;
253
- } else if (disabled) {
254
- container.opacity = 0.5;
255
- }
256
- const pressed = StyleSheet.create({
257
- s: { backgroundColor: appearanceTokens.fontSecondary }
258
- }).s;
259
244
  let gridWebStyle = null;
260
245
  if (layout === "grid") {
261
246
  gridWebStyle = {
@@ -270,7 +255,6 @@ function getFrameStyles(input) {
270
255
  // Validate and optimize the container styles through StyleSheet.create(),
271
256
  // then extract the single style object with `.c`.
272
257
  container: StyleSheet.create({ c: container }).c,
273
- pressed,
274
258
  gridWebStyle,
275
259
  insetBoxShadow
276
260
  };
@@ -278,9 +262,9 @@ function getFrameStyles(input) {
278
262
 
279
263
  // src/primitives/Frame/Frame.tsx
280
264
  function wrapTextChildren(children, textStyle) {
281
- return React16.Children.map(children, (child) => {
265
+ return React19.Children.map(children, (child) => {
282
266
  if (typeof child === "string" || typeof child === "number") {
283
- return /* @__PURE__ */ React16.createElement(Text, { style: textStyle }, child);
267
+ return /* @__PURE__ */ React19.createElement(Text, { style: textStyle }, child);
284
268
  }
285
269
  return child;
286
270
  });
@@ -333,14 +317,8 @@ function Frame({
333
317
  zIndex,
334
318
  overflow,
335
319
  pointerEvents,
336
- opacity,
337
320
  // Appearance
338
321
  radius,
339
- bordered,
340
- // Interactivity
341
- onPress,
342
- href,
343
- disabled = false,
344
322
  // Accessibility
345
323
  accessibilityLabel,
346
324
  accessibilityHint,
@@ -381,7 +359,7 @@ function Frame({
381
359
  resolvedConfig.relativeSwatchDefaults
382
360
  );
383
361
  }, [resolvedConfig, mode, gamut, resolvedElevation]);
384
- const styles = useMemo(
362
+ const styles3 = useMemo(
385
363
  () => getFrameStyles({
386
364
  tokens,
387
365
  frameElevation: resolvedFrameElevation,
@@ -410,10 +388,7 @@ function Frame({
410
388
  left,
411
389
  zIndex,
412
390
  overflow,
413
- opacity,
414
- radius,
415
- bordered,
416
- disabled
391
+ radius
417
392
  }),
418
393
  [
419
394
  tokens,
@@ -443,10 +418,7 @@ function Frame({
443
418
  left,
444
419
  zIndex,
445
420
  overflow,
446
- opacity,
447
- radius,
448
- bordered,
449
- disabled
421
+ radius
450
422
  ]
451
423
  );
452
424
  const resolvedScheme = scheme ?? parentFrameCtx?.scheme;
@@ -469,22 +441,13 @@ function Frame({
469
441
  };
470
442
  }, [isSchemeOverride, themeCtx, resolvedConfig, scheme]);
471
443
  const webOverrides = [];
472
- if (styles.gridWebStyle) {
473
- webOverrides.push(styles.gridWebStyle);
444
+ if (styles3.gridWebStyle) {
445
+ webOverrides.push(styles3.gridWebStyle);
474
446
  }
475
- if (styles.insetBoxShadow) {
476
- webOverrides.push({ boxShadow: styles.insetBoxShadow });
447
+ if (styles3.insetBoxShadow) {
448
+ webOverrides.push({ boxShadow: styles3.insetBoxShadow });
477
449
  }
478
450
  const userStyles = Array.isArray(style) ? style : style ? [style] : [];
479
- const isInteractive = onPress !== void 0 || href !== void 0;
480
- const { isFocusVisible, focusProps } = useFocusVisible();
481
- const focusRingStyle = isFocusVisible && !disabled ? {
482
- outlineWidth: 2,
483
- outlineStyle: "solid",
484
- outlineColor: tokens.colors[resolvedTheme].emphasis.background,
485
- outlineOffset: 2
486
- } : void 0;
487
- const webFocusProps = isInteractive ? focusProps : {};
488
451
  const textStyle = useMemo(
489
452
  () => ({
490
453
  color: tokens.colors[resolvedTheme][resolvedAppearance].fontPrimary,
@@ -498,30 +461,7 @@ function Frame({
498
461
  () => wrapTextChildren(children, textStyle),
499
462
  [children, textStyle]
500
463
  );
501
- const content = isInteractive ? /* @__PURE__ */ React16.createElement(
502
- Pressable,
503
- {
504
- ref,
505
- testID,
506
- nativeID,
507
- pointerEvents,
508
- accessibilityLabel,
509
- accessibilityHint,
510
- accessibilityState: disabled ? { disabled: true } : void 0,
511
- onPress,
512
- disabled,
513
- ...href ? { href, accessibilityRole: "link" } : { accessibilityRole: "button" },
514
- ...webFocusProps,
515
- style: ({ pressed }) => [
516
- styles.container,
517
- pressed && !disabled && styles.pressed,
518
- focusRingStyle,
519
- ...webOverrides,
520
- ...userStyles
521
- ]
522
- },
523
- wrappedChildren
524
- ) : /* @__PURE__ */ React16.createElement(
464
+ const content = /* @__PURE__ */ React19.createElement(
525
465
  View,
526
466
  {
527
467
  ref,
@@ -530,12 +470,12 @@ function Frame({
530
470
  pointerEvents,
531
471
  accessibilityLabel,
532
472
  accessibilityHint,
533
- style: [styles.container, ...webOverrides, ...userStyles]
473
+ style: [styles3.container, ...webOverrides, ...userStyles]
534
474
  },
535
475
  wrappedChildren
536
476
  );
537
- const wrappedContent = schemeThemeCtx ? /* @__PURE__ */ React16.createElement(_ThemeContext.Provider, { value: schemeThemeCtx }, content) : content;
538
- return /* @__PURE__ */ React16.createElement(FrameContext.Provider, { value: contextValue }, wrappedContent);
477
+ const wrappedContent = schemeThemeCtx ? /* @__PURE__ */ React19.createElement(_ThemeContext.Provider, { value: schemeThemeCtx }, content) : content;
478
+ return /* @__PURE__ */ React19.createElement(FrameContext.Provider, { value: contextValue }, wrappedContent);
539
479
  }
540
480
  function Icon({
541
481
  name = "add",
@@ -585,7 +525,7 @@ function Icon({
585
525
  ...style
586
526
  };
587
527
  }, [tokens, size, opticalSize, fill, color, style, resolvedTheme, resolvedAppearance]);
588
- return /* @__PURE__ */ React16.createElement(
528
+ return /* @__PURE__ */ React19.createElement(
589
529
  Text,
590
530
  {
591
531
  ref,
@@ -598,159 +538,6 @@ function Icon({
598
538
  name
599
539
  );
600
540
  }
601
- function getWrapperStyles(input) {
602
- const {
603
- tokens,
604
- direction = "vertical",
605
- wrap = false,
606
- reverse = false,
607
- align,
608
- justify,
609
- padding,
610
- gap,
611
- width,
612
- height,
613
- minWidth,
614
- maxWidth,
615
- minHeight,
616
- maxHeight,
617
- position,
618
- top,
619
- right,
620
- bottom,
621
- left,
622
- zIndex,
623
- overflow,
624
- opacity
625
- } = input;
626
- const container = {};
627
- container.flexDirection = resolveFlexDirection(direction, reverse);
628
- if (wrap) container.flexWrap = "wrap";
629
- if (align) container.alignItems = resolveAlignment(align);
630
- if (justify) container.justifyContent = resolveJustification(justify);
631
- if (padding !== void 0) {
632
- const p = resolvePadding(padding, tokens);
633
- container.paddingTop = p.top;
634
- container.paddingRight = p.right;
635
- container.paddingBottom = p.bottom;
636
- container.paddingLeft = p.left;
637
- }
638
- if (gap !== void 0) {
639
- const g = resolveGap(gap, tokens);
640
- container.rowGap = g.rowGap;
641
- container.columnGap = g.columnGap;
642
- }
643
- Object.assign(container, resolveSizing(width, height));
644
- if (minWidth !== void 0) container.minWidth = minWidth;
645
- if (maxWidth !== void 0) container.maxWidth = maxWidth;
646
- if (minHeight !== void 0) container.minHeight = minHeight;
647
- if (maxHeight !== void 0) container.maxHeight = maxHeight;
648
- if (position) container.position = position;
649
- if (top !== void 0) container.top = top;
650
- if (right !== void 0) container.right = right;
651
- if (bottom !== void 0) container.bottom = bottom;
652
- if (left !== void 0) container.left = left;
653
- if (zIndex !== void 0) container.zIndex = zIndex;
654
- if (overflow) container.overflow = overflow;
655
- if (opacity !== void 0) container.opacity = opacity;
656
- return StyleSheet.create({ c: container }).c;
657
- }
658
- function Wrapper({
659
- children,
660
- direction,
661
- wrap,
662
- reverse,
663
- align,
664
- justify,
665
- padding,
666
- gap,
667
- width,
668
- height,
669
- minWidth,
670
- maxWidth,
671
- minHeight,
672
- maxHeight,
673
- // Positioning
674
- position,
675
- top,
676
- right,
677
- bottom,
678
- left,
679
- zIndex,
680
- overflow,
681
- pointerEvents,
682
- opacity,
683
- style,
684
- // Testing & platform
685
- testID,
686
- nativeID,
687
- ref
688
- }) {
689
- const tokens = useTokens();
690
- const containerStyle = useMemo(
691
- () => getWrapperStyles({
692
- tokens,
693
- direction,
694
- wrap,
695
- reverse,
696
- align,
697
- justify,
698
- padding,
699
- gap,
700
- width,
701
- height,
702
- minWidth,
703
- maxWidth,
704
- minHeight,
705
- maxHeight,
706
- position,
707
- top,
708
- right,
709
- bottom,
710
- left,
711
- zIndex,
712
- overflow,
713
- opacity
714
- }),
715
- [
716
- tokens,
717
- direction,
718
- wrap,
719
- reverse,
720
- align,
721
- justify,
722
- padding,
723
- gap,
724
- width,
725
- height,
726
- minWidth,
727
- maxWidth,
728
- minHeight,
729
- maxHeight,
730
- position,
731
- top,
732
- right,
733
- bottom,
734
- left,
735
- zIndex,
736
- overflow,
737
- opacity
738
- ]
739
- );
740
- const userStyles = Array.isArray(style) ? style : style ? [style] : [];
741
- return /* @__PURE__ */ React16.createElement(
742
- View,
743
- {
744
- ref,
745
- testID,
746
- nativeID,
747
- pointerEvents,
748
- accessibilityRole: "none",
749
- style: [containerStyle, ...userStyles]
750
- },
751
- children
752
- );
753
- }
754
541
  var TextScopeContext = createContext(null);
755
542
  var LARGE_TEXT_ROLES = /* @__PURE__ */ new Set(["headline", "title", "heading", "subheading"]);
756
543
  function resolveTextColor(color, tokens, theme = "primary", appearance = "main", role = "body") {
@@ -761,10 +548,10 @@ function resolveTextColor(color, tokens, theme = "primary", appearance = "main",
761
548
  return tokens.colors[theme][appearance].fontSecondary;
762
549
  case "tertiary":
763
550
  return tokens.colors[theme][appearance].fontTertiary;
764
- case "disabled":
765
- return tokens.colors[theme][appearance].fontDisabled;
766
551
  case "accent":
767
552
  return tokens.colors[theme][appearance][LARGE_TEXT_ROLES.has(role) ? "accentLarge" : "accentSmall"];
553
+ case "disabled":
554
+ return tokens.colors[theme][appearance].fontDisabled;
768
555
  }
769
556
  }
770
557
  var ADAPTIVE_ROLES = /* @__PURE__ */ new Set(["headline", "title", "heading", "subheading"]);
@@ -882,7 +669,7 @@ function TextBase({
882
669
  const effectiveA11yRole = accessibilityRoleOverride ?? inferredA11yRole;
883
670
  const ariaLevel = effectiveA11yRole === "header" ? ROLE_HEADING_LEVEL[role] : void 0;
884
671
  const scopeCtx = useMemo(() => ({ weights: SEMANTIC_WEIGHT_MAP }), []);
885
- const textNode = /* @__PURE__ */ React16.createElement(TextScopeContext.Provider, { value: scopeCtx }, /* @__PURE__ */ React16.createElement(
672
+ const textNode = /* @__PURE__ */ React19.createElement(TextScopeContext.Provider, { value: scopeCtx }, /* @__PURE__ */ React19.createElement(
886
673
  Text,
887
674
  {
888
675
  ref,
@@ -896,7 +683,7 @@ function TextBase({
896
683
  children
897
684
  ));
898
685
  if (responsive && isAdaptive) {
899
- return /* @__PURE__ */ React16.createElement(
686
+ return /* @__PURE__ */ React19.createElement(
900
687
  View,
901
688
  {
902
689
  onLayout: (e) => {
@@ -925,26 +712,26 @@ function TextSpan({ children, color, weight, italic, underline, highlight, style
925
712
  if (highlight) s.backgroundColor = resolveTextColor(highlight, tokens, resolvedTheme, resolvedAppearance);
926
713
  return s;
927
714
  }, [tokens, scopeCtx, color, weight, italic, underline, highlight, resolvedTheme, resolvedAppearance]);
928
- return React16.createElement(
715
+ return React19.createElement(
929
716
  Text,
930
717
  { style: style ? [spanStyle, ...Array.isArray(style) ? style : [style]] : spanStyle },
931
718
  children
932
719
  );
933
720
  }
934
721
  function TextBold(props) {
935
- return React16.createElement(TextSpan, { ...props, weight: "bold" });
722
+ return React19.createElement(TextSpan, { ...props, weight: "bold" });
936
723
  }
937
724
  function TextMedium(props) {
938
- return React16.createElement(TextSpan, { ...props, weight: "medium" });
725
+ return React19.createElement(TextSpan, { ...props, weight: "medium" });
939
726
  }
940
727
  function TextItalic(props) {
941
- return React16.createElement(TextSpan, { ...props, italic: true });
728
+ return React19.createElement(TextSpan, { ...props, italic: true });
942
729
  }
943
730
  function TextUnderline(props) {
944
- return React16.createElement(TextSpan, { ...props, underline: true });
731
+ return React19.createElement(TextSpan, { ...props, underline: true });
945
732
  }
946
733
  function TextHighlight(props) {
947
- return React16.createElement(TextSpan, props);
734
+ return React19.createElement(TextSpan, props);
948
735
  }
949
736
 
950
737
  // src/primitives/Text/index.ts
@@ -956,49 +743,347 @@ var Text3 = Object.assign(TextBase, {
956
743
  Underline: TextUnderline,
957
744
  Highlight: TextHighlight
958
745
  });
959
-
960
- // src/composites/actions/Button/Button.styles.ts
961
- var BUTTON_HEIGHTS = {
962
- sm: 40,
963
- md: 48,
964
- lg: 56,
965
- xl: 64
966
- };
967
- function computeButtonPadding(size, hasIcon, hasText, iconPosition) {
968
- const basePadding = {
969
- sm: 12,
970
- md: 16,
971
- lg: 20,
972
- xl: 24
973
- };
974
- const base = basePadding[size];
975
- const textExtra = 8;
976
- if (!hasText && hasIcon) {
977
- return { paddingLeft: base, paddingRight: base };
978
- }
979
- if (hasText && !hasIcon) {
980
- return { paddingLeft: base + textExtra, paddingRight: base + textExtra };
746
+ var styles = StyleSheet.create({
747
+ root: {
748
+ flex: 1,
749
+ flexDirection: "column",
750
+ ...Platform.OS === "web" ? { minHeight: "100vh" } : {}
751
+ },
752
+ body: {
753
+ flex: 1,
754
+ flexDirection: "row"
755
+ },
756
+ content: {
757
+ flex: 1
981
758
  }
982
- if (hasText && hasIcon) {
983
- if (iconPosition === "left") {
984
- return { paddingLeft: base, paddingRight: base + textExtra };
985
- } else {
986
- return { paddingLeft: base + textExtra, paddingRight: base };
987
- }
759
+ });
760
+ function Page({
761
+ children,
762
+ scheme,
763
+ navbar,
764
+ sidebar,
765
+ testID,
766
+ nativeID,
767
+ ref,
768
+ style
769
+ }) {
770
+ const themeCtx = useNewtoneTheme();
771
+ const schemeThemeCtx = useMemo(() => {
772
+ if (!scheme || !themeCtx.schemes) return null;
773
+ const schemeConfig = themeCtx.schemes[scheme];
774
+ if (!schemeConfig || schemeConfig === themeCtx.config) return null;
775
+ return {
776
+ ...themeCtx,
777
+ config: schemeConfig,
778
+ activeScheme: scheme
779
+ };
780
+ }, [scheme, themeCtx]);
781
+ const userStyles = Array.isArray(style) ? style : style ? [style] : [];
782
+ const content = /* @__PURE__ */ React19.createElement(
783
+ View,
784
+ {
785
+ ref,
786
+ testID,
787
+ nativeID,
788
+ accessibilityRole: "none",
789
+ style: [styles.root, ...userStyles]
790
+ },
791
+ navbar,
792
+ sidebar ? /* @__PURE__ */ React19.createElement(View, { style: styles.body }, sidebar, /* @__PURE__ */ React19.createElement(View, { style: styles.content }, children)) : children
793
+ );
794
+ if (schemeThemeCtx) {
795
+ return /* @__PURE__ */ React19.createElement(_ThemeContext.Provider, { value: schemeThemeCtx }, content);
988
796
  }
989
- return { paddingLeft: base, paddingRight: base };
797
+ return content;
990
798
  }
991
- function getButtonConfig(variant, size, disabled, tokens, theme) {
992
- const sizeConfig = getSizeConfig(size, tokens);
993
- const variantColors = getVariantColors(variant, disabled, tokens, theme);
994
- return {
995
- variantColors,
996
- sizeTokens: {
997
- height: sizeConfig.height,
998
- padding: sizeConfig.padding,
999
- gap: sizeConfig.gap,
1000
- borderRadius: sizeConfig.borderRadius,
1001
- textSize: sizeConfig.textSize,
799
+ var styles2 = StyleSheet.create({
800
+ root: {
801
+ flex: 1
802
+ },
803
+ content: {
804
+ flexGrow: 1
805
+ }
806
+ });
807
+ function Viewport({
808
+ children,
809
+ testID,
810
+ nativeID,
811
+ ref,
812
+ style
813
+ }) {
814
+ const userStyles = Array.isArray(style) ? style : style ? [style] : [];
815
+ return /* @__PURE__ */ React19.createElement(
816
+ ScrollView,
817
+ {
818
+ ref,
819
+ testID,
820
+ nativeID,
821
+ style: styles2.root,
822
+ contentContainerStyle: [styles2.content, ...userStyles]
823
+ },
824
+ children
825
+ );
826
+ }
827
+ function getWrapperStyles(input) {
828
+ const {
829
+ tokens,
830
+ direction = "vertical",
831
+ wrap = false,
832
+ reverse = false,
833
+ align,
834
+ justify,
835
+ padding,
836
+ gap,
837
+ width,
838
+ height,
839
+ minWidth,
840
+ maxWidth,
841
+ minHeight,
842
+ maxHeight,
843
+ position,
844
+ top,
845
+ right,
846
+ bottom,
847
+ left,
848
+ zIndex,
849
+ overflow
850
+ } = input;
851
+ const container = {};
852
+ container.flexDirection = resolveFlexDirection(direction, reverse);
853
+ if (wrap) container.flexWrap = "wrap";
854
+ if (align) container.alignItems = resolveAlignment(align);
855
+ if (justify) container.justifyContent = resolveJustification(justify);
856
+ if (padding !== void 0) {
857
+ const p = resolvePadding(padding, tokens);
858
+ container.paddingTop = p.top;
859
+ container.paddingRight = p.right;
860
+ container.paddingBottom = p.bottom;
861
+ container.paddingLeft = p.left;
862
+ }
863
+ if (gap !== void 0) {
864
+ const g = resolveGap(gap, tokens);
865
+ container.rowGap = g.rowGap;
866
+ container.columnGap = g.columnGap;
867
+ }
868
+ Object.assign(container, resolveSizing(width, height));
869
+ if (minWidth !== void 0) container.minWidth = minWidth;
870
+ if (maxWidth !== void 0) container.maxWidth = maxWidth;
871
+ if (minHeight !== void 0) container.minHeight = minHeight;
872
+ if (maxHeight !== void 0) container.maxHeight = maxHeight;
873
+ if (position) container.position = position;
874
+ if (top !== void 0) container.top = top;
875
+ if (right !== void 0) container.right = right;
876
+ if (bottom !== void 0) container.bottom = bottom;
877
+ if (left !== void 0) container.left = left;
878
+ if (zIndex !== void 0) container.zIndex = zIndex;
879
+ if (overflow) container.overflow = overflow;
880
+ return StyleSheet.create({ c: container }).c;
881
+ }
882
+ function Wrapper({
883
+ children,
884
+ direction,
885
+ wrap,
886
+ reverse,
887
+ align,
888
+ justify,
889
+ padding,
890
+ gap,
891
+ width,
892
+ height,
893
+ minWidth,
894
+ maxWidth,
895
+ minHeight,
896
+ maxHeight,
897
+ position,
898
+ top,
899
+ right,
900
+ bottom,
901
+ left,
902
+ zIndex,
903
+ overflow,
904
+ pointerEvents,
905
+ style,
906
+ testID,
907
+ nativeID,
908
+ ref
909
+ }) {
910
+ const tokens = useTokens();
911
+ const containerStyle = useMemo(
912
+ () => getWrapperStyles({
913
+ tokens,
914
+ direction,
915
+ wrap,
916
+ reverse,
917
+ align,
918
+ justify,
919
+ padding,
920
+ gap,
921
+ width,
922
+ height,
923
+ minWidth,
924
+ maxWidth,
925
+ minHeight,
926
+ maxHeight,
927
+ position,
928
+ top,
929
+ right,
930
+ bottom,
931
+ left,
932
+ zIndex,
933
+ overflow
934
+ }),
935
+ [
936
+ tokens,
937
+ direction,
938
+ wrap,
939
+ reverse,
940
+ align,
941
+ justify,
942
+ padding,
943
+ gap,
944
+ width,
945
+ height,
946
+ minWidth,
947
+ maxWidth,
948
+ minHeight,
949
+ maxHeight,
950
+ position,
951
+ top,
952
+ right,
953
+ bottom,
954
+ left,
955
+ zIndex,
956
+ overflow
957
+ ]
958
+ );
959
+ const userStyles = Array.isArray(style) ? style : style ? [style] : [];
960
+ return /* @__PURE__ */ React19.createElement(
961
+ View,
962
+ {
963
+ ref,
964
+ testID,
965
+ nativeID,
966
+ pointerEvents,
967
+ accessibilityRole: "none",
968
+ style: [containerStyle, ...userStyles]
969
+ },
970
+ children
971
+ );
972
+ }
973
+ var SIZE_PRESETS = {
974
+ xs: { maxWidth: 480, paddingHorizontal: 24 },
975
+ sm: { maxWidth: 640, paddingHorizontal: 24 },
976
+ md: { maxWidth: 768, paddingHorizontal: 24 },
977
+ lg: { maxWidth: 1024, paddingHorizontal: 32 },
978
+ xl: { maxWidth: 1280, paddingHorizontal: 40 },
979
+ full: { maxWidth: void 0, paddingHorizontal: 0 }
980
+ };
981
+ function getSectionStyles(input) {
982
+ const {
983
+ tokens,
984
+ size = "lg",
985
+ fill,
986
+ gap,
987
+ padding
988
+ } = input;
989
+ const preset = SIZE_PRESETS[size];
990
+ const container = {};
991
+ container.width = "100%";
992
+ container.flexDirection = "column";
993
+ if (fill) {
994
+ container.flex = 1;
995
+ }
996
+ if (preset.maxWidth !== void 0) {
997
+ container.maxWidth = preset.maxWidth;
998
+ container.marginLeft = "auto";
999
+ container.marginRight = "auto";
1000
+ }
1001
+ container.paddingLeft = preset.paddingHorizontal;
1002
+ container.paddingRight = preset.paddingHorizontal;
1003
+ if (padding !== void 0) {
1004
+ const p = resolvePadding(padding, tokens);
1005
+ container.paddingTop = p.top;
1006
+ container.paddingBottom = p.bottom;
1007
+ }
1008
+ if (gap !== void 0) {
1009
+ const g = resolveGap(gap, tokens);
1010
+ container.rowGap = g.rowGap;
1011
+ container.columnGap = g.columnGap;
1012
+ }
1013
+ return StyleSheet.create({ c: container }).c;
1014
+ }
1015
+ function Section({
1016
+ children,
1017
+ size,
1018
+ fill,
1019
+ gap,
1020
+ padding,
1021
+ testID,
1022
+ nativeID,
1023
+ ref,
1024
+ style
1025
+ }) {
1026
+ const tokens = useTokens();
1027
+ const containerStyle = useMemo(
1028
+ () => getSectionStyles({ tokens, size, fill, gap, padding }),
1029
+ [tokens, size, fill, gap, padding]
1030
+ );
1031
+ const userStyles = Array.isArray(style) ? style : style ? [style] : [];
1032
+ return /* @__PURE__ */ React19.createElement(
1033
+ View,
1034
+ {
1035
+ ref,
1036
+ testID,
1037
+ nativeID,
1038
+ accessibilityRole: "none",
1039
+ style: [containerStyle, ...userStyles]
1040
+ },
1041
+ children
1042
+ );
1043
+ }
1044
+
1045
+ // src/composites/actions/Button/Button.styles.ts
1046
+ var BUTTON_HEIGHTS = {
1047
+ sm: 40,
1048
+ md: 48,
1049
+ lg: 56,
1050
+ xl: 64
1051
+ };
1052
+ function computeButtonPadding(size, hasIcon, hasText, iconPosition) {
1053
+ const basePadding = {
1054
+ sm: 12,
1055
+ md: 16,
1056
+ lg: 20,
1057
+ xl: 24
1058
+ };
1059
+ const base = basePadding[size];
1060
+ const textExtra = 8;
1061
+ if (!hasText && hasIcon) {
1062
+ return { paddingLeft: base, paddingRight: base };
1063
+ }
1064
+ if (hasText && !hasIcon) {
1065
+ return { paddingLeft: base + textExtra, paddingRight: base + textExtra };
1066
+ }
1067
+ if (hasText && hasIcon) {
1068
+ if (iconPosition === "left") {
1069
+ return { paddingLeft: base, paddingRight: base + textExtra };
1070
+ } else {
1071
+ return { paddingLeft: base + textExtra, paddingRight: base };
1072
+ }
1073
+ }
1074
+ return { paddingLeft: base, paddingRight: base };
1075
+ }
1076
+ function getButtonConfig(variant, size, disabled, tokens, theme) {
1077
+ const sizeConfig = getSizeConfig(size, tokens);
1078
+ const variantColors = getVariantColors(variant, disabled, tokens, theme);
1079
+ return {
1080
+ variantColors,
1081
+ sizeTokens: {
1082
+ height: sizeConfig.height,
1083
+ padding: sizeConfig.padding,
1084
+ gap: sizeConfig.gap,
1085
+ borderRadius: sizeConfig.borderRadius,
1086
+ textSize: sizeConfig.textSize,
1002
1087
  iconSize: sizeConfig.iconSize
1003
1088
  }
1004
1089
  };
@@ -1041,19 +1126,8 @@ function getSizeConfig(size, tokens) {
1041
1126
  return configs[size];
1042
1127
  }
1043
1128
  function getVariantColors(variant, disabled, tokens, theme) {
1044
- const t = tokens.colors[theme];
1045
1129
  if (disabled) {
1046
- const baseColors = getVariantColorsForState(variant, tokens, theme);
1047
- return {
1048
- ...baseColors,
1049
- bg: "transparent",
1050
- hoveredBg: "transparent",
1051
- pressedBg: "transparent",
1052
- textColor: t.main.fontDisabled,
1053
- iconColor: t.main.fontDisabled,
1054
- borderWidth: 1,
1055
- borderColor: t.main.divider
1056
- };
1130
+ return getDisabledVariantColors(variant, tokens, theme);
1057
1131
  }
1058
1132
  return getVariantColorsForState(variant, tokens, theme);
1059
1133
  }
@@ -1072,11 +1146,11 @@ function getVariantColorsForState(variant, tokens, theme) {
1072
1146
  }
1073
1147
  if (variant === "secondary") {
1074
1148
  return {
1075
- bg: t.main.actionEnabled,
1076
- hoveredBg: t.main.actionHovered,
1077
- pressedBg: t.main.actionPressed,
1078
- textColor: t.main.fontPrimary,
1079
- iconColor: t.main.fontPrimary,
1149
+ bg: t.tinted.actionEnabled,
1150
+ hoveredBg: t.tinted.actionHovered,
1151
+ pressedBg: t.tinted.actionPressed,
1152
+ textColor: t.tinted.fontPrimary,
1153
+ iconColor: t.tinted.fontPrimary,
1080
1154
  borderWidth: 0,
1081
1155
  borderColor: "transparent"
1082
1156
  };
@@ -1088,6 +1162,41 @@ function getVariantColorsForState(variant, tokens, theme) {
1088
1162
  textColor: t.main.fontSecondary,
1089
1163
  iconColor: t.main.fontSecondary,
1090
1164
  borderWidth: 0,
1165
+ borderColor: "transparent",
1166
+ textDecoration: "underline"
1167
+ };
1168
+ }
1169
+ function getDisabledVariantColors(variant, tokens, theme) {
1170
+ const t = tokens.colors[theme];
1171
+ if (variant === "primary") {
1172
+ return {
1173
+ bg: t.main.actionEnabled,
1174
+ hoveredBg: t.main.actionEnabled,
1175
+ pressedBg: t.main.actionEnabled,
1176
+ textColor: t.main.fontDisabled,
1177
+ iconColor: t.main.fontDisabled,
1178
+ borderWidth: 0,
1179
+ borderColor: "transparent"
1180
+ };
1181
+ }
1182
+ if (variant === "secondary") {
1183
+ return {
1184
+ bg: "transparent",
1185
+ hoveredBg: "transparent",
1186
+ pressedBg: "transparent",
1187
+ textColor: t.main.fontDisabled,
1188
+ iconColor: t.main.fontDisabled,
1189
+ borderWidth: 1,
1190
+ borderColor: t.main.divider
1191
+ };
1192
+ }
1193
+ return {
1194
+ bg: "transparent",
1195
+ hoveredBg: "transparent",
1196
+ pressedBg: "transparent",
1197
+ textColor: t.main.fontDisabled,
1198
+ iconColor: t.main.fontDisabled,
1199
+ borderWidth: 0,
1091
1200
  borderColor: "transparent"
1092
1201
  };
1093
1202
  }
@@ -1107,16 +1216,29 @@ function Button({
1107
1216
  const tokens = useTokens();
1108
1217
  const frameCtx = useFrameContext();
1109
1218
  const theme = frameCtx?.theme ?? "primary";
1219
+ if (typeof window !== "undefined") {
1220
+ console.log("[Button]", { theme, variant, frameCtxTheme: frameCtx?.theme, hasFrameCtx: !!frameCtx });
1221
+ if (tokens.colors[theme]) {
1222
+ const t = tokens.colors[theme];
1223
+ console.log("[Button tokens]", {
1224
+ "emphasis.actionEnabled": t.emphasis.actionEnabled,
1225
+ "main.actionEnabled": t.main.actionEnabled,
1226
+ "main.background": t.main.background
1227
+ });
1228
+ } else {
1229
+ console.log("[Button] NO tokens for theme:", theme, "available themes:", Object.keys(tokens.colors));
1230
+ }
1231
+ }
1110
1232
  const isDisabled = disabled || loading;
1111
- const { variantColors, sizeTokens } = React16.useMemo(
1233
+ const { variantColors, sizeTokens } = React19.useMemo(
1112
1234
  () => getButtonConfig(variant, size, isDisabled, tokens, theme),
1113
1235
  [variant, size, isDisabled, tokens, theme]
1114
1236
  );
1115
- const padding = React16.useMemo(
1237
+ const padding = React19.useMemo(
1116
1238
  () => computeButtonPadding(size, !!icon, !!children, iconPosition),
1117
1239
  [size, icon, children, iconPosition]
1118
1240
  );
1119
- return /* @__PURE__ */ React16.createElement(Pressable, { disabled: isDisabled, ...pressableProps }, ({ pressed, hovered }) => /* @__PURE__ */ React16.createElement(
1241
+ return /* @__PURE__ */ React19.createElement(Pressable, { disabled: isDisabled, ...pressableProps }, ({ pressed, hovered }) => /* @__PURE__ */ React19.createElement(
1120
1242
  Wrapper,
1121
1243
  {
1122
1244
  direction: "horizontal",
@@ -1132,57 +1254,270 @@ function Button({
1132
1254
  borderRadius: sizeTokens.borderRadius,
1133
1255
  borderWidth: variantColors.borderWidth,
1134
1256
  borderColor: variantColors.borderColor || "transparent",
1135
- opacity: isDisabled ? loading ? 0.6 : 0.4 : 1,
1257
+ opacity: loading ? 0.6 : 1,
1136
1258
  ...fullWidth && { width: "100%", alignSelf: "stretch" }
1137
1259
  },
1138
1260
  ...Array.isArray(style) ? style : style ? [style] : []
1139
1261
  ]
1140
1262
  },
1141
- icon && iconPosition === "left" && /* @__PURE__ */ React16.createElement(Icon, { name: icon, size: sizeTokens.iconSize, color: variantColors.iconColor }),
1142
- children && /* @__PURE__ */ React16.createElement(
1263
+ icon && iconPosition === "left" && /* @__PURE__ */ React19.createElement(Icon, { name: icon, size: sizeTokens.iconSize, color: variantColors.iconColor }),
1264
+ children && /* @__PURE__ */ React19.createElement(
1143
1265
  Text3,
1144
1266
  {
1145
1267
  role: "label",
1146
1268
  size: sizeTokens.textSize,
1147
1269
  centerVertically: true,
1148
1270
  style: [
1149
- { color: variantColors.textColor },
1271
+ { color: variantColors.textColor, textDecorationLine: variantColors.textDecoration },
1150
1272
  ...Array.isArray(textStyle) ? textStyle : textStyle ? [textStyle] : []
1151
1273
  ]
1152
1274
  },
1153
1275
  children
1154
1276
  ),
1155
- icon && iconPosition === "right" && /* @__PURE__ */ React16.createElement(Icon, { name: icon, size: sizeTokens.iconSize, color: variantColors.iconColor })
1277
+ icon && iconPosition === "right" && /* @__PURE__ */ React19.createElement(Icon, { name: icon, size: sizeTokens.iconSize, color: variantColors.iconColor })
1156
1278
  ));
1157
1279
  }
1158
- function getCardStyles(tokens, disabled, theme = "primary", appearance = "main") {
1159
- const at = tokens.colors[theme][appearance];
1160
- return StyleSheet.create({
1161
- container: {
1162
- backgroundColor: at.background,
1163
- borderWidth: 1,
1164
- borderColor: at.fontSecondary,
1165
- borderRadius: tokens.radius.lg,
1166
- padding: tokens.spacing["16"],
1167
- opacity: disabled ? 0.5 : 1
1280
+ function getCardStyles(input) {
1281
+ const {
1282
+ tokens,
1283
+ theme,
1284
+ appearance = "main",
1285
+ direction = "vertical",
1286
+ wrap = false,
1287
+ reverse = false,
1288
+ align,
1289
+ justify,
1290
+ padding,
1291
+ gap,
1292
+ width,
1293
+ height,
1294
+ minWidth,
1295
+ maxWidth,
1296
+ minHeight,
1297
+ maxHeight,
1298
+ radius,
1299
+ disabled = false
1300
+ } = input;
1301
+ const container = {};
1302
+ const appearanceTokens = tokens.colors[theme][appearance];
1303
+ container.backgroundColor = appearanceTokens.background;
1304
+ container.color = appearanceTokens.fontPrimary;
1305
+ container.display = "flex";
1306
+ container.flexDirection = resolveFlexDirection(direction, reverse);
1307
+ if (wrap) container.flexWrap = "wrap";
1308
+ if (align) container.alignItems = resolveAlignment(align);
1309
+ if (justify) container.justifyContent = resolveJustification(justify);
1310
+ if (padding !== void 0) {
1311
+ const p = resolvePadding(padding, tokens);
1312
+ container.paddingTop = p.top;
1313
+ container.paddingRight = p.right;
1314
+ container.paddingBottom = p.bottom;
1315
+ container.paddingLeft = p.left;
1316
+ }
1317
+ if (gap !== void 0) {
1318
+ const g = resolveGap(gap, tokens);
1319
+ container.rowGap = g.rowGap;
1320
+ container.columnGap = g.columnGap;
1321
+ }
1322
+ Object.assign(container, resolveSizing(width, height));
1323
+ if (minWidth !== void 0) container.minWidth = minWidth;
1324
+ if (maxWidth !== void 0) container.maxWidth = maxWidth;
1325
+ if (minHeight !== void 0) container.minHeight = minHeight;
1326
+ if (maxHeight !== void 0) container.maxHeight = maxHeight;
1327
+ if (radius !== void 0) {
1328
+ const corners = resolveRadiusCorners(radius, tokens);
1329
+ container.borderTopLeftRadius = corners.topLeft;
1330
+ container.borderTopRightRadius = corners.topRight;
1331
+ container.borderBottomLeftRadius = corners.bottomLeft;
1332
+ container.borderBottomRightRadius = corners.bottomRight;
1333
+ if (hasPositiveRadius(corners)) {
1334
+ container.overflow = "hidden";
1168
1335
  }
1169
- });
1336
+ }
1337
+ container.borderWidth = 1;
1338
+ container.borderColor = appearanceTokens.divider;
1339
+ container.shadowColor = "#000";
1340
+ container.shadowOffset = { width: 0, height: 2 };
1341
+ container.shadowOpacity = 0.12;
1342
+ container.shadowRadius = 6;
1343
+ container.elevation = 4;
1344
+ if (disabled) {
1345
+ container.opacity = 0.5;
1346
+ }
1347
+ const pressed = StyleSheet.create({
1348
+ s: { backgroundColor: appearanceTokens.fontSecondary }
1349
+ }).s;
1350
+ return {
1351
+ container: StyleSheet.create({ c: container }).c,
1352
+ pressed
1353
+ };
1170
1354
  }
1171
1355
 
1172
- // src/composites/layout/Card/Card.tsx
1356
+ // src/primitives/Card/Card.tsx
1357
+ function wrapTextChildren2(children, textStyle) {
1358
+ return React19.Children.map(children, (child) => {
1359
+ if (typeof child === "string" || typeof child === "number") {
1360
+ return /* @__PURE__ */ React19.createElement(Text, { style: textStyle }, child);
1361
+ }
1362
+ return child;
1363
+ });
1364
+ }
1365
+ var CARD_ELEVATION = 2;
1366
+ var CARD_ELEVATION_NAME = "elevated";
1173
1367
  function Card({
1174
1368
  children,
1175
- elevation = 1,
1176
- style,
1177
- disabled = false
1369
+ // Appearance
1370
+ appearance,
1371
+ radius,
1372
+ // Layout
1373
+ direction,
1374
+ wrap,
1375
+ reverse,
1376
+ // Alignment
1377
+ align,
1378
+ justify,
1379
+ // Spacing
1380
+ padding,
1381
+ gap,
1382
+ // Sizing
1383
+ width,
1384
+ height,
1385
+ minWidth,
1386
+ maxWidth,
1387
+ minHeight,
1388
+ maxHeight,
1389
+ // Positioning
1390
+ pointerEvents,
1391
+ // Interactivity
1392
+ onPress,
1393
+ href,
1394
+ disabled = false,
1395
+ // Accessibility
1396
+ accessibilityLabel,
1397
+ accessibilityHint,
1398
+ // Testing & platform
1399
+ testID,
1400
+ nativeID,
1401
+ ref,
1402
+ // Style override
1403
+ style
1178
1404
  }) {
1179
- const tokens = useTokens(elevation);
1180
- const frameCtx = useFrameContext();
1181
- const styles = React16.useMemo(
1182
- () => getCardStyles(tokens, disabled, frameCtx?.theme, frameCtx?.appearance),
1183
- [tokens, disabled, frameCtx?.theme, frameCtx?.appearance]
1405
+ const themeCtx = useNewtoneTheme();
1406
+ const { mode, gamut } = themeCtx;
1407
+ const parentFrameCtx = useFrameContext();
1408
+ const resolvedTheme = parentFrameCtx?.theme ?? "primary";
1409
+ const resolvedAppearance = appearance ?? parentFrameCtx?.appearance ?? "main";
1410
+ const tokens = useMemo(() => {
1411
+ return computeTokens(
1412
+ themeCtx.config.colorSystem,
1413
+ mode,
1414
+ gamut,
1415
+ CARD_ELEVATION_NAME,
1416
+ themeCtx.config.spacing,
1417
+ themeCtx.config.radius,
1418
+ themeCtx.config.typography,
1419
+ themeCtx.config.icons,
1420
+ themeCtx.config.themeMappings,
1421
+ themeCtx.config.swatchDefaults,
1422
+ themeCtx.config.relativeSwatchDefaults
1423
+ );
1424
+ }, [themeCtx.config, mode, gamut]);
1425
+ const styles3 = useMemo(
1426
+ () => getCardStyles({
1427
+ tokens,
1428
+ theme: resolvedTheme,
1429
+ appearance: resolvedAppearance,
1430
+ direction,
1431
+ wrap,
1432
+ reverse,
1433
+ align,
1434
+ justify,
1435
+ padding,
1436
+ gap,
1437
+ width,
1438
+ height,
1439
+ minWidth,
1440
+ maxWidth,
1441
+ minHeight,
1442
+ maxHeight,
1443
+ radius,
1444
+ disabled
1445
+ }),
1446
+ [
1447
+ tokens,
1448
+ resolvedTheme,
1449
+ resolvedAppearance,
1450
+ direction,
1451
+ wrap,
1452
+ reverse,
1453
+ align,
1454
+ justify,
1455
+ padding,
1456
+ gap,
1457
+ width,
1458
+ height,
1459
+ minWidth,
1460
+ maxWidth,
1461
+ minHeight,
1462
+ maxHeight,
1463
+ radius,
1464
+ disabled
1465
+ ]
1466
+ );
1467
+ const contextValue = useMemo(
1468
+ () => ({
1469
+ elevation: CARD_ELEVATION,
1470
+ tokens,
1471
+ scheme: parentFrameCtx?.scheme,
1472
+ theme: resolvedTheme,
1473
+ appearance: resolvedAppearance
1474
+ }),
1475
+ [tokens, parentFrameCtx?.scheme, resolvedTheme, resolvedAppearance]
1476
+ );
1477
+ const userStyles = Array.isArray(style) ? style : style ? [style] : [];
1478
+ const { isFocusVisible, focusProps } = useFocusVisible();
1479
+ const focusRingStyle = isFocusVisible && !disabled ? {
1480
+ outlineWidth: 2,
1481
+ outlineStyle: "solid",
1482
+ outlineColor: tokens.colors[resolvedTheme].emphasis.background,
1483
+ outlineOffset: 2
1484
+ } : void 0;
1485
+ const textStyle = useMemo(
1486
+ () => ({
1487
+ color: tokens.colors[resolvedTheme][resolvedAppearance].fontPrimary,
1488
+ fontSize: tokens.typography.fontSizes["05"],
1489
+ fontFamily: tokens.typography.fonts.main.family,
1490
+ lineHeight: tokens.typography.lineHeights["06"]
1491
+ }),
1492
+ [tokens, resolvedTheme, resolvedAppearance]
1493
+ );
1494
+ const wrappedChildren = useMemo(
1495
+ () => wrapTextChildren2(children, textStyle),
1496
+ [children, textStyle]
1184
1497
  );
1185
- return /* @__PURE__ */ React16.createElement(View, { style: [styles.container, ...Array.isArray(style) ? style : [style]] }, children);
1498
+ return /* @__PURE__ */ React19.createElement(FrameContext.Provider, { value: contextValue }, /* @__PURE__ */ React19.createElement(
1499
+ Pressable,
1500
+ {
1501
+ ref,
1502
+ testID,
1503
+ nativeID,
1504
+ pointerEvents,
1505
+ accessibilityLabel,
1506
+ accessibilityHint,
1507
+ accessibilityState: disabled ? { disabled: true } : void 0,
1508
+ onPress,
1509
+ disabled,
1510
+ ...href ? { href, accessibilityRole: "link" } : { accessibilityRole: "button" },
1511
+ ...focusProps,
1512
+ style: ({ pressed }) => [
1513
+ styles3.container,
1514
+ pressed && !disabled && styles3.pressed,
1515
+ focusRingStyle,
1516
+ ...userStyles
1517
+ ]
1518
+ },
1519
+ wrappedChildren
1520
+ ));
1186
1521
  }
1187
1522
 
1188
1523
  // src/composites/display/Chip/Chip.styles.ts
@@ -1317,11 +1652,11 @@ function Chip({
1317
1652
  style
1318
1653
  }) {
1319
1654
  const tokens = useTokens();
1320
- const { colors, sizeTokens } = React16.useMemo(
1655
+ const { colors, sizeTokens } = React19.useMemo(
1321
1656
  () => getChipConfig(variant, semantic, size, selected, disabled, tokens),
1322
1657
  [variant, semantic, size, selected, disabled, tokens]
1323
1658
  );
1324
- const content = (state) => /* @__PURE__ */ React16.createElement(
1659
+ const content = (state) => /* @__PURE__ */ React19.createElement(
1325
1660
  Wrapper,
1326
1661
  {
1327
1662
  direction: "horizontal",
@@ -1342,8 +1677,8 @@ function Chip({
1342
1677
  ...Array.isArray(style) ? style : style ? [style] : []
1343
1678
  ]
1344
1679
  },
1345
- icon && /* @__PURE__ */ React16.createElement(Icon, { name: icon, size: sizeTokens.iconSize, color: colors.iconColor }),
1346
- /* @__PURE__ */ React16.createElement(
1680
+ icon && /* @__PURE__ */ React19.createElement(Icon, { name: icon, size: sizeTokens.iconSize, color: colors.iconColor }),
1681
+ /* @__PURE__ */ React19.createElement(
1347
1682
  Text3,
1348
1683
  {
1349
1684
  role: sizeTokens.textRole,
@@ -1354,7 +1689,7 @@ function Chip({
1354
1689
  )
1355
1690
  );
1356
1691
  if (onPress) {
1357
- return /* @__PURE__ */ React16.createElement(Pressable, { onPress, disabled }, ({ pressed, hovered }) => content({ pressed, hovered }));
1692
+ return /* @__PURE__ */ React19.createElement(Pressable, { onPress, disabled }, ({ pressed, hovered }) => content({ pressed, hovered }));
1358
1693
  }
1359
1694
  return content();
1360
1695
  }
@@ -1383,11 +1718,11 @@ function Divider({
1383
1718
  style
1384
1719
  }) {
1385
1720
  const tokens = useTokens();
1386
- const dividerStyle = React16.useMemo(
1721
+ const dividerStyle = React19.useMemo(
1387
1722
  () => getDividerStyles(orientation, spacing, tokens),
1388
1723
  [orientation, spacing, tokens]
1389
1724
  );
1390
- return /* @__PURE__ */ React16.createElement(
1725
+ return /* @__PURE__ */ React19.createElement(
1391
1726
  View,
1392
1727
  {
1393
1728
  style: [dividerStyle, ...Array.isArray(style) ? style : style ? [style] : []],
@@ -1433,11 +1768,11 @@ function ContentCard({
1433
1768
  }) {
1434
1769
  const tokens = useTokens();
1435
1770
  const isInteractive = !!(href || onPress);
1436
- const variantStyles = React16.useMemo(
1771
+ const variantStyles = React19.useMemo(
1437
1772
  () => getContentCardStyles(variant, isInteractive, tokens),
1438
1773
  [variant, isInteractive, tokens]
1439
1774
  );
1440
- return /* @__PURE__ */ React16.createElement(
1775
+ return /* @__PURE__ */ React19.createElement(
1441
1776
  Frame,
1442
1777
  {
1443
1778
  elevation: variant === "elevated" ? 2 : void 0,
@@ -1465,18 +1800,18 @@ function getTextInputStyles(tokens, disabled, theme = "primary", appearance = "m
1465
1800
  fontFamily: tokens.typography.fonts.main.family,
1466
1801
  fontSize: tokens.typography.fontSizes["04"],
1467
1802
  fontWeight: tokens.typography.fonts.main.weights.medium,
1468
- color: at.fontTertiary
1803
+ color: at.fontSecondary
1469
1804
  },
1470
1805
  input: {
1471
1806
  fontFamily: tokens.typography.fonts.main.family,
1472
- backgroundColor: at.fontSecondary,
1807
+ backgroundColor: at.background,
1473
1808
  borderWidth: 1,
1474
- borderColor: at.fontSecondary,
1809
+ borderColor: at.divider,
1475
1810
  borderRadius: tokens.radius.md,
1476
1811
  paddingVertical: tokens.spacing["08"],
1477
1812
  paddingHorizontal: tokens.spacing["12"],
1478
1813
  fontSize: tokens.typography.fontSizes["05"],
1479
- color: disabled ? at.fontTertiary : at.divider,
1814
+ color: disabled ? at.fontDisabled : at.fontPrimary,
1480
1815
  opacity: disabled ? 0.5 : 1
1481
1816
  }
1482
1817
  });
@@ -1493,14 +1828,14 @@ function TextInput({
1493
1828
  const frameCtx = useFrameContext();
1494
1829
  const theme = frameCtx?.theme ?? "primary";
1495
1830
  const appearance = frameCtx?.appearance ?? "main";
1496
- const styles = React16.useMemo(
1831
+ const styles3 = React19.useMemo(
1497
1832
  () => getTextInputStyles(tokens, disabled, theme, appearance),
1498
1833
  [tokens, disabled, theme, appearance]
1499
1834
  );
1500
- return /* @__PURE__ */ React16.createElement(View, { style: [styles.container, ...Array.isArray(style) ? style : [style]] }, label && /* @__PURE__ */ React16.createElement(Text, { style: styles.label }, label), /* @__PURE__ */ React16.createElement(
1835
+ return /* @__PURE__ */ React19.createElement(View, { style: [styles3.container, ...Array.isArray(style) ? style : [style]] }, label && /* @__PURE__ */ React19.createElement(Text, { style: styles3.label }, label), /* @__PURE__ */ React19.createElement(
1501
1836
  TextInput$1,
1502
1837
  {
1503
- style: styles.input,
1838
+ style: styles3.input,
1504
1839
  editable: !disabled,
1505
1840
  placeholderTextColor: tokens.colors[theme][appearance].fontTertiary,
1506
1841
  ...textInputProps
@@ -1589,28 +1924,28 @@ function Popover({
1589
1924
  },
1590
1925
  [closeOnEscape, onClose]
1591
1926
  );
1592
- const styles = useMemo(
1927
+ const styles3 = useMemo(
1593
1928
  () => getPopoverStyles(tokens, triggerHeight, offset, maxHeight, width, isOpen, frameCtx?.theme, frameCtx?.appearance),
1594
1929
  [tokens, triggerHeight, offset, maxHeight, width, isOpen, frameCtx?.theme, frameCtx?.appearance]
1595
1930
  );
1596
1931
  const containerStyles = useMemo(
1597
- () => [styles.container, ...Array.isArray(style) ? style : style ? [style] : []],
1598
- [styles.container, style]
1932
+ () => [styles3.container, ...Array.isArray(style) ? style : style ? [style] : []],
1933
+ [styles3.container, style]
1599
1934
  );
1600
1935
  const mergedContentStyles = useMemo(
1601
- () => [styles.content, ...Array.isArray(contentStyle) ? contentStyle : contentStyle ? [contentStyle] : []],
1602
- [styles.content, contentStyle]
1936
+ () => [styles3.content, ...Array.isArray(contentStyle) ? contentStyle : contentStyle ? [contentStyle] : []],
1937
+ [styles3.content, contentStyle]
1603
1938
  );
1604
1939
  const webProps = { onKeyDown: handleKeyDown };
1605
- return /* @__PURE__ */ React16.createElement(
1940
+ return /* @__PURE__ */ React19.createElement(
1606
1941
  View,
1607
1942
  {
1608
1943
  ref: containerRef,
1609
1944
  style: containerStyles,
1610
1945
  ...webProps
1611
1946
  },
1612
- /* @__PURE__ */ React16.createElement(View, { onLayout: onTriggerLayout }, trigger),
1613
- isOpen && /* @__PURE__ */ React16.createElement(View, { style: mergedContentStyles }, children)
1947
+ /* @__PURE__ */ React19.createElement(View, { onLayout: onTriggerLayout }, trigger),
1948
+ isOpen && /* @__PURE__ */ React19.createElement(View, { style: mergedContentStyles }, children)
1614
1949
  );
1615
1950
  }
1616
1951
  function usePopover(options) {
@@ -1811,7 +2146,7 @@ function SelectOptionRow({
1811
2146
  const paddingHorizontal = size === "sm" ? tokens.spacing["08"] : tokens.spacing["12"];
1812
2147
  const fontSize = size === "sm" ? tokens.typography.fontSizes["04"] : tokens.typography.fontSizes["05"];
1813
2148
  if (renderOption) {
1814
- return /* @__PURE__ */ React16.createElement(
2149
+ return /* @__PURE__ */ React19.createElement(
1815
2150
  Pressable,
1816
2151
  {
1817
2152
  onPress: option.disabled ? void 0 : onSelect,
@@ -1822,7 +2157,7 @@ function SelectOptionRow({
1822
2157
  renderOption(option, { isSelected, isFocused })
1823
2158
  );
1824
2159
  }
1825
- return /* @__PURE__ */ React16.createElement(
2160
+ return /* @__PURE__ */ React19.createElement(
1826
2161
  Pressable,
1827
2162
  {
1828
2163
  onPress: option.disabled ? void 0 : onSelect,
@@ -1851,7 +2186,7 @@ function SelectOptionRow({
1851
2186
  }
1852
2187
  ]
1853
2188
  },
1854
- /* @__PURE__ */ React16.createElement(
2189
+ /* @__PURE__ */ React19.createElement(
1855
2190
  Text,
1856
2191
  {
1857
2192
  style: [
@@ -1873,7 +2208,7 @@ function SelectOptionRow({
1873
2208
  },
1874
2209
  option.label
1875
2210
  ),
1876
- isSelected && /* @__PURE__ */ React16.createElement(View, { style: { marginLeft: tokens.spacing["08"] } }, /* @__PURE__ */ React16.createElement(
2211
+ isSelected && /* @__PURE__ */ React19.createElement(View, { style: { marginLeft: tokens.spacing["08"] } }, /* @__PURE__ */ React19.createElement(
1877
2212
  Icon,
1878
2213
  {
1879
2214
  name: "check",
@@ -1925,7 +2260,7 @@ function Select({
1925
2260
  });
1926
2261
  const inheritedTheme = frameCtx?.theme;
1927
2262
  const inheritedAppearance = frameCtx?.appearance;
1928
- const styles = useMemo(
2263
+ const styles3 = useMemo(
1929
2264
  () => getSelectStyles(tokens, disabled, size, isOpen, inheritedTheme, inheritedAppearance),
1930
2265
  [tokens, disabled, size, isOpen, inheritedTheme, inheritedAppearance]
1931
2266
  );
@@ -1934,7 +2269,7 @@ function Select({
1934
2269
  const at = tokens.colors[inheritedTheme ?? "primary"][inheritedAppearance ?? "main"];
1935
2270
  const iconColor = disabled ? at.fontTertiary : at.divider;
1936
2271
  const triggerWebProps = { onKeyDown: handleKeyDown };
1937
- const trigger = /* @__PURE__ */ React16.createElement(
2272
+ const trigger = /* @__PURE__ */ React19.createElement(
1938
2273
  Pressable,
1939
2274
  {
1940
2275
  onPress: disabled ? void 0 : toggle,
@@ -1942,10 +2277,10 @@ function Select({
1942
2277
  role: "combobox",
1943
2278
  accessibilityState: { expanded: isOpen },
1944
2279
  ...triggerWebProps,
1945
- style: styles.trigger
2280
+ style: styles3.trigger
1946
2281
  },
1947
- renderValue ? renderValue(selectedOption) : /* @__PURE__ */ React16.createElement(Text, { style: styles.triggerText, numberOfLines: 1 }, displayLabel),
1948
- /* @__PURE__ */ React16.createElement(View, { style: styles.iconWrapper, pointerEvents: "none" }, /* @__PURE__ */ React16.createElement(
2282
+ renderValue ? renderValue(selectedOption) : /* @__PURE__ */ React19.createElement(Text, { style: styles3.triggerText, numberOfLines: 1 }, displayLabel),
2283
+ /* @__PURE__ */ React19.createElement(View, { style: styles3.iconWrapper, pointerEvents: "none" }, /* @__PURE__ */ React19.createElement(
1949
2284
  Icon,
1950
2285
  {
1951
2286
  name: isOpen ? "expand_less" : "expand_more",
@@ -1954,14 +2289,14 @@ function Select({
1954
2289
  }
1955
2290
  ))
1956
2291
  );
1957
- return /* @__PURE__ */ React16.createElement(View, { style: [styles.container, ...Array.isArray(style) ? style : style ? [style] : []] }, label && /* @__PURE__ */ React16.createElement(Text, { style: styles.label }, label), /* @__PURE__ */ React16.createElement(
2292
+ return /* @__PURE__ */ React19.createElement(View, { style: [styles3.container, ...Array.isArray(style) ? style : style ? [style] : []] }, label && /* @__PURE__ */ React19.createElement(Text, { style: styles3.label }, label), /* @__PURE__ */ React19.createElement(
1958
2293
  Popover,
1959
2294
  {
1960
2295
  isOpen: isOpen && !disabled,
1961
2296
  onClose: close,
1962
2297
  trigger
1963
2298
  },
1964
- /* @__PURE__ */ React16.createElement(
2299
+ /* @__PURE__ */ React19.createElement(
1965
2300
  ScrollView,
1966
2301
  {
1967
2302
  bounces: false,
@@ -1970,7 +2305,7 @@ function Select({
1970
2305
  },
1971
2306
  options.map((item) => {
1972
2307
  if (isOptionGroup(item)) {
1973
- return /* @__PURE__ */ React16.createElement(View, { key: item.label }, /* @__PURE__ */ React16.createElement(Text, { style: styles.groupLabel }, item.label), item.options.map((opt) => /* @__PURE__ */ React16.createElement(
2308
+ return /* @__PURE__ */ React19.createElement(View, { key: item.label }, /* @__PURE__ */ React19.createElement(Text, { style: styles3.groupLabel }, item.label), item.options.map((opt) => /* @__PURE__ */ React19.createElement(
1974
2309
  SelectOptionRow,
1975
2310
  {
1976
2311
  key: opt.value,
@@ -1986,7 +2321,7 @@ function Select({
1986
2321
  }
1987
2322
  )));
1988
2323
  }
1989
- return /* @__PURE__ */ React16.createElement(
2324
+ return /* @__PURE__ */ React19.createElement(
1990
2325
  SelectOptionRow,
1991
2326
  {
1992
2327
  key: item.value,
@@ -2053,16 +2388,16 @@ function Toggle({
2053
2388
  }) {
2054
2389
  const tokens = useTokens(1);
2055
2390
  const frameCtx = useFrameContext();
2056
- const styles = React16.useMemo(
2391
+ const styles3 = React19.useMemo(
2057
2392
  () => getToggleStyles(tokens, value, disabled, frameCtx?.theme, frameCtx?.appearance),
2058
2393
  [tokens, value, disabled, frameCtx?.theme, frameCtx?.appearance]
2059
2394
  );
2060
- const handlePress = React16.useCallback(() => {
2395
+ const handlePress = React19.useCallback(() => {
2061
2396
  if (!disabled) {
2062
2397
  onValueChange(!value);
2063
2398
  }
2064
2399
  }, [disabled, value, onValueChange]);
2065
- return /* @__PURE__ */ React16.createElement(View, { style: [styles.container, ...Array.isArray(style) ? style : [style]] }, label && /* @__PURE__ */ React16.createElement(Text, { style: styles.label }, label), /* @__PURE__ */ React16.createElement(
2400
+ return /* @__PURE__ */ React19.createElement(View, { style: [styles3.container, ...Array.isArray(style) ? style : [style]] }, label && /* @__PURE__ */ React19.createElement(Text, { style: styles3.label }, label), /* @__PURE__ */ React19.createElement(
2066
2401
  Pressable,
2067
2402
  {
2068
2403
  onPress: handlePress,
@@ -2070,7 +2405,7 @@ function Toggle({
2070
2405
  accessibilityRole: "switch",
2071
2406
  accessibilityState: { checked: value, disabled }
2072
2407
  },
2073
- /* @__PURE__ */ React16.createElement(View, { style: styles.track }, /* @__PURE__ */ React16.createElement(View, { style: styles.thumb }))
2408
+ /* @__PURE__ */ React19.createElement(View, { style: styles3.track }, /* @__PURE__ */ React19.createElement(View, { style: styles3.thumb }))
2074
2409
  ));
2075
2410
  }
2076
2411
  var TRACK_HEIGHT2 = 6;
@@ -2156,42 +2491,42 @@ function Slider({
2156
2491
  style
2157
2492
  }) {
2158
2493
  const tokens = useTokens(1);
2159
- const styles = React16.useMemo(
2494
+ const styles3 = React19.useMemo(
2160
2495
  () => getSliderStyles(tokens, disabled),
2161
2496
  [tokens, disabled]
2162
2497
  );
2163
- const trackRef = React16.useRef(null);
2164
- const trackWidth = React16.useRef(0);
2165
- const trackPageX = React16.useRef(0);
2166
- const [layoutWidth, setLayoutWidth] = React16.useState(0);
2167
- const onValueChangeRef = React16.useRef(onValueChange);
2168
- const minRef = React16.useRef(min);
2169
- const maxRef = React16.useRef(max);
2170
- const stepRef = React16.useRef(step);
2171
- const disabledRef = React16.useRef(disabled);
2172
- React16.useEffect(() => {
2498
+ const trackRef = React19.useRef(null);
2499
+ const trackWidth = React19.useRef(0);
2500
+ const trackPageX = React19.useRef(0);
2501
+ const [layoutWidth, setLayoutWidth] = React19.useState(0);
2502
+ const onValueChangeRef = React19.useRef(onValueChange);
2503
+ const minRef = React19.useRef(min);
2504
+ const maxRef = React19.useRef(max);
2505
+ const stepRef = React19.useRef(step);
2506
+ const disabledRef = React19.useRef(disabled);
2507
+ React19.useEffect(() => {
2173
2508
  onValueChangeRef.current = onValueChange;
2174
2509
  }, [onValueChange]);
2175
- React16.useEffect(() => {
2510
+ React19.useEffect(() => {
2176
2511
  minRef.current = min;
2177
2512
  }, [min]);
2178
- React16.useEffect(() => {
2513
+ React19.useEffect(() => {
2179
2514
  maxRef.current = max;
2180
2515
  }, [max]);
2181
- React16.useEffect(() => {
2516
+ React19.useEffect(() => {
2182
2517
  stepRef.current = step;
2183
2518
  }, [step]);
2184
- React16.useEffect(() => {
2519
+ React19.useEffect(() => {
2185
2520
  disabledRef.current = disabled;
2186
2521
  }, [disabled]);
2187
- const computeValue = React16.useCallback((pageX) => {
2522
+ const computeValue = React19.useCallback((pageX) => {
2188
2523
  const localX = pageX - trackPageX.current;
2189
2524
  const ratio2 = Math.min(1, Math.max(0, localX / trackWidth.current));
2190
2525
  const raw = minRef.current + ratio2 * (maxRef.current - minRef.current);
2191
2526
  const stepped = Math.round(raw / stepRef.current) * stepRef.current;
2192
2527
  return Math.min(maxRef.current, Math.max(minRef.current, stepped));
2193
2528
  }, []);
2194
- const panResponder = React16.useRef(
2529
+ const panResponder = React19.useRef(
2195
2530
  PanResponder.create({
2196
2531
  onStartShouldSetPanResponder: () => !disabledRef.current,
2197
2532
  onMoveShouldSetPanResponder: () => !disabledRef.current,
@@ -2219,7 +2554,7 @@ function Slider({
2219
2554
  fillLeft = 0;
2220
2555
  fillWidth = thumbLeft + THUMB_SIZE2 / 2;
2221
2556
  }
2222
- const handleValueTextSubmit = React16.useCallback(
2557
+ const handleValueTextSubmit = React19.useCallback(
2223
2558
  (text) => {
2224
2559
  const raw = Number(text);
2225
2560
  if (!Number.isNaN(raw)) {
@@ -2228,15 +2563,15 @@ function Slider({
2228
2563
  },
2229
2564
  [onValueChange, min, max]
2230
2565
  );
2231
- const [editText, setEditText] = React16.useState(String(value));
2232
- React16.useEffect(() => {
2566
+ const [editText, setEditText] = React19.useState(String(value));
2567
+ React19.useEffect(() => {
2233
2568
  setEditText(String(value));
2234
2569
  }, [value]);
2235
2570
  const showLabel = label || showValue || editableValue;
2236
- return /* @__PURE__ */ React16.createElement(View, { style: [styles.container, ...Array.isArray(style) ? style : [style]] }, showLabel && /* @__PURE__ */ React16.createElement(View, { style: styles.labelRow }, label && /* @__PURE__ */ React16.createElement(Text, { style: styles.label }, label), editableValue ? /* @__PURE__ */ React16.createElement(
2571
+ return /* @__PURE__ */ React19.createElement(View, { style: [styles3.container, ...Array.isArray(style) ? style : [style]] }, showLabel && /* @__PURE__ */ React19.createElement(View, { style: styles3.labelRow }, label && /* @__PURE__ */ React19.createElement(Text, { style: styles3.label }, label), editableValue ? /* @__PURE__ */ React19.createElement(
2237
2572
  TextInput$1,
2238
2573
  {
2239
- style: styles.valueInput,
2574
+ style: styles3.valueInput,
2240
2575
  value: editText,
2241
2576
  keyboardType: "numeric",
2242
2577
  onChangeText: setEditText,
@@ -2245,11 +2580,11 @@ function Slider({
2245
2580
  selectTextOnFocus: true,
2246
2581
  editable: !disabled
2247
2582
  }
2248
- ) : showValue && /* @__PURE__ */ React16.createElement(Text, { style: styles.value }, value)), /* @__PURE__ */ React16.createElement(
2583
+ ) : showValue && /* @__PURE__ */ React19.createElement(Text, { style: styles3.value }, value)), /* @__PURE__ */ React19.createElement(
2249
2584
  View,
2250
2585
  {
2251
2586
  ref: trackRef,
2252
- style: styles.trackContainer,
2587
+ style: styles3.trackContainer,
2253
2588
  onLayout: (e) => {
2254
2589
  const w = e.nativeEvent.layout.width;
2255
2590
  trackWidth.current = w;
@@ -2260,9 +2595,9 @@ function Slider({
2260
2595
  },
2261
2596
  ...panResponder.panHandlers
2262
2597
  },
2263
- /* @__PURE__ */ React16.createElement(View, { style: styles.trackRail }),
2264
- /* @__PURE__ */ React16.createElement(View, { style: [styles.trackFill, { left: fillLeft, width: fillWidth }] }),
2265
- /* @__PURE__ */ React16.createElement(View, { style: [styles.thumb, { left: thumbLeft }] })
2598
+ /* @__PURE__ */ React19.createElement(View, { style: styles3.trackRail }),
2599
+ /* @__PURE__ */ React19.createElement(View, { style: [styles3.trackFill, { left: fillLeft, width: fillWidth }] }),
2600
+ /* @__PURE__ */ React19.createElement(View, { style: [styles3.thumb, { left: thumbLeft }] })
2266
2601
  ));
2267
2602
  }
2268
2603
  var TRACK_HEIGHT3 = 22;
@@ -2359,42 +2694,42 @@ function HueSlider({
2359
2694
  style
2360
2695
  }) {
2361
2696
  const tokens = useTokens(1);
2362
- const styles = React16.useMemo(
2697
+ const styles3 = React19.useMemo(
2363
2698
  () => getHueSliderStyles(tokens, disabled),
2364
2699
  [tokens, disabled]
2365
2700
  );
2366
- const segments = React16.useMemo(
2701
+ const segments = React19.useMemo(
2367
2702
  () => buildHueSegments(min, max),
2368
2703
  [min, max]
2369
2704
  );
2370
- const trackRef = React16.useRef(null);
2371
- const trackWidth = React16.useRef(0);
2372
- const trackPageX = React16.useRef(0);
2373
- const [layoutWidth, setLayoutWidth] = React16.useState(0);
2374
- const onValueChangeRef = React16.useRef(onValueChange);
2375
- const minRef = React16.useRef(min);
2376
- const maxRef = React16.useRef(max);
2377
- const disabledRef = React16.useRef(disabled);
2378
- React16.useEffect(() => {
2705
+ const trackRef = React19.useRef(null);
2706
+ const trackWidth = React19.useRef(0);
2707
+ const trackPageX = React19.useRef(0);
2708
+ const [layoutWidth, setLayoutWidth] = React19.useState(0);
2709
+ const onValueChangeRef = React19.useRef(onValueChange);
2710
+ const minRef = React19.useRef(min);
2711
+ const maxRef = React19.useRef(max);
2712
+ const disabledRef = React19.useRef(disabled);
2713
+ React19.useEffect(() => {
2379
2714
  onValueChangeRef.current = onValueChange;
2380
2715
  }, [onValueChange]);
2381
- React16.useEffect(() => {
2716
+ React19.useEffect(() => {
2382
2717
  minRef.current = min;
2383
2718
  }, [min]);
2384
- React16.useEffect(() => {
2719
+ React19.useEffect(() => {
2385
2720
  maxRef.current = max;
2386
2721
  }, [max]);
2387
- React16.useEffect(() => {
2722
+ React19.useEffect(() => {
2388
2723
  disabledRef.current = disabled;
2389
2724
  }, [disabled]);
2390
- const computeHue = React16.useCallback((pageX) => {
2725
+ const computeHue = React19.useCallback((pageX) => {
2391
2726
  const localX = pageX - trackPageX.current;
2392
2727
  const ratio2 = Math.min(1, Math.max(0, localX / trackWidth.current));
2393
2728
  const raw = minRef.current + ratio2 * (maxRef.current - minRef.current);
2394
2729
  const stepped = Math.round(raw);
2395
2730
  return (stepped % 360 + 360) % 360;
2396
2731
  }, []);
2397
- const panResponder = React16.useRef(
2732
+ const panResponder = React19.useRef(
2398
2733
  PanResponder.create({
2399
2734
  onStartShouldSetPanResponder: () => !disabledRef.current,
2400
2735
  onMoveShouldSetPanResponder: () => !disabledRef.current,
@@ -2410,7 +2745,7 @@ function HueSlider({
2410
2745
  const ratio = max > min ? (sliderValue - min) / (max - min) : 0;
2411
2746
  const usableWidth = Math.max(0, layoutWidth - THUMB_SIZE3);
2412
2747
  const thumbLeft = ratio * usableWidth;
2413
- const handleValueTextSubmit = React16.useCallback(
2748
+ const handleValueTextSubmit = React19.useCallback(
2414
2749
  (text) => {
2415
2750
  const raw = Number(text);
2416
2751
  if (!Number.isNaN(raw)) {
@@ -2419,15 +2754,15 @@ function HueSlider({
2419
2754
  },
2420
2755
  [onValueChange]
2421
2756
  );
2422
- const [editText, setEditText] = React16.useState(String(value));
2423
- React16.useEffect(() => {
2757
+ const [editText, setEditText] = React19.useState(String(value));
2758
+ React19.useEffect(() => {
2424
2759
  setEditText(String(value));
2425
2760
  }, [value]);
2426
2761
  const showLabel = label || showValue || editableValue;
2427
- return /* @__PURE__ */ React16.createElement(View, { style: [styles.container, ...Array.isArray(style) ? style : [style]] }, showLabel && /* @__PURE__ */ React16.createElement(View, { style: styles.labelRow }, label && /* @__PURE__ */ React16.createElement(Text, { style: styles.label }, label), editableValue ? /* @__PURE__ */ React16.createElement(
2762
+ return /* @__PURE__ */ React19.createElement(View, { style: [styles3.container, ...Array.isArray(style) ? style : [style]] }, showLabel && /* @__PURE__ */ React19.createElement(View, { style: styles3.labelRow }, label && /* @__PURE__ */ React19.createElement(Text, { style: styles3.label }, label), editableValue ? /* @__PURE__ */ React19.createElement(
2428
2763
  TextInput$1,
2429
2764
  {
2430
- style: styles.valueInput,
2765
+ style: styles3.valueInput,
2431
2766
  value: editText,
2432
2767
  keyboardType: "numeric",
2433
2768
  onChangeText: setEditText,
@@ -2436,11 +2771,11 @@ function HueSlider({
2436
2771
  selectTextOnFocus: true,
2437
2772
  editable: !disabled
2438
2773
  }
2439
- ) : showValue && /* @__PURE__ */ React16.createElement(Text, { style: styles.value }, value, "\xB0")), /* @__PURE__ */ React16.createElement(
2774
+ ) : showValue && /* @__PURE__ */ React19.createElement(Text, { style: styles3.value }, value, "\xB0")), /* @__PURE__ */ React19.createElement(
2440
2775
  View,
2441
2776
  {
2442
2777
  ref: trackRef,
2443
- style: styles.trackContainer,
2778
+ style: styles3.trackContainer,
2444
2779
  onLayout: (e) => {
2445
2780
  const w = e.nativeEvent.layout.width;
2446
2781
  trackWidth.current = w;
@@ -2451,12 +2786,12 @@ function HueSlider({
2451
2786
  },
2452
2787
  ...panResponder.panHandlers
2453
2788
  },
2454
- /* @__PURE__ */ React16.createElement(View, { style: styles.gradientTrack }, segments.map((color, i) => /* @__PURE__ */ React16.createElement(View, { key: i, style: [styles.segment, { backgroundColor: color }] }))),
2455
- /* @__PURE__ */ React16.createElement(View, { style: [styles.thumb, { left: thumbLeft }] })
2789
+ /* @__PURE__ */ React19.createElement(View, { style: styles3.gradientTrack }, segments.map((color, i) => /* @__PURE__ */ React19.createElement(View, { key: i, style: [styles3.segment, { backgroundColor: color }] }))),
2790
+ /* @__PURE__ */ React19.createElement(View, { style: [styles3.thumb, { left: thumbLeft }] })
2456
2791
  ));
2457
2792
  }
2458
2793
 
2459
- // node_modules/@newtonedev/colors/dist/index.js
2794
+ // ../../../newtone-colors/dist/index.js
2460
2795
  var SRGB_GAMMA_THRESHOLD_LINEAR = 31308e-7;
2461
2796
  var SRGB_GAMMA_SLOPE = 12.92;
2462
2797
  var SRGB_GAMMA_EXPONENT = 2.4;
@@ -2508,7 +2843,10 @@ function oklchToP3(color) {
2508
2843
  return linearSrgbToSrgb(oklabToLinearP3(oklchToOklab(color)));
2509
2844
  }
2510
2845
  function oklchToP3Css(color) {
2511
- const { r, g, b } = oklchToP3(color);
2846
+ const p3 = oklchToP3(color);
2847
+ const r = Math.max(0, Math.min(1, p3.r)).toFixed(4);
2848
+ const g = Math.max(0, Math.min(1, p3.g)).toFixed(4);
2849
+ const b = Math.max(0, Math.min(1, p3.b)).toFixed(4);
2512
2850
  return `color(display-p3 ${r} ${g} ${b})`;
2513
2851
  }
2514
2852
  var TRACK_HEIGHT4 = 22;
@@ -2581,37 +2919,37 @@ function ColorScaleSlider({
2581
2919
  }) {
2582
2920
  const tokens = useTokens(1);
2583
2921
  const { gamut } = useNewtoneTheme();
2584
- const styles = React16.useMemo(
2922
+ const styles3 = React19.useMemo(
2585
2923
  () => getColorScaleSliderStyles(tokens, disabled),
2586
2924
  [tokens, disabled]
2587
2925
  );
2588
- const trackRef = React16.useRef(null);
2589
- const trackWidth = React16.useRef(0);
2590
- const trackPageX = React16.useRef(0);
2591
- const isDragging = React16.useRef(false);
2592
- const thumbAnim = React16.useRef(new Animated.Value(0)).current;
2593
- const [layoutWidth, setLayoutWidth] = React16.useState(0);
2594
- const onValueChangeRef = React16.useRef(onValueChange);
2595
- const disabledRef = React16.useRef(disabled);
2596
- const colorsLengthRef = React16.useRef(colors.length);
2597
- const trimEndsRef = React16.useRef(trimEnds);
2598
- const snapRef = React16.useRef(snap);
2599
- React16.useEffect(() => {
2926
+ const trackRef = React19.useRef(null);
2927
+ const trackWidth = React19.useRef(0);
2928
+ const trackPageX = React19.useRef(0);
2929
+ const isDragging = React19.useRef(false);
2930
+ const thumbAnim = React19.useRef(new Animated.Value(0)).current;
2931
+ const [layoutWidth, setLayoutWidth] = React19.useState(0);
2932
+ const onValueChangeRef = React19.useRef(onValueChange);
2933
+ const disabledRef = React19.useRef(disabled);
2934
+ const colorsLengthRef = React19.useRef(colors.length);
2935
+ const trimEndsRef = React19.useRef(trimEnds);
2936
+ const snapRef = React19.useRef(snap);
2937
+ React19.useEffect(() => {
2600
2938
  onValueChangeRef.current = onValueChange;
2601
2939
  }, [onValueChange]);
2602
- React16.useEffect(() => {
2940
+ React19.useEffect(() => {
2603
2941
  disabledRef.current = disabled;
2604
2942
  }, [disabled]);
2605
- React16.useEffect(() => {
2943
+ React19.useEffect(() => {
2606
2944
  colorsLengthRef.current = colors.length;
2607
2945
  }, [colors.length]);
2608
- React16.useEffect(() => {
2946
+ React19.useEffect(() => {
2609
2947
  trimEndsRef.current = trimEnds;
2610
2948
  }, [trimEnds]);
2611
- React16.useEffect(() => {
2949
+ React19.useEffect(() => {
2612
2950
  snapRef.current = snap;
2613
2951
  }, [snap]);
2614
- const computeNv = React16.useCallback((pageX) => {
2952
+ const computeNv = React19.useCallback((pageX) => {
2615
2953
  const localX = pageX - trackPageX.current;
2616
2954
  const ratio2 = Math.min(1, Math.max(0, localX / trackWidth.current));
2617
2955
  const totalSteps2 = colorsLengthRef.current - 1;
@@ -2626,7 +2964,7 @@ function ColorScaleSlider({
2626
2964
  }
2627
2965
  return nv;
2628
2966
  }, []);
2629
- const panResponder = React16.useRef(
2967
+ const panResponder = React19.useRef(
2630
2968
  PanResponder.create({
2631
2969
  onStartShouldSetPanResponder: () => !disabledRef.current,
2632
2970
  onMoveShouldSetPanResponder: () => !disabledRef.current,
@@ -2654,7 +2992,7 @@ function ColorScaleSlider({
2654
2992
  const ratio = range > 0 ? (maxNV - clampedValue) / range : 0.5;
2655
2993
  const usableWidth = Math.max(0, layoutWidth - THUMB_SIZE4);
2656
2994
  const thumbLeft = ratio * usableWidth;
2657
- React16.useEffect(() => {
2995
+ React19.useEffect(() => {
2658
2996
  if (isDragging.current || !animateValue) {
2659
2997
  thumbAnim.setValue(thumbLeft);
2660
2998
  } else {
@@ -2665,11 +3003,11 @@ function ColorScaleSlider({
2665
3003
  }).start();
2666
3004
  }
2667
3005
  }, [thumbLeft, animateValue, thumbAnim]);
2668
- return /* @__PURE__ */ React16.createElement(View, { style: [styles.container, ...Array.isArray(style) ? style : [style]] }, label && /* @__PURE__ */ React16.createElement(View, { style: styles.labelRow }, /* @__PURE__ */ React16.createElement(Text, { style: styles.label }, label)), /* @__PURE__ */ React16.createElement(
3006
+ return /* @__PURE__ */ React19.createElement(View, { style: [styles3.container, ...Array.isArray(style) ? style : [style]] }, label && /* @__PURE__ */ React19.createElement(View, { style: styles3.labelRow }, /* @__PURE__ */ React19.createElement(Text, { style: styles3.label }, label)), /* @__PURE__ */ React19.createElement(
2669
3007
  View,
2670
3008
  {
2671
3009
  ref: trackRef,
2672
- style: styles.trackContainer,
3010
+ style: styles3.trackContainer,
2673
3011
  onLayout: (e) => {
2674
3012
  const w = e.nativeEvent.layout.width;
2675
3013
  trackWidth.current = w;
@@ -2680,9 +3018,9 @@ function ColorScaleSlider({
2680
3018
  },
2681
3019
  ...panResponder.panHandlers
2682
3020
  },
2683
- /* @__PURE__ */ React16.createElement(View, { style: styles.gradientTrack }, visibleColors.map((color, i) => /* @__PURE__ */ React16.createElement(View, { key: i, style: [styles.segment, { backgroundColor: gamut === "p3" ? oklchToP3Css(color.oklch) : srgbToHex(color.srgb) }] }))),
2684
- /* @__PURE__ */ React16.createElement(Animated.View, { style: [styles.thumb, { left: thumbAnim }] })
2685
- ), warning && /* @__PURE__ */ React16.createElement(Text, { style: styles.warning }, warning));
3021
+ /* @__PURE__ */ React19.createElement(View, { style: styles3.gradientTrack }, visibleColors.map((color, i) => /* @__PURE__ */ React19.createElement(View, { key: i, style: [styles3.segment, { backgroundColor: gamut === "p3" ? oklchToP3Css(color.oklch) : srgbToHex(color.srgb) }] }))),
3022
+ /* @__PURE__ */ React19.createElement(Animated.View, { style: [styles3.thumb, { left: thumbAnim }] })
3023
+ ), warning && /* @__PURE__ */ React19.createElement(Text, { style: styles3.warning }, warning));
2686
3024
  }
2687
3025
  function getAppShellStyles(tokens, theme = "primary", appearance = "main") {
2688
3026
  const at = tokens.colors[theme][appearance];
@@ -2706,11 +3044,11 @@ function getAppShellStyles(tokens, theme = "primary", appearance = "main") {
2706
3044
  function AppShell({ sidebar, children }) {
2707
3045
  const tokens = useTokens();
2708
3046
  const frameCtx = useFrameContext();
2709
- const styles = React16.useMemo(
3047
+ const styles3 = React19.useMemo(
2710
3048
  () => getAppShellStyles(tokens, frameCtx?.theme, frameCtx?.appearance),
2711
3049
  [tokens, frameCtx?.theme, frameCtx?.appearance]
2712
3050
  );
2713
- return /* @__PURE__ */ React16.createElement(View, { style: styles.container }, sidebar, /* @__PURE__ */ React16.createElement(View, { style: styles.main }, children));
3051
+ return /* @__PURE__ */ React19.createElement(View, { style: styles3.container }, sidebar, /* @__PURE__ */ React19.createElement(View, { style: styles3.main }, children));
2714
3052
  }
2715
3053
  function getSidebarStyles({ tokens, width, bordered, theme = "primary", appearance = "main" }) {
2716
3054
  const at = tokens.colors[theme][appearance];
@@ -2750,11 +3088,11 @@ function Sidebar({
2750
3088
  }) {
2751
3089
  const tokens = useTokens();
2752
3090
  const frameCtx = useFrameContext();
2753
- const styles = React16.useMemo(
3091
+ const styles3 = React19.useMemo(
2754
3092
  () => getSidebarStyles({ tokens, width, bordered, theme: frameCtx?.theme, appearance: frameCtx?.appearance }),
2755
3093
  [tokens, width, bordered, frameCtx?.theme, frameCtx?.appearance]
2756
3094
  );
2757
- return /* @__PURE__ */ React16.createElement(View, { style: styles.container }, header && /* @__PURE__ */ React16.createElement(View, { style: styles.header }, header), /* @__PURE__ */ React16.createElement(ScrollView, { style: styles.body }, children), footer && /* @__PURE__ */ React16.createElement(View, { style: styles.footer }, footer));
3095
+ return /* @__PURE__ */ React19.createElement(View, { style: styles3.container }, header && /* @__PURE__ */ React19.createElement(View, { style: styles3.header }, header), /* @__PURE__ */ React19.createElement(ScrollView, { style: styles3.body }, children), footer && /* @__PURE__ */ React19.createElement(View, { style: styles3.footer }, footer));
2758
3096
  }
2759
3097
  function getNavbarStyles({ tokens, height, bordered, theme = "primary", appearance = "main" }) {
2760
3098
  const at = tokens.colors[theme][appearance];
@@ -2794,15 +3132,15 @@ function Navbar({
2794
3132
  }) {
2795
3133
  const tokens = useTokens();
2796
3134
  const frameCtx = useFrameContext();
2797
- const styles = React16.useMemo(
3135
+ const styles3 = React19.useMemo(
2798
3136
  () => getNavbarStyles({ tokens, height, bordered, theme: frameCtx?.theme, appearance: frameCtx?.appearance }),
2799
3137
  [tokens, height, bordered, frameCtx?.theme, frameCtx?.appearance]
2800
3138
  );
2801
- return /* @__PURE__ */ React16.createElement(View, { style: styles.container }, children ? children : /* @__PURE__ */ React16.createElement(React16.Fragment, null, /* @__PURE__ */ React16.createElement(View, { style: styles.left }, left), /* @__PURE__ */ React16.createElement(View, { style: styles.right }, right)));
3139
+ return /* @__PURE__ */ React19.createElement(View, { style: styles3.container }, children ? children : /* @__PURE__ */ React19.createElement(React19.Fragment, null, /* @__PURE__ */ React19.createElement(View, { style: styles3.left }, left), /* @__PURE__ */ React19.createElement(View, { style: styles3.right }, right)));
2802
3140
  }
2803
3141
  function LogoMonogram({ colorValue = 0, size = 32 }) {
2804
3142
  const fg = `rgb(${colorValue}, ${colorValue}, ${colorValue})`;
2805
- return /* @__PURE__ */ React16.createElement(
3143
+ return /* @__PURE__ */ React19.createElement(
2806
3144
  "svg",
2807
3145
  {
2808
3146
  width: size,
@@ -2811,15 +3149,15 @@ function LogoMonogram({ colorValue = 0, size = 32 }) {
2811
3149
  fill: "none",
2812
3150
  xmlns: "http://www.w3.org/2000/svg"
2813
3151
  },
2814
- /* @__PURE__ */ React16.createElement("path", { d: "M39.3574 70H12L20 84H36L30.2681 94.0309C28.8627 96.4903 28.8627 99.5096 30.2681 101.969L36 112L49.7319 87.9691C51.1373 85.5097 51.1373 82.4903 49.7319 80.0309L46.3034 74.0309C44.879 71.5383 42.2283 70 39.3574 70Z", fill: fg }),
2815
- /* @__PURE__ */ React16.createElement("path", { d: "M84 112H36L41.6966 121.969C43.121 124.462 45.7717 126 48.6426 126H79.3574C82.2283 126 84.879 124.462 86.3034 121.969L93.7319 108.969C95.1373 106.51 95.1373 103.49 93.7319 101.031L84 84L76 98L84 112Z", fill: fg }),
2816
- /* @__PURE__ */ React16.createElement("path", { d: "M76 70L84 84H64.6426C61.7717 84 59.121 82.4617 57.6966 79.9691L50.268 66.9691C48.8626 64.5097 48.8626 61.4903 50.268 59.0309L65.6966 32.0309C67.121 29.5383 69.7717 28 72.6426 28H84L60 70H76Z", fill: fg }),
2817
- /* @__PURE__ */ React16.createElement("path", { d: "M95.3574 28H84L132 112L137.732 101.969C139.137 99.5097 139.137 96.4903 137.732 94.0309L102.303 32.0309C100.879 29.5383 98.2283 28 95.3574 28Z", fill: fg }),
2818
- /* @__PURE__ */ React16.createElement("path", { d: "M104.643 112H132L126.303 121.969C124.879 124.462 122.228 126 119.357 126H108L116 140L108 154L94.268 129.969C92.8626 127.51 92.8626 124.49 94.268 122.031L97.6966 116.031C99.121 113.538 101.772 112 104.643 112Z", fill: fg })
3152
+ /* @__PURE__ */ React19.createElement("path", { d: "M39.3574 70H12L20 84H36L30.2681 94.0309C28.8627 96.4903 28.8627 99.5096 30.2681 101.969L36 112L49.7319 87.9691C51.1373 85.5097 51.1373 82.4903 49.7319 80.0309L46.3034 74.0309C44.879 71.5383 42.2283 70 39.3574 70Z", fill: fg }),
3153
+ /* @__PURE__ */ React19.createElement("path", { d: "M84 112H36L41.6966 121.969C43.121 124.462 45.7717 126 48.6426 126H79.3574C82.2283 126 84.879 124.462 86.3034 121.969L93.7319 108.969C95.1373 106.51 95.1373 103.49 93.7319 101.031L84 84L76 98L84 112Z", fill: fg }),
3154
+ /* @__PURE__ */ React19.createElement("path", { d: "M76 70L84 84H64.6426C61.7717 84 59.121 82.4617 57.6966 79.9691L50.268 66.9691C48.8626 64.5097 48.8626 61.4903 50.268 59.0309L65.6966 32.0309C67.121 29.5383 69.7717 28 72.6426 28H84L60 70H76Z", fill: fg }),
3155
+ /* @__PURE__ */ React19.createElement("path", { d: "M95.3574 28H84L132 112L137.732 101.969C139.137 99.5097 139.137 96.4903 137.732 94.0309L102.303 32.0309C100.879 29.5383 98.2283 28 95.3574 28Z", fill: fg }),
3156
+ /* @__PURE__ */ React19.createElement("path", { d: "M104.643 112H132L126.303 121.969C124.879 124.462 122.228 126 119.357 126H108L116 140L108 154L94.268 129.969C92.8626 127.51 92.8626 124.49 94.268 122.031L97.6966 116.031C99.121 113.538 101.772 112 104.643 112Z", fill: fg })
2819
3157
  );
2820
3158
  }
2821
3159
  function LogoWordmark({ fill = "black" }) {
2822
- return /* @__PURE__ */ React16.createElement(
3160
+ return /* @__PURE__ */ React19.createElement(
2823
3161
  "svg",
2824
3162
  {
2825
3163
  height: 32,
@@ -2827,16 +3165,16 @@ function LogoWordmark({ fill = "black" }) {
2827
3165
  fill: "none",
2828
3166
  xmlns: "http://www.w3.org/2000/svg"
2829
3167
  },
2830
- /* @__PURE__ */ React16.createElement("path", { d: "M8 126H22V42H14.4C12.1598 42 11.0397 42 10.184 42.436C9.43139 42.8195 8.81947 43.4314 8.43597 44.184C8 45.0397 8 46.1598 8 48.4V126Z", fill }),
2831
- /* @__PURE__ */ React16.createElement("path", { d: "M76 108.5V42H90V119.6C90 121.84 90 122.96 89.564 123.816C89.1805 124.569 88.5686 125.181 87.816 125.564C86.9603 126 85.8402 126 83.6 126H77.4281C74.7227 126 73.37 126 72.1603 125.605C71.0899 125.256 70.1054 124.684 69.271 123.928C68.328 123.074 67.6569 121.9 66.3146 119.551L22 42H30.5719C33.2773 42 34.63 42 35.8397 42.3949C36.9101 42.7442 37.8946 43.3156 38.729 44.0716C39.672 44.926 40.3431 46.1005 41.6854 48.4494L76 108.5Z", fill }),
2832
- /* @__PURE__ */ React16.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M152.208 68.2077C153.395 69.3951 153.989 69.9888 154.439 70.6738C154.838 71.2814 155.152 71.9406 155.374 72.6332C155.623 73.4139 155.711 74.2489 155.886 75.9189L156.884 85.3951C157.27 89.0678 157.464 90.9042 156.867 92.3245C156.343 93.5721 155.412 94.6057 154.226 95.2577C152.876 96 151.03 96 147.337 96H112V114H154V126H115.302C113.345 126 112.367 126 111.446 125.779C110.63 125.583 109.849 125.26 109.134 124.821C108.326 124.326 107.635 123.635 106.251 122.251L101.749 117.749C100.365 116.365 99.6736 115.674 99.1789 114.866C98.7402 114.151 98.417 113.37 98.221 112.554C98 111.633 98 110.655 98 108.698V75.3019C98 73.3452 98 72.3668 98.221 71.4461C98.417 70.6299 98.7402 69.8495 99.1789 69.1337C99.6736 68.3264 100.365 67.6346 101.749 66.251L106.251 61.749C107.635 60.3654 108.326 59.6736 109.134 59.1789C109.849 58.7402 110.63 58.417 111.446 58.221C112.367 58 113.345 58 115.302 58H136.698C138.655 58 139.633 58 140.554 58.221C141.37 58.417 142.151 58.7402 142.866 59.1789C143.674 59.6736 144.365 60.3654 145.749 61.749L152.208 68.2077ZM112 70V87.5332L144.492 86.4502L141.895 70H112Z", fill }),
2833
- /* @__PURE__ */ React16.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M492.208 68.2077C493.395 69.3951 493.989 69.9888 494.439 70.6738C494.838 71.2814 495.152 71.9406 495.374 72.6332C495.623 73.4139 495.711 74.2489 495.886 75.9189L496.884 85.3951C497.27 89.0678 497.464 90.9042 496.867 92.3245C496.343 93.5721 495.412 94.6057 494.226 95.2577C492.876 96 491.03 96 487.337 96H452V114H494V126H455.302C453.345 126 452.367 126 451.446 125.779C450.63 125.583 449.849 125.26 449.134 124.821C448.326 124.326 447.635 123.635 446.251 122.251L441.749 117.749C440.365 116.365 439.674 115.674 439.179 114.866C438.74 114.151 438.417 113.37 438.221 112.554C438 111.633 438 110.655 438 108.698V75.3019C438 73.3452 438 72.3668 438.221 71.4461C438.417 70.6299 438.74 69.8495 439.179 69.1337C439.674 68.3264 440.365 67.6346 441.749 66.251L446.251 61.749C447.635 60.3654 448.326 59.6736 449.134 59.1789C449.849 58.7402 450.63 58.417 451.446 58.221C452.367 58 453.345 58 455.302 58H476.698C478.655 58 479.633 58 480.554 58.221C481.37 58.417 482.151 58.7402 482.866 59.1789C483.674 59.6736 484.365 60.3654 485.749 61.749L492.208 68.2077ZM452 70V87.5332L484.492 86.4502L481.895 70H452Z", fill }),
2834
- /* @__PURE__ */ React16.createElement("path", { d: "M168.794 117.797L160 58H174L184 126H178.291C175.35 126 173.88 126 172.695 125.46C171.651 124.984 170.765 124.219 170.142 123.255C169.435 122.161 169.222 120.706 168.794 117.797Z", fill }),
2835
- /* @__PURE__ */ React16.createElement("path", { d: "M192.794 66.2033L184 126H187.674C190.626 126 192.102 126 193.29 125.457C194.337 124.979 195.224 124.209 195.846 123.241C196.551 122.141 196.76 120.68 197.177 117.758L204 70L210.823 117.758C211.24 120.68 211.449 122.141 212.154 123.241C212.776 124.209 213.663 124.979 214.71 125.457C215.898 126 217.374 126 220.326 126H224L215.206 66.2033C214.778 63.2936 214.565 61.8387 213.858 60.7448C213.235 59.7808 212.349 59.0155 211.305 58.5398C210.12 58 208.65 58 205.709 58H202.291C199.35 58 197.88 58 196.695 58.5398C195.651 59.0155 194.765 59.7808 194.142 60.7448C193.435 61.8387 193.222 63.2936 192.794 66.2033Z", fill }),
2836
- /* @__PURE__ */ React16.createElement("path", { d: "M224 126H229.709C232.65 126 234.12 126 235.305 125.46C236.349 124.984 237.235 124.219 237.858 123.255C238.565 122.161 238.778 120.706 239.206 117.797L246.235 70H298V58H251.302C249.345 58 248.367 58 247.446 58.221C246.63 58.417 245.849 58.7402 245.134 59.1789C244.326 59.6736 243.635 60.3654 242.251 61.749L234.927 69.0727C233.815 70.1845 233.26 70.7405 232.829 71.3785C232.447 71.9446 232.139 72.5573 231.913 73.2016C231.658 73.9277 231.543 74.7056 231.315 76.2613L224 126Z", fill }),
2837
- /* @__PURE__ */ React16.createElement("path", { d: "M264.251 122.251L259.749 117.749C258.365 116.365 257.674 115.674 257.179 114.866C256.74 114.151 256.417 113.37 256.221 112.554C256 111.633 256 110.655 256 108.698V69.2L260 42H270V114H298V126H273.302C271.345 126 270.367 126 269.446 125.779C268.63 125.583 267.849 125.26 267.134 124.821C266.326 124.326 265.635 123.635 264.251 122.251Z", fill }),
2838
- /* @__PURE__ */ React16.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M358.251 66.251C359.635 67.6346 360.326 68.3264 360.821 69.1337C361.26 69.8495 361.583 70.6299 361.779 71.4461C362 72.3668 362 73.3452 362 75.3019V108.698C362 110.655 362 111.633 361.779 112.554C361.583 113.37 361.26 114.151 360.821 114.866C360.326 115.674 359.635 116.365 358.251 117.749L353.749 122.251C352.365 123.635 351.674 124.326 350.866 124.821C350.151 125.26 349.37 125.583 348.554 125.779C347.633 126 346.655 126 344.698 126H319.302C317.345 126 316.367 126 315.446 125.779C314.63 125.583 313.849 125.26 313.134 124.821C312.326 124.326 311.635 123.635 310.251 122.251L305.749 117.749C304.365 116.365 303.674 115.674 303.179 114.866C302.74 114.151 302.417 113.37 302.221 112.554C302 111.633 302 110.655 302 108.698V75.3019C302 73.3452 302 72.3668 302.221 71.4461C302.417 70.6299 302.74 69.8495 303.179 69.1337C303.674 68.3264 304.365 67.6346 305.749 66.251L310.224 61.7757C311.606 60.3937 312.297 59.7027 313.104 59.2083C313.818 58.77 314.598 58.4468 315.413 58.2506C316.333 58.0292 317.31 58.0284 319.264 58.0267L344.692 58.0046C346.651 58.0029 347.63 58.0021 348.552 58.2228C349.369 58.4185 350.151 58.7417 350.867 59.1807C351.676 59.6757 352.368 60.3684 353.754 61.7536L358.251 66.251ZM316 70V114H348V70H316Z", fill }),
2839
- /* @__PURE__ */ React16.createElement("path", { d: "M370 64.4V126H384V70H416V126H430V75.3019C430 73.3452 430 72.3668 429.779 71.4461C429.583 70.6299 429.26 69.8495 428.821 69.1337C428.326 68.3264 427.635 67.6346 426.251 66.251L421.749 61.749C420.365 60.3654 419.674 59.6736 418.866 59.1789C418.151 58.7402 417.37 58.417 416.554 58.221C415.633 58 414.655 58 412.698 58H376.4C374.16 58 373.04 58 372.184 58.436C371.431 58.8195 370.819 59.4314 370.436 60.184C370 61.0397 370 62.1598 370 64.4Z", fill })
3168
+ /* @__PURE__ */ React19.createElement("path", { d: "M8 126H22V42H14.4C12.1598 42 11.0397 42 10.184 42.436C9.43139 42.8195 8.81947 43.4314 8.43597 44.184C8 45.0397 8 46.1598 8 48.4V126Z", fill }),
3169
+ /* @__PURE__ */ React19.createElement("path", { d: "M76 108.5V42H90V119.6C90 121.84 90 122.96 89.564 123.816C89.1805 124.569 88.5686 125.181 87.816 125.564C86.9603 126 85.8402 126 83.6 126H77.4281C74.7227 126 73.37 126 72.1603 125.605C71.0899 125.256 70.1054 124.684 69.271 123.928C68.328 123.074 67.6569 121.9 66.3146 119.551L22 42H30.5719C33.2773 42 34.63 42 35.8397 42.3949C36.9101 42.7442 37.8946 43.3156 38.729 44.0716C39.672 44.926 40.3431 46.1005 41.6854 48.4494L76 108.5Z", fill }),
3170
+ /* @__PURE__ */ React19.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M152.208 68.2077C153.395 69.3951 153.989 69.9888 154.439 70.6738C154.838 71.2814 155.152 71.9406 155.374 72.6332C155.623 73.4139 155.711 74.2489 155.886 75.9189L156.884 85.3951C157.27 89.0678 157.464 90.9042 156.867 92.3245C156.343 93.5721 155.412 94.6057 154.226 95.2577C152.876 96 151.03 96 147.337 96H112V114H154V126H115.302C113.345 126 112.367 126 111.446 125.779C110.63 125.583 109.849 125.26 109.134 124.821C108.326 124.326 107.635 123.635 106.251 122.251L101.749 117.749C100.365 116.365 99.6736 115.674 99.1789 114.866C98.7402 114.151 98.417 113.37 98.221 112.554C98 111.633 98 110.655 98 108.698V75.3019C98 73.3452 98 72.3668 98.221 71.4461C98.417 70.6299 98.7402 69.8495 99.1789 69.1337C99.6736 68.3264 100.365 67.6346 101.749 66.251L106.251 61.749C107.635 60.3654 108.326 59.6736 109.134 59.1789C109.849 58.7402 110.63 58.417 111.446 58.221C112.367 58 113.345 58 115.302 58H136.698C138.655 58 139.633 58 140.554 58.221C141.37 58.417 142.151 58.7402 142.866 59.1789C143.674 59.6736 144.365 60.3654 145.749 61.749L152.208 68.2077ZM112 70V87.5332L144.492 86.4502L141.895 70H112Z", fill }),
3171
+ /* @__PURE__ */ React19.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M492.208 68.2077C493.395 69.3951 493.989 69.9888 494.439 70.6738C494.838 71.2814 495.152 71.9406 495.374 72.6332C495.623 73.4139 495.711 74.2489 495.886 75.9189L496.884 85.3951C497.27 89.0678 497.464 90.9042 496.867 92.3245C496.343 93.5721 495.412 94.6057 494.226 95.2577C492.876 96 491.03 96 487.337 96H452V114H494V126H455.302C453.345 126 452.367 126 451.446 125.779C450.63 125.583 449.849 125.26 449.134 124.821C448.326 124.326 447.635 123.635 446.251 122.251L441.749 117.749C440.365 116.365 439.674 115.674 439.179 114.866C438.74 114.151 438.417 113.37 438.221 112.554C438 111.633 438 110.655 438 108.698V75.3019C438 73.3452 438 72.3668 438.221 71.4461C438.417 70.6299 438.74 69.8495 439.179 69.1337C439.674 68.3264 440.365 67.6346 441.749 66.251L446.251 61.749C447.635 60.3654 448.326 59.6736 449.134 59.1789C449.849 58.7402 450.63 58.417 451.446 58.221C452.367 58 453.345 58 455.302 58H476.698C478.655 58 479.633 58 480.554 58.221C481.37 58.417 482.151 58.7402 482.866 59.1789C483.674 59.6736 484.365 60.3654 485.749 61.749L492.208 68.2077ZM452 70V87.5332L484.492 86.4502L481.895 70H452Z", fill }),
3172
+ /* @__PURE__ */ React19.createElement("path", { d: "M168.794 117.797L160 58H174L184 126H178.291C175.35 126 173.88 126 172.695 125.46C171.651 124.984 170.765 124.219 170.142 123.255C169.435 122.161 169.222 120.706 168.794 117.797Z", fill }),
3173
+ /* @__PURE__ */ React19.createElement("path", { d: "M192.794 66.2033L184 126H187.674C190.626 126 192.102 126 193.29 125.457C194.337 124.979 195.224 124.209 195.846 123.241C196.551 122.141 196.76 120.68 197.177 117.758L204 70L210.823 117.758C211.24 120.68 211.449 122.141 212.154 123.241C212.776 124.209 213.663 124.979 214.71 125.457C215.898 126 217.374 126 220.326 126H224L215.206 66.2033C214.778 63.2936 214.565 61.8387 213.858 60.7448C213.235 59.7808 212.349 59.0155 211.305 58.5398C210.12 58 208.65 58 205.709 58H202.291C199.35 58 197.88 58 196.695 58.5398C195.651 59.0155 194.765 59.7808 194.142 60.7448C193.435 61.8387 193.222 63.2936 192.794 66.2033Z", fill }),
3174
+ /* @__PURE__ */ React19.createElement("path", { d: "M224 126H229.709C232.65 126 234.12 126 235.305 125.46C236.349 124.984 237.235 124.219 237.858 123.255C238.565 122.161 238.778 120.706 239.206 117.797L246.235 70H298V58H251.302C249.345 58 248.367 58 247.446 58.221C246.63 58.417 245.849 58.7402 245.134 59.1789C244.326 59.6736 243.635 60.3654 242.251 61.749L234.927 69.0727C233.815 70.1845 233.26 70.7405 232.829 71.3785C232.447 71.9446 232.139 72.5573 231.913 73.2016C231.658 73.9277 231.543 74.7056 231.315 76.2613L224 126Z", fill }),
3175
+ /* @__PURE__ */ React19.createElement("path", { d: "M264.251 122.251L259.749 117.749C258.365 116.365 257.674 115.674 257.179 114.866C256.74 114.151 256.417 113.37 256.221 112.554C256 111.633 256 110.655 256 108.698V69.2L260 42H270V114H298V126H273.302C271.345 126 270.367 126 269.446 125.779C268.63 125.583 267.849 125.26 267.134 124.821C266.326 124.326 265.635 123.635 264.251 122.251Z", fill }),
3176
+ /* @__PURE__ */ React19.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M358.251 66.251C359.635 67.6346 360.326 68.3264 360.821 69.1337C361.26 69.8495 361.583 70.6299 361.779 71.4461C362 72.3668 362 73.3452 362 75.3019V108.698C362 110.655 362 111.633 361.779 112.554C361.583 113.37 361.26 114.151 360.821 114.866C360.326 115.674 359.635 116.365 358.251 117.749L353.749 122.251C352.365 123.635 351.674 124.326 350.866 124.821C350.151 125.26 349.37 125.583 348.554 125.779C347.633 126 346.655 126 344.698 126H319.302C317.345 126 316.367 126 315.446 125.779C314.63 125.583 313.849 125.26 313.134 124.821C312.326 124.326 311.635 123.635 310.251 122.251L305.749 117.749C304.365 116.365 303.674 115.674 303.179 114.866C302.74 114.151 302.417 113.37 302.221 112.554C302 111.633 302 110.655 302 108.698V75.3019C302 73.3452 302 72.3668 302.221 71.4461C302.417 70.6299 302.74 69.8495 303.179 69.1337C303.674 68.3264 304.365 67.6346 305.749 66.251L310.224 61.7757C311.606 60.3937 312.297 59.7027 313.104 59.2083C313.818 58.77 314.598 58.4468 315.413 58.2506C316.333 58.0292 317.31 58.0284 319.264 58.0267L344.692 58.0046C346.651 58.0029 347.63 58.0021 348.552 58.2228C349.369 58.4185 350.151 58.7417 350.867 59.1807C351.676 59.6757 352.368 60.3684 353.754 61.7536L358.251 66.251ZM316 70V114H348V70H316Z", fill }),
3177
+ /* @__PURE__ */ React19.createElement("path", { d: "M370 64.4V126H384V70H416V126H430V75.3019C430 73.3452 430 72.3668 429.779 71.4461C429.583 70.6299 429.26 69.8495 428.821 69.1337C428.326 68.3264 427.635 67.6346 426.251 66.251L421.749 61.749C420.365 60.3654 419.674 59.6736 418.866 59.1789C418.151 58.7402 417.37 58.417 416.554 58.221C415.633 58 414.655 58 412.698 58H376.4C374.16 58 373.04 58 372.184 58.436C371.431 58.8195 370.819 59.4314 370.436 60.184C370 61.0397 370 62.1598 370 64.4Z", fill })
2840
3178
  );
2841
3179
  }
2842
3180
 
@@ -3769,6 +4107,6 @@ var ICON_CATALOG = [
3769
4107
  }
3770
4108
  ];
3771
4109
 
3772
- export { AppShell, Button, CATEGORIES, COMPONENTS, Card, Chip, ColorScaleSlider, ContentCard, Divider, Frame, HueSlider, ICON_CATALOG, Icon, LogoMonogram, LogoWordmark, Navbar, Popover, Select, Sidebar, Slider, Text3 as Text, TextInput, Toggle, Wrapper, generateComponentCode, getCategory, getComponent, getComponentsByCategory, isOptionGroup, useFocusVisible, usePopover };
4110
+ export { AppShell, Button, CATEGORIES, COMPONENTS, Card, Chip, ColorScaleSlider, ContentCard, Divider, Frame, HueSlider, ICON_CATALOG, Icon, LogoMonogram, LogoWordmark, Navbar, Page, Popover, Section, Select, Sidebar, Slider, Text3 as Text, TextInput, Toggle, Viewport, Wrapper, generateComponentCode, getCategory, getComponent, getComponentsByCategory, isOptionGroup, useFocusVisible, usePopover };
3773
4111
  //# sourceMappingURL=index.js.map
3774
4112
  //# sourceMappingURL=index.js.map