@rolder/kit 3.0.0-alpha-16 → 3.0.0-alpha.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.
@@ -1,42 +1,224 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import { IconFile, IconFileTypeDoc, IconFileTypePdf, IconFileTypePpt, IconFileTypeXls, IconPhoto } from "@tabler/icons-react";
1
+ import { jsx, jsxs } from "react/jsx-runtime";
3
2
  const FileIcon = ({ mimeType })=>{
4
3
  switch(true){
5
4
  case mimeType.includes('image/'):
6
- return /*#__PURE__*/ jsx(IconPhoto, {
7
- size: 36,
8
- stroke: 1.5,
9
- color: "var(--mantine-color-text)"
5
+ return /*#__PURE__*/ jsxs("svg", {
6
+ xmlns: "http://www.w3.org/2000/svg",
7
+ width: "36",
8
+ height: "36",
9
+ viewBox: "0 0 36 36",
10
+ fill: "none",
11
+ stroke: "var(--mantine-color-text)",
12
+ "stroke-width": "1.5",
13
+ "stroke-linecap": "round",
14
+ "stroke-linejoin": "round",
15
+ role: "img",
16
+ "aria-label": "Image",
17
+ children: [
18
+ /*#__PURE__*/ jsx("path", {
19
+ stroke: "none",
20
+ d: "M0 0h24v24H0z",
21
+ fill: "none"
22
+ }),
23
+ /*#__PURE__*/ jsx("path", {
24
+ d: "M15 8h.01"
25
+ }),
26
+ /*#__PURE__*/ jsx("path", {
27
+ d: "M3 6a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v12a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3v-12"
28
+ }),
29
+ /*#__PURE__*/ jsx("path", {
30
+ d: "M3 16l5 -5c.928 -.893 2.072 -.893 3 0l5 5"
31
+ }),
32
+ /*#__PURE__*/ jsx("path", {
33
+ d: "M14 14l1 -1c.928 -.893 2.072 -.893 3 0l3 3"
34
+ })
35
+ ]
10
36
  });
11
37
  case mimeType.includes('application/pdf'):
12
- return /*#__PURE__*/ jsx(IconFileTypePdf, {
13
- size: 36,
14
- stroke: 1.5,
15
- color: "var(--mantine-color-text)"
38
+ return /*#__PURE__*/ jsxs("svg", {
39
+ xmlns: "http://www.w3.org/2000/svg",
40
+ width: "36",
41
+ height: "36",
42
+ viewBox: "0 0 36 36",
43
+ fill: "none",
44
+ stroke: "var(--mantine-color-text)",
45
+ "stroke-width": "1.5",
46
+ "stroke-linecap": "round",
47
+ "stroke-linejoin": "round",
48
+ role: "img",
49
+ "aria-label": "FilePdf",
50
+ children: [
51
+ /*#__PURE__*/ jsx("path", {
52
+ stroke: "none",
53
+ d: "M0 0h24v24H0z",
54
+ fill: "none"
55
+ }),
56
+ /*#__PURE__*/ jsx("path", {
57
+ d: "M14 3v4a1 1 0 0 0 1 1h4"
58
+ }),
59
+ /*#__PURE__*/ jsx("path", {
60
+ d: "M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"
61
+ }),
62
+ /*#__PURE__*/ jsx("path", {
63
+ d: "M5 18h1.5a1.5 1.5 0 0 0 0 -3h-1.5v6"
64
+ }),
65
+ /*#__PURE__*/ jsx("path", {
66
+ d: "M17 18h2"
67
+ }),
68
+ /*#__PURE__*/ jsx("path", {
69
+ d: "M20 15h-3v6"
70
+ }),
71
+ /*#__PURE__*/ jsx("path", {
72
+ d: "M11 15v6h1a2 2 0 0 0 2 -2v-2a2 2 0 0 0 -2 -2h-1"
73
+ })
74
+ ]
16
75
  });
17
76
  case 'word' === mimeType:
18
- return /*#__PURE__*/ jsx(IconFileTypeDoc, {
19
- size: 36,
20
- stroke: 1.5,
21
- color: "var(--mantine-color-text)"
77
+ return /*#__PURE__*/ jsxs("svg", {
78
+ xmlns: "http://www.w3.org/2000/svg",
79
+ width: "36",
80
+ height: "36",
81
+ viewBox: "0 0 36 36",
82
+ fill: "none",
83
+ stroke: "var(--mantine-color-text)",
84
+ "stroke-width": "1.5",
85
+ "stroke-linecap": "round",
86
+ "stroke-linejoin": "round",
87
+ role: "img",
88
+ "aria-label": "FileDoc",
89
+ children: [
90
+ /*#__PURE__*/ jsx("path", {
91
+ stroke: "none",
92
+ d: "M0 0h24v24H0z",
93
+ fill: "none"
94
+ }),
95
+ /*#__PURE__*/ jsx("path", {
96
+ d: "M14 3v4a1 1 0 0 0 1 1h4"
97
+ }),
98
+ /*#__PURE__*/ jsx("path", {
99
+ d: "M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"
100
+ }),
101
+ /*#__PURE__*/ jsx("path", {
102
+ d: "M5 15v6h1a2 2 0 0 0 2 -2v-2a2 2 0 0 0 -2 -2h-1"
103
+ }),
104
+ /*#__PURE__*/ jsx("path", {
105
+ d: "M20 16.5a1.5 1.5 0 0 0 -3 0v3a1.5 1.5 0 0 0 3 0"
106
+ }),
107
+ /*#__PURE__*/ jsx("path", {
108
+ d: "M12.5 15a1.5 1.5 0 0 1 1.5 1.5v3a1.5 1.5 0 0 1 -3 0v-3a1.5 1.5 0 0 1 1.5 -1.5"
109
+ })
110
+ ]
22
111
  });
23
112
  case 'excel' === mimeType:
24
- return /*#__PURE__*/ jsx(IconFileTypeXls, {
25
- size: 36,
26
- stroke: 1.5,
27
- color: "var(--mantine-color-text)"
113
+ return /*#__PURE__*/ jsxs("svg", {
114
+ xmlns: "http://www.w3.org/2000/svg",
115
+ width: "36",
116
+ height: "36",
117
+ viewBox: "0 0 36 36",
118
+ fill: "none",
119
+ stroke: "var(--mantine-color-text)",
120
+ "stroke-width": "1.5",
121
+ "stroke-linecap": "round",
122
+ "stroke-linejoin": "round",
123
+ role: "img",
124
+ "aria-label": "FileXls",
125
+ children: [
126
+ /*#__PURE__*/ jsx("path", {
127
+ stroke: "none",
128
+ d: "M0 0h24v24H0z",
129
+ fill: "none"
130
+ }),
131
+ /*#__PURE__*/ jsx("path", {
132
+ d: "M14 3v4a1 1 0 0 0 1 1h4"
133
+ }),
134
+ /*#__PURE__*/ jsx("path", {
135
+ d: "M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"
136
+ }),
137
+ /*#__PURE__*/ jsx("path", {
138
+ d: "M4 15l4 6"
139
+ }),
140
+ /*#__PURE__*/ jsx("path", {
141
+ d: "M4 21l4 -6"
142
+ }),
143
+ /*#__PURE__*/ jsx("path", {
144
+ d: "M17 20.25c0 .414 .336 .75 .75 .75h1.25a1 1 0 0 0 1 -1v-1a1 1 0 0 0 -1 -1h-1a1 1 0 0 1 -1 -1v-1a1 1 0 0 1 1 -1h1.25a.75 .75 0 0 1 .75 .75"
145
+ }),
146
+ /*#__PURE__*/ jsx("path", {
147
+ d: "M11 15v6h3"
148
+ })
149
+ ]
28
150
  });
29
151
  case 'powerpoint' === mimeType:
30
- return /*#__PURE__*/ jsx(IconFileTypePpt, {
31
- size: 36,
32
- stroke: 1.5,
33
- color: "var(--mantine-color-text)"
152
+ return /*#__PURE__*/ jsxs("svg", {
153
+ xmlns: "http://www.w3.org/2000/svg",
154
+ width: "36",
155
+ height: "36",
156
+ viewBox: "0 0 36 36",
157
+ fill: "none",
158
+ stroke: "var(--mantine-color-text)",
159
+ "stroke-width": "1.5",
160
+ "stroke-linecap": "round",
161
+ "stroke-linejoin": "round",
162
+ role: "img",
163
+ "aria-label": "FilePpt",
164
+ children: [
165
+ /*#__PURE__*/ jsx("path", {
166
+ stroke: "none",
167
+ d: "M0 0h24v24H0z",
168
+ fill: "none"
169
+ }),
170
+ /*#__PURE__*/ jsx("path", {
171
+ d: "M14 3v4a1 1 0 0 0 1 1h4"
172
+ }),
173
+ /*#__PURE__*/ jsx("path", {
174
+ d: "M14 3v4a1 1 0 0 0 1 1h4"
175
+ }),
176
+ /*#__PURE__*/ jsx("path", {
177
+ d: "M5 18h1.5a1.5 1.5 0 0 0 0 -3h-1.5v6"
178
+ }),
179
+ /*#__PURE__*/ jsx("path", {
180
+ d: "M11 18h1.5a1.5 1.5 0 0 0 0 -3h-1.5v6"
181
+ }),
182
+ /*#__PURE__*/ jsx("path", {
183
+ d: "M16.5 15h3"
184
+ }),
185
+ /*#__PURE__*/ jsx("path", {
186
+ d: "M18 15v6"
187
+ }),
188
+ /*#__PURE__*/ jsx("path", {
189
+ d: "M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"
190
+ })
191
+ ]
34
192
  });
35
193
  default:
36
- return /*#__PURE__*/ jsx(IconFile, {
37
- size: 36,
38
- stroke: 1.5,
39
- color: "var(--mantine-color-text)"
194
+ return /*#__PURE__*/ jsxs("svg", {
195
+ xmlns: "http://www.w3.org/2000/svg",
196
+ width: "36",
197
+ height: "36",
198
+ viewBox: "0 0 36 36",
199
+ fill: "none",
200
+ stroke: "var(--mantine-color-text)",
201
+ "stroke-width": "1.5",
202
+ "stroke-linecap": "round",
203
+ "stroke-linejoin": "round",
204
+ role: "img",
205
+ "aria-label": "File",
206
+ children: [
207
+ /*#__PURE__*/ jsx("path", {
208
+ stroke: "none",
209
+ d: "M0 0h24v24H0z",
210
+ fill: "none"
211
+ }),
212
+ /*#__PURE__*/ jsx("path", {
213
+ d: "M15 3v4a1 1 0 0 0 1 1h4"
214
+ }),
215
+ /*#__PURE__*/ jsx("path", {
216
+ d: "M18 17h-7a2 2 0 0 1 -2 -2v-10a2 2 0 0 1 2 -2h4l5 5v7a2 2 0 0 1 -2 2"
217
+ }),
218
+ /*#__PURE__*/ jsx("path", {
219
+ d: "M16 17v2a2 2 0 0 1 -2 2h-7a2 2 0 0 1 -2 -2v-10a2 2 0 0 1 2 -2h2"
220
+ })
221
+ ]
40
222
  });
41
223
  }
42
224
  };
@@ -1,10 +1,8 @@
1
1
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
2
  import { ActionIcon, FileButton, Tooltip } from "@mantine/core";
3
- import { IconPaperclip, IconTrash } from "@tabler/icons-react";
4
3
  import { useRef } from "react";
5
4
  import { FileIcon } from "./FileIcon.js";
6
5
  import { usePromptInput } from "./PromptInputContext.js";
7
- import styles_module from "./styles.module.js";
8
6
  const File = (props)=>{
9
7
  const resetRef = useRef(null);
10
8
  const { file, setFile, accept, submiting, uploading } = usePromptInput();
@@ -24,12 +22,31 @@ const File = (props)=>{
24
22
  disabled: submiting,
25
23
  loading: uploading,
26
24
  classNames: {
27
- root: styles_module.fileActionAction
25
+ root: 'rolder-prompt-input-file-action-action'
28
26
  },
29
27
  ...props,
30
- children: /*#__PURE__*/ jsx(IconPaperclip, {
31
- size: 24,
32
- stroke: 1.5
28
+ children: /*#__PURE__*/ jsxs("svg", {
29
+ xmlns: "http://www.w3.org/2000/svg",
30
+ width: "24",
31
+ height: "24",
32
+ viewBox: "0 0 24 24",
33
+ fill: "none",
34
+ stroke: "currentColor",
35
+ "stroke-width": "1.5",
36
+ "stroke-linecap": "round",
37
+ "stroke-linejoin": "round",
38
+ role: "img",
39
+ "aria-label": "Paperclip",
40
+ children: [
41
+ /*#__PURE__*/ jsx("path", {
42
+ stroke: "none",
43
+ d: "M0 0h24v24H0z",
44
+ fill: "none"
45
+ }),
46
+ /*#__PURE__*/ jsx("path", {
47
+ d: "M15 7l-6.5 6.5a1.5 1.5 0 0 0 3 3l6.5 -6.5a3 3 0 0 0 -6 -6l-6.5 6.5a4.5 4.5 0 0 0 9 9l6.5 -6.5"
48
+ })
49
+ ]
33
50
  })
34
51
  }),
35
52
  file && /*#__PURE__*/ jsxs(Fragment, {
@@ -49,15 +66,46 @@ const File = (props)=>{
49
66
  size: "lg",
50
67
  variant: "default",
51
68
  classNames: {
52
- root: styles_module.fileActionAction
69
+ root: 'rolder-prompt-input-file-action-action'
53
70
  },
54
71
  onClick: ()=>{
55
72
  resetRef.current?.();
56
73
  setFile(void 0);
57
74
  },
58
- children: /*#__PURE__*/ jsx(IconTrash, {
59
- size: 24,
60
- stroke: 1.5
75
+ children: /*#__PURE__*/ jsxs("svg", {
76
+ xmlns: "http://www.w3.org/2000/svg",
77
+ width: "24",
78
+ height: "24",
79
+ viewBox: "0 0 24 24",
80
+ fill: "none",
81
+ stroke: "currentColor",
82
+ "stroke-width": "1.5",
83
+ "stroke-linecap": "round",
84
+ "stroke-linejoin": "round",
85
+ role: "img",
86
+ "aria-label": "Trash",
87
+ children: [
88
+ /*#__PURE__*/ jsx("path", {
89
+ stroke: "none",
90
+ d: "M0 0h24v24H0z",
91
+ fill: "none"
92
+ }),
93
+ /*#__PURE__*/ jsx("path", {
94
+ d: "M4 7l16 0"
95
+ }),
96
+ /*#__PURE__*/ jsx("path", {
97
+ d: "M10 11l0 6"
98
+ }),
99
+ /*#__PURE__*/ jsx("path", {
100
+ d: "M14 11l0 6"
101
+ }),
102
+ /*#__PURE__*/ jsx("path", {
103
+ d: "M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12"
104
+ }),
105
+ /*#__PURE__*/ jsx("path", {
106
+ d: "M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3"
107
+ })
108
+ ]
61
109
  })
62
110
  })
63
111
  ]
@@ -1,42 +1,224 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import { IconFile, IconFileTypeDoc, IconFileTypePdf, IconFileTypePpt, IconFileTypeXls, IconPhoto } from "@tabler/icons-react";
1
+ import { jsx, jsxs } from "react/jsx-runtime";
3
2
  const FileIcon = ({ mimeType })=>{
4
3
  switch(true){
5
4
  case mimeType.includes('image/'):
6
- return /*#__PURE__*/ jsx(IconPhoto, {
7
- size: 24,
8
- stroke: 1.5,
9
- color: "var(--mantine-color-dimmed)"
5
+ return /*#__PURE__*/ jsxs("svg", {
6
+ xmlns: "http://www.w3.org/2000/svg",
7
+ width: "24",
8
+ height: "24",
9
+ viewBox: "0 0 24 24",
10
+ fill: "none",
11
+ stroke: "var(--mantine-color-dimmed)",
12
+ "stroke-width": "1.5",
13
+ "stroke-linecap": "round",
14
+ "stroke-linejoin": "round",
15
+ role: "img",
16
+ "aria-label": "Image",
17
+ children: [
18
+ /*#__PURE__*/ jsx("path", {
19
+ stroke: "none",
20
+ d: "M0 0h24v24H0z",
21
+ fill: "none"
22
+ }),
23
+ /*#__PURE__*/ jsx("path", {
24
+ d: "M15 8h.01"
25
+ }),
26
+ /*#__PURE__*/ jsx("path", {
27
+ d: "M3 6a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v12a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3v-12"
28
+ }),
29
+ /*#__PURE__*/ jsx("path", {
30
+ d: "M3 16l5 -5c.928 -.893 2.072 -.893 3 0l5 5"
31
+ }),
32
+ /*#__PURE__*/ jsx("path", {
33
+ d: "M14 14l1 -1c.928 -.893 2.072 -.893 3 0l3 3"
34
+ })
35
+ ]
10
36
  });
11
37
  case mimeType.includes('application/pdf'):
12
- return /*#__PURE__*/ jsx(IconFileTypePdf, {
13
- size: 24,
14
- stroke: 1.5,
15
- color: "var(--mantine-color-dimmed)"
38
+ return /*#__PURE__*/ jsxs("svg", {
39
+ xmlns: "http://www.w3.org/2000/svg",
40
+ width: "24",
41
+ height: "24",
42
+ viewBox: "0 0 24 24",
43
+ fill: "none",
44
+ stroke: "var(--mantine-color-dimmed)",
45
+ "stroke-width": "1.5",
46
+ "stroke-linecap": "round",
47
+ "stroke-linejoin": "round",
48
+ role: "img",
49
+ "aria-label": "FilePdf",
50
+ children: [
51
+ /*#__PURE__*/ jsx("path", {
52
+ stroke: "none",
53
+ d: "M0 0h24v24H0z",
54
+ fill: "none"
55
+ }),
56
+ /*#__PURE__*/ jsx("path", {
57
+ d: "M14 3v4a1 1 0 0 0 1 1h4"
58
+ }),
59
+ /*#__PURE__*/ jsx("path", {
60
+ d: "M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"
61
+ }),
62
+ /*#__PURE__*/ jsx("path", {
63
+ d: "M5 18h1.5a1.5 1.5 0 0 0 0 -3h-1.5v6"
64
+ }),
65
+ /*#__PURE__*/ jsx("path", {
66
+ d: "M17 18h2"
67
+ }),
68
+ /*#__PURE__*/ jsx("path", {
69
+ d: "M20 15h-3v6"
70
+ }),
71
+ /*#__PURE__*/ jsx("path", {
72
+ d: "M11 15v6h1a2 2 0 0 0 2 -2v-2a2 2 0 0 0 -2 -2h-1"
73
+ })
74
+ ]
16
75
  });
17
76
  case mimeType.includes('application/vnd.openxmlformats-officedocument.wordprocessingml.document'):
18
- return /*#__PURE__*/ jsx(IconFileTypeDoc, {
19
- size: 24,
20
- stroke: 1.5,
21
- color: "var(--mantine-color-dimmed)"
77
+ return /*#__PURE__*/ jsxs("svg", {
78
+ xmlns: "http://www.w3.org/2000/svg",
79
+ width: "24",
80
+ height: "24",
81
+ viewBox: "0 0 24 24",
82
+ fill: "none",
83
+ stroke: "var(--mantine-color-dimmed)",
84
+ "stroke-width": "1.5",
85
+ "stroke-linecap": "round",
86
+ "stroke-linejoin": "round",
87
+ role: "img",
88
+ "aria-label": "FileDoc",
89
+ children: [
90
+ /*#__PURE__*/ jsx("path", {
91
+ stroke: "none",
92
+ d: "M0 0h24v24H0z",
93
+ fill: "none"
94
+ }),
95
+ /*#__PURE__*/ jsx("path", {
96
+ d: "M14 3v4a1 1 0 0 0 1 1h4"
97
+ }),
98
+ /*#__PURE__*/ jsx("path", {
99
+ d: "M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"
100
+ }),
101
+ /*#__PURE__*/ jsx("path", {
102
+ d: "M5 15v6h1a2 2 0 0 0 2 -2v-2a2 2 0 0 0 -2 -2h-1"
103
+ }),
104
+ /*#__PURE__*/ jsx("path", {
105
+ d: "M20 16.5a1.5 1.5 0 0 0 -3 0v3a1.5 1.5 0 0 0 3 0"
106
+ }),
107
+ /*#__PURE__*/ jsx("path", {
108
+ d: "M12.5 15a1.5 1.5 0 0 1 1.5 1.5v3a1.5 1.5 0 0 1 -3 0v-3a1.5 1.5 0 0 1 1.5 -1.5"
109
+ })
110
+ ]
22
111
  });
23
112
  case mimeType.includes('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'):
24
- return /*#__PURE__*/ jsx(IconFileTypeXls, {
25
- size: 24,
26
- stroke: 1.5,
27
- color: "var(--mantine-color-dimmed)"
113
+ return /*#__PURE__*/ jsxs("svg", {
114
+ xmlns: "http://www.w3.org/2000/svg",
115
+ width: "24",
116
+ height: "24",
117
+ viewBox: "0 0 24 24",
118
+ fill: "none",
119
+ stroke: "var(--mantine-color-dimmed)",
120
+ "stroke-width": "1.5",
121
+ "stroke-linecap": "round",
122
+ "stroke-linejoin": "round",
123
+ role: "img",
124
+ "aria-label": "FileXls",
125
+ children: [
126
+ /*#__PURE__*/ jsx("path", {
127
+ stroke: "none",
128
+ d: "M0 0h24v24H0z",
129
+ fill: "none"
130
+ }),
131
+ /*#__PURE__*/ jsx("path", {
132
+ d: "M14 3v4a1 1 0 0 0 1 1h4"
133
+ }),
134
+ /*#__PURE__*/ jsx("path", {
135
+ d: "M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"
136
+ }),
137
+ /*#__PURE__*/ jsx("path", {
138
+ d: "M4 15l4 6"
139
+ }),
140
+ /*#__PURE__*/ jsx("path", {
141
+ d: "M4 21l4 -6"
142
+ }),
143
+ /*#__PURE__*/ jsx("path", {
144
+ d: "M17 20.25c0 .414 .336 .75 .75 .75h1.25a1 1 0 0 0 1 -1v-1a1 1 0 0 0 -1 -1h-1a1 1 0 0 1 -1 -1v-1a1 1 0 0 1 1 -1h1.25a.75 .75 0 0 1 .75 .75"
145
+ }),
146
+ /*#__PURE__*/ jsx("path", {
147
+ d: "M11 15v6h3"
148
+ })
149
+ ]
28
150
  });
29
151
  case mimeType.includes('application/vnd.openxmlformats-officedocument.presentationml.presentation'):
30
- return /*#__PURE__*/ jsx(IconFileTypePpt, {
31
- size: 24,
32
- stroke: 1.5,
33
- color: "var(--mantine-color-dimmed)"
152
+ return /*#__PURE__*/ jsxs("svg", {
153
+ xmlns: "http://www.w3.org/2000/svg",
154
+ width: "24",
155
+ height: "24",
156
+ viewBox: "0 0 24 24",
157
+ fill: "none",
158
+ stroke: "var(--mantine-color-dimmed)",
159
+ "stroke-width": "1.5",
160
+ "stroke-linecap": "round",
161
+ "stroke-linejoin": "round",
162
+ role: "img",
163
+ "aria-label": "FilePpt",
164
+ children: [
165
+ /*#__PURE__*/ jsx("path", {
166
+ stroke: "none",
167
+ d: "M0 0h24v24H0z",
168
+ fill: "none"
169
+ }),
170
+ /*#__PURE__*/ jsx("path", {
171
+ d: "M14 3v4a1 1 0 0 0 1 1h4"
172
+ }),
173
+ /*#__PURE__*/ jsx("path", {
174
+ d: "M14 3v4a1 1 0 0 0 1 1h4"
175
+ }),
176
+ /*#__PURE__*/ jsx("path", {
177
+ d: "M5 18h1.5a1.5 1.5 0 0 0 0 -3h-1.5v6"
178
+ }),
179
+ /*#__PURE__*/ jsx("path", {
180
+ d: "M11 18h1.5a1.5 1.5 0 0 0 0 -3h-1.5v6"
181
+ }),
182
+ /*#__PURE__*/ jsx("path", {
183
+ d: "M16.5 15h3"
184
+ }),
185
+ /*#__PURE__*/ jsx("path", {
186
+ d: "M18 15v6"
187
+ }),
188
+ /*#__PURE__*/ jsx("path", {
189
+ d: "M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4"
190
+ })
191
+ ]
34
192
  });
35
193
  default:
36
- return /*#__PURE__*/ jsx(IconFile, {
37
- size: 24,
38
- stroke: 1.5,
39
- color: "var(--mantine-color-dimmed)"
194
+ return /*#__PURE__*/ jsxs("svg", {
195
+ xmlns: "http://www.w3.org/2000/svg",
196
+ width: "24",
197
+ height: "24",
198
+ viewBox: "0 0 24 24",
199
+ fill: "none",
200
+ stroke: "var(--mantine-color-dimmed)",
201
+ "stroke-width": "1.5",
202
+ "stroke-linecap": "round",
203
+ "stroke-linejoin": "round",
204
+ role: "img",
205
+ "aria-label": "File",
206
+ children: [
207
+ /*#__PURE__*/ jsx("path", {
208
+ stroke: "none",
209
+ d: "M0 0h24v24H0z",
210
+ fill: "none"
211
+ }),
212
+ /*#__PURE__*/ jsx("path", {
213
+ d: "M15 3v4a1 1 0 0 0 1 1h4"
214
+ }),
215
+ /*#__PURE__*/ jsx("path", {
216
+ d: "M18 17h-7a2 2 0 0 1 -2 -2v-10a2 2 0 0 1 2 -2h4l5 5v7a2 2 0 0 1 -2 2"
217
+ }),
218
+ /*#__PURE__*/ jsx("path", {
219
+ d: "M16 17v2a2 2 0 0 1 -2 2h-7a2 2 0 0 1 -2 -2v-10a2 2 0 0 1 2 -2h2"
220
+ })
221
+ ]
40
222
  });
41
223
  }
42
224
  };
@@ -2,7 +2,6 @@ import { jsx } from "react/jsx-runtime";
2
2
  import { Paper } from "@mantine/core";
3
3
  import clsx from "clsx";
4
4
  import { Provider } from "./PromptInputProvider.js";
5
- import styles_module from "./styles.module.js";
6
5
  const Root = ({ className, onSubmit, submiting, uploading, accept, ...props })=>/*#__PURE__*/ jsx(Provider, {
7
6
  onSubmit: onSubmit,
8
7
  submiting: submiting,
@@ -11,7 +10,7 @@ const Root = ({ className, onSubmit, submiting, uploading, accept, ...props })=>
11
10
  children: /*#__PURE__*/ jsx(Paper, {
12
11
  radius: "md",
13
12
  withBorder: true,
14
- className: clsx(styles_module.root, className),
13
+ className: clsx('rolder-prompt-input-root', className),
15
14
  ...props
16
15
  })
17
16
  });
@@ -1,10 +1,29 @@
1
- import { jsx } from "react/jsx-runtime";
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { ActionIcon } from "@mantine/core";
3
- import { IconArrowBigUp } from "@tabler/icons-react";
4
3
  import { usePromptInput } from "./PromptInputContext.js";
5
4
  const Submit = ({ children, ...props })=>{
6
- const Icon = /*#__PURE__*/ jsx(IconArrowBigUp, {
7
- strokeWidth: 1.5
5
+ const Icon = /*#__PURE__*/ jsxs("svg", {
6
+ xmlns: "http://www.w3.org/2000/svg",
7
+ width: "24",
8
+ height: "24",
9
+ viewBox: "0 0 24 24",
10
+ fill: "none",
11
+ stroke: "currentColor",
12
+ "stroke-width": "1.5",
13
+ "stroke-linecap": "round",
14
+ "stroke-linejoin": "round",
15
+ role: "img",
16
+ "aria-label": "Submit",
17
+ children: [
18
+ /*#__PURE__*/ jsx("path", {
19
+ stroke: "none",
20
+ d: "M0 0h24v24H0z",
21
+ fill: "none"
22
+ }),
23
+ /*#__PURE__*/ jsx("path", {
24
+ d: "M9 20v-8h-3.586a1 1 0 0 1 -.707 -1.707l6.586 -6.586a1 1 0 0 1 1.414 0l6.586 6.586a1 1 0 0 1 -.707 1.707h-3.586v8a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1"
25
+ })
26
+ ]
8
27
  });
9
28
  const { onSubmit, submiting, uploading } = usePromptInput();
10
29
  return /*#__PURE__*/ jsx(ActionIcon, {
@@ -2,7 +2,6 @@ import { jsx } from "react/jsx-runtime";
2
2
  import { Textarea } from "@mantine/core";
3
3
  import { useState } from "react";
4
4
  import { usePromptInput } from "./PromptInputContext.js";
5
- import styles_module from "./styles.module.js";
6
5
  const Textarea_Textarea = (props)=>{
7
6
  const { text, setText, onSubmit, submiting, uploading } = usePromptInput();
8
7
  const [isComposing, setIsComposing] = useState(false);
@@ -19,7 +18,7 @@ const Textarea_Textarea = (props)=>{
19
18
  size: "md",
20
19
  rows: 3,
21
20
  classNames: {
22
- input: styles_module.textarea
21
+ input: 'rolder-prompt-input-textarea'
23
22
  },
24
23
  placeholder: "Напишите сообщение",
25
24
  onCompositionEnd: ()=>setIsComposing(false),
@@ -0,0 +1,74 @@
1
+ .rolder-prompt-input-root {
2
+ background-color: light-dark(var(--mantine-color-white), var(--mantine-color-dark-6));
3
+
4
+ &:focus-within {
5
+ border-color: var(--mantine-primary-color-filled);
6
+ border-color: var(--mantine-primary-color-filled);
7
+ outline: none;
8
+ }
9
+ }
10
+
11
+ .rolder-prompt-input-textarea {
12
+ border: 0;
13
+ border-radius: 8px;
14
+ overflow: hidden;
15
+ }
16
+
17
+ .rolder-prompt-input-file-action-action {
18
+ color: light-dark(var(--mantine-color-gray-7), var(--mantine-color-dark-1));
19
+
20
+ &[data-disabled] {
21
+ color: light-dark(var(--mantine-color-gray-5), var(--mantine-color-dark-3));
22
+ }
23
+ }
24
+
25
+ .rolder-editor-root {
26
+ --editor-border-color: light-dark(var(--mantine-color-gray-3), var(--mantine-color-dark-4));
27
+ border: rem(1px) solid var(--editor-border-color);
28
+ border-radius: var(--mantine-radius-md);
29
+ }
30
+
31
+ .rolder-editor-content {
32
+ border-radius: var(--mantine-radius-md);
33
+ }
34
+
35
+ .rolder-editor-toolbar {
36
+ border-color: var(--editor-border-color);
37
+ border-top-left-radius: var(--mantine-radius-md);
38
+ border-top-right-radius: var(--mantine-radius-md);
39
+ }
40
+
41
+ .rolder-hover-paper-root {
42
+ transition: background-color .2s ease-in-out;
43
+
44
+ &:hover {
45
+ background-color: light-dark(var(--mantine-color-gray-0), var(--mantine-color-dark-6));
46
+ cursor: pointer;
47
+ transition: background-color .2s ease-in-out;
48
+ }
49
+
50
+ &[data-disabled] {
51
+ background-color: unset;
52
+ cursor: default;
53
+ }
54
+ }
55
+
56
+ .rolder-router-link-root {
57
+ color: inherit;
58
+ text-decoration: none;
59
+ }
60
+
61
+ .rolder-scroll-area-viewport {
62
+ border-radius: var(--radius);
63
+ }
64
+
65
+ .rolder-scroll-area-content {
66
+ width: 100%;
67
+ height: 100%;
68
+ }
69
+
70
+ .rolder-scroll-area-scrollbar {
71
+ border-top-right-radius: var(--radius);
72
+ border-bottom-right-radius: var(--radius);
73
+ }
74
+
@@ -2,11 +2,10 @@ import { jsx } from "react/jsx-runtime";
2
2
  import { ActionIcon, Anchor, Button, UnstyledButton } from "@mantine/core";
3
3
  import { createLink } from "@tanstack/react-router";
4
4
  import { forwardRef } from "react";
5
- import styles_module from "./styles.module.js";
6
5
  const MantineLinkComponent = /*#__PURE__*/ forwardRef(({ classNames, ...props }, ref)=>/*#__PURE__*/ jsx(Anchor, {
7
6
  ref: ref,
8
7
  classNames: {
9
- root: styles_module.root,
8
+ root: 'rolder-router-link-root',
10
9
  ...classNames
11
10
  },
12
11
  c: "inherit",
@@ -1,15 +1,14 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { RichTextEditor } from "@mantine/tiptap";
3
3
  import { useEditor } from "./Provider.js";
4
- import styles_module from "./styles.module.js";
5
4
  const Root = ({ children, classNames, ...props })=>{
6
5
  const { editor } = useEditor();
7
6
  return /*#__PURE__*/ jsx(RichTextEditor, {
8
7
  editor: editor,
9
8
  classNames: {
10
- root: styles_module.root,
11
- content: styles_module.content,
12
- toolbar: styles_module.toolbar,
9
+ root: 'rolder-editor-root',
10
+ content: 'rolder-editor-content',
11
+ toolbar: 'rolder-editor-toolbar',
13
12
  ...classNames
14
13
  },
15
14
  ...props,
@@ -1,7 +1,7 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { Button, Group, Stack, Title } from "@mantine/core";
3
3
  import { rootRouteId, useMatch, useRouter } from "@tanstack/react-router";
4
- import { RouterLink } from "../routerLink/index.js";
4
+ import { RouterLink } from "../RouterLink.js";
5
5
  const DefaultError = ({ error })=>{
6
6
  const router = useRouter();
7
7
  const isRoot = useMatch({
@@ -1,6 +1,6 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { Stack, Text, Title } from "@mantine/core";
3
- import { RouterLink } from "../routerLink/index.js";
3
+ import { RouterLink } from "../RouterLink.js";
4
4
  const DefaultNotFound = ()=>/*#__PURE__*/ jsxs(Stack, {
5
5
  align: "center",
6
6
  justify: "center",
@@ -1,6 +1,6 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { Stack, Title } from "@mantine/core";
3
- import { RouterLink } from "../routerLink/index.js";
3
+ import { RouterLink } from "../RouterLink.js";
4
4
  const Forbidden = ()=>/*#__PURE__*/ jsxs(Stack, {
5
5
  align: "center",
6
6
  justify: "center",
@@ -1,11 +1,10 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { Paper } from "@mantine/core";
3
3
  import { forwardRef } from "react";
4
- import styles_module from "./styles.module.js";
5
4
  const HoverPaper = /*#__PURE__*/ forwardRef(({ disabled, classNames, ...props }, ref)=>/*#__PURE__*/ jsx(Paper, {
6
5
  ref: ref,
7
6
  classNames: {
8
- root: styles_module.root,
7
+ root: 'rolder-hover-paper-root',
9
8
  ...classNames
10
9
  },
11
10
  mod: {
@@ -4,6 +4,6 @@ export * from './error';
4
4
  export * from './form';
5
5
  export * from './hoverPaper';
6
6
  export * from './JsonInput';
7
- export * from './routerLink';
7
+ export * from './RouterLink';
8
8
  export * from './saveInput';
9
9
  export * from './scrollArea';
package/dist/ui/index.js CHANGED
@@ -4,6 +4,6 @@ export * from "./error/index.js";
4
4
  export * from "./form/index.js";
5
5
  export * from "./hoverPaper/index.js";
6
6
  export * from "./JsonInput.js";
7
- export * from "./routerLink/index.js";
7
+ export * from "./RouterLink.js";
8
8
  export * from "./saveInput/index.js";
9
9
  export * from "./scrollArea/index.js";
@@ -2,16 +2,15 @@ import { jsx } from "react/jsx-runtime";
2
2
  import { Box, ScrollArea, getRadius } from "@mantine/core";
3
3
  import { useContext } from "react";
4
4
  import { ScrollAreaContext } from "./context.js";
5
- import styles_module from "./styles.module.js";
6
5
  const ScrollAreaContent = ({ children })=>{
7
6
  const fullContext = useContext(ScrollAreaContext);
8
7
  if (!fullContext) throw new Error('ScrollAreaContent must be used within ScrollArea');
9
8
  const { _callbackRef, mantineProps, radius, _contentResizeRef } = fullContext;
10
9
  return /*#__PURE__*/ jsx(ScrollArea, {
11
10
  classNames: {
12
- viewport: styles_module.viewport,
13
- content: styles_module.content,
14
- scrollbar: styles_module.scrollbar
11
+ viewport: 'rolder-scroll-area-viewport',
12
+ content: 'rolder-scroll-area-content',
13
+ scrollbar: 'rolder-scroll-area-scrollbar'
15
14
  },
16
15
  style: {
17
16
  '--radius': radius ? getRadius(radius) : void 0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rolder/kit",
3
- "version": "3.0.0-alpha-16",
3
+ "version": "3.0.0-alpha.1",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -8,9 +8,6 @@
8
8
  "import": "./dist/index.js"
9
9
  }
10
10
  },
11
- "sideEffects": [
12
- "*.css"
13
- ],
14
11
  "files": [
15
12
  "dist"
16
13
  ],
@@ -34,7 +31,6 @@
34
31
  "peerDependencies": {
35
32
  "react": ">=16.9.0",
36
33
  "react-dom": ">=16.9.0",
37
- "@tabler/icons-react": "^3.36.1",
38
34
  "clsx": "^2.1.1",
39
35
  "@tiptap/extension-highlight": "^3.15.3",
40
36
  "@tiptap/extension-placeholder": "^3.15.3",
@@ -1,7 +0,0 @@
1
- import "./styles_module.css";
2
- const styles_module = {
3
- root: "root-gmXOO2",
4
- textarea: "textarea-f3Dbtf",
5
- fileActionAction: "fileActionAction-w3KPzA"
6
- };
7
- export { styles_module as default };
@@ -1,24 +0,0 @@
1
- .root-gmXOO2 {
2
- background-color: light-dark(var(--mantine-color-white), var(--mantine-color-dark-6));
3
-
4
- &:focus-within {
5
- border-color: var(--mantine-primary-color-filled);
6
- border-color: var(--mantine-primary-color-filled);
7
- outline: none;
8
- }
9
- }
10
-
11
- .textarea-f3Dbtf {
12
- border: 0;
13
- border-radius: 8px;
14
- overflow: hidden;
15
- }
16
-
17
- .fileActionAction-w3KPzA {
18
- color: light-dark(var(--mantine-color-gray-7), var(--mantine-color-dark-1));
19
-
20
- &[data-disabled] {
21
- color: light-dark(var(--mantine-color-gray-5), var(--mantine-color-dark-3));
22
- }
23
- }
24
-
@@ -1,5 +0,0 @@
1
- import "./styles_module.css";
2
- const styles_module = {
3
- root: "root-aYPBH7"
4
- };
5
- export { styles_module as default };
@@ -1,15 +0,0 @@
1
- .root-aYPBH7 {
2
- transition: background-color .2s ease-in-out;
3
-
4
- &:hover {
5
- background-color: light-dark(var(--mantine-color-gray-0), var(--mantine-color-dark-6));
6
- cursor: pointer;
7
- transition: background-color .2s ease-in-out;
8
- }
9
-
10
- &[data-disabled] {
11
- background-color: unset;
12
- cursor: default;
13
- }
14
- }
15
-
@@ -1 +0,0 @@
1
- export * from './RouterLink';
@@ -1 +0,0 @@
1
- export * from "./RouterLink.js";
@@ -1,5 +0,0 @@
1
- import "./styles_module.css";
2
- const styles_module = {
3
- root: "root-t5Mcrb"
4
- };
5
- export { styles_module as default };
@@ -1,5 +0,0 @@
1
- .root-t5Mcrb {
2
- color: inherit;
3
- text-decoration: none;
4
- }
5
-
@@ -1,7 +0,0 @@
1
- import "./styles_module.css";
2
- const styles_module = {
3
- viewport: "viewport-KXLjEt",
4
- content: "content-An6Wm1",
5
- scrollbar: "scrollbar-q5GUTX"
6
- };
7
- export { styles_module as default };
@@ -1,14 +0,0 @@
1
- .viewport-KXLjEt {
2
- border-radius: var(--radius);
3
- }
4
-
5
- .content-An6Wm1 {
6
- width: 100%;
7
- height: 100%;
8
- }
9
-
10
- .scrollbar-q5GUTX {
11
- border-top-right-radius: var(--radius);
12
- border-bottom-right-radius: var(--radius);
13
- }
14
-