kosui 0.0.7 → 0.0.9
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/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Textarea, type TextareaProps } from "./textarea.svelte";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Textarea } from "./textarea.svelte";
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<script module lang="ts">
|
|
2
|
+
import { baseClasses, type Variants } from "../base";
|
|
3
|
+
import { noop, type ClassName, type ElementRef } from "../utils";
|
|
4
|
+
import type { HTMLTextareaAttributes } from "svelte/elements";
|
|
5
|
+
import { twMerge } from "tailwind-merge";
|
|
6
|
+
|
|
7
|
+
export type TextareaProps = ElementRef &
|
|
8
|
+
ClassName &
|
|
9
|
+
Variants &
|
|
10
|
+
HTMLTextareaAttributes;
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<script lang="ts">
|
|
14
|
+
let {
|
|
15
|
+
value = $bindable(),
|
|
16
|
+
el = $bindable(),
|
|
17
|
+
ref = noop,
|
|
18
|
+
class: className,
|
|
19
|
+
variant = "outlined",
|
|
20
|
+
color = "secondary",
|
|
21
|
+
shape = "rounded",
|
|
22
|
+
...restProps
|
|
23
|
+
}: TextareaProps = $props();
|
|
24
|
+
</script>
|
|
25
|
+
|
|
26
|
+
<textarea
|
|
27
|
+
bind:this={el}
|
|
28
|
+
use:ref
|
|
29
|
+
bind:value
|
|
30
|
+
class={twMerge(
|
|
31
|
+
"bg-m3-surface-container",
|
|
32
|
+
baseClasses({ variant, color, shape, hover: true, focus: true }),
|
|
33
|
+
|
|
34
|
+
(variant === "outlined" || variant === "plain") &&
|
|
35
|
+
"hover:bg-m3-surface-container-low focus-visible:bg-m3-surface-container-low",
|
|
36
|
+
|
|
37
|
+
"px-3 py-2",
|
|
38
|
+
className,
|
|
39
|
+
)}
|
|
40
|
+
{...restProps}
|
|
41
|
+
></textarea>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type Variants } from "../base";
|
|
2
|
+
import { type ClassName, type ElementRef } from "../utils";
|
|
3
|
+
import type { HTMLTextareaAttributes } from "svelte/elements";
|
|
4
|
+
export type TextareaProps = ElementRef & ClassName & Variants & HTMLTextareaAttributes;
|
|
5
|
+
declare const Textarea: import("svelte").Component<TextareaProps, {}, "el" | "value">;
|
|
6
|
+
type Textarea = ReturnType<typeof Textarea>;
|
|
7
|
+
export default Textarea;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kosui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.9",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"engines": {
|
|
@@ -43,7 +43,6 @@
|
|
|
43
43
|
"eslint-plugin-svelte": "^3.0.0",
|
|
44
44
|
"globals": "^16.0.0",
|
|
45
45
|
"jsdom": "^26.1.0",
|
|
46
|
-
"marked": "^16.1.1",
|
|
47
46
|
"postcss": "^8.5.6",
|
|
48
47
|
"prettier": "^3.4.2",
|
|
49
48
|
"prettier-plugin-svelte": "^3.3.3",
|
|
@@ -61,6 +60,9 @@
|
|
|
61
60
|
"keywords": [
|
|
62
61
|
"svelte"
|
|
63
62
|
],
|
|
63
|
+
"dependencies": {
|
|
64
|
+
"marked": "^16.1.1"
|
|
65
|
+
},
|
|
64
66
|
"scripts": {
|
|
65
67
|
"dev": "vite dev",
|
|
66
68
|
"build": "vite build && pnpm prepack",
|