@app-studio/components 0.10.22 → 0.10.24

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 (113) hide show
  1. package/dist/index.d.ts +271 -104
  2. package/dist/native/components/Background/Background/Background.view.js +7 -2
  3. package/dist/native/components/Background/Background/Background.view.js.map +1 -1
  4. package/dist/native/components/Badge/Badge/Badge.style.d.ts +13 -0
  5. package/dist/native/components/Badge/Badge/Badge.style.js +26 -13
  6. package/dist/native/components/Badge/Badge/Badge.style.js.map +1 -1
  7. package/dist/native/components/Button/Button/Button.style.d.ts +14 -0
  8. package/dist/native/components/Button/Button/Button.style.js +19 -5
  9. package/dist/native/components/Button/Button/Button.style.js.map +1 -1
  10. package/dist/native/components/Button/Button/Button.type.d.ts +9 -0
  11. package/dist/native/components/Button/Button/Button.type.js +3 -0
  12. package/dist/native/components/Button/Button/Button.type.js.map +1 -0
  13. package/dist/native/components/Button/Button/Button.view.js +4 -4
  14. package/dist/native/components/Button/Button/Button.view.js.map +1 -1
  15. package/dist/native/components/Drawer/Drawer/Drawer.type.d.ts +3 -0
  16. package/dist/native/components/Drawer/Drawer/Drawer.type.js +2 -0
  17. package/dist/native/components/Drawer/Drawer/Drawer.type.js.map +1 -0
  18. package/dist/native/components/Form/Checkbox/Checkbox/Checkbox.type.d.ts +8 -0
  19. package/dist/native/components/Form/Checkbox/Checkbox/Checkbox.type.js +2 -0
  20. package/dist/native/components/Form/Checkbox/Checkbox/Checkbox.type.js.map +1 -0
  21. package/dist/native/components/Form/ColorInput/ColorInput/ColorInput.type.d.ts +2 -1
  22. package/dist/native/components/Form/ComboBox/ComboBox/ComboBox.props.d.ts +7 -0
  23. package/dist/native/components/Form/ComboBox/ComboBox/ComboBox.style.d.ts +0 -1
  24. package/dist/native/components/Form/ComboBox/ComboBox/ComboBox.style.js +4 -7
  25. package/dist/native/components/Form/ComboBox/ComboBox/ComboBox.style.js.map +1 -1
  26. package/dist/native/components/Form/ComboBox/ComboBox/ComboBox.view.js +13 -6
  27. package/dist/native/components/Form/ComboBox/ComboBox/ComboBox.view.js.map +1 -1
  28. package/dist/native/components/Form/CountryPicker/CountryPicker/CountryPicker.type.d.ts +19 -0
  29. package/dist/native/components/Form/CountryPicker/CountryPicker/CountryPicker.type.js +2 -0
  30. package/dist/native/components/Form/CountryPicker/CountryPicker/CountryPicker.type.js.map +1 -0
  31. package/dist/native/components/Form/CountryPicker/CountryPicker/CountryPicker.view.js +3 -2
  32. package/dist/native/components/Form/CountryPicker/CountryPicker/CountryPicker.view.js.map +1 -1
  33. package/dist/native/components/Form/CountryPicker/CountryPicker/CountryPicker.view.native.js +2 -2
  34. package/dist/native/components/Form/DatePicker/DatePicker/DatePicker.type.d.ts +12 -0
  35. package/dist/native/components/Form/DatePicker/DatePicker/DatePicker.type.js +2 -0
  36. package/dist/native/components/Form/DatePicker/DatePicker/DatePicker.type.js.map +1 -0
  37. package/dist/native/components/Form/DatePicker/DatePicker/DatePicker.view.js +5 -2
  38. package/dist/native/components/Form/DatePicker/DatePicker/DatePicker.view.js.map +1 -1
  39. package/dist/native/components/Form/Label/Label/Label.props.d.ts +1 -1
  40. package/dist/native/components/Form/Password/Password/Password.type.d.ts +10 -0
  41. package/dist/native/components/Form/Password/Password/Password.type.js +2 -0
  42. package/dist/native/components/Form/Password/Password/Password.type.js.map +1 -0
  43. package/dist/native/components/Form/Password/Password.js +22 -3
  44. package/dist/native/components/Form/Password/Password.js.map +1 -1
  45. package/dist/native/components/Form/Radio/Radio/Radio.type.d.ts +8 -0
  46. package/dist/native/components/Form/Radio/Radio/Radio.type.js +2 -0
  47. package/dist/native/components/Form/Radio/Radio/Radio.type.js.map +1 -0
  48. package/dist/native/components/Form/Radio/RadioGroup/RadioGroup.type.d.ts +7 -0
  49. package/dist/native/components/Form/Radio/RadioGroup/RadioGroup.type.js +2 -0
  50. package/dist/native/components/Form/Radio/RadioGroup/RadioGroup.type.js.map +1 -0
  51. package/dist/native/components/Form/Select/Select/Select.props.d.ts +2 -2
  52. package/dist/native/components/Form/Select/Select/Select.type.d.ts +19 -0
  53. package/dist/native/components/Form/Select/Select/Select.type.js +2 -0
  54. package/dist/native/components/Form/Select/Select/Select.type.js.map +1 -0
  55. package/dist/native/components/Form/Select/Select/Select.view.js +28 -30
  56. package/dist/native/components/Form/Select/Select/Select.view.js.map +1 -1
  57. package/dist/native/components/Form/Selector/Selector/Selector.type.d.ts +19 -0
  58. package/dist/native/components/Form/Selector/Selector/Selector.type.js +2 -0
  59. package/dist/native/components/Form/Selector/Selector/Selector.type.js.map +1 -0
  60. package/dist/native/components/Form/Selector/Selector/Selector.view.js +10 -1
  61. package/dist/native/components/Form/Selector/Selector/Selector.view.js.map +1 -1
  62. package/dist/native/components/Form/Switch/Switch/Switch.type.d.ts +7 -0
  63. package/dist/native/components/Form/Switch/Switch/Switch.type.js +2 -0
  64. package/dist/native/components/Form/Switch/Switch/Switch.type.js.map +1 -0
  65. package/dist/native/components/Form/TagInput/TagInput/TagInput.view.js +16 -3
  66. package/dist/native/components/Form/TagInput/TagInput/TagInput.view.js.map +1 -1
  67. package/dist/native/components/Form/TextField/TextField/TextField.type.d.ts +12 -0
  68. package/dist/native/components/Form/TextField/TextField/TextField.type.js +2 -0
  69. package/dist/native/components/Form/TextField/TextField/TextField.type.js.map +1 -0
  70. package/dist/native/components/Form/TextField/TextField/TextField.view.js +4 -1
  71. package/dist/native/components/Form/TextField/TextField/TextField.view.js.map +1 -1
  72. package/dist/native/components/Input/FieldContainer/FieldContainer.js +1 -1
  73. package/dist/native/components/Input/FieldContainer/FieldContainer.js.map +1 -1
  74. package/dist/native/components/Input/FieldContent/FieldContent.js +12 -2
  75. package/dist/native/components/Input/FieldContent/FieldContent.js.map +1 -1
  76. package/dist/native/components/Input/FieldWrapper/FieldWrapper.js +1 -1
  77. package/dist/native/components/Input/FieldWrapper/FieldWrapper.js.map +1 -1
  78. package/dist/native/components/Input/Input.style.d.ts +0 -34
  79. package/dist/native/components/Input/Input.style.js +14 -33
  80. package/dist/native/components/Input/Input.style.js.map +1 -1
  81. package/dist/native/components/Input/fieldSizes.d.ts +33 -0
  82. package/dist/native/components/Input/fieldSizes.js +37 -0
  83. package/dist/native/components/Input/fieldSizes.js.map +1 -0
  84. package/dist/native/components/Link/Link/Link.props.d.ts +5 -3
  85. package/dist/native/components/Link/Link/Link.type.d.ts +7 -0
  86. package/dist/native/components/Link/Link/Link.type.js +2 -0
  87. package/dist/native/components/Link/Link/Link.type.js.map +1 -0
  88. package/dist/native/components/Link/Link/Link.view.js +40 -25
  89. package/dist/native/components/Link/Link/Link.view.js.map +1 -1
  90. package/dist/native/components/Link/Link/Link.view.native.js +4 -3
  91. package/dist/native/components/Link/Link/Link.view.native.js.map +1 -1
  92. package/dist/native/components/Link/Link.js +1 -5
  93. package/dist/native/components/Link/Link.js.map +1 -1
  94. package/dist/native/components/Loader/Loader/Loader.type.d.ts +4 -0
  95. package/dist/native/components/Loader/Loader/Loader.type.js +2 -0
  96. package/dist/native/components/Loader/Loader/Loader.type.js.map +1 -0
  97. package/dist/native/components/Modal/Modal/Modal.type.d.ts +4 -0
  98. package/dist/native/components/Modal/Modal/Modal.type.js +2 -0
  99. package/dist/native/components/Modal/Modal/Modal.type.js.map +1 -0
  100. package/dist/native/components/Router/Router.match.js +1 -1
  101. package/dist/native/components/Router/Router.match.js.map +1 -1
  102. package/dist/native/components/Router/index.d.ts +1 -1
  103. package/dist/native/components/Tabs/Tabs/Tabs.type.d.ts +53 -0
  104. package/dist/native/components/Tabs/Tabs/Tabs.type.js +2 -0
  105. package/dist/native/components/Tabs/Tabs/Tabs.type.js.map +1 -0
  106. package/dist/web.cjs.js +9 -9
  107. package/dist/web.cjs.js.map +1 -1
  108. package/dist/web.esm.js +5195 -5193
  109. package/dist/web.esm.js.map +1 -1
  110. package/dist/web.umd.js +8 -8
  111. package/dist/web.umd.js.map +1 -1
  112. package/docs/getting-started/introduction.md +89 -4
  113. package/package.json +1 -1
@@ -44,20 +44,105 @@ compatibility matrix, Reanimated wiring, and Metro/typecheck configuration.
44
44
 
45
45
  ## Quick Start
46
46
 
47
+ Wrap your app in `ThemeProvider` — it defines the CSS variables that every
48
+ `color-*` and `theme-*` token resolves against. Without it, tokens fall back to
49
+ undefined variables and components render uncoloured.
50
+
47
51
  ```jsx
48
52
  import React from 'react';
53
+ import { ThemeProvider, Vertical } from 'app-studio';
49
54
  import { Button, Text } from '@app-studio/components';
50
55
 
51
56
  function App() {
52
57
  return (
53
- <div>
54
- <Text>Hello, world!</Text>
55
- <Button onClick={() => alert('Clicked!')}>Click me</Button>
56
- </div>
58
+ <ThemeProvider>
59
+ <Vertical gap={12} padding={24}>
60
+ <Text>Hello, world!</Text>
61
+ <Button onClick={() => console.log('Clicked!')}>Click me</Button>
62
+ </Vertical>
63
+ </ThemeProvider>
57
64
  );
58
65
  }
59
66
  ```
60
67
 
68
+ ### Baseline document styles
69
+
70
+ This library styles **components, not the document**. It ships no CSS reset, so
71
+ the page keeps the browser's defaults until you set them yourself. On a fresh
72
+ project that shows up immediately as:
73
+
74
+ - body text in the browser's serif font, because nothing sets a `font-family`;
75
+ - an 8px `body` margin, which makes any `100vh` shell overflow by 16px and
76
+ produces a scrollbar you did not ask for;
77
+ - blue underlined `<a>` elements, including router links wrapping components.
78
+
79
+ A dozen lines are enough, and none of it competes with the design system:
80
+
81
+ ```css
82
+ *,
83
+ *::before,
84
+ *::after {
85
+ box-sizing: border-box;
86
+ }
87
+
88
+ html,
89
+ body {
90
+ margin: 0;
91
+ padding: 0;
92
+ }
93
+
94
+ body {
95
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
96
+ -webkit-font-smoothing: antialiased;
97
+ }
98
+
99
+ a {
100
+ color: inherit;
101
+ text-decoration: none;
102
+ }
103
+ ```
104
+
105
+ Keep it to resets. Colours, spacing and typography should still come from the
106
+ theme so they stay adaptive to light/dark mode.
107
+
108
+ ### Control sizes line up
109
+
110
+ Form controls of the same `size` render at the same height, so they can sit in a
111
+ row without extra alignment work. At `md` — the default — `TextField`, `Select`
112
+ and `Button` are all exactly 40px:
113
+
114
+ ```jsx
115
+ <Horizontal gap={10} alignItems="center">
116
+ <TextField name="search" placeholder="Search…" />
117
+ <Select name="status" placeholder="Any status" options={options} />
118
+ <Button variant="outline">Filter</Button>
119
+ </Horizontal>
120
+ ```
121
+
122
+ The scale is `xs` 24, `sm` 32, `md` 40, `lg` 48, `xl` 56, and it is shared: it
123
+ lives in `Input/fieldSizes` and is applied by the field shell, so `TextField`,
124
+ `Password`, `Select`, `ComboBox`, `CountryPicker`, `DatePicker`, `TagInput` and
125
+ `Button` all render exactly their declared height at every size — including
126
+ bordered variants, which used to come out 2px taller.
127
+
128
+ ### Long values never break the layout
129
+
130
+ A control that has to show text you do not control — a chosen option, a tag, a
131
+ segment label — keeps to one line and ellipsises rather than wrapping. Wrapping
132
+ is not a cosmetic problem: it silently breaks the height contract above, turning
133
+ a 40px control into a 56px one.
134
+
135
+ `Select`, `ComboBox`, `Selector` and `TagInput` all truncate. If you compose
136
+ something similar yourself, note that `maxLines={1}` alone is not enough inside
137
+ a flex row — the element also needs `minWidth={0}`, because `min-width: auto`
138
+ stops a flex child shrinking below its content and the clamp never engages.
139
+
140
+ ### Badges sit one step below controls
141
+
142
+ `Badge` is a secondary label, so its ramp is deliberately smaller than the
143
+ control ramp: `md` is 12px type in a 24px pill, against 14px body text. Reach for
144
+ `lg`/`xl` when a badge genuinely needs to carry the row.
145
+
61
146
  ## Component Categories
62
147
 
63
148
  The library includes components in the following categories:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@app-studio/components",
3
- "version": "0.10.22",
3
+ "version": "0.10.24",
4
4
  "main": "dist/web.cjs.js",
5
5
  "module": "dist/web.esm.js",
6
6
  "react-native": "dist/native/components/index.js",