@conalog/ds-svelte 0.0.0-stage → 1.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.
- package/LICENSE +21 -0
- package/README.md +6 -2
- package/SUPPORT.json +366 -0
- package/dist/ActionButton.svelte +11 -0
- package/dist/Badge.svelte +49 -0
- package/dist/Button.svelte +107 -0
- package/dist/Card.svelte +76 -0
- package/dist/Checkbox.svelte +60 -0
- package/dist/Chip.svelte +133 -0
- package/dist/CircularSpinner.svelte +30 -0
- package/dist/Divider.svelte +29 -0
- package/dist/DsTheme.svelte +14 -0
- package/dist/IconButton.svelte +7 -0
- package/dist/Menu.svelte +277 -0
- package/dist/Modal.svelte +86 -0
- package/dist/Navigation.svelte +87 -0
- package/dist/PageHeader.svelte +81 -0
- package/dist/ScopePicker.svelte +271 -0
- package/dist/SearchField.svelte +7 -0
- package/dist/SegmentedControl.svelte +154 -0
- package/dist/StatusBanner.svelte +48 -0
- package/dist/Table.svelte +180 -0
- package/dist/Tabs.svelte +121 -0
- package/dist/TextField.svelte +122 -0
- package/dist/Tooltip.svelte +147 -0
- package/dist/button-options.mjs +1 -0
- package/dist/button.css +514 -0
- package/dist/display.css +47 -0
- package/dist/draft-overlay.mjs +67 -0
- package/dist/draft.css +248 -0
- package/dist/icon-provenance.json +62 -0
- package/dist/icons/check/filled.d.mts +3 -0
- package/dist/icons/check/filled.mjs +1 -0
- package/dist/icons/check/filled.svelte +10 -0
- package/dist/icons/check.d.mts +1 -0
- package/dist/icons/check.mjs +1 -0
- package/dist/icons/headset/filled.d.mts +3 -0
- package/dist/icons/headset/filled.mjs +1 -0
- package/dist/icons/headset/filled.svelte +10 -0
- package/dist/icons/headset.d.mts +1 -0
- package/dist/icons/headset.mjs +1 -0
- package/dist/icons/notification-bell/filled.d.mts +3 -0
- package/dist/icons/notification-bell/filled.mjs +1 -0
- package/dist/icons/notification-bell/filled.svelte +10 -0
- package/dist/icons/notification-bell-off/filled.d.mts +3 -0
- package/dist/icons/notification-bell-off/filled.mjs +1 -0
- package/dist/icons/notification-bell-off/filled.svelte +10 -0
- package/dist/icons/notification-bell-off.d.mts +1 -0
- package/dist/icons/notification-bell-off.mjs +1 -0
- package/dist/icons/notification-bell.d.mts +1 -0
- package/dist/icons/notification-bell.mjs +1 -0
- package/dist/icons/plant/filled.d.mts +3 -0
- package/dist/icons/plant/filled.mjs +1 -0
- package/dist/icons/plant/filled.svelte +13 -0
- package/dist/icons/plant.d.mts +1 -0
- package/dist/icons/plant.mjs +1 -0
- package/dist/icons/search/outlined.d.mts +3 -0
- package/dist/icons/search/outlined.mjs +1 -0
- package/dist/icons/search/outlined.svelte +10 -0
- package/dist/icons/search.d.mts +1 -0
- package/dist/icons/search.mjs +1 -0
- package/dist/icons.d.mts +6 -0
- package/dist/icons.mjs +6 -0
- package/dist/index.d.ts +269 -0
- package/dist/index.mjs +21 -0
- package/dist/licenses/check/filled.txt +202 -0
- package/dist/licenses/headset/filled.txt +21 -0
- package/dist/licenses/notification-bell/filled.txt +21 -0
- package/dist/licenses/notification-bell-off/filled.txt +21 -0
- package/dist/licenses/plant/filled.txt +24 -0
- package/dist/licenses/search/outlined.txt +21 -0
- package/package.json +58 -4
- package/release-source.json +5 -0
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"name": "plant",
|
|
4
|
+
"style": "filled",
|
|
5
|
+
"kind": "monochrome",
|
|
6
|
+
"defaultStyle": "filled",
|
|
7
|
+
"source": "Conalog · 최솔희 · 2026-05-28 Patch 패널맵 발전소 SVG",
|
|
8
|
+
"file": "plant.svg",
|
|
9
|
+
"license": "plant-NOTICE.txt",
|
|
10
|
+
"notice": "licenses/plant/filled.txt"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"name": "notification-bell",
|
|
14
|
+
"style": "filled",
|
|
15
|
+
"kind": "monochrome",
|
|
16
|
+
"defaultStyle": "filled",
|
|
17
|
+
"source": "Jam Icons 2.0.0 · https://github.com/Conalog/design-system/blob/372f243dcac9a4411ca6ee1c0c8b3e2e4927ff1c/common/assets/icons/jam/bell-f.svg · 경로와 viewBox 보존, 외부 클래스 제거, 기본 채움을 currentColor로 지정.",
|
|
18
|
+
"file": "jam/notification-bell.svg",
|
|
19
|
+
"license": "jam/LICENSE.txt",
|
|
20
|
+
"notice": "licenses/notification-bell/filled.txt"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"name": "notification-bell-off",
|
|
24
|
+
"style": "filled",
|
|
25
|
+
"kind": "monochrome",
|
|
26
|
+
"defaultStyle": "filled",
|
|
27
|
+
"source": "Jam Icons 2.0.0 · https://github.com/Conalog/design-system/blob/372f243dcac9a4411ca6ee1c0c8b3e2e4927ff1c/common/assets/icons/jam/bell-off-f.svg · 경로와 viewBox 보존, 외부 클래스 제거, 기본 채움을 currentColor로 지정.",
|
|
28
|
+
"file": "jam/notification-bell-off.svg",
|
|
29
|
+
"license": "jam/LICENSE.txt",
|
|
30
|
+
"notice": "licenses/notification-bell-off/filled.txt"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"name": "headset",
|
|
34
|
+
"style": "filled",
|
|
35
|
+
"kind": "monochrome",
|
|
36
|
+
"defaultStyle": "filled",
|
|
37
|
+
"source": "Jam Icons 2.0.0 · https://github.com/Conalog/design-system/blob/372f243dcac9a4411ca6ee1c0c8b3e2e4927ff1c/common/assets/icons/jam/headset-f.svg · 경로와 viewBox 보존, 외부 클래스 제거, 기본 채움을 currentColor로 지정.",
|
|
38
|
+
"file": "jam/headset.svg",
|
|
39
|
+
"license": "jam/LICENSE.txt",
|
|
40
|
+
"notice": "licenses/headset/filled.txt"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"name": "check",
|
|
44
|
+
"style": "filled",
|
|
45
|
+
"kind": "monochrome",
|
|
46
|
+
"defaultStyle": "filled",
|
|
47
|
+
"source": "Google Material Symbols · Rounded · Fill 1 · 24 px · https://github.com/google/material-design-icons/blob/10ecc14790612ca8fd164e3f4ffe9c16fc50d5b7/symbols/web/check/materialsymbolsrounded/check_fill1_24px.svg · 원본 채움을 currentColor로 지정했습니다.",
|
|
48
|
+
"file": "material/check.svg",
|
|
49
|
+
"license": "material/LICENSE.txt",
|
|
50
|
+
"notice": "licenses/check/filled.txt"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"name": "search",
|
|
54
|
+
"style": "outlined",
|
|
55
|
+
"kind": "monochrome",
|
|
56
|
+
"defaultStyle": "outlined",
|
|
57
|
+
"source": "Jam Icons 2.0.0 · https://github.com/Conalog/design-system/blob/372f243dcac9a4411ca6ee1c0c8b3e2e4927ff1c/common/assets/icons/jam/search.svg · 경로와 viewBox 보존, 외부 클래스 제거, 기본 채움을 currentColor로 지정.",
|
|
58
|
+
"file": "jam/search.svg",
|
|
59
|
+
"license": "jam/LICENSE.txt",
|
|
60
|
+
"notice": "licenses/search/outlined.txt"
|
|
61
|
+
}
|
|
62
|
+
]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './filled.svelte';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<!-- Generated from the common SVG registry. -->
|
|
2
|
+
<script>
|
|
3
|
+
let { label, size = 24, color } = $props();
|
|
4
|
+
let hasLabel = $derived.by(() => {
|
|
5
|
+
if (label == null) return false;
|
|
6
|
+
if (typeof label !== 'string' || !label.trim()) throw new TypeError('Icon label must contain text');
|
|
7
|
+
return true;
|
|
8
|
+
});
|
|
9
|
+
</script>
|
|
10
|
+
<svg fill="currentColor" data-source-modification="Modified by Conalog to use currentColor for the default fill." xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" style:color={color} width={size} height={size} role={hasLabel ? 'img' : undefined} aria-label={label} aria-hidden={hasLabel ? undefined : 'true'} focusable="false"><path d="m382-354 339-339q12-12 28-12t28 12q12 12 12 28.5T777-636L410-268q-12 12-28 12t-28-12L182-440q-12-12-11.5-28.5T183-497q12-12 28.5-12t28.5 12l142 143Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './check/filled.mjs';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './check/filled.mjs';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './filled.svelte';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<!-- Generated from the common SVG registry. -->
|
|
2
|
+
<script>
|
|
3
|
+
let { label, size = 24, color } = $props();
|
|
4
|
+
let hasLabel = $derived.by(() => {
|
|
5
|
+
if (label == null) return false;
|
|
6
|
+
if (typeof label !== 'string' || !label.trim()) throw new TypeError('Icon label must contain text');
|
|
7
|
+
return true;
|
|
8
|
+
});
|
|
9
|
+
</script>
|
|
10
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="-2 -2 24 24" preserveAspectRatio="xMinYMin" fill="currentColor" style:color={color} width={size} height={size} role={hasLabel ? 'img' : undefined} aria-label={label} aria-hidden={hasLabel ? undefined : 'true'} focusable="false"><path d="M20 10.858v7a2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h2a8 8 0 1 0-16 0h2a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2v-7c0-5.523 4.477-10 10-10s10 4.477 10 10z" /></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './headset/filled.mjs';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './headset/filled.mjs';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './filled.svelte';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<!-- Generated from the common SVG registry. -->
|
|
2
|
+
<script>
|
|
3
|
+
let { label, size = 24, color } = $props();
|
|
4
|
+
let hasLabel = $derived.by(() => {
|
|
5
|
+
if (label == null) return false;
|
|
6
|
+
if (typeof label !== 'string' || !label.trim()) throw new TypeError('Icon label must contain text');
|
|
7
|
+
return true;
|
|
8
|
+
});
|
|
9
|
+
</script>
|
|
10
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="-3 -2 24 24" preserveAspectRatio="xMinYMin" fill="currentColor" style:color={color} width={size} height={size} role={hasLabel ? 'img' : undefined} aria-label={label} aria-hidden={hasLabel ? undefined : 'true'} focusable="false"><path d="M18 17H0a8.978 8.978 0 0 1 3-6.708V6a6 6 0 1 1 12 0v4.292A8.978 8.978 0 0 1 18 17zM6.17 18h5.66a3.001 3.001 0 0 1-5.66 0z" /></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './filled.svelte';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<!-- Generated from the common SVG registry. -->
|
|
2
|
+
<script>
|
|
3
|
+
let { label, size = 24, color } = $props();
|
|
4
|
+
let hasLabel = $derived.by(() => {
|
|
5
|
+
if (label == null) return false;
|
|
6
|
+
if (typeof label !== 'string' || !label.trim()) throw new TypeError('Icon label must contain text');
|
|
7
|
+
return true;
|
|
8
|
+
});
|
|
9
|
+
</script>
|
|
10
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="-2 -1.5 24 24" preserveAspectRatio="xMinYMin" fill="currentColor" style:color={color} width={size} height={size} role={hasLabel ? 'img' : undefined} aria-label={label} aria-hidden={hasLabel ? undefined : 'true'} focusable="false"><path d="M1.295 15.705A9 9 0 0 1 4 11.292V7a6 6 0 0 1 10.243-4.243zm14.696-9.039Q16 6.832 16 7v4.292A8.98 8.98 0 0 1 19 18H4.657zM12.829 19a3.001 3.001 0 0 1-5.658 0zM19.092.707a1 1 0 0 1 0 1.414l-16.97 16.97a1 1 0 1 1-1.415-1.413L17.677.708a1 1 0 0 1 1.415 0z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './notification-bell-off/filled.mjs';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './notification-bell-off/filled.mjs';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './notification-bell/filled.mjs';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './notification-bell/filled.mjs';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './filled.svelte';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!-- Generated from the common SVG registry. -->
|
|
2
|
+
<script>
|
|
3
|
+
let { label, size = 24, color } = $props();
|
|
4
|
+
let hasLabel = $derived.by(() => {
|
|
5
|
+
if (label == null) return false;
|
|
6
|
+
if (typeof label !== 'string' || !label.trim()) throw new TypeError('Icon label must contain text');
|
|
7
|
+
return true;
|
|
8
|
+
});
|
|
9
|
+
</script>
|
|
10
|
+
<svg viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg" style:color={color} width={size} height={size} role={hasLabel ? 'img' : undefined} aria-label={label} aria-hidden={hasLabel ? undefined : 'true'} focusable="false">
|
|
11
|
+
<path d="M28.712 20.5166L27.3057 24.333H23.5528C23.2813 24.333 23.0901 24.0663 23.1778 23.8096L24.3067 20.5166H28.712ZM33.3545 23.7988C33.2448 24.1186 32.9436 24.3329 32.6055 24.333H28.3721L29.7774 20.5166H34.4805L33.3545 23.7988ZM35.6368 15.5254C35.9083 15.5254 36.0999 15.7929 36.0118 16.0498L34.8233 19.5166H30.1455L31.6162 15.5254H35.6368ZM29.0801 19.5166H24.6495L25.835 16.0605C25.9447 15.7406 26.2458 15.5254 26.584 15.5254H30.5508L29.0801 19.5166Z" fill="currentColor"/>
|
|
12
|
+
<path d="M20.0342 14.7716C20.6999 14.4213 21.4996 14.9042 21.5 15.6564V26.0001H35C35.5522 26.0001 35.9999 26.4479 36 27.0001V34.0001C36 34.5524 35.5523 35.0001 35 35.0001H13C12.4477 35.0001 12 34.5524 12 34.0001V19.6046C12.0001 19.2334 12.2057 18.8918 12.5342 18.7189L20.0342 14.7716ZM24.25 29.0001C24.112 29.0001 24 29.1121 24 29.2501V31.7501C24 31.8882 24.1119 32.0001 24.25 32.0001H26.75C26.8881 32.0001 27 31.8882 27 31.7501V29.2501C27 29.1121 26.888 29.0001 26.75 29.0001H24.25ZM29.25 29.0001C29.112 29.0001 29 29.1121 29 29.2501V31.7501C29 31.8882 29.1119 32.0001 29.25 32.0001H31.75C31.8881 32.0001 32 31.8882 32 31.7501V29.2501C32 29.1121 31.888 29.0001 31.75 29.0001H29.25ZM17.3125 23.0001L14.6875 27.2003H16.5332L16.1504 30.0001H16.4375L19.0625 25.7999H17.2168L17.5996 23.0001H17.3125Z" fill="currentColor"/>
|
|
13
|
+
</svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './plant/filled.mjs';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './plant/filled.mjs';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './outlined.svelte';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<!-- Generated from the common SVG registry. -->
|
|
2
|
+
<script>
|
|
3
|
+
let { label, size = 24, color } = $props();
|
|
4
|
+
let hasLabel = $derived.by(() => {
|
|
5
|
+
if (label == null) return false;
|
|
6
|
+
if (typeof label !== 'string' || !label.trim()) throw new TypeError('Icon label must contain text');
|
|
7
|
+
return true;
|
|
8
|
+
});
|
|
9
|
+
</script>
|
|
10
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="-2.5 -2.5 24 24" preserveAspectRatio="xMinYMin" fill="currentColor" style:color={color} width={size} height={size} role={hasLabel ? 'img' : undefined} aria-label={label} aria-hidden={hasLabel ? undefined : 'true'} focusable="false"><path d="M8 14A6 6 0 1 0 8 2a6 6 0 0 0 0 12zm6.32-1.094l3.58 3.58a1 1 0 1 1-1.415 1.413l-3.58-3.58a8 8 0 1 1 1.414-1.414z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './search/outlined.mjs';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './search/outlined.mjs';
|
package/dist/icons.d.mts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { default as CheckFilled } from './icons/check/filled.mjs';
|
|
2
|
+
export { default as HeadsetFilled } from './icons/headset/filled.mjs';
|
|
3
|
+
export { default as NotificationBellFilled } from './icons/notification-bell/filled.mjs';
|
|
4
|
+
export { default as NotificationBellOffFilled } from './icons/notification-bell-off/filled.mjs';
|
|
5
|
+
export { default as PlantFilled } from './icons/plant/filled.mjs';
|
|
6
|
+
export { default as SearchOutlined } from './icons/search/outlined.mjs';
|
package/dist/icons.mjs
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { default as CheckFilled } from './icons/check/filled.mjs';
|
|
2
|
+
export { default as HeadsetFilled } from './icons/headset/filled.mjs';
|
|
3
|
+
export { default as NotificationBellFilled } from './icons/notification-bell/filled.mjs';
|
|
4
|
+
export { default as NotificationBellOffFilled } from './icons/notification-bell-off/filled.mjs';
|
|
5
|
+
export { default as PlantFilled } from './icons/plant/filled.mjs';
|
|
6
|
+
export { default as SearchOutlined } from './icons/search/outlined.mjs';
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
import type { Component, Snippet } from 'svelte';
|
|
2
|
+
|
|
3
|
+
export const DsTheme: Component<{ theme: string; children?: Snippet }>;
|
|
4
|
+
|
|
5
|
+
export type DsButtonColor = 'primary' | 'neutral' | 'critical';
|
|
6
|
+
export type DsButtonSize = 'xs' | 'sm' | 'md' | 'lg';
|
|
7
|
+
export type DsButtonPresentation = 'enabled' | 'disabled' | 'loading';
|
|
8
|
+
|
|
9
|
+
interface ButtonProps {
|
|
10
|
+
label: string;
|
|
11
|
+
color?: DsButtonColor;
|
|
12
|
+
presentation?: DsButtonPresentation;
|
|
13
|
+
onclick?: (event: MouseEvent) => void;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface DsActionButtonProps extends ButtonProps {
|
|
17
|
+
variant?: 'solid' | 'weak' | 'outline' | 'clear' | 'quiet';
|
|
18
|
+
size?: DsButtonSize;
|
|
19
|
+
icon?: Component<{ size?: number }>;
|
|
20
|
+
iconPosition?: 'prefix' | 'suffix';
|
|
21
|
+
type?: 'button' | 'submit' | 'reset';
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface DsIconButtonProps extends ButtonProps {
|
|
25
|
+
variant?: 'weak' | 'outline' | 'clear' | 'quiet';
|
|
26
|
+
size?: DsButtonSize;
|
|
27
|
+
icon: Component<{ size?: number }>;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export const DsActionButton: Component<DsActionButtonProps>;
|
|
31
|
+
export const DsIconButton: Component<DsIconButtonProps>;
|
|
32
|
+
|
|
33
|
+
export const DsBadge: Component<{
|
|
34
|
+
label: string;
|
|
35
|
+
role?: 'neutral' | 'primary' | 'critical' | 'warning' | 'positive';
|
|
36
|
+
variant?: 'weak' | 'solid' | 'outline';
|
|
37
|
+
size?: 'sm' | 'md';
|
|
38
|
+
icon?: Component<{ size?: number }>;
|
|
39
|
+
}>;
|
|
40
|
+
|
|
41
|
+
export const DsCard: Component<{
|
|
42
|
+
heading?: string;
|
|
43
|
+
description?: string;
|
|
44
|
+
layout?: 'block' | 'list' | 'canvas';
|
|
45
|
+
actions?: Snippet;
|
|
46
|
+
children: Snippet;
|
|
47
|
+
}>;
|
|
48
|
+
|
|
49
|
+
export const DsStatusBanner: Component<{
|
|
50
|
+
message: string;
|
|
51
|
+
icon: Component<{ size?: number }>;
|
|
52
|
+
tone?: 'neutral' | 'accent';
|
|
53
|
+
actions?: Snippet;
|
|
54
|
+
}>;
|
|
55
|
+
|
|
56
|
+
export const DsPageHeader: Component<{
|
|
57
|
+
scope?: Snippet;
|
|
58
|
+
actions?: Snippet;
|
|
59
|
+
scopeLabel?: string;
|
|
60
|
+
actionsLabel?: string;
|
|
61
|
+
divider?: boolean;
|
|
62
|
+
}>;
|
|
63
|
+
|
|
64
|
+
export const DsTextField: Component<{
|
|
65
|
+
label: string;
|
|
66
|
+
value?: string;
|
|
67
|
+
name?: string;
|
|
68
|
+
placeholder?: string;
|
|
69
|
+
help?: string;
|
|
70
|
+
error?: string;
|
|
71
|
+
unit?: string;
|
|
72
|
+
icon?: Component<{ size?: number }>;
|
|
73
|
+
size?: 'sm' | 'md';
|
|
74
|
+
disabled?: boolean;
|
|
75
|
+
required?: boolean;
|
|
76
|
+
showLabel?: boolean;
|
|
77
|
+
oninput?: (value: string) => void;
|
|
78
|
+
}, {}, 'value'>;
|
|
79
|
+
|
|
80
|
+
export const DsCheckbox: Component<{
|
|
81
|
+
label: string;
|
|
82
|
+
checkIcon: Component<{ size?: number }>;
|
|
83
|
+
checked?: boolean;
|
|
84
|
+
disabled?: boolean;
|
|
85
|
+
showLabel?: boolean;
|
|
86
|
+
name?: string;
|
|
87
|
+
value?: string;
|
|
88
|
+
required?: boolean;
|
|
89
|
+
}, {}, 'checked'>;
|
|
90
|
+
|
|
91
|
+
export interface DsTabItem {
|
|
92
|
+
id: string;
|
|
93
|
+
label: string;
|
|
94
|
+
content: Snippet;
|
|
95
|
+
disabled?: boolean;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export const DsTabs: Component<{
|
|
99
|
+
label: string;
|
|
100
|
+
items: DsTabItem[];
|
|
101
|
+
selected?: string;
|
|
102
|
+
size?: 'sm' | 'md';
|
|
103
|
+
onchange?: (id: string) => void;
|
|
104
|
+
}, {}, 'selected'>;
|
|
105
|
+
|
|
106
|
+
export const DsDivider: Component<{
|
|
107
|
+
orientation?: 'horizontal' | 'vertical';
|
|
108
|
+
tone?: 'neutral' | 'weak';
|
|
109
|
+
inset?: 'none' | 'spacing.card-edge' | 'spacing-x.global-gutter';
|
|
110
|
+
decorative?: boolean;
|
|
111
|
+
}>;
|
|
112
|
+
|
|
113
|
+
export const DsCircularSpinner: Component<{ active: boolean; label: string }>;
|
|
114
|
+
|
|
115
|
+
export const DsSearchField: Component<{
|
|
116
|
+
label: string;
|
|
117
|
+
value?: string;
|
|
118
|
+
name?: string;
|
|
119
|
+
placeholder?: string;
|
|
120
|
+
icon?: Component<{ size?: number }>;
|
|
121
|
+
size?: 'sm' | 'md';
|
|
122
|
+
disabled?: boolean;
|
|
123
|
+
required?: boolean;
|
|
124
|
+
showLabel?: boolean;
|
|
125
|
+
clearLabel?: string;
|
|
126
|
+
oninput?: (value: string) => void;
|
|
127
|
+
}, {}, 'value'>;
|
|
128
|
+
|
|
129
|
+
type DraftIcon = Component<{ size?: number }>;
|
|
130
|
+
|
|
131
|
+
export interface DsMenuItem {
|
|
132
|
+
id: string;
|
|
133
|
+
label: string;
|
|
134
|
+
kind?: 'action' | 'radio' | 'checkbox';
|
|
135
|
+
checked?: boolean;
|
|
136
|
+
disabled?: boolean;
|
|
137
|
+
critical?: boolean;
|
|
138
|
+
group?: string;
|
|
139
|
+
icon?: DraftIcon;
|
|
140
|
+
children?: DsMenuItem[];
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
export interface DsMenuTrigger {
|
|
144
|
+
expanded: boolean;
|
|
145
|
+
controls: string;
|
|
146
|
+
onclick: (event: MouseEvent) => void;
|
|
147
|
+
onkeydown: (event: KeyboardEvent) => void;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export const DsMenu: Component<{
|
|
151
|
+
label: string;
|
|
152
|
+
triggerLabel?: string;
|
|
153
|
+
items: DsMenuItem[];
|
|
154
|
+
size?: 'sm' | 'md';
|
|
155
|
+
width?: 'auto' | 'trigger';
|
|
156
|
+
disabled?: boolean;
|
|
157
|
+
open?: boolean;
|
|
158
|
+
onselect?: (id: string, checked?: boolean) => void;
|
|
159
|
+
trigger?: Snippet<[DsMenuTrigger]>;
|
|
160
|
+
}, {}, 'open'>;
|
|
161
|
+
|
|
162
|
+
export const DsChip: Component<{
|
|
163
|
+
label: string;
|
|
164
|
+
kind?: 'toggle' | 'dropdown';
|
|
165
|
+
tone?: 'neutral' | 'attention' | 'critical' | 'warning' | 'positive';
|
|
166
|
+
selected?: boolean;
|
|
167
|
+
disabled?: boolean;
|
|
168
|
+
icon?: DraftIcon;
|
|
169
|
+
items?: DsMenuItem[];
|
|
170
|
+
selectedId?: string;
|
|
171
|
+
defaultId?: string;
|
|
172
|
+
onchange?: (selected: boolean) => void;
|
|
173
|
+
onselect?: (id: string) => void;
|
|
174
|
+
}, {}, 'selected' | 'selectedId'>;
|
|
175
|
+
|
|
176
|
+
export const DsModal: Component<{
|
|
177
|
+
title: string;
|
|
178
|
+
open?: boolean;
|
|
179
|
+
closeLabel?: string;
|
|
180
|
+
children: Snippet;
|
|
181
|
+
footer?: Snippet;
|
|
182
|
+
onclose?: () => void;
|
|
183
|
+
}, {}, 'open'>;
|
|
184
|
+
|
|
185
|
+
export interface DsNavigationItem {
|
|
186
|
+
id: string;
|
|
187
|
+
label: string;
|
|
188
|
+
href: string;
|
|
189
|
+
icon: DraftIcon;
|
|
190
|
+
group?: string;
|
|
191
|
+
dot?: boolean;
|
|
192
|
+
featured?: boolean;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
export const DsNavigation: Component<{
|
|
196
|
+
label: string;
|
|
197
|
+
items: DsNavigationItem[];
|
|
198
|
+
current?: string;
|
|
199
|
+
logo?: Snippet;
|
|
200
|
+
utilities?: Snippet;
|
|
201
|
+
}>;
|
|
202
|
+
|
|
203
|
+
export interface DsOptionItem {
|
|
204
|
+
id: string;
|
|
205
|
+
label: string;
|
|
206
|
+
disabled?: boolean;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
export interface DsScopeItem extends DsOptionItem {
|
|
210
|
+
description?: string;
|
|
211
|
+
group?: string;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
export const DsScopePicker: Component<{
|
|
215
|
+
label: string;
|
|
216
|
+
kind?: 'organization' | 'plant';
|
|
217
|
+
items: DsScopeItem[];
|
|
218
|
+
selected?: string;
|
|
219
|
+
disabled?: boolean;
|
|
220
|
+
placeholder?: string;
|
|
221
|
+
emptyLabel?: string;
|
|
222
|
+
actions?: Snippet;
|
|
223
|
+
onchange?: (id: string) => void;
|
|
224
|
+
}, {}, 'selected'>;
|
|
225
|
+
|
|
226
|
+
export const DsSegmentedControl: Component<{
|
|
227
|
+
label: string;
|
|
228
|
+
items: DsOptionItem[];
|
|
229
|
+
selected?: string;
|
|
230
|
+
size?: 'sm' | 'md' | 'lg';
|
|
231
|
+
surface?: 'card' | 'page';
|
|
232
|
+
disabled?: boolean;
|
|
233
|
+
onchange?: (id: string) => void;
|
|
234
|
+
}, {}, 'selected'>;
|
|
235
|
+
|
|
236
|
+
export interface DsTableColumn {
|
|
237
|
+
id: string;
|
|
238
|
+
label: string;
|
|
239
|
+
numeric?: boolean;
|
|
240
|
+
rowHeader?: boolean;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
export interface DsTableRow {
|
|
244
|
+
id: string;
|
|
245
|
+
cells?: Record<string, string | number | null>;
|
|
246
|
+
label?: string;
|
|
247
|
+
value?: string | number | null;
|
|
248
|
+
title?: string;
|
|
249
|
+
description?: string;
|
|
250
|
+
meta?: string;
|
|
251
|
+
href?: string;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
export const DsTable: Component<{
|
|
255
|
+
mode?: 'data' | 'property' | 'entry';
|
|
256
|
+
label?: string;
|
|
257
|
+
caption?: string;
|
|
258
|
+
size?: 'sm' | 'md';
|
|
259
|
+
columns?: DsTableColumn[];
|
|
260
|
+
rows: DsTableRow[];
|
|
261
|
+
cell?: Snippet<[DsTableRow, DsTableColumn]>;
|
|
262
|
+
badges?: Snippet<[DsTableRow]>;
|
|
263
|
+
}>;
|
|
264
|
+
|
|
265
|
+
export const DsTooltip: Component<{
|
|
266
|
+
label: string;
|
|
267
|
+
children: Snippet<[{ describedby: string }]>;
|
|
268
|
+
delay?: number;
|
|
269
|
+
}>;
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export { default as DsTheme } from './DsTheme.svelte';
|
|
2
|
+
export { default as DsActionButton } from './ActionButton.svelte';
|
|
3
|
+
export { default as DsIconButton } from './IconButton.svelte';
|
|
4
|
+
export { default as DsBadge } from './Badge.svelte';
|
|
5
|
+
export { default as DsCard } from './Card.svelte';
|
|
6
|
+
export { default as DsStatusBanner } from './StatusBanner.svelte';
|
|
7
|
+
export { default as DsPageHeader } from './PageHeader.svelte';
|
|
8
|
+
export { default as DsTextField } from './TextField.svelte';
|
|
9
|
+
export { default as DsCheckbox } from './Checkbox.svelte';
|
|
10
|
+
export { default as DsTabs } from './Tabs.svelte';
|
|
11
|
+
export { default as DsDivider } from './Divider.svelte';
|
|
12
|
+
export { default as DsCircularSpinner } from './CircularSpinner.svelte';
|
|
13
|
+
export { default as DsSearchField } from './SearchField.svelte';
|
|
14
|
+
export { default as DsChip } from './Chip.svelte';
|
|
15
|
+
export { default as DsMenu } from './Menu.svelte';
|
|
16
|
+
export { default as DsModal } from './Modal.svelte';
|
|
17
|
+
export { default as DsNavigation } from './Navigation.svelte';
|
|
18
|
+
export { default as DsScopePicker } from './ScopePicker.svelte';
|
|
19
|
+
export { default as DsSegmentedControl } from './SegmentedControl.svelte';
|
|
20
|
+
export { default as DsTable } from './Table.svelte';
|
|
21
|
+
export { default as DsTooltip } from './Tooltip.svelte';
|