@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,70 +1,70 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import clsx from 'clsx';
|
|
3
|
-
import Label from '../label/Label.svelte';
|
|
4
|
-
import { untrack } from 'svelte';
|
|
5
|
-
import { getTheme, warnThemeDeprecation } from '../../themes/themeUtils.js';
|
|
6
|
-
import { toggle } from './index.js';
|
|
7
|
-
|
|
8
|
-
let {
|
|
9
|
-
children,
|
|
10
|
-
size = 'default',
|
|
11
|
-
value,
|
|
12
|
-
checked = $bindable(),
|
|
13
|
-
disabled,
|
|
14
|
-
color = 'primary',
|
|
15
|
-
class: className,
|
|
16
|
-
classes,
|
|
17
|
-
inputClass,
|
|
18
|
-
spanClass,
|
|
19
|
-
offLabel,
|
|
20
|
-
...restProps
|
|
21
|
-
}: ToggleProps = $props();
|
|
22
|
-
|
|
23
|
-
warnThemeDeprecation(
|
|
24
|
-
'Toggle',
|
|
25
|
-
untrack(() => ({ inputClass, spanClass })),
|
|
26
|
-
{ inputClass: 'input', spanClass: 'span' }
|
|
27
|
-
);
|
|
28
|
-
|
|
29
|
-
const styling = $derived(classes ?? { input: inputClass, span: spanClass });
|
|
30
|
-
|
|
31
|
-
const theme = $derived(getTheme('toggle'));
|
|
32
|
-
|
|
33
|
-
const { input, label, span } = $derived(
|
|
34
|
-
toggle({ color, checked, size, disabled, off_state_label: !!offLabel })
|
|
35
|
-
);
|
|
36
|
-
</script>
|
|
37
|
-
|
|
38
|
-
<Label class={label({ class: clsx(theme?.label, className) })}>
|
|
39
|
-
{#if offLabel}
|
|
40
|
-
{@render offLabel()}
|
|
41
|
-
{/if}
|
|
42
|
-
<input
|
|
43
|
-
type="checkbox"
|
|
44
|
-
bind:checked
|
|
45
|
-
{value}
|
|
46
|
-
{...restProps}
|
|
47
|
-
{disabled}
|
|
48
|
-
class={input({ class: clsx(theme?.input, styling.input) })}
|
|
49
|
-
/>
|
|
50
|
-
<span class={span({ class: clsx(theme?.span, styling.span) })}></span>
|
|
51
|
-
{#if children}
|
|
52
|
-
{@render children()}
|
|
53
|
-
{/if}
|
|
54
|
-
</Label>
|
|
55
|
-
|
|
56
|
-
<!--
|
|
57
|
-
## Props
|
|
58
|
-
@prop children
|
|
59
|
-
@prop size = "default"
|
|
60
|
-
@prop value
|
|
61
|
-
@prop checked = $bindable()
|
|
62
|
-
@prop disabled
|
|
63
|
-
@prop color = "primary"
|
|
64
|
-
@prop class: className
|
|
65
|
-
@prop classes
|
|
66
|
-
@prop inputClass
|
|
67
|
-
@prop spanClass
|
|
68
|
-
@prop offLabel
|
|
69
|
-
@prop ...restProps
|
|
70
|
-
-->
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import Label from '../label/Label.svelte';
|
|
4
|
+
import { untrack } from 'svelte';
|
|
5
|
+
import { getTheme, warnThemeDeprecation } from '../../themes/themeUtils.js';
|
|
6
|
+
import { toggle } from './index.js';
|
|
7
|
+
|
|
8
|
+
let {
|
|
9
|
+
children,
|
|
10
|
+
size = 'default',
|
|
11
|
+
value,
|
|
12
|
+
checked = $bindable(),
|
|
13
|
+
disabled,
|
|
14
|
+
color = 'primary',
|
|
15
|
+
class: className,
|
|
16
|
+
classes,
|
|
17
|
+
inputClass,
|
|
18
|
+
spanClass,
|
|
19
|
+
offLabel,
|
|
20
|
+
...restProps
|
|
21
|
+
}: ToggleProps = $props();
|
|
22
|
+
|
|
23
|
+
warnThemeDeprecation(
|
|
24
|
+
'Toggle',
|
|
25
|
+
untrack(() => ({ inputClass, spanClass })),
|
|
26
|
+
{ inputClass: 'input', spanClass: 'span' }
|
|
27
|
+
);
|
|
28
|
+
|
|
29
|
+
const styling = $derived(classes ?? { input: inputClass, span: spanClass });
|
|
30
|
+
|
|
31
|
+
const theme = $derived(getTheme('toggle'));
|
|
32
|
+
|
|
33
|
+
const { input, label, span } = $derived(
|
|
34
|
+
toggle({ color, checked, size, disabled, off_state_label: !!offLabel })
|
|
35
|
+
);
|
|
36
|
+
</script>
|
|
37
|
+
|
|
38
|
+
<Label class={label({ class: clsx(theme?.label, className) })}>
|
|
39
|
+
{#if offLabel}
|
|
40
|
+
{@render offLabel()}
|
|
41
|
+
{/if}
|
|
42
|
+
<input
|
|
43
|
+
type="checkbox"
|
|
44
|
+
bind:checked
|
|
45
|
+
{value}
|
|
46
|
+
{...restProps}
|
|
47
|
+
{disabled}
|
|
48
|
+
class={input({ class: clsx(theme?.input, styling.input) })}
|
|
49
|
+
/>
|
|
50
|
+
<span class={span({ class: clsx(theme?.span, styling.span) })}></span>
|
|
51
|
+
{#if children}
|
|
52
|
+
{@render children()}
|
|
53
|
+
{/if}
|
|
54
|
+
</Label>
|
|
55
|
+
|
|
56
|
+
<!--
|
|
57
|
+
## Props
|
|
58
|
+
@prop children
|
|
59
|
+
@prop size = "default"
|
|
60
|
+
@prop value
|
|
61
|
+
@prop checked = $bindable()
|
|
62
|
+
@prop disabled
|
|
63
|
+
@prop color = "primary"
|
|
64
|
+
@prop class: className
|
|
65
|
+
@prop classes
|
|
66
|
+
@prop inputClass
|
|
67
|
+
@prop spanClass
|
|
68
|
+
@prop offLabel
|
|
69
|
+
@prop ...restProps
|
|
70
|
+
-->
|
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { findTicketCategoryParents, IconifyIcon } from '../../index.js';
|
|
3
|
-
import { slide } from 'svelte/transition';
|
|
4
|
-
import type { CategorySelectorProps, ICaseCategory } from './types.js';
|
|
5
|
-
|
|
6
|
-
let { items = [], options = [], onClick }: CategorySelectorProps = $props();
|
|
7
|
-
|
|
8
|
-
let openSubmenu = $state(-1);
|
|
9
|
-
|
|
10
|
-
function toggleSubmenu(index: any) {
|
|
11
|
-
openSubmenu = openSubmenu === index ? -1 : index;
|
|
12
|
-
}
|
|
13
|
-
function handleItemClick(option: ICaseCategory) {
|
|
14
|
-
if (!option.items) {
|
|
15
|
-
const data = findTicketCategoryParents(option, options);
|
|
16
|
-
onClick?.({ selected: option, list: data });
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
</script>
|
|
20
|
-
|
|
21
|
-
<ul transition:slide class="divide-y">
|
|
22
|
-
{#each items as item, index (item.name)}
|
|
23
|
-
<li class="w-full text-sm">
|
|
24
|
-
<button
|
|
25
|
-
type="button"
|
|
26
|
-
class="w-full px-2 py-1 text-left hover:bg-gray-100"
|
|
27
|
-
onclick={() => {
|
|
28
|
-
if (item.items) {
|
|
29
|
-
toggleSubmenu(index);
|
|
30
|
-
} else {
|
|
31
|
-
handleItemClick(item);
|
|
32
|
-
}
|
|
33
|
-
}}
|
|
34
|
-
>
|
|
35
|
-
<div class="flex items-center justify-between">
|
|
36
|
-
{item.name}
|
|
37
|
-
{#if item.items}
|
|
38
|
-
<IconifyIcon
|
|
39
|
-
icon={openSubmenu === index ? 'ri:arrow-up-s-fill' : 'ri:arrow-down-s-fill'}
|
|
40
|
-
class="text-lg text-gray-500"
|
|
41
|
-
/>
|
|
42
|
-
{/if}
|
|
43
|
-
</div>
|
|
44
|
-
</button>
|
|
45
|
-
{#if item.items && openSubmenu === index}
|
|
46
|
-
<div class="pl-4">
|
|
47
|
-
<svelte:self items={item.items} onclick {options} />
|
|
48
|
-
</div>
|
|
49
|
-
{/if}
|
|
50
|
-
</li>
|
|
51
|
-
{/each}
|
|
52
|
-
</ul>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { findTicketCategoryParents, IconifyIcon } from '../../index.js';
|
|
3
|
+
import { slide } from 'svelte/transition';
|
|
4
|
+
import type { CategorySelectorProps, ICaseCategory } from './types.js';
|
|
5
|
+
|
|
6
|
+
let { items = [], options = [], onClick }: CategorySelectorProps = $props();
|
|
7
|
+
|
|
8
|
+
let openSubmenu = $state(-1);
|
|
9
|
+
|
|
10
|
+
function toggleSubmenu(index: any) {
|
|
11
|
+
openSubmenu = openSubmenu === index ? -1 : index;
|
|
12
|
+
}
|
|
13
|
+
function handleItemClick(option: ICaseCategory) {
|
|
14
|
+
if (!option.items) {
|
|
15
|
+
const data = findTicketCategoryParents(option, options);
|
|
16
|
+
onClick?.({ selected: option, list: data });
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<ul transition:slide class="divide-y">
|
|
22
|
+
{#each items as item, index (item.name)}
|
|
23
|
+
<li class="w-full text-sm">
|
|
24
|
+
<button
|
|
25
|
+
type="button"
|
|
26
|
+
class="w-full px-2 py-1 text-left hover:bg-gray-100"
|
|
27
|
+
onclick={() => {
|
|
28
|
+
if (item.items) {
|
|
29
|
+
toggleSubmenu(index);
|
|
30
|
+
} else {
|
|
31
|
+
handleItemClick(item);
|
|
32
|
+
}
|
|
33
|
+
}}
|
|
34
|
+
>
|
|
35
|
+
<div class="flex items-center justify-between">
|
|
36
|
+
{item.name}
|
|
37
|
+
{#if item.items}
|
|
38
|
+
<IconifyIcon
|
|
39
|
+
icon={openSubmenu === index ? 'ri:arrow-up-s-fill' : 'ri:arrow-down-s-fill'}
|
|
40
|
+
class="text-lg text-gray-500"
|
|
41
|
+
/>
|
|
42
|
+
{/if}
|
|
43
|
+
</div>
|
|
44
|
+
</button>
|
|
45
|
+
{#if item.items && openSubmenu === index}
|
|
46
|
+
<div class="pl-4">
|
|
47
|
+
<svelte:self items={item.items} onclick {options} />
|
|
48
|
+
</div>
|
|
49
|
+
{/if}
|
|
50
|
+
</li>
|
|
51
|
+
{/each}
|
|
52
|
+
</ul>
|