@widgetic/design-system 0.3.88 → 0.5.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 +122 -690
- package/dist/components/CopyableHeader.svelte +11 -13
- package/dist/components/EmptyState.svelte +4 -2
- package/dist/components/EmptyState.svelte.d.ts +2 -1
- package/dist/components/GenerateLoader.svelte +50 -0
- package/dist/components/GenerateLoader.svelte.d.ts +21 -0
- package/dist/components/PasswordInput.svelte +5 -1
- package/dist/components/WScrollArea.svelte +3 -3
- package/dist/components/debug-grid/DebugGrid.svelte +1 -1
- package/dist/components/ic/browser/BrowserInputController.svelte +1 -1
- package/dist/components/index.d.ts +2 -2
- package/dist/components/index.js +2 -2
- package/dist/components/modals/BaseModal.svelte +1 -1
- package/dist/components/modals/BaseModal.svelte.d.ts +1 -1
- package/dist/components/modals/NewItemDialog.svelte +1 -1
- package/dist/components/modals/Portal.svelte +14 -15
- package/dist/components/modals/RenameDialog.svelte +7 -6
- package/dist/components/navigation/Breadcrumbs.svelte +65 -39
- package/dist/components/pdf/PDFViewer.svelte +10 -19
- package/dist/components/pdf/PDFViewer.svelte.d.ts +4 -4
- package/dist/components/search-input/SearchInput.svelte +3 -8
- package/dist/components/search-input/index.d.ts +3 -14
- package/dist/components/search-input/index.js +1 -2
- package/dist/components/search-input/index2.d.ts +14 -0
- package/dist/components/shad-editor/README.md +18 -0
- package/dist/components/shad-editor/custom/image-extended-component.svelte +1 -1
- package/dist/components/shad-editor/editor.css +8 -4
- package/dist/components/shad-editor/icons/table.svelte +3 -3
- package/dist/components/shad-editor/icons/text.svelte +1 -1
- package/dist/components/shad-editor/onedark.css +3 -0
- package/dist/components/shad-editor/shad-editor.svelte +1 -1
- package/dist/components/toast/ToasterModal.svelte +15 -9
- package/dist/components/ui/alert/index.d.ts +2 -2
- package/dist/components/ui/badge/badge.svelte +1 -1
- package/dist/components/ui/badge/badge.svelte.d.ts +2 -2
- package/dist/components/ui/button/button.svelte +1 -1
- package/dist/components/ui/calendar/calendar-day.svelte +4 -4
- package/dist/components/ui/card/card.svelte +1 -1
- package/dist/components/ui/checkbox/checkbox.svelte +1 -1
- package/dist/components/ui/collapsible/index.d.ts +1 -12
- package/dist/components/ui/command/command-dialog.svelte +1 -1
- package/dist/components/ui/command/command-input.svelte +1 -1
- package/dist/components/ui/command/command-item.svelte +1 -1
- package/dist/components/ui/command/command-link-item.svelte +1 -1
- package/dist/components/ui/dialog/dialog-content.svelte +1 -1
- package/dist/components/ui/dropdown-menu/dropdown-menu-checkbox-item.svelte +1 -1
- package/dist/components/ui/dropdown-menu/dropdown-menu-content.svelte +1 -1
- package/dist/components/ui/dropdown-menu/dropdown-menu-item.svelte +1 -1
- package/dist/components/ui/dropdown-menu/dropdown-menu-radio-item.svelte +1 -1
- package/dist/components/ui/dropdown-menu/dropdown-menu-sub-content.svelte +1 -1
- package/dist/components/ui/dropdown-menu/dropdown-menu-sub-trigger.svelte +1 -1
- package/dist/components/ui/dropdown-menu/index.d.ts +6 -14
- package/dist/components/ui/hover-card/hover-card-content.svelte +1 -1
- package/dist/components/ui/input/input.svelte +1 -1
- package/dist/components/ui/input-otp/input-otp.svelte +1 -1
- package/dist/components/ui/popover/popover-content.svelte +1 -1
- package/dist/components/ui/radio-group/radio-group-item.svelte +1 -1
- package/dist/components/ui/range-calendar/range-calendar-day.svelte +6 -6
- package/dist/components/ui/select/index.d.ts +1 -1
- package/dist/components/ui/select/select-item.svelte +1 -1
- package/dist/components/ui/select/select-trigger.svelte +1 -1
- package/dist/components/ui/slider/slider.svelte +1 -1
- package/dist/components/ui/sonner/sonner.svelte +12 -2
- package/dist/components/ui/switch/switch.svelte +1 -1
- package/dist/components/ui/tabs/tabs-content.svelte +1 -1
- package/dist/components/ui/tabs/tabs-trigger.svelte +1 -1
- package/dist/components/ui/textarea/textarea.svelte +1 -1
- package/dist/components/ui/toggle/toggle.svelte +1 -1
- package/dist/components/ui/toggle/toggle.svelte.d.ts +2 -2
- package/dist/components/ui/tooltip/index.d.ts +4 -4
- package/dist/components/widget-system/Moveable.svelte +100 -23
- package/dist/components/widget-system/Moveable.svelte.d.ts +3 -1
- package/dist/icons/eye-off.svg +1 -0
- package/dist/icons/eye.svg +1 -0
- package/dist/shad-editor/index.d.ts +1 -0
- package/dist/shad-editor/index.js +1 -0
- package/dist/styles/fonts.css +59 -47
- package/dist/styles/global.css +119 -52
- package/package.json +158 -34
- package/tailwind.config.ts +13 -6
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
* - Uses Widgetic design system styling
|
|
11
11
|
-->
|
|
12
12
|
<script lang="ts">
|
|
13
|
-
import { X, IconSearch } from '@widgetic/design-system/icons';
|
|
14
|
-
|
|
13
|
+
// import { X, IconSearch } from '@widgetic/design-system/icons';
|
|
14
|
+
import { X, IconSearch } from '../../icons';
|
|
15
15
|
/**
|
|
16
16
|
* Placeholder text for the search input
|
|
17
17
|
*/
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
onKeydown(e);
|
|
80
80
|
}}
|
|
81
81
|
onpaste={onPaste}
|
|
82
|
-
class="w-full h-[38px] border-0 bg-transparent focus:outline-
|
|
82
|
+
class="w-full h-[38px] border-0 bg-transparent focus:outline-hidden focus:ring-0 focus-visible:ring-0 pl-9 pr-8 subtext
|
|
83
83
|
transition-all duration-300
|
|
84
84
|
{value ? 'text-[hsl(var(--grey7))]' : 'text-[hsl(var(--grey3))] placeholder:text-[hsl(var(--grey3))] placeholder:transition-colors placeholder:duration-300 group-hover:text-[hsl(var(--grey7))] group-hover:placeholder:text-[hsl(var(--grey7))] group-focus-within:text-[hsl(var(--grey7))] group-focus-within:placeholder:text-[hsl(var(--grey7)))'}
|
|
85
85
|
{inputClass}"
|
|
@@ -104,11 +104,6 @@
|
|
|
104
104
|
transition: color 300ms ease, background-color 300ms ease, border-color 300ms ease !important;
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
-
input::-moz-placeholder {
|
|
108
|
-
-moz-transition: color 300ms ease !important;
|
|
109
|
-
transition: color 300ms ease !important;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
107
|
input::placeholder {
|
|
113
108
|
transition: color 300ms ease !important;
|
|
114
109
|
}
|
|
@@ -1,14 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
placeholder?: string;
|
|
5
|
-
value?: string;
|
|
6
|
-
onInput?: (event: Event) => Promise<void> | void;
|
|
7
|
-
onKeydown?: (event: KeyboardEvent) => void;
|
|
8
|
-
onClear?: () => void;
|
|
9
|
-
onPaste?: (event: ClipboardEvent) => void;
|
|
10
|
-
containerClass?: string;
|
|
11
|
-
inputClass?: string;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export default class SearchInput extends SvelteComponent<SearchInputProps> {}
|
|
1
|
+
import SearchInput from './SearchInput.svelte';
|
|
2
|
+
export { SearchInput };
|
|
3
|
+
export default SearchInput;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { SvelteComponent } from 'svelte';
|
|
2
|
+
|
|
3
|
+
export interface SearchInputProps {
|
|
4
|
+
placeholder?: string;
|
|
5
|
+
value?: string;
|
|
6
|
+
onInput?: (event: Event) => Promise<void> | void;
|
|
7
|
+
onKeydown?: (event: KeyboardEvent) => void;
|
|
8
|
+
onClear?: () => void;
|
|
9
|
+
onPaste?: (event: ClipboardEvent) => void;
|
|
10
|
+
containerClass?: string;
|
|
11
|
+
inputClass?: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export default class SearchInput extends SvelteComponent<SearchInputProps> {}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# ShadEditor Component
|
|
2
|
+
|
|
3
|
+
This directory contains the Svelte components for a rich text editor based on Tiptap and styled with shadcn-svelte UI elements.
|
|
4
|
+
|
|
5
|
+
## Origin
|
|
6
|
+
|
|
7
|
+
The code was originally scaffolded using version `0.0.7` of the now-deprecated `shadeditor` CLI tool.
|
|
8
|
+
|
|
9
|
+
* Original (deprecated) npm package: [https://www.npmjs.com/package/shadeditor](https://www.npmjs.com/package/shadeditor)
|
|
10
|
+
* The author appears to have continued development under a new name/project called "Edra": [https://edra.tsuzat.com/](https://edra.tsuzat.com/)
|
|
11
|
+
|
|
12
|
+
## Current Status
|
|
13
|
+
|
|
14
|
+
The components in this directory have been adapted to work within the Widgetic Design System after its migration to **Tailwind CSS v4**.
|
|
15
|
+
|
|
16
|
+
**Important:** Do not attempt to update or reinstall this component using the original `shadeditor` CLI (`npx shadeditor init`) or the new one from edra, as it is designed for Tailwind v3 and will likely break the current Tailwind v4 configuration and component adaptations.
|
|
17
|
+
|
|
18
|
+
Use the component as it exists within this design system project.
|
|
@@ -136,7 +136,7 @@
|
|
|
136
136
|
<input
|
|
137
137
|
value={node.attrs.title}
|
|
138
138
|
type="text"
|
|
139
|
-
class="my-1 w-full bg-transparent text-center text-sm text-muted-foreground outline-
|
|
139
|
+
class="my-1 w-full bg-transparent text-center text-sm text-muted-foreground outline-hidden"
|
|
140
140
|
onchange={(e) => {
|
|
141
141
|
if (e.target === null) return;
|
|
142
142
|
//@ts-ignore
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
+
/* @config "../../../../tailwind.config.ts"; */
|
|
2
|
+
@reference "../../styles/global.css";
|
|
3
|
+
|
|
1
4
|
.tiptap :where(p):not(:where([class~='not-prose'], [class~='not-prose'] *)) {
|
|
2
5
|
margin-top: 0 !important;
|
|
3
6
|
margin-bottom: 0 !important;
|
|
4
7
|
}
|
|
5
8
|
|
|
6
9
|
.tiptap code:not(pre code) {
|
|
7
|
-
/* Remove the before and after pseudo elements */
|
|
8
|
-
@apply rounded border bg-muted/50 p-1 before:content-[''] after:content-[''];
|
|
10
|
+
/* Remove the before and after pseudo elements, replace rounded with rounded-sm */
|
|
11
|
+
@apply rounded-sm border bg-muted/50 p-1 before:content-[''] after:content-[''];
|
|
9
12
|
}
|
|
10
13
|
|
|
11
14
|
.tiptap blockquote p {
|
|
@@ -54,7 +57,7 @@ ul[data-type='taskList'] li[data-checked='true'] div {
|
|
|
54
57
|
}
|
|
55
58
|
|
|
56
59
|
input[type='checkbox'] {
|
|
57
|
-
@apply size-4 cursor-pointer rounded
|
|
60
|
+
@apply !size-4 !cursor-pointer !rounded-sm;
|
|
58
61
|
}
|
|
59
62
|
|
|
60
63
|
ul[data-type='taskList'] ul[data-type='taskList'] {
|
|
@@ -67,7 +70,8 @@ ul[data-type='taskList'] ul[data-type='taskList'] {
|
|
|
67
70
|
}
|
|
68
71
|
|
|
69
72
|
.color::before {
|
|
70
|
-
|
|
73
|
+
/* Replace rounded with rounded-md */
|
|
74
|
+
@apply mb-[0.15rem] mr-[0.1rem] inline-block size-[1rem] rounded-md border border-muted align-middle;
|
|
71
75
|
background-color: var(--color);
|
|
72
76
|
content: ' ';
|
|
73
77
|
}
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
</DropdownMenu.Item>
|
|
76
76
|
<DropdownMenu.Item
|
|
77
77
|
onclick={() => editor.chain().focus().deleteRow().run()}
|
|
78
|
-
class="text-destructive hover:text-foreground data-
|
|
78
|
+
class="text-destructive hover:text-foreground data-highlighted:bg-destructive"
|
|
79
79
|
>
|
|
80
80
|
<span>Delete Row</span>
|
|
81
81
|
</DropdownMenu.Item>
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
</DropdownMenu.Item>
|
|
95
95
|
<DropdownMenu.Item
|
|
96
96
|
onclick={() => editor.chain().focus().deleteColumn().run()}
|
|
97
|
-
class="text-destructive hover:text-foreground data-
|
|
97
|
+
class="text-destructive hover:text-foreground data-highlighted:bg-destructive"
|
|
98
98
|
>
|
|
99
99
|
<span>Delete</span>
|
|
100
100
|
</DropdownMenu.Item>
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
</DropdownMenu.Sub>
|
|
103
103
|
<DropdownMenu.Item
|
|
104
104
|
onclick={() => editor.chain().focus().deleteTable().run()}
|
|
105
|
-
class="text-destructive hover:text-foreground data-
|
|
105
|
+
class="text-destructive hover:text-foreground data-highlighted:bg-destructive"
|
|
106
106
|
>
|
|
107
107
|
<span>Delete</span>
|
|
108
108
|
</DropdownMenu.Item>
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
editorProps: {
|
|
68
68
|
attributes: {
|
|
69
69
|
class:
|
|
70
|
-
'm-auto p-2 focus:outline-
|
|
70
|
+
'm-auto p-2 focus:outline-hidden flex-1 prose text-foreground min-w-full max-h-full overflow-auto dark:prose-invert *:my-2'
|
|
71
71
|
}
|
|
72
72
|
},
|
|
73
73
|
extensions: [
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { toast, Toaster } from '../ui/sonner';
|
|
4
4
|
|
|
5
5
|
// Import Icons from Icons Folder
|
|
6
|
-
import
|
|
6
|
+
import Exclamation from '../../icons/Exclamation.svelte';
|
|
7
7
|
import Checked from '../../icons/Checked.svelte';
|
|
8
8
|
|
|
9
9
|
// Import Toast Types directly from the svelte-sonner module
|
|
@@ -50,27 +50,34 @@ export function showToast(type: string = 'success', title: string, options: any
|
|
|
50
50
|
const duration = options?.duration || defaultDuration;
|
|
51
51
|
|
|
52
52
|
// set close icon - not working !!!
|
|
53
|
-
options.closeIcon =
|
|
53
|
+
options.closeIcon = Exclamation;
|
|
54
54
|
|
|
55
55
|
// Get the title color from the options or use the default color
|
|
56
56
|
const titleColor = type === 'success' ? '--grey7' : type === 'error' ? '--error' : '--dark';
|
|
57
57
|
|
|
58
58
|
// set icon depending on the type of toast
|
|
59
|
-
if(type === 'error') options.icon =
|
|
59
|
+
if(type === 'error') options.icon = Exclamation;
|
|
60
60
|
if(type === 'success') options.icon = Checked;
|
|
61
61
|
|
|
62
62
|
// set icon background fill color
|
|
63
63
|
if(type === 'success') options.iconBgFillColor = '--icon-success';
|
|
64
|
-
if(type === 'error')
|
|
64
|
+
if(type === 'error') options.iconBgFillColor = '--icon-error';
|
|
65
65
|
if(type === 'warning') options.iconBgFillColor = '--sunny-yellow';
|
|
66
66
|
// console.log('showToast:', type, title, titleColor, duration);
|
|
67
67
|
|
|
68
68
|
// set style of the data-icon element
|
|
69
69
|
setTimeout(() => {
|
|
70
|
+
// set the close button color
|
|
70
71
|
let closeButtonElement = document.querySelector('.' + toastMainClass + '-close-button') as HTMLElement; //console.log('closeButtonElement:', closeButtonElement);
|
|
72
|
+
// if(closeButtonElement) closeButtonElement.style.backgroundColor = 'hsl(var(' + options.closeBgFillColor + '))';
|
|
71
73
|
|
|
74
|
+
// set icon background fill color
|
|
72
75
|
let iconElement = document.querySelector('.' + toastMainClass + '> [data-icon] > svg') as HTMLElement; //console.log('iconElement:', iconElement);
|
|
73
76
|
if(iconElement) iconElement.style.color = 'hsl(var(' + options.iconBgFillColor + '))';
|
|
77
|
+
|
|
78
|
+
// set the title color
|
|
79
|
+
let titleElement = document.querySelector('.' + toastMainClass + '-title') as HTMLElement; //console.log('titleElement:', titleElement);
|
|
80
|
+
if(titleElement) titleElement.style.color = 'hsl(var(' + titleColor + '))';
|
|
74
81
|
}, 20);
|
|
75
82
|
|
|
76
83
|
// Call toast with custom styling
|
|
@@ -78,9 +85,6 @@ export function showToast(type: string = 'success', title: string, options: any
|
|
|
78
85
|
...options,
|
|
79
86
|
duration,
|
|
80
87
|
unstyled: true,
|
|
81
|
-
classes: {
|
|
82
|
-
title: "text-[hsl(var(" + titleColor + "))]",
|
|
83
|
-
},
|
|
84
88
|
onAutoClose: () => {
|
|
85
89
|
isToastVisible = false;
|
|
86
90
|
},
|
|
@@ -106,7 +110,7 @@ export function showToast(type: string = 'success', title: string, options: any
|
|
|
106
110
|
"!fixed !top-auto !bottom-[20px] !right-[20px] " +
|
|
107
111
|
"!flex !items-center !gap-[24px] !p-[16px] !px-[24px] " +
|
|
108
112
|
// Icon Styling
|
|
109
|
-
"
|
|
113
|
+
"*:data-icon:!w-[24px] *:data-icon:!h-[24px] *:data-icon:!m-0 " +
|
|
110
114
|
"[&>[data-icon]>svg]:!w-full [&>[data-icon]>svg]:!h-full " +
|
|
111
115
|
// Content Styling
|
|
112
116
|
"[&>[data-content]>svg]:flex [&>[data-content]>svg]:flex-col [&>[data-content]>svg]:gap-[2px]",
|
|
@@ -119,7 +123,9 @@ export function showToast(type: string = 'success', title: string, options: any
|
|
|
119
123
|
// Cancel Button Styling
|
|
120
124
|
cancelButton: "",
|
|
121
125
|
// Close Button Styling
|
|
122
|
-
closeButton: toastMainClass + '-close-button w-[16px] h-[16px] absolute
|
|
126
|
+
closeButton: toastMainClass + '-close-button !w-[16px] !h-[16px] !absolute !top-[-4px] !left-[-4px] z-10 ' +
|
|
127
|
+
'!flex !items-center !justify-center ' +
|
|
128
|
+
'!bg-[hsl(var(--grey7))] !border !border-[hsl(var(--grey5))] !rounded-full !text-white'
|
|
123
129
|
}
|
|
124
130
|
}}
|
|
125
131
|
expand={false}
|
|
@@ -7,7 +7,7 @@ export declare const alertVariants: import("tailwind-variants").TVReturnType<{
|
|
|
7
7
|
default: string;
|
|
8
8
|
destructive: string;
|
|
9
9
|
};
|
|
10
|
-
}, undefined, "[&>svg]:text-foreground relative w-full rounded-lg border p-4 [&:has(svg)]:pl-11 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4", import("tailwind-variants/dist/config").TVConfig<{
|
|
10
|
+
}, undefined, "[&>svg]:text-foreground relative w-full rounded-lg border p-4 [&:has(svg)]:pl-11 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4", import("tailwind-variants/dist/config.js").TVConfig<{
|
|
11
11
|
variant: {
|
|
12
12
|
default: string;
|
|
13
13
|
destructive: string;
|
|
@@ -27,7 +27,7 @@ export declare const alertVariants: import("tailwind-variants").TVReturnType<{
|
|
|
27
27
|
default: string;
|
|
28
28
|
destructive: string;
|
|
29
29
|
};
|
|
30
|
-
}, undefined, "[&>svg]:text-foreground relative w-full rounded-lg border p-4 [&:has(svg)]:pl-11 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4", import("tailwind-variants/dist/config").TVConfig<{
|
|
30
|
+
}, undefined, "[&>svg]:text-foreground relative w-full rounded-lg border p-4 [&:has(svg)]:pl-11 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4", import("tailwind-variants/dist/config.js").TVConfig<{
|
|
31
31
|
variant: {
|
|
32
32
|
default: string;
|
|
33
33
|
destructive: string;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { type VariantProps, tv } from "tailwind-variants";
|
|
3
3
|
|
|
4
4
|
export const badgeVariants = tv({
|
|
5
|
-
base: "focus:ring-ring inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-
|
|
5
|
+
base: "focus:ring-ring inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-hidden focus:ring-2 focus:ring-offset-2",
|
|
6
6
|
variants: {
|
|
7
7
|
variant: {
|
|
8
8
|
default:
|
|
@@ -7,7 +7,7 @@ export declare const badgeVariants: import("tailwind-variants").TVReturnType<{
|
|
|
7
7
|
destructive: string;
|
|
8
8
|
outline: string;
|
|
9
9
|
};
|
|
10
|
-
}, undefined, "focus:ring-ring inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-
|
|
10
|
+
}, undefined, "focus:ring-ring inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-hidden focus:ring-2 focus:ring-offset-2", import("tailwind-variants/dist/config.js").TVConfig<{
|
|
11
11
|
variant: {
|
|
12
12
|
default: string;
|
|
13
13
|
secondary: string;
|
|
@@ -35,7 +35,7 @@ export declare const badgeVariants: import("tailwind-variants").TVReturnType<{
|
|
|
35
35
|
destructive: string;
|
|
36
36
|
outline: string;
|
|
37
37
|
};
|
|
38
|
-
}, undefined, "focus:ring-ring inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-
|
|
38
|
+
}, undefined, "focus:ring-ring inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-hidden focus:ring-2 focus:ring-offset-2", import("tailwind-variants/dist/config.js").TVConfig<{
|
|
39
39
|
variant: {
|
|
40
40
|
default: string;
|
|
41
41
|
secondary: string;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { type VariantProps, tv } from "tailwind-variants";
|
|
5
5
|
|
|
6
6
|
export const buttonVariants = tv({
|
|
7
|
-
base: "ring-offset-background focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-
|
|
7
|
+
base: "ring-offset-background focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
8
8
|
variants: {
|
|
9
9
|
variant: {
|
|
10
10
|
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
@@ -22,13 +22,13 @@
|
|
|
22
22
|
"size-9 p-0 font-normal",
|
|
23
23
|
"[&[data-today]:not([data-selected])]:bg-accent [&[data-today]:not([data-selected])]:text-accent-foreground",
|
|
24
24
|
// Selected
|
|
25
|
-
"data-
|
|
25
|
+
"data-selected:bg-primary data-selected:text-primary-foreground data-selected:hover:bg-primary data-selected:hover:text-primary-foreground data-selected:focus:bg-primary data-selected:focus:text-primary-foreground data-selected:opacity-100",
|
|
26
26
|
// Disabled
|
|
27
|
-
"data-
|
|
27
|
+
"data-disabled:text-muted-foreground data-disabled:opacity-50",
|
|
28
28
|
// Unavailable
|
|
29
|
-
"data-
|
|
29
|
+
"data-unavailable:text-destructive-foreground data-unavailable:line-through",
|
|
30
30
|
// Outside months
|
|
31
|
-
"data-
|
|
31
|
+
"data-outside-month:text-muted-foreground [&[data-outside-month][data-selected]]:bg-accent/50 [&[data-outside-month][data-selected]]:text-muted-foreground data-outside-month:pointer-events-none data-outside-month:opacity-50 [&[data-outside-month][data-selected]]:opacity-30",
|
|
32
32
|
className
|
|
33
33
|
)}
|
|
34
34
|
{...restProps}
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
<CheckboxPrimitive.Root
|
|
22
22
|
bind:ref
|
|
23
23
|
class={cn(
|
|
24
|
-
"border-primary ring-offset-background focus-visible:ring-ring data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground peer box-content size-4 shrink-0 rounded-sm border focus-visible:outline-
|
|
24
|
+
"border-primary ring-offset-background focus-visible:ring-ring data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground peer box-content size-4 shrink-0 rounded-sm border focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[disabled=true]:cursor-not-allowed data-[disabled=true]:opacity-50",
|
|
25
25
|
className
|
|
26
26
|
)}
|
|
27
27
|
bind:checked
|
|
@@ -1,16 +1,5 @@
|
|
|
1
1
|
import { Collapsible as CollapsiblePrimitive } from "bits-ui";
|
|
2
2
|
declare const Root: import("svelte").Component<CollapsiblePrimitive.RootProps, {}, "ref" | "open">;
|
|
3
3
|
declare const Trigger: import("svelte").Component<CollapsiblePrimitive.TriggerProps, {}, "ref">;
|
|
4
|
-
declare const Content: import("svelte").Component<
|
|
5
|
-
forceMount?: boolean;
|
|
6
|
-
}, "children" | "child"> & {
|
|
7
|
-
child?: import("svelte").Snippet<[import("bits-ui").CollapsibleContentSnippetProps & {
|
|
8
|
-
props: Record<string, unknown>;
|
|
9
|
-
}]> | undefined;
|
|
10
|
-
children?: import("svelte").Snippet;
|
|
11
|
-
style?: import("bits-ui").StyleProperties | string | null | undefined;
|
|
12
|
-
ref?: HTMLElement | null | undefined;
|
|
13
|
-
} & import("bits-ui").Without<import("bits-ui").BitsPrimitiveDivAttributes, import("bits-ui").CollapsibleContentPropsWithoutHTML> & {
|
|
14
|
-
forceMount?: boolean;
|
|
15
|
-
}, {}, "ref">;
|
|
4
|
+
declare const Content: import("svelte").Component<CollapsiblePrimitive.ContentProps, {}, "ref">;
|
|
16
5
|
export { Root, Content, Trigger, Root as Collapsible, Content as CollapsibleContent, Trigger as CollapsibleTrigger };
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
<Dialog.Root bind:open {...restProps}>
|
|
26
26
|
<Dialog.Content class="overflow-hidden p-0 shadow-lg" {portalProps}>
|
|
27
27
|
<Command
|
|
28
|
-
class="[&_[data-command-group]:not([hidden])_~[data-command-group]]:pt-0
|
|
28
|
+
class="[&_[data-command-group]:not([hidden])_~[data-command-group]]:pt-0 **:data-command-group:px-2 [&_[data-command-input-wrapper]_svg]:h-5 [&_[data-command-input-wrapper]_svg]:w-5 **:data-command-input:h-12 **:data-command-item:px-2 **:data-command-item:py-3 [&_[data-command-item]_svg]:h-5 [&_[data-command-item]_svg]:w-5"
|
|
29
29
|
{...restProps}
|
|
30
30
|
bind:value
|
|
31
31
|
bind:ref
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
<Search class="mr-2 size-4 shrink-0 opacity-50" />
|
|
21
21
|
<CommandPrimitive.Input
|
|
22
22
|
class={cn(
|
|
23
|
-
"placeholder:text-muted-foreground flex h-11 w-full rounded-md bg-transparent py-3 text-base outline-
|
|
23
|
+
"placeholder:text-muted-foreground flex h-11 w-full rounded-md bg-transparent py-3 text-base outline-hidden disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
24
24
|
className
|
|
25
25
|
)}
|
|
26
26
|
bind:ref
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
<CommandPrimitive.Item
|
|
18
18
|
class={cn(
|
|
19
|
-
"aria-selected:bg-accent aria-selected:text-accent-foreground relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-
|
|
19
|
+
"aria-selected:bg-accent aria-selected:text-accent-foreground relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
20
20
|
className
|
|
21
21
|
)}
|
|
22
22
|
bind:ref
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
<CommandPrimitive.LinkItem
|
|
18
18
|
class={cn(
|
|
19
|
-
"aria-selected:bg-accent aria-selected:text-accent-foreground relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-
|
|
19
|
+
"aria-selected:bg-accent aria-selected:text-accent-foreground relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-hidden data-disabled:pointer-events-none data-disabled:opacity-50",
|
|
20
20
|
className
|
|
21
21
|
)}
|
|
22
22
|
bind:ref
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
>
|
|
30
30
|
{@render children?.()}
|
|
31
31
|
<DialogPrimitive.Close
|
|
32
|
-
class="ring-offset-background focus:ring-ring absolute right-4 top-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:outline-
|
|
32
|
+
class="ring-offset-background focus:ring-ring absolute right-4 top-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-offset-2 disabled:pointer-events-none"
|
|
33
33
|
>
|
|
34
34
|
<X class="size-4" />
|
|
35
35
|
<span class="sr-only">Close</span>
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
bind:checked
|
|
23
23
|
bind:indeterminate
|
|
24
24
|
class={cn(
|
|
25
|
-
"data-
|
|
25
|
+
"data-highlighted:bg-accent data-highlighted:text-accent-foreground relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-hidden data-disabled:pointer-events-none data-disabled:opacity-50",
|
|
26
26
|
className
|
|
27
27
|
)}
|
|
28
28
|
{...restProps}
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
bind:ref
|
|
19
19
|
{sideOffset}
|
|
20
20
|
class={cn(
|
|
21
|
-
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] overflow-hidden rounded-md border p-1 shadow-md outline-
|
|
21
|
+
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] overflow-hidden rounded-md border p-1 shadow-md outline-hidden",
|
|
22
22
|
className
|
|
23
23
|
)}
|
|
24
24
|
{...restProps}
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
<DropdownMenuPrimitive.Item
|
|
16
16
|
bind:ref
|
|
17
17
|
class={cn(
|
|
18
|
-
"data-
|
|
18
|
+
"data-highlighted:bg-accent data-highlighted:text-accent-foreground relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden transition-colors data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
19
19
|
inset && "pl-8",
|
|
20
20
|
className
|
|
21
21
|
)}
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
<DropdownMenuPrimitive.RadioItem
|
|
20
20
|
bind:ref
|
|
21
21
|
class={cn(
|
|
22
|
-
"data-
|
|
22
|
+
"data-highlighted:bg-accent data-highlighted:text-accent-foreground relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-hidden data-disabled:pointer-events-none data-disabled:opacity-50",
|
|
23
23
|
className
|
|
24
24
|
)}
|
|
25
25
|
{...restProps}
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
<DropdownMenuPrimitive.SubContent
|
|
18
18
|
bind:ref
|
|
19
19
|
class={cn(
|
|
20
|
-
"bg-popover text-popover-foreground z-50 min-w-[8rem] rounded-md border p-1 shadow-lg focus:outline-
|
|
20
|
+
"bg-popover text-popover-foreground z-50 min-w-[8rem] rounded-md border p-1 shadow-lg focus:outline-hidden",
|
|
21
21
|
className
|
|
22
22
|
)}
|
|
23
23
|
{...restProps}
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
<DropdownMenuPrimitive.SubTrigger
|
|
18
18
|
bind:ref
|
|
19
19
|
class={cn(
|
|
20
|
-
"data-
|
|
20
|
+
"data-highlighted:bg-accent data-[state=open]:bg-accent flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
21
21
|
inset && "pl-8",
|
|
22
22
|
className
|
|
23
23
|
)}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Component } from "svelte";
|
|
2
2
|
import CheckboxItem from "./dropdown-menu-checkbox-item.svelte";
|
|
3
3
|
import Content from "./dropdown-menu-content.svelte";
|
|
4
4
|
import GroupHeading from "./dropdown-menu-group-heading.svelte";
|
|
@@ -9,17 +9,9 @@ import Separator from "./dropdown-menu-separator.svelte";
|
|
|
9
9
|
import Shortcut from "./dropdown-menu-shortcut.svelte";
|
|
10
10
|
import SubContent from "./dropdown-menu-sub-content.svelte";
|
|
11
11
|
import SubTrigger from "./dropdown-menu-sub-trigger.svelte";
|
|
12
|
-
declare const Sub:
|
|
13
|
-
declare const Root:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
} & {
|
|
18
|
-
children?: import("svelte").Snippet | undefined;
|
|
19
|
-
} & {
|
|
20
|
-
_internal_variant?: "context-menu" | "dropdown-menu" | "menubar";
|
|
21
|
-
}, {}, "open">;
|
|
22
|
-
declare const Trigger: import("svelte").Component<DropdownMenuPrimitive.TriggerProps, {}, "ref">;
|
|
23
|
-
declare const Group: import("svelte").Component<DropdownMenuPrimitive.GroupProps, {}, "ref">;
|
|
24
|
-
declare const RadioGroup: import("svelte").Component<DropdownMenuPrimitive.RadioGroupProps, {}, "ref" | "value">;
|
|
12
|
+
declare const Sub: Component<any>;
|
|
13
|
+
declare const Root: Component<any>;
|
|
14
|
+
declare const Trigger: Component<any>;
|
|
15
|
+
declare const Group: Component<any>;
|
|
16
|
+
declare const RadioGroup: Component<any>;
|
|
25
17
|
export { CheckboxItem, Content, Root, Group, GroupHeading, Item, Label, RadioGroup, RadioItem, Separator, Shortcut, Sub, SubContent, SubTrigger, Trigger, CheckboxItem as DropdownMenuCheckboxItem, Content as DropdownMenuContent, Root as DropdownMenu, Group as DropdownMenuGroup, GroupHeading as DropdownMenuGroupHeading, Item as DropdownMenuItem, Label as DropdownMenuLabel, RadioGroup as DropdownMenuRadioGroup, RadioItem as DropdownMenuRadioItem, Separator as DropdownMenuSeparator, Shortcut as DropdownMenuShortcut, Sub as DropdownMenuSub, SubContent as DropdownMenuSubContent, SubTrigger as DropdownMenuSubTrigger, Trigger as DropdownMenuTrigger };
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
{align}
|
|
21
21
|
{sideOffset}
|
|
22
22
|
class={cn(
|
|
23
|
-
"bg-popover text-popover-foreground z-50 mt-3 w-64 rounded-md border p-4 shadow-md outline-
|
|
23
|
+
"bg-popover text-popover-foreground z-50 mt-3 w-64 rounded-md border p-4 shadow-md outline-hidden",
|
|
24
24
|
className
|
|
25
25
|
)}
|
|
26
26
|
{...restProps}
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
<input
|
|
20
20
|
bind:this={ref}
|
|
21
21
|
class={cn(
|
|
22
|
-
"border-input bg-background ring-offset-background placeholder:text-muted-foreground focus-visible:ring-ring flex h-10 w-full rounded-md border px-3 py-2 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:outline-
|
|
22
|
+
"border-input bg-background ring-offset-background placeholder:text-muted-foreground focus-visible:ring-ring flex h-10 w-full rounded-md border px-3 py-2 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
23
23
|
className
|
|
24
24
|
)}
|
|
25
25
|
bind:value
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
bind:ref
|
|
21
21
|
bind:value
|
|
22
22
|
class={cn(
|
|
23
|
-
"flex items-center gap-2 has-
|
|
23
|
+
"flex items-center gap-2 has-disabled:opacity-50 disabled:[&_input]:cursor-not-allowed",
|
|
24
24
|
className
|
|
25
25
|
)}
|
|
26
26
|
{...restProps}
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
{sideOffset}
|
|
21
21
|
{align}
|
|
22
22
|
class={cn(
|
|
23
|
-
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 rounded-md border p-4 shadow-md outline-
|
|
23
|
+
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 rounded-md border p-4 shadow-md outline-hidden",
|
|
24
24
|
className
|
|
25
25
|
)}
|
|
26
26
|
{...restProps}
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
<RadioGroupPrimitive.Item
|
|
19
19
|
bind:ref
|
|
20
20
|
class={cn(
|
|
21
|
-
"border-primary text-primary ring-offset-background focus-visible:ring-ring aspect-square size-4 rounded-full border focus:outline-
|
|
21
|
+
"border-primary text-primary ring-offset-background focus-visible:ring-ring aspect-square size-4 rounded-full border focus:outline-hidden focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
22
22
|
className
|
|
23
23
|
)}
|
|
24
24
|
{...restProps}
|
|
@@ -21,18 +21,18 @@
|
|
|
21
21
|
bind:ref
|
|
22
22
|
class={cn(
|
|
23
23
|
buttonVariants({ variant: "ghost" }),
|
|
24
|
-
"size-9 p-0 font-normal data-
|
|
24
|
+
"size-9 p-0 font-normal data-selected:opacity-100",
|
|
25
25
|
"[&[data-today]:not([data-selected])]:bg-accent [&[data-today]:not([data-selected])]:text-accent-foreground",
|
|
26
26
|
// Selection Start
|
|
27
|
-
"data-
|
|
27
|
+
"data-selection-start:bg-primary data-selection-start:text-primary-foreground data-selection-start:hover:bg-primary data-selection-start:hover:text-primary-foreground data-selection-start:focus:bg-primary data-selection-start:focus:text-primary-foreground",
|
|
28
28
|
// Selection End
|
|
29
|
-
"data-
|
|
29
|
+
"data-selection-end:bg-primary data-selection-end:text-primary-foreground data-selection-end:hover:bg-primary data-selection-end:hover:text-primary-foreground data-selection-end:focus:bg-primary data-selection-end:focus:text-primary-foreground",
|
|
30
30
|
// Outside months
|
|
31
|
-
"data-
|
|
31
|
+
"data-outside-month:text-muted-foreground [&[data-outside-month][data-selected]]:bg-accent/50 [&[data-outside-month][data-selected]]:text-muted-foreground data-outside-month:pointer-events-none data-outside-month:opacity-50 [&[data-outside-month][data-selected]]:opacity-30",
|
|
32
32
|
// Disabled
|
|
33
|
-
"data-
|
|
33
|
+
"data-disabled:text-muted-foreground data-disabled:opacity-50",
|
|
34
34
|
// Unavailable
|
|
35
|
-
"data-
|
|
35
|
+
"data-unavailable:text-destructive-foreground data-unavailable:line-through",
|
|
36
36
|
className
|
|
37
37
|
)}
|
|
38
38
|
{...restProps}
|