@reshape-biotech/design-system 1.2.5 → 1.2.7
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 +3 -1
- package/dist/app.css +97 -97
- package/dist/components/activity/Activity.stories.svelte +104 -104
- package/dist/components/activity/Activity.svelte +112 -112
- package/dist/components/avatar/Avatar.stories.svelte +23 -23
- package/dist/components/avatar/Avatar.svelte +54 -54
- package/dist/components/banner/Banner.stories.svelte +105 -105
- package/dist/components/banner/Banner.svelte +42 -42
- package/dist/components/button/Button.stories.svelte +61 -61
- package/dist/components/button/Button.svelte +95 -95
- package/dist/components/card/Card.stories.svelte +112 -112
- package/dist/components/card/Card.svelte +18 -18
- package/dist/components/checkbox/Checkbox.stories.svelte +8 -8
- package/dist/components/checkbox/Checkbox.svelte +17 -17
- package/dist/components/collapsible/Collapsible.stories.svelte +26 -26
- package/dist/components/collapsible/components/collapsible-content.svelte +20 -20
- package/dist/components/collapsible/components/collapsible-trigger.svelte +12 -12
- package/dist/components/combobox/Combobox.stories.svelte +412 -412
- package/dist/components/combobox/components/combobox-add.svelte +8 -8
- package/dist/components/combobox/components/combobox-content.svelte +39 -39
- package/dist/components/combobox/components/combobox-indicator.svelte +1 -1
- package/dist/components/datepicker/DatePicker.stories.svelte +196 -196
- package/dist/components/datepicker/DatePicker.svelte +173 -173
- package/dist/components/divider/Divider.stories.svelte +7 -7
- package/dist/components/divider/Divider.svelte +9 -9
- package/dist/components/drawer/Drawer.stories.svelte +51 -51
- package/dist/components/drawer/Drawer.svelte +33 -33
- package/dist/components/drawer/DrawerLabel.svelte +10 -10
- package/dist/components/dropdown/Dropdown.stories.svelte +210 -210
- package/dist/components/dropdown/Dropdown.svelte +57 -57
- package/dist/components/dropdown/components/DropdownContent.svelte +16 -16
- package/dist/components/dropdown/components/DropdownMenu.svelte +10 -10
- package/dist/components/dropdown/components/DropdownTrigger.svelte +37 -37
- package/dist/components/dropdown/components/OutlinedButton.svelte +9 -9
- package/dist/components/empty-content/EmptyContent.stories.svelte +38 -38
- package/dist/components/empty-content/EmptyContent.svelte +12 -12
- package/dist/components/graphs/bar-chart/BarChart.stories.svelte +91 -91
- package/dist/components/graphs/bar-chart/BarChart.svelte +147 -147
- package/dist/components/graphs/bar-chart/StackedBarChart.stories.svelte +57 -57
- package/dist/components/graphs/bar-chart/StackedBarChart.svelte +198 -199
- package/dist/components/graphs/chart/Chart.stories.svelte +96 -96
- package/dist/components/graphs/chart/Chart.svelte +207 -207
- package/dist/components/graphs/line/LineChart.stories.svelte +138 -138
- package/dist/components/graphs/line/LineChart.svelte +140 -142
- package/dist/components/graphs/matrix/Matrix.stories.svelte +117 -117
- package/dist/components/graphs/matrix/Matrix.svelte +141 -141
- package/dist/components/graphs/multiline/MultiLineChart.stories.svelte +168 -168
- package/dist/components/graphs/multiline/MultiLineChart.svelte +236 -236
- package/dist/components/graphs/scatterplot/Scatterplot.stories.svelte +84 -84
- package/dist/components/graphs/scatterplot/Scatterplot.svelte +302 -302
- package/dist/components/graphs/utils/duration.d.ts +1 -0
- package/dist/components/graphs/utils/duration.js +33 -0
- package/dist/components/graphs/utils/tooltipFormatter.js +1 -1
- package/dist/components/icon-button/IconButton.stories.svelte +64 -64
- package/dist/components/icon-button/IconButton.svelte +88 -88
- package/dist/components/icons/AnalysisIcon.stories.svelte +18 -18
- package/dist/components/icons/AnalysisIcon.svelte +96 -96
- package/dist/components/icons/Icon.stories.svelte +111 -111
- package/dist/components/icons/Icon.svelte +17 -17
- package/dist/components/icons/PrincipalIcon.svelte +59 -59
- package/dist/components/icons/custom/Halo.svelte +31 -31
- package/dist/components/icons/custom/Well.svelte +27 -27
- package/dist/components/icons/index.d.ts +3 -2
- package/dist/components/icons/index.js +3 -1
- package/dist/components/image/Image.svelte +42 -42
- package/dist/components/input/Input.stories.svelte +55 -55
- package/dist/components/input/Input.svelte +121 -121
- package/dist/components/label/Label.stories.svelte +18 -18
- package/dist/components/label/Label.svelte +11 -11
- package/dist/components/list/List.stories.svelte +84 -84
- package/dist/components/list/List.svelte +20 -20
- package/dist/components/logo/Logo.stories.svelte +15 -15
- package/dist/components/logo/Logo.svelte +30 -30
- package/dist/components/manual-cfu-counter/ManualCFUCounter.stories.svelte +102 -102
- package/dist/components/manual-cfu-counter/ManualCFUCounter.svelte +557 -565
- package/dist/components/manual-cfu-counter/test/ManualCFUCounterTestWrapper.svelte +11 -11
- package/dist/components/markdown/Markdown.stories.svelte +10 -10
- package/dist/components/markdown/Markdown.svelte +6 -6
- package/dist/components/modal/Modal.stories.svelte +29 -29
- package/dist/components/modal/Modal.svelte +71 -71
- package/dist/components/multi-cfu-counter/MultiCFUCounter.stories.svelte +215 -0
- package/dist/components/multi-cfu-counter/MultiCFUCounter.stories.svelte.d.ts +3 -0
- package/dist/components/multi-cfu-counter/MultiCFUCounter.svelte +662 -0
- package/dist/components/multi-cfu-counter/MultiCFUCounter.svelte.d.ts +32 -0
- package/dist/components/multi-cfu-counter/index.d.ts +1 -0
- package/dist/components/multi-cfu-counter/index.js +1 -0
- package/dist/components/multi-cfu-counter/test/MultiCFUCounterTestWrapper.svelte +28 -0
- package/dist/components/multi-cfu-counter/test/MultiCFUCounterTestWrapper.svelte.d.ts +20 -0
- package/dist/components/notification-popup/NotificationPopup.stories.svelte +18 -18
- package/dist/components/notification-popup/NotificationPopup.svelte +26 -26
- package/dist/components/notifications/Notifications.stories.svelte +101 -101
- package/dist/components/notifications/Notifications.svelte +9 -9
- package/dist/components/pill/Pill.stories.svelte +8 -8
- package/dist/components/pill/Pill.svelte +27 -27
- package/dist/components/progress-circle/ProgressCircle.stories.svelte +8 -8
- package/dist/components/progress-circle/ProgressCircle.svelte +54 -54
- package/dist/components/required-status-indicator/RequiredStatusIndicator.stories.svelte +18 -18
- package/dist/components/required-status-indicator/RequiredStatusIndicator.svelte +14 -14
- package/dist/components/segmented-control-buttons/ControlButton.svelte +36 -36
- package/dist/components/segmented-control-buttons/SegmentedControlButtons.stories.svelte +35 -35
- package/dist/components/segmented-control-buttons/SegmentedControlButtons.svelte +13 -13
- package/dist/components/select/Select.stories.svelte +77 -77
- package/dist/components/select/Select.svelte +114 -114
- package/dist/components/select-new/Select.stories.svelte +188 -188
- package/dist/components/select-new/components/Group.svelte +17 -17
- package/dist/components/select-new/components/MultiSelectTrigger.svelte +57 -57
- package/dist/components/select-new/components/SelectContent.svelte +22 -22
- package/dist/components/select-new/components/SelectGroupHeading.svelte +10 -10
- package/dist/components/select-new/components/SelectItem.svelte +25 -25
- package/dist/components/select-new/components/SelectTrigger.svelte +38 -38
- package/dist/components/sjsf-wrappers/SjsfNumberInputWrapper.svelte +76 -76
- package/dist/components/sjsf-wrappers/SjsfNumberInputWrapper.svelte.d.ts +1 -1
- package/dist/components/sjsf-wrappers/SjsfTextInputWrapper.svelte +53 -53
- package/dist/components/sjsf-wrappers/SjsfTextInputWrapper.svelte.d.ts +1 -1
- package/dist/components/sjsf-wrappers/sjsfCustomTheme.js +1 -1
- package/dist/components/skeleton-loader/SkeletonLoader.stories.svelte +32 -32
- package/dist/components/skeleton-loader/SkeletonLoader.svelte +10 -10
- package/dist/components/skeleton-loader/StatcardSkeleton.svelte +9 -9
- package/dist/components/skeleton-loader/components/Skeleton.svelte +7 -7
- package/dist/components/skeleton-loader/components/SkeletonImage.svelte +12 -12
- package/dist/components/slider/Slider.stories.svelte +23 -23
- package/dist/components/slider/Slider.svelte +107 -107
- package/dist/components/spinner/Spinner.stories.svelte +8 -8
- package/dist/components/spinner/Spinner.svelte +18 -18
- package/dist/components/stat-card/StatCard.stories.svelte +26 -26
- package/dist/components/stat-card/StatCard.svelte +128 -128
- package/dist/components/status-badge/StatusBadge.stories.svelte +365 -365
- package/dist/components/status-badge/StatusBadge.svelte +54 -54
- package/dist/components/stepper/Stepper.stories.svelte +219 -219
- package/dist/components/stepper/components/stepper-root.svelte +12 -12
- package/dist/components/stepper/components/stepper-step.svelte +83 -83
- package/dist/components/table/Table.stories.svelte +87 -87
- package/dist/components/table/Table.svelte +32 -32
- package/dist/components/table/components/TBody.svelte +7 -7
- package/dist/components/table/components/THead.svelte +7 -7
- package/dist/components/table/components/Td.svelte +8 -8
- package/dist/components/table/components/Th.svelte +8 -8
- package/dist/components/table/components/Tr.svelte +11 -11
- package/dist/components/tabs/Tabs.stories.svelte +20 -20
- package/dist/components/tabs/Tabs.svelte +8 -8
- package/dist/components/tabs/components/Content.svelte +8 -8
- package/dist/components/tabs/components/Tab.svelte +14 -14
- package/dist/components/tabs/components/Tabs.svelte +7 -7
- package/dist/components/tag/Tag.stories.svelte +57 -57
- package/dist/components/tag/Tag.svelte +95 -95
- package/dist/components/textarea/Textarea.stories.svelte +70 -70
- package/dist/components/textarea/Textarea.svelte +76 -76
- package/dist/components/toast/Toast.stories.svelte +204 -204
- package/dist/components/toast/Toast.svelte +53 -53
- package/dist/components/toggle/Toggle.stories.svelte +9 -9
- package/dist/components/toggle/Toggle.svelte +53 -53
- package/dist/components/toggle-icon-button/ToggleIconButton.stories.svelte +152 -152
- package/dist/components/toggle-icon-button/ToggleIconButton.svelte +99 -99
- package/dist/components/tooltip/Tooltip.stories.svelte +105 -105
- package/dist/components/tooltip/Tooltip.svelte +26 -26
- package/dist/fonts/index.js +1 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.js +5 -1
- package/dist/notifications.d.ts +1 -4
- package/dist/notifications.js +1 -1
- package/dist/styles.d.ts +1 -0
- package/dist/styles.js +4 -0
- package/dist/tailwind-safelist.js +406 -398
- package/dist/tailwind.preset.d.ts +4 -0
- package/dist/tailwind.preset.js +10 -10
- package/dist/tokens/colors.d.ts +246 -0
- package/dist/tokens/colors.js +139 -0
- package/dist/tokens/index.d.ts +3 -0
- package/dist/tokens/index.js +5 -0
- package/dist/tokens/typography.d.ts +48 -0
- package/dist/tokens/typography.js +48 -0
- package/dist/tokens.d.ts +16 -252
- package/dist/tokens.js +33 -164
- package/dist/types/fonts.d.ts +2 -2
- package/package.json +398 -78
|
@@ -1,175 +1,175 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
2
|
+
import { run } from 'svelte/legacy';
|
|
3
|
+
|
|
4
|
+
import { DateTime, type MonthNumbers } from 'luxon';
|
|
5
|
+
|
|
6
|
+
import IconButton from '../icon-button/IconButton.svelte';
|
|
7
|
+
import { Icon } from '../icons';
|
|
8
|
+
|
|
9
|
+
interface Props {
|
|
10
|
+
selectedDate: DateTime | undefined;
|
|
11
|
+
onClick?: any;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
let { selectedDate = $bindable(), onClick = (date: DateTime) => {} }: Props = $props();
|
|
15
|
+
|
|
16
|
+
const arrDays = ['Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa', 'Su'];
|
|
17
|
+
let today = DateTime.local();
|
|
18
|
+
const currentDay = today.day;
|
|
19
|
+
const currentMonth = today.month;
|
|
20
|
+
const currentYear = today.year;
|
|
21
|
+
let shownMonth = $state(today.month);
|
|
22
|
+
let shownYear = $state(today.year);
|
|
23
|
+
let selectedDay: number | undefined = $state();
|
|
24
|
+
let selectedMonth: number | undefined = $state();
|
|
25
|
+
let selectedYear: number | undefined = $state();
|
|
26
|
+
let rows = $state(initRows());
|
|
27
|
+
|
|
28
|
+
run(() => {
|
|
29
|
+
if (selectedDate) {
|
|
30
|
+
selectedDay = selectedDate.day;
|
|
31
|
+
selectedMonth = selectedDate.month;
|
|
32
|
+
selectedYear = selectedDate.year;
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
affectedRows();
|
|
37
|
+
|
|
38
|
+
function initRows() {
|
|
39
|
+
return [
|
|
40
|
+
[0, 0, 0, 0, 0, 0, 0],
|
|
41
|
+
[0, 0, 0, 0, 0, 0, 0],
|
|
42
|
+
[0, 0, 0, 0, 0, 0, 0],
|
|
43
|
+
[0, 0, 0, 0, 0, 0, 0],
|
|
44
|
+
[0, 0, 0, 0, 0, 0, 0],
|
|
45
|
+
[0, 0, 0, 0, 0, 0, 0],
|
|
46
|
+
];
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function affectedRows() {
|
|
50
|
+
rows = initRows();
|
|
51
|
+
const firstDayOfCurrentMonth = DateTime.local(shownYear, shownMonth, 1).weekday - 1; // 0-based index
|
|
52
|
+
const lastDayOfCurrentMonth = DateTime.local(shownYear, shownMonth, 1).daysInMonth;
|
|
53
|
+
|
|
54
|
+
if (lastDayOfCurrentMonth === undefined) {
|
|
55
|
+
// Handle invalid date
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
let iRow = 0;
|
|
60
|
+
let iCol = firstDayOfCurrentMonth; // Start at the correct weekday
|
|
61
|
+
let cpt = 1; // Start from day 1
|
|
62
|
+
|
|
63
|
+
for (iRow = 0; iRow < 6; iRow++) {
|
|
64
|
+
while (iCol < 7 && cpt <= lastDayOfCurrentMonth) {
|
|
65
|
+
rows[iRow][iCol] = cpt++;
|
|
66
|
+
iCol++;
|
|
67
|
+
}
|
|
68
|
+
iCol = 0; // Reset for the next row
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
function previousMonth() {
|
|
73
|
+
let dt = DateTime.local(shownYear, shownMonth).minus({ months: 1 });
|
|
74
|
+
shownMonth = dt.month as MonthNumbers;
|
|
75
|
+
shownYear = dt.year;
|
|
76
|
+
affectedRows();
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
function nextMonth() {
|
|
80
|
+
let dt = DateTime.local(shownYear, shownMonth).plus({ months: 1 });
|
|
81
|
+
shownMonth = dt.month as MonthNumbers;
|
|
82
|
+
shownYear = dt.year;
|
|
83
|
+
affectedRows();
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
function selectDate(y: number, m: number, d: number) {
|
|
87
|
+
selectedDate = DateTime.local(y, m, d);
|
|
88
|
+
onClick(selectedDate);
|
|
89
|
+
}
|
|
90
90
|
</script>
|
|
91
91
|
|
|
92
92
|
<!-- svelte-ignore a11y_click_events_have_key_events -->
|
|
93
93
|
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
|
94
94
|
<div class="calendar-container" onclick={(e) => e.stopPropagation()}>
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
95
|
+
<div class="calendar">
|
|
96
|
+
<div class="calendar-header">
|
|
97
|
+
<div class="month-year">
|
|
98
|
+
<IconButton onclick={previousMonth} type="button">
|
|
99
|
+
<Icon iconName="CaretLeft" color="secondary" size="0.75rem" />
|
|
100
|
+
</IconButton>
|
|
101
|
+
<h5>{DateTime.local(shownYear, shownMonth).toFormat('MMM yyyy')}</h5>
|
|
102
|
+
<IconButton onclick={nextMonth} type="button">
|
|
103
|
+
<Icon iconName="CaretRight" color="secondary" size="0.75rem" />
|
|
104
|
+
</IconButton>
|
|
105
|
+
</div>
|
|
106
|
+
</div>
|
|
107
|
+
<div class="calendar-body">
|
|
108
|
+
<table>
|
|
109
|
+
<thead>
|
|
110
|
+
<tr>
|
|
111
|
+
{#each arrDays as day}
|
|
112
|
+
<th>
|
|
113
|
+
<p>{day}</p>
|
|
114
|
+
</th>
|
|
115
|
+
{/each}
|
|
116
|
+
</tr>
|
|
117
|
+
</thead>
|
|
118
|
+
<tbody>
|
|
119
|
+
{#each rows as col}
|
|
120
|
+
<tr>
|
|
121
|
+
{#each col as dayOfMonth}
|
|
122
|
+
<td>
|
|
123
|
+
{#if dayOfMonth > 0}
|
|
124
|
+
<div class="date-container">
|
|
125
|
+
<p
|
|
126
|
+
class={dayOfMonth === selectedDay &&
|
|
127
|
+
selectedMonth === shownMonth &&
|
|
128
|
+
selectedYear === shownYear
|
|
129
|
+
? 'date selected-date'
|
|
130
|
+
: 'date'}
|
|
131
|
+
>
|
|
132
|
+
<button
|
|
133
|
+
onclick={() => {
|
|
134
|
+
selectDate(shownYear, shownMonth, dayOfMonth);
|
|
135
|
+
}}
|
|
136
|
+
>
|
|
137
|
+
{dayOfMonth}
|
|
138
|
+
</button>
|
|
139
|
+
</p>
|
|
140
|
+
{#if dayOfMonth === currentDay && shownMonth === currentMonth && shownYear === currentYear && dayOfMonth != selectedDay}
|
|
141
|
+
<svg
|
|
142
|
+
class="current-date-indicator text-accent"
|
|
143
|
+
data-chromatic="ignore"
|
|
144
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
145
|
+
width="4"
|
|
146
|
+
height="4"
|
|
147
|
+
viewBox="0 0 4 4"
|
|
148
|
+
>
|
|
149
|
+
<circle cx="2" cy="2" r="2" fill="currentColor" />
|
|
150
|
+
</svg>
|
|
151
|
+
{/if}
|
|
152
|
+
</div>
|
|
153
|
+
{/if}
|
|
154
|
+
</td>
|
|
155
|
+
{/each}
|
|
156
|
+
</tr>
|
|
157
|
+
{/each}
|
|
158
|
+
</tbody>
|
|
159
|
+
</table>
|
|
160
|
+
</div>
|
|
161
|
+
</div>
|
|
162
162
|
</div>
|
|
163
163
|
|
|
164
164
|
<style>
|
|
165
|
-
|
|
165
|
+
.calendar-container {
|
|
166
166
|
|
|
167
167
|
display: flex;
|
|
168
168
|
|
|
169
169
|
width: 312px
|
|
170
170
|
}
|
|
171
171
|
|
|
172
|
-
|
|
172
|
+
.calendar {
|
|
173
173
|
|
|
174
174
|
overflow: hidden;
|
|
175
175
|
|
|
@@ -188,7 +188,7 @@
|
|
|
188
188
|
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)
|
|
189
189
|
}
|
|
190
190
|
|
|
191
|
-
|
|
191
|
+
.month-year {
|
|
192
192
|
|
|
193
193
|
display: flex;
|
|
194
194
|
|
|
@@ -197,14 +197,14 @@
|
|
|
197
197
|
justify-content: space-between
|
|
198
198
|
}
|
|
199
199
|
|
|
200
|
-
|
|
200
|
+
.month-year .btn-custom {
|
|
201
201
|
|
|
202
202
|
border-style: none;
|
|
203
203
|
|
|
204
204
|
background-image: none
|
|
205
205
|
}
|
|
206
206
|
|
|
207
|
-
|
|
207
|
+
.calendar-body {
|
|
208
208
|
|
|
209
209
|
display: flex;
|
|
210
210
|
|
|
@@ -217,7 +217,7 @@
|
|
|
217
217
|
padding-top: 22px
|
|
218
218
|
}
|
|
219
219
|
|
|
220
|
-
|
|
220
|
+
table {
|
|
221
221
|
|
|
222
222
|
margin: 0px;
|
|
223
223
|
|
|
@@ -234,7 +234,7 @@
|
|
|
234
234
|
padding: 0px
|
|
235
235
|
}
|
|
236
236
|
|
|
237
|
-
|
|
237
|
+
table thead th p {
|
|
238
238
|
|
|
239
239
|
text-align: center;
|
|
240
240
|
|
|
@@ -249,15 +249,15 @@
|
|
|
249
249
|
color: rgb(136 140 148 / var(--tw-text-opacity, 1))
|
|
250
250
|
}
|
|
251
251
|
|
|
252
|
-
|
|
252
|
+
tr {
|
|
253
253
|
|
|
254
254
|
height: 2.5rem;
|
|
255
255
|
|
|
256
256
|
border-style: none
|
|
257
257
|
}
|
|
258
258
|
|
|
259
|
-
|
|
260
|
-
|
|
259
|
+
table th,
|
|
260
|
+
table td {
|
|
261
261
|
|
|
262
262
|
margin: 0px;
|
|
263
263
|
|
|
@@ -266,12 +266,12 @@
|
|
|
266
266
|
padding: 0px
|
|
267
267
|
}
|
|
268
268
|
|
|
269
|
-
|
|
269
|
+
.date-container {
|
|
270
270
|
|
|
271
271
|
position: relative
|
|
272
272
|
}
|
|
273
273
|
|
|
274
|
-
|
|
274
|
+
.date {
|
|
275
275
|
|
|
276
276
|
display: flex;
|
|
277
277
|
|
|
@@ -294,12 +294,12 @@
|
|
|
294
294
|
transition-duration: 150ms
|
|
295
295
|
}
|
|
296
296
|
|
|
297
|
-
|
|
297
|
+
.date:hover {
|
|
298
298
|
|
|
299
299
|
background-color: #5750ee1A
|
|
300
300
|
}
|
|
301
301
|
|
|
302
|
-
|
|
302
|
+
.date:focus {
|
|
303
303
|
|
|
304
304
|
--tw-bg-opacity: 1;
|
|
305
305
|
|
|
@@ -310,7 +310,7 @@
|
|
|
310
310
|
color: rgb(255 255 255 / var(--tw-text-opacity, 1))
|
|
311
311
|
}
|
|
312
312
|
|
|
313
|
-
|
|
313
|
+
.selected-date {
|
|
314
314
|
|
|
315
315
|
--tw-bg-opacity: 1;
|
|
316
316
|
|
|
@@ -321,14 +321,14 @@
|
|
|
321
321
|
color: rgb(255 255 255 / var(--tw-text-opacity, 1))
|
|
322
322
|
}
|
|
323
323
|
|
|
324
|
-
|
|
324
|
+
.selected-date:hover {
|
|
325
325
|
|
|
326
326
|
--tw-bg-opacity: 1;
|
|
327
327
|
|
|
328
328
|
background-color: rgb(87 80 238 / var(--tw-bg-opacity, 1))
|
|
329
329
|
}
|
|
330
330
|
|
|
331
|
-
|
|
331
|
+
.current-date-indicator {
|
|
332
332
|
|
|
333
333
|
position: absolute;
|
|
334
334
|
|
|
@@ -337,7 +337,7 @@
|
|
|
337
337
|
top: 2rem
|
|
338
338
|
}
|
|
339
339
|
|
|
340
|
-
|
|
340
|
+
.date button {
|
|
341
341
|
|
|
342
342
|
border-style: none;
|
|
343
343
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<script module>
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import Divider from './Divider.svelte';
|
|
3
|
+
import { defineMeta } from '@storybook/addon-svelte-csf';
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
const { Story } = defineMeta({
|
|
6
|
+
component: Divider,
|
|
7
|
+
title: 'Design System/Divider',
|
|
8
|
+
tags: ['autodocs'],
|
|
9
|
+
});
|
|
10
10
|
</script>
|
|
11
11
|
|
|
12
12
|
<Story name="Primary" />
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
interface Props {
|
|
3
|
+
class?: string;
|
|
4
|
+
vertical?: boolean;
|
|
5
|
+
inverse?: boolean;
|
|
6
|
+
}
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
let { class: className = '', vertical = false, inverse = false }: Props = $props();
|
|
9
9
|
</script>
|
|
10
10
|
|
|
11
11
|
<div
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
class={`${
|
|
13
|
+
vertical ? 'h-full w-0 border-l' : 'h-0 w-full border-b'
|
|
14
|
+
} ${inverse ? 'border-static-inverse' : 'border-static'} ${className}`}
|
|
15
15
|
></div>
|
|
@@ -1,64 +1,64 @@
|
|
|
1
1
|
<script module>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import { defineMeta } from '@storybook/addon-svelte-csf';
|
|
3
|
+
import Drawer from './Drawer.svelte';
|
|
4
|
+
import Button from '../button/Button.svelte';
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
const { Story } = defineMeta({
|
|
7
|
+
component: Drawer,
|
|
8
|
+
title: 'Design System/Drawer',
|
|
9
|
+
tags: ['autodocs'],
|
|
10
|
+
});
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
let open = $state(false);
|
|
13
13
|
</script>
|
|
14
14
|
|
|
15
15
|
<Story name="Base" asChild>
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
16
|
+
<div class="py-12">
|
|
17
|
+
<Drawer id="my-drawer" bind:open controlled>
|
|
18
|
+
{#snippet trigger()}
|
|
19
|
+
<Button onClick={() => (open = true)}>Open Drawer</Button>
|
|
20
|
+
{/snippet}
|
|
21
|
+
{#snippet content()}
|
|
22
|
+
<div>
|
|
23
|
+
<div>
|
|
24
|
+
<p>Drawer content here</p>
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
{/snippet}
|
|
28
|
+
</Drawer>
|
|
29
|
+
</div>
|
|
30
30
|
</Story>
|
|
31
31
|
|
|
32
32
|
<Story name="Open" asChild>
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
33
|
+
<div class="py-12">
|
|
34
|
+
<Drawer id="my-drawer" open controlled>
|
|
35
|
+
{#snippet trigger()}
|
|
36
|
+
<Button onClick={() => (open = true)}>Open Drawer</Button>
|
|
37
|
+
{/snippet}
|
|
38
|
+
{#snippet content()}
|
|
39
|
+
<div>
|
|
40
|
+
<div>
|
|
41
|
+
<p>Drawer content here</p>
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
|
44
|
+
{/snippet}
|
|
45
|
+
</Drawer>
|
|
46
|
+
</div>
|
|
47
47
|
</Story>
|
|
48
48
|
|
|
49
49
|
<Story name="Open Left" asChild>
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
50
|
+
<div class="py-12">
|
|
51
|
+
<Drawer id="my-drawer" side="left" bind:open controlled>
|
|
52
|
+
{#snippet trigger()}
|
|
53
|
+
<Button onClick={() => (open = true)}>Open Drawer</Button>
|
|
54
|
+
{/snippet}
|
|
55
|
+
{#snippet content()}
|
|
56
|
+
<div>
|
|
57
|
+
<div>
|
|
58
|
+
<p>Drawer content here</p>
|
|
59
|
+
</div>
|
|
60
|
+
</div>
|
|
61
|
+
{/snippet}
|
|
62
|
+
</Drawer>
|
|
63
|
+
</div>
|
|
64
64
|
</Story>
|