@charcuterie/ui 3.15.0 → 3.17.0
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/dist/Combobox/Combobox.d.ts.map +1 -1
- package/dist/Combobox/Combobox.js +35 -0
- package/dist/Combobox/Combobox.js.map +1 -1
- package/dist/MarkdownEditor/MarkdownEditor.d.ts +7 -1
- package/dist/MarkdownEditor/MarkdownEditor.d.ts.map +1 -1
- package/dist/MarkdownEditor/MarkdownEditor.js +1 -1
- package/dist/MarkdownEditor/MarkdownEditor.js.map +1 -1
- package/dist/RadioGroup/RadioGroup.d.ts +49 -1
- package/dist/RadioGroup/RadioGroup.d.ts.map +1 -1
- package/dist/RadioGroup/RadioGroup.js +58 -3
- package/dist/RadioGroup/RadioGroup.js.map +1 -1
- package/dist/RadioGroup/RadioGroupOption.d.ts +13 -2
- package/dist/RadioGroup/RadioGroupOption.d.ts.map +1 -1
- package/dist/RadioGroup/RadioGroupOption.js +62 -5
- package/dist/RadioGroup/RadioGroupOption.js.map +1 -1
- package/dist/markdownEditorCodeMirror/MarkdownEditorCodeMirror.d.ts.map +1 -1
- package/dist/markdownEditorCodeMirror/MarkdownEditorCodeMirror.js +1 -1
- package/dist/markdownEditorCodeMirror/MarkdownEditorCodeMirror.js.map +1 -1
- package/package.json +1 -1
- package/src/Combobox/Combobox.stories.tsx +16 -5
- package/src/Combobox/Combobox.test.tsx +45 -7
- package/src/Combobox/Combobox.tsx +44 -0
- package/src/MarkdownEditor/MarkdownEditor.mdx +12 -0
- package/src/MarkdownEditor/MarkdownEditor.stories.tsx +17 -0
- package/src/MarkdownEditor/MarkdownEditor.tsx +8 -0
- package/src/RadioGroup/RadioGroup.mdx +62 -0
- package/src/RadioGroup/RadioGroup.stories.tsx +164 -1
- package/src/RadioGroup/RadioGroup.test.tsx +179 -2
- package/src/RadioGroup/RadioGroup.tsx +107 -3
- package/src/RadioGroup/RadioGroupOption.tsx +122 -5
- package/src/icons.storyHelpers.tsx +108 -0
- package/src/markdownEditorCodeMirror/MarkdownEditorCodeMirror.mdx +16 -0
- package/src/markdownEditorCodeMirror/MarkdownEditorCodeMirror.stories.tsx +55 -0
- package/src/markdownEditorCodeMirror/MarkdownEditorCodeMirror.tsx +1 -0
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
StoryGrid,
|
|
6
6
|
} from "../board.storyHelpers.tsx"
|
|
7
7
|
import { Field } from "../Field/Field.tsx"
|
|
8
|
+
import { MARKDOWN_ICONS } from "../icons.storyHelpers.tsx"
|
|
8
9
|
import { MarkdownEditorCodeMirror } from "./MarkdownEditorCodeMirror.tsx"
|
|
9
10
|
|
|
10
11
|
/**
|
|
@@ -187,3 +188,57 @@ export const Tables: Story = {
|
|
|
187
188
|
label: "Description",
|
|
188
189
|
},
|
|
189
190
|
}
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* The same bar, with an app's icon set.
|
|
194
|
+
*
|
|
195
|
+
* Words are the default because the library ships no icons
|
|
196
|
+
* ([decision](../../../../docs/decisions/2026-07-29-ship-no-icons-and-no-symbol-glyphs.md)),
|
|
197
|
+
* and nine words is a bar that has already overflowed at the width
|
|
198
|
+
* a description field actually gets. Ten glyphs fit, so the
|
|
199
|
+
* overflow trigger is not drawn at all — and the words survive as
|
|
200
|
+
* the accessible names, which is what the toolbar test asserts.
|
|
201
|
+
*
|
|
202
|
+
* `overflow` is in the bag for the width where the bar *does* still
|
|
203
|
+
* collapse. Without it the row reads as nine icons and then the
|
|
204
|
+
* words "More actions".
|
|
205
|
+
*/
|
|
206
|
+
export const IconToolbar: Story = {
|
|
207
|
+
args: {
|
|
208
|
+
defaultValue: SAMPLE,
|
|
209
|
+
icons: MARKDOWN_ICONS,
|
|
210
|
+
label: "Description",
|
|
211
|
+
},
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* Icons and words at the width that separates them.
|
|
216
|
+
*
|
|
217
|
+
* Same component, same items, same container — the only difference
|
|
218
|
+
* is the `icons` bag. The word bar has collapsed most of its
|
|
219
|
+
* actions into "More actions"; the icon bar still shows all ten.
|
|
220
|
+
*/
|
|
221
|
+
export const IconsVersusWords: Story = {
|
|
222
|
+
args: { label: "Description" },
|
|
223
|
+
render: () => (
|
|
224
|
+
<StoryGrid columns={2}>
|
|
225
|
+
<StoryCell
|
|
226
|
+
align="stretch"
|
|
227
|
+
label="words (no icons passed)"
|
|
228
|
+
>
|
|
229
|
+
<MarkdownEditorCodeMirror
|
|
230
|
+
defaultValue="The default bar."
|
|
231
|
+
label="Words"
|
|
232
|
+
/>
|
|
233
|
+
</StoryCell>
|
|
234
|
+
|
|
235
|
+
<StoryCell align="stretch" label="icons">
|
|
236
|
+
<MarkdownEditorCodeMirror
|
|
237
|
+
defaultValue="The same bar, iconed."
|
|
238
|
+
icons={MARKDOWN_ICONS}
|
|
239
|
+
label="Icons"
|
|
240
|
+
/>
|
|
241
|
+
</StoryCell>
|
|
242
|
+
</StoryGrid>
|
|
243
|
+
),
|
|
244
|
+
}
|