@rkosafo/cai.components 0.0.1 → 0.0.3
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/dist/baseEditor/index.svelte +32 -0
- package/dist/baseEditor/index.svelte.d.ts +18 -0
- package/dist/builders/filters/FilterBuilder.svelte +638 -0
- package/dist/builders/filters/FilterBuilder.svelte.d.ts +4 -0
- package/dist/builders/filters/index.d.ts +1 -0
- package/dist/builders/filters/index.js +1 -0
- package/dist/forms/FormCheckbox/FormCheckbox.svelte +53 -0
- package/dist/forms/FormCheckbox/FormCheckbox.svelte.d.ts +4 -0
- package/dist/forms/FormCheckbox/index.d.ts +1 -0
- package/dist/forms/FormCheckbox/index.js +1 -0
- package/dist/forms/FormDatepicker/FormDatepicker.svelte +159 -0
- package/dist/forms/FormDatepicker/FormDatepicker.svelte.d.ts +13 -0
- package/dist/forms/FormDatepicker/index.d.ts +1 -0
- package/dist/forms/FormDatepicker/index.js +1 -0
- package/dist/forms/FormInput/FormInput.svelte +87 -0
- package/dist/forms/FormInput/FormInput.svelte.d.ts +4 -0
- package/dist/forms/FormInput/index.d.ts +1 -0
- package/dist/forms/FormInput/index.js +1 -0
- package/dist/forms/FormRadio/FormRadio.svelte +53 -0
- package/dist/forms/FormRadio/FormRadio.svelte.d.ts +4 -0
- package/dist/forms/FormRadio/index.d.ts +1 -0
- package/dist/forms/FormRadio/index.js +1 -0
- package/dist/forms/FormSelect/FormSelect.svelte +86 -0
- package/dist/forms/FormSelect/FormSelect.svelte.d.ts +4 -0
- package/dist/forms/FormSelect/index.d.ts +1 -0
- package/dist/forms/FormSelect/index.js +1 -0
- package/dist/forms/FormTextarea/FormTextarea.svelte +77 -0
- package/dist/forms/FormTextarea/FormTextarea.svelte.d.ts +4 -0
- package/dist/forms/FormTextarea/index.d.ts +1 -0
- package/dist/forms/FormTextarea/index.js +1 -0
- package/dist/forms/checkbox/Checkbox.svelte +82 -0
- package/dist/forms/checkbox/Checkbox.svelte.d.ts +4 -0
- package/dist/forms/checkbox/CheckboxButton.svelte +92 -0
- package/dist/forms/checkbox/CheckboxButton.svelte.d.ts +18 -0
- package/dist/forms/checkbox/index.d.ts +3 -0
- package/dist/forms/checkbox/index.js +3 -0
- package/dist/forms/checkbox/theme.d.ts +317 -0
- package/dist/forms/checkbox/theme.js +113 -0
- package/dist/forms/datepicker/Datepicker.svelte +706 -0
- package/dist/forms/datepicker/Datepicker.svelte.d.ts +41 -0
- package/dist/forms/datepicker/index.d.ts +2 -0
- package/dist/forms/datepicker/index.js +2 -0
- package/dist/forms/datepicker/theme.d.ts +385 -0
- package/dist/forms/datepicker/theme.js +56 -0
- package/dist/forms/form/Form.svelte +69 -0
- package/dist/forms/form/Form.svelte.d.ts +6 -0
- package/dist/forms/form/index.d.ts +2 -0
- package/dist/forms/form/index.js +2 -0
- package/dist/forms/input/Input.svelte +363 -0
- package/dist/forms/input/Input.svelte.d.ts +4 -0
- package/dist/forms/input/index.d.ts +4 -0
- package/dist/forms/input/index.js +5 -0
- package/dist/forms/input/theme.d.ts +301 -0
- package/dist/forms/input/theme.js +100 -0
- package/dist/forms/label/Label.svelte +38 -0
- package/dist/forms/label/Label.svelte.d.ts +15 -0
- package/dist/forms/label/index.d.ts +2 -0
- package/dist/forms/label/index.js +2 -0
- package/dist/forms/label/theme.d.ts +75 -0
- package/dist/forms/label/theme.js +29 -0
- package/dist/forms/radio/Radio.svelte +48 -0
- package/dist/forms/radio/Radio.svelte.d.ts +25 -0
- package/dist/forms/radio/RadioButton.svelte +22 -0
- package/dist/forms/radio/RadioButton.svelte.d.ts +25 -0
- package/dist/forms/radio/index.d.ts +3 -0
- package/dist/forms/radio/index.js +3 -0
- package/dist/forms/radio/theme.d.ts +290 -0
- package/dist/forms/radio/theme.js +95 -0
- package/dist/forms/select/Select.svelte +50 -0
- package/dist/forms/select/Select.svelte.d.ts +4 -0
- package/dist/forms/select/index.d.ts +1 -0
- package/dist/forms/select/index.js +1 -0
- package/dist/forms/textarea/Textarea.svelte +165 -0
- package/dist/forms/textarea/Textarea.svelte.d.ts +4 -0
- package/dist/forms/textarea/index.d.ts +2 -0
- package/dist/forms/textarea/index.js +2 -0
- package/dist/forms/textarea/theme.d.ts +100 -0
- package/dist/forms/textarea/theme.js +35 -0
- package/dist/index.d.ts +42 -2
- package/dist/index.js +42 -2
- package/dist/layout/TF/Content/Content.svelte +28 -0
- package/dist/layout/TF/Content/Content.svelte.d.ts +8 -0
- package/dist/layout/TF/Content/index.d.ts +1 -0
- package/dist/layout/TF/Content/index.js +1 -0
- package/dist/layout/TF/Header/Header.svelte +159 -0
- package/dist/layout/TF/Header/Header.svelte.d.ts +21 -0
- package/dist/layout/TF/Header/index.d.ts +1 -0
- package/dist/layout/TF/Header/index.js +1 -0
- package/dist/layout/TF/Sidebar/Sidebar.svelte +74 -0
- package/dist/layout/TF/Sidebar/Sidebar.svelte.d.ts +23 -0
- package/dist/layout/TF/Sidebar/index.d.ts +1 -0
- package/dist/layout/TF/Sidebar/index.js +1 -0
- package/dist/layout/TF/Wrapper/Wrapper.svelte +17 -0
- package/dist/layout/TF/Wrapper/Wrapper.svelte.d.ts +8 -0
- package/dist/layout/TF/Wrapper/index.d.ts +1 -0
- package/dist/layout/TF/Wrapper/index.js +1 -0
- package/dist/layout/TF/index.d.ts +5 -0
- package/dist/layout/TF/index.js +5 -0
- package/dist/themes/ThemeProvider.svelte +20 -0
- package/dist/themes/ThemeProvider.svelte.d.ts +9 -0
- package/dist/themes/index.d.ts +7 -0
- package/dist/themes/index.js +1 -0
- package/dist/themes/themeUtils.d.ts +24 -0
- package/dist/themes/themeUtils.js +74 -0
- package/dist/themes/themes.d.ts +18 -0
- package/dist/themes/themes.js +18 -0
- package/dist/types/index.d.ts +755 -0
- package/dist/types/index.js +1 -0
- package/dist/typography/heading/Heading.svelte +35 -0
- package/dist/typography/heading/Heading.svelte.d.ts +10 -0
- package/dist/typography/heading/index.d.ts +2 -0
- package/dist/typography/heading/index.js +2 -0
- package/dist/typography/heading/theme.d.ts +30 -0
- package/dist/typography/heading/theme.js +17 -0
- package/dist/ui/accordion/Accordion.svelte +49 -0
- package/dist/ui/accordion/Accordion.svelte.d.ts +4 -0
- package/dist/ui/accordion/AccordionItem.svelte +173 -0
- package/dist/ui/accordion/AccordionItem.svelte.d.ts +4 -0
- package/dist/ui/accordion/index.d.ts +3 -0
- package/dist/ui/accordion/index.js +3 -0
- package/dist/ui/accordion/theme.d.ts +96 -0
- package/dist/ui/accordion/theme.js +59 -0
- package/dist/ui/alert/Alert.svelte +83 -0
- package/dist/ui/alert/Alert.svelte.d.ts +5 -0
- package/dist/ui/alert/index.d.ts +2 -0
- package/dist/ui/alert/index.js +2 -0
- package/dist/ui/alert/theme.d.ts +108 -0
- package/dist/ui/alert/theme.js +149 -0
- package/dist/ui/alertDialog/AlertDialog.svelte +40 -0
- package/dist/ui/alertDialog/AlertDialog.svelte.d.ts +4 -0
- package/dist/ui/alertDialog/index.d.ts +1 -0
- package/dist/ui/alertDialog/index.js +1 -0
- package/dist/ui/avatar/Avatar.svelte +77 -0
- package/dist/ui/avatar/Avatar.svelte.d.ts +4 -0
- package/dist/ui/avatar/index.d.ts +2 -0
- package/dist/ui/avatar/index.js +2 -0
- package/dist/ui/avatar/theme.d.ts +63 -0
- package/dist/ui/avatar/theme.js +31 -0
- package/dist/ui/buttons/Button.svelte +102 -0
- package/dist/ui/buttons/Button.svelte.d.ts +4 -0
- package/dist/ui/buttons/GradientButton.svelte +59 -0
- package/dist/ui/buttons/GradientButton.svelte.d.ts +4 -0
- package/dist/ui/buttons/index.d.ts +3 -0
- package/dist/ui/buttons/index.js +3 -0
- package/dist/ui/buttons/theme.d.ts +704 -0
- package/dist/ui/buttons/theme.js +332 -0
- package/dist/ui/datatable/Datatable.svelte +516 -0
- package/dist/ui/datatable/Datatable.svelte.d.ts +5 -0
- package/dist/ui/datatable/index.d.ts +2 -0
- package/dist/ui/datatable/index.js +2 -0
- package/dist/ui/drawer/Drawer.svelte +280 -0
- package/dist/ui/drawer/Drawer.svelte.d.ts +37 -0
- package/dist/ui/drawer/index.d.ts +2 -0
- package/dist/ui/drawer/index.js +2 -0
- package/dist/ui/drawer/theme.d.ts +211 -0
- package/dist/ui/drawer/theme.js +46 -0
- package/dist/ui/dropdown/Dropdown.svelte +36 -0
- package/dist/ui/dropdown/Dropdown.svelte.d.ts +4 -0
- package/dist/ui/dropdown/DropdownDivider.svelte +11 -0
- package/dist/ui/dropdown/DropdownDivider.svelte.d.ts +4 -0
- package/dist/ui/dropdown/DropdownGroup.svelte +14 -0
- package/dist/ui/dropdown/DropdownGroup.svelte.d.ts +4 -0
- package/dist/ui/dropdown/DropdownHeader.svelte +14 -0
- package/dist/ui/dropdown/DropdownHeader.svelte.d.ts +4 -0
- package/dist/ui/dropdown/DropdownItem.svelte +52 -0
- package/dist/ui/dropdown/DropdownItem.svelte.d.ts +4 -0
- package/dist/ui/dropdown/index.d.ts +6 -0
- package/dist/ui/dropdown/index.js +6 -0
- package/dist/ui/dropdown/theme.d.ts +55 -0
- package/dist/ui/dropdown/theme.js +20 -0
- package/dist/ui/footer/Footer.svelte +15 -0
- package/dist/ui/footer/Footer.svelte.d.ts +4 -0
- package/dist/ui/footer/FooterBrand.svelte +37 -0
- package/dist/ui/footer/FooterBrand.svelte.d.ts +4 -0
- package/dist/ui/footer/FooterCopyright.svelte +45 -0
- package/dist/ui/footer/FooterCopyright.svelte.d.ts +4 -0
- package/dist/ui/footer/FooterIcon.svelte +22 -0
- package/dist/ui/footer/FooterIcon.svelte.d.ts +4 -0
- package/dist/ui/footer/FooterLink.svelte +33 -0
- package/dist/ui/footer/FooterLink.svelte.d.ts +4 -0
- package/dist/ui/footer/FooterLinkGroup.svelte +13 -0
- package/dist/ui/footer/FooterLinkGroup.svelte.d.ts +4 -0
- package/dist/ui/footer/index.d.ts +7 -0
- package/dist/ui/footer/index.js +7 -0
- package/dist/ui/footer/theme.d.ts +137 -0
- package/dist/ui/footer/theme.js +39 -0
- package/dist/ui/indicator/Indicator.svelte +42 -0
- package/dist/ui/indicator/Indicator.svelte.d.ts +4 -0
- package/dist/ui/indicator/index.d.ts +2 -0
- package/dist/ui/indicator/index.js +2 -0
- package/dist/ui/indicator/theme.d.ts +177 -0
- package/dist/ui/indicator/theme.js +114 -0
- package/dist/ui/modal/Modal.svelte +265 -0
- package/dist/ui/modal/Modal.svelte.d.ts +38 -0
- package/dist/ui/modal/index.d.ts +2 -0
- package/dist/ui/modal/index.js +2 -0
- package/dist/ui/modal/theme.d.ts +190 -0
- package/dist/ui/modal/theme.js +41 -0
- package/dist/ui/notificationList/NotificationList.svelte +123 -0
- package/dist/ui/notificationList/NotificationList.svelte.d.ts +25 -0
- package/dist/ui/notificationList/index.d.ts +1 -0
- package/dist/ui/notificationList/index.js +1 -0
- package/dist/ui/pageLoader/PageLoader.svelte +10 -0
- package/dist/ui/pageLoader/PageLoader.svelte.d.ts +4 -0
- package/dist/ui/pageLoader/index.d.ts +1 -0
- package/dist/ui/pageLoader/index.js +1 -0
- package/dist/ui/paginate/Paginate.svelte +96 -0
- package/dist/ui/paginate/Paginate.svelte.d.ts +4 -0
- package/dist/ui/paginate/index.d.ts +1 -0
- package/dist/ui/paginate/index.js +1 -0
- package/dist/ui/tab/Tab.svelte +65 -0
- package/dist/ui/tab/Tab.svelte.d.ts +4 -0
- package/dist/ui/tab/index.d.ts +2 -0
- package/dist/ui/tab/index.js +2 -0
- package/dist/ui/tab/theme.d.ts +135 -0
- package/dist/ui/tab/theme.js +83 -0
- package/dist/ui/table/Table.svelte +385 -0
- package/dist/ui/table/Table.svelte.d.ts +4 -0
- package/dist/ui/table/index.d.ts +1 -0
- package/dist/ui/table/index.js +1 -0
- package/dist/ui/tableLoader/TableLoader.svelte +24 -0
- package/dist/ui/tableLoader/TableLoader.svelte.d.ts +13 -0
- package/dist/ui/tableLoader/index.d.ts +1 -0
- package/dist/ui/tableLoader/index.js +1 -0
- package/dist/ui/toolbar/Toolbar.svelte +59 -0
- package/dist/ui/toolbar/Toolbar.svelte.d.ts +17 -0
- package/dist/ui/toolbar/ToolbarButton.svelte +56 -0
- package/dist/ui/toolbar/ToolbarButton.svelte.d.ts +17 -0
- package/dist/ui/toolbar/ToolbarGroup.svelte +43 -0
- package/dist/ui/toolbar/ToolbarGroup.svelte.d.ts +16 -0
- package/dist/ui/toolbar/index.d.ts +4 -0
- package/dist/ui/toolbar/index.js +4 -0
- package/dist/ui/toolbar/theme.d.ts +320 -0
- package/dist/ui/toolbar/theme.js +155 -0
- package/dist/utils/Popper.svelte +257 -0
- package/dist/utils/Popper.svelte.d.ts +4 -0
- package/dist/utils/action.d.ts +16 -0
- package/dist/utils/action.js +107 -0
- package/dist/utils/closeButton/CloseButton.svelte +88 -0
- package/dist/utils/closeButton/CloseButton.svelte.d.ts +12 -0
- package/dist/utils/closeButton/index.d.ts +2 -0
- package/dist/utils/closeButton/index.js +2 -0
- package/dist/utils/closeButton/theme.d.ts +100 -0
- package/dist/utils/closeButton/theme.js +69 -0
- package/dist/utils/dismissable.d.ts +9 -0
- package/dist/utils/dismissable.js +16 -0
- package/dist/utils/index.d.ts +8 -0
- package/dist/utils/index.js +35 -0
- package/dist/utils/paginate.svelte.d.ts +22 -0
- package/dist/utils/paginate.svelte.js +167 -0
- package/dist/utils/singleSelection.svelte.d.ts +15 -0
- package/dist/utils/singleSelection.svelte.js +49 -0
- package/dist/utils/svelte-legos.d.ts +7 -0
- package/dist/utils/svelte-legos.js +14 -0
- package/package.json +24 -2
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { dropdownItem } from './index.js';
|
|
3
|
+
import clsx from 'clsx';
|
|
4
|
+
import { getContext } from 'svelte';
|
|
5
|
+
import { getTheme, warnThemeDeprecation } from '../../themes/themeUtils.js';
|
|
6
|
+
import type { DropdownItemProps } from '../../index.js';
|
|
7
|
+
|
|
8
|
+
let {
|
|
9
|
+
aClass,
|
|
10
|
+
children,
|
|
11
|
+
activeClass,
|
|
12
|
+
liClass,
|
|
13
|
+
classes,
|
|
14
|
+
class: className,
|
|
15
|
+
...restProps
|
|
16
|
+
}: DropdownItemProps = $props();
|
|
17
|
+
|
|
18
|
+
warnThemeDeprecation(
|
|
19
|
+
'DropdownItem',
|
|
20
|
+
{ aClass, activeClass, liClass },
|
|
21
|
+
{ aClass: 'class', activeClass: 'active', liClass: 'li' }
|
|
22
|
+
);
|
|
23
|
+
const theme = getTheme('dropdownItem');
|
|
24
|
+
const styling = $derived(classes ?? { active: activeClass, li: liClass });
|
|
25
|
+
|
|
26
|
+
const activeUrl: { value: string } = getContext('activeUrl');
|
|
27
|
+
|
|
28
|
+
let isActive = $derived(activeUrl?.value ? restProps.href === activeUrl.value : false);
|
|
29
|
+
|
|
30
|
+
const { base, active, li } = dropdownItem();
|
|
31
|
+
let finalClass = $derived([
|
|
32
|
+
isActive
|
|
33
|
+
? active({ class: clsx(theme?.active, styling.active) })
|
|
34
|
+
: base({ class: clsx(theme?.base, className) })
|
|
35
|
+
]);
|
|
36
|
+
</script>
|
|
37
|
+
|
|
38
|
+
<li class={li({ class: clsx(styling.li) })}>
|
|
39
|
+
{#if restProps.href === undefined && restProps.onclick === undefined}
|
|
40
|
+
<div {...restProps} class={finalClass}>
|
|
41
|
+
{@render children()}
|
|
42
|
+
</div>
|
|
43
|
+
{:else if restProps.href === undefined}
|
|
44
|
+
<button type="button" {...restProps} class={finalClass}>
|
|
45
|
+
{@render children()}
|
|
46
|
+
</button>
|
|
47
|
+
{:else}
|
|
48
|
+
<a {...restProps} class={finalClass}>
|
|
49
|
+
{@render children()}
|
|
50
|
+
</a>
|
|
51
|
+
{/if}
|
|
52
|
+
</li>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { default as Dropdown } from "./Dropdown.svelte";
|
|
2
|
+
export { default as DropdownDivider } from './DropdownDivider.svelte';
|
|
3
|
+
export { default as DropdownGroup } from './DropdownGroup.svelte';
|
|
4
|
+
export { default as DropdownHeader } from './DropdownHeader.svelte';
|
|
5
|
+
export { default as DropdownItem } from './DropdownItem.svelte';
|
|
6
|
+
export { dropdown, dropdownDivider, dropdownGroup, dropdownHeader, dropdownItem } from './theme.js';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { default as Dropdown } from "./Dropdown.svelte";
|
|
2
|
+
export { default as DropdownDivider } from './DropdownDivider.svelte';
|
|
3
|
+
export { default as DropdownGroup } from './DropdownGroup.svelte';
|
|
4
|
+
export { default as DropdownHeader } from './DropdownHeader.svelte';
|
|
5
|
+
export { default as DropdownItem } from './DropdownItem.svelte';
|
|
6
|
+
export { dropdown, dropdownDivider, dropdownGroup, dropdownHeader, dropdownItem } from './theme.js';
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { type VariantProps } from 'tailwind-variants';
|
|
2
|
+
import type { ClassValue } from 'clsx';
|
|
3
|
+
type Slots<T extends {
|
|
4
|
+
slots: Record<string, unknown>;
|
|
5
|
+
}> = Omit<T['slots'], 'base'>;
|
|
6
|
+
export type Classes<T extends {
|
|
7
|
+
slots: Record<string, unknown>;
|
|
8
|
+
}> = {
|
|
9
|
+
classes?: Partial<{
|
|
10
|
+
[K in keyof Slots<T>]: ClassValue;
|
|
11
|
+
}>;
|
|
12
|
+
};
|
|
13
|
+
export declare const dropdown: import("tailwind-variants").TVReturnType<{} | {} | {}, undefined, "mt-2 divide-y divide-gray-300 dark:divide-gray-500 overflow-hidden rounded-lg bg-white shadow-sm dark:bg-gray-700", {} | {}, undefined, import("tailwind-variants").TVReturnType<unknown, undefined, "mt-2 divide-y divide-gray-300 dark:divide-gray-500 overflow-hidden rounded-lg bg-white shadow-sm dark:bg-gray-700", unknown, unknown, undefined>>;
|
|
14
|
+
export declare const dropdownDivider: import("tailwind-variants").TVReturnType<{} | {} | {}, undefined, "my-1 h-px bg-gray-100 dark:bg-gray-500", {} | {}, undefined, import("tailwind-variants").TVReturnType<unknown, undefined, "my-1 h-px bg-gray-100 dark:bg-gray-500", unknown, unknown, undefined>>;
|
|
15
|
+
export declare const dropdownHeader: import("tailwind-variants").TVReturnType<{} | {} | {}, undefined, "px-4 py-3 text-sm text-gray-900 dark:text-white", {} | {}, undefined, import("tailwind-variants").TVReturnType<unknown, undefined, "px-4 py-3 text-sm text-gray-900 dark:text-white", unknown, unknown, undefined>>;
|
|
16
|
+
export type DropdownItemVariants = VariantProps<typeof dropdownItem> & Classes<typeof dropdownItem>;
|
|
17
|
+
export declare const dropdownItem: import("tailwind-variants").TVReturnType<{
|
|
18
|
+
[key: string]: {
|
|
19
|
+
[key: string]: import("tailwind-merge").ClassNameValue | {
|
|
20
|
+
base?: import("tailwind-merge").ClassNameValue;
|
|
21
|
+
li?: import("tailwind-merge").ClassNameValue;
|
|
22
|
+
active?: import("tailwind-merge").ClassNameValue;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
} | {
|
|
26
|
+
[x: string]: {
|
|
27
|
+
[x: string]: import("tailwind-merge").ClassNameValue | {
|
|
28
|
+
base?: import("tailwind-merge").ClassNameValue;
|
|
29
|
+
li?: import("tailwind-merge").ClassNameValue;
|
|
30
|
+
active?: import("tailwind-merge").ClassNameValue;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
} | {}, {
|
|
34
|
+
base: string;
|
|
35
|
+
active: string;
|
|
36
|
+
li: string;
|
|
37
|
+
}, undefined, {
|
|
38
|
+
[key: string]: {
|
|
39
|
+
[key: string]: import("tailwind-merge").ClassNameValue | {
|
|
40
|
+
base?: import("tailwind-merge").ClassNameValue;
|
|
41
|
+
li?: import("tailwind-merge").ClassNameValue;
|
|
42
|
+
active?: import("tailwind-merge").ClassNameValue;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
} | {}, {
|
|
46
|
+
base: string;
|
|
47
|
+
active: string;
|
|
48
|
+
li: string;
|
|
49
|
+
}, import("tailwind-variants").TVReturnType<unknown, {
|
|
50
|
+
base: string;
|
|
51
|
+
active: string;
|
|
52
|
+
li: string;
|
|
53
|
+
}, undefined, unknown, unknown, undefined>>;
|
|
54
|
+
export declare const dropdownGroup: import("tailwind-variants").TVReturnType<{} | {} | {}, undefined, "py-2 text-sm text-gray-700 dark:text-gray-200", {} | {}, undefined, import("tailwind-variants").TVReturnType<unknown, undefined, "py-2 text-sm text-gray-700 dark:text-gray-200", unknown, unknown, undefined>>;
|
|
55
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { tv } from 'tailwind-variants';
|
|
2
|
+
export const dropdown = tv({
|
|
3
|
+
base: 'mt-2 divide-y divide-gray-300 dark:divide-gray-500 overflow-hidden rounded-lg bg-white shadow-sm dark:bg-gray-700'
|
|
4
|
+
});
|
|
5
|
+
export const dropdownDivider = tv({
|
|
6
|
+
base: 'my-1 h-px bg-gray-100 dark:bg-gray-500'
|
|
7
|
+
});
|
|
8
|
+
export const dropdownHeader = tv({
|
|
9
|
+
base: 'px-4 py-3 text-sm text-gray-900 dark:text-white'
|
|
10
|
+
});
|
|
11
|
+
export const dropdownItem = tv({
|
|
12
|
+
slots: {
|
|
13
|
+
base: 'block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white',
|
|
14
|
+
active: 'block px-4 py-2 text-primary-700 dark:text-primary-600 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white',
|
|
15
|
+
li: ''
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
export const dropdownGroup = tv({
|
|
19
|
+
base: 'py-2 text-sm text-gray-700 dark:text-gray-200'
|
|
20
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { getTheme, type FooterProps } from '../../index.js';
|
|
3
|
+
import clsx from 'clsx';
|
|
4
|
+
import { footer } from './index.js';
|
|
5
|
+
|
|
6
|
+
let { children, footerType = 'default', class: className, ...restProps }: FooterProps = $props();
|
|
7
|
+
|
|
8
|
+
const theme = getTheme('footer');
|
|
9
|
+
|
|
10
|
+
const footerCls = $derived(footer({ footerType, class: clsx(theme, className) }));
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<footer {...restProps} class={footerCls}>
|
|
14
|
+
{@render children()}
|
|
15
|
+
</footer>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { getTheme, type FooterBrandProps } from '../../index.js';
|
|
3
|
+
import clsx, { type ClassValue } from 'clsx';
|
|
4
|
+
import { footerBrand } from './index.js';
|
|
5
|
+
|
|
6
|
+
let {
|
|
7
|
+
children,
|
|
8
|
+
aClass,
|
|
9
|
+
spanClass,
|
|
10
|
+
imgClass,
|
|
11
|
+
href,
|
|
12
|
+
src,
|
|
13
|
+
alt,
|
|
14
|
+
name,
|
|
15
|
+
...restProps
|
|
16
|
+
}: FooterBrandProps = $props();
|
|
17
|
+
|
|
18
|
+
const theme = getTheme('footerBrand');
|
|
19
|
+
|
|
20
|
+
const { base, span, img } = $derived(footerBrand());
|
|
21
|
+
</script>
|
|
22
|
+
|
|
23
|
+
{#if href}
|
|
24
|
+
<a {...restProps} {href} class={base({ class: clsx(theme?.base, aClass) })}>
|
|
25
|
+
{#if src}
|
|
26
|
+
<img {src} class={img({ class: clsx(theme?.img, imgClass) })} {alt} />
|
|
27
|
+
{/if}
|
|
28
|
+
{#if name}
|
|
29
|
+
<span class={span({ class: clsx(theme?.span, spanClass) })}>{name}</span>
|
|
30
|
+
{/if}
|
|
31
|
+
{#if children}
|
|
32
|
+
{@render children()}
|
|
33
|
+
{/if}
|
|
34
|
+
</a>
|
|
35
|
+
{:else}
|
|
36
|
+
<img {src} class={img({ class: clsx(imgClass) })} {alt} />
|
|
37
|
+
{/if}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { getTheme, warnThemeDeprecation } from '../../themes/themeUtils.js';
|
|
3
|
+
import clsx, { type ClassValue } from 'clsx';
|
|
4
|
+
import { footerCopyright } from './index.js';
|
|
5
|
+
import type { FooterCopyrightProps } from '../../index.js';
|
|
6
|
+
|
|
7
|
+
let {
|
|
8
|
+
spanClass,
|
|
9
|
+
aClass,
|
|
10
|
+
href,
|
|
11
|
+
by,
|
|
12
|
+
copyrightMessage = 'All Rights Reserved.',
|
|
13
|
+
year,
|
|
14
|
+
bySpanClass,
|
|
15
|
+
classes,
|
|
16
|
+
class: className,
|
|
17
|
+
...restProps
|
|
18
|
+
}: FooterCopyrightProps = $props();
|
|
19
|
+
|
|
20
|
+
warnThemeDeprecation(
|
|
21
|
+
'FooterCopyright',
|
|
22
|
+
{ aClass, spanClass, bySpanClass },
|
|
23
|
+
{ aClass: 'link', spanClass: 'class', bySpanClass: 'bySpan' }
|
|
24
|
+
);
|
|
25
|
+
// link, bySpan
|
|
26
|
+
const styling = $derived(classes ?? { bySpan: bySpanClass, link: aClass });
|
|
27
|
+
|
|
28
|
+
if (!year) year = new Date().getFullYear();
|
|
29
|
+
|
|
30
|
+
const { base, link, bySpan } = footerCopyright();
|
|
31
|
+
|
|
32
|
+
const theme = getTheme('footerCopyright');
|
|
33
|
+
</script>
|
|
34
|
+
|
|
35
|
+
<span class={base({ class: clsx(theme?.base, className ?? spanClass) })}>
|
|
36
|
+
© {year}
|
|
37
|
+
{#if href}
|
|
38
|
+
<a {...restProps} {href} class={link({ class: clsx(theme?.link, styling.link) })}>
|
|
39
|
+
{by}
|
|
40
|
+
</a>
|
|
41
|
+
{:else}
|
|
42
|
+
<span class={bySpan({ class: clsx(theme?.bySpan, styling.bySpan) })}>{by}</span>
|
|
43
|
+
{/if}
|
|
44
|
+
{copyrightMessage}
|
|
45
|
+
</span>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { getTheme, type FooterIconProps } from '../../index.js';
|
|
3
|
+
import clsx from 'clsx';
|
|
4
|
+
import { footerIcon } from './index.js';
|
|
5
|
+
|
|
6
|
+
let { children, href, ariaLabel, class: className, ...restProps }: FooterIconProps = $props();
|
|
7
|
+
|
|
8
|
+
const theme = getTheme('footerIcon');
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
{#if href}
|
|
12
|
+
<a
|
|
13
|
+
{...restProps}
|
|
14
|
+
{href}
|
|
15
|
+
aria-label={ariaLabel}
|
|
16
|
+
class={footerIcon({ class: clsx(theme, className) })}
|
|
17
|
+
>
|
|
18
|
+
{@render children()}
|
|
19
|
+
</a>
|
|
20
|
+
{:else}
|
|
21
|
+
{@render children()}
|
|
22
|
+
{/if}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<script lang="ts" module>
|
|
2
|
+
</script>
|
|
3
|
+
|
|
4
|
+
<script lang="ts">
|
|
5
|
+
import { getTheme, warnThemeDeprecation } from '../../themes/themeUtils.js';
|
|
6
|
+
import clsx, { type ClassValue } from 'clsx';
|
|
7
|
+
import { footerLink } from './index.js';
|
|
8
|
+
import type { FooterLinkProps } from '../../index.js';
|
|
9
|
+
|
|
10
|
+
let {
|
|
11
|
+
children,
|
|
12
|
+
liClass,
|
|
13
|
+
aClass,
|
|
14
|
+
href,
|
|
15
|
+
classes,
|
|
16
|
+
class: className,
|
|
17
|
+
...restProps
|
|
18
|
+
}: FooterLinkProps = $props();
|
|
19
|
+
|
|
20
|
+
warnThemeDeprecation('FooterLink', { liClass, aClass }, { liClass: 'class', aClass: 'link' });
|
|
21
|
+
// link, bySpan
|
|
22
|
+
const styling = $derived(classes ?? { link: aClass });
|
|
23
|
+
|
|
24
|
+
const theme = getTheme('footerLink');
|
|
25
|
+
|
|
26
|
+
const { base, link } = footerLink();
|
|
27
|
+
</script>
|
|
28
|
+
|
|
29
|
+
<li class={base({ class: clsx(theme?.base, className ?? liClass) })}>
|
|
30
|
+
<a {...restProps} {href} class={link({ class: clsx(theme?.link, styling.link) })}>
|
|
31
|
+
{@render children()}
|
|
32
|
+
</a>
|
|
33
|
+
</li>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { getTheme, type FooterLinkGroupProps } from '../../index.js';
|
|
3
|
+
import clsx from 'clsx';
|
|
4
|
+
import { footerLinkGroup } from './index.js';
|
|
5
|
+
|
|
6
|
+
let { class: className, children, ...restProps }: FooterLinkGroupProps = $props();
|
|
7
|
+
|
|
8
|
+
const theme = getTheme('footerLinkGroup');
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<ul {...restProps} class={footerLinkGroup({ class: clsx(theme, className) })}>
|
|
12
|
+
{@render children()}
|
|
13
|
+
</ul>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { default as Footer } from './Footer.svelte';
|
|
2
|
+
export { default as FooterBrand } from './FooterBrand.svelte';
|
|
3
|
+
export { default as FooterCopyright } from './FooterCopyright.svelte';
|
|
4
|
+
export { default as FooterIcon } from './FooterIcon.svelte';
|
|
5
|
+
export { default as FooterLink } from './FooterLink.svelte';
|
|
6
|
+
export { default as FooterLinkGroup } from './FooterLinkGroup.svelte';
|
|
7
|
+
export { footer, footerBrand, footerCopyright, footerIcon, footerLinkGroup, footerLink } from './theme.js';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { default as Footer } from './Footer.svelte';
|
|
2
|
+
export { default as FooterBrand } from './FooterBrand.svelte';
|
|
3
|
+
export { default as FooterCopyright } from './FooterCopyright.svelte';
|
|
4
|
+
export { default as FooterIcon } from './FooterIcon.svelte';
|
|
5
|
+
export { default as FooterLink } from './FooterLink.svelte';
|
|
6
|
+
export { default as FooterLinkGroup } from './FooterLinkGroup.svelte';
|
|
7
|
+
export { footer, footerBrand, footerCopyright, footerIcon, footerLinkGroup, footerLink } from './theme.js';
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import type { Classes } from "../../themes/themeUtils.js";
|
|
2
|
+
import { type VariantProps } from "tailwind-variants";
|
|
3
|
+
export declare const footer: import("tailwind-variants").TVReturnType<{
|
|
4
|
+
footerType: {
|
|
5
|
+
default: string;
|
|
6
|
+
sitemap: string;
|
|
7
|
+
socialmedia: string;
|
|
8
|
+
logo: string;
|
|
9
|
+
sticky: string;
|
|
10
|
+
};
|
|
11
|
+
}, undefined, "bg-white dark:bg-gray-800", {
|
|
12
|
+
footerType: {
|
|
13
|
+
default: string;
|
|
14
|
+
sitemap: string;
|
|
15
|
+
socialmedia: string;
|
|
16
|
+
logo: string;
|
|
17
|
+
sticky: string;
|
|
18
|
+
};
|
|
19
|
+
}, undefined, import("tailwind-variants").TVReturnType<{
|
|
20
|
+
footerType: {
|
|
21
|
+
default: string;
|
|
22
|
+
sitemap: string;
|
|
23
|
+
socialmedia: string;
|
|
24
|
+
logo: string;
|
|
25
|
+
sticky: string;
|
|
26
|
+
};
|
|
27
|
+
}, undefined, "bg-white dark:bg-gray-800", unknown, unknown, undefined>>;
|
|
28
|
+
export type FooterBrandVariants = VariantProps<typeof footerBrand> & Classes<typeof footerBrand>;
|
|
29
|
+
export declare const footerBrand: import("tailwind-variants").TVReturnType<{
|
|
30
|
+
[key: string]: {
|
|
31
|
+
[key: string]: import("tailwind-merge").ClassNameValue | {
|
|
32
|
+
base?: import("tailwind-merge").ClassNameValue;
|
|
33
|
+
img?: import("tailwind-merge").ClassNameValue;
|
|
34
|
+
span?: import("tailwind-merge").ClassNameValue;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
} | {
|
|
38
|
+
[x: string]: {
|
|
39
|
+
[x: string]: import("tailwind-merge").ClassNameValue | {
|
|
40
|
+
base?: import("tailwind-merge").ClassNameValue;
|
|
41
|
+
img?: import("tailwind-merge").ClassNameValue;
|
|
42
|
+
span?: import("tailwind-merge").ClassNameValue;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
} | {}, {
|
|
46
|
+
base: string;
|
|
47
|
+
span: string;
|
|
48
|
+
img: string;
|
|
49
|
+
}, undefined, {
|
|
50
|
+
[key: string]: {
|
|
51
|
+
[key: string]: import("tailwind-merge").ClassNameValue | {
|
|
52
|
+
base?: import("tailwind-merge").ClassNameValue;
|
|
53
|
+
img?: import("tailwind-merge").ClassNameValue;
|
|
54
|
+
span?: import("tailwind-merge").ClassNameValue;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
} | {}, {
|
|
58
|
+
base: string;
|
|
59
|
+
span: string;
|
|
60
|
+
img: string;
|
|
61
|
+
}, import("tailwind-variants").TVReturnType<unknown, {
|
|
62
|
+
base: string;
|
|
63
|
+
span: string;
|
|
64
|
+
img: string;
|
|
65
|
+
}, undefined, unknown, unknown, undefined>>;
|
|
66
|
+
export type FooterCopyrightVariants = VariantProps<typeof footerCopyright> & Classes<typeof footerCopyright>;
|
|
67
|
+
export declare const footerCopyright: import("tailwind-variants").TVReturnType<{
|
|
68
|
+
[key: string]: {
|
|
69
|
+
[key: string]: import("tailwind-merge").ClassNameValue | {
|
|
70
|
+
base?: import("tailwind-merge").ClassNameValue;
|
|
71
|
+
link?: import("tailwind-merge").ClassNameValue;
|
|
72
|
+
bySpan?: import("tailwind-merge").ClassNameValue;
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
} | {
|
|
76
|
+
[x: string]: {
|
|
77
|
+
[x: string]: import("tailwind-merge").ClassNameValue | {
|
|
78
|
+
base?: import("tailwind-merge").ClassNameValue;
|
|
79
|
+
link?: import("tailwind-merge").ClassNameValue;
|
|
80
|
+
bySpan?: import("tailwind-merge").ClassNameValue;
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
} | {}, {
|
|
84
|
+
base: string;
|
|
85
|
+
link: string;
|
|
86
|
+
bySpan: string;
|
|
87
|
+
}, undefined, {
|
|
88
|
+
[key: string]: {
|
|
89
|
+
[key: string]: import("tailwind-merge").ClassNameValue | {
|
|
90
|
+
base?: import("tailwind-merge").ClassNameValue;
|
|
91
|
+
link?: import("tailwind-merge").ClassNameValue;
|
|
92
|
+
bySpan?: import("tailwind-merge").ClassNameValue;
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
} | {}, {
|
|
96
|
+
base: string;
|
|
97
|
+
link: string;
|
|
98
|
+
bySpan: string;
|
|
99
|
+
}, import("tailwind-variants").TVReturnType<unknown, {
|
|
100
|
+
base: string;
|
|
101
|
+
link: string;
|
|
102
|
+
bySpan: string;
|
|
103
|
+
}, undefined, unknown, unknown, undefined>>;
|
|
104
|
+
export declare const footerIcon: import("tailwind-variants").TVReturnType<{} | {} | {}, undefined, "text-gray-500 hover:text-gray-900 dark:hover:text-white", {} | {}, undefined, import("tailwind-variants").TVReturnType<unknown, undefined, "text-gray-500 hover:text-gray-900 dark:hover:text-white", unknown, unknown, undefined>>;
|
|
105
|
+
export declare const footerLinkGroup: import("tailwind-variants").TVReturnType<{} | {} | {}, undefined, "text-gray-600 dark:text-gray-400", {} | {}, undefined, import("tailwind-variants").TVReturnType<unknown, undefined, "text-gray-600 dark:text-gray-400", unknown, unknown, undefined>>;
|
|
106
|
+
export type FooterLinkVariants = VariantProps<typeof footerLink> & Classes<typeof footerLink>;
|
|
107
|
+
export declare const footerLink: import("tailwind-variants").TVReturnType<{
|
|
108
|
+
[key: string]: {
|
|
109
|
+
[key: string]: import("tailwind-merge").ClassNameValue | {
|
|
110
|
+
base?: import("tailwind-merge").ClassNameValue;
|
|
111
|
+
link?: import("tailwind-merge").ClassNameValue;
|
|
112
|
+
};
|
|
113
|
+
};
|
|
114
|
+
} | {
|
|
115
|
+
[x: string]: {
|
|
116
|
+
[x: string]: import("tailwind-merge").ClassNameValue | {
|
|
117
|
+
base?: import("tailwind-merge").ClassNameValue;
|
|
118
|
+
link?: import("tailwind-merge").ClassNameValue;
|
|
119
|
+
};
|
|
120
|
+
};
|
|
121
|
+
} | {}, {
|
|
122
|
+
base: string;
|
|
123
|
+
link: string;
|
|
124
|
+
}, undefined, {
|
|
125
|
+
[key: string]: {
|
|
126
|
+
[key: string]: import("tailwind-merge").ClassNameValue | {
|
|
127
|
+
base?: import("tailwind-merge").ClassNameValue;
|
|
128
|
+
link?: import("tailwind-merge").ClassNameValue;
|
|
129
|
+
};
|
|
130
|
+
};
|
|
131
|
+
} | {}, {
|
|
132
|
+
base: string;
|
|
133
|
+
link: string;
|
|
134
|
+
}, import("tailwind-variants").TVReturnType<unknown, {
|
|
135
|
+
base: string;
|
|
136
|
+
link: string;
|
|
137
|
+
}, undefined, unknown, unknown, undefined>>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { tv } from "tailwind-variants";
|
|
2
|
+
export const footer = tv({
|
|
3
|
+
base: "bg-white dark:bg-gray-800",
|
|
4
|
+
variants: {
|
|
5
|
+
footerType: {
|
|
6
|
+
default: "p-4 rounded-lg shadow md:flex md:items-center md:justify-between md:p-6",
|
|
7
|
+
sitemap: "bg-white dark:bg-gray-900",
|
|
8
|
+
socialmedia: "p-4 sm:p-6",
|
|
9
|
+
logo: "p-4 rounded-lg shadow md:px-6 md:py-8",
|
|
10
|
+
sticky: "fixed bottom-0 left-0 z-20 w-full p-4 bg-white border-t border-gray-200 shadow md:flex md:items-center md:justify-between md:p-6 dark:bg-gray-800 dark:border-gray-600"
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
export const footerBrand = tv({
|
|
15
|
+
slots: {
|
|
16
|
+
base: "flex items-center",
|
|
17
|
+
span: "self-center text-2xl font-semibold whitespace-nowrap dark:text-white",
|
|
18
|
+
img: "me-3 h-8"
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
export const footerCopyright = tv({
|
|
22
|
+
slots: {
|
|
23
|
+
base: "block text-sm text-gray-500 sm:text-center dark:text-gray-400",
|
|
24
|
+
link: "hover:underline",
|
|
25
|
+
bySpan: "ms-1"
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
export const footerIcon = tv({
|
|
29
|
+
base: "text-gray-500 hover:text-gray-900 dark:hover:text-white"
|
|
30
|
+
});
|
|
31
|
+
export const footerLinkGroup = tv({
|
|
32
|
+
base: "text-gray-600 dark:text-gray-400"
|
|
33
|
+
});
|
|
34
|
+
export const footerLink = tv({
|
|
35
|
+
slots: {
|
|
36
|
+
base: "me-4 last:me-0 md:me-6",
|
|
37
|
+
link: "hover:underline"
|
|
38
|
+
}
|
|
39
|
+
});
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
<script lang="ts">
|
|
4
|
+
import { indicator } from './index.js';
|
|
5
|
+
import clsx from 'clsx';
|
|
6
|
+
|
|
7
|
+
import { getTheme } from '../../themes/themeUtils.js';
|
|
8
|
+
import type { IndicatorProps } from '../../index.js';
|
|
9
|
+
|
|
10
|
+
let {
|
|
11
|
+
children,
|
|
12
|
+
color = 'primary',
|
|
13
|
+
cornerStyle = 'circular',
|
|
14
|
+
size = 'md',
|
|
15
|
+
border = false,
|
|
16
|
+
placement,
|
|
17
|
+
offset = true,
|
|
18
|
+
class: className,
|
|
19
|
+
...restProps
|
|
20
|
+
}: IndicatorProps = $props();
|
|
21
|
+
const theme = getTheme('indicator');
|
|
22
|
+
|
|
23
|
+
let hasChildren = !!children;
|
|
24
|
+
const base = $derived(
|
|
25
|
+
indicator({
|
|
26
|
+
color,
|
|
27
|
+
size,
|
|
28
|
+
cornerStyle,
|
|
29
|
+
border,
|
|
30
|
+
placement,
|
|
31
|
+
offset,
|
|
32
|
+
hasChildren,
|
|
33
|
+
class: clsx(theme, className)
|
|
34
|
+
})
|
|
35
|
+
);
|
|
36
|
+
</script>
|
|
37
|
+
|
|
38
|
+
<div {...restProps} class={base}>
|
|
39
|
+
{#if children}
|
|
40
|
+
{@render children()}
|
|
41
|
+
{/if}
|
|
42
|
+
</div>
|