@dust-tt/sparkle 0.2.263 → 0.2.265-rc-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/cjs/index.js +96 -63
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/components/Button.d.ts +2 -3
- package/dist/esm/components/Button.d.ts.map +1 -1
- package/dist/esm/components/Button.js +10 -31
- package/dist/esm/components/Button.js.map +1 -1
- package/dist/esm/components/Input.d.ts +2 -11
- package/dist/esm/components/Input.d.ts.map +1 -1
- package/dist/esm/components/Input.js +9 -14
- package/dist/esm/components/Input.js.map +1 -1
- package/dist/esm/components/Label.d.ts +5 -0
- package/dist/esm/components/Label.d.ts.map +1 -0
- package/dist/esm/components/Label.js +12 -0
- package/dist/esm/components/Label.js.map +1 -0
- package/dist/esm/components/Searchbar.js +4 -4
- package/dist/esm/components/Searchbar.js.map +1 -1
- package/dist/esm/components/index.d.ts +2 -1
- package/dist/esm/components/index.d.ts.map +1 -1
- package/dist/esm/components/index.js +2 -1
- package/dist/esm/components/index.js.map +1 -1
- package/dist/esm/stories/Button.stories.d.ts.map +1 -1
- package/dist/esm/stories/Button.stories.js +1 -9
- package/dist/esm/stories/Button.stories.js.map +1 -1
- package/dist/esm/stories/DataTable.stories.js +4 -4
- package/dist/esm/stories/DataTable.stories.js.map +1 -1
- package/dist/esm/stories/Input.stories.d.ts +1 -14
- package/dist/esm/stories/Input.stories.d.ts.map +1 -1
- package/dist/esm/stories/Input.stories.js +9 -9
- package/dist/esm/stories/Input.stories.js.map +1 -1
- package/dist/esm/stories/Label.stories.d.ts +8 -0
- package/dist/esm/stories/Label.stories.d.ts.map +1 -0
- package/dist/esm/stories/Label.stories.js +17 -0
- package/dist/esm/stories/Label.stories.js.map +1 -0
- package/dist/esm/stories/Modal.stories.js +1 -1
- package/dist/esm/stories/Modal.stories.js.map +1 -1
- package/dist/sparkle.css +83 -32
- package/package.json +2 -1
- package/src/components/Button.tsx +11 -40
- package/src/components/Input.tsx +26 -60
- package/src/components/Label.tsx +23 -0
- package/src/components/Searchbar.tsx +4 -4
- package/src/components/index.ts +9 -3
- package/src/stories/Button.stories.tsx +0 -47
- package/src/stories/DataTable.stories.tsx +4 -4
- package/src/stories/Input.stories.tsx +3 -10
- package/src/stories/Label.stories.tsx +25 -0
- package/src/stories/Modal.stories.tsx +1 -1
|
@@ -13,7 +13,7 @@ export default meta;
|
|
|
13
13
|
export const InputExample = () => (
|
|
14
14
|
<div className="s-flex s-flex-col s-gap-20">
|
|
15
15
|
<div className="s-grid s-grid-cols-3 s-gap-4">
|
|
16
|
-
<Input placeholder="placeholder" name="input"
|
|
16
|
+
<Input placeholder="placeholder" name="input" />
|
|
17
17
|
<Input
|
|
18
18
|
placeholder="placeholder"
|
|
19
19
|
name="input"
|
|
@@ -38,15 +38,15 @@ export const InputExample = () => (
|
|
|
38
38
|
placeholder="placeholder"
|
|
39
39
|
name="input"
|
|
40
40
|
value={"disabled"}
|
|
41
|
+
disabled={true}
|
|
41
42
|
showErrorLabel
|
|
42
43
|
/>
|
|
43
44
|
</div>
|
|
44
45
|
<div className="s-grid s-grid-cols-3 s-gap-4">
|
|
45
|
-
<Input placeholder="placeholder" name="input"
|
|
46
|
+
<Input placeholder="placeholder" name="input" />
|
|
46
47
|
<Input
|
|
47
48
|
placeholder="placeholder"
|
|
48
49
|
name="input"
|
|
49
|
-
size="md"
|
|
50
50
|
value={"value"}
|
|
51
51
|
error={"errored because it's a very long message"}
|
|
52
52
|
showErrorLabel
|
|
@@ -54,14 +54,12 @@ export const InputExample = () => (
|
|
|
54
54
|
<Input
|
|
55
55
|
placeholder="placeholder"
|
|
56
56
|
name="input"
|
|
57
|
-
size="md"
|
|
58
57
|
value={"value"}
|
|
59
58
|
error={"errored"}
|
|
60
59
|
/>
|
|
61
60
|
<Input
|
|
62
61
|
placeholder="placeholder"
|
|
63
62
|
name="input"
|
|
64
|
-
size="md"
|
|
65
63
|
value={"value"}
|
|
66
64
|
error={"errored because it's a very long message"}
|
|
67
65
|
showErrorLabel
|
|
@@ -69,7 +67,6 @@ export const InputExample = () => (
|
|
|
69
67
|
<Input
|
|
70
68
|
placeholder="placeholder"
|
|
71
69
|
name="input"
|
|
72
|
-
size="md"
|
|
73
70
|
value={"disabled"}
|
|
74
71
|
showErrorLabel
|
|
75
72
|
/>
|
|
@@ -78,17 +75,13 @@ export const InputExample = () => (
|
|
|
78
75
|
<Input
|
|
79
76
|
placeholder="placeholder"
|
|
80
77
|
name="input"
|
|
81
|
-
size="sm"
|
|
82
78
|
label="Firstname"
|
|
83
|
-
value=""
|
|
84
79
|
showErrorLabel
|
|
85
80
|
/>
|
|
86
81
|
<Input
|
|
87
82
|
placeholder="placeholder"
|
|
88
83
|
name="input"
|
|
89
|
-
size="sm"
|
|
90
84
|
label="Lastname"
|
|
91
|
-
value=""
|
|
92
85
|
showErrorLabel
|
|
93
86
|
/>
|
|
94
87
|
</div>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { Meta } from "@storybook/react";
|
|
2
|
+
import React from "react";
|
|
3
|
+
|
|
4
|
+
import { Checkbox, Label } from "../index_with_tw_base";
|
|
5
|
+
|
|
6
|
+
const meta = {
|
|
7
|
+
title: "Primitives/Label",
|
|
8
|
+
component: Label,
|
|
9
|
+
} satisfies Meta<typeof Label>;
|
|
10
|
+
|
|
11
|
+
export default meta;
|
|
12
|
+
|
|
13
|
+
export const LabelDemo = () => {
|
|
14
|
+
const handleChange = () => {
|
|
15
|
+
// This function intentionally left blank
|
|
16
|
+
};
|
|
17
|
+
return (
|
|
18
|
+
<div>
|
|
19
|
+
<div className="s-flex s-items-center s-space-x-2">
|
|
20
|
+
<Checkbox onChange={handleChange} />
|
|
21
|
+
<Label htmlFor="terms">Accept terms and conditions</Label>
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
);
|
|
25
|
+
};
|