@rkosafo/cai.components 0.0.78 → 0.0.80
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 +8 -8
- package/dist/baseEditor/index.svelte +32 -32
- package/dist/builders/filters/FilterBuilder.svelte +641 -641
- package/dist/forms/FormCheckbox/FormCheckbox.svelte +53 -53
- package/dist/forms/FormClEditor/ClEdito.svelte +68 -68
- package/dist/forms/FormDatepicker/FormDatepicker.svelte +159 -159
- package/dist/forms/FormFileUpload/FormFileUplad.svelte +134 -134
- package/dist/forms/FormInput/FormInput.svelte +87 -87
- package/dist/forms/FormRadio/FormRadio.svelte +53 -53
- package/dist/forms/FormSelect/FormSelect.svelte +88 -88
- package/dist/forms/FormTextarea/FormTextarea.svelte +78 -78
- package/dist/forms/button-toggle/ButtonToggle.svelte +119 -119
- package/dist/forms/button-toggle/CheckIcon.svelte +28 -28
- package/dist/forms/checkbox/Checkbox.svelte +82 -82
- package/dist/forms/checkbox/CheckboxButton.svelte +92 -92
- package/dist/forms/datepicker/Datepicker.svelte +707 -707
- package/dist/forms/form/Form.svelte +69 -69
- package/dist/forms/input/Input.svelte +363 -363
- package/dist/forms/label/Label.svelte +38 -38
- package/dist/forms/radio/Radio.svelte +48 -48
- package/dist/forms/radio/RadioButton.svelte +22 -22
- package/dist/forms/select/Select.svelte +56 -56
- package/dist/forms/textarea/Textarea.svelte +165 -165
- package/dist/forms/toggle/Toggle.svelte +70 -70
- package/dist/layout/Chat/CategorySelector.svelte +52 -52
- package/dist/layout/Chat/ChatEntry.svelte +246 -246
- package/dist/layout/Chat/ChatEntrySkeleton.svelte +81 -81
- package/dist/layout/Chat/ChatHeader.svelte +172 -172
- package/dist/layout/Chat/ChatInput.svelte +207 -207
- package/dist/layout/Chat/DraggableWindow.svelte +230 -230
- package/dist/layout/Chat/PreviewPage.svelte +182 -182
- package/dist/layout/Chat/RichText.svelte +216 -216
- package/dist/layout/ComponentCanvas/Canvas.svelte +40 -40
- package/dist/layout/ComponentCanvas/ComponentRenderer.svelte +85 -85
- package/dist/layout/TF/Content/Content.svelte +21 -21
- package/dist/layout/TF/Header/Header.svelte +166 -166
- package/dist/layout/TF/Sidebar/Sidebar.svelte +148 -148
- package/dist/layout/TF/Wrapper/Wrapper.svelte +17 -17
- package/dist/layout/mailing/MailPaginator.svelte +36 -36
- package/dist/layout/mailing/MailSidebar.svelte +39 -39
- package/dist/layout/mailing/MailToolBar.svelte +174 -174
- package/dist/layout/mailing/MailingContent.svelte +10 -10
- package/dist/layout/mailing/MailingHeader.svelte +55 -55
- package/dist/layout/mailing/MailingMessageCard.svelte +112 -112
- package/dist/layout/mailing/MailingMessageViewer.svelte +87 -87
- package/dist/layout/mailing/MailingModule.svelte +448 -448
- package/dist/styles/docs.css +615 -615
- package/dist/styles/tf-layout.css +185 -185
- package/dist/themes/ThemeProvider.svelte +20 -20
- package/dist/types/index.d.ts +2 -0
- package/dist/typography/heading/Heading.svelte +35 -35
- package/dist/ui/accordion/Accordion.svelte +49 -49
- package/dist/ui/accordion/AccordionItem.svelte +173 -173
- package/dist/ui/alert/Alert.svelte +83 -83
- package/dist/ui/alertDialog/AlertDialog.svelte +40 -40
- package/dist/ui/avatar/Avatar.svelte +77 -77
- package/dist/ui/box/Box.svelte +28 -28
- package/dist/ui/breadcrumb/Breadcrumb.svelte +39 -39
- package/dist/ui/buttons/ActionButton.svelte +234 -234
- package/dist/ui/buttons/Button.svelte +102 -102
- package/dist/ui/buttons/GradientButton.svelte +59 -59
- package/dist/ui/datatable/Datatable.svelte +525 -525
- package/dist/ui/drawer/Drawer.svelte +300 -300
- package/dist/ui/dropdown/Dropdown.svelte +36 -36
- package/dist/ui/dropdown/DropdownDivider.svelte +11 -11
- package/dist/ui/dropdown/DropdownGroup.svelte +14 -14
- package/dist/ui/dropdown/DropdownHeader.svelte +14 -14
- package/dist/ui/dropdown/DropdownItem.svelte +52 -52
- package/dist/ui/footer/Footer.svelte +15 -15
- package/dist/ui/footer/FooterBrand.svelte +37 -37
- package/dist/ui/footer/FooterCopyright.svelte +45 -45
- package/dist/ui/footer/FooterIcon.svelte +22 -22
- package/dist/ui/footer/FooterLink.svelte +33 -33
- package/dist/ui/footer/FooterLinkGroup.svelte +13 -13
- package/dist/ui/icons/IconifyIcon.svelte +7 -7
- package/dist/ui/indicator/Indicator.svelte +42 -42
- package/dist/ui/modal/Modal.svelte +265 -265
- package/dist/ui/notificationList/NotificationList.svelte +123 -123
- package/dist/ui/pageLoader/PageLoader.svelte +14 -14
- package/dist/ui/pageLoader/PageLoader2.svelte +99 -0
- package/dist/ui/pageLoader/PageLoader2.svelte.d.ts +24 -0
- package/dist/ui/pageLoader/index.d.ts +2 -1
- package/dist/ui/pageLoader/index.js +2 -1
- package/dist/ui/paginate/Paginate.svelte +96 -96
- package/dist/ui/speedDial/SpeedDial.svelte +77 -77
- package/dist/ui/speedDial/SpeedDialButton.svelte +75 -75
- package/dist/ui/speedDial/SpeedDialTrigger.svelte +79 -79
- package/dist/ui/tab/Tab.svelte +93 -67
- package/dist/ui/table/Table.svelte +396 -396
- package/dist/ui/tableLoader/TableLoader.svelte +24 -24
- package/dist/ui/toast/Toast.svelte +337 -337
- package/dist/ui/toast/Toast.svelte.d.ts +10 -10
- package/dist/ui/toolbar/Toolbar.svelte +59 -59
- package/dist/ui/toolbar/ToolbarButton.svelte +56 -56
- package/dist/ui/toolbar/ToolbarGroup.svelte +43 -43
- package/dist/ui/tooltip/Tooltip.svelte +51 -51
- package/dist/utils/Popper.svelte +257 -257
- package/dist/utils/closeButton/CloseButton.svelte +88 -88
- package/dist/utils/index.d.ts +2 -2
- package/dist/utils/index.js +3 -3
- package/dist/utils/singleSelection.svelte.js +48 -48
- package/dist/youtube/index.svelte +12 -12
- package/package.json +1 -1
|
@@ -1,186 +1,186 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
:root {
|
|
4
|
-
--poppins: 'Poppins', sans-serif;
|
|
5
|
-
--lato: 'Lato', sans-serif;
|
|
6
|
-
|
|
7
|
-
--light: #F9F9F9;
|
|
8
|
-
--blue: #3C91E6;
|
|
9
|
-
--light-blue: #CFE8FF;
|
|
10
|
-
--grey: #f4f3ef;
|
|
11
|
-
--dark-grey: #AAAAAA;
|
|
12
|
-
--dark: #342E37;
|
|
13
|
-
--red: #DB504A;
|
|
14
|
-
--yellow: #FFCE26;
|
|
15
|
-
--light-yellow: #FFF2C6;
|
|
16
|
-
--orange: #FD7238;
|
|
17
|
-
--light-orange: #FFE0D3;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
/* tf-sidebar */
|
|
21
|
-
#tf-sidebar {
|
|
22
|
-
position: fixed;
|
|
23
|
-
/* top: 0;
|
|
24
|
-
left: 0; */
|
|
25
|
-
width: 240px;
|
|
26
|
-
height: 100%;
|
|
27
|
-
background: var(--light);
|
|
28
|
-
z-index: 2000;
|
|
29
|
-
font-family: var(--lato);
|
|
30
|
-
transition: .3s ease;
|
|
31
|
-
overflow-x: hidden;
|
|
32
|
-
scrollbar-width: none;
|
|
33
|
-
}
|
|
34
|
-
#tf-sidebar::--webkit-scrollbar {
|
|
35
|
-
display: none;
|
|
36
|
-
}
|
|
37
|
-
#tf-sidebar.hide {
|
|
38
|
-
width: 60px;
|
|
39
|
-
|
|
40
|
-
}
|
|
41
|
-
#tf-sidebar .brand {
|
|
42
|
-
font-size: 24px;
|
|
43
|
-
font-weight: 700;
|
|
44
|
-
/* height: 68px; */
|
|
45
|
-
display: flex;
|
|
46
|
-
align-items: center;
|
|
47
|
-
color: var(--blue);
|
|
48
|
-
position: sticky;
|
|
49
|
-
top: 0;
|
|
50
|
-
left: 0;
|
|
51
|
-
background: var(--light);
|
|
52
|
-
z-index: 500;
|
|
53
|
-
padding-bottom: 20px;
|
|
54
|
-
box-sizing: content-box;
|
|
55
|
-
}
|
|
56
|
-
/* #tf-sidebar .brand .bx {
|
|
57
|
-
min-width: 60px;
|
|
58
|
-
display: flex;
|
|
59
|
-
justify-content: center;
|
|
60
|
-
} */
|
|
61
|
-
#tf-sidebar .side-menu {
|
|
62
|
-
width: 100%;
|
|
63
|
-
}
|
|
64
|
-
#tf-sidebar .side-menu li {
|
|
65
|
-
height: 48px;
|
|
66
|
-
background: transparent;
|
|
67
|
-
margin-left: 6px;
|
|
68
|
-
border-radius: 48px 0 0 48px;
|
|
69
|
-
padding: 4px;
|
|
70
|
-
}
|
|
71
|
-
#tf-sidebar .side-menu li.active {
|
|
72
|
-
background: var(--grey);
|
|
73
|
-
position: relative;
|
|
74
|
-
}
|
|
75
|
-
#tf-sidebar .side-menu li.active::before {
|
|
76
|
-
content: '';
|
|
77
|
-
position: absolute;
|
|
78
|
-
width: 40px;
|
|
79
|
-
height: 40px;
|
|
80
|
-
border-radius: 50%;
|
|
81
|
-
top: -40px;
|
|
82
|
-
right: 0;
|
|
83
|
-
box-shadow: 20px 20px 0 var(--grey);
|
|
84
|
-
z-index: -1;
|
|
85
|
-
}
|
|
86
|
-
#tf-sidebar .side-menu li.active::after {
|
|
87
|
-
content: '';
|
|
88
|
-
position: absolute;
|
|
89
|
-
width: 40px;
|
|
90
|
-
height: 40px;
|
|
91
|
-
border-radius: 50%;
|
|
92
|
-
bottom: -40px;
|
|
93
|
-
right: 0;
|
|
94
|
-
box-shadow: 20px -20px 0 var(--grey);
|
|
95
|
-
z-index: -1;
|
|
96
|
-
}
|
|
97
|
-
#tf-sidebar .side-menu li a {
|
|
98
|
-
width: 100%;
|
|
99
|
-
height: 100%;
|
|
100
|
-
background: var(--light);
|
|
101
|
-
display: flex;
|
|
102
|
-
align-items: center;
|
|
103
|
-
border-radius: 48px;
|
|
104
|
-
font-size: 16px;
|
|
105
|
-
color: var(--dark);
|
|
106
|
-
white-space: nowrap;
|
|
107
|
-
overflow-x: hidden;
|
|
108
|
-
}
|
|
109
|
-
#tf-sidebar .side-menu.top li.active a {
|
|
110
|
-
color: var(--blue);
|
|
111
|
-
}
|
|
112
|
-
#tf-sidebar.hide .side-menu li a {
|
|
113
|
-
width: calc(48px - (4px * 2));
|
|
114
|
-
transition: width .3s ease;
|
|
115
|
-
}
|
|
116
|
-
#tf-sidebar .side-menu li a.logout {
|
|
117
|
-
color: var(--red);
|
|
118
|
-
}
|
|
119
|
-
#tf-sidebar .side-menu.top li a:hover {
|
|
120
|
-
color: var(--blue);
|
|
121
|
-
}
|
|
122
|
-
#tf-sidebar .side-menu li a .bx {
|
|
123
|
-
min-width: calc(60px - ((4px + 6px) * 2));
|
|
124
|
-
display: flex;
|
|
125
|
-
justify-content: center;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
#tf-content {
|
|
130
|
-
position: relative;
|
|
131
|
-
width: calc(100% - 230px);
|
|
132
|
-
left: 240px;
|
|
133
|
-
transition: .3s ease;
|
|
134
|
-
}
|
|
135
|
-
#tf-sidebar.hide ~ #tf-content {
|
|
136
|
-
width: calc(100% - 60px);
|
|
137
|
-
left: 60px;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
/* NAVBAR */
|
|
142
|
-
#tf-content nav {
|
|
143
|
-
height: 56px;
|
|
144
|
-
background: var(--light);
|
|
145
|
-
padding: 0 24px;
|
|
146
|
-
display: flex;
|
|
147
|
-
align-items: center;
|
|
148
|
-
grid-gap: 24px;
|
|
149
|
-
font-family: var(--lato);
|
|
150
|
-
position: sticky;
|
|
151
|
-
top: 0;
|
|
152
|
-
left: 0;
|
|
153
|
-
z-index: 1000;
|
|
154
|
-
}
|
|
155
|
-
/* curve */
|
|
156
|
-
#tf-content nav::before {
|
|
157
|
-
content: '';
|
|
158
|
-
position: absolute;
|
|
159
|
-
width: 40px;
|
|
160
|
-
height: 40px;
|
|
161
|
-
bottom: -40px;
|
|
162
|
-
left: 0;
|
|
163
|
-
border-radius: 50%;
|
|
164
|
-
box-shadow: -20px -20px 0 var(--light);
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
@media screen and (max-width: 768px) {
|
|
169
|
-
#tf-sidebar {
|
|
170
|
-
width: 60px;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
#tf-content {
|
|
174
|
-
width: calc(100% - 60px);
|
|
175
|
-
left: 60px;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
#tf-content nav .nav-link {
|
|
179
|
-
display: none;
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
.loginbox {
|
|
185
|
-
box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
:root {
|
|
4
|
+
--poppins: 'Poppins', sans-serif;
|
|
5
|
+
--lato: 'Lato', sans-serif;
|
|
6
|
+
|
|
7
|
+
--light: #F9F9F9;
|
|
8
|
+
--blue: #3C91E6;
|
|
9
|
+
--light-blue: #CFE8FF;
|
|
10
|
+
--grey: #f4f3ef;
|
|
11
|
+
--dark-grey: #AAAAAA;
|
|
12
|
+
--dark: #342E37;
|
|
13
|
+
--red: #DB504A;
|
|
14
|
+
--yellow: #FFCE26;
|
|
15
|
+
--light-yellow: #FFF2C6;
|
|
16
|
+
--orange: #FD7238;
|
|
17
|
+
--light-orange: #FFE0D3;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/* tf-sidebar */
|
|
21
|
+
#tf-sidebar {
|
|
22
|
+
position: fixed;
|
|
23
|
+
/* top: 0;
|
|
24
|
+
left: 0; */
|
|
25
|
+
width: 240px;
|
|
26
|
+
height: 100%;
|
|
27
|
+
background: var(--light);
|
|
28
|
+
z-index: 2000;
|
|
29
|
+
font-family: var(--lato);
|
|
30
|
+
transition: .3s ease;
|
|
31
|
+
overflow-x: hidden;
|
|
32
|
+
scrollbar-width: none;
|
|
33
|
+
}
|
|
34
|
+
#tf-sidebar::--webkit-scrollbar {
|
|
35
|
+
display: none;
|
|
36
|
+
}
|
|
37
|
+
#tf-sidebar.hide {
|
|
38
|
+
width: 60px;
|
|
39
|
+
|
|
40
|
+
}
|
|
41
|
+
#tf-sidebar .brand {
|
|
42
|
+
font-size: 24px;
|
|
43
|
+
font-weight: 700;
|
|
44
|
+
/* height: 68px; */
|
|
45
|
+
display: flex;
|
|
46
|
+
align-items: center;
|
|
47
|
+
color: var(--blue);
|
|
48
|
+
position: sticky;
|
|
49
|
+
top: 0;
|
|
50
|
+
left: 0;
|
|
51
|
+
background: var(--light);
|
|
52
|
+
z-index: 500;
|
|
53
|
+
padding-bottom: 20px;
|
|
54
|
+
box-sizing: content-box;
|
|
55
|
+
}
|
|
56
|
+
/* #tf-sidebar .brand .bx {
|
|
57
|
+
min-width: 60px;
|
|
58
|
+
display: flex;
|
|
59
|
+
justify-content: center;
|
|
60
|
+
} */
|
|
61
|
+
#tf-sidebar .side-menu {
|
|
62
|
+
width: 100%;
|
|
63
|
+
}
|
|
64
|
+
#tf-sidebar .side-menu li {
|
|
65
|
+
height: 48px;
|
|
66
|
+
background: transparent;
|
|
67
|
+
margin-left: 6px;
|
|
68
|
+
border-radius: 48px 0 0 48px;
|
|
69
|
+
padding: 4px;
|
|
70
|
+
}
|
|
71
|
+
#tf-sidebar .side-menu li.active {
|
|
72
|
+
background: var(--grey);
|
|
73
|
+
position: relative;
|
|
74
|
+
}
|
|
75
|
+
#tf-sidebar .side-menu li.active::before {
|
|
76
|
+
content: '';
|
|
77
|
+
position: absolute;
|
|
78
|
+
width: 40px;
|
|
79
|
+
height: 40px;
|
|
80
|
+
border-radius: 50%;
|
|
81
|
+
top: -40px;
|
|
82
|
+
right: 0;
|
|
83
|
+
box-shadow: 20px 20px 0 var(--grey);
|
|
84
|
+
z-index: -1;
|
|
85
|
+
}
|
|
86
|
+
#tf-sidebar .side-menu li.active::after {
|
|
87
|
+
content: '';
|
|
88
|
+
position: absolute;
|
|
89
|
+
width: 40px;
|
|
90
|
+
height: 40px;
|
|
91
|
+
border-radius: 50%;
|
|
92
|
+
bottom: -40px;
|
|
93
|
+
right: 0;
|
|
94
|
+
box-shadow: 20px -20px 0 var(--grey);
|
|
95
|
+
z-index: -1;
|
|
96
|
+
}
|
|
97
|
+
#tf-sidebar .side-menu li a {
|
|
98
|
+
width: 100%;
|
|
99
|
+
height: 100%;
|
|
100
|
+
background: var(--light);
|
|
101
|
+
display: flex;
|
|
102
|
+
align-items: center;
|
|
103
|
+
border-radius: 48px;
|
|
104
|
+
font-size: 16px;
|
|
105
|
+
color: var(--dark);
|
|
106
|
+
white-space: nowrap;
|
|
107
|
+
overflow-x: hidden;
|
|
108
|
+
}
|
|
109
|
+
#tf-sidebar .side-menu.top li.active a {
|
|
110
|
+
color: var(--blue);
|
|
111
|
+
}
|
|
112
|
+
#tf-sidebar.hide .side-menu li a {
|
|
113
|
+
width: calc(48px - (4px * 2));
|
|
114
|
+
transition: width .3s ease;
|
|
115
|
+
}
|
|
116
|
+
#tf-sidebar .side-menu li a.logout {
|
|
117
|
+
color: var(--red);
|
|
118
|
+
}
|
|
119
|
+
#tf-sidebar .side-menu.top li a:hover {
|
|
120
|
+
color: var(--blue);
|
|
121
|
+
}
|
|
122
|
+
#tf-sidebar .side-menu li a .bx {
|
|
123
|
+
min-width: calc(60px - ((4px + 6px) * 2));
|
|
124
|
+
display: flex;
|
|
125
|
+
justify-content: center;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
#tf-content {
|
|
130
|
+
position: relative;
|
|
131
|
+
width: calc(100% - 230px);
|
|
132
|
+
left: 240px;
|
|
133
|
+
transition: .3s ease;
|
|
134
|
+
}
|
|
135
|
+
#tf-sidebar.hide ~ #tf-content {
|
|
136
|
+
width: calc(100% - 60px);
|
|
137
|
+
left: 60px;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
/* NAVBAR */
|
|
142
|
+
#tf-content nav {
|
|
143
|
+
height: 56px;
|
|
144
|
+
background: var(--light);
|
|
145
|
+
padding: 0 24px;
|
|
146
|
+
display: flex;
|
|
147
|
+
align-items: center;
|
|
148
|
+
grid-gap: 24px;
|
|
149
|
+
font-family: var(--lato);
|
|
150
|
+
position: sticky;
|
|
151
|
+
top: 0;
|
|
152
|
+
left: 0;
|
|
153
|
+
z-index: 1000;
|
|
154
|
+
}
|
|
155
|
+
/* curve */
|
|
156
|
+
#tf-content nav::before {
|
|
157
|
+
content: '';
|
|
158
|
+
position: absolute;
|
|
159
|
+
width: 40px;
|
|
160
|
+
height: 40px;
|
|
161
|
+
bottom: -40px;
|
|
162
|
+
left: 0;
|
|
163
|
+
border-radius: 50%;
|
|
164
|
+
box-shadow: -20px -20px 0 var(--light);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
@media screen and (max-width: 768px) {
|
|
169
|
+
#tf-sidebar {
|
|
170
|
+
width: 60px;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
#tf-content {
|
|
174
|
+
width: calc(100% - 60px);
|
|
175
|
+
left: 60px;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
#tf-content nav .nav-link {
|
|
179
|
+
display: none;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
.loginbox {
|
|
185
|
+
box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
|
|
186
186
|
}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import type { Snippet } from 'svelte';
|
|
3
|
-
import { setContext } from 'svelte';
|
|
4
|
-
import type { ThemeConfig } from './index.js';
|
|
5
|
-
|
|
6
|
-
interface ThemeProviderProps {
|
|
7
|
-
children: Snippet;
|
|
8
|
-
theme?: ThemeConfig;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
let { children, theme }: ThemeProviderProps = $props();
|
|
12
|
-
|
|
13
|
-
if (theme) {
|
|
14
|
-
setContext('theme', theme);
|
|
15
|
-
} else {
|
|
16
|
-
console.log('ThemeProvider: No theme provided');
|
|
17
|
-
}
|
|
18
|
-
</script>
|
|
19
|
-
|
|
20
|
-
{@render children()}
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
import { setContext } from 'svelte';
|
|
4
|
+
import type { ThemeConfig } from './index.js';
|
|
5
|
+
|
|
6
|
+
interface ThemeProviderProps {
|
|
7
|
+
children: Snippet;
|
|
8
|
+
theme?: ThemeConfig;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
let { children, theme }: ThemeProviderProps = $props();
|
|
12
|
+
|
|
13
|
+
if (theme) {
|
|
14
|
+
setContext('theme', theme);
|
|
15
|
+
} else {
|
|
16
|
+
console.log('ThemeProvider: No theme provided');
|
|
17
|
+
}
|
|
18
|
+
</script>
|
|
19
|
+
|
|
20
|
+
{@render children()}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -788,11 +788,13 @@ export interface TabProps {
|
|
|
788
788
|
tabContentClass?: ClassValue;
|
|
789
789
|
tabContentActiveClass?: ClassValue;
|
|
790
790
|
tabContentInactiveClass?: ClassValue;
|
|
791
|
+
tabColor?: ClassValue;
|
|
791
792
|
onTabChange?: (tabId: number | string) => void;
|
|
792
793
|
onTabAdd?: (val: any) => void;
|
|
793
794
|
onRemoveTab?: (val: RemoveTabEvent) => void;
|
|
794
795
|
tabStyle?: TabsVaraints['tabStyle'];
|
|
795
796
|
divider?: boolean;
|
|
797
|
+
hideTabs?: boolean;
|
|
796
798
|
}
|
|
797
799
|
export interface BoxProps extends svelteHTML.HTMLAttributes<HTMLDivElement> {
|
|
798
800
|
children: any;
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
<script lang="ts" module>
|
|
2
|
-
// heading
|
|
3
|
-
export interface HeadingProps extends HTMLAttributes<HTMLElement> {
|
|
4
|
-
children: Snippet;
|
|
5
|
-
tag?: HeadingVariants['tag'];
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
// // hr
|
|
9
|
-
// export interface HrProps extends HrVariants, HTMLAttributes<HTMLElement> {
|
|
10
|
-
// children?: Snippet;
|
|
11
|
-
// divClass?: string;
|
|
12
|
-
// iconDivClass?: string;
|
|
13
|
-
// textSpanClass?: string;
|
|
14
|
-
// innerDivClass?: string;
|
|
15
|
-
// }
|
|
16
|
-
</script>
|
|
17
|
-
|
|
18
|
-
<script lang="ts">
|
|
19
|
-
import { getTheme } from '../../index.js';
|
|
20
|
-
import clsx from 'clsx';
|
|
21
|
-
import { heading } from './index.js';
|
|
22
|
-
import type { HTMLAttributes } from 'svelte/elements';
|
|
23
|
-
import type { Snippet } from 'svelte';
|
|
24
|
-
import type { HeadingVariants } from './theme.js';
|
|
25
|
-
|
|
26
|
-
let { children, tag = 'h1', class: className, ...restProps }: HeadingProps = $props();
|
|
27
|
-
|
|
28
|
-
const theme = getTheme('heading');
|
|
29
|
-
|
|
30
|
-
let headingCls = $derived(heading({ tag, class: clsx(theme, className) }));
|
|
31
|
-
</script>
|
|
32
|
-
|
|
33
|
-
<svelte:element this={tag} {...restProps} class={headingCls}>
|
|
34
|
-
{@render children()}
|
|
35
|
-
</svelte:element>
|
|
1
|
+
<script lang="ts" module>
|
|
2
|
+
// heading
|
|
3
|
+
export interface HeadingProps extends HTMLAttributes<HTMLElement> {
|
|
4
|
+
children: Snippet;
|
|
5
|
+
tag?: HeadingVariants['tag'];
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
// // hr
|
|
9
|
+
// export interface HrProps extends HrVariants, HTMLAttributes<HTMLElement> {
|
|
10
|
+
// children?: Snippet;
|
|
11
|
+
// divClass?: string;
|
|
12
|
+
// iconDivClass?: string;
|
|
13
|
+
// textSpanClass?: string;
|
|
14
|
+
// innerDivClass?: string;
|
|
15
|
+
// }
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<script lang="ts">
|
|
19
|
+
import { getTheme } from '../../index.js';
|
|
20
|
+
import clsx from 'clsx';
|
|
21
|
+
import { heading } from './index.js';
|
|
22
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
23
|
+
import type { Snippet } from 'svelte';
|
|
24
|
+
import type { HeadingVariants } from './theme.js';
|
|
25
|
+
|
|
26
|
+
let { children, tag = 'h1', class: className, ...restProps }: HeadingProps = $props();
|
|
27
|
+
|
|
28
|
+
const theme = getTheme('heading');
|
|
29
|
+
|
|
30
|
+
let headingCls = $derived(heading({ tag, class: clsx(theme, className) }));
|
|
31
|
+
</script>
|
|
32
|
+
|
|
33
|
+
<svelte:element this={tag} {...restProps} class={headingCls}>
|
|
34
|
+
{@render children()}
|
|
35
|
+
</svelte:element>
|
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { accordion, getTheme, type AccordionCtxType, type AccordionProps } from '../../index.js';
|
|
3
|
-
import { createSingleSelectionContext } from '../../utils/singleSelection.svelte.js';
|
|
4
|
-
import clsx from 'clsx';
|
|
5
|
-
import { setContext } from 'svelte';
|
|
6
|
-
|
|
7
|
-
let {
|
|
8
|
-
children,
|
|
9
|
-
flush,
|
|
10
|
-
activeClass,
|
|
11
|
-
inactiveClass,
|
|
12
|
-
multiple = false,
|
|
13
|
-
class: className,
|
|
14
|
-
transitionType,
|
|
15
|
-
...restProps
|
|
16
|
-
}: AccordionProps = $props();
|
|
17
|
-
|
|
18
|
-
const theme = getTheme('accordion');
|
|
19
|
-
|
|
20
|
-
const ctx: AccordionCtxType = $state({
|
|
21
|
-
flush,
|
|
22
|
-
activeClass,
|
|
23
|
-
inactiveClass,
|
|
24
|
-
transitionType
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
setContext<AccordionCtxType>('ctx', ctx);
|
|
28
|
-
|
|
29
|
-
createSingleSelectionContext(multiple);
|
|
30
|
-
|
|
31
|
-
const base = $derived(accordion({ flush, class: clsx(theme, className) }));
|
|
32
|
-
</script>
|
|
33
|
-
|
|
34
|
-
<div {...restProps} class={base}>
|
|
35
|
-
{@render children()}
|
|
36
|
-
</div>
|
|
37
|
-
|
|
38
|
-
<!--
|
|
39
|
-
|
|
40
|
-
## Props
|
|
41
|
-
@prop children
|
|
42
|
-
@prop flush
|
|
43
|
-
@prop activeClass
|
|
44
|
-
@prop inactiveClass
|
|
45
|
-
@prop multiple = false
|
|
46
|
-
@prop class: className
|
|
47
|
-
@prop transitionType
|
|
48
|
-
@prop ...restProps
|
|
49
|
-
-->
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { accordion, getTheme, type AccordionCtxType, type AccordionProps } from '../../index.js';
|
|
3
|
+
import { createSingleSelectionContext } from '../../utils/singleSelection.svelte.js';
|
|
4
|
+
import clsx from 'clsx';
|
|
5
|
+
import { setContext } from 'svelte';
|
|
6
|
+
|
|
7
|
+
let {
|
|
8
|
+
children,
|
|
9
|
+
flush,
|
|
10
|
+
activeClass,
|
|
11
|
+
inactiveClass,
|
|
12
|
+
multiple = false,
|
|
13
|
+
class: className,
|
|
14
|
+
transitionType,
|
|
15
|
+
...restProps
|
|
16
|
+
}: AccordionProps = $props();
|
|
17
|
+
|
|
18
|
+
const theme = getTheme('accordion');
|
|
19
|
+
|
|
20
|
+
const ctx: AccordionCtxType = $state({
|
|
21
|
+
flush,
|
|
22
|
+
activeClass,
|
|
23
|
+
inactiveClass,
|
|
24
|
+
transitionType
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
setContext<AccordionCtxType>('ctx', ctx);
|
|
28
|
+
|
|
29
|
+
createSingleSelectionContext(multiple);
|
|
30
|
+
|
|
31
|
+
const base = $derived(accordion({ flush, class: clsx(theme, className) }));
|
|
32
|
+
</script>
|
|
33
|
+
|
|
34
|
+
<div {...restProps} class={base}>
|
|
35
|
+
{@render children()}
|
|
36
|
+
</div>
|
|
37
|
+
|
|
38
|
+
<!--
|
|
39
|
+
|
|
40
|
+
## Props
|
|
41
|
+
@prop children
|
|
42
|
+
@prop flush
|
|
43
|
+
@prop activeClass
|
|
44
|
+
@prop inactiveClass
|
|
45
|
+
@prop multiple = false
|
|
46
|
+
@prop class: className
|
|
47
|
+
@prop transitionType
|
|
48
|
+
@prop ...restProps
|
|
49
|
+
-->
|