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.
- package/.claude/settings.local.json +14 -1
- package/CLAUDE.md +72 -0
- package/README.md +43 -29
- package/dist/Badge.d.ts +2 -2
- package/dist/Badge.js.map +1 -1
- package/dist/BaseButton.d.ts +2 -2
- package/dist/BaseButton.js +2 -2
- package/dist/BaseButton.js.map +1 -1
- package/dist/BaseInput.d.ts +2 -2
- package/dist/BaseInput.js.map +1 -1
- package/dist/BaseLink.d.ts +2 -2
- package/dist/BaseLink.js +2 -2
- package/dist/BaseLink.js.map +1 -1
- package/dist/BaseListItem.d.ts +3 -3
- package/dist/BaseListItem.js.map +1 -1
- package/dist/BaseView.d.ts +2 -2
- package/dist/BaseView.js.map +1 -1
- package/dist/Calendar.d.ts +4 -4
- package/dist/DarkMode.js.map +1 -1
- package/dist/DateInput.d.ts +2 -2
- package/dist/DatePicker.js.map +1 -1
- package/dist/DatetimeInput.d.ts +2 -2
- package/dist/Dialog.d.ts +3 -3
- package/dist/Dialog.js.map +1 -1
- package/dist/Dropdown.d.ts +3 -3
- package/dist/Dropdown.js.map +1 -1
- package/dist/Icon.d.ts +3 -3
- package/dist/Icon.js +2 -21
- package/dist/Icon.js.map +1 -1
- package/dist/IconLink.js +2 -1
- package/dist/IconLink.js.map +1 -1
- package/dist/Interactable.d.ts +4 -4
- package/dist/Interactable.js +2 -2
- package/dist/Interactable.js.map +1 -1
- package/dist/ListButtonItem.js +2 -2
- package/dist/ListButtonItem.js.map +1 -1
- package/dist/ListLinkItem.js +2 -2
- package/dist/ListLinkItem.js.map +1 -1
- package/dist/MenuIcon.js.map +1 -1
- package/dist/NextJSRouter.js.map +1 -1
- package/dist/NextJSRouterState.js.map +1 -1
- package/dist/OnVisible.d.ts +1 -1
- package/dist/OnVisible.js.map +1 -1
- package/dist/Popover.d.ts +7 -7
- package/dist/Popover.js +2 -2
- package/dist/Popover.js.map +1 -1
- package/dist/ProgressBar.d.ts +2 -2
- package/dist/ProgressBar.js.map +1 -1
- package/dist/Providers.d.ts +2 -2
- package/dist/Providers.js +2 -2
- package/dist/Providers.js.map +1 -1
- package/dist/RangeInput.d.ts +3 -3
- package/dist/RangeInput.js +2 -2
- package/dist/RangeInput.js.map +1 -1
- package/dist/RootView.js.map +1 -1
- package/dist/Select.d.ts +2 -3
- package/dist/Select.js.map +1 -1
- package/dist/StaticCheckbox.js.map +1 -1
- package/dist/Storage.d.ts +2 -1
- package/dist/Storage.js.map +1 -1
- package/dist/Stream.js.map +1 -1
- package/dist/Sublist.d.ts +2 -2
- package/dist/Tabs.d.ts +4 -4
- package/dist/Tabs.js +2 -4
- package/dist/Tabs.js.map +1 -1
- package/dist/Text.d.ts +2 -2
- package/dist/Text.js.map +1 -1
- package/dist/TextArea.d.ts +2 -2
- package/dist/TextArea.js.map +1 -1
- package/dist/TextInput.d.ts +4 -3
- package/dist/TextInput.js +14 -5
- package/dist/TextInput.js.map +1 -1
- package/dist/TextPairing.d.ts +2 -2
- package/dist/TextPairing.js.map +1 -1
- package/dist/Tooltip.d.ts +4 -4
- package/dist/Tooltip.js.map +1 -1
- package/dist/aria.js.map +1 -1
- package/dist/hash.js.map +1 -1
- package/dist/jss.d.ts +21 -21
- package/dist/jss.js +6 -6
- package/dist/jss.js.map +1 -1
- package/dist/numberToBase.js.map +1 -1
- package/dist/stateMachineContextFactory.js.map +1 -1
- package/dist/useCookie.js.map +1 -1
- package/dist/useKeyboard.js.map +1 -1
- package/dist/useNavigation.js.map +1 -1
- package/dist/useRefEffect.js.map +1 -1
- package/next-env.d.ts +2 -1
- package/next.config.js +2 -1
- package/package.json +27 -20
- package/src/Badge.tsx +2 -2
- package/src/BaseButton.tsx +4 -4
- package/src/BaseInput.tsx +2 -2
- package/src/BaseLink.tsx +4 -4
- package/src/BaseListItem.tsx +3 -3
- package/src/BaseView.tsx +3 -3
- package/src/Calendar.tsx +4 -4
- package/src/DateInput.tsx +2 -2
- package/src/DatetimeInput.tsx +2 -2
- package/src/Dialog.tsx +3 -3
- package/src/Dropdown.tsx +4 -4
- package/src/Icon.tsx +4 -30
- package/src/IconLink.tsx +2 -1
- package/src/Interactable.tsx +4 -4
- package/src/ListButtonItem.tsx +2 -2
- package/src/ListLinkItem.tsx +2 -2
- package/src/MenuIcon.tsx +2 -2
- package/src/NextJSRouter.tsx +2 -2
- package/src/Popover.tsx +9 -9
- package/src/ProgressBar.tsx +3 -3
- package/src/Providers.tsx +4 -4
- package/src/RangeInput.tsx +5 -5
- package/src/Select.tsx +2 -2
- package/src/StaticCheckbox.tsx +2 -2
- package/src/Storage.tsx +1 -1
- package/src/Sublist.tsx +2 -2
- package/src/Tabs.tsx +4 -6
- package/src/Text.tsx +2 -2
- package/src/TextArea.tsx +2 -2
- package/src/TextInput.tsx +20 -8
- package/src/TextPairing.tsx +2 -2
- package/src/Tooltip.tsx +5 -5
- package/src/docs/mdx.tsx +40 -0
- package/src/docs/searchIndex.ts +1 -1
- package/src/jss.tsx +18 -18
- package/src/pages/Badge.mdx +136 -14
- package/src/pages/Button.mdx +121 -63
- package/src/pages/Calendar.mdx +196 -2
- package/src/pages/Card.mdx +123 -47
- package/src/pages/Checkbox.mdx +103 -28
- package/src/pages/Dialog.mdx +172 -7
- package/src/pages/FlexLayout.mdx +185 -51
- package/src/pages/Hashing.mdx +199 -8
- package/src/pages/Icon.mdx +150 -42
- package/src/pages/IconButton.mdx +127 -116
- package/src/pages/Link.mdx +118 -47
- package/src/pages/List.mdx +167 -283
- package/src/pages/ListHeader.mdx +157 -27
- package/src/pages/Popover.mdx +177 -55
- package/src/pages/ProgressBar.mdx +186 -6
- package/src/pages/ProgressCircle.mdx +196 -13
- package/src/pages/RangeInput.mdx +189 -61
- package/src/pages/Tabs.mdx +202 -346
- package/src/pages/Text.mdx +102 -81
- package/src/pages/TextInput.mdx +169 -44
- package/src/pages/TextPairing.mdx +164 -115
- package/src/pages/TimeInput.mdx +142 -37
- package/src/pages/Tooltip.mdx +99 -12
- package/src/pages/_app.tsx +14 -4
- package/src/pages/css-in-js.mdx +196 -83
- package/src/pages/navigation.mdx +122 -20
- package/src/pages/useCookie.mdx +168 -7
- package/src/pages/useKeyboard.mdx +242 -5
- package/src/pages/useNavigation.mdx +244 -16
- package/src/pages/usePromise.mdx +271 -6
- package/src/pages/useRefEffect.mdx +230 -28
- package/tsconfig.json +13 -4
package/src/pages/Link.mdx
CHANGED
|
@@ -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
|
|
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
|
-
##
|
|
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
|
-
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Color variants
|
|
13
34
|
|
|
14
|
-
|
|
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
|
|
23
|
-
<Link
|
|
24
|
-
<Link
|
|
25
|
-
<Link
|
|
26
|
-
<Link
|
|
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
|
|
33
|
-
<Link
|
|
34
|
-
<Link
|
|
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
|
-
##
|
|
70
|
+
## With border
|
|
44
71
|
|
|
45
|
-
|
|
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
|
|
49
|
-
<Link bare
|
|
50
|
-
<Link bare
|
|
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
|
|
59
|
-
<Link bare
|
|
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
|
-
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## With icon
|
|
66
106
|
|
|
67
|
-
|
|
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
|
|
71
|
-
<Link
|
|
72
|
-
<Link
|
|
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
|
|
81
|
-
<Link
|
|
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
|