@shwfed/nuxt 0.1.19 → 0.1.21
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/module.json +2 -2
- package/dist/module.mjs +6 -0
- package/dist/runtime/components/app.d.vue.ts +2 -2
- package/dist/runtime/components/app.vue +7 -3
- package/dist/runtime/components/app.vue.d.ts +2 -2
- package/dist/runtime/components/table.d.vue.ts +1 -1
- package/dist/runtime/components/table.vue +69 -30
- package/dist/runtime/components/table.vue.d.ts +1 -1
- package/dist/runtime/components/ui/button/Button.d.vue.ts +27 -0
- package/dist/runtime/components/ui/button/Button.vue +24 -0
- package/dist/runtime/components/ui/button/Button.vue.d.ts +27 -0
- package/dist/runtime/components/ui/button/index.d.ts +7 -0
- package/dist/runtime/components/ui/button/index.js +24 -0
- package/dist/runtime/components/ui/button-group/ButtonGroup.d.vue.ts +19 -0
- package/dist/runtime/components/ui/button-group/ButtonGroup.vue +19 -0
- package/dist/runtime/components/ui/button-group/ButtonGroup.vue.d.ts +19 -0
- package/dist/runtime/components/ui/button-group/ButtonGroupSeparator.d.vue.ts +10 -0
- package/dist/runtime/components/ui/button-group/ButtonGroupSeparator.vue +25 -0
- package/dist/runtime/components/ui/button-group/ButtonGroupSeparator.vue.d.ts +10 -0
- package/dist/runtime/components/ui/button-group/ButtonGroupText.d.vue.ts +22 -0
- package/dist/runtime/components/ui/button-group/ButtonGroupText.vue +23 -0
- package/dist/runtime/components/ui/button-group/ButtonGroupText.vue.d.ts +22 -0
- package/dist/runtime/components/ui/button-group/index.d.ts +8 -0
- package/dist/runtime/components/ui/button-group/index.js +18 -0
- package/dist/runtime/components/ui/separator/Separator.d.vue.ts +11 -0
- package/dist/runtime/components/ui/separator/Separator.vue +26 -0
- package/dist/runtime/components/ui/separator/Separator.vue.d.ts +11 -0
- package/dist/runtime/components/ui/separator/index.d.ts +1 -0
- package/dist/runtime/components/ui/separator/index.js +1 -0
- package/dist/runtime/components/ui/tooltip/Tooltip.d.vue.ts +20 -0
- package/dist/runtime/components/ui/tooltip/Tooltip.vue +24 -0
- package/dist/runtime/components/ui/tooltip/Tooltip.vue.d.ts +20 -0
- package/dist/runtime/components/{tooltip.d.vue.ts → ui/tooltip/TooltipContent.d.vue.ts} +11 -6
- package/dist/runtime/components/ui/tooltip/TooltipContent.vue +58 -0
- package/dist/runtime/components/{tooltip.vue.d.ts → ui/tooltip/TooltipContent.vue.d.ts} +11 -6
- package/dist/runtime/components/ui/tooltip/TooltipProvider.d.vue.ts +16 -0
- package/dist/runtime/components/ui/tooltip/TooltipProvider.vue +17 -0
- package/dist/runtime/components/ui/tooltip/TooltipProvider.vue.d.ts +16 -0
- package/dist/runtime/components/ui/tooltip/TooltipTrigger.d.vue.ts +14 -0
- package/dist/runtime/components/ui/tooltip/TooltipTrigger.vue +17 -0
- package/dist/runtime/components/ui/tooltip/TooltipTrigger.vue.d.ts +14 -0
- package/dist/runtime/components/ui/tooltip/index.d.ts +4 -0
- package/dist/runtime/components/ui/tooltip/index.js +4 -0
- package/dist/runtime/plugins/cel/env.d.ts +7 -0
- package/dist/runtime/plugins/cel/env.js +11 -0
- package/dist/runtime/plugins/cel/index.d.ts +12 -4
- package/dist/runtime/plugins/cel/index.js +4 -4
- package/dist/runtime/plugins/markdown/index.js +4 -1
- package/dist/runtime/plugins/markdown/md.js +2 -1
- package/dist/runtime/plugins/toast/index.d.ts +108 -0
- package/dist/runtime/plugins/toast/index.js +12 -0
- package/dist/runtime/table-renderers/builtins.js +18 -21
- package/dist/runtime/utils/cn.d.ts +2 -0
- package/dist/runtime/utils/cn.js +3 -0
- package/package.json +5 -5
- package/dist/runtime/components/tooltip.vue +0 -48
|
@@ -5,6 +5,7 @@ import { defineComponent } from "vue";
|
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
import { defineTableRenderer } from "./registry.js";
|
|
7
7
|
import { useNuxtApp } from "#app";
|
|
8
|
+
import { Button } from "../components/ui/button/index.js";
|
|
8
9
|
const JUSTIFY_CLASS = {
|
|
9
10
|
left: "justify-start",
|
|
10
11
|
center: "justify-center",
|
|
@@ -196,7 +197,7 @@ defineTableRenderer(
|
|
|
196
197
|
try {
|
|
197
198
|
let text = String(ctx.cell.getValue());
|
|
198
199
|
if (options.copyExpression) {
|
|
199
|
-
text = String($dsl.evaluate
|
|
200
|
+
text = String($dsl.evaluate`${options.copyExpression}`({
|
|
200
201
|
row: ctx.row.original,
|
|
201
202
|
index: BigInt(ctx.row.index)
|
|
202
203
|
}));
|
|
@@ -218,15 +219,10 @@ defineTableRenderer(
|
|
|
218
219
|
children: [
|
|
219
220
|
isEmpty ? "-" : String(rawValue),
|
|
220
221
|
options.copyable && !isEmpty ? /* @__PURE__ */ jsx(
|
|
221
|
-
|
|
222
|
+
Button,
|
|
222
223
|
{
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
"cursor-pointer absolute right-1 top-1/2 -translate-y-1/2 bg-white border",
|
|
226
|
-
"w-6 h-6 flex items-center justify-center group-hover:opacity-100 opacity-0",
|
|
227
|
-
"transition-all duration-180 rounded border-zinc-200 text-zinc-500",
|
|
228
|
-
"hover:border-[color-mix(in_srgb,var(--primary)_50%,white)] hover:text-[color-mix(in_srgb,var(--primary)_80%,#00000033)] hover:bg-[color-mix(in_srgb,var(--primary)_10%,white)]"
|
|
229
|
-
],
|
|
224
|
+
class: "p-1 w-6 h-6 flex items-center justify-center right-1 top-1/2 -translate-y-1/2 transform-3d group-hover:opacity-100 opacity-0 absolute transition-opacity duration-180",
|
|
225
|
+
size: "xs",
|
|
230
226
|
onClick: onCopy,
|
|
231
227
|
children: /* @__PURE__ */ jsx(Icon, { icon: "fluent:copy-20-regular" })
|
|
232
228
|
}
|
|
@@ -256,13 +252,13 @@ defineTableRenderer(
|
|
|
256
252
|
checked: ctx.row.getIsSelected(),
|
|
257
253
|
class: [
|
|
258
254
|
"peer h-4 w-4 disabled:opacity-50 transition-colors duration-180 appearance-none",
|
|
259
|
-
"border border-zinc-200 not-checked-enabled-group-hover:border-zinc-300 not-checked-enabled-group-hover:bg-zinc-100 checked:border-
|
|
255
|
+
"border border-zinc-200 not-checked-enabled-group-hover:border-zinc-300 not-checked-enabled-group-hover:bg-zinc-100 checked:border-(--primary)",
|
|
260
256
|
isSingle ? "rounded-full" : "rounded"
|
|
261
257
|
],
|
|
262
258
|
onInput: (e) => ctx.row.getToggleSelectedHandler()(e)
|
|
263
259
|
}
|
|
264
260
|
),
|
|
265
|
-
isSingle ? /* @__PURE__ */ jsx("div", { class: "absolute inset-1 bg-
|
|
261
|
+
isSingle ? /* @__PURE__ */ jsx("div", { class: "absolute inset-1 bg-(--primary) pointer-events-none rounded-full peer-checked:opacity-100 opacity-0 transition-opacity duration-180" }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
266
262
|
/* @__PURE__ */ jsx(
|
|
267
263
|
Icon,
|
|
268
264
|
{
|
|
@@ -270,7 +266,7 @@ defineTableRenderer(
|
|
|
270
266
|
class: "peer-checked:opacity-100 opacity-0 text-white text-xs absolute z-1 -translate-x-1/2 -translate-y-1/2 top-1/2 left-1/2"
|
|
271
267
|
}
|
|
272
268
|
),
|
|
273
|
-
/* @__PURE__ */ jsx("div", { class: "absolute inset-0 bg-
|
|
269
|
+
/* @__PURE__ */ jsx("div", { class: "absolute inset-0 bg-(--primary) rounded pointer-events-none peer-checked:opacity-100 opacity-0 transition-opacity duration-180" })
|
|
274
270
|
] })
|
|
275
271
|
] }) });
|
|
276
272
|
},
|
|
@@ -291,7 +287,7 @@ defineTableRenderer(
|
|
|
291
287
|
class: [
|
|
292
288
|
"peer h-4 w-4 cursor-pointer transition-colors duration-180 appearance-none rounded bg-white",
|
|
293
289
|
"border border-[color-mix(in_srgb,var(--primary)_10%,#00000033)] not-checked-group-hover:border-[color-mix(in_srgb,var(--primary)_20%,#00000033)]",
|
|
294
|
-
"not-checked-group-hover:bg-[color-mix(in_srgb,var(--primary)_5%,#00000011)] checked:border-
|
|
290
|
+
"not-checked-group-hover:bg-[color-mix(in_srgb,var(--primary)_5%,#00000011)] checked:border-(--primary) checked:bg-(--primary)"
|
|
295
291
|
],
|
|
296
292
|
ref: (el) => {
|
|
297
293
|
if (el instanceof HTMLInputElement)
|
|
@@ -317,21 +313,22 @@ defineTableRenderer(
|
|
|
317
313
|
if (!ctx.row.getCanExpand())
|
|
318
314
|
return null;
|
|
319
315
|
return /* @__PURE__ */ jsx("div", { class: "group w-full h-full flex items-center justify-center text-zinc-700", children: /* @__PURE__ */ jsx(
|
|
320
|
-
|
|
316
|
+
Button,
|
|
321
317
|
{
|
|
322
|
-
|
|
323
|
-
class: "cursor-pointer bg-transparent",
|
|
324
|
-
onClick:
|
|
318
|
+
variant: "ghost",
|
|
319
|
+
class: "cursor-pointer hover:bg-transparent text-lg",
|
|
320
|
+
onClick: ctx.row.getToggleExpandedHandler(),
|
|
325
321
|
children: /* @__PURE__ */ jsx(Icon, { icon: ctx.row.getIsExpanded() ? "fluent:subtract-square-20-regular" : "fluent:add-square-20-regular" })
|
|
326
322
|
}
|
|
327
323
|
) });
|
|
328
324
|
},
|
|
329
325
|
header: ({ ctx }) => /* @__PURE__ */ jsx("div", { class: "group w-full h-full flex items-center justify-center text-base text-zinc-700", children: /* @__PURE__ */ jsx(
|
|
330
|
-
|
|
326
|
+
Button,
|
|
331
327
|
{
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
328
|
+
variant: "ghost",
|
|
329
|
+
size: "xs",
|
|
330
|
+
class: "cursor-pointer hover:bg-transparent text-lg",
|
|
331
|
+
onClick: ctx.table.getToggleAllRowsExpandedHandler(),
|
|
335
332
|
children: /* @__PURE__ */ jsx(Icon, { icon: ctx.table.getIsAllRowsExpanded() ? "fluent:subtract-square-20-regular" : "fluent:add-square-20-regular" })
|
|
336
333
|
}
|
|
337
334
|
) }),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shwfed/nuxt",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.21",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -24,10 +24,6 @@
|
|
|
24
24
|
"files": [
|
|
25
25
|
"dist"
|
|
26
26
|
],
|
|
27
|
-
"workspaces": [
|
|
28
|
-
".",
|
|
29
|
-
"playground"
|
|
30
|
-
],
|
|
31
27
|
"scripts": {
|
|
32
28
|
"prepack": "nuxt-module-build build",
|
|
33
29
|
"dev": "npm run dev:prepare && nuxt dev playground",
|
|
@@ -48,12 +44,16 @@
|
|
|
48
44
|
"@tanstack/vue-table": "^8.21.3",
|
|
49
45
|
"@tanstack/vue-virtual": "^3.13.18",
|
|
50
46
|
"@vueuse/core": "^14.1.0",
|
|
47
|
+
"class-variance-authority": "^0.7.1",
|
|
48
|
+
"clsx": "^2.1.1",
|
|
51
49
|
"date-fns": "^4.1.0",
|
|
52
50
|
"defu": "^6.1.4",
|
|
53
51
|
"dot-prop": "^10.1.0",
|
|
54
52
|
"markdown-it": "^14.1.0",
|
|
55
53
|
"reka-ui": "^2.7.0",
|
|
54
|
+
"tailwind-merge": "^3.4.0",
|
|
56
55
|
"vue": "^3.5.27",
|
|
56
|
+
"vue-sonner": "^2.0.9",
|
|
57
57
|
"zod": "^4.3.6"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
import { useForwardPropsEmits } from "reka-ui";
|
|
3
|
-
import { Tooltip } from "reka-ui/namespaced";
|
|
4
|
-
const props = defineProps({
|
|
5
|
-
defaultOpen: { type: Boolean, required: false },
|
|
6
|
-
open: { type: Boolean, required: false },
|
|
7
|
-
delayDuration: { type: Number, required: false },
|
|
8
|
-
disableHoverableContent: { type: Boolean, required: false },
|
|
9
|
-
disableClosingTrigger: { type: Boolean, required: false },
|
|
10
|
-
disabled: { type: Boolean, required: false },
|
|
11
|
-
ignoreNonKeyboardFocus: { type: Boolean, required: false },
|
|
12
|
-
content: { type: String, required: false }
|
|
13
|
-
});
|
|
14
|
-
const emits = defineEmits(["update:open"]);
|
|
15
|
-
const forwarded = useForwardPropsEmits(props, emits);
|
|
16
|
-
</script>
|
|
17
|
-
|
|
18
|
-
<template>
|
|
19
|
-
<Tooltip.Root v-bind="forwarded">
|
|
20
|
-
<Tooltip.Trigger as-child>
|
|
21
|
-
<slot />
|
|
22
|
-
</Tooltip.Trigger>
|
|
23
|
-
<Tooltip.Content
|
|
24
|
-
side="top"
|
|
25
|
-
align="center"
|
|
26
|
-
:class="[
|
|
27
|
-
'bg-white text-zinc-700 animate-in fade-in-0 zoom-in-95',
|
|
28
|
-
'data-[state=closed]:animate-out data-[state=closed]:fade-out-0',
|
|
29
|
-
'data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2',
|
|
30
|
-
'data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2',
|
|
31
|
-
'data-[side=top]:slide-in-from-bottom-2',
|
|
32
|
-
'z-1024 w-fit rounded border border-zinc-200 px-6 py-2 text-xs',
|
|
33
|
-
'text-balance shadow-md'
|
|
34
|
-
]"
|
|
35
|
-
>
|
|
36
|
-
<span
|
|
37
|
-
v-if="content"
|
|
38
|
-
v-html="content"
|
|
39
|
-
/>
|
|
40
|
-
<Tooltip.Arrow
|
|
41
|
-
:class="[
|
|
42
|
-
'bg-white fill-white size-2.5 translate-y-[calc(-50%)] rotate-45 rounded-[2px]',
|
|
43
|
-
'border-b border-r border-zinc-200'
|
|
44
|
-
]"
|
|
45
|
-
/>
|
|
46
|
-
</Tooltip.Content>
|
|
47
|
-
</Tooltip.Root>
|
|
48
|
-
</template>
|