@pondipondi/mimas 0.1.5 → 0.2.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/dist/components/crumbs/bubble-input.d.ts +33 -0
- package/dist/components/crumbs/{Button.d.ts → button.d.ts} +92 -106
- package/dist/components/crumbs/checkbox.d.ts +565 -0
- package/dist/components/crumbs/input-group.d.ts +29 -0
- package/dist/components/crumbs/input.d.ts +305 -0
- package/dist/components/crumbs/{LoadingRing.d.ts → loading-ring.d.ts} +3 -3
- package/dist/components/crumbs/select.d.ts +95 -0
- package/dist/components/crumbs/tooltip.d.ts +20 -0
- package/dist/components/frames/dialog.d.ts +17 -0
- package/dist/components/frames/drawer.d.ts +215 -0
- package/dist/components/frames/inset.d.ts +7 -0
- package/dist/components/frames/modal.d.ts +14 -0
- package/dist/components/frames/panel.d.ts +9 -0
- package/dist/components/index.d.ts +38 -9
- package/dist/components/layout/between.d.ts +7 -0
- package/dist/components/layout/centre.d.ts +7 -0
- package/dist/components/layout/column.d.ts +7 -0
- package/dist/components/layout/flex.d.ts +7 -0
- package/dist/components/layout/grid.d.ts +7 -0
- package/dist/components/plates/bar-chart.d.ts +55 -0
- package/dist/components/plates/heatmap.d.ts +31 -0
- package/dist/components/util/icons.d.ts +10 -0
- package/dist/components/util/{MimasProvider.d.ts → mimas-provider.d.ts} +1 -1
- package/dist/components/util/noise.d.ts +5 -0
- package/dist/components/util/palette.d.ts +36 -0
- package/dist/components/util/rabbet.d.ts +11 -0
- package/dist/config/palettes.d.ts +73 -0
- package/dist/hooks/use-async-component.d.ts +49 -0
- package/dist/hooks/use-container-width.d.ts +2 -0
- package/dist/index.d.ts +1 -0
- package/dist/lib/classnames.d.ts +2 -0
- package/dist/lib/colour.d.ts +17 -0
- package/dist/lib/corners.d.ts +20 -0
- package/dist/mimas.cjs.js +135 -10
- package/dist/mimas.es.js +16103 -1446
- package/dist/stories/Mimas/Crumbs/BubbleInput.stories.d.ts +42 -0
- package/dist/stories/Mimas/Crumbs/Button.stories.d.ts +5 -3
- package/dist/stories/Mimas/Crumbs/Checkbox.stories.d.ts +313 -0
- package/dist/stories/Mimas/Crumbs/Input.stories.d.ts +339 -0
- package/dist/stories/Mimas/Crumbs/InputGroup.stories.d.ts +36 -0
- package/dist/stories/Mimas/Crumbs/Select.stories.d.ts +13 -0
- package/dist/stories/Mimas/Crumbs/Tooltip.stories.d.ts +27 -0
- package/dist/stories/Mimas/Frames/Dialog.stories.d.ts +14 -0
- package/dist/stories/Mimas/Frames/Drawer.stories.d.ts +28 -0
- package/dist/stories/Mimas/Frames/Modal.stories.d.ts +17 -0
- package/dist/stories/Mimas/Plates/BarChart.stories.d.ts +20 -0
- package/dist/stories/Mimas/Plates/Heatmap.stories.d.ts +32 -0
- package/dist/stories/Mimas/Util/Palette.stories.d.ts +31 -0
- package/dist/style.css +1 -1
- package/package.json +79 -68
- package/dist/components/crumbs/ButtonGroup.d.ts +0 -11
- package/dist/components/crumbs/ToggleSet.d.ts +0 -2
- package/dist/components/frames/Inset.d.ts +0 -50
- package/dist/components/frames/Panel.d.ts +0 -50
- package/dist/components/layout/Flex.d.ts +0 -204
- package/dist/components/util/Noise.d.ts +0 -2
- package/dist/stories/Mimas/Crumbs/ButtonGroup.stories.d.ts +0 -25
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { BubbleInputProps } from "@/components";
|
|
2
|
+
import type { StoryObj } from "@storybook/react";
|
|
3
|
+
declare function BubbleInputStory({ defaultValue, ...props }: Omit<BubbleInputProps, "value" | "onChange"> & {
|
|
4
|
+
defaultValue?: number;
|
|
5
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare const meta: {
|
|
7
|
+
component: typeof BubbleInputStory;
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: string;
|
|
10
|
+
};
|
|
11
|
+
tags: string[];
|
|
12
|
+
argTypes: {
|
|
13
|
+
palette: {
|
|
14
|
+
control: "select";
|
|
15
|
+
options: ("red" | "orange" | "amber" | "yellow" | "lime" | "green" | "emerald" | "teal" | "cyan" | "sky" | "blue" | "indigo" | "violet" | "purple" | "fuchsia" | "pink" | "rose" | "slate" | "gray" | "zinc" | "neutral" | "stone")[];
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
args: {
|
|
19
|
+
min: number;
|
|
20
|
+
max: any;
|
|
21
|
+
increment: number;
|
|
22
|
+
targetBubbleCount: number;
|
|
23
|
+
palette: "violet";
|
|
24
|
+
className: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export default meta;
|
|
28
|
+
type Story = StoryObj<typeof meta>;
|
|
29
|
+
/** An unbounded range — try clicking the rightmost bubble a few times to see the window slide. */
|
|
30
|
+
export declare const Playground: Story;
|
|
31
|
+
/** Bounded to [0, 8] — the window stops sliding and clamps once it hits either edge. */
|
|
32
|
+
export declare const Bounded: Story;
|
|
33
|
+
/** `min=0, max=1, increment=1` swaps to a two-state tick/cross view. */
|
|
34
|
+
export declare const BooleanView: Story;
|
|
35
|
+
/** A larger step and a custom label formatter. */
|
|
36
|
+
export declare const CustomIncrement: Story;
|
|
37
|
+
/** A tighter window of 3 bubbles instead of the default 5. */
|
|
38
|
+
export declare const NarrowWindow: Story;
|
|
39
|
+
/** Width is just a normal className — the slot pitch stretches to fill it, bubble size stays fixed. */
|
|
40
|
+
export declare const Widths: Story;
|
|
41
|
+
/** Every bundled palette side by side. */
|
|
42
|
+
export declare const Palettes: Story;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { Button } from "@/components";
|
|
2
1
|
import type { StoryObj } from "@storybook/react";
|
|
3
2
|
declare const meta: {
|
|
4
|
-
component:
|
|
3
|
+
component: import("react").ForwardRefExoticComponent<import("../../../components/crumbs/button").ButtonProps & import("react").RefAttributes<HTMLButtonElement>> & {
|
|
4
|
+
_rabbet: true;
|
|
5
|
+
};
|
|
5
6
|
parameters: {
|
|
6
7
|
layout: string;
|
|
7
8
|
};
|
|
@@ -31,7 +32,7 @@ declare const meta: {
|
|
|
31
32
|
args: {
|
|
32
33
|
size: "large";
|
|
33
34
|
colour: "base";
|
|
34
|
-
|
|
35
|
+
children: string;
|
|
35
36
|
width: "fit";
|
|
36
37
|
corners: "round";
|
|
37
38
|
};
|
|
@@ -39,3 +40,4 @@ declare const meta: {
|
|
|
39
40
|
export default meta;
|
|
40
41
|
type Story = StoryObj<typeof meta>;
|
|
41
42
|
export declare const Primary: Story;
|
|
43
|
+
export declare const Icon: Story;
|
|
@@ -0,0 +1,313 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/react";
|
|
2
|
+
declare const meta: {
|
|
3
|
+
component: import("react").ForwardRefExoticComponent<Omit<import("@radix-ui/react-checkbox").CheckboxProps & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("tailwind-variants").VariantProps<import("tailwind-variants").TVReturnType<{
|
|
4
|
+
size: {
|
|
5
|
+
small: {
|
|
6
|
+
outer: string;
|
|
7
|
+
input: string;
|
|
8
|
+
};
|
|
9
|
+
medium: {
|
|
10
|
+
outer: string;
|
|
11
|
+
input: string;
|
|
12
|
+
};
|
|
13
|
+
large: {
|
|
14
|
+
outer: string;
|
|
15
|
+
input: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
corners: {
|
|
19
|
+
sharp: {
|
|
20
|
+
input: string;
|
|
21
|
+
};
|
|
22
|
+
round: {
|
|
23
|
+
input: string;
|
|
24
|
+
};
|
|
25
|
+
circle: {
|
|
26
|
+
input: string;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
leftCorners: {
|
|
30
|
+
none: {};
|
|
31
|
+
sharp: {
|
|
32
|
+
input: string;
|
|
33
|
+
};
|
|
34
|
+
round: {
|
|
35
|
+
input: string;
|
|
36
|
+
};
|
|
37
|
+
circle: {
|
|
38
|
+
input: string;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
}, {
|
|
42
|
+
outer: string;
|
|
43
|
+
input: string;
|
|
44
|
+
}, undefined, import("tailwind-variants/dist/config.js").TVConfig<{
|
|
45
|
+
size: {
|
|
46
|
+
small: {
|
|
47
|
+
outer: string;
|
|
48
|
+
input: string;
|
|
49
|
+
};
|
|
50
|
+
medium: {
|
|
51
|
+
outer: string;
|
|
52
|
+
input: string;
|
|
53
|
+
};
|
|
54
|
+
large: {
|
|
55
|
+
outer: string;
|
|
56
|
+
input: string;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
corners: {
|
|
60
|
+
sharp: {
|
|
61
|
+
input: string;
|
|
62
|
+
};
|
|
63
|
+
round: {
|
|
64
|
+
input: string;
|
|
65
|
+
};
|
|
66
|
+
circle: {
|
|
67
|
+
input: string;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
leftCorners: {
|
|
71
|
+
none: {};
|
|
72
|
+
sharp: {
|
|
73
|
+
input: string;
|
|
74
|
+
};
|
|
75
|
+
round: {
|
|
76
|
+
input: string;
|
|
77
|
+
};
|
|
78
|
+
circle: {
|
|
79
|
+
input: string;
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
}, {
|
|
83
|
+
size: {
|
|
84
|
+
small: {
|
|
85
|
+
outer: string;
|
|
86
|
+
input: string;
|
|
87
|
+
};
|
|
88
|
+
medium: {
|
|
89
|
+
outer: string;
|
|
90
|
+
input: string;
|
|
91
|
+
};
|
|
92
|
+
large: {
|
|
93
|
+
outer: string;
|
|
94
|
+
input: string;
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
corners: {
|
|
98
|
+
sharp: {
|
|
99
|
+
input: string;
|
|
100
|
+
};
|
|
101
|
+
round: {
|
|
102
|
+
input: string;
|
|
103
|
+
};
|
|
104
|
+
circle: {
|
|
105
|
+
input: string;
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
leftCorners: {
|
|
109
|
+
none: {};
|
|
110
|
+
sharp: {
|
|
111
|
+
input: string;
|
|
112
|
+
};
|
|
113
|
+
round: {
|
|
114
|
+
input: string;
|
|
115
|
+
};
|
|
116
|
+
circle: {
|
|
117
|
+
input: string;
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
}>, {
|
|
121
|
+
size: {
|
|
122
|
+
small: {
|
|
123
|
+
outer: string;
|
|
124
|
+
input: string;
|
|
125
|
+
};
|
|
126
|
+
medium: {
|
|
127
|
+
outer: string;
|
|
128
|
+
input: string;
|
|
129
|
+
};
|
|
130
|
+
large: {
|
|
131
|
+
outer: string;
|
|
132
|
+
input: string;
|
|
133
|
+
};
|
|
134
|
+
};
|
|
135
|
+
corners: {
|
|
136
|
+
sharp: {
|
|
137
|
+
input: string;
|
|
138
|
+
};
|
|
139
|
+
round: {
|
|
140
|
+
input: string;
|
|
141
|
+
};
|
|
142
|
+
circle: {
|
|
143
|
+
input: string;
|
|
144
|
+
};
|
|
145
|
+
};
|
|
146
|
+
leftCorners: {
|
|
147
|
+
none: {};
|
|
148
|
+
sharp: {
|
|
149
|
+
input: string;
|
|
150
|
+
};
|
|
151
|
+
round: {
|
|
152
|
+
input: string;
|
|
153
|
+
};
|
|
154
|
+
circle: {
|
|
155
|
+
input: string;
|
|
156
|
+
};
|
|
157
|
+
};
|
|
158
|
+
}, {
|
|
159
|
+
outer: string;
|
|
160
|
+
input: string;
|
|
161
|
+
}, import("tailwind-variants").TVReturnType<{
|
|
162
|
+
size: {
|
|
163
|
+
small: {
|
|
164
|
+
outer: string;
|
|
165
|
+
input: string;
|
|
166
|
+
};
|
|
167
|
+
medium: {
|
|
168
|
+
outer: string;
|
|
169
|
+
input: string;
|
|
170
|
+
};
|
|
171
|
+
large: {
|
|
172
|
+
outer: string;
|
|
173
|
+
input: string;
|
|
174
|
+
};
|
|
175
|
+
};
|
|
176
|
+
corners: {
|
|
177
|
+
sharp: {
|
|
178
|
+
input: string;
|
|
179
|
+
};
|
|
180
|
+
round: {
|
|
181
|
+
input: string;
|
|
182
|
+
};
|
|
183
|
+
circle: {
|
|
184
|
+
input: string;
|
|
185
|
+
};
|
|
186
|
+
};
|
|
187
|
+
leftCorners: {
|
|
188
|
+
none: {};
|
|
189
|
+
sharp: {
|
|
190
|
+
input: string;
|
|
191
|
+
};
|
|
192
|
+
round: {
|
|
193
|
+
input: string;
|
|
194
|
+
};
|
|
195
|
+
circle: {
|
|
196
|
+
input: string;
|
|
197
|
+
};
|
|
198
|
+
};
|
|
199
|
+
}, {
|
|
200
|
+
outer: string;
|
|
201
|
+
input: string;
|
|
202
|
+
}, undefined, import("tailwind-variants/dist/config.js").TVConfig<{
|
|
203
|
+
size: {
|
|
204
|
+
small: {
|
|
205
|
+
outer: string;
|
|
206
|
+
input: string;
|
|
207
|
+
};
|
|
208
|
+
medium: {
|
|
209
|
+
outer: string;
|
|
210
|
+
input: string;
|
|
211
|
+
};
|
|
212
|
+
large: {
|
|
213
|
+
outer: string;
|
|
214
|
+
input: string;
|
|
215
|
+
};
|
|
216
|
+
};
|
|
217
|
+
corners: {
|
|
218
|
+
sharp: {
|
|
219
|
+
input: string;
|
|
220
|
+
};
|
|
221
|
+
round: {
|
|
222
|
+
input: string;
|
|
223
|
+
};
|
|
224
|
+
circle: {
|
|
225
|
+
input: string;
|
|
226
|
+
};
|
|
227
|
+
};
|
|
228
|
+
leftCorners: {
|
|
229
|
+
none: {};
|
|
230
|
+
sharp: {
|
|
231
|
+
input: string;
|
|
232
|
+
};
|
|
233
|
+
round: {
|
|
234
|
+
input: string;
|
|
235
|
+
};
|
|
236
|
+
circle: {
|
|
237
|
+
input: string;
|
|
238
|
+
};
|
|
239
|
+
};
|
|
240
|
+
}, {
|
|
241
|
+
size: {
|
|
242
|
+
small: {
|
|
243
|
+
outer: string;
|
|
244
|
+
input: string;
|
|
245
|
+
};
|
|
246
|
+
medium: {
|
|
247
|
+
outer: string;
|
|
248
|
+
input: string;
|
|
249
|
+
};
|
|
250
|
+
large: {
|
|
251
|
+
outer: string;
|
|
252
|
+
input: string;
|
|
253
|
+
};
|
|
254
|
+
};
|
|
255
|
+
corners: {
|
|
256
|
+
sharp: {
|
|
257
|
+
input: string;
|
|
258
|
+
};
|
|
259
|
+
round: {
|
|
260
|
+
input: string;
|
|
261
|
+
};
|
|
262
|
+
circle: {
|
|
263
|
+
input: string;
|
|
264
|
+
};
|
|
265
|
+
};
|
|
266
|
+
leftCorners: {
|
|
267
|
+
none: {};
|
|
268
|
+
sharp: {
|
|
269
|
+
input: string;
|
|
270
|
+
};
|
|
271
|
+
round: {
|
|
272
|
+
input: string;
|
|
273
|
+
};
|
|
274
|
+
circle: {
|
|
275
|
+
input: string;
|
|
276
|
+
};
|
|
277
|
+
};
|
|
278
|
+
}>, unknown, unknown, undefined>>> & {
|
|
279
|
+
icon?: import("react").ReactNode;
|
|
280
|
+
} & import("react").RefAttributes<HTMLButtonElement>> & {
|
|
281
|
+
_rabbet: true;
|
|
282
|
+
};
|
|
283
|
+
parameters: {
|
|
284
|
+
layout: string;
|
|
285
|
+
};
|
|
286
|
+
tags: string[];
|
|
287
|
+
argTypes: {
|
|
288
|
+
corners: {
|
|
289
|
+
control: "radio";
|
|
290
|
+
options: string[];
|
|
291
|
+
};
|
|
292
|
+
size: {
|
|
293
|
+
control: "radio";
|
|
294
|
+
options: string[];
|
|
295
|
+
};
|
|
296
|
+
};
|
|
297
|
+
args: {
|
|
298
|
+
corners: "round";
|
|
299
|
+
size: "medium";
|
|
300
|
+
};
|
|
301
|
+
};
|
|
302
|
+
export default meta;
|
|
303
|
+
type Story = StoryObj<typeof meta>;
|
|
304
|
+
export declare const Basic: Story;
|
|
305
|
+
/** The same `sharp / round / circle` scale as Button. */
|
|
306
|
+
export declare const Corners: Story;
|
|
307
|
+
export declare const Sizes: Story;
|
|
308
|
+
/** Unchecked, checked, disabled, and disabled-checked. */
|
|
309
|
+
export declare const States: Story;
|
|
310
|
+
/** The indicator icon can be swapped, e.g. for an indeterminate state. */
|
|
311
|
+
export declare const CustomIcon: Story;
|
|
312
|
+
/** A typical labelled checklist. */
|
|
313
|
+
export declare const Checklist: Story;
|