@leavepulse/ui 0.22.22 → 0.24.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.
Files changed (56) hide show
  1. package/dist/chunks/{LpAddressInput-peTpNSJK.js → LpAddressInput-BTqnUXZG.js} +1 -1
  2. package/dist/chunks/{LpAvatar-B1Ez0ZAx.js → LpAvatar-CzCE5cXg.js} +30 -8
  3. package/dist/chunks/LpBreadcrumbs-5uvViCXi.js +60 -0
  4. package/dist/chunks/{LpConfirmDialog-DOU_zaTI.js → LpConfirmDialog-CObRah9c.js} +10 -5
  5. package/dist/chunks/LpEmptyState-BV3q7Qyi.js +49 -0
  6. package/dist/chunks/{LpFileTree-Cw50eG_y.js → LpFileTree-nU1wRRxZ.js} +2 -2
  7. package/dist/chunks/{LpFileTreeNode-DFg4PhOK.js → LpFileTreeNode-D7WgUPcJ.js} +23 -21
  8. package/dist/chunks/{LpInput-BfLIWV-P.js → LpInput-jwqXlAy0.js} +5 -2
  9. package/dist/chunks/LpLink-Bu01SZzB.js +51 -0
  10. package/dist/chunks/{LpNotificationBell-a08cl0yY.js → LpNotificationBell-X1M30e0X.js} +1 -1
  11. package/dist/chunks/{LpPasswordInput-BfjDrvZq.js → LpPasswordInput-Bmo6q9Kd.js} +11 -3
  12. package/dist/chunks/{LpStepper-5dFTrW21.js → LpStepper-Wtl-6nUh.js} +27 -10
  13. package/dist/chunks/{LpTextarea-BDl7PR9U.js → LpTextarea-1ENb3ZAO.js} +6 -3
  14. package/dist/chunks/{LpThemeSwitcher-B_kj0T2b.js → LpThemeSwitcher-BgpJgrnP.js} +27 -0
  15. package/dist/components/LpAddressInput.vue.js +1 -1
  16. package/dist/components/LpAvatar.vue.d.ts +17 -3
  17. package/dist/components/LpAvatar.vue.js +1 -1
  18. package/dist/components/LpBreadcrumbs.vue.d.ts +13 -1
  19. package/dist/components/LpBreadcrumbs.vue.js +1 -1
  20. package/dist/components/LpConfirmDialog.vue.d.ts +8 -0
  21. package/dist/components/LpConfirmDialog.vue.js +1 -1
  22. package/dist/components/LpEmptyState.vue.d.ts +5 -0
  23. package/dist/components/LpEmptyState.vue.js +1 -1
  24. package/dist/components/LpFileTree.vue.js +1 -1
  25. package/dist/components/LpFileTreeNode.vue.js +1 -1
  26. package/dist/components/LpInput.vue.d.ts +12 -0
  27. package/dist/components/LpInput.vue.js +1 -1
  28. package/dist/components/LpLink.vue.d.ts +24 -4
  29. package/dist/components/LpLink.vue.js +1 -1
  30. package/dist/components/LpNotificationBell.vue.js +1 -1
  31. package/dist/components/LpPasswordInput.vue.d.ts +8 -0
  32. package/dist/components/LpPasswordInput.vue.js +1 -1
  33. package/dist/components/LpStepper.vue.d.ts +15 -1
  34. package/dist/components/LpStepper.vue.js +1 -1
  35. package/dist/components/LpTextarea.vue.d.ts +5 -0
  36. package/dist/components/LpTextarea.vue.js +1 -1
  37. package/dist/components/LpThemeSwitcher.vue.js +1 -1
  38. package/dist/index.js +14 -14
  39. package/dist/theme/tokens.d.ts +3 -0
  40. package/package.json +1 -1
  41. package/src/components/LpAvatar.vue +33 -5
  42. package/src/components/LpBreadcrumbs.vue +30 -7
  43. package/src/components/LpConfirmDialog.vue +21 -6
  44. package/src/components/LpEmptyState.vue +18 -5
  45. package/src/components/LpFileTreeNode.vue +11 -2
  46. package/src/components/LpInput.vue +8 -0
  47. package/src/components/LpLink.vue +48 -10
  48. package/src/components/LpPasswordInput.vue +16 -1
  49. package/src/components/LpStepper.vue +49 -9
  50. package/src/components/LpTextarea.vue +7 -0
  51. package/src/theme/presets.ts +24 -0
  52. package/src/theme/tokens.ts +6 -0
  53. package/src/tokens/tokens.css +3 -0
  54. package/dist/chunks/LpBreadcrumbs-B7Aqatzw.js +0 -42
  55. package/dist/chunks/LpEmptyState-CrfyRJUG.js +0 -47
  56. package/dist/chunks/LpLink-DHwOEp4e.js +0 -36
@@ -5,7 +5,7 @@ import { _ as _sfc_main$2 } from "./LpAutocomplete-DExlIZe_.js";
5
5
  import { _ as _sfc_main$3 } from "./LpButton-5VXXCjwF.js";
6
6
  import { _ as _sfc_main$1 } from "./LpFormField-CesaPWPO.js";
7
7
  import { _ as _sfc_main$4 } from "./LpIcon-CCnX5_2j.js";
8
- import { _ as _sfc_main$5 } from "./LpInput-BfLIWV-P.js";
8
+ import { _ as _sfc_main$5 } from "./LpInput-jwqXlAy0.js";
9
9
  import { _ as _sfc_main$7 } from "./LpModal-D_o-56To.js";
10
10
  import { _ as _sfc_main$6 } from "./LpSelect-Cw8-gL5F.js";
11
11
  const _hoisted_1 = { class: "flex flex-col gap-3" };
@@ -11,21 +11,41 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
11
11
  alt: {},
12
12
  fallback: {},
13
13
  size: { default: "md" },
14
+ pixelSize: {},
15
+ shape: { default: "circle" },
16
+ ring: { type: Boolean, default: false },
14
17
  menuItems: {}
15
18
  },
16
19
  setup(__props) {
17
20
  const avatar = tv({
18
- base: "inline-flex shrink-0 select-none items-center justify-center overflow-hidden rounded-pill bg-surface-soft font-medium text-muted-strong",
21
+ base: "inline-flex shrink-0 select-none items-center justify-center overflow-hidden bg-surface-soft font-medium text-muted-strong",
19
22
  variants: {
20
23
  size: {
24
+ xs: "size-5 text-[10px]",
21
25
  sm: "size-7 text-xs",
22
26
  md: "size-9 text-sm",
23
- lg: "size-12 text-base"
24
- }
27
+ lg: "size-12 text-base",
28
+ xl: "size-16 text-lg"
29
+ },
30
+ // People read as circles; things (servers, projects, orgs) read as
31
+ // rounded squares — the same distinction platform icons make.
32
+ shape: {
33
+ circle: "rounded-pill",
34
+ soft: "rounded-card",
35
+ square: "rounded-control"
36
+ },
37
+ ring: { true: "ring-2 ring-line", false: "" }
25
38
  },
26
- defaultVariants: { size: "md" }
39
+ defaultVariants: { size: "md", shape: "circle", ring: false }
27
40
  });
28
41
  const props = __props;
42
+ const sizeStyle = computed(
43
+ () => props.pixelSize ? {
44
+ width: `${props.pixelSize}px`,
45
+ height: `${props.pixelSize}px`,
46
+ fontSize: `${Math.max(10, Math.round(props.pixelSize * 0.4))}px`
47
+ } : void 0
48
+ );
29
49
  const initials = computed(
30
50
  () => props.fallback ?? props.alt?.slice(0, 2).toUpperCase() ?? "?"
31
51
  );
@@ -40,7 +60,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
40
60
  }, {
41
61
  default: withCtx(() => [
42
62
  createVNode(unref(AvatarRoot), mergeProps({
43
- class: unref(avatar)({ size: __props.size })
63
+ class: unref(avatar)({ size: __props.pixelSize ? void 0 : __props.size, shape: __props.shape, ring: __props.ring }),
64
+ style: sizeStyle.value
44
65
  }, _ctx.$attrs), {
45
66
  default: withCtx(() => [
46
67
  __props.src && mounted.value ? (openBlock(), createBlock(unref(AvatarImage), {
@@ -57,12 +78,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
57
78
  })
58
79
  ]),
59
80
  _: 1
60
- }, 16, ["class"])
81
+ }, 16, ["class", "style"])
61
82
  ]),
62
83
  _: 1
63
84
  }, 8, ["items"])) : (openBlock(), createBlock(unref(AvatarRoot), mergeProps({
64
85
  key: 1,
65
- class: unref(avatar)({ size: __props.size })
86
+ class: unref(avatar)({ size: __props.pixelSize ? void 0 : __props.size, shape: __props.shape, ring: __props.ring }),
87
+ style: sizeStyle.value
66
88
  }, _ctx.$attrs), {
67
89
  default: withCtx(() => [
68
90
  __props.src ? (openBlock(), createBlock(unref(AvatarImage), {
@@ -79,7 +101,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
79
101
  })
80
102
  ]),
81
103
  _: 1
82
- }, 16, ["class"]));
104
+ }, 16, ["class", "style"]));
83
105
  };
84
106
  }
85
107
  });
@@ -0,0 +1,60 @@
1
+ import { defineComponent, openBlock, createElementBlock, Fragment, renderList, createBlock, createCommentVNode, resolveDynamicComponent, withCtx, createTextVNode, toDisplayString, normalizeClass } from "vue";
2
+ import { _ as _sfc_main$1 } from "./LpIcon-CCnX5_2j.js";
3
+ const _hoisted_1 = {
4
+ class: "flex items-center gap-1.5 text-sm",
5
+ "aria-label": "Breadcrumb"
6
+ };
7
+ const _sfc_main = /* @__PURE__ */ defineComponent({
8
+ __name: "LpBreadcrumbs",
9
+ props: {
10
+ items: {},
11
+ as: { default: "a" }
12
+ },
13
+ emits: ["navigate"],
14
+ setup(__props) {
15
+ return (_ctx, _cache) => {
16
+ return openBlock(), createElementBlock("nav", _hoisted_1, [
17
+ (openBlock(true), createElementBlock(Fragment, null, renderList(__props.items, (item, i) => {
18
+ return openBlock(), createElementBlock(Fragment, { key: i }, [
19
+ i > 0 ? (openBlock(), createBlock(_sfc_main$1, {
20
+ key: 0,
21
+ name: "lucide:chevron-right",
22
+ size: 14,
23
+ class: "text-muted"
24
+ })) : createCommentVNode("", true),
25
+ (item.href || item.to) && i < __props.items.length - 1 ? (openBlock(), createBlock(resolveDynamicComponent(__props.as), {
26
+ key: 1,
27
+ href: __props.as === "a" ? item.href : void 0,
28
+ to: __props.as === "a" ? void 0 : item.to,
29
+ class: "inline-flex items-center gap-1.5 rounded-xs text-muted outline-none transition-colors duration-[var(--duration-fast)] hover:text-ink focus-visible:ring-2 focus-visible:ring-ring",
30
+ onClick: ($event) => _ctx.$emit("navigate", item, i)
31
+ }, {
32
+ default: withCtx(() => [
33
+ item.icon ? (openBlock(), createBlock(_sfc_main$1, {
34
+ key: 0,
35
+ name: item.icon,
36
+ size: 14
37
+ }, null, 8, ["name"])) : createCommentVNode("", true),
38
+ createTextVNode(" " + toDisplayString(item.label), 1)
39
+ ]),
40
+ _: 2
41
+ }, 1032, ["href", "to", "onClick"])) : (openBlock(), createElementBlock("span", {
42
+ key: 2,
43
+ class: normalizeClass(["inline-flex items-center gap-1.5", i === __props.items.length - 1 ? "text-ink" : "text-muted"])
44
+ }, [
45
+ item.icon ? (openBlock(), createBlock(_sfc_main$1, {
46
+ key: 0,
47
+ name: item.icon,
48
+ size: 14
49
+ }, null, 8, ["name"])) : createCommentVNode("", true),
50
+ createTextVNode(" " + toDisplayString(item.label), 1)
51
+ ], 2))
52
+ ], 64);
53
+ }), 128))
54
+ ]);
55
+ };
56
+ }
57
+ });
58
+ export {
59
+ _sfc_main as _
60
+ };
@@ -9,14 +9,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
9
9
  description: {},
10
10
  confirmLabel: { default: "Confirm" },
11
11
  cancelLabel: { default: "Cancel" },
12
- danger: { type: Boolean }
12
+ danger: { type: Boolean },
13
+ loading: { type: Boolean },
14
+ loadingLabel: { default: "Working…" }
13
15
  },
14
16
  emits: ["update:open", "confirm", "cancel"],
15
17
  setup(__props, { emit: __emit }) {
18
+ const props = __props;
16
19
  const emit = __emit;
17
20
  function confirm() {
18
21
  emit("confirm");
19
- emit("update:open", false);
22
+ if (!props.loading) emit("update:open", false);
20
23
  }
21
24
  function cancel() {
22
25
  emit("cancel");
@@ -32,22 +35,24 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
32
35
  footer: withCtx(() => [
33
36
  createVNode(_sfc_main$2, {
34
37
  variant: "ghost",
38
+ disabled: __props.loading,
35
39
  onClick: cancel
36
40
  }, {
37
41
  default: withCtx(() => [
38
42
  createTextVNode(toDisplayString(__props.cancelLabel), 1)
39
43
  ]),
40
44
  _: 1
41
- }),
45
+ }, 8, ["disabled"]),
42
46
  createVNode(_sfc_main$2, {
43
47
  variant: __props.danger ? "danger" : "solid",
48
+ disabled: __props.loading,
44
49
  onClick: confirm
45
50
  }, {
46
51
  default: withCtx(() => [
47
- createTextVNode(toDisplayString(__props.confirmLabel), 1)
52
+ createTextVNode(toDisplayString(__props.loading ? __props.loadingLabel : __props.confirmLabel), 1)
48
53
  ]),
49
54
  _: 1
50
- }, 8, ["variant"])
55
+ }, 8, ["variant", "disabled"])
51
56
  ]),
52
57
  default: withCtx(() => [
53
58
  renderSlot(_ctx.$slots, "default")
@@ -0,0 +1,49 @@
1
+ import { defineComponent, openBlock, createElementBlock, normalizeClass, createVNode, createCommentVNode, createElementVNode, toDisplayString, renderSlot } from "vue";
2
+ import { _ as _sfc_main$1 } from "./LpIcon-CCnX5_2j.js";
3
+ const _hoisted_1 = { class: "flex flex-col gap-1" };
4
+ const _hoisted_2 = {
5
+ key: 0,
6
+ class: "max-w-sm text-sm text-muted"
7
+ };
8
+ const _hoisted_3 = {
9
+ key: 1,
10
+ class: "mt-1"
11
+ };
12
+ const _sfc_main = /* @__PURE__ */ defineComponent({
13
+ __name: "LpEmptyState",
14
+ props: {
15
+ icon: {},
16
+ title: {},
17
+ description: {},
18
+ compact: { type: Boolean }
19
+ },
20
+ setup(__props) {
21
+ return (_ctx, _cache) => {
22
+ return openBlock(), createElementBlock("div", {
23
+ class: normalizeClass(["flex flex-col items-center px-6 text-center", __props.compact ? "gap-2 py-6" : "gap-3 py-12"])
24
+ }, [
25
+ __props.icon ? (openBlock(), createElementBlock("div", {
26
+ key: 0,
27
+ class: normalizeClass(["flex items-center justify-center rounded-pill bg-surface-soft text-muted", __props.compact ? "size-9" : "size-12"])
28
+ }, [
29
+ createVNode(_sfc_main$1, {
30
+ name: __props.icon,
31
+ size: __props.compact ? 16 : 22
32
+ }, null, 8, ["name", "size"])
33
+ ], 2)) : createCommentVNode("", true),
34
+ createElementVNode("div", _hoisted_1, [
35
+ createElementVNode("p", {
36
+ class: normalizeClass(["font-semibold text-ink", __props.compact ? "text-sm" : ""])
37
+ }, toDisplayString(__props.title), 3),
38
+ __props.description ? (openBlock(), createElementBlock("p", _hoisted_2, toDisplayString(__props.description), 1)) : createCommentVNode("", true)
39
+ ]),
40
+ _ctx.$slots.default ? (openBlock(), createElementBlock("div", _hoisted_3, [
41
+ renderSlot(_ctx.$slots, "default")
42
+ ])) : createCommentVNode("", true)
43
+ ], 2);
44
+ };
45
+ }
46
+ });
47
+ export {
48
+ _sfc_main as _
49
+ };
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, ref, watch, computed, openBlock, createElementBlock, Fragment, renderList, normalizeStyle, createBlock, createVNode, withCtx, createElementVNode, renderSlot, mergeProps, normalizeProps, guardReactiveProps, createTextVNode, toDisplayString, createCommentVNode } from "vue";
2
2
  import { computeStats, formatSize, sortNodes, subtreeIds, ancestorIds } from "../components/fileTree.js";
3
- import { _ as _sfc_main$1 } from "./LpEmptyState-CrfyRJUG.js";
4
- import { _ as _sfc_main$3 } from "./LpFileTreeNode-DFg4PhOK.js";
3
+ import { _ as _sfc_main$1 } from "./LpEmptyState-BV3q7Qyi.js";
4
+ import { _ as _sfc_main$3 } from "./LpFileTreeNode-D7WgUPcJ.js";
5
5
  import { _ as _sfc_main$2 } from "./LpScrollArea-D8xyKXcF.js";
6
6
  const _hoisted_1 = {
7
7
  key: 0,
@@ -5,25 +5,24 @@ import { _ as _sfc_main$1 } from "./LpContextMenu-D0mzXqA7.js";
5
5
  import { _ as _sfc_main$2 } from "./LpIcon-CCnX5_2j.js";
6
6
  const _hoisted_1 = ["aria-level", "aria-selected", "aria-expanded", "aria-disabled"];
7
7
  const _hoisted_2 = ["data-node-id", "tabindex"];
8
- const _hoisted_3 = { class: "flex size-4 shrink-0 items-center justify-center" };
9
- const _hoisted_4 = { class: "min-w-0 flex-1 shrink-[2] truncate" };
10
- const _hoisted_5 = {
8
+ const _hoisted_3 = { class: "min-w-0 flex-1 shrink-[2] truncate" };
9
+ const _hoisted_4 = {
11
10
  key: 1,
12
11
  class: "shrink-0 rounded-pill bg-brand-soft px-1.5 py-0.5 text-[11px] font-medium tabular-nums text-brand"
13
12
  };
14
- const _hoisted_6 = {
13
+ const _hoisted_5 = {
15
14
  key: 2,
16
15
  class: "min-w-0 shrink truncate text-xs text-muted"
17
16
  };
18
- const _hoisted_7 = {
17
+ const _hoisted_6 = {
19
18
  key: 3,
20
19
  class: "shrink-0 text-xs tabular-nums text-muted/80"
21
20
  };
22
- const _hoisted_8 = {
21
+ const _hoisted_7 = {
23
22
  key: 4,
24
23
  class: "w-16 shrink-0 text-right text-xs tabular-nums text-muted"
25
24
  };
26
- const _hoisted_9 = {
25
+ const _hoisted_8 = {
27
26
  key: 0,
28
27
  role: "group",
29
28
  class: "flex min-w-0 flex-col overflow-hidden"
@@ -134,7 +133,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
134
133
  style: normalizeStyle({ paddingLeft: `${__props.depth * 14 + 6}px` }),
135
134
  onClick: withModifiers(onActivate, ["stop"])
136
135
  }, [
137
- createElementVNode("span", _hoisted_3, [
136
+ createElementVNode("span", {
137
+ class: normalizeClass(["flex size-4 shrink-0 items-center justify-center", canExpand.value ? "cursor-pointer rounded-sm hover:bg-line" : ""]),
138
+ onClick: _cache[0] || (_cache[0] = withModifiers(($event) => canExpand.value && !__props.node.disabled ? emit("toggle", __props.node) : void 0, ["stop"]))
139
+ }, [
138
140
  isLoading.value ? (openBlock(), createBlock(_sfc_main$2, {
139
141
  key: 0,
140
142
  name: "lucide:loader-circle",
@@ -146,7 +148,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
146
148
  size: 14,
147
149
  class: normalizeClass(["text-muted transition-transform duration-[var(--duration-fast)]", isOpen.value ? "rotate-90" : ""])
148
150
  }, null, 8, ["class"])) : createCommentVNode("", true)
149
- ]),
151
+ ], 2),
150
152
  __props.checkable ? (openBlock(), createBlock(_sfc_main$3, {
151
153
  key: 0,
152
154
  "model-value": checkState.value === "checked",
@@ -154,16 +156,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
154
156
  disabled: __props.node.disabled,
155
157
  class: "shrink-0",
156
158
  "aria-label": __props.node.name,
157
- onClick: _cache[0] || (_cache[0] = withModifiers(() => {
159
+ onClick: _cache[1] || (_cache[1] = withModifiers(() => {
158
160
  }, ["stop"])),
159
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => emit("check", __props.node, $event))
161
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => emit("check", __props.node, $event))
160
162
  }, null, 8, ["model-value", "indeterminate", "disabled", "aria-label"])) : createCommentVNode("", true),
161
163
  createVNode(_sfc_main$2, {
162
164
  name: unref(fileIcon)(__props.node, isOpen.value),
163
165
  size: __props.iconSize,
164
166
  class: normalizeClass(["shrink-0", __props.node.disabled ? "" : isDir.value ? "text-brand" : "text-muted"])
165
167
  }, null, 8, ["name", "size", "class"]),
166
- createElementVNode("span", _hoisted_4, [
168
+ createElementVNode("span", _hoisted_3, [
167
169
  renderSlot(_ctx.$slots, "row", {
168
170
  node: __props.node,
169
171
  depth: __props.depth,
@@ -173,10 +175,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
173
175
  createTextVNode(toDisplayString(__props.node.name), 1)
174
176
  ])
175
177
  ]),
176
- countLabel.value ? (openBlock(), createElementBlock("span", _hoisted_5, toDisplayString(countLabel.value), 1)) : createCommentVNode("", true),
177
- __props.node.meta ? (openBlock(), createElementBlock("span", _hoisted_6, toDisplayString(__props.node.meta), 1)) : createCommentVNode("", true),
178
- modifiedLabel.value ? (openBlock(), createElementBlock("span", _hoisted_7, toDisplayString(modifiedLabel.value), 1)) : createCommentVNode("", true),
179
- sizeLabel.value ? (openBlock(), createElementBlock("span", _hoisted_8, toDisplayString(sizeLabel.value), 1)) : createCommentVNode("", true)
178
+ countLabel.value ? (openBlock(), createElementBlock("span", _hoisted_4, toDisplayString(countLabel.value), 1)) : createCommentVNode("", true),
179
+ __props.node.meta ? (openBlock(), createElementBlock("span", _hoisted_5, toDisplayString(__props.node.meta), 1)) : createCommentVNode("", true),
180
+ modifiedLabel.value ? (openBlock(), createElementBlock("span", _hoisted_6, toDisplayString(modifiedLabel.value), 1)) : createCommentVNode("", true),
181
+ sizeLabel.value ? (openBlock(), createElementBlock("span", _hoisted_7, toDisplayString(sizeLabel.value), 1)) : createCommentVNode("", true)
180
182
  ], 14, _hoisted_2)
181
183
  ]),
182
184
  _: 3
@@ -187,7 +189,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
187
189
  onLeave: onBranchLeave
188
190
  }, {
189
191
  default: withCtx(() => [
190
- isOpen.value && hasChildren.value ? (openBlock(), createElementBlock("ul", _hoisted_9, [
192
+ isOpen.value && hasChildren.value ? (openBlock(), createElementBlock("ul", _hoisted_8, [
191
193
  (openBlock(true), createElementBlock(Fragment, null, renderList(children.value, (child, i) => {
192
194
  return openBlock(), createBlock(_component_LpFileTreeNode, {
193
195
  key: child.id,
@@ -206,10 +208,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
206
208
  stats: __props.stats,
207
209
  "show-size": __props.showSize,
208
210
  "show-modified": __props.showModified,
209
- onSelect: _cache[2] || (_cache[2] = ($event) => emit("select", $event)),
210
- onToggle: _cache[3] || (_cache[3] = ($event) => emit("toggle", $event)),
211
- onFocus: _cache[4] || (_cache[4] = ($event) => emit("focus", $event)),
212
- onCheck: _cache[5] || (_cache[5] = (n, v) => emit("check", n, v))
211
+ onSelect: _cache[3] || (_cache[3] = ($event) => emit("select", $event)),
212
+ onToggle: _cache[4] || (_cache[4] = ($event) => emit("toggle", $event)),
213
+ onFocus: _cache[5] || (_cache[5] = ($event) => emit("focus", $event)),
214
+ onCheck: _cache[6] || (_cache[6] = (n, v) => emit("check", n, v))
213
215
  }, {
214
216
  row: withCtx((slotProps) => [
215
217
  renderSlot(_ctx.$slots, "row", mergeProps({ ref_for: true }, slotProps))
@@ -7,7 +7,7 @@ const _hoisted_1 = {
7
7
  key: 0,
8
8
  class: "flex shrink-0 items-center text-muted"
9
9
  };
10
- const _hoisted_2 = ["type", "value", "placeholder", "disabled", "aria-invalid"];
10
+ const _hoisted_2 = ["type", "value", "placeholder", "disabled", "required", "aria-invalid"];
11
11
  const __default__ = { inheritAttrs: false };
12
12
  const _sfc_main = /* @__PURE__ */ defineComponent({
13
13
  ...__default__,
@@ -23,6 +23,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
23
23
  hint: {},
24
24
  error: {},
25
25
  icon: {},
26
+ required: { type: Boolean },
26
27
  pattern: {},
27
28
  restrict: {}
28
29
  },
@@ -90,6 +91,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
90
91
  label: hasField.value ? __props.label : void 0,
91
92
  hint: hasField.value ? __props.hint : void 0,
92
93
  error: hasField.value ? __props.error : void 0,
94
+ required: hasField.value ? __props.required : void 0,
93
95
  class: normalizeClass(hasField.value ? rootClass.value : void 0),
94
96
  style: normalizeStyle(hasField.value ? rootStyle.value : void 0)
95
97
  }, {
@@ -116,6 +118,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
116
118
  value: __props.modelValue,
117
119
  placeholder: __props.placeholder,
118
120
  disabled: __props.disabled,
121
+ required: __props.required || void 0,
119
122
  "aria-invalid": isInvalidState.value || void 0,
120
123
  class: [
121
124
  "lp-autofill min-w-0 flex-1 self-stretch bg-transparent outline-none placeholder:text-muted",
@@ -132,7 +135,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
132
135
  ], 6)
133
136
  ]),
134
137
  _: 3
135
- }, 8, ["label", "hint", "error", "class", "style"]);
138
+ }, 8, ["label", "hint", "error", "required", "class", "style"]);
136
139
  };
137
140
  }
138
141
  });
@@ -0,0 +1,51 @@
1
+ import { defineComponent, computed, openBlock, createBlock, resolveDynamicComponent, normalizeClass, withCtx, renderSlot } from "vue";
2
+ const revealClass = "relative after:absolute after:inset-x-0 after:-bottom-0.5 after:h-px after:origin-left after:scale-x-0 after:bg-current after:transition-transform after:duration-[var(--duration-medium)] hover:after:scale-x-100 focus-visible:after:scale-x-100";
3
+ const _sfc_main = /* @__PURE__ */ defineComponent({
4
+ __name: "LpLink",
5
+ props: {
6
+ href: {},
7
+ external: { type: Boolean },
8
+ muted: { type: Boolean },
9
+ tone: {},
10
+ as: { default: "a" },
11
+ variant: { default: "default" }
12
+ },
13
+ setup(__props) {
14
+ const props = __props;
15
+ const isAnchor = computed(() => props.as === "a");
16
+ const rel = computed(() => props.external ? "noopener noreferrer" : void 0);
17
+ const target = computed(() => props.external ? "_blank" : void 0);
18
+ const colorClass = computed(() => {
19
+ const tone = props.tone ?? (props.muted ? "muted" : "brand");
20
+ switch (tone) {
21
+ case "ink":
22
+ return "text-ink";
23
+ case "muted":
24
+ return "text-muted-strong hover:text-ink";
25
+ case "soft":
26
+ return "text-muted hover:text-ink";
27
+ default:
28
+ return "text-brand hover:text-brand-hover";
29
+ }
30
+ });
31
+ return (_ctx, _cache) => {
32
+ return openBlock(), createBlock(resolveDynamicComponent(__props.as), {
33
+ href: isAnchor.value ? __props.href : void 0,
34
+ target: target.value,
35
+ rel: rel.value,
36
+ class: normalizeClass(["inline-flex items-center gap-1 underline-offset-2 outline-none transition-colors focus-visible:ring-2 focus-visible:ring-ring", [
37
+ colorClass.value,
38
+ __props.variant === "reveal" ? revealClass : __props.variant === "underline" ? "underline decoration-current/40 hover:decoration-current" : "hover:underline"
39
+ ]])
40
+ }, {
41
+ default: withCtx(() => [
42
+ renderSlot(_ctx.$slots, "default")
43
+ ]),
44
+ _: 3
45
+ }, 8, ["href", "target", "rel", "class"]);
46
+ };
47
+ }
48
+ });
49
+ export {
50
+ _sfc_main as _
51
+ };
@@ -2,7 +2,7 @@ import { defineComponent, computed, useModel, openBlock, createBlock, withCtx, c
2
2
  import { _ as _sfc_main$8 } from "./LpBadge-BPodVcJa.js";
3
3
  import { _ as _sfc_main$7 } from "./LpButton-5VXXCjwF.js";
4
4
  import { _ as _sfc_main$5 } from "./LpContextMenu-D0mzXqA7.js";
5
- import { _ as _sfc_main$3 } from "./LpEmptyState-CrfyRJUG.js";
5
+ import { _ as _sfc_main$3 } from "./LpEmptyState-BV3q7Qyi.js";
6
6
  import { _ as _sfc_main$6 } from "./LpIcon-CCnX5_2j.js";
7
7
  import { _ as _sfc_main$1 } from "./LpPopover-8268UmlC.js";
8
8
  import { _ as _sfc_main$4 } from "./LpScrollArea-D8xyKXcF.js";
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, ref, openBlock, createBlock, createSlots, withCtx, createElementVNode, createVNode, renderSlot } from "vue";
2
2
  import { _ as _sfc_main$2 } from "./LpIcon-CCnX5_2j.js";
3
- import { _ as _sfc_main$1 } from "./LpInput-BfLIWV-P.js";
3
+ import { _ as _sfc_main$1 } from "./LpInput-jwqXlAy0.js";
4
4
  const _hoisted_1 = ["aria-label"];
5
5
  const __default__ = { inheritAttrs: false };
6
6
  const _sfc_main = /* @__PURE__ */ defineComponent({
@@ -10,7 +10,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
10
10
  modelValue: {},
11
11
  placeholder: {},
12
12
  invalid: { type: Boolean },
13
- disabled: { type: Boolean }
13
+ disabled: { type: Boolean },
14
+ label: {},
15
+ hint: {},
16
+ error: {},
17
+ required: { type: Boolean }
14
18
  },
15
19
  emits: ["update:modelValue"],
16
20
  setup(__props, { expose: __expose }) {
@@ -30,6 +34,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
30
34
  placeholder: __props.placeholder,
31
35
  invalid: __props.invalid,
32
36
  disabled: __props.disabled,
37
+ label: __props.label,
38
+ hint: __props.hint,
39
+ error: __props.error,
40
+ required: __props.required,
33
41
  "onUpdate:modelValue": _cache[1] || (_cache[1] = (v) => _ctx.$emit("update:modelValue", v))
34
42
  }, createSlots({
35
43
  trailing: withCtx(() => [
@@ -55,7 +63,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
55
63
  ]),
56
64
  key: "0"
57
65
  } : void 0
58
- ]), 1032, ["model-value", "type", "placeholder", "invalid", "disabled"]);
66
+ ]), 1032, ["model-value", "type", "placeholder", "invalid", "disabled", "label", "hint", "error", "required"]);
59
67
  };
60
68
  }
61
69
  });
@@ -1,4 +1,4 @@
1
- import { defineComponent, openBlock, createElementBlock, Fragment, renderList, createElementVNode, normalizeClass, createBlock, createTextVNode, toDisplayString, createCommentVNode } from "vue";
1
+ import { defineComponent, computed, openBlock, createElementBlock, Fragment, renderList, createElementVNode, normalizeClass, createBlock, createTextVNode, toDisplayString, createCommentVNode } from "vue";
2
2
  import { _ as _sfc_main$1 } from "./LpIcon-CCnX5_2j.js";
3
3
  const _hoisted_1 = { class: "flex items-center gap-2" };
4
4
  const _hoisted_2 = ["aria-current"];
@@ -8,39 +8,56 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
8
8
  __name: "LpStepper",
9
9
  props: {
10
10
  steps: {},
11
- current: {}
11
+ current: {},
12
+ completed: {}
12
13
  },
13
14
  setup(__props) {
15
+ const props = __props;
16
+ const currentIndex = computed(() => {
17
+ if (typeof props.current === "number") return props.current;
18
+ return props.steps.findIndex((s) => s.key === props.current);
19
+ });
20
+ function isCompleted(step, i) {
21
+ if (!props.completed) return i < currentIndex.value;
22
+ return props.completed.includes(i) || !!step.key && props.completed.includes(step.key);
23
+ }
24
+ function isCurrent(i) {
25
+ return i === currentIndex.value;
26
+ }
14
27
  return (_ctx, _cache) => {
15
28
  return openBlock(), createElementBlock("ol", _hoisted_1, [
16
29
  (openBlock(true), createElementBlock(Fragment, null, renderList(__props.steps, (step, i) => {
17
30
  return openBlock(), createElementBlock("li", {
18
- key: i,
31
+ key: step.key ?? i,
19
32
  class: "flex flex-1 items-center gap-2 last:flex-none",
20
- "aria-current": i === __props.current ? "step" : void 0
33
+ "aria-current": isCurrent(i) ? "step" : void 0
21
34
  }, [
22
35
  createElementVNode("div", _hoisted_3, [
23
36
  createElementVNode("span", {
24
- class: normalizeClass(["flex size-7 shrink-0 items-center justify-center rounded-pill border text-xs font-semibold transition-colors", i < __props.current ? "border-transparent bg-brand text-ink-inverse" : i === __props.current ? "border-brand text-brand" : "border-line text-muted"])
37
+ class: normalizeClass(["flex size-7 shrink-0 items-center justify-center rounded-pill border text-xs font-semibold transition-colors", isCompleted(step, i) ? "border-transparent bg-brand text-ink-inverse" : isCurrent(i) ? "border-brand text-brand" : "border-line text-muted"])
25
38
  }, [
26
- i < __props.current ? (openBlock(), createBlock(_sfc_main$1, {
39
+ isCompleted(step, i) ? (openBlock(), createBlock(_sfc_main$1, {
27
40
  key: 0,
28
41
  name: "lucide:check",
29
42
  size: 14
30
- })) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
43
+ })) : step.icon ? (openBlock(), createBlock(_sfc_main$1, {
44
+ key: 1,
45
+ name: step.icon,
46
+ size: 14
47
+ }, null, 8, ["name"])) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [
31
48
  createTextVNode(toDisplayString(i + 1), 1)
32
49
  ], 64))
33
50
  ], 2),
34
51
  createElementVNode("span", {
35
- class: normalizeClass(["text-sm", i <= __props.current ? "text-ink" : "text-muted"])
52
+ class: normalizeClass(["text-sm", isCompleted(step, i) || isCurrent(i) ? "text-ink" : "text-muted"])
36
53
  }, [
37
54
  createTextVNode(toDisplayString(step.label) + " ", 1),
38
- createElementVNode("span", _hoisted_4, toDisplayString(i < __props.current ? "(completed)" : i === __props.current ? "(current step)" : ""), 1)
55
+ createElementVNode("span", _hoisted_4, toDisplayString(isCompleted(step, i) ? "(completed)" : isCurrent(i) ? "(current step)" : ""), 1)
39
56
  ], 2)
40
57
  ]),
41
58
  i < __props.steps.length - 1 ? (openBlock(), createElementBlock("span", {
42
59
  key: 0,
43
- class: normalizeClass(["h-px flex-1", i < __props.current ? "bg-brand" : "bg-line"])
60
+ class: normalizeClass(["h-px flex-1", isCompleted(step, i) ? "bg-brand" : "bg-line"])
44
61
  }, null, 2)) : createCommentVNode("", true)
45
62
  ], 8, _hoisted_2);
46
63
  }), 128))
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, computed, openBlock, createBlock, resolveDynamicComponent, normalizeClass, withCtx, createElementVNode } from "vue";
2
2
  import { _ as _sfc_main$1 } from "./LpFormField-CesaPWPO.js";
3
- const _hoisted_1 = ["value", "placeholder", "rows", "disabled"];
3
+ const _hoisted_1 = ["value", "placeholder", "rows", "disabled", "required"];
4
4
  const _sfc_main = /* @__PURE__ */ defineComponent({
5
5
  __name: "LpTextarea",
6
6
  props: {
@@ -11,7 +11,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
11
11
  disabled: { type: Boolean },
12
12
  label: {},
13
13
  hint: {},
14
- error: {}
14
+ error: {},
15
+ required: { type: Boolean }
15
16
  },
16
17
  emits: ["update:modelValue"],
17
18
  setup(__props) {
@@ -22,6 +23,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
22
23
  label: hasField.value ? __props.label : void 0,
23
24
  hint: hasField.value ? __props.hint : void 0,
24
25
  error: hasField.value ? __props.error : void 0,
26
+ required: hasField.value ? __props.required : void 0,
25
27
  class: normalizeClass(hasField.value ? void 0 : "contents")
26
28
  }, {
27
29
  default: withCtx(() => [
@@ -30,12 +32,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
30
32
  placeholder: __props.placeholder,
31
33
  rows: __props.rows ?? 4,
32
34
  disabled: __props.disabled,
35
+ required: __props.required || void 0,
33
36
  class: normalizeClass(["w-full resize-y rounded-control border bg-surface-soft px-3 py-2 text-sm text-ink outline-none transition-colors duration-[var(--duration-fast)] placeholder:text-muted focus:border-brand focus:ring-2 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-55", __props.invalid || __props.error ? "border-danger focus:border-danger focus:ring-danger-soft" : "border-line"]),
34
37
  onInput: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:modelValue", $event.target.value))
35
38
  }, null, 42, _hoisted_1)
36
39
  ]),
37
40
  _: 1
38
- }, 8, ["label", "hint", "error", "class"]);
41
+ }, 8, ["label", "hint", "error", "required", "class"]);
39
42
  };
40
43
  }
41
44
  });