aidos-ui 3.0.31 → 4.0.1

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 (157) hide show
  1. package/.claude/settings.local.json +14 -1
  2. package/CLAUDE.md +72 -0
  3. package/README.md +43 -29
  4. package/dist/Badge.d.ts +2 -2
  5. package/dist/Badge.js.map +1 -1
  6. package/dist/BaseButton.d.ts +2 -2
  7. package/dist/BaseButton.js +2 -2
  8. package/dist/BaseButton.js.map +1 -1
  9. package/dist/BaseInput.d.ts +2 -2
  10. package/dist/BaseInput.js.map +1 -1
  11. package/dist/BaseLink.d.ts +2 -2
  12. package/dist/BaseLink.js +2 -2
  13. package/dist/BaseLink.js.map +1 -1
  14. package/dist/BaseListItem.d.ts +3 -3
  15. package/dist/BaseListItem.js.map +1 -1
  16. package/dist/BaseView.d.ts +2 -2
  17. package/dist/BaseView.js.map +1 -1
  18. package/dist/Calendar.d.ts +4 -4
  19. package/dist/DarkMode.js.map +1 -1
  20. package/dist/DateInput.d.ts +2 -2
  21. package/dist/DatePicker.js.map +1 -1
  22. package/dist/DatetimeInput.d.ts +2 -2
  23. package/dist/Dialog.d.ts +3 -3
  24. package/dist/Dialog.js.map +1 -1
  25. package/dist/Dropdown.d.ts +3 -3
  26. package/dist/Dropdown.js.map +1 -1
  27. package/dist/Icon.d.ts +3 -3
  28. package/dist/Icon.js +2 -21
  29. package/dist/Icon.js.map +1 -1
  30. package/dist/IconLink.js +2 -1
  31. package/dist/IconLink.js.map +1 -1
  32. package/dist/Interactable.d.ts +4 -4
  33. package/dist/Interactable.js +2 -2
  34. package/dist/Interactable.js.map +1 -1
  35. package/dist/ListButtonItem.js +2 -2
  36. package/dist/ListButtonItem.js.map +1 -1
  37. package/dist/ListLinkItem.js +2 -2
  38. package/dist/ListLinkItem.js.map +1 -1
  39. package/dist/MenuIcon.js.map +1 -1
  40. package/dist/NextJSRouter.js.map +1 -1
  41. package/dist/NextJSRouterState.js.map +1 -1
  42. package/dist/OnVisible.d.ts +1 -1
  43. package/dist/OnVisible.js.map +1 -1
  44. package/dist/Popover.d.ts +7 -7
  45. package/dist/Popover.js +2 -2
  46. package/dist/Popover.js.map +1 -1
  47. package/dist/ProgressBar.d.ts +2 -2
  48. package/dist/ProgressBar.js.map +1 -1
  49. package/dist/Providers.d.ts +2 -2
  50. package/dist/Providers.js +2 -2
  51. package/dist/Providers.js.map +1 -1
  52. package/dist/RangeInput.d.ts +3 -3
  53. package/dist/RangeInput.js +2 -2
  54. package/dist/RangeInput.js.map +1 -1
  55. package/dist/RootView.js.map +1 -1
  56. package/dist/Select.d.ts +2 -3
  57. package/dist/Select.js.map +1 -1
  58. package/dist/StaticCheckbox.js.map +1 -1
  59. package/dist/Storage.d.ts +2 -1
  60. package/dist/Storage.js.map +1 -1
  61. package/dist/Stream.js.map +1 -1
  62. package/dist/Sublist.d.ts +2 -2
  63. package/dist/Tabs.d.ts +4 -4
  64. package/dist/Tabs.js +2 -4
  65. package/dist/Tabs.js.map +1 -1
  66. package/dist/Text.d.ts +2 -2
  67. package/dist/Text.js.map +1 -1
  68. package/dist/TextArea.d.ts +2 -2
  69. package/dist/TextArea.js.map +1 -1
  70. package/dist/TextInput.d.ts +4 -3
  71. package/dist/TextInput.js +14 -5
  72. package/dist/TextInput.js.map +1 -1
  73. package/dist/TextPairing.d.ts +2 -2
  74. package/dist/TextPairing.js.map +1 -1
  75. package/dist/Tooltip.d.ts +4 -4
  76. package/dist/Tooltip.js.map +1 -1
  77. package/dist/aria.js.map +1 -1
  78. package/dist/hash.js.map +1 -1
  79. package/dist/jss.d.ts +21 -21
  80. package/dist/jss.js +6 -6
  81. package/dist/jss.js.map +1 -1
  82. package/dist/numberToBase.js.map +1 -1
  83. package/dist/stateMachineContextFactory.js.map +1 -1
  84. package/dist/useCookie.js.map +1 -1
  85. package/dist/useKeyboard.js.map +1 -1
  86. package/dist/useNavigation.js.map +1 -1
  87. package/dist/useRefEffect.js.map +1 -1
  88. package/next-env.d.ts +2 -1
  89. package/next.config.js +2 -1
  90. package/package.json +27 -20
  91. package/src/Badge.tsx +2 -2
  92. package/src/BaseButton.tsx +4 -4
  93. package/src/BaseInput.tsx +2 -2
  94. package/src/BaseLink.tsx +4 -4
  95. package/src/BaseListItem.tsx +3 -3
  96. package/src/BaseView.tsx +3 -3
  97. package/src/Calendar.tsx +4 -4
  98. package/src/DateInput.tsx +2 -2
  99. package/src/DatetimeInput.tsx +2 -2
  100. package/src/Dialog.tsx +3 -3
  101. package/src/Dropdown.tsx +4 -4
  102. package/src/Icon.tsx +4 -30
  103. package/src/IconLink.tsx +2 -1
  104. package/src/Interactable.tsx +4 -4
  105. package/src/ListButtonItem.tsx +2 -2
  106. package/src/ListLinkItem.tsx +2 -2
  107. package/src/MenuIcon.tsx +2 -2
  108. package/src/NextJSRouter.tsx +2 -2
  109. package/src/Popover.tsx +9 -9
  110. package/src/ProgressBar.tsx +3 -3
  111. package/src/Providers.tsx +4 -4
  112. package/src/RangeInput.tsx +5 -5
  113. package/src/Select.tsx +2 -2
  114. package/src/StaticCheckbox.tsx +2 -2
  115. package/src/Storage.tsx +1 -1
  116. package/src/Sublist.tsx +2 -2
  117. package/src/Tabs.tsx +4 -6
  118. package/src/Text.tsx +2 -2
  119. package/src/TextArea.tsx +2 -2
  120. package/src/TextInput.tsx +20 -8
  121. package/src/TextPairing.tsx +2 -2
  122. package/src/Tooltip.tsx +5 -5
  123. package/src/docs/mdx.tsx +40 -0
  124. package/src/docs/searchIndex.ts +1 -1
  125. package/src/jss.tsx +18 -18
  126. package/src/pages/Badge.mdx +136 -14
  127. package/src/pages/Button.mdx +121 -63
  128. package/src/pages/Calendar.mdx +196 -2
  129. package/src/pages/Card.mdx +123 -47
  130. package/src/pages/Checkbox.mdx +103 -28
  131. package/src/pages/Dialog.mdx +172 -7
  132. package/src/pages/FlexLayout.mdx +185 -51
  133. package/src/pages/Hashing.mdx +199 -8
  134. package/src/pages/Icon.mdx +150 -42
  135. package/src/pages/IconButton.mdx +127 -116
  136. package/src/pages/Link.mdx +118 -47
  137. package/src/pages/List.mdx +167 -283
  138. package/src/pages/ListHeader.mdx +157 -27
  139. package/src/pages/Popover.mdx +177 -55
  140. package/src/pages/ProgressBar.mdx +186 -6
  141. package/src/pages/ProgressCircle.mdx +196 -13
  142. package/src/pages/RangeInput.mdx +189 -61
  143. package/src/pages/Tabs.mdx +202 -346
  144. package/src/pages/Text.mdx +102 -81
  145. package/src/pages/TextInput.mdx +169 -44
  146. package/src/pages/TextPairing.mdx +164 -115
  147. package/src/pages/TimeInput.mdx +142 -37
  148. package/src/pages/Tooltip.mdx +99 -12
  149. package/src/pages/_app.tsx +14 -4
  150. package/src/pages/css-in-js.mdx +196 -83
  151. package/src/pages/navigation.mdx +122 -20
  152. package/src/pages/useCookie.mdx +168 -7
  153. package/src/pages/useKeyboard.mdx +242 -5
  154. package/src/pages/useNavigation.mdx +244 -16
  155. package/src/pages/usePromise.mdx +271 -6
  156. package/src/pages/useRefEffect.mdx +230 -28
  157. package/tsconfig.json +13 -4
@@ -1,89 +1,160 @@
1
1
  import { Link } from "../Link";
2
2
  import { Row } from "../Row";
3
+ import { Column } from "../Column";
3
4
 
4
5
  # Link
5
6
 
6
- The `Link` component looks the same as the `Button` component and the only difference is that the underlying HTML is an anchor tag.
7
+ The `Link` component provides styled navigation that looks like a button but renders as a semantic `<a>` anchor element. Use it for navigation actions where you want button-like styling.
7
8
 
8
9
  ---
9
10
 
10
- ## Link variants
11
+ ## Props
12
+
13
+ | Prop | Type | Required | Default | Description |
14
+ |------|------|----------|---------|-------------|
15
+ | `children` | `ReactNode` | Yes | - | Link text content |
16
+ | `href` | `string` | Yes | - | Navigation destination URL |
17
+ | `color` | `InteractableColor` | Yes | - | `"positive"`, `"primary"`, `"negative"`, `"dark"`, `"light"` |
18
+ | `bare` | `boolean` | No | `false` | Removes background for a lighter appearance |
19
+ | `border` | `boolean` | No | `false` | Adds a border matching the text color |
20
+ | `disabled` | `boolean` | No | `false` | Disables interaction |
21
+ | `underline` | `boolean` | No | `false` | Adds text underline decoration |
22
+ | `icon` | `IconType` | No | - | Icon to display alongside text |
23
+ | `iconPosition` | `"left"` \| `"right"` | No | `"left"` | Icon placement relative to text |
24
+ | `iconSize` | `Size` | No | `"medium"` | Icon size |
25
+ | `size` | `Size` | No | `"medium"` | Text size |
26
+ | `padding` | `Padding` | No | `"medium"` | Internal padding |
27
+ | `inline` | `boolean` | No | `true` | Display as inline-flex (true) or flex (false) |
28
+ | `bold` | `boolean` | No | `false` | Bold text |
29
+ | `target` | `string` | No | - | Link target (e.g., `"_blank"` for new tab) |
11
30
 
12
- The basic `Link` comes in three main variants, each of them with a specific intent in mind. It also support a "disabled" variant, for cases where the button is not actionable.
31
+ ---
32
+
33
+ ## Color variants
13
34
 
14
- - Positive: actions that are going to create something or strongly agree
15
- - Primary: actions that are less central to the user experience
16
- - Negative: actions that are going to delete data or remove something
17
- - Dark: primary actions in a dark theme
18
- - Light: primary actions in a light theme
19
- - Disabled: actions that are not available
35
+ Links share the same color system as buttons, providing visual consistency across your application.
20
36
 
21
37
  <Row gap="large" align="center" padding="large" justify="center">
22
- <Link label="Positive" color="positive" href="/" />
23
- <Link label="Primary" color="primary" href="/" />
24
- <Link label="Negative" color="negative" href="/" />
25
- <Link label="Disabled" color="positive" disabled href="/" />
26
- <Link label="Dark" color="dark" href="/" />
27
- <Link label="Light" color="light" href="/" />
38
+ <Link color="positive" href="/">Positive</Link>
39
+ <Link color="primary" href="/">Primary</Link>
40
+ <Link color="negative" href="/">Negative</Link>
41
+ <Link color="dark" href="/">Dark</Link>
42
+ <Link color="light" href="/">Light</Link>
28
43
  </Row>
29
44
 
30
45
  ```js
46
+ <Link color="positive" href="/signup">Sign up</Link>
47
+ <Link color="primary" href="/learn-more">Learn more</Link>
48
+ <Link color="negative" href="/delete">Delete account</Link>
49
+ ```
50
+
51
+ ---
52
+
53
+ ## Bare variant
54
+
55
+ The `bare` prop creates a lighter appearance without a background, ideal for inline links or secondary navigation.
56
+
31
57
  <Row gap="large" align="center" padding="large" justify="center">
32
- <Link label="Positive" color="positive" href="/" />
33
- <Link label="Primary" color="primary" href="/" />
34
- <Link label="Negative" color="negative" href="/" />
35
- <Link label="Disabled" color="positive" disabled href="/" />
36
- <Link label="Dark" color="dark" href="/" />
37
- <Link label="Light" color="light" href="/" />
58
+ <Link bare color="positive" href="/">Positive</Link>
59
+ <Link bare color="primary" href="/">Primary</Link>
60
+ <Link bare color="negative" href="/">Negative</Link>
38
61
  </Row>
62
+
63
+ ```js
64
+ <Link bare color="positive" href="/docs">Documentation</Link>
65
+ <Link bare color="primary" href="/about">About us</Link>
39
66
  ```
40
67
 
41
68
  ---
42
69
 
43
- ## Bare link
70
+ ## With border
44
71
 
45
- The bare `Link` variants fulfill the same function than the basic counterparts but have a lighter style that can be more easily integrated in complex components.
72
+ Combine `bare` and `border` for outlined link styles.
46
73
 
47
74
  <Row gap="large" align="center" padding="large" justify="center">
48
- <Link bare label="Positive" color="positive" href="/" />
49
- <Link bare label="Primary" color="primary" href="/" />
50
- <Link bare label="Negative" color="negative" href="/" />
51
- <Link bare label="Disabled" color="positive" disabled href="/" />
52
- <Link bare label="Dark" color="dark" href="/" />
53
- <Link bare label="Light" color="light" href="/" />
75
+ <Link border bare color="positive" href="/">Positive</Link>
76
+ <Link border bare color="primary" href="/">Primary</Link>
77
+ <Link border bare color="negative" href="/">Negative</Link>
54
78
  </Row>
55
79
 
56
80
  ```js
81
+ <Link border bare color="positive" href="/signup">
82
+ Get started
83
+ </Link>
84
+ ```
85
+
86
+ ---
87
+
88
+ ## With underline
89
+
90
+ The `underline` prop adds a text decoration, useful for traditional link styling within paragraphs.
91
+
57
92
  <Row gap="large" align="center" padding="large" justify="center">
58
- <Link bare label="Positive" color="positive" href="/" />
59
- <Link bare label="Primary" color="primary" href="/" />
60
- <Link bare label="Negative" color="negative" href="/" />
61
- <Link bare label="Disabled" color="positive" disabled href="/" />
93
+ <Link bare underline color="positive" href="/">Learn more</Link>
94
+ <Link bare underline color="primary" href="/">Read docs</Link>
62
95
  </Row>
96
+
97
+ ```js
98
+ <Link bare underline color="positive" href="/docs">
99
+ Learn more
100
+ </Link>
63
101
  ```
64
102
 
65
- ## Border
103
+ ---
104
+
105
+ ## With icon
66
106
 
67
- The `Link` can have a border which will match the current text color
107
+ Add icons to reinforce the link's purpose or indicate external navigation.
68
108
 
69
109
  <Row gap="large" align="center" padding="large" justify="center">
70
- <Link border bare label="Positive" color="positive" href="/" />
71
- <Link border bare label="Primary" color="primary" href="/" />
72
- <Link border bare label="Negative" color="negative" href="/" />
73
- <Link border bare label="Disabled" color="positive" disabled href="/" />
74
- <Link border bare label="Dark" color="dark" href="/" />
75
- <Link border bare label="Light" color="light" href="/" />
110
+ <Link color="positive" icon="fa-external-link" iconPosition="right" href="/" target="_blank">External</Link>
111
+ <Link color="primary" icon="fa-download" href="/">Download</Link>
112
+ <Link bare color="primary" icon="fa-arrow-left" href="/">Back</Link>
76
113
  </Row>
77
114
 
78
115
  ```js
116
+ <Link
117
+ color="positive"
118
+ icon="fa-external-link"
119
+ iconPosition="right"
120
+ href="https://example.com"
121
+ target="_blank"
122
+ >
123
+ External link
124
+ </Link>
125
+
126
+ <Link color="primary" icon="fa-download" href="/file.pdf">
127
+ Download PDF
128
+ </Link>
129
+ ```
130
+
131
+ ---
132
+
133
+ ## Disabled state
134
+
135
+ Disabled links prevent navigation and display a muted appearance.
136
+
79
137
  <Row gap="large" align="center" padding="large" justify="center">
80
- <Link border bare label="Positive" color="positive" href="/" />
81
- <Link border bare label="Primary" color="primary" href="/" />
82
- <Link border bare label="Negative" color="negative" href="/" />
83
- <Link border bare label="Disabled" color="positive" disabled href="/" />
84
- <Link border bare label="Dark" color="dark" href="/" />
85
- <Link border bare label="Light" color="light" href="/" />
138
+ <Link color="positive" disabled href="/">Disabled</Link>
139
+ <Link bare color="positive" disabled href="/">Disabled bare</Link>
86
140
  </Row>
141
+
142
+ ```js
143
+ <Link color="positive" disabled href="/premium">
144
+ Premium only
145
+ </Link>
87
146
  ```
88
147
 
89
148
  ---
149
+
150
+ ## Link vs Button
151
+
152
+ Use `Link` when:
153
+ - The action navigates to a new page or URL
154
+ - You want the browser's native link behaviors (right-click, cmd+click)
155
+ - SEO matters for the destination
156
+
157
+ Use `Button` when:
158
+ - The action triggers an in-page operation
159
+ - No navigation occurs
160
+ - Form submissions