@hyvor/design 0.0.30 → 0.0.31

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.
@@ -0,0 +1,42 @@
1
+ <script>export let color = "#000000";
2
+ export let size = 30;
3
+ let inputEl;
4
+ function handleClick() {
5
+ inputEl.click();
6
+ }
7
+ </script>
8
+
9
+ <span>
10
+ <button
11
+ style:width="{size}px"
12
+ style:height="{size}px"
13
+ style:background-color={color}
14
+ on:click={handleClick}
15
+ ></button>
16
+
17
+ <input
18
+ type="color"
19
+ bind:value={color}
20
+ bind:this={inputEl}
21
+
22
+ on:change
23
+ on:input
24
+ />
25
+ </span>
26
+
27
+ <style>
28
+ span {
29
+ position: relative;
30
+ }
31
+ button {
32
+ border-radius: 50%;
33
+ }
34
+ input {
35
+ position: absolute;
36
+ left: 100%;
37
+ bottom: 50%;
38
+ transform: translate(0, 50%);
39
+ width: 0;
40
+ opacity: 0;
41
+ }
42
+ </style>
@@ -0,0 +1,20 @@
1
+ import { SvelteComponent } from "svelte";
2
+ declare const __propDef: {
3
+ props: {
4
+ color?: string | undefined;
5
+ size?: number | undefined;
6
+ };
7
+ events: {
8
+ change: Event;
9
+ input: Event;
10
+ } & {
11
+ [evt: string]: CustomEvent<any>;
12
+ };
13
+ slots: {};
14
+ };
15
+ export type ColorPickerProps = typeof __propDef.props;
16
+ export type ColorPickerEvents = typeof __propDef.events;
17
+ export type ColorPickerSlots = typeof __propDef.slots;
18
+ export default class ColorPicker extends SvelteComponent<ColorPickerProps, ColorPickerEvents, ColorPickerSlots> {
19
+ }
20
+ export {};
@@ -57,6 +57,7 @@ export let caption = "";
57
57
  padding-top: 0;
58
58
  padding-left: 15px;
59
59
  border-left: 2px solid var(--accent-light);
60
+ margin-bottom: 15px;
60
61
  }
61
62
 
62
63
  .left {
@@ -10,6 +10,7 @@ export { default as ButtonGroup } from './Button/ButtonGroup.svelte';
10
10
  export { default as Callout } from './Callout/Callout.svelte';
11
11
  export { default as Checkbox } from './Checkbox/Checkbox.svelte';
12
12
  export { default as CodeBlock } from './CodeBlock/CodeBlock.svelte';
13
+ export { default as ColorPicker } from './ColorPicker/ColorPicker.svelte';
13
14
  export { default as DarkToggle } from './Dark/DarkToggle.svelte';
14
15
  export { default as Dropdown } from './Dropdown/Dropdown.svelte';
15
16
  export { default as Divider } from './Divider/Divider.svelte';
@@ -10,6 +10,7 @@ export { default as ButtonGroup } from './Button/ButtonGroup.svelte';
10
10
  export { default as Callout } from './Callout/Callout.svelte';
11
11
  export { default as Checkbox } from './Checkbox/Checkbox.svelte';
12
12
  export { default as CodeBlock } from './CodeBlock/CodeBlock.svelte';
13
+ export { default as ColorPicker } from './ColorPicker/ColorPicker.svelte';
13
14
  export { default as DarkToggle } from './Dark/DarkToggle.svelte';
14
15
  export { default as Dropdown } from './Dropdown/Dropdown.svelte';
15
16
  export { default as Divider } from './Divider/Divider.svelte';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hyvor/design",
3
- "version": "0.0.30",
3
+ "version": "0.0.31",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "scripts": {
@@ -28,9 +28,9 @@
28
28
  "!dist/**/*.spec.*"
29
29
  ],
30
30
  "peerDependencies": {
31
- "svelte": "^4.0.0",
32
31
  "@sveltejs/kit": "^2.0.0",
33
- "sass": "^1.68.0"
32
+ "sass": "^1.68.0",
33
+ "svelte": "^4.0.0"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@sveltejs/adapter-static": "^3.0.0",
@@ -45,11 +45,11 @@
45
45
  },
46
46
  "dependencies": {
47
47
  "@fontsource/readex-pro": "^5.0.8",
48
- "highlight.js": "^11.9.0",
49
- "@hyvor/icons": "^0.0.3"
48
+ "@hyvor/icons": "^0.0.3",
49
+ "highlight.js": "^11.9.0"
50
50
  },
51
51
  "type": "module",
52
52
  "publishConfig": {
53
53
  "access": "public"
54
54
  }
55
- }
55
+ }