odj-svelte-ui 0.2.6 → 0.4.0
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 +2 -0
- package/dist/_legacy/accordion/Accordion.svelte.d.ts +1 -1
- package/dist/_legacy/alert/Alert.svelte.d.ts +2 -2
- package/dist/_legacy/badge/Badge.svelte.d.ts +1 -1
- package/dist/_legacy/banner/Banner.svelte.d.ts +1 -1
- package/dist/_legacy/bottom-navigation/BottomNavHeaderItem.svelte.d.ts +1 -1
- package/dist/_legacy/bottom-navigation/BottomNavItem.svelte.d.ts +1 -1
- package/dist/_legacy/buttons/Button.svelte.d.ts +2 -2
- package/dist/_legacy/buttons/GradientButton.svelte.d.ts +1 -1
- package/dist/_legacy/cards/Card.svelte.d.ts +2 -2
- package/dist/_legacy/carousel/ControlButton.svelte.d.ts +1 -1
- package/dist/_legacy/dropdown/Dropdown.svelte.d.ts +1 -1
- package/dist/_legacy/dropdown/DropdownItem.svelte.d.ts +1 -1
- package/dist/_legacy/forms/Checkbox.svelte.d.ts +1 -1
- package/dist/_legacy/forms/Dropzone.svelte.d.ts +1 -1
- package/dist/_legacy/forms/Fileupload.svelte.d.ts +1 -1
- package/dist/_legacy/forms/FloatingLabelInput.svelte.d.ts +1 -1
- package/dist/_legacy/forms/Input.svelte.d.ts +2 -2
- package/dist/_legacy/forms/Label.svelte.d.ts +1 -1
- package/dist/_legacy/forms/MultiSelect.svelte.d.ts +1 -1
- package/dist/_legacy/forms/NumberInput.svelte.d.ts +2 -2
- package/dist/_legacy/forms/Radio.svelte.d.ts +1 -1
- package/dist/_legacy/forms/Range.svelte.d.ts +1 -1
- package/dist/_legacy/forms/Search.svelte.d.ts +1 -1
- package/dist/_legacy/forms/Select.svelte.d.ts +1 -1
- package/dist/_legacy/forms/Textarea.svelte.d.ts +2 -2
- package/dist/_legacy/forms/Toggle.svelte.d.ts +1 -1
- package/dist/_legacy/indicators/Indicator.svelte.d.ts +1 -1
- package/dist/_legacy/list-group/Listgroup.svelte.d.ts +1 -1
- package/dist/_legacy/list-group/ListgroupItem.svelte.d.ts +1 -1
- package/dist/_legacy/mega-menu/MegaMenu.svelte.d.ts +1 -1
- package/dist/_legacy/modal/Modal.svelte.d.ts +1 -1
- package/dist/_legacy/navbar/Menu.svelte.d.ts +1 -1
- package/dist/_legacy/navbar/NavHamburger.svelte.d.ts +1 -1
- package/dist/_legacy/navbar/NavLi.svelte.d.ts +1 -1
- package/dist/_legacy/navbar/NavUl.svelte.d.ts +1 -1
- package/dist/_legacy/navbar/Navbar.svelte.d.ts +1 -1
- package/dist/_legacy/pagination/Pagination.svelte.d.ts +1 -1
- package/dist/_legacy/pagination/PaginationItem.svelte.d.ts +1 -1
- package/dist/_legacy/popover/Popover.svelte.d.ts +1 -1
- package/dist/_legacy/rating/Heart.svelte.d.ts +1 -1
- package/dist/_legacy/rating/Star.svelte.d.ts +1 -1
- package/dist/_legacy/rating/Thumbup.svelte.d.ts +1 -1
- package/dist/_legacy/sidebar/SidebarDropdownItem.svelte.d.ts +1 -1
- package/dist/_legacy/sidebar/SidebarItem.svelte.d.ts +1 -1
- package/dist/_legacy/speed-dial/SpeedDialButton.svelte.d.ts +1 -1
- package/dist/_legacy/table/TableBodyCell.svelte.d.ts +1 -1
- package/dist/_legacy/table/TableBodyRow.svelte.d.ts +2 -2
- package/dist/_legacy/table/TableHeadCell.svelte.d.ts +1 -1
- package/dist/_legacy/tabs/TabItem.svelte.d.ts +2 -2
- package/dist/_legacy/toast/Toast.svelte.d.ts +1 -1
- package/dist/_legacy/toolbar/Toolbar.svelte.d.ts +1 -1
- package/dist/_legacy/toolbar/ToolbarButton.svelte.d.ts +1 -1
- package/dist/_legacy/tooltip/Tooltip.svelte.d.ts +1 -1
- package/dist/_legacy/typography/A.svelte.d.ts +1 -1
- package/dist/_legacy/utils/CloseButton.svelte.d.ts +1 -1
- package/dist/_legacy/utils/Frame.svelte.d.ts +2 -2
- package/dist/_legacy/utils/Popper.svelte.d.ts +1 -1
- package/dist/_legacy/utils/createEventDispatcher.d.ts +1 -1
- package/dist/accordion/Accordion.svelte +3 -3
- package/dist/accordion/AccordionItem.svelte +22 -26
- package/dist/accordion/theme.d.ts +146 -90
- package/dist/accordion/theme.js +29 -37
- package/dist/accordion/type.d.ts +2 -2
- package/dist/alert/theme.d.ts +2 -2
- package/dist/avatar/theme.d.ts +4 -4
- package/dist/badge/theme.d.ts +2 -2
- package/dist/banner/theme.d.ts +2 -2
- package/dist/bottom-navigation/theme.d.ts +8 -8
- package/dist/breadcrumb/theme.d.ts +2 -2
- package/dist/buttongroup/theme.d.ts +2 -2
- package/dist/buttons/theme.d.ts +4 -4
- package/dist/cards/theme.d.ts +2 -2
- package/dist/darkmode/theme.d.ts +1 -1
- package/dist/device-mockups/theme.d.ts +14 -14
- package/dist/drawer/theme.d.ts +4 -4
- package/dist/dropdown/theme.d.ts +8 -8
- package/dist/footer/theme.d.ts +10 -10
- package/dist/forms/checkbox/theme.d.ts +2 -2
- package/dist/forms/dropzone/theme.d.ts +1 -1
- package/dist/forms/fileupload/theme.d.ts +2 -2
- package/dist/forms/floating-label-input/theme.d.ts +2 -2
- package/dist/forms/helper/theme.d.ts +2 -2
- package/dist/forms/helper/theme.js +2 -2
- package/dist/forms/input/theme.d.ts +2 -2
- package/dist/forms/input-addon/InputAddon.svelte +7 -7
- package/dist/forms/label/theme.d.ts +2 -2
- package/dist/forms/radio/Radio.svelte.d.ts +10 -3
- package/dist/forms/radio/theme.d.ts +2 -2
- package/dist/forms/radio-button/RadioButton.svelte.d.ts +10 -3
- package/dist/forms/radio-button/theme.d.ts +2 -2
- package/dist/forms/range/theme.d.ts +2 -2
- package/dist/forms/search/Search.svelte.d.ts +10 -3
- package/dist/forms/search/theme.d.ts +2 -2
- package/dist/forms/select/MultiSelect.svelte +31 -0
- package/dist/forms/select/MultiSelect.svelte.d.ts +26 -0
- package/dist/forms/select/Select.svelte +2 -2
- package/dist/forms/select/Select.svelte.d.ts +10 -3
- package/dist/forms/select/index.d.ts +3 -2
- package/dist/forms/select/index.js +3 -2
- package/dist/forms/select/theme.d.ts +71 -2
- package/dist/forms/select/theme.js +9 -0
- package/dist/forms/select/type.d.ts +8 -9
- package/dist/forms/textarea/theme.d.ts +2 -2
- package/dist/forms/toggle/theme.d.ts +2 -2
- package/dist/gallery/theme.d.ts +2 -2
- package/dist/indicator/theme.d.ts +2 -2
- package/dist/kbd/theme.d.ts +1 -1
- package/dist/list-group/theme.d.ts +4 -4
- package/dist/mega-menu/theme.d.ts +2 -2
- package/dist/modal/theme.d.ts +2 -2
- package/dist/nav/theme.d.ts +12 -12
- package/dist/pagination/theme.d.ts +4 -4
- package/dist/popover/theme.d.ts +2 -2
- package/dist/progress/ProgressRadial.svelte +155 -0
- package/dist/progress/ProgressRadial.svelte.d.ts +35 -0
- package/dist/progress/index.d.ts +4 -3
- package/dist/progress/index.js +3 -2
- package/dist/progress/theme.d.ts +713 -2
- package/dist/progress/theme.js +111 -1
- package/dist/progress/type.d.ts +23 -2
- package/dist/rating/theme.d.ts +8 -8
- package/dist/sidebar/theme.d.ts +10 -10
- package/dist/skeleton/theme.d.ts +16 -16
- package/dist/spinner/theme.d.ts +2 -2
- package/dist/table/theme.d.ts +8 -8
- package/dist/tabs/theme.d.ts +4 -4
- package/dist/timeline/theme.d.ts +11 -11
- package/dist/toast/theme.d.ts +2 -2
- package/dist/toolbar/theme.d.ts +6 -6
- package/dist/tooltip/theme.d.ts +2 -2
- package/dist/typography/anchor/theme.d.ts +2 -2
- package/dist/typography/blockquote/theme.d.ts +2 -2
- package/dist/typography/descriptionlist/theme.d.ts +2 -2
- package/dist/typography/heading/theme.d.ts +2 -2
- package/dist/typography/hr/theme.d.ts +2 -2
- package/dist/typography/img/theme.d.ts +2 -2
- package/dist/typography/layout/theme.d.ts +1 -1
- package/dist/typography/list/theme.d.ts +2 -2
- package/dist/typography/mark/theme.d.ts +1 -1
- package/dist/typography/paragraph/theme.d.ts +2 -2
- package/dist/typography/secondary/theme.d.ts +1 -1
- package/dist/typography/span/theme.d.ts +2 -2
- package/dist/utils/index.d.ts +2 -2
- package/package.json +642 -641
|
@@ -15,7 +15,7 @@ export declare const paginationItem: import("tailwind-variants").TVReturnType<{
|
|
|
15
15
|
true: string;
|
|
16
16
|
false: string;
|
|
17
17
|
};
|
|
18
|
-
}, undefined, "flex items-center font-medium w-full justify-center", import("tailwind-variants/dist/config").TVConfig<{
|
|
18
|
+
}, undefined, "flex items-center font-medium w-full justify-center", import("tailwind-variants/dist/config.js").TVConfig<{
|
|
19
19
|
size: {
|
|
20
20
|
default: string;
|
|
21
21
|
large: string;
|
|
@@ -83,7 +83,7 @@ export declare const paginationItem: import("tailwind-variants").TVReturnType<{
|
|
|
83
83
|
true: string;
|
|
84
84
|
false: string;
|
|
85
85
|
};
|
|
86
|
-
}, undefined, "flex items-center font-medium w-full justify-center", import("tailwind-variants/dist/config").TVConfig<{
|
|
86
|
+
}, undefined, "flex items-center font-medium w-full justify-center", import("tailwind-variants/dist/config.js").TVConfig<{
|
|
87
87
|
size: {
|
|
88
88
|
default: string;
|
|
89
89
|
large: string;
|
|
@@ -127,7 +127,7 @@ export declare const pagination: import("tailwind-variants").TVReturnType<{
|
|
|
127
127
|
default: string;
|
|
128
128
|
large: string;
|
|
129
129
|
};
|
|
130
|
-
}, undefined, "flex flex-row items-start -space-x-px rtl:space-x-reverse", import("tailwind-variants/dist/config").TVConfig<{
|
|
130
|
+
}, undefined, "flex flex-row items-start -space-x-px rtl:space-x-reverse", import("tailwind-variants/dist/config.js").TVConfig<{
|
|
131
131
|
table: {
|
|
132
132
|
true: string;
|
|
133
133
|
false: string;
|
|
@@ -163,7 +163,7 @@ export declare const pagination: import("tailwind-variants").TVReturnType<{
|
|
|
163
163
|
default: string;
|
|
164
164
|
large: string;
|
|
165
165
|
};
|
|
166
|
-
}, undefined, "flex flex-row items-start -space-x-px rtl:space-x-reverse", import("tailwind-variants/dist/config").TVConfig<{
|
|
166
|
+
}, undefined, "flex flex-row items-start -space-x-px rtl:space-x-reverse", import("tailwind-variants/dist/config.js").TVConfig<{
|
|
167
167
|
table: {
|
|
168
168
|
true: string;
|
|
169
169
|
false: string;
|
package/dist/popover/theme.d.ts
CHANGED
|
@@ -129,7 +129,7 @@ export declare const popover: import("tailwind-variants").TVReturnType<{
|
|
|
129
129
|
title: string;
|
|
130
130
|
h3: string;
|
|
131
131
|
arrowBase: string;
|
|
132
|
-
}, undefined, import("tailwind-variants/dist/config").TVConfig<{
|
|
132
|
+
}, undefined, import("tailwind-variants/dist/config.js").TVConfig<{
|
|
133
133
|
color: {
|
|
134
134
|
default: {
|
|
135
135
|
base: string;
|
|
@@ -643,7 +643,7 @@ export declare const popover: import("tailwind-variants").TVReturnType<{
|
|
|
643
643
|
title: string;
|
|
644
644
|
h3: string;
|
|
645
645
|
arrowBase: string;
|
|
646
|
-
}, undefined, import("tailwind-variants/dist/config").TVConfig<{
|
|
646
|
+
}, undefined, import("tailwind-variants/dist/config.js").TVConfig<{
|
|
647
647
|
color: {
|
|
648
648
|
default: {
|
|
649
649
|
base: string;
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cubicOut } from "svelte/easing";
|
|
3
|
+
import { Tween } from "svelte/motion";
|
|
4
|
+
import { twMerge } from "tailwind-merge";
|
|
5
|
+
import { progressRadial } from ".";
|
|
6
|
+
import type { ProgressRadialProps as Props } from ".";
|
|
7
|
+
|
|
8
|
+
let {
|
|
9
|
+
progress = 45,
|
|
10
|
+
radius = 42,
|
|
11
|
+
startingPosition = "top",
|
|
12
|
+
precision = 0,
|
|
13
|
+
tweenDuration = 400,
|
|
14
|
+
animate = false,
|
|
15
|
+
size = "h-24 w-24",
|
|
16
|
+
thickness = 4,
|
|
17
|
+
labelInside = false,
|
|
18
|
+
labelOutside = "",
|
|
19
|
+
easing = cubicOut,
|
|
20
|
+
color = "primary",
|
|
21
|
+
|
|
22
|
+
baseClass,
|
|
23
|
+
labelClass,
|
|
24
|
+
backgroundClass,
|
|
25
|
+
foregroundClass,
|
|
26
|
+
outsideClass,
|
|
27
|
+
spanClass,
|
|
28
|
+
progressClass,
|
|
29
|
+
|
|
30
|
+
class: className,
|
|
31
|
+
...restProps
|
|
32
|
+
}: Props = $props();
|
|
33
|
+
|
|
34
|
+
const _progress = new Tween(0, {
|
|
35
|
+
duration: animate ? tweenDuration : 0,
|
|
36
|
+
easing
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
const { base, label, background, foreground, outside, span, progressCls } = $derived(
|
|
40
|
+
progressRadial({
|
|
41
|
+
color,
|
|
42
|
+
labelInside
|
|
43
|
+
})
|
|
44
|
+
);
|
|
45
|
+
|
|
46
|
+
$effect(() => {
|
|
47
|
+
_progress.set(Number(progress));
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
const circumference = $derived(2 * Math.PI * radius);
|
|
51
|
+
|
|
52
|
+
const strokeDashoffset = $derived(circumference - (_progress.current / 100) * circumference);
|
|
53
|
+
|
|
54
|
+
const rotationAngle = $derived(startingPosition === "top" ? -90 : startingPosition === "right" ? 0 : startingPosition === "bottom" ? 90 : startingPosition === "left" ? 180 : -90);
|
|
55
|
+
|
|
56
|
+
const formattedProgress = $derived(_progress.current.toFixed(precision));
|
|
57
|
+
</script>
|
|
58
|
+
|
|
59
|
+
<div class="flex flex-col items-center">
|
|
60
|
+
{#if labelOutside}
|
|
61
|
+
<div
|
|
62
|
+
class={outside({
|
|
63
|
+
class: outsideClass
|
|
64
|
+
})}
|
|
65
|
+
>
|
|
66
|
+
<span
|
|
67
|
+
class={span({
|
|
68
|
+
class: spanClass
|
|
69
|
+
})}
|
|
70
|
+
>
|
|
71
|
+
{labelOutside}
|
|
72
|
+
</span>
|
|
73
|
+
|
|
74
|
+
<span
|
|
75
|
+
class={progressCls({
|
|
76
|
+
class: progressClass
|
|
77
|
+
})}
|
|
78
|
+
>
|
|
79
|
+
{formattedProgress}%
|
|
80
|
+
</span>
|
|
81
|
+
</div>
|
|
82
|
+
{/if}
|
|
83
|
+
|
|
84
|
+
<div {...restProps} class={twMerge(base({ class: baseClass }), size, className?.toString())}>
|
|
85
|
+
<svg viewBox="0 0 100 100" class="h-full w-full" style="transform: rotate({rotationAngle}deg)">
|
|
86
|
+
<circle
|
|
87
|
+
cx="50"
|
|
88
|
+
cy="50"
|
|
89
|
+
r={radius}
|
|
90
|
+
fill="none"
|
|
91
|
+
stroke-width={thickness}
|
|
92
|
+
class={background({
|
|
93
|
+
class: backgroundClass
|
|
94
|
+
})}
|
|
95
|
+
/>
|
|
96
|
+
|
|
97
|
+
<circle
|
|
98
|
+
cx="50"
|
|
99
|
+
cy="50"
|
|
100
|
+
r={radius}
|
|
101
|
+
fill="none"
|
|
102
|
+
stroke-width={thickness}
|
|
103
|
+
stroke-dasharray={circumference}
|
|
104
|
+
stroke-dashoffset={strokeDashoffset}
|
|
105
|
+
stroke-linecap="round"
|
|
106
|
+
class={foreground({
|
|
107
|
+
class: foregroundClass
|
|
108
|
+
})}
|
|
109
|
+
/>
|
|
110
|
+
</svg>
|
|
111
|
+
|
|
112
|
+
{#if labelInside}
|
|
113
|
+
<div
|
|
114
|
+
class={label({
|
|
115
|
+
class: labelClass
|
|
116
|
+
})}
|
|
117
|
+
>
|
|
118
|
+
{formattedProgress}%
|
|
119
|
+
</div>
|
|
120
|
+
{/if}
|
|
121
|
+
</div>
|
|
122
|
+
</div>
|
|
123
|
+
|
|
124
|
+
<!--
|
|
125
|
+
@component
|
|
126
|
+
[Go to docs](https://svelte-5-ui-lib.codewithshin.com/)
|
|
127
|
+
## Type
|
|
128
|
+
ProgressRadialProps
|
|
129
|
+
|
|
130
|
+
## Props
|
|
131
|
+
@prop progress = 45
|
|
132
|
+
@prop radius = 42
|
|
133
|
+
@prop startingPosition = "top"
|
|
134
|
+
@prop precision = 0
|
|
135
|
+
@prop tweenDuration = 400
|
|
136
|
+
@prop animate = false
|
|
137
|
+
@prop size = "h-24 w-24"
|
|
138
|
+
@prop thickness = 4
|
|
139
|
+
@prop labelInside = false
|
|
140
|
+
@prop labelOutside = ""
|
|
141
|
+
@prop easing = cubicOut
|
|
142
|
+
@prop color = "primary"
|
|
143
|
+
|
|
144
|
+
## Class overrides
|
|
145
|
+
@prop baseClass
|
|
146
|
+
@prop labelClass
|
|
147
|
+
@prop backgroundClass
|
|
148
|
+
@prop foregroundClass
|
|
149
|
+
@prop outsideClass
|
|
150
|
+
@prop spanClass
|
|
151
|
+
@prop progressClass
|
|
152
|
+
|
|
153
|
+
@prop class: className
|
|
154
|
+
@prop ...restProps
|
|
155
|
+
-->
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { ProgressRadialProps as Props } from ".";
|
|
2
|
+
/**
|
|
3
|
+
* [Go to docs](https://svelte-5-ui-lib.codewithshin.com/)
|
|
4
|
+
* ## Type
|
|
5
|
+
* ProgressRadialProps
|
|
6
|
+
*
|
|
7
|
+
* ## Props
|
|
8
|
+
* @prop progress = 45
|
|
9
|
+
* @prop radius = 42
|
|
10
|
+
* @prop startingPosition = "top"
|
|
11
|
+
* @prop precision = 0
|
|
12
|
+
* @prop tweenDuration = 400
|
|
13
|
+
* @prop animate = false
|
|
14
|
+
* @prop size = "h-24 w-24"
|
|
15
|
+
* @prop thickness = 4
|
|
16
|
+
* @prop labelInside = false
|
|
17
|
+
* @prop labelOutside = ""
|
|
18
|
+
* @prop easing = cubicOut
|
|
19
|
+
* @prop color = "primary"
|
|
20
|
+
*
|
|
21
|
+
* ## Class overrides
|
|
22
|
+
* @prop baseClass
|
|
23
|
+
* @prop labelClass
|
|
24
|
+
* @prop backgroundClass
|
|
25
|
+
* @prop foregroundClass
|
|
26
|
+
* @prop outsideClass
|
|
27
|
+
* @prop spanClass
|
|
28
|
+
* @prop progressClass
|
|
29
|
+
*
|
|
30
|
+
* @prop class: className
|
|
31
|
+
* @prop ...restProps
|
|
32
|
+
*/
|
|
33
|
+
declare const ProgressRadial: import("svelte").Component<Props, {}, "">;
|
|
34
|
+
type ProgressRadial = ReturnType<typeof ProgressRadial>;
|
|
35
|
+
export default ProgressRadial;
|
package/dist/progress/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { ProgressbarProps } from "./type";
|
|
1
|
+
import type { ProgressbarProps, ProgressRadialProps } from "./type";
|
|
2
2
|
import Progressbar from "./Progressbar.svelte";
|
|
3
|
-
import
|
|
4
|
-
|
|
3
|
+
import ProgressRadial from "./ProgressRadial.svelte";
|
|
4
|
+
import { progressbar, progressRadial } from "./theme";
|
|
5
|
+
export { Progressbar, progressbar, ProgressRadial, progressRadial, type ProgressRadialProps, type ProgressbarProps };
|
package/dist/progress/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import Progressbar from "./Progressbar.svelte";
|
|
2
|
-
import
|
|
3
|
-
|
|
2
|
+
import ProgressRadial from "./ProgressRadial.svelte";
|
|
3
|
+
import { progressbar, progressRadial } from "./theme";
|
|
4
|
+
export { Progressbar, progressbar, ProgressRadial, progressRadial };
|