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
package/src/jss.tsx CHANGED
@@ -11,13 +11,13 @@ export type Styles = CSS.Properties<
11
11
  string | number | CSS.Properties<string | number>
12
12
  >;
13
13
 
14
- export type JSStyle =
14
+ export type JSS =
15
15
  | Styles
16
16
  | null
17
17
  | false
18
18
  | undefined
19
19
  | { [key: string]: Styles }
20
- | Array<JSStyle>;
20
+ | Array<JSS>;
21
21
 
22
22
  const aliases: {
23
23
  [alias: string]: (value: StylesValueType) => [string, StylesValueType][];
@@ -137,21 +137,21 @@ const getCSS = (key: string, value): [string, string] => {
137
137
  return [cssProp, cssValue];
138
138
  };
139
139
 
140
- const flattenJSStyle = (jss: JSStyle): Styles => {
140
+ const flattenJSS = (jss: JSS): Styles => {
141
141
  if (!jss) {
142
142
  return {};
143
143
  } else if (Array.isArray(jss)) {
144
144
  // @ts-ignore
145
- return jss.reduce((acc: Styles, jss: JSStyle) => {
146
- return { ...acc, ...flattenJSStyle(jss) };
145
+ return jss.reduce((acc: Styles, jss: JSS) => {
146
+ return { ...acc, ...flattenJSS(jss) };
147
147
  }, {});
148
148
  } else {
149
149
  return jss;
150
150
  }
151
151
  };
152
152
 
153
- export const toClassnames = (jss: JSStyle): string => {
154
- jss = flattenJSStyle(jss);
153
+ export const toClassnames = (jss: JSS): string => {
154
+ jss = flattenJSS(jss);
155
155
 
156
156
  const stylesStack = Object.entries(jss);
157
157
  const classNames = [];
@@ -205,12 +205,12 @@ export const toClassnames = (jss: JSStyle): string => {
205
205
 
206
206
  const serverStyles = [];
207
207
 
208
- export function JSStylesProvider({
208
+ export function JSSProvider({
209
209
  themes,
210
210
  children,
211
211
  }: {
212
212
  themes: { dark: Theme; light: Theme };
213
- children: JSX.Element;
213
+ children: React.JSX.Element;
214
214
  }) {
215
215
  const stylesRef = useRef<string[] | null>(null);
216
216
 
@@ -324,7 +324,7 @@ export function getSpacing(spacing: Spacing): string {
324
324
  }
325
325
  }
326
326
 
327
- export function getPadding(padding: Padding): JSStyle {
327
+ export function getPadding(padding: Padding): JSS {
328
328
  if (Array.isArray(padding)) {
329
329
  const [vertical, horizontal] = padding;
330
330
  return {
@@ -340,7 +340,7 @@ export function getPadding(padding: Padding): JSStyle {
340
340
  }
341
341
  }
342
342
 
343
- export function getMargin(margin: Margin): JSStyle {
343
+ export function getMargin(margin: Margin): JSS {
344
344
  if (Array.isArray(margin)) {
345
345
  const [vertical, horizontal] = margin;
346
346
  return {
@@ -534,10 +534,10 @@ const backgroundStyles = {
534
534
  backgroundColor: cssVar("--highlight"),
535
535
  },
536
536
  light: {
537
- backgroundColor: "white",
537
+ backgroundColor: cssVar("--light-text"),
538
538
  },
539
539
  dark: {
540
- backgroundColor: "black",
540
+ backgroundColor: cssVar("--primary-text"),
541
541
  },
542
542
  warning: {
543
543
  backgroundColor: cssVar("--warning"),
@@ -559,7 +559,7 @@ const backgroundStyles = {
559
559
  },
560
560
  };
561
561
 
562
- export const getBackground = (color: Color): JSStyle => {
562
+ export const getBackground = (color: Color): JSS => {
563
563
  return backgroundStyles[color];
564
564
  };
565
565
 
@@ -572,25 +572,25 @@ export const TABLET_MEDIA = `@media (min-width: ${MOBILE}px) and (max-width: ${T
572
572
  export const LAPTOP_MEDIA = `@media (min-width: ${TABLET}px) and (max-width: ${LAPTOP}px)`;
573
573
  export const DESKTOP_MEDIA = `@media (min-width: ${LAPTOP}px)`;
574
574
 
575
- export function mobile(jss: JSStyle): { [key: string]: JSStyle } {
575
+ export function mobile(jss: JSS): { [key: string]: JSS } {
576
576
  return {
577
577
  [MOBILE_MEDIA]: jss,
578
578
  };
579
579
  }
580
580
 
581
- export function tablet(jss: JSStyle): { [key: string]: JSStyle } {
581
+ export function tablet(jss: JSS): { [key: string]: JSS } {
582
582
  return {
583
583
  [TABLET_MEDIA]: jss,
584
584
  };
585
585
  }
586
586
 
587
- export function laptop(jss: JSStyle): { [key: string]: JSStyle } {
587
+ export function laptop(jss: JSS): { [key: string]: JSS } {
588
588
  return {
589
589
  [LAPTOP_MEDIA]: jss,
590
590
  };
591
591
  }
592
592
 
593
- export function desktop(jss: JSStyle): { [key: string]: JSStyle } {
593
+ export function desktop(jss: JSS): { [key: string]: JSS } {
594
594
  return {
595
595
  [DESKTOP_MEDIA]: jss,
596
596
  };
@@ -1,30 +1,152 @@
1
1
  import { Badge } from "../Badge";
2
2
  import { Row } from "../Row";
3
+ import { Column } from "../Column";
4
+ import { Span } from "../Text";
5
+ import { IconButton } from "../IconButton";
3
6
 
4
7
  # Badge
5
8
 
6
- This is a simple component that can be used to bring attention to a specific part of the user interface, for example an unread notification, an update, an important element...
9
+ A small circular indicator used to draw attention to specific UI elements. Common uses include notification counts, status indicators, and visual markers.
7
10
 
8
11
  ---
9
12
 
10
- The `Badge` component supports all colours and sizes
13
+ ## Props
11
14
 
12
- <Row gap="large" align="center" justify="center">
13
- <Badge size="xsmall" color="negative" />
14
- <Badge size="small" color="warning" />
15
- <Badge size="medium" color="highlight" />
16
- <Badge size="large" color="secondary-background" />
17
- <Badge size="xlarge" color="divider" />
15
+ | Prop | Type | Default | Description |
16
+ |------|------|---------|-------------|
17
+ | `size` | `Size` | `"medium"` | Badge size: `"xsmall"` (4px), `"small"` (6px), `"medium"` (12px), `"large"` (18px), `"xlarge"` (24px) |
18
+ | `color` | `Color` | `"highlight"` | Background color from theme |
19
+
20
+ ---
21
+
22
+ ## Sizes
23
+
24
+ <Row gap="large" align="center" justify="center" padding="medium">
25
+ <Column align="center" gap="small">
26
+ <Badge size="xsmall" />
27
+ <Span size="small" color="secondary">xsmall</Span>
28
+ </Column>
29
+ <Column align="center" gap="small">
30
+ <Badge size="small" />
31
+ <Span size="small" color="secondary">small</Span>
32
+ </Column>
33
+ <Column align="center" gap="small">
34
+ <Badge size="medium" />
35
+ <Span size="small" color="secondary">medium</Span>
36
+ </Column>
37
+ <Column align="center" gap="small">
38
+ <Badge size="large" />
39
+ <Span size="small" color="secondary">large</Span>
40
+ </Column>
41
+ <Column align="center" gap="small">
42
+ <Badge size="xlarge" />
43
+ <Span size="small" color="secondary">xlarge</Span>
44
+ </Column>
18
45
  </Row>
19
46
 
20
47
  ```js
21
- <Row gap="large" align="center" justify="center">
22
- <Badge size="xsmall" color="negative" />
23
- <Badge size="small" color="warning" />
24
- <Badge size="medium" color="highlight" />
25
- <Badge size="large" color="secondary-background" />
26
- <Badge size="xlarge" color="divider" />
48
+ <Badge size="xsmall" /> // 4px
49
+ <Badge size="small" /> // 6px
50
+ <Badge size="medium" /> // 12px (default)
51
+ <Badge size="large" /> // 18px
52
+ <Badge size="xlarge" /> // 24px
53
+ ```
54
+
55
+ ---
56
+
57
+ ## Colors
58
+
59
+ <Row gap="large" align="center" justify="center" padding="medium">
60
+ <Column align="center" gap="small">
61
+ <Badge color="highlight" />
62
+ <Span size="small" color="secondary">highlight</Span>
63
+ </Column>
64
+ <Column align="center" gap="small">
65
+ <Badge color="negative" />
66
+ <Span size="small" color="secondary">negative</Span>
67
+ </Column>
68
+ <Column align="center" gap="small">
69
+ <Badge color="warning" />
70
+ <Span size="small" color="secondary">warning</Span>
71
+ </Column>
72
+ <Column align="center" gap="small">
73
+ <Badge color="divider" />
74
+ <Span size="small" color="secondary">divider</Span>
75
+ </Column>
27
76
  </Row>
77
+
78
+ ```js
79
+ <Badge color="highlight" /> // Accent/brand color
80
+ <Badge color="negative" /> // Error/alert
81
+ <Badge color="warning" /> // Warning
82
+ <Badge color="divider" /> // Neutral/muted
28
83
  ```
29
84
 
30
85
  ---
86
+
87
+ ## Common use cases
88
+
89
+ ### Notification indicator
90
+
91
+ <Row gap="medium" align="center" padding="medium">
92
+ <Row jss={{ position: "relative" }}>
93
+ <IconButton bare icon="fa-bell" size="large" color="secondary" onClick={() => {}} />
94
+ <Badge size="small" color="negative" jss={{ position: "absolute", top: 0, right: 0 }} />
95
+ </Row>
96
+ <Span color="secondary">Unread notifications</Span>
97
+ </Row>
98
+
99
+ ```js
100
+ <Row jss={{ position: "relative" }}>
101
+ <IconButton bare icon="fa-bell" size="large" color="secondary" onClick={() => {}} />
102
+ <Badge
103
+ size="small"
104
+ color="negative"
105
+ jss={{ position: "absolute", top: 0, right: 0 }}
106
+ />
107
+ </Row>
108
+ ```
109
+
110
+ ### Status indicator
111
+
112
+ <Column gap="small" padding="medium">
113
+ <Row gap="small" align="center">
114
+ <Badge size="small" color="highlight" />
115
+ <Span>Online</Span>
116
+ </Row>
117
+ <Row gap="small" align="center">
118
+ <Badge size="small" color="warning" />
119
+ <Span>Away</Span>
120
+ </Row>
121
+ <Row gap="small" align="center">
122
+ <Badge size="small" color="divider" />
123
+ <Span>Offline</Span>
124
+ </Row>
125
+ </Column>
126
+
127
+ ```js
128
+ <Row gap="small" align="center">
129
+ <Badge size="small" color="highlight" />
130
+ <Span>Online</Span>
131
+ </Row>
132
+ ```
133
+
134
+ ---
135
+
136
+ ## Visual markers
137
+
138
+ Use badges to highlight new or important items:
139
+
140
+ <Row gap="medium" align="center" padding="medium">
141
+ <Row gap="small" align="center">
142
+ <Span>New feature</Span>
143
+ <Badge size="xsmall" color="highlight" />
144
+ </Row>
145
+ </Row>
146
+
147
+ ```js
148
+ <Row gap="small" align="center">
149
+ <Span>New feature</Span>
150
+ <Badge size="xsmall" color="highlight" />
151
+ </Row>
152
+ ```
@@ -1,105 +1,163 @@
1
1
  import { Button } from "../Button";
2
2
  import { Row } from "../Row";
3
+ import { Column } from "../Column";
4
+ import { Icon } from "../Icon";
3
5
 
4
6
  # Button
5
7
 
6
- The `Button` component can be used for the user to take actions with a single click, it supports a variety of styles each of them with different semantics.
8
+ The `Button` component enables users to trigger actions with a single click. It supports multiple color variants for different semantic purposes and can include icons.
7
9
 
8
10
  ---
9
11
 
10
- ## Button variants
12
+ ## Props
13
+
14
+ | Prop | Type | Required | Default | Description |
15
+ |------|------|----------|---------|-------------|
16
+ | `children` | `string` | Yes | - | Button text label |
17
+ | `color` | `InteractableColor` | Yes | - | `"positive"`, `"primary"`, `"negative"`, `"dark"`, `"light"` |
18
+ | `onClick` | `function` | Yes | - | Click handler |
19
+ | `bare` | `boolean` | No | `false` | Removes background for a lighter appearance |
20
+ | `border` | `boolean` | No | `false` | Adds a border matching the text color |
21
+ | `disabled` | `boolean` | No | `false` | Disables interaction |
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
+ | `bold` | `boolean` | No | `false` | Bold text |
11
28
 
12
- The basic `Button` 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.
29
+ ---
30
+
31
+ ## Color variants
32
+
33
+ Each color variant communicates a different intent to users:
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
+ - **Positive**: Confirmations, submissions, primary actions
36
+ - **Primary**: Secondary or neutral actions
37
+ - **Negative**: Destructive actions like delete or remove
38
+ - **Dark/Light**: Theme-specific variants for special contexts
20
39
 
21
40
  <Row gap="large" align="center" padding="large" justify="center">
22
- <Button label="Positive" color="positive" onClick={() => {}} />
23
- <Button label="Primary" color="primary" onClick={() => {}} />
24
- <Button label="Negative" color="negative" onClick={() => {}} />
25
- <Button label="Disabled" color="positive" disabled onClick={() => {}} />
26
- <Button label="Dark" color="dark" onClick={() => {}} />
27
- <Button label="Light" color="light" onClick={() => {}} />
41
+ <Button color="positive" onClick={() => {}}>Positive</Button>
42
+ <Button color="primary" onClick={() => {}}>Primary</Button>
43
+ <Button color="negative" onClick={() => {}}>Negative</Button>
44
+ <Button color="dark" onClick={() => {}}>Dark</Button>
45
+ <Button color="light" onClick={() => {}}>Light</Button>
28
46
  </Row>
29
47
 
30
48
  ```js
49
+ <Button color="positive" onClick={() => {}}>Positive</Button>
50
+ <Button color="primary" onClick={() => {}}>Primary</Button>
51
+ <Button color="negative" onClick={() => {}}>Negative</Button>
52
+ <Button color="dark" onClick={() => {}}>Dark</Button>
53
+ <Button color="light" onClick={() => {}}>Light</Button>
54
+ ```
55
+
56
+ ---
57
+
58
+ ## Bare variant
59
+
60
+ The `bare` prop removes the background color, creating a lighter appearance that integrates well within complex layouts or when you need a less prominent action.
61
+
31
62
  <Row gap="large" align="center" padding="large" justify="center">
32
- <Button label="Positive" color="positive" onClick={() => {}} />
33
- <Button label="Primary" color="primary" onClick={() => {}} />
34
- <Button label="Negative" color="negative" onClick={() => {}} />
35
- <Button label="Disabled" color="positive" disabled onClick={() => {}} />
36
- <Button label="Dark" color="dark" onClick={() => {}} />
37
- <Button label="Light" color="light" onClick={() => {}} />
63
+ <Button bare color="positive" onClick={() => {}}>Positive</Button>
64
+ <Button bare color="primary" onClick={() => {}}>Primary</Button>
65
+ <Button bare color="negative" onClick={() => {}}>Negative</Button>
66
+ <Button bare color="dark" onClick={() => {}}>Dark</Button>
67
+ <Button bare color="light" onClick={() => {}}>Light</Button>
38
68
  </Row>
69
+
70
+ ```js
71
+ <Button bare color="positive" onClick={() => {}}>Positive</Button>
72
+ <Button bare color="primary" onClick={() => {}}>Primary</Button>
73
+ <Button bare color="negative" onClick={() => {}}>Negative</Button>
39
74
  ```
40
75
 
41
76
  ---
42
77
 
43
- ## Bare button
78
+ ## With border
44
79
 
45
- The bare `Button` variants fulfill the same function than the basic counterparts but have a lighter style that can be more easily integrated in complex components.
80
+ Add a `border` prop to give buttons a defined edge. Works well with `bare` for outlined button styles.
46
81
 
47
82
  <Row gap="large" align="center" padding="large" justify="center">
48
- <Button bare label="Positive" color="positive" onClick={() => {}} />
49
- <Button bare label="Primary" color="primary" onClick={() => {}} />
50
- <Button bare label="Negative" color="negative" onClick={() => {}} />
51
- <Button bare label="Disabled" color="positive" disabled onClick={() => {}} />
52
- <Button bare label="Dark" color="dark" onClick={() => {}} />
53
- <Button bare label="Light" color="light" onClick={() => {}} />
83
+ <Button border bare color="positive" onClick={() => {}}>Positive</Button>
84
+ <Button border bare color="primary" onClick={() => {}}>Primary</Button>
85
+ <Button border bare color="negative" onClick={() => {}}>Negative</Button>
54
86
  </Row>
55
87
 
56
88
  ```js
89
+ <Button border bare color="positive" onClick={() => {}}>Outlined</Button>
90
+ <Button border bare color="primary" onClick={() => {}}>Outlined</Button>
91
+ <Button border bare color="negative" onClick={() => {}}>Outlined</Button>
92
+ ```
93
+
94
+ ---
95
+
96
+ ## With icon
97
+
98
+ Buttons can include icons to reinforce their purpose. Use `icon` to specify the icon and `iconPosition` to place it on the left or right.
99
+
57
100
  <Row gap="large" align="center" padding="large" justify="center">
58
- <Button bare label="Positive" color="positive" onClick={() => {}} />
59
- <Button bare label="Primary" color="primary" onClick={() => {}} />
60
- <Button bare label="Negative" color="negative" onClick={() => {}} />
61
- <Button bare label="Disabled" color="positive" disabled onClick={() => {}} />
62
- <Button bare label="Dark" color="dark" onClick={() => {}} />
63
- <Button bare label="Light" color="light" onClick={() => {}} />
101
+ <Button color="positive" icon="fa-check" onClick={() => {}}>Confirm</Button>
102
+ <Button color="negative" icon="fa-trash" onClick={() => {}}>Delete</Button>
103
+ <Button color="primary" icon="fa-arrow-right" iconPosition="right" onClick={() => {}}>Next</Button>
64
104
  </Row>
105
+
106
+ ```js
107
+ <Button color="positive" icon="fa-check" onClick={() => {}}>
108
+ Confirm
109
+ </Button>
110
+
111
+ <Button color="negative" icon="fa-trash" onClick={() => {}}>
112
+ Delete
113
+ </Button>
114
+
115
+ <Button color="primary" icon="fa-arrow-right" iconPosition="right" onClick={() => {}}>
116
+ Next
117
+ </Button>
65
118
  ```
66
119
 
67
- ## Border
120
+ ---
121
+
122
+ ## Disabled state
68
123
 
69
- The `Button` can have a border which will match the current text color
124
+ Disabled buttons prevent interaction and display a muted appearance. The component uses `aria-disabled` for accessibility.
70
125
 
71
126
  <Row gap="large" align="center" padding="large" justify="center">
72
- <Button border bare label="Positive" color="positive" onClick={() => {}} />
73
- <Button border bare label="Primary" color="primary" onClick={() => {}} />
74
- <Button border bare label="Negative" color="negative" onClick={() => {}} />
75
- <Button
76
- border
77
- bare
78
- label="Disabled"
79
- color="positive"
80
- disabled
81
- onClick={() => {}}
82
- />
83
- <Button border bare label="Dark" color="dark" onClick={() => {}} />
84
- <Button border bare label="Light" color="light" onClick={() => {}} />
127
+ <Button color="positive" disabled onClick={() => {}}>Disabled</Button>
128
+ <Button bare color="positive" disabled onClick={() => {}}>Disabled bare</Button>
129
+ <Button border bare color="positive" disabled onClick={() => {}}>Disabled outlined</Button>
85
130
  </Row>
86
131
 
87
132
  ```js
133
+ <Button color="positive" disabled onClick={() => {}}>
134
+ Disabled
135
+ </Button>
136
+ ```
137
+
138
+ ---
139
+
140
+ ## Sizes
141
+
142
+ Control text size with the `size` prop. Available sizes: `"xsmall"`, `"small"`, `"medium"`, `"large"`, `"xlarge"`.
143
+
88
144
  <Row gap="large" align="center" padding="large" justify="center">
89
- <Button border bare label="Positive" color="positive" onClick={() => {}} />
90
- <Button border bare label="Primary" color="primary" onClick={() => {}} />
91
- <Button border bare label="Negative" color="negative" onClick={() => {}} />
92
- <Button
93
- border
94
- bare
95
- label="Disabled"
96
- color="positive"
97
- disabled
98
- onClick={() => {}}
99
- />
100
- <Button border bare label="Dark" color="dark" onClick={() => {}} />
101
- <Button border bare label="Light" color="light" onClick={() => {}} />
145
+ <Button color="positive" size="small" onClick={() => {}}>Small</Button>
146
+ <Button color="positive" size="medium" onClick={() => {}}>Medium</Button>
147
+ <Button color="positive" size="large" onClick={() => {}}>Large</Button>
102
148
  </Row>
149
+
150
+ ```js
151
+ <Button color="positive" size="small" onClick={() => {}}>Small</Button>
152
+ <Button color="positive" size="medium" onClick={() => {}}>Medium</Button>
153
+ <Button color="positive" size="large" onClick={() => {}}>Large</Button>
103
154
  ```
104
155
 
105
156
  ---
157
+
158
+ ## Accessibility
159
+
160
+ - Buttons use semantic `<button>` elements
161
+ - Disabled state is communicated via `aria-disabled` attribute
162
+ - Focus states are clearly visible with outline styling
163
+ - Click handlers are ignored when disabled, preventing accidental actions