@kayord/ui 0.4.3 → 0.4.5
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/components/custom/data-table/DataTable.svelte +2 -2
- package/dist/components/ui/command/command-item.svelte +5 -1
- package/dist/components/ui/command/command-item.svelte.d.ts +15 -1
- package/dist/components/ui/input/input.svelte +1 -1
- package/dist/components/ui/menubar/menubar-sub-content.svelte +1 -1
- package/dist/components/ui/range-calendar/range-calendar-cell.svelte +1 -1
- package/dist/components/ui/select/select-trigger.svelte +1 -1
- package/dist/components/ui/textarea/textarea.svelte +1 -1
- package/package.json +1 -1
|
@@ -100,10 +100,10 @@ const getOriginalData = (id) => {
|
|
|
100
100
|
</Table.Row>
|
|
101
101
|
{/if}
|
|
102
102
|
{#each $pageRows as row (row.id)}
|
|
103
|
-
<Subscribe rowAttrs={row.attrs()} let:rowAttrs>
|
|
103
|
+
<Subscribe rowAttrs={row.attrs()} let:rowAttrs rowProps={row.props()} let:rowProps>
|
|
104
104
|
<Table.Row
|
|
105
105
|
{...rowAttrs}
|
|
106
|
-
data-state={
|
|
106
|
+
data-state={isSelectEnabled && rowProps.select.selected ? "selected" : "false"}
|
|
107
107
|
class={rowAction == undefined ? "" : "hover:cursor-pointer"}
|
|
108
108
|
on:click={() => (rowAction != undefined ? rowAction(getOriginalData(row.id)) : undefined)}
|
|
109
109
|
>
|
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
<script>import { Command as CommandPrimitive } from "cmdk-sv";
|
|
2
2
|
import { cn } from "../../../utils";
|
|
3
|
+
export let asChild = false;
|
|
3
4
|
let className = void 0;
|
|
4
5
|
export { className as class };
|
|
5
6
|
</script>
|
|
6
7
|
|
|
7
8
|
<CommandPrimitive.Item
|
|
9
|
+
{asChild}
|
|
8
10
|
class={cn(
|
|
9
11
|
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
10
12
|
className
|
|
11
13
|
)}
|
|
12
14
|
{...$$restProps}
|
|
15
|
+
let:action
|
|
16
|
+
let:attrs
|
|
13
17
|
>
|
|
14
|
-
<slot />
|
|
18
|
+
<slot {action} {attrs} />
|
|
15
19
|
</CommandPrimitive.Item>
|
|
@@ -6,7 +6,21 @@ declare const __propDef: {
|
|
|
6
6
|
[evt: string]: CustomEvent<any>;
|
|
7
7
|
};
|
|
8
8
|
slots: {
|
|
9
|
-
default: {
|
|
9
|
+
default: {
|
|
10
|
+
action: (node: HTMLElement) => {
|
|
11
|
+
destroy(): void;
|
|
12
|
+
};
|
|
13
|
+
attrs: {
|
|
14
|
+
'aria-disabled': boolean | undefined;
|
|
15
|
+
'aria-selected': boolean | undefined;
|
|
16
|
+
'data-disabled': boolean | undefined;
|
|
17
|
+
'data-selected': boolean | undefined;
|
|
18
|
+
'data-cmdk-item': string;
|
|
19
|
+
'data-value': string;
|
|
20
|
+
role: string;
|
|
21
|
+
id: string;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
10
24
|
};
|
|
11
25
|
};
|
|
12
26
|
export type CommandItemProps = typeof __propDef.props;
|
|
@@ -6,7 +6,7 @@ export { className as class };
|
|
|
6
6
|
|
|
7
7
|
<input
|
|
8
8
|
class={cn(
|
|
9
|
-
"flex h-10 w-full rounded-md border border-input bg-
|
|
9
|
+
"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
10
10
|
className
|
|
11
11
|
)}
|
|
12
12
|
bind:value
|
|
@@ -9,7 +9,7 @@ export { className as class };
|
|
|
9
9
|
<MenubarPrimitive.SubContent
|
|
10
10
|
{transition}
|
|
11
11
|
{transitionConfig}
|
|
12
|
-
class={cn("z-50 min-w-
|
|
12
|
+
class={cn("z-50 min-w-max rounded-md border bg-popover p-1 text-popover-foreground focus:outline-none", className)}
|
|
13
13
|
{...$$restProps}
|
|
14
14
|
on:focusout
|
|
15
15
|
on:pointermove
|
|
@@ -8,7 +8,7 @@ export { className as class };
|
|
|
8
8
|
<RangeCalendarPrimitive.Cell
|
|
9
9
|
{date}
|
|
10
10
|
class={cn(
|
|
11
|
-
"h-9 w-9 text-center text-sm p-0 relative [&:has([data-selected][data-selection-end])]:rounded-r-md [&:has([data-selected][data-outside-month])]:bg-accent/50 [&:has([data-selected])]:bg-accent first:[&:has([data-selected])]:rounded-l-md last:[&:has([data-selected])]:rounded-r-md focus-within:relative focus-within:z-20",
|
|
11
|
+
"h-9 w-9 text-center text-sm p-0 relative [&:has([data-selected][data-selection-start])]:rounded-l-md [&:has([data-selected][data-selection-end])]:rounded-r-md [&:has([data-selected][data-outside-month])]:bg-accent/50 [&:has([data-selected])]:bg-accent first:[&:has([data-selected])]:rounded-l-md last:[&:has([data-selected])]:rounded-r-md focus-within:relative focus-within:z-20",
|
|
12
12
|
className
|
|
13
13
|
)}
|
|
14
14
|
{...$$restProps}
|
|
@@ -7,7 +7,7 @@ export { className as class };
|
|
|
7
7
|
|
|
8
8
|
<SelectPrimitive.Trigger
|
|
9
9
|
class={cn(
|
|
10
|
-
"flex h-10 w-full items-center justify-between rounded-md border border-input bg-
|
|
10
|
+
"flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
|
|
11
11
|
className
|
|
12
12
|
)}
|
|
13
13
|
{...$$restProps}
|
|
@@ -6,7 +6,7 @@ export { className as class };
|
|
|
6
6
|
|
|
7
7
|
<textarea
|
|
8
8
|
class={cn(
|
|
9
|
-
"flex min-h-[80px] w-full rounded-md border border-input bg-
|
|
9
|
+
"flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
10
10
|
className
|
|
11
11
|
)}
|
|
12
12
|
bind:value
|