reshaped 3.8.8 → 3.9.0-canary.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 (191) hide show
  1. package/dist/bundle.css +1 -1
  2. package/dist/bundle.js +11 -11
  3. package/dist/components/Button/Button.module.css +1 -1
  4. package/dist/components/Card/Card.d.ts +1 -1
  5. package/dist/components/Divider/Divider.js +3 -3
  6. package/dist/components/Divider/Divider.module.css +1 -1
  7. package/dist/components/Divider/Divider.types.d.ts +6 -0
  8. package/dist/components/DropdownMenu/DropdownMenu.js +1 -1
  9. package/dist/components/DropdownMenu/DropdownMenu.types.d.ts +1 -1
  10. package/dist/components/Flyout/Flyout.constants.d.ts +1 -3
  11. package/dist/components/Flyout/Flyout.constants.js +1 -3
  12. package/dist/components/Flyout/Flyout.types.d.ts +2 -0
  13. package/dist/components/Flyout/FlyoutControlled.js +10 -11
  14. package/dist/components/Flyout/utilities/cooldown.js +1 -2
  15. package/dist/components/Icon/Icon.module.css +1 -1
  16. package/dist/components/Popover/Popover.types.d.ts +1 -1
  17. package/dist/components/Progress/Progress.module.css +1 -1
  18. package/dist/components/Select/Select.module.css +1 -1
  19. package/dist/components/Select/Select.types.d.ts +16 -11
  20. package/dist/components/Select/SelectCustomControlled.js +27 -10
  21. package/dist/components/Select/SelectGroup.d.ts +4 -0
  22. package/dist/components/Select/SelectGroup.js +10 -0
  23. package/dist/components/Select/SelectTrigger.js +1 -1
  24. package/dist/components/Select/index.d.ts +3 -2
  25. package/dist/components/Select/index.js +3 -2
  26. package/dist/components/Tabs/TabsContext.d.ts +1 -1
  27. package/dist/components/TextArea/TextArea.module.css +1 -1
  28. package/dist/components/TextArea/TextArea.types.d.ts +1 -1
  29. package/dist/components/TextField/TextField.module.css +1 -1
  30. package/dist/components/TextField/TextField.types.d.ts +1 -1
  31. package/dist/components/Tooltip/Tooltip.types.d.ts +1 -1
  32. package/dist/config/tailwind.d.ts +1 -1
  33. package/package.json +31 -30
  34. package/dist/components/Accordion/tests/Accordion.stories.d.ts +0 -44
  35. package/dist/components/Accordion/tests/Accordion.stories.js +0 -204
  36. package/dist/components/ActionBar/tests/ActionBar.stories.d.ts +0 -40
  37. package/dist/components/ActionBar/tests/ActionBar.stories.js +0 -223
  38. package/dist/components/Actionable/tests/Actionable.stories.d.ts +0 -41
  39. package/dist/components/Actionable/tests/Actionable.stories.js +0 -220
  40. package/dist/components/Alert/tests/Alert.stories.d.ts +0 -24
  41. package/dist/components/Alert/tests/Alert.stories.js +0 -78
  42. package/dist/components/Autocomplete/tests/Autocomplete.stories.d.ts +0 -32
  43. package/dist/components/Autocomplete/tests/Autocomplete.stories.js +0 -246
  44. package/dist/components/Avatar/tests/Avatar.stories.d.ts +0 -31
  45. package/dist/components/Avatar/tests/Avatar.stories.js +0 -176
  46. package/dist/components/Badge/tests/Badge.stories.d.ts +0 -55
  47. package/dist/components/Badge/tests/Badge.stories.js +0 -328
  48. package/dist/components/Breadcrumbs/tests/Breadcrumbs.stories.d.ts +0 -40
  49. package/dist/components/Breadcrumbs/tests/Breadcrumbs.stories.js +0 -187
  50. package/dist/components/Button/tests/Button.stories.d.ts +0 -79
  51. package/dist/components/Button/tests/Button.stories.js +0 -789
  52. package/dist/components/Calendar/tests/Calendar.stories.d.ts +0 -29
  53. package/dist/components/Calendar/tests/Calendar.stories.js +0 -255
  54. package/dist/components/Card/tests/Card.stories.d.ts +0 -52
  55. package/dist/components/Card/tests/Card.stories.js +0 -125
  56. package/dist/components/Carousel/tests/Carousel.stories.d.ts +0 -34
  57. package/dist/components/Carousel/tests/Carousel.stories.js +0 -224
  58. package/dist/components/Checkbox/tests/Checkbox.stories.d.ts +0 -30
  59. package/dist/components/Checkbox/tests/Checkbox.stories.js +0 -171
  60. package/dist/components/CheckboxGroup/tests/CheckboxGroup.stories.d.ts +0 -19
  61. package/dist/components/CheckboxGroup/tests/CheckboxGroup.stories.js +0 -83
  62. package/dist/components/Container/tests/Container.stories.d.ts +0 -24
  63. package/dist/components/Container/tests/Container.stories.js +0 -75
  64. package/dist/components/ContextMenu/tests/ContextMenu.stories.d.ts +0 -26
  65. package/dist/components/ContextMenu/tests/ContextMenu.stories.js +0 -70
  66. package/dist/components/Dismissible/tests/Dismissible.stories.d.ts +0 -25
  67. package/dist/components/Dismissible/tests/Dismissible.stories.js +0 -97
  68. package/dist/components/Divider/tests/Divider.stories.d.ts +0 -18
  69. package/dist/components/Divider/tests/Divider.stories.js +0 -94
  70. package/dist/components/DropdownMenu/tests/DropdownMenu.stories.d.ts +0 -53
  71. package/dist/components/DropdownMenu/tests/DropdownMenu.stories.js +0 -278
  72. package/dist/components/FileUpload/tests/FileUpload.stories.d.ts +0 -31
  73. package/dist/components/FileUpload/tests/FileUpload.stories.js +0 -140
  74. package/dist/components/Flyout/tests/Flyout.stories.d.ts +0 -102
  75. package/dist/components/Flyout/tests/Flyout.stories.js +0 -708
  76. package/dist/components/FormControl/tests/FormControl.stories.d.ts +0 -31
  77. package/dist/components/FormControl/tests/FormControl.stories.js +0 -143
  78. package/dist/components/Grid/tests/Grid.stories.d.ts +0 -38
  79. package/dist/components/Grid/tests/Grid.stories.js +0 -245
  80. package/dist/components/Hidden/tests/Hidden.stories.d.ts +0 -16
  81. package/dist/components/Hidden/tests/Hidden.stories.js +0 -48
  82. package/dist/components/HiddenVisually/tests/HiddenVisually.stories.d.ts +0 -16
  83. package/dist/components/HiddenVisually/tests/HiddenVisually.stories.js +0 -28
  84. package/dist/components/Hotkey/tests/Hotkey.stories.d.ts +0 -13
  85. package/dist/components/Hotkey/tests/Hotkey.stories.js +0 -53
  86. package/dist/components/Icon/tests/Icon.stories.d.ts +0 -25
  87. package/dist/components/Icon/tests/Icon.stories.js +0 -113
  88. package/dist/components/Image/tests/Image.stories.d.ts +0 -41
  89. package/dist/components/Image/tests/Image.stories.js +0 -196
  90. package/dist/components/Link/tests/Link.stories.d.ts +0 -42
  91. package/dist/components/Link/tests/Link.stories.js +0 -155
  92. package/dist/components/Loader/tests/Loader.stories.d.ts +0 -21
  93. package/dist/components/Loader/tests/Loader.stories.js +0 -68
  94. package/dist/components/MenuItem/tests/MenuItem.stories.d.ts +0 -59
  95. package/dist/components/MenuItem/tests/MenuItem.stories.js +0 -236
  96. package/dist/components/Modal/tests/Modal.stories.d.ts +0 -64
  97. package/dist/components/Modal/tests/Modal.stories.js +0 -410
  98. package/dist/components/NumberField/tests/NumberField.stories.d.ts +0 -28
  99. package/dist/components/NumberField/tests/NumberField.stories.js +0 -258
  100. package/dist/components/Overlay/tests/Overlay.stories.d.ts +0 -28
  101. package/dist/components/Overlay/tests/Overlay.stories.js +0 -202
  102. package/dist/components/Pagination/tests/Pagination.stories.d.ts +0 -24
  103. package/dist/components/Pagination/tests/Pagination.stories.js +0 -105
  104. package/dist/components/PinField/tests/PinField.stories.d.ts +0 -34
  105. package/dist/components/PinField/tests/PinField.stories.js +0 -209
  106. package/dist/components/Popover/tests/Popover.stories.d.ts +0 -69
  107. package/dist/components/Popover/tests/Popover.stories.js +0 -340
  108. package/dist/components/Progress/tests/Progress.stories.d.ts +0 -30
  109. package/dist/components/Progress/tests/Progress.stories.js +0 -102
  110. package/dist/components/ProgressIndicator/tests/ProgressIndicator.stories.d.ts +0 -19
  111. package/dist/components/ProgressIndicator/tests/ProgressIndicator.stories.js +0 -92
  112. package/dist/components/Radio/tests/Radio.stories.d.ts +0 -35
  113. package/dist/components/Radio/tests/Radio.stories.js +0 -162
  114. package/dist/components/RadioGroup/tests/RadioGroup.stories.d.ts +0 -19
  115. package/dist/components/RadioGroup/tests/RadioGroup.stories.js +0 -77
  116. package/dist/components/Reshaped/tests/Reshaped.stories.d.ts +0 -34
  117. package/dist/components/Reshaped/tests/Reshaped.stories.js +0 -108
  118. package/dist/components/Resizable/tests/Resizable.stories.d.ts +0 -38
  119. package/dist/components/Resizable/tests/Resizable.stories.js +0 -185
  120. package/dist/components/Scrim/tests/Scrim.stories.d.ts +0 -20
  121. package/dist/components/Scrim/tests/Scrim.stories.js +0 -67
  122. package/dist/components/ScrollArea/tests/ScrollArea.stories.d.ts +0 -37
  123. package/dist/components/ScrollArea/tests/ScrollArea.stories.js +0 -244
  124. package/dist/components/Select/SelectOptionGroup.d.ts +0 -4
  125. package/dist/components/Select/SelectOptionGroup.js +0 -9
  126. package/dist/components/Select/tests/Select.stories.d.ts +0 -47
  127. package/dist/components/Select/tests/Select.stories.js +0 -520
  128. package/dist/components/Skeleton/tests/Skeleton.stories.d.ts +0 -20
  129. package/dist/components/Skeleton/tests/Skeleton.stories.js +0 -63
  130. package/dist/components/Slider/tests/Slider.stories.d.ts +0 -47
  131. package/dist/components/Slider/tests/Slider.stories.js +0 -279
  132. package/dist/components/Stepper/tests/Stepper.stories.d.ts +0 -31
  133. package/dist/components/Stepper/tests/Stepper.stories.js +0 -135
  134. package/dist/components/Switch/tests/Switch.stories.d.ts +0 -22
  135. package/dist/components/Switch/tests/Switch.stories.js +0 -137
  136. package/dist/components/Switch/tests/Switch.test.stories.d.ts +0 -13
  137. package/dist/components/Switch/tests/Switch.test.stories.js +0 -11
  138. package/dist/components/Table/tests/Table.stories.d.ts +0 -42
  139. package/dist/components/Table/tests/Table.stories.js +0 -348
  140. package/dist/components/Tabs/tests/Tabs.stories.d.ts +0 -62
  141. package/dist/components/Tabs/tests/Tabs.stories.js +0 -539
  142. package/dist/components/Text/tests/Text.stories.d.ts +0 -48
  143. package/dist/components/Text/tests/Text.stories.js +0 -201
  144. package/dist/components/TextArea/tests/TextArea.stories.d.ts +0 -53
  145. package/dist/components/TextArea/tests/TextArea.stories.js +0 -200
  146. package/dist/components/TextField/tests/TextField.stories.d.ts +0 -53
  147. package/dist/components/TextField/tests/TextField.stories.js +0 -237
  148. package/dist/components/Theme/tests/Theme.stories.d.ts +0 -25
  149. package/dist/components/Theme/tests/Theme.stories.js +0 -171
  150. package/dist/components/Timeline/tests/Timeline.stories.d.ts +0 -22
  151. package/dist/components/Timeline/tests/Timeline.stories.js +0 -86
  152. package/dist/components/Toast/tests/Toast.stories.d.ts +0 -41
  153. package/dist/components/Toast/tests/Toast.stories.js +0 -432
  154. package/dist/components/ToggleButton/tests/ToggleButton.stories.d.ts +0 -27
  155. package/dist/components/ToggleButton/tests/ToggleButton.stories.js +0 -97
  156. package/dist/components/ToggleButtonGroup/tests/ToggleButtonGroup.stories.d.ts +0 -27
  157. package/dist/components/ToggleButtonGroup/tests/ToggleButtonGroup.stories.js +0 -169
  158. package/dist/components/Tooltip/tests/Tooltip.stories.d.ts +0 -28
  159. package/dist/components/Tooltip/tests/Tooltip.stories.js +0 -182
  160. package/dist/components/View/tests/View.stories.d.ts +0 -141
  161. package/dist/components/View/tests/View.stories.js +0 -1329
  162. package/dist/components/_private/Portal/tests/Portal.stories.d.ts +0 -6
  163. package/dist/components/_private/Portal/tests/Portal.stories.js +0 -17
  164. package/dist/hooks/tests/useDrag.stories.d.ts +0 -31
  165. package/dist/hooks/tests/useDrag.stories.js +0 -147
  166. package/dist/hooks/tests/useElementId.stories.d.ts +0 -11
  167. package/dist/hooks/tests/useElementId.stories.js +0 -23
  168. package/dist/hooks/tests/useHandlerRef.stories.d.ts +0 -14
  169. package/dist/hooks/tests/useHandlerRef.stories.js +0 -44
  170. package/dist/hooks/tests/useHotkeys.stories.d.ts +0 -43
  171. package/dist/hooks/tests/useHotkeys.stories.js +0 -158
  172. package/dist/hooks/tests/useKeyboardArrowNavigation.stories.d.ts +0 -15
  173. package/dist/hooks/tests/useKeyboardArrowNavigation.stories.js +0 -128
  174. package/dist/hooks/tests/useKeyboardMode.stories.d.ts +0 -11
  175. package/dist/hooks/tests/useKeyboardMode.stories.js +0 -42
  176. package/dist/hooks/tests/useOnClickOutside.stories.d.ts +0 -23
  177. package/dist/hooks/tests/useOnClickOutside.stories.js +0 -111
  178. package/dist/hooks/tests/useRTL.stories.d.ts +0 -11
  179. package/dist/hooks/tests/useRTL.stories.js +0 -23
  180. package/dist/hooks/tests/useResponsiveClientValue.stories.d.ts +0 -18
  181. package/dist/hooks/tests/useResponsiveClientValue.stories.js +0 -30
  182. package/dist/hooks/tests/useScrollLock.stories.d.ts +0 -14
  183. package/dist/hooks/tests/useScrollLock.stories.js +0 -97
  184. package/dist/hooks/tests/useToggle.stories.d.ts +0 -13
  185. package/dist/hooks/tests/useToggle.stories.js +0 -59
  186. package/dist/tests/ShadowDOM.stories.d.ts +0 -6
  187. package/dist/tests/ShadowDOM.stories.js +0 -110
  188. package/dist/tests/themes.stories.d.ts +0 -16
  189. package/dist/tests/themes.stories.js +0 -327
  190. package/dist/utilities/a11y/tests/TrapFocus.stories.d.ts +0 -14
  191. package/dist/utilities/a11y/tests/TrapFocus.stories.js +0 -615
@@ -1,327 +0,0 @@
1
- import { useLayoutEffect, useState } from "react";
2
- import { Example } from "../utilities/storybook/index.js";
3
- import View from "../components/View/index.js";
4
- import Button from "../components/Button/index.js";
5
- import Badge from "../components/Badge/index.js";
6
- import Alert from "../components/Alert/index.js";
7
- import Card from "../components/Card/index.js";
8
- import Avatar from "../components/Avatar/index.js";
9
- import DropdownMenu from "../components/DropdownMenu/index.js";
10
- import TextField from "../components/TextField/index.js";
11
- import Theme, { useTheme } from "../components/Theme/index.js";
12
- import IconZap from "../icons/Mic.js";
13
- import Link from "../components/Link/index.js";
14
- import Text from "../components/Text/index.js";
15
- import { getThemeCSS, generateThemeColors, baseThemeDefinition } from "../themes/index.js";
16
- import ThemePlayground from "./ThemesPlayground.js";
17
- import Actionable from "../components/Actionable/index.js";
18
- import Switch from "../components/Switch/index.js";
19
- export default {
20
- title: "Internal/Themes",
21
- parameters: {
22
- iframe: { url: "https://reshaped.so/docs/tokens/theming/runtime-theming" },
23
- a11y: {
24
- // This option disables all a11y checks on this story
25
- disable: true,
26
- },
27
- },
28
- };
29
- const colors = [
30
- "#2563eb",
31
- "#4f39f6",
32
- "#4a8200",
33
- "#0891b2",
34
- "#34d399",
35
- "#fe9a00",
36
- "#be185d",
37
- "#ff2056",
38
- "#000000",
39
- ];
40
- export const test = () => {
41
- const { colorMode } = useTheme();
42
- const [activeColor, setColor] = useState(colors[0]);
43
- const [theme, setTheme] = useState("");
44
- const [algo, setAlgo] = useState("wcag");
45
- useLayoutEffect(() => {
46
- setTheme(getThemeCSS("test", {
47
- color: generateThemeColors({
48
- primary: activeColor === colors[0] ? undefined : activeColor,
49
- }),
50
- }, {
51
- colorContrastAlgorithm: algo,
52
- }));
53
- }, [activeColor, algo]);
54
- return (<>
55
- <style>{theme}</style>
56
- <Theme name="test">
57
- <View gap={4}>
58
- <View direction="row" align="center" gap={4}>
59
- {colors.map((color) => {
60
- const hex = colorMode === "dark" && color === "#000000" ? "#ffffff" : color;
61
- return (<Actionable key={color} onClick={() => setColor(color)} borderRadius="inherit">
62
- <View width={5} height={5} borderRadius="circular" attributes={{
63
- style: {
64
- transition: `box-shadow var(--rs-duration-fast) var(--rs-easing-standard)`,
65
- background: hex,
66
- boxShadow: color === activeColor
67
- ? `0 0 0 3px var(--rs-color-background-elevation-base), 0 0 0 5px ${hex}`
68
- : undefined,
69
- },
70
- }}/>
71
- </Actionable>);
72
- })}
73
- <View.Item gapBefore="auto">
74
- <Switch name="algo" onChange={(args) => setAlgo(args.checked ? "apca" : "wcag")}>
75
- Use APCA
76
- </Switch>
77
- </View.Item>
78
- </View>
79
-
80
- <ThemePlayground />
81
- </View>
82
- </Theme>
83
- </>);
84
- };
85
- const css = getThemeCSS("green", {
86
- color: {
87
- backgroundPrimary: { hex: "#1abc9c", hexDark: "#00E5C4" },
88
- backgroundPrimaryHighlighted: { hex: "#16a085", hexDark: "#00E5C4" },
89
- },
90
- });
91
- const css2 = getThemeCSS("peach", {
92
- color: {
93
- backgroundPrimary: { hex: "#ffbe76" },
94
- backgroundPrimaryHighlighted: { hex: "#ffbe76" },
95
- },
96
- });
97
- const cssGenerated = getThemeCSS("generated", {
98
- ...baseThemeDefinition,
99
- color: generateThemeColors({
100
- primary: "#0369a1" /*"#5a58f2"*/ /* "#2563eb" */,
101
- }),
102
- });
103
- const componentExamples = (<View gap={4} padding={6} backgroundColor="page">
104
- <Text variant="featured-2">Hello world</Text>
105
- <Text color="neutral-faded" variant="featured-2">
106
- Hello world faded
107
- </Text>
108
- <Text color="disabled" variant="featured-2">
109
- Hello world disabled
110
- </Text>
111
-
112
- <View gap={2} direction="row">
113
- <Button color="primary" onClick={() => { }}>
114
- Primary button
115
- </Button>
116
- <Button color="critical" onClick={() => { }}>
117
- Critical button
118
- </Button>
119
- <Button color="positive" onClick={() => { }}>
120
- Positive button
121
- </Button>
122
- <View height={9} width={20} borderRadius="small" backgroundColor="warning"/>
123
- <Button color="neutral" onClick={() => { }}>
124
- Neutral button
125
- </Button>
126
- <Button color="neutral" disabled onClick={() => { }}>
127
- Disabled button
128
- </Button>
129
- </View>
130
- <View gap={2} direction="row">
131
- <Button color="primary" variant="outline" onClick={() => { }}>
132
- Primary button
133
- </Button>
134
- <Button color="critical" variant="outline" onClick={() => { }}>
135
- Critical button
136
- </Button>
137
- <Button color="positive" variant="outline" onClick={() => { }}>
138
- Positive button
139
- </Button>
140
- <Button color="neutral" variant="outline" onClick={() => { }}>
141
- Neutral button
142
- </Button>
143
- </View>
144
- <View direction="row" gap={4}>
145
- <View.Item columns={6}>
146
- <Alert color="primary" title="Hello" icon={IconZap} actionsSlot={<Link color="primary">Action</Link>}>
147
- Primary
148
- </Alert>
149
- </View.Item>
150
- <View.Item columns={6}>
151
- <Alert color="critical" title="Hello" icon={IconZap} actionsSlot={<Link color="critical">Action</Link>}>
152
- Critical
153
- </Alert>
154
- </View.Item>
155
- <View.Item columns={6}>
156
- <Alert color="warning" title="Hello" icon={IconZap} actionsSlot={<Text color="warning">
157
- <Link color="inherit">Action</Link>
158
- </Text>}>
159
- Warning
160
- </Alert>
161
- </View.Item>
162
- <View.Item columns={6}>
163
- <Alert color="positive" title="Hello" icon={IconZap} actionsSlot={<Link color="positive">Action</Link>}>
164
- Positive
165
- </Alert>
166
- </View.Item>
167
- <View.Item columns={6}>
168
- <Alert color="neutral" title="Hello" icon={IconZap} actionsSlot={<Link color="primary">Action</Link>}>
169
- Neutral
170
- </Alert>
171
- </View.Item>
172
- <View.Item columns={12}>
173
- <View direction="row" gap={2}>
174
- <View backgroundColor="neutral" width={10} height={10}/>
175
- <View backgroundColor="neutral-faded" width={10} height={10}/>
176
- <View backgroundColor="primary" width={10} height={10}/>
177
- <View backgroundColor="primary-faded" width={10} height={10}/>
178
- <View backgroundColor="critical" width={10} height={10}/>
179
- <View backgroundColor="critical-faded" width={10} height={10}/>
180
- <View backgroundColor="warning" width={10} height={10}/>
181
- <View backgroundColor="warning-faded" width={10} height={10}/>
182
- <View backgroundColor="positive" width={10} height={10}/>
183
- <View backgroundColor="positive-faded" width={10} height={10}/>
184
- </View>
185
- </View.Item>
186
- <View.Item columns={12}>
187
- <View direction="row" gap={2}>
188
- <Avatar initials="RS" color="warning" variant="faded"/>
189
- <Badge color="warning">Warning</Badge>
190
- </View>
191
- </View.Item>
192
- <View.Item columns={12}>
193
- <View direction="row">
194
- <View padding={4} gap={4} backgroundColor="page">
195
- Page
196
- <View backgroundColor="neutral" padding={4}>
197
- Neutral
198
- </View>
199
- <View backgroundColor="neutral-faded" padding={4}>
200
- Neutral faded
201
- </View>
202
- </View>
203
-
204
- <View padding={4} gap={4} backgroundColor="page-faded">
205
- Page faded
206
- <View backgroundColor="neutral" padding={4}>
207
- Neutral
208
- </View>
209
- <View backgroundColor="neutral-faded" padding={4}>
210
- Neutral faded
211
- </View>
212
- </View>
213
- </View>
214
- </View.Item>
215
- <View.Item columns={6}>
216
- <Card>
217
- <View gap={2} align="start">
218
- <Badge variant="outline" color="primary">
219
- Badge
220
- </Badge>
221
- <View gap={2} direction="row">
222
- <DropdownMenu>
223
- <DropdownMenu.Trigger>
224
- {(attributes) => (<Button variant="faded" attributes={attributes}>
225
- Menu
226
- </Button>)}
227
- </DropdownMenu.Trigger>
228
- <DropdownMenu.Content>
229
- <DropdownMenu.Item>Item 1</DropdownMenu.Item>
230
- <DropdownMenu.Item>Item 1</DropdownMenu.Item>
231
- <br />
232
- <View backgroundColor="neutral-faded" padding={4}>
233
- Hello
234
- </View>
235
- </DropdownMenu.Content>
236
- </DropdownMenu>
237
- <Button variant="outline">Button</Button>
238
- </View>
239
-
240
- <TextField name="h" placeholder="hello" disabled/>
241
- <TextField name="h" placeholder="hello" value="2323"/>
242
- </View>
243
- </Card>
244
- </View.Item>
245
- <View.Item columns={6}>
246
- <Card elevated>
247
- <View gap={2} align="start">
248
- <Badge variant="outline" color="primary">
249
- Badge
250
- </Badge>
251
-
252
- <TextField name="h" placeholder="hello" value="2323" disabled/>
253
- <TextField name="h" placeholder="hello" value="2323"/>
254
-
255
- <Button color="neutral" disabled onClick={() => { }}>
256
- Disabled button
257
- </Button>
258
- </View>
259
- </Card>
260
- </View.Item>
261
- </View>
262
- </View>);
263
- export const base = () => (<Example>
264
- <Example.Item title="custom runtime theme">
265
- <style>{css}</style>
266
- <Theme name="green">
267
- <Button color="primary">Primary button</Button>
268
- </Theme>
269
- </Example.Item>
270
- <Example.Item title="on colors generation">
271
- <style>{css2}</style>
272
- <Theme name="peach">
273
- <Button color="primary">Primary button</Button>
274
- </Theme>
275
- </Example.Item>
276
- </Example>);
277
- export const generation = () => (<div>
278
- <style>{cssGenerated}</style>
279
- <Theme name="generated">{componentExamples}</Theme>
280
- </div>);
281
- const onColorsCss = getThemeCSS("on-color", {
282
- color: {
283
- backgroundPrimary: { hex: "#1abc9c", hexDark: "#16a085" },
284
- backgroundPrimaryHighlighted: { hex: "#16a085", hexDark: "#1abc9c" },
285
- },
286
- }, {
287
- onColorValues: {
288
- primary: {
289
- hexLight: "#d1fae5",
290
- hexDark: "#022c22",
291
- },
292
- },
293
- });
294
- const onColorsCssApca = getThemeCSS("on-color-apca", {
295
- color: {
296
- backgroundPrimary: { hex: "#1abc9c", hexDark: "#16a085" },
297
- backgroundPrimaryHighlighted: { hex: "#16a085", hexDark: "#1abc9c" },
298
- },
299
- }, {
300
- colorContrastAlgorithm: "apca",
301
- onColorValues: {
302
- primary: {
303
- hexLight: "#d1fae5",
304
- hexDark: "#022c22",
305
- },
306
- },
307
- });
308
- export const onColors = () => (<Example>
309
- <Example.Item title="custom on color values">
310
- <style>{onColorsCss}</style>
311
- <Theme name="on-color">
312
- <View gap={2} direction="row">
313
- <Button color="primary">Primary button</Button>
314
- <Button color="critical">Critical button</Button>
315
- </View>
316
- </Theme>
317
- </Example.Item>
318
- <Example.Item title="custom on color values, apca">
319
- <style>{onColorsCssApca}</style>
320
- <Theme name="on-color-apca">
321
- <View gap={2} direction="row">
322
- <Button color="primary">Primary button</Button>
323
- <Button color="critical">Critical button</Button>
324
- </View>
325
- </Theme>
326
- </Example.Item>
327
- </Example>);
@@ -1,14 +0,0 @@
1
- import { StoryObj } from "@storybook/react-vite";
2
- declare const _default: {
3
- title: string;
4
- };
5
- export default _default;
6
- export declare const modeDialog: StoryObj;
7
- export declare const modeActionMenu: StoryObj;
8
- export declare const modeActionBar: StoryObj;
9
- export declare const modeContentMenu: StoryObj;
10
- export declare const includeTrigger: StoryObj;
11
- export declare const initialFocusEl: StoryObj;
12
- export declare const focusableElements: StoryObj;
13
- export declare const nested: StoryObj;
14
- export declare const mutationObserver: StoryObj;