@newtonedev/components 0.1.13 → 0.1.15

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 (173) hide show
  1. package/dist/composites/actions/Button/Button.d.ts +17 -20
  2. package/dist/composites/actions/Button/Button.d.ts.map +1 -1
  3. package/dist/composites/actions/Button/Button.styles.d.ts +12 -24
  4. package/dist/composites/actions/Button/Button.styles.d.ts.map +1 -1
  5. package/dist/composites/actions/Button/Button.types.d.ts +14 -13
  6. package/dist/composites/actions/Button/Button.types.d.ts.map +1 -1
  7. package/dist/composites/actions/Button/index.d.ts +1 -1
  8. package/dist/composites/actions/Button/index.d.ts.map +1 -1
  9. package/dist/composites/branding/LogoMonogram/LogoMonogram.d.ts +10 -0
  10. package/dist/composites/branding/LogoMonogram/LogoMonogram.d.ts.map +1 -0
  11. package/dist/composites/branding/LogoMonogram/LogoMonogram.types.d.ts +35 -0
  12. package/dist/composites/branding/LogoMonogram/LogoMonogram.types.d.ts.map +1 -0
  13. package/dist/composites/branding/LogoMonogram/index.d.ts +3 -0
  14. package/dist/composites/branding/LogoMonogram/index.d.ts.map +1 -0
  15. package/dist/composites/branding/LogoWordmark/LogoWordmark.d.ts +9 -0
  16. package/dist/composites/branding/LogoWordmark/LogoWordmark.d.ts.map +1 -0
  17. package/dist/composites/branding/LogoWordmark/LogoWordmark.types.d.ts +26 -0
  18. package/dist/composites/branding/LogoWordmark/LogoWordmark.types.d.ts.map +1 -0
  19. package/dist/composites/branding/LogoWordmark/index.d.ts +3 -0
  20. package/dist/composites/branding/LogoWordmark/index.d.ts.map +1 -0
  21. package/dist/composites/display/Chip/Chip.d.ts +25 -0
  22. package/dist/composites/display/Chip/Chip.d.ts.map +1 -0
  23. package/dist/composites/display/Chip/Chip.styles.d.ts +29 -0
  24. package/dist/composites/display/Chip/Chip.styles.d.ts.map +1 -0
  25. package/dist/composites/display/Chip/Chip.types.d.ts +63 -0
  26. package/dist/composites/display/Chip/Chip.types.d.ts.map +1 -0
  27. package/dist/composites/display/Chip/index.d.ts +3 -0
  28. package/dist/composites/display/Chip/index.d.ts.map +1 -0
  29. package/dist/composites/form-controls/Select/Select.d.ts.map +1 -1
  30. package/dist/composites/form-controls/Select/Select.styles.d.ts +2 -2
  31. package/dist/composites/form-controls/Select/Select.styles.d.ts.map +1 -1
  32. package/dist/composites/form-controls/Select/SelectOption.d.ts.map +1 -1
  33. package/dist/composites/form-controls/TextInput/TextInput.d.ts.map +1 -1
  34. package/dist/composites/form-controls/TextInput/TextInput.styles.d.ts +2 -2
  35. package/dist/composites/form-controls/TextInput/TextInput.styles.d.ts.map +1 -1
  36. package/dist/composites/form-controls/Toggle/Toggle.d.ts.map +1 -1
  37. package/dist/composites/form-controls/Toggle/Toggle.styles.d.ts +2 -2
  38. package/dist/composites/form-controls/Toggle/Toggle.styles.d.ts.map +1 -1
  39. package/dist/composites/layout/AppShell/AppShell.d.ts.map +1 -1
  40. package/dist/composites/layout/AppShell/AppShell.styles.d.ts +2 -2
  41. package/dist/composites/layout/AppShell/AppShell.styles.d.ts.map +1 -1
  42. package/dist/composites/layout/Card/Card.d.ts.map +1 -1
  43. package/dist/composites/layout/Card/Card.styles.d.ts +2 -2
  44. package/dist/composites/layout/Card/Card.styles.d.ts.map +1 -1
  45. package/dist/composites/layout/ContentCard/ContentCard.d.ts +33 -0
  46. package/dist/composites/layout/ContentCard/ContentCard.d.ts.map +1 -0
  47. package/dist/composites/layout/ContentCard/ContentCard.styles.d.ts +10 -0
  48. package/dist/composites/layout/ContentCard/ContentCard.styles.d.ts.map +1 -0
  49. package/dist/composites/layout/ContentCard/ContentCard.types.d.ts +52 -0
  50. package/dist/composites/layout/ContentCard/ContentCard.types.d.ts.map +1 -0
  51. package/dist/composites/layout/ContentCard/index.d.ts +3 -0
  52. package/dist/composites/layout/ContentCard/index.d.ts.map +1 -0
  53. package/dist/composites/layout/Divider/Divider.d.ts +25 -0
  54. package/dist/composites/layout/Divider/Divider.d.ts.map +1 -0
  55. package/dist/composites/layout/Divider/Divider.styles.d.ts +8 -0
  56. package/dist/composites/layout/Divider/Divider.styles.d.ts.map +1 -0
  57. package/dist/composites/layout/Divider/Divider.types.d.ts +25 -0
  58. package/dist/composites/layout/Divider/Divider.types.d.ts.map +1 -0
  59. package/dist/composites/layout/Divider/index.d.ts +3 -0
  60. package/dist/composites/layout/Divider/index.d.ts.map +1 -0
  61. package/dist/composites/layout/Navbar/Navbar.d.ts.map +1 -1
  62. package/dist/composites/layout/Navbar/Navbar.styles.d.ts +4 -3
  63. package/dist/composites/layout/Navbar/Navbar.styles.d.ts.map +1 -1
  64. package/dist/composites/layout/Sidebar/Sidebar.d.ts.map +1 -1
  65. package/dist/composites/layout/Sidebar/Sidebar.styles.d.ts +4 -3
  66. package/dist/composites/layout/Sidebar/Sidebar.styles.d.ts.map +1 -1
  67. package/dist/composites/overlays/Popover/Popover.d.ts.map +1 -1
  68. package/dist/composites/overlays/Popover/Popover.styles.d.ts +2 -2
  69. package/dist/composites/overlays/Popover/Popover.styles.d.ts.map +1 -1
  70. package/dist/composites/range-inputs/ColorScaleSlider/ColorScaleSlider.d.ts.map +1 -1
  71. package/dist/composites/range-inputs/ColorScaleSlider/ColorScaleSlider.styles.d.ts +2 -2
  72. package/dist/composites/range-inputs/ColorScaleSlider/ColorScaleSlider.styles.d.ts.map +1 -1
  73. package/dist/composites/range-inputs/HueSlider/HueSlider.styles.d.ts +2 -2
  74. package/dist/composites/range-inputs/HueSlider/HueSlider.styles.d.ts.map +1 -1
  75. package/dist/composites/range-inputs/Slider/Slider.styles.d.ts +2 -2
  76. package/dist/composites/range-inputs/Slider/Slider.styles.d.ts.map +1 -1
  77. package/dist/index.cjs +935 -523
  78. package/dist/index.cjs.map +1 -1
  79. package/dist/index.d.ts +13 -3
  80. package/dist/index.d.ts.map +1 -1
  81. package/dist/index.js +860 -473
  82. package/dist/index.js.map +1 -1
  83. package/dist/primitives/Frame/Frame.d.ts +1 -35
  84. package/dist/primitives/Frame/Frame.d.ts.map +1 -1
  85. package/dist/primitives/Frame/Frame.styles.d.ts +13 -4
  86. package/dist/primitives/Frame/Frame.styles.d.ts.map +1 -1
  87. package/dist/primitives/Frame/Frame.types.d.ts +99 -1
  88. package/dist/primitives/Frame/Frame.types.d.ts.map +1 -1
  89. package/dist/primitives/Frame/index.d.ts +1 -1
  90. package/dist/primitives/Frame/index.d.ts.map +1 -1
  91. package/dist/primitives/Icon/Icon.d.ts.map +1 -1
  92. package/dist/primitives/Icon/Icon.types.d.ts +2 -2
  93. package/dist/primitives/Icon/Icon.types.d.ts.map +1 -1
  94. package/dist/primitives/Text/Text.d.ts +5 -3
  95. package/dist/primitives/Text/Text.d.ts.map +1 -1
  96. package/dist/primitives/Text/Text.spans.d.ts.map +1 -1
  97. package/dist/primitives/Text/Text.types.d.ts +3 -6
  98. package/dist/primitives/Text/Text.types.d.ts.map +1 -1
  99. package/dist/primitives/Wrapper/Wrapper.d.ts +1 -1
  100. package/dist/primitives/Wrapper/Wrapper.d.ts.map +1 -1
  101. package/dist/primitives/Wrapper/Wrapper.styles.d.ts +9 -1
  102. package/dist/primitives/Wrapper/Wrapper.styles.d.ts.map +1 -1
  103. package/dist/primitives/Wrapper/Wrapper.types.d.ts +31 -1
  104. package/dist/primitives/Wrapper/Wrapper.types.d.ts.map +1 -1
  105. package/dist/registry/registry.d.ts.map +1 -1
  106. package/package.json +1 -1
  107. package/src/composites/actions/Button/Button.styles.ts +90 -182
  108. package/src/composites/actions/Button/Button.tsx +37 -33
  109. package/src/composites/actions/Button/Button.types.ts +16 -15
  110. package/src/composites/actions/Button/index.ts +1 -1
  111. package/src/composites/branding/LogoMonogram/LogoMonogram.tsx +29 -0
  112. package/src/composites/branding/LogoMonogram/LogoMonogram.types.ts +35 -0
  113. package/src/composites/branding/LogoMonogram/index.ts +2 -0
  114. package/src/composites/branding/LogoWordmark/LogoWordmark.tsx +29 -0
  115. package/src/composites/branding/LogoWordmark/LogoWordmark.types.ts +25 -0
  116. package/src/composites/branding/LogoWordmark/index.ts +2 -0
  117. package/src/composites/display/Chip/Chip.styles.ts +189 -0
  118. package/src/composites/display/Chip/Chip.tsx +97 -0
  119. package/src/composites/display/Chip/Chip.types.ts +74 -0
  120. package/src/composites/display/Chip/index.ts +2 -0
  121. package/src/composites/form-controls/Select/Select.styles.ts +10 -10
  122. package/src/composites/form-controls/Select/Select.tsx +9 -6
  123. package/src/composites/form-controls/Select/SelectOption.tsx +10 -7
  124. package/src/composites/form-controls/TextInput/TextInput.styles.ts +12 -8
  125. package/src/composites/form-controls/TextInput/TextInput.tsx +7 -4
  126. package/src/composites/form-controls/Toggle/Toggle.styles.ts +10 -7
  127. package/src/composites/form-controls/Toggle/Toggle.tsx +4 -3
  128. package/src/composites/layout/AppShell/AppShell.styles.ts +8 -3
  129. package/src/composites/layout/AppShell/AppShell.tsx +6 -2
  130. package/src/composites/layout/Card/Card.styles.ts +10 -4
  131. package/src/composites/layout/Card/Card.tsx +4 -3
  132. package/src/composites/layout/ContentCard/ContentCard.styles.ts +44 -0
  133. package/src/composites/layout/ContentCard/ContentCard.tsx +71 -0
  134. package/src/composites/layout/ContentCard/ContentCard.types.ts +60 -0
  135. package/src/composites/layout/ContentCard/index.ts +2 -0
  136. package/src/composites/layout/Divider/Divider.styles.ts +30 -0
  137. package/src/composites/layout/Divider/Divider.tsx +46 -0
  138. package/src/composites/layout/Divider/Divider.types.ts +28 -0
  139. package/src/composites/layout/Divider/index.ts +2 -0
  140. package/src/composites/layout/Navbar/Navbar.styles.ts +7 -5
  141. package/src/composites/layout/Navbar/Navbar.tsx +4 -3
  142. package/src/composites/layout/Sidebar/Sidebar.styles.ts +7 -5
  143. package/src/composites/layout/Sidebar/Sidebar.tsx +4 -3
  144. package/src/composites/overlays/Popover/Popover.styles.ts +7 -5
  145. package/src/composites/overlays/Popover/Popover.tsx +4 -3
  146. package/src/composites/range-inputs/ColorScaleSlider/ColorScaleSlider.styles.ts +5 -5
  147. package/src/composites/range-inputs/ColorScaleSlider/ColorScaleSlider.tsx +4 -3
  148. package/src/composites/range-inputs/HueSlider/HueSlider.styles.ts +7 -7
  149. package/src/composites/range-inputs/HueSlider/HueSlider.tsx +1 -1
  150. package/src/composites/range-inputs/Slider/Slider.styles.ts +9 -9
  151. package/src/composites/range-inputs/Slider/Slider.tsx +1 -1
  152. package/src/index.ts +49 -10
  153. package/src/primitives/Frame/Frame.styles.ts +55 -12
  154. package/src/primitives/Frame/Frame.tsx +139 -140
  155. package/src/primitives/Frame/Frame.types.ts +119 -1
  156. package/src/primitives/Frame/index.ts +4 -0
  157. package/src/primitives/Icon/Icon.tsx +9 -6
  158. package/src/primitives/Icon/Icon.types.ts +2 -2
  159. package/src/primitives/Text/Text.spans.ts +9 -5
  160. package/src/primitives/Text/Text.tsx +26 -15
  161. package/src/primitives/Text/Text.types.ts +3 -6
  162. package/src/primitives/Wrapper/Wrapper.styles.ts +32 -0
  163. package/src/primitives/Wrapper/Wrapper.tsx +22 -3
  164. package/src/primitives/Wrapper/Wrapper.types.ts +45 -0
  165. package/src/registry/registry.ts +5 -21
  166. package/dist/_COMPONENT_TEMPLATE/ComponentName.d.ts +0 -70
  167. package/dist/_COMPONENT_TEMPLATE/ComponentName.d.ts.map +0 -1
  168. package/dist/_COMPONENT_TEMPLATE/ComponentName.styles.d.ts +0 -23
  169. package/dist/_COMPONENT_TEMPLATE/ComponentName.styles.d.ts.map +0 -1
  170. package/dist/_COMPONENT_TEMPLATE/ComponentName.types.d.ts +0 -45
  171. package/dist/_COMPONENT_TEMPLATE/ComponentName.types.d.ts.map +0 -1
  172. package/dist/_COMPONENT_TEMPLATE/index.d.ts +0 -3
  173. package/dist/_COMPONENT_TEMPLATE/index.d.ts.map +0 -1
@@ -0,0 +1,29 @@
1
+ import React from 'react';
2
+ import type { LogoWordmarkProps } from './LogoWordmark.types';
3
+
4
+ /**
5
+ * Newtone wordmark — the full "NEWTONE" text rendered as an SVG.
6
+ *
7
+ * Fixed height of 32px with proportional width derived from the viewBox.
8
+ */
9
+ export function LogoWordmark({ fill = 'black' }: LogoWordmarkProps) {
10
+ return (
11
+ <svg
12
+ height={32}
13
+ viewBox="0 0 504 168"
14
+ fill="none"
15
+ xmlns="http://www.w3.org/2000/svg"
16
+ >
17
+ <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={fill} />
18
+ <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={fill} />
19
+ <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={fill} />
20
+ <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={fill} />
21
+ <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={fill} />
22
+ <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={fill} />
23
+ <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={fill} />
24
+ <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={fill} />
25
+ <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={fill} />
26
+ <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={fill} />
27
+ </svg>
28
+ );
29
+ }
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Props for LogoWordmark — the full "NEWTONE" text logo.
3
+ *
4
+ * Renders an SVG wordmark at a fixed 32px height with configurable fill color.
5
+ *
6
+ * @example
7
+ * ```tsx
8
+ * <LogoWordmark />
9
+ * ```
10
+ *
11
+ * @example
12
+ * ```tsx
13
+ * <LogoWordmark fill="white" />
14
+ * ```
15
+ */
16
+ export interface LogoWordmarkProps {
17
+ /**
18
+ * Fill color for the wordmark paths.
19
+ *
20
+ * Accepts any valid CSS color string (hex, rgb, named color).
21
+ *
22
+ * @default "black"
23
+ */
24
+ readonly fill?: string;
25
+ }
@@ -0,0 +1,2 @@
1
+ export { LogoWordmark } from './LogoWordmark';
2
+ export type { LogoWordmarkProps } from './LogoWordmark.types';
@@ -0,0 +1,189 @@
1
+ import type { UseTokensResult } from 'newtone-api';
2
+ import type { ChipVariant, ChipSemantic, ChipSize } from './Chip.types';
3
+ import type { TextRole } from '../../../primitives/Text';
4
+
5
+ /**
6
+ * Configuration returned by getChipConfig
7
+ */
8
+ export interface ChipConfig {
9
+ colors: {
10
+ bg: string;
11
+ hoveredBg: string;
12
+ pressedBg: string;
13
+ textColor: string;
14
+ iconColor: string;
15
+ borderWidth: number;
16
+ borderColor: string;
17
+ };
18
+ sizeTokens: {
19
+ paddingX: number;
20
+ paddingY: number;
21
+ gap: number;
22
+ textRole: TextRole;
23
+ iconSize: number;
24
+ };
25
+ }
26
+
27
+ /**
28
+ * Map chip semantic to theme name.
29
+ * 'accent' maps to 'primary'; others map directly.
30
+ */
31
+ function semanticToTheme(semantic: ChipSemantic): 'primary' | 'success' | 'error' | 'warning' {
32
+ if (semantic === 'accent') return 'primary';
33
+ return semantic as 'success' | 'error' | 'warning';
34
+ }
35
+
36
+ /**
37
+ * Get size configuration for the chip.
38
+ */
39
+ function getSizeConfig(size: ChipSize): {
40
+ paddingX: number;
41
+ paddingY: number;
42
+ gap: number;
43
+ textRole: TextRole;
44
+ iconSize: number;
45
+ } {
46
+ if (size === 'sm') {
47
+ return { paddingX: 10, paddingY: 3, gap: 4, textRole: 'caption', iconSize: 16 };
48
+ }
49
+ return { paddingX: 16, paddingY: 8, gap: 6, textRole: 'label', iconSize: 20 };
50
+ }
51
+
52
+ /**
53
+ * Get variant colors for the chip.
54
+ */
55
+ function getVariantColors(
56
+ variant: ChipVariant,
57
+ semantic: ChipSemantic,
58
+ selected: boolean,
59
+ disabled: boolean,
60
+ tokens: UseTokensResult
61
+ ) {
62
+ // Selected state overrides to strong appearance
63
+ if (selected) {
64
+ if (semantic === 'neutral') {
65
+ return {
66
+ bg: tokens.colors.primary.strong.background,
67
+ hoveredBg: tokens.colors.primary.strong.fontPrimary,
68
+ pressedBg: tokens.colors.primary.strong.background,
69
+ textColor: tokens.colors.primary.strong.fontPrimary,
70
+ iconColor: tokens.colors.primary.strong.fontPrimary,
71
+ borderWidth: 1,
72
+ borderColor: 'transparent',
73
+ };
74
+ }
75
+ const t = tokens.colors[semanticToTheme(semantic)];
76
+ return {
77
+ bg: t.emphasis.background,
78
+ hoveredBg: t.emphasis.fontPrimary,
79
+ pressedBg: t.emphasis.background,
80
+ textColor: t.main.background,
81
+ iconColor: t.main.background,
82
+ borderWidth: 1,
83
+ borderColor: 'transparent',
84
+ };
85
+ }
86
+
87
+ // Disabled state
88
+ if (disabled) {
89
+ return {
90
+ bg: 'transparent',
91
+ hoveredBg: 'transparent',
92
+ pressedBg: 'transparent',
93
+ textColor: tokens.colors.primary.main.fontTertiary,
94
+ iconColor: tokens.colors.primary.main.fontTertiary,
95
+ borderWidth: 1,
96
+ borderColor: tokens.colors.primary.main.divider,
97
+ };
98
+ }
99
+
100
+ // Filled variant
101
+ if (variant === 'filled') {
102
+ if (semantic === 'neutral') {
103
+ return {
104
+ bg: tokens.colors.primary.main.fontPrimary,
105
+ hoveredBg: tokens.colors.primary.main.fontSecondary,
106
+ pressedBg: tokens.colors.primary.main.fontPrimary,
107
+ textColor: tokens.colors.primary.main.divider,
108
+ iconColor: tokens.colors.primary.main.divider,
109
+ borderWidth: 1,
110
+ borderColor: 'transparent',
111
+ };
112
+ }
113
+ const t = tokens.colors[semanticToTheme(semantic)];
114
+ return {
115
+ bg: t.emphasis.background,
116
+ hoveredBg: t.emphasis.fontPrimary,
117
+ pressedBg: t.emphasis.fontSecondary,
118
+ textColor: t.main.background,
119
+ iconColor: t.main.background,
120
+ borderWidth: 1,
121
+ borderColor: 'transparent',
122
+ };
123
+ }
124
+
125
+ // Tinted variant
126
+ if (variant === 'tinted') {
127
+ if (semantic === 'neutral') {
128
+ return {
129
+ bg: tokens.colors.primary.tinted.background,
130
+ hoveredBg: tokens.colors.primary.tinted.fontPrimary,
131
+ pressedBg: tokens.colors.primary.tinted.fontSecondary,
132
+ textColor: tokens.colors.primary.main.fontPrimary,
133
+ iconColor: tokens.colors.primary.main.fontPrimary,
134
+ borderWidth: 1,
135
+ borderColor: 'transparent',
136
+ };
137
+ }
138
+ const t = tokens.colors[semanticToTheme(semantic)];
139
+ return {
140
+ bg: t.tinted.background,
141
+ hoveredBg: t.tinted.fontPrimary,
142
+ pressedBg: t.tinted.fontSecondary,
143
+ textColor: t.emphasis.divider,
144
+ iconColor: t.emphasis.divider,
145
+ borderWidth: 1,
146
+ borderColor: 'transparent',
147
+ };
148
+ }
149
+
150
+ // Outlined variant
151
+ if (semantic === 'neutral') {
152
+ return {
153
+ bg: 'transparent',
154
+ hoveredBg: tokens.colors.primary.tinted.background,
155
+ pressedBg: tokens.colors.primary.tinted.fontPrimary,
156
+ textColor: tokens.colors.primary.main.fontPrimary,
157
+ iconColor: tokens.colors.primary.main.fontPrimary,
158
+ borderWidth: 1,
159
+ borderColor: tokens.colors.primary.main.divider,
160
+ };
161
+ }
162
+ const t = tokens.colors[semanticToTheme(semantic)];
163
+ return {
164
+ bg: 'transparent',
165
+ hoveredBg: t.tinted.background,
166
+ pressedBg: t.tinted.fontPrimary,
167
+ textColor: t.emphasis.divider,
168
+ iconColor: t.emphasis.divider,
169
+ borderWidth: 1,
170
+ borderColor: t.tinted.fontSecondary,
171
+ };
172
+ }
173
+
174
+ /**
175
+ * Compute chip configuration based on variant, semantic, size, and state.
176
+ */
177
+ export function getChipConfig(
178
+ variant: ChipVariant,
179
+ semantic: ChipSemantic,
180
+ size: ChipSize,
181
+ selected: boolean,
182
+ disabled: boolean,
183
+ tokens: UseTokensResult
184
+ ): ChipConfig {
185
+ return {
186
+ colors: getVariantColors(variant, semantic, selected, disabled, tokens),
187
+ sizeTokens: getSizeConfig(size),
188
+ };
189
+ }
@@ -0,0 +1,97 @@
1
+ import React from 'react';
2
+ import { Pressable } from 'react-native';
3
+ import type { ChipProps } from './Chip.types';
4
+ import { getChipConfig } from './Chip.styles';
5
+ import { useTokens } from 'newtone-api';
6
+ import { Icon } from '../../../primitives/Icon/Icon';
7
+ import { Text } from '../../../primitives/Text';
8
+ import { Wrapper } from '../../../primitives/Wrapper/Wrapper';
9
+
10
+ /**
11
+ * Chip — A pill-shaped label for tags, filters, badges, and status indicators.
12
+ *
13
+ * **Composition Architecture:**
14
+ * - Pressable (RN primitive) — handles interaction (when onPress is provided)
15
+ * - Wrapper (primitive) — handles layout (direction, gap, padding, alignment)
16
+ * - Icon (primitive) — handles optional leading icon
17
+ * - Text (primitive) — handles typography with theme tokens
18
+ *
19
+ * @example
20
+ * ```tsx
21
+ * // Static label
22
+ * <Chip>Design Systems</Chip>
23
+ *
24
+ * // Interactive filter chip
25
+ * <Chip selected={isActive} onPress={() => toggle()}>Color Science</Chip>
26
+ *
27
+ * // With icon
28
+ * <Chip icon="check" semantic="success">Verified</Chip>
29
+ * ```
30
+ */
31
+ export function Chip({
32
+ children,
33
+ variant = 'tinted',
34
+ size = 'md',
35
+ semantic = 'neutral',
36
+ selected = false,
37
+ onPress,
38
+ disabled = false,
39
+ icon,
40
+ style,
41
+ }: ChipProps) {
42
+ const tokens = useTokens();
43
+
44
+ const { colors, sizeTokens } = React.useMemo(
45
+ () => getChipConfig(variant, semantic, size, selected, disabled, tokens),
46
+ [variant, semantic, size, selected, disabled, tokens]
47
+ );
48
+
49
+ const content = (state?: { pressed: boolean; hovered?: boolean }) => (
50
+ <Wrapper
51
+ direction="horizontal"
52
+ align="center"
53
+ gap={sizeTokens.gap}
54
+ style={[
55
+ {
56
+ paddingLeft: sizeTokens.paddingX,
57
+ paddingRight: sizeTokens.paddingX,
58
+ paddingTop: sizeTokens.paddingY,
59
+ paddingBottom: sizeTokens.paddingY,
60
+ backgroundColor: state?.pressed && !disabled
61
+ ? colors.pressedBg
62
+ : state?.hovered && !disabled
63
+ ? colors.hoveredBg
64
+ : colors.bg,
65
+ borderRadius: 99,
66
+ borderWidth: colors.borderWidth,
67
+ borderColor: colors.borderColor || 'transparent',
68
+ opacity: disabled ? 0.4 : 1,
69
+ },
70
+ ...(Array.isArray(style) ? style : style ? [style] : []),
71
+ ]}
72
+ >
73
+ {icon && (
74
+ <Icon name={icon} size={sizeTokens.iconSize} color={colors.iconColor} />
75
+ )}
76
+ <Text
77
+ role={sizeTokens.textRole}
78
+ weight={selected ? 'bold' : 'medium'}
79
+ style={{ color: colors.textColor }}
80
+ >
81
+ {children}
82
+ </Text>
83
+ </Wrapper>
84
+ );
85
+
86
+ if (onPress) {
87
+ return (
88
+ <Pressable onPress={onPress} disabled={disabled}>
89
+ {({ pressed, hovered }: { pressed: boolean; hovered?: boolean }) =>
90
+ content({ pressed, hovered })
91
+ }
92
+ </Pressable>
93
+ );
94
+ }
95
+
96
+ return content();
97
+ }
@@ -0,0 +1,74 @@
1
+ import type { ViewStyle } from 'react-native';
2
+
3
+ /**
4
+ * Visual variant for the Chip component
5
+ */
6
+ export type ChipVariant = 'filled' | 'tinted' | 'outlined';
7
+
8
+ /**
9
+ * Semantic meaning for the Chip component (describes color purpose)
10
+ */
11
+ export type ChipSemantic = 'neutral' | 'accent' | 'success' | 'error' | 'warning';
12
+
13
+ /**
14
+ * Size presets for the Chip component
15
+ */
16
+ export type ChipSize = 'sm' | 'md';
17
+
18
+ /**
19
+ * Props for the Chip component
20
+ */
21
+ export interface ChipProps {
22
+ /**
23
+ * Chip label content.
24
+ */
25
+ readonly children: React.ReactNode;
26
+
27
+ /**
28
+ * Visual variant (describes visual treatment)
29
+ * @default 'tinted'
30
+ */
31
+ readonly variant?: ChipVariant;
32
+
33
+ /**
34
+ * Size preset
35
+ * @default 'md'
36
+ */
37
+ readonly size?: ChipSize;
38
+
39
+ /**
40
+ * Semantic meaning (describes color purpose)
41
+ * @default 'neutral'
42
+ */
43
+ readonly semantic?: ChipSemantic;
44
+
45
+ /**
46
+ * Selected state — overrides appearance to "strong" with bold weight.
47
+ * Useful for filter bars and toggle groups.
48
+ * @default false
49
+ */
50
+ readonly selected?: boolean;
51
+
52
+ /**
53
+ * Press handler — makes the chip interactive.
54
+ * When provided, the chip renders as a Pressable.
55
+ */
56
+ readonly onPress?: () => void;
57
+
58
+ /**
59
+ * Disabled state
60
+ * @default false
61
+ */
62
+ readonly disabled?: boolean;
63
+
64
+ /**
65
+ * Material Symbol icon name (e.g. 'check', 'close').
66
+ * Renders a leading icon before the label.
67
+ */
68
+ readonly icon?: string;
69
+
70
+ /**
71
+ * Custom style overrides for container
72
+ */
73
+ readonly style?: ViewStyle | ViewStyle[];
74
+ }
@@ -0,0 +1,2 @@
1
+ export { Chip } from './Chip';
2
+ export type { ChipProps, ChipVariant, ChipSemantic, ChipSize } from './Chip.types';
@@ -1,13 +1,15 @@
1
1
  import { StyleSheet } from 'react-native';
2
- import type { ResolvedTokens, ColorGamut } from 'newtone-api';
2
+ import type { ResolvedTokens, AppearanceTokens, ThemeName, AppearanceName } from 'newtone-api';
3
3
 
4
4
  export function getSelectStyles(
5
5
  tokens: ResolvedTokens,
6
- gamut: ColorGamut,
7
6
  disabled: boolean,
8
7
  size: 'sm' | 'md',
9
- isOpen: boolean
8
+ isOpen: boolean,
9
+ theme: ThemeName = 'primary',
10
+ appearance: AppearanceName = 'main',
10
11
  ) {
12
+ const at: AppearanceTokens = tokens.colors[theme][appearance];
11
13
  const isSm = size === 'sm';
12
14
  const fontSize = isSm ? tokens.typography.fontSizes['04'] : tokens.typography.fontSizes['05'];
13
15
  const iconSize = fontSize + 2;
@@ -24,14 +26,14 @@ export function getSelectStyles(
24
26
  fontFamily: tokens.typography.fonts.main.family,
25
27
  fontSize: tokens.typography.fontSizes['04'],
26
28
  fontWeight: tokens.typography.fonts.main.weights.medium as any,
27
- color: tokens.textSecondary[gamut],
29
+ color: at.fontTertiary,
28
30
  },
29
31
  trigger: {
30
32
  flexDirection: 'row',
31
33
  alignItems: 'center',
32
- backgroundColor: tokens.backgroundSunken[gamut],
34
+ backgroundColor: at.fontSecondary,
33
35
  borderWidth: 1,
34
- borderColor: tokens.border[gamut],
36
+ borderColor: at.fontSecondary,
35
37
  borderRadius: tokens.radius.md,
36
38
  paddingVertical,
37
39
  paddingLeft: paddingHorizontal,
@@ -42,9 +44,7 @@ export function getSelectStyles(
42
44
  flex: 1,
43
45
  fontFamily: tokens.typography.fonts.main.family,
44
46
  fontSize,
45
- color: disabled
46
- ? tokens.textSecondary[gamut]
47
- : tokens.textPrimary[gamut],
47
+ color: disabled ? at.fontTertiary : at.divider,
48
48
  },
49
49
  iconWrapper: {
50
50
  position: 'absolute',
@@ -57,7 +57,7 @@ export function getSelectStyles(
57
57
  fontFamily: tokens.typography.fonts.main.family,
58
58
  fontSize: tokens.typography.fontSizes['01'],
59
59
  fontWeight: tokens.typography.fonts.main.weights.medium as any,
60
- color: tokens.textSecondary[gamut],
60
+ color: at.fontTertiary,
61
61
  textTransform: 'uppercase',
62
62
  letterSpacing: 0.5,
63
63
  paddingVertical: tokens.spacing['04'],
@@ -2,7 +2,7 @@ import React, { useMemo } from 'react';
2
2
  import { View, Text, Pressable, ScrollView } from 'react-native';
3
3
  import type { SelectProps, SelectOption } from './Select.types';
4
4
  import { isOptionGroup } from './Select.types';
5
- import { useTokens } from 'newtone-api';
5
+ import { useTokens, useFrameContext } from 'newtone-api';
6
6
  import { getSelectStyles } from './Select.styles';
7
7
  import { Icon } from '../../../primitives/Icon/Icon';
8
8
  import { Popover } from '../../overlays/Popover/Popover';
@@ -35,6 +35,7 @@ export function Select({
35
35
  style,
36
36
  }: SelectProps) {
37
37
  const tokens = useTokens(1);
38
+ const frameCtx = useFrameContext();
38
39
  const { isOpen, open, close, toggle } = usePopover();
39
40
 
40
41
  const flatOptions = useMemo(() => flattenOptions(options), [options]);
@@ -51,17 +52,19 @@ export function Select({
51
52
  onOpen: open,
52
53
  });
53
54
 
55
+ const inheritedTheme = frameCtx?.theme;
56
+ const inheritedAppearance = frameCtx?.appearance;
57
+
54
58
  const styles = useMemo(
55
- () => getSelectStyles(tokens, tokens.gamut, disabled, size, isOpen),
56
- [tokens, disabled, size, isOpen]
59
+ () => getSelectStyles(tokens, disabled, size, isOpen, inheritedTheme, inheritedAppearance),
60
+ [tokens, disabled, size, isOpen, inheritedTheme, inheritedAppearance]
57
61
  );
58
62
 
59
63
  const selectedOption = flatOptions.find((o) => o.value === value);
60
64
  const displayLabel = selectedOption?.label ?? placeholder ?? value;
61
65
 
62
- const iconColor = disabled
63
- ? tokens.textSecondary[tokens.gamut]
64
- : tokens.textPrimary[tokens.gamut];
66
+ const at = tokens.colors[inheritedTheme ?? 'primary'][inheritedAppearance ?? 'main'];
67
+ const iconColor = disabled ? at.fontTertiary : at.divider;
65
68
 
66
69
  // onKeyDown is a web-only prop supported by react-native-web but not in RN types
67
70
  const triggerWebProps = { onKeyDown: handleKeyDown } as any;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { Pressable, Text, View } from 'react-native';
3
3
  import type { SelectOption as SelectOptionType, SelectProps } from './Select.types';
4
- import { useTokens } from 'newtone-api';
4
+ import { useTokens, useFrameContext } from 'newtone-api';
5
5
  import { Icon } from '../../../primitives/Icon/Icon';
6
6
 
7
7
  interface SelectOptionRowProps {
@@ -22,6 +22,9 @@ export function SelectOptionRow({
22
22
  size,
23
23
  }: SelectOptionRowProps) {
24
24
  const tokens = useTokens(1);
25
+ const frameCtx = useFrameContext();
26
+ const at = tokens.colors[frameCtx?.theme ?? 'primary'][frameCtx?.appearance ?? 'main'];
27
+ const emphasisAt = tokens.colors[frameCtx?.theme ?? 'primary'].emphasis;
25
28
 
26
29
  const paddingVertical = size === 'sm' ? tokens.spacing['04'] : tokens.spacing['08'];
27
30
  const paddingHorizontal = size === 'sm' ? tokens.spacing['08'] : tokens.spacing['12'];
@@ -55,11 +58,11 @@ export function SelectOptionRow({
55
58
  paddingHorizontal,
56
59
  },
57
60
  isSelected && {
58
- backgroundColor: tokens.backgroundSunken[tokens.gamut],
61
+ backgroundColor: at.fontSecondary,
59
62
  },
60
63
  isFocused &&
61
64
  !isSelected && {
62
- backgroundColor: `${tokens.border[tokens.gamut]}20`,
65
+ backgroundColor: `${at.fontSecondary}20`,
63
66
  },
64
67
  option.disabled && {
65
68
  opacity: 0.5,
@@ -75,14 +78,14 @@ export function SelectOptionRow({
75
78
  flex: 1,
76
79
  fontFamily: tokens.typography.fonts.main.family,
77
80
  fontSize,
78
- color: tokens.textPrimary[tokens.gamut],
81
+ color: at.divider,
79
82
  },
80
83
  isSelected && {
81
84
  fontWeight: tokens.typography.fonts.main.weights.medium as any,
82
- color: tokens.accent.fill[tokens.gamut],
85
+ color: emphasisAt.divider,
83
86
  },
84
87
  option.disabled && {
85
- color: tokens.textSecondary[tokens.gamut],
88
+ color: at.fontTertiary,
86
89
  },
87
90
  ]}
88
91
  numberOfLines={1}
@@ -94,7 +97,7 @@ export function SelectOptionRow({
94
97
  <Icon
95
98
  name="check"
96
99
  size={fontSize}
97
- color={tokens.accent.fill[tokens.gamut]}
100
+ color={emphasisAt.divider}
98
101
  />
99
102
  </View>
100
103
  )}
@@ -1,7 +1,13 @@
1
1
  import { StyleSheet } from 'react-native';
2
- import type { ResolvedTokens, ColorGamut } from 'newtone-api';
2
+ import type { ResolvedTokens, AppearanceTokens, ThemeName, AppearanceName } from 'newtone-api';
3
3
 
4
- export function getTextInputStyles(tokens: ResolvedTokens, gamut: ColorGamut, disabled: boolean) {
4
+ export function getTextInputStyles(
5
+ tokens: ResolvedTokens,
6
+ disabled: boolean,
7
+ theme: ThemeName = 'primary',
8
+ appearance: AppearanceName = 'main',
9
+ ) {
10
+ const at: AppearanceTokens = tokens.colors[theme][appearance];
5
11
  return StyleSheet.create({
6
12
  container: {
7
13
  gap: tokens.spacing['04'],
@@ -10,20 +16,18 @@ export function getTextInputStyles(tokens: ResolvedTokens, gamut: ColorGamut, di
10
16
  fontFamily: tokens.typography.fonts.main.family,
11
17
  fontSize: tokens.typography.fontSizes['04'],
12
18
  fontWeight: tokens.typography.fonts.main.weights.medium as any,
13
- color: tokens.textSecondary[gamut],
19
+ color: at.fontTertiary,
14
20
  },
15
21
  input: {
16
22
  fontFamily: tokens.typography.fonts.main.family,
17
- backgroundColor: tokens.backgroundSunken[gamut],
23
+ backgroundColor: at.fontSecondary,
18
24
  borderWidth: 1,
19
- borderColor: tokens.border[gamut],
25
+ borderColor: at.fontSecondary,
20
26
  borderRadius: tokens.radius.md,
21
27
  paddingVertical: tokens.spacing['08'],
22
28
  paddingHorizontal: tokens.spacing['12'],
23
29
  fontSize: tokens.typography.fontSizes['05'],
24
- color: disabled
25
- ? tokens.textSecondary[gamut]
26
- : tokens.textPrimary[gamut],
30
+ color: disabled ? at.fontTertiary : at.divider,
27
31
  opacity: disabled ? 0.5 : 1,
28
32
  },
29
33
  });
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { View, Text, TextInput as RNTextInput } from 'react-native';
3
3
  import type { TextInputProps } from './TextInput.types';
4
- import { useTokens } from 'newtone-api';
4
+ import { useTokens, useFrameContext } from 'newtone-api';
5
5
  import { getTextInputStyles } from './TextInput.styles';
6
6
 
7
7
  export function TextInput({
@@ -11,10 +11,13 @@ export function TextInput({
11
11
  ...textInputProps
12
12
  }: TextInputProps) {
13
13
  const tokens = useTokens(1);
14
+ const frameCtx = useFrameContext();
15
+ const theme = frameCtx?.theme ?? 'primary';
16
+ const appearance = frameCtx?.appearance ?? 'main';
14
17
 
15
18
  const styles = React.useMemo(
16
- () => getTextInputStyles(tokens, tokens.gamut, disabled),
17
- [tokens, disabled]
19
+ () => getTextInputStyles(tokens, disabled, theme, appearance),
20
+ [tokens, disabled, theme, appearance]
18
21
  );
19
22
 
20
23
  return (
@@ -23,7 +26,7 @@ export function TextInput({
23
26
  <RNTextInput
24
27
  style={styles.input}
25
28
  editable={!disabled}
26
- placeholderTextColor={tokens.textSecondary[tokens.gamut]}
29
+ placeholderTextColor={tokens.colors[theme][appearance].fontTertiary}
27
30
  {...textInputProps}
28
31
  />
29
32
  </View>