cclkit4svelte 2.0.4 → 2.0.6
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/README.md +1 -1
- package/dist/Accordion.svelte +39 -0
- package/dist/Accordion.svelte.d.ts +24 -0
- package/dist/AccordionItem.svelte +96 -0
- package/dist/AccordionItem.svelte.d.ts +36 -0
- package/dist/Alert.svelte +1 -2
- package/dist/Alert.svelte.d.ts +4 -3
- package/dist/BookCard.svelte +96 -0
- package/dist/BookCard.svelte.d.ts +47 -0
- package/dist/Button.svelte +3 -3
- package/dist/Button.svelte.d.ts +7 -9
- package/dist/Card.svelte +0 -1
- package/dist/Card.svelte.d.ts +4 -3
- package/dist/Carousel.svelte +1 -2
- package/dist/Carousel.svelte.d.ts +4 -3
- package/dist/ChangeHistory.svelte +4 -4
- package/dist/ChangeHistory.svelte.d.ts +4 -3
- package/dist/Checkbox.svelte +1 -2
- package/dist/Checkbox.svelte.d.ts +4 -3
- package/dist/CommonHeader.svelte +2 -3
- package/dist/CommonHeader.svelte.d.ts +10 -12
- package/dist/DatePicker.svelte +16 -17
- package/dist/DatePicker.svelte.d.ts +4 -3
- package/dist/Footer.svelte +2 -3
- package/dist/Footer.svelte.d.ts +7 -7
- package/dist/FormGroup.svelte.d.ts +4 -2
- package/dist/Header.svelte +2 -3
- package/dist/Header.svelte.d.ts +10 -12
- package/dist/Input.svelte +1 -2
- package/dist/Input.svelte.d.ts +4 -3
- package/dist/ProgressBar.svelte.d.ts +4 -2
- package/dist/RadioButton.svelte +1 -2
- package/dist/RadioButton.svelte.d.ts +4 -3
- package/dist/Select.svelte +1 -2
- package/dist/Select.svelte.d.ts +4 -3
- package/dist/ServiceCard.svelte +2 -15
- package/dist/ServiceCard.svelte.d.ts +9 -3
- package/dist/Spinner.svelte.d.ts +4 -2
- package/dist/TabPanel.svelte +28 -0
- package/dist/TabPanel.svelte.d.ts +33 -0
- package/dist/Table.svelte +0 -1
- package/dist/Table.svelte.d.ts +4 -3
- package/dist/Tabs.svelte +85 -0
- package/dist/Tabs.svelte.d.ts +18 -0
- package/dist/Textarea.svelte +1 -2
- package/dist/Textarea.svelte.d.ts +4 -3
- package/dist/Thumbnail.svelte +1 -2
- package/dist/Thumbnail.svelte.d.ts +4 -3
- package/dist/Toggle.svelte +1 -2
- package/dist/Toggle.svelte.d.ts +4 -3
- package/dist/Tooltip.svelte.d.ts +4 -2
- package/dist/const/config.d.ts +1 -0
- package/dist/const/variables.css +2 -1
- package/dist/index.d.ts +7 -0
- package/dist/index.js +7 -0
- package/dist/scripts/accordionContext.d.ts +1 -0
- package/dist/scripts/accordionContext.js +1 -0
- package/dist/scripts/tabsContext.d.ts +1 -0
- package/dist/scripts/tabsContext.js +1 -0
- package/package.json +6 -2
package/dist/DatePicker.svelte
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
<script>import { createEventDispatcher } from "svelte";
|
|
2
2
|
import { DateTime } from "luxon";
|
|
3
|
-
import "./const/variables.css";
|
|
4
3
|
const dispatch = createEventDispatcher();
|
|
5
4
|
export let selectedDate = null;
|
|
6
5
|
export let placeholder = "\u65E5\u4ED8\u3092\u9078\u629E";
|
|
@@ -64,19 +63,19 @@ $: daysInMonth = getDaysInMonth(currentMonth);
|
|
|
64
63
|
- `on:click_outside` で外側クリック時の動作を定義
|
|
65
64
|
-->
|
|
66
65
|
<div
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
66
|
+
class="datePickerWrapper"
|
|
67
|
+
style="--selected-color: var({borderColor});"
|
|
68
|
+
use:clickOutside
|
|
69
|
+
on:click_outside={closeCalendar}
|
|
71
70
|
>
|
|
72
71
|
<input
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
72
|
+
type="text"
|
|
73
|
+
{id}
|
|
74
|
+
value={formattedDate}
|
|
75
|
+
{placeholder}
|
|
76
|
+
on:focus={openCalendar}
|
|
77
|
+
readonly
|
|
78
|
+
style="border-color: var({borderColor});"
|
|
80
79
|
/>
|
|
81
80
|
|
|
82
81
|
{#if showCalendar}
|
|
@@ -101,13 +100,13 @@ $: daysInMonth = getDaysInMonth(currentMonth);
|
|
|
101
100
|
<div class="daysGrid">
|
|
102
101
|
{#each daysInMonth as day}
|
|
103
102
|
<button
|
|
104
|
-
|
|
105
|
-
|
|
103
|
+
class:currentMonthDay={day !== null}
|
|
104
|
+
class:selected={selectedDate &&
|
|
106
105
|
day === DateTime.fromJSDate(selectedDate).day &&
|
|
107
106
|
currentMonth.month === DateTime.fromJSDate(selectedDate).month &&
|
|
108
107
|
currentMonth.year === DateTime.fromJSDate(selectedDate).year}
|
|
109
|
-
|
|
110
|
-
|
|
108
|
+
on:click={() => day && selectDay(day)}
|
|
109
|
+
disabled={day === null}
|
|
111
110
|
>
|
|
112
111
|
{day !== null ? day : ''}
|
|
113
112
|
</button>
|
|
@@ -202,4 +201,4 @@ $: daysInMonth = getDaysInMonth(currentMonth);
|
|
|
202
201
|
color: #ccc;
|
|
203
202
|
cursor: default;
|
|
204
203
|
}
|
|
205
|
-
</style>
|
|
204
|
+
</style>
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import './const/variables.css';
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
3
2
|
declare const __propDef: {
|
|
4
3
|
props: {
|
|
5
4
|
/**
|
|
@@ -30,10 +29,12 @@ declare const __propDef: {
|
|
|
30
29
|
[evt: string]: CustomEvent<any>;
|
|
31
30
|
};
|
|
32
31
|
slots: {};
|
|
32
|
+
exports?: {} | undefined;
|
|
33
|
+
bindings?: string | undefined;
|
|
33
34
|
};
|
|
34
35
|
export type DatePickerProps = typeof __propDef.props;
|
|
35
36
|
export type DatePickerEvents = typeof __propDef.events;
|
|
36
37
|
export type DatePickerSlots = typeof __propDef.slots;
|
|
37
|
-
export default class DatePicker extends
|
|
38
|
+
export default class DatePicker extends SvelteComponent<DatePickerProps, DatePickerEvents, DatePickerSlots> {
|
|
38
39
|
}
|
|
39
40
|
export {};
|
package/dist/Footer.svelte
CHANGED
package/dist/Footer.svelte.d.ts
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import './const/
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import type { ColorVar } from './const/config';
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
7
|
-
* CCLVividColorの中から指定する
|
|
6
|
+
* フッター背景色(CCLVividColor/CCLPastelColor の CSS 変数名)
|
|
8
7
|
* @default --strawberry-pink
|
|
9
|
-
|
|
10
|
-
*/ bgColor: string;
|
|
8
|
+
*/ bgColor?: ColorVar;
|
|
11
9
|
};
|
|
12
10
|
events: {
|
|
13
11
|
[evt: string]: CustomEvent<any>;
|
|
14
12
|
};
|
|
15
13
|
slots: {};
|
|
14
|
+
exports?: {} | undefined;
|
|
15
|
+
bindings?: string | undefined;
|
|
16
16
|
};
|
|
17
17
|
export type FooterProps = typeof __propDef.props;
|
|
18
18
|
export type FooterEvents = typeof __propDef.events;
|
|
19
19
|
export type FooterSlots = typeof __propDef.slots;
|
|
20
|
-
export default class Footer extends
|
|
20
|
+
export default class Footer extends SvelteComponent<FooterProps, FooterEvents, FooterSlots> {
|
|
21
21
|
}
|
|
22
22
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
2
|
declare const __propDef: {
|
|
3
3
|
props: {
|
|
4
4
|
/**
|
|
@@ -28,10 +28,12 @@ declare const __propDef: {
|
|
|
28
28
|
slots: {
|
|
29
29
|
default: {};
|
|
30
30
|
};
|
|
31
|
+
exports?: {} | undefined;
|
|
32
|
+
bindings?: string | undefined;
|
|
31
33
|
};
|
|
32
34
|
export type FormGroupProps = typeof __propDef.props;
|
|
33
35
|
export type FormGroupEvents = typeof __propDef.events;
|
|
34
36
|
export type FormGroupSlots = typeof __propDef.slots;
|
|
35
|
-
export default class FormGroup extends
|
|
37
|
+
export default class FormGroup extends SvelteComponent<FormGroupProps, FormGroupEvents, FormGroupSlots> {
|
|
36
38
|
}
|
|
37
39
|
export {};
|
package/dist/Header.svelte
CHANGED
package/dist/Header.svelte.d.ts
CHANGED
|
@@ -1,28 +1,26 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import './const/
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import type { ColorVar } from './const/config';
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
7
|
-
* CCLVividColorの中から指定する
|
|
6
|
+
* ヘッダー背景色(CCLVividColor の CSS 変数名)
|
|
8
7
|
* @default --strawberry-pink
|
|
9
|
-
|
|
10
|
-
*/ bgColor: string;
|
|
8
|
+
*/ bgColor?: ColorVar;
|
|
11
9
|
/**
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
|
|
15
|
-
* @type string
|
|
16
|
-
*/ height: string;
|
|
10
|
+
* ヘッダー高さ(HeaderHeight の CSS 変数名)
|
|
11
|
+
* @default --hd-normal
|
|
12
|
+
*/ height?: string;
|
|
17
13
|
};
|
|
18
14
|
events: {
|
|
19
15
|
[evt: string]: CustomEvent<any>;
|
|
20
16
|
};
|
|
21
17
|
slots: {};
|
|
18
|
+
exports?: {} | undefined;
|
|
19
|
+
bindings?: string | undefined;
|
|
22
20
|
};
|
|
23
21
|
export type HeaderProps = typeof __propDef.props;
|
|
24
22
|
export type HeaderEvents = typeof __propDef.events;
|
|
25
23
|
export type HeaderSlots = typeof __propDef.slots;
|
|
26
|
-
export default class Header extends
|
|
24
|
+
export default class Header extends SvelteComponent<HeaderProps, HeaderEvents, HeaderSlots> {
|
|
27
25
|
}
|
|
28
26
|
export {};
|
package/dist/Input.svelte
CHANGED
package/dist/Input.svelte.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import './const/variables.css';
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
3
2
|
declare const __propDef: {
|
|
4
3
|
props: {
|
|
5
4
|
/**
|
|
@@ -52,10 +51,12 @@ declare const __propDef: {
|
|
|
52
51
|
[evt: string]: CustomEvent<any>;
|
|
53
52
|
};
|
|
54
53
|
slots: {};
|
|
54
|
+
exports?: {} | undefined;
|
|
55
|
+
bindings?: string | undefined;
|
|
55
56
|
};
|
|
56
57
|
export type InputProps = typeof __propDef.props;
|
|
57
58
|
export type InputEvents = typeof __propDef.events;
|
|
58
59
|
export type InputSlots = typeof __propDef.slots;
|
|
59
|
-
export default class Input extends
|
|
60
|
+
export default class Input extends SvelteComponent<InputProps, InputEvents, InputSlots> {
|
|
60
61
|
}
|
|
61
62
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
2
|
import { ProgressBarHeight } from './const/config';
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
@@ -15,10 +15,12 @@ declare const __propDef: {
|
|
|
15
15
|
[evt: string]: CustomEvent<any>;
|
|
16
16
|
};
|
|
17
17
|
slots: {};
|
|
18
|
+
exports?: {} | undefined;
|
|
19
|
+
bindings?: string | undefined;
|
|
18
20
|
};
|
|
19
21
|
export type ProgressBarProps = typeof __propDef.props;
|
|
20
22
|
export type ProgressBarEvents = typeof __propDef.events;
|
|
21
23
|
export type ProgressBarSlots = typeof __propDef.slots;
|
|
22
|
-
export default class ProgressBar extends
|
|
24
|
+
export default class ProgressBar extends SvelteComponent<ProgressBarProps, ProgressBarEvents, ProgressBarSlots> {
|
|
23
25
|
}
|
|
24
26
|
export {};
|
package/dist/RadioButton.svelte
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import './const/variables.css';
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
3
2
|
declare const __propDef: {
|
|
4
3
|
props: {
|
|
5
4
|
/**
|
|
@@ -30,10 +29,12 @@ declare const __propDef: {
|
|
|
30
29
|
[evt: string]: CustomEvent<any>;
|
|
31
30
|
};
|
|
32
31
|
slots: {};
|
|
32
|
+
exports?: {} | undefined;
|
|
33
|
+
bindings?: string | undefined;
|
|
33
34
|
};
|
|
34
35
|
export type RadioButtonProps = typeof __propDef.props;
|
|
35
36
|
export type RadioButtonEvents = typeof __propDef.events;
|
|
36
37
|
export type RadioButtonSlots = typeof __propDef.slots;
|
|
37
|
-
export default class RadioButton extends
|
|
38
|
+
export default class RadioButton extends SvelteComponent<RadioButtonProps, RadioButtonEvents, RadioButtonSlots> {
|
|
38
39
|
}
|
|
39
40
|
export {};
|
package/dist/Select.svelte
CHANGED
package/dist/Select.svelte.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import './const/variables.css';
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
3
2
|
declare const __propDef: {
|
|
4
3
|
props: {
|
|
5
4
|
/**
|
|
@@ -39,10 +38,12 @@ declare const __propDef: {
|
|
|
39
38
|
[evt: string]: CustomEvent<any>;
|
|
40
39
|
};
|
|
41
40
|
slots: {};
|
|
41
|
+
exports?: {} | undefined;
|
|
42
|
+
bindings?: string | undefined;
|
|
42
43
|
};
|
|
43
44
|
export type SelectProps = typeof __propDef.props;
|
|
44
45
|
export type SelectEvents = typeof __propDef.events;
|
|
45
46
|
export type SelectSlots = typeof __propDef.slots;
|
|
46
|
-
export default class Select extends
|
|
47
|
+
export default class Select extends SvelteComponent<SelectProps, SelectEvents, SelectSlots> {
|
|
47
48
|
}
|
|
48
49
|
export {};
|
package/dist/ServiceCard.svelte
CHANGED
|
@@ -3,19 +3,7 @@ export let description;
|
|
|
3
3
|
export let imageUrl;
|
|
4
4
|
export let altText;
|
|
5
5
|
export let linkUrl = void 0;
|
|
6
|
-
export let borderColor = "
|
|
7
|
-
const colorMap = {
|
|
8
|
-
"var(--peach-pink)": "var(--strawberry-pink)",
|
|
9
|
-
"var(--lemon-yellow)": "var(--pineapple-yellow)",
|
|
10
|
-
"var(--sugar-blue)": "var(--soda-blue)",
|
|
11
|
-
"var(--matcha-green)": "var(--melon-green)",
|
|
12
|
-
"var(--akebi-purple)": "var(--grape-purple)",
|
|
13
|
-
"var(--cloud-grey)": "var(--wrap-grey)"
|
|
14
|
-
};
|
|
15
|
-
let borderColorHover;
|
|
16
|
-
$: {
|
|
17
|
-
borderColorHover = colorMap[borderColor] || borderColor;
|
|
18
|
-
}
|
|
6
|
+
export let borderColor = "--strawberry-pink";
|
|
19
7
|
const Tag = linkUrl ? "a" : "div";
|
|
20
8
|
</script>
|
|
21
9
|
|
|
@@ -25,7 +13,7 @@ const Tag = linkUrl ? "a" : "div";
|
|
|
25
13
|
class="service-card"
|
|
26
14
|
target={linkUrl ? '_blank' : undefined}
|
|
27
15
|
rel={linkUrl ? 'noopener noreferrer' : undefined}
|
|
28
|
-
style="--card-border-color: {borderColor};
|
|
16
|
+
style="--card-border-color: var({borderColor});"
|
|
29
17
|
>
|
|
30
18
|
<div class="image-container">
|
|
31
19
|
<img src={imageUrl} alt={altText} class="service-image" />
|
|
@@ -55,7 +43,6 @@ const Tag = linkUrl ? "a" : "div";
|
|
|
55
43
|
.service-card:hover {
|
|
56
44
|
transform: translateY(-4px);
|
|
57
45
|
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
|
|
58
|
-
border-color: var(--card-border-color-hover);
|
|
59
46
|
}
|
|
60
47
|
|
|
61
48
|
.image-container {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
2
|
declare const __propDef: {
|
|
3
3
|
props: {
|
|
4
4
|
serviceName: string;
|
|
@@ -6,16 +6,22 @@ declare const __propDef: {
|
|
|
6
6
|
imageUrl: string;
|
|
7
7
|
altText: string;
|
|
8
8
|
linkUrl?: string | undefined;
|
|
9
|
-
|
|
9
|
+
/**
|
|
10
|
+
* 枠線の色
|
|
11
|
+
* @default --strawberry-pink
|
|
12
|
+
* @type string
|
|
13
|
+
*/ borderColor?: string;
|
|
10
14
|
};
|
|
11
15
|
events: {
|
|
12
16
|
[evt: string]: CustomEvent<any>;
|
|
13
17
|
};
|
|
14
18
|
slots: {};
|
|
19
|
+
exports?: {} | undefined;
|
|
20
|
+
bindings?: string | undefined;
|
|
15
21
|
};
|
|
16
22
|
export type ServiceCardProps = typeof __propDef.props;
|
|
17
23
|
export type ServiceCardEvents = typeof __propDef.events;
|
|
18
24
|
export type ServiceCardSlots = typeof __propDef.slots;
|
|
19
|
-
export default class ServiceCard extends
|
|
25
|
+
export default class ServiceCard extends SvelteComponent<ServiceCardProps, ServiceCardEvents, ServiceCardSlots> {
|
|
20
26
|
}
|
|
21
27
|
export {};
|
package/dist/Spinner.svelte.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
2
|
declare const __propDef: {
|
|
3
3
|
props: {
|
|
4
4
|
size?: string;
|
|
@@ -9,10 +9,12 @@ declare const __propDef: {
|
|
|
9
9
|
[evt: string]: CustomEvent<any>;
|
|
10
10
|
};
|
|
11
11
|
slots: {};
|
|
12
|
+
exports?: {} | undefined;
|
|
13
|
+
bindings?: string | undefined;
|
|
12
14
|
};
|
|
13
15
|
export type SpinnerProps = typeof __propDef.props;
|
|
14
16
|
export type SpinnerEvents = typeof __propDef.events;
|
|
15
17
|
export type SpinnerSlots = typeof __propDef.slots;
|
|
16
|
-
export default class Spinner extends
|
|
18
|
+
export default class Spinner extends SvelteComponent<SpinnerProps, SpinnerEvents, SpinnerSlots> {
|
|
17
19
|
}
|
|
18
20
|
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<script>import { getContext, onMount } from "svelte";
|
|
2
|
+
export let label;
|
|
3
|
+
export let color = "--strawberry-pink";
|
|
4
|
+
export let disabled = false;
|
|
5
|
+
import { TABS_CONTEXT_KEY } from "./scripts/tabsContext";
|
|
6
|
+
const { addTab, activeTabLabel } = getContext(TABS_CONTEXT_KEY);
|
|
7
|
+
onMount(() => {
|
|
8
|
+
addTab({ label, color, disabled });
|
|
9
|
+
});
|
|
10
|
+
$: isActive = $activeTabLabel === label;
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
{#if isActive}
|
|
14
|
+
<div
|
|
15
|
+
role="tabpanel"
|
|
16
|
+
id={`tab-panel-${label}`}
|
|
17
|
+
aria-labelledby={`tab-button-${label}`}
|
|
18
|
+
class="tab-panel-content"
|
|
19
|
+
>
|
|
20
|
+
<slot />
|
|
21
|
+
</div>
|
|
22
|
+
{/if}
|
|
23
|
+
|
|
24
|
+
<style>
|
|
25
|
+
.tab-panel-content {
|
|
26
|
+
/* Add any panel-specific styling here if needed */
|
|
27
|
+
}
|
|
28
|
+
</style>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
/**
|
|
5
|
+
* タブのボタンに表示されるテキスト
|
|
6
|
+
* @type string
|
|
7
|
+
*/ label: string;
|
|
8
|
+
/**
|
|
9
|
+
* このタブがアクティブな時のインジケーターの色
|
|
10
|
+
* @default --strawberry-pink
|
|
11
|
+
* @type string
|
|
12
|
+
*/ color?: string;
|
|
13
|
+
/**
|
|
14
|
+
* このタブを無効化するかどうか
|
|
15
|
+
* @default false
|
|
16
|
+
* @type boolean
|
|
17
|
+
*/ disabled?: boolean;
|
|
18
|
+
};
|
|
19
|
+
events: {
|
|
20
|
+
[evt: string]: CustomEvent<any>;
|
|
21
|
+
};
|
|
22
|
+
slots: {
|
|
23
|
+
default: {};
|
|
24
|
+
};
|
|
25
|
+
exports?: {} | undefined;
|
|
26
|
+
bindings?: string | undefined;
|
|
27
|
+
};
|
|
28
|
+
export type TabPanelProps = typeof __propDef.props;
|
|
29
|
+
export type TabPanelEvents = typeof __propDef.events;
|
|
30
|
+
export type TabPanelSlots = typeof __propDef.slots;
|
|
31
|
+
export default class TabPanel extends SvelteComponent<TabPanelProps, TabPanelEvents, TabPanelSlots> {
|
|
32
|
+
}
|
|
33
|
+
export {};
|
package/dist/Table.svelte
CHANGED
package/dist/Table.svelte.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import './const/variables.css';
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
3
2
|
declare const __propDef: {
|
|
4
3
|
props: {
|
|
5
4
|
/**
|
|
@@ -23,10 +22,12 @@ declare const __propDef: {
|
|
|
23
22
|
[evt: string]: CustomEvent<any>;
|
|
24
23
|
};
|
|
25
24
|
slots: {};
|
|
25
|
+
exports?: {} | undefined;
|
|
26
|
+
bindings?: string | undefined;
|
|
26
27
|
};
|
|
27
28
|
export type TableProps = typeof __propDef.props;
|
|
28
29
|
export type TableEvents = typeof __propDef.events;
|
|
29
30
|
export type TableSlots = typeof __propDef.slots;
|
|
30
|
-
export default class Table extends
|
|
31
|
+
export default class Table extends SvelteComponent<TableProps, TableEvents, TableSlots> {
|
|
31
32
|
}
|
|
32
33
|
export {};
|
package/dist/Tabs.svelte
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
<script>import { setContext } from "svelte";
|
|
2
|
+
import { writable } from "svelte/store";
|
|
3
|
+
import { TABS_CONTEXT_KEY } from "./scripts/tabsContext";
|
|
4
|
+
const tabData = writable([]);
|
|
5
|
+
const activeTabLabel = writable("");
|
|
6
|
+
setContext(TABS_CONTEXT_KEY, {
|
|
7
|
+
addTab: (tab) => {
|
|
8
|
+
tabData.update((currentTabs) => {
|
|
9
|
+
const newTabs = [...currentTabs, tab];
|
|
10
|
+
if (newTabs.length === 1) {
|
|
11
|
+
activeTabLabel.set(tab.label);
|
|
12
|
+
}
|
|
13
|
+
return newTabs;
|
|
14
|
+
});
|
|
15
|
+
},
|
|
16
|
+
activeTabLabel
|
|
17
|
+
});
|
|
18
|
+
let activeColor = "--strawberry-pink";
|
|
19
|
+
$: {
|
|
20
|
+
const activeTab = $tabData.find((t) => t.label === $activeTabLabel);
|
|
21
|
+
activeColor = activeTab ? activeTab.color : "--strawberry-pink";
|
|
22
|
+
}
|
|
23
|
+
</script>
|
|
24
|
+
|
|
25
|
+
<div class="tabs-container">
|
|
26
|
+
<div role="tablist" class="tab-list">
|
|
27
|
+
{#each $tabData as tab}
|
|
28
|
+
<button
|
|
29
|
+
role="tab"
|
|
30
|
+
class="tab-button"
|
|
31
|
+
class:active={tab.label === $activeTabLabel}
|
|
32
|
+
aria-selected={tab.label === $activeTabLabel}
|
|
33
|
+
aria-controls={`tab-panel-${tab.label}`}
|
|
34
|
+
id={`tab-button-${tab.label}`}
|
|
35
|
+
on:click={() => activeTabLabel.set(tab.label)}
|
|
36
|
+
style="--active-color: var({tab.color});"
|
|
37
|
+
disabled={tab.disabled}
|
|
38
|
+
>
|
|
39
|
+
{tab.label}
|
|
40
|
+
</button>
|
|
41
|
+
{/each}
|
|
42
|
+
</div>
|
|
43
|
+
|
|
44
|
+
<div class="tab-content">
|
|
45
|
+
<slot />
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
48
|
+
|
|
49
|
+
<style>
|
|
50
|
+
.tab-list {
|
|
51
|
+
display: flex;
|
|
52
|
+
border-bottom: 2px solid #eee;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.tab-button {
|
|
56
|
+
padding: 12px 24px;
|
|
57
|
+
cursor: pointer;
|
|
58
|
+
border: none;
|
|
59
|
+
background: none;
|
|
60
|
+
font-size: 1rem;
|
|
61
|
+
color: var(--wrap-grey);
|
|
62
|
+
border-bottom: 3px solid transparent;
|
|
63
|
+
margin-bottom: -2px; /* Overlap the container's border */
|
|
64
|
+
transition: border-color 0.2s ease-in-out;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.tab-button.active {
|
|
68
|
+
border-bottom-color: var(--active-color);
|
|
69
|
+
font-weight: bold;
|
|
70
|
+
color: black;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.tab-button:hover:not(.active) {
|
|
74
|
+
color: black;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.tab-content {
|
|
78
|
+
padding: 24px 8px;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.tab-button:disabled {
|
|
82
|
+
opacity: 0.6;
|
|
83
|
+
cursor: not-allowed;
|
|
84
|
+
}
|
|
85
|
+
</style>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: Record<string, never>;
|
|
4
|
+
events: {
|
|
5
|
+
[evt: string]: CustomEvent<any>;
|
|
6
|
+
};
|
|
7
|
+
slots: {
|
|
8
|
+
default: {};
|
|
9
|
+
};
|
|
10
|
+
exports?: {} | undefined;
|
|
11
|
+
bindings?: string | undefined;
|
|
12
|
+
};
|
|
13
|
+
export type TabsProps = typeof __propDef.props;
|
|
14
|
+
export type TabsEvents = typeof __propDef.events;
|
|
15
|
+
export type TabsSlots = typeof __propDef.slots;
|
|
16
|
+
export default class Tabs extends SvelteComponent<TabsProps, TabsEvents, TabsSlots> {
|
|
17
|
+
}
|
|
18
|
+
export {};
|
package/dist/Textarea.svelte
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import './const/variables.css';
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
3
2
|
declare const __propDef: {
|
|
4
3
|
props: {
|
|
5
4
|
/**
|
|
@@ -47,10 +46,12 @@ declare const __propDef: {
|
|
|
47
46
|
[evt: string]: CustomEvent<any>;
|
|
48
47
|
};
|
|
49
48
|
slots: {};
|
|
49
|
+
exports?: {} | undefined;
|
|
50
|
+
bindings?: string | undefined;
|
|
50
51
|
};
|
|
51
52
|
export type TextareaProps = typeof __propDef.props;
|
|
52
53
|
export type TextareaEvents = typeof __propDef.events;
|
|
53
54
|
export type TextareaSlots = typeof __propDef.slots;
|
|
54
|
-
export default class Textarea extends
|
|
55
|
+
export default class Textarea extends SvelteComponent<TextareaProps, TextareaEvents, TextareaSlots> {
|
|
55
56
|
}
|
|
56
57
|
export {};
|
package/dist/Thumbnail.svelte
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import './const/variables.css';
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
3
2
|
declare const __propDef: {
|
|
4
3
|
props: {
|
|
5
4
|
/**
|
|
@@ -24,10 +23,12 @@ declare const __propDef: {
|
|
|
24
23
|
[evt: string]: CustomEvent<any>;
|
|
25
24
|
};
|
|
26
25
|
slots: {};
|
|
26
|
+
exports?: {} | undefined;
|
|
27
|
+
bindings?: string | undefined;
|
|
27
28
|
};
|
|
28
29
|
export type ThumbnailProps = typeof __propDef.props;
|
|
29
30
|
export type ThumbnailEvents = typeof __propDef.events;
|
|
30
31
|
export type ThumbnailSlots = typeof __propDef.slots;
|
|
31
|
-
export default class Thumbnail extends
|
|
32
|
+
export default class Thumbnail extends SvelteComponent<ThumbnailProps, ThumbnailEvents, ThumbnailSlots> {
|
|
32
33
|
}
|
|
33
34
|
export {};
|
package/dist/Toggle.svelte
CHANGED