laif-ds 1.0.3 → 1.0.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/CHANGELOG.md +12 -0
- package/dist/_virtual/index2.js +5 -2
- package/dist/_virtual/index3.js +2 -5
- package/dist/_virtual/index5.js +5 -5
- package/dist/_virtual/index6.js +2 -2
- package/dist/_virtual/index7.js +2 -2
- package/dist/agent-docs/adoption-report.json +14 -15
- package/dist/agent-docs/components/Button.md +1 -1
- package/dist/agent-docs/manifest.json +3 -3
- package/dist/components/design-tokens.js +4 -1
- package/dist/components/ui/button.js +60 -46
- package/dist/components/ui/input.js +167 -136
- package/dist/css-for-template.css +9 -0
- package/dist/index.d.ts +1 -1
- package/dist/node_modules/eventemitter3/index.js +1 -1
- package/dist/node_modules/eventemitter3/index2.js +1 -1
- package/dist/node_modules/hast-util-to-jsx-runtime/lib/index.js +1 -1
- package/dist/node_modules/recharts/es6/util/Events.js +1 -1
- package/dist/node_modules/style-to-object/cjs/index.js +1 -1
- package/dist/node_modules/use-sync-external-store/shim/index.js +1 -1
- package/dist/styles.v3.css +1 -1
- package/package.json +1 -1
package/dist/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,18 @@ All notable technical changes to the laif-ds core will be documented in this fil
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [laif-ds@1.0.5]
|
|
9
|
+
|
|
10
|
+
### 🚀 Added
|
|
11
|
+
|
|
12
|
+
- **Input**: `type="search"` inputs now show a clear (X) button when they have content; clicking it clears the field and fires `onChange` in both controlled and uncontrolled modes. The native WebKit search-cancel button is hidden so only the custom clear button appears
|
|
13
|
+
|
|
14
|
+
## [laif-ds@1.0.4]
|
|
15
|
+
|
|
16
|
+
### 🐛 Fixed
|
|
17
|
+
|
|
18
|
+
- **Button**: Disabled buttons no longer show hover colours, the press squash or the loading shimmer, keep the `not-allowed` cursor, and are removed from the tab order. With `asChild`, `disabled` is no longer forwarded to the slotted element (invalid on e.g. an `<a>`) — it now gets `aria-disabled`, `data-disabled` and `tabIndex={-1}`, and its click is blocked
|
|
19
|
+
|
|
8
20
|
## [laif-ds@1.0.3]
|
|
9
21
|
|
|
10
22
|
### 🚀 Added
|
package/dist/_virtual/index2.js
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
2
|
+
import { getDefaultExportFromCjs as e } from "./_commonjsHelpers.js";
|
|
3
|
+
import { __require as t } from "../node_modules/eventemitter3/index2.js";
|
|
4
|
+
var r = t();
|
|
5
|
+
const m = /* @__PURE__ */ e(r);
|
|
3
6
|
export {
|
|
4
|
-
|
|
7
|
+
m as default
|
|
5
8
|
};
|
package/dist/_virtual/index3.js
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
3
|
-
import { __require as e } from "../node_modules/style-to-js/cjs/index.js";
|
|
4
|
-
var t = e();
|
|
5
|
-
const a = /* @__PURE__ */ r(t);
|
|
2
|
+
var e = { exports: {} };
|
|
6
3
|
export {
|
|
7
|
-
|
|
4
|
+
e as __module
|
|
8
5
|
};
|
package/dist/_virtual/index5.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { getDefaultExportFromCjs as
|
|
3
|
-
import { __require as
|
|
4
|
-
var
|
|
5
|
-
const
|
|
2
|
+
import { getDefaultExportFromCjs as r } from "./_commonjsHelpers.js";
|
|
3
|
+
import { __require as e } from "../node_modules/style-to-js/cjs/index.js";
|
|
4
|
+
var t = e();
|
|
5
|
+
const a = /* @__PURE__ */ r(t);
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
a as default
|
|
8
8
|
};
|
package/dist/_virtual/index6.js
CHANGED
package/dist/_virtual/index7.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": "1.0.0",
|
|
3
|
-
"generatedAt": "2026-09-
|
|
3
|
+
"generatedAt": "2026-09-23T17:05:08.621Z",
|
|
4
4
|
"package": {
|
|
5
5
|
"name": "laif-ds",
|
|
6
|
-
"version": "1.0.
|
|
6
|
+
"version": "1.0.5"
|
|
7
7
|
},
|
|
8
8
|
"summary": {
|
|
9
9
|
"scannedFiles": 404,
|
|
@@ -500,19 +500,6 @@
|
|
|
500
500
|
"src/components/stories/tabs.stories.tsx"
|
|
501
501
|
]
|
|
502
502
|
},
|
|
503
|
-
{
|
|
504
|
-
"className": "text-d-muted-foreground text-xs",
|
|
505
|
-
"occurrences": 8,
|
|
506
|
-
"files": [
|
|
507
|
-
"src/components/editor/plugins/mention-plugin.tsx",
|
|
508
|
-
"src/components/stories/app-card.stories.tsx",
|
|
509
|
-
"src/components/stories/button.stories.tsx",
|
|
510
|
-
"src/components/stories/input.stories.tsx",
|
|
511
|
-
"src/components/ui/tables/data-cross-table/cell-editor-dialog.tsx",
|
|
512
|
-
"src/components/ui/tables/data-cross-table/data-cross-table.tsx",
|
|
513
|
-
"src/components/ui/tables/data-cross-table/editable-input.tsx"
|
|
514
|
-
]
|
|
515
|
-
},
|
|
516
503
|
{
|
|
517
504
|
"className": "text-muted-foreground text-xs",
|
|
518
505
|
"occurrences": 8,
|
|
@@ -579,6 +566,18 @@
|
|
|
579
566
|
"src/components/stories/spinner.stories.tsx"
|
|
580
567
|
]
|
|
581
568
|
},
|
|
569
|
+
{
|
|
570
|
+
"className": "text-d-muted-foreground text-xs",
|
|
571
|
+
"occurrences": 6,
|
|
572
|
+
"files": [
|
|
573
|
+
"src/components/editor/plugins/mention-plugin.tsx",
|
|
574
|
+
"src/components/stories/app-card.stories.tsx",
|
|
575
|
+
"src/components/stories/input.stories.tsx",
|
|
576
|
+
"src/components/ui/tables/data-cross-table/cell-editor-dialog.tsx",
|
|
577
|
+
"src/components/ui/tables/data-cross-table/data-cross-table.tsx",
|
|
578
|
+
"src/components/ui/tables/data-cross-table/editable-input.tsx"
|
|
579
|
+
]
|
|
580
|
+
},
|
|
582
581
|
{
|
|
583
582
|
"className": "flex items-center gap-1 font-normal",
|
|
584
583
|
"occurrences": 6,
|
|
@@ -129,6 +129,6 @@ export function LoadingButton() {
|
|
|
129
129
|
|
|
130
130
|
## Notes
|
|
131
131
|
|
|
132
|
-
- **Disabled**:
|
|
132
|
+
- **Disabled**: `disabled` renders a native disabled button: reduced opacity, `not-allowed` cursor, no hover colours, press animation or shimmer, and it is skipped by Tab. With `asChild`, `disabled` sets `aria-disabled` and `tabIndex={-1}` on the slotted element and blocks activation; pass `onClick` to `Button`, not to the child (the child's own handler runs first), and omit `href` if the link must be fully unreachable, since middle-click still opens it.
|
|
133
133
|
- **Icon-only**: Use `size="icon"` for square icon buttons.
|
|
134
134
|
- **Theming**: Use variants to match semantic meaning (primary, destructive, etc.).
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": "1.1.0",
|
|
3
|
-
"generatedAt": "2026-09-
|
|
3
|
+
"generatedAt": "2026-09-23T17:05:08.343Z",
|
|
4
4
|
"package": {
|
|
5
5
|
"name": "laif-ds",
|
|
6
|
-
"version": "1.0.
|
|
6
|
+
"version": "1.0.5"
|
|
7
7
|
},
|
|
8
8
|
"stats": {
|
|
9
9
|
"documentedComponentCount": 94,
|
|
@@ -6313,5 +6313,5 @@
|
|
|
6313
6313
|
]
|
|
6314
6314
|
}
|
|
6315
6315
|
],
|
|
6316
|
-
"checksum": "
|
|
6316
|
+
"checksum": "24766d8fe606e7185e4f7214b04703357e66bb0075919f70f9c56dc1e9c6f901"
|
|
6317
6317
|
}
|
|
@@ -58,7 +58,10 @@ const e = {
|
|
|
58
58
|
// Press snaps in (100ms) and eases back out (160ms, set by the caller) —
|
|
59
59
|
// symmetric timing reads mushy. Do not deepen much past 2%: the scale is
|
|
60
60
|
// anisotropic, so it distorts the label's aspect ratio too.
|
|
61
|
-
|
|
61
|
+
// Gated on `interactive:` so a disabled control does not squash; the
|
|
62
|
+
// reduced-motion resets carry it too, or v4 (which emits custom variants
|
|
63
|
+
// after built-in ones) would let the squash win over them.
|
|
64
|
+
active: "origin-bottom interactive:active:translate-y-[1px] interactive:active:scale-y-[0.98] interactive:active:scale-x-[1.02] interactive:active:shadow-none interactive:active:duration-[100ms] motion-reduce:interactive:active:translate-y-0 motion-reduce:interactive:active:scale-y-100 motion-reduce:interactive:active:scale-x-100",
|
|
62
65
|
disabled: "disabled:cursor-not-allowed disabled:opacity-50"
|
|
63
66
|
},
|
|
64
67
|
// Input specific
|
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as t, jsxs as
|
|
3
|
-
import { Root as
|
|
4
|
-
import { cva as
|
|
2
|
+
import { jsx as t, jsxs as m } from "react/jsx-runtime";
|
|
3
|
+
import { Root as p } from "../../node_modules/@radix-ui/react-slot/dist/index.js";
|
|
4
|
+
import { cva as x } from "../../node_modules/class-variance-authority/dist/index.js";
|
|
5
5
|
import { designTokens as r } from "../design-tokens.js";
|
|
6
|
-
import { cn as
|
|
7
|
-
import { Icon as
|
|
8
|
-
const
|
|
9
|
-
|
|
6
|
+
import { cn as i } from "../../lib/utils.js";
|
|
7
|
+
import { Icon as g } from "./icon.js";
|
|
8
|
+
const f = x(
|
|
9
|
+
i(
|
|
10
10
|
r.text.base,
|
|
11
11
|
r.radius.default,
|
|
12
12
|
r.focusRing,
|
|
13
13
|
r.interaction.active,
|
|
14
14
|
r.interaction.disabled,
|
|
15
|
+
// A disabled `asChild` link has no `:disabled`: it is flagged `data-disabled`.
|
|
16
|
+
"data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50",
|
|
15
17
|
// `translate` and `scale` must be listed explicitly: Tailwind v4 compiles
|
|
16
18
|
// them to the individual CSS properties of the same name, not to `transform`,
|
|
17
19
|
// so a list naming only `transform` animates neither in the v4 bundle (v3
|
|
@@ -25,16 +27,16 @@ const h = f(
|
|
|
25
27
|
{
|
|
26
28
|
variants: {
|
|
27
29
|
variant: {
|
|
28
|
-
default: "bg-d-primary text-d-primary-foreground shadow-xs hover:bg-d-primary/90 hover:shadow-d-primary/25",
|
|
29
|
-
destructive: "bg-d-destructive text-d-destructive-foreground shadow-xs hover:bg-d-destructive/90 hover:shadow-d-destructive/25 focus-visible:ring-d-destructive/20",
|
|
30
|
-
outline: "border border-d-foreground shadow-xs disabled:border-d-foreground/30 hover:bg-d-accent hover:text-d-accent-foreground hover:border-d-foreground/80",
|
|
31
|
-
"outline-primary": "border border-d-primary shadow-xs text-d-primary/80 hover:text-d-primary hover:bg-d-primary/10 hover:border-d-primary/80",
|
|
32
|
-
"outline-destructive": "border border-d-destructive shadow-xs text-d-destructive/80 hover:text-d-destructive hover:bg-d-destructive/10 hover:border-d-destructive/80",
|
|
33
|
-
secondary: "bg-d-secondary text-d-secondary-foreground shadow-xs hover:bg-d-secondary/80 hover:text-d-secondary-foreground",
|
|
34
|
-
ghost: "hover:bg-d-accent hover:text-d-accent-foreground",
|
|
35
|
-
"ghost-destructive": "text-d-destructive bg-transparent hover:bg-d-destructive/10",
|
|
36
|
-
"ghost-accent": "text-d-primary bg-transparent hover:bg-d-primary/10",
|
|
37
|
-
link: "text-d-primary underline-offset-4 hover:underline"
|
|
30
|
+
default: "bg-d-primary text-d-primary-foreground shadow-xs interactive:hover:bg-d-primary/90 interactive:hover:shadow-d-primary/25",
|
|
31
|
+
destructive: "bg-d-destructive text-d-destructive-foreground shadow-xs interactive:hover:bg-d-destructive/90 interactive:hover:shadow-d-destructive/25 focus-visible:ring-d-destructive/20",
|
|
32
|
+
outline: "border border-d-foreground shadow-xs disabled:border-d-foreground/30 data-[disabled]:border-d-foreground/30 interactive:hover:bg-d-accent interactive:hover:text-d-accent-foreground interactive:hover:border-d-foreground/80",
|
|
33
|
+
"outline-primary": "border border-d-primary shadow-xs text-d-primary/80 interactive:hover:text-d-primary interactive:hover:bg-d-primary/10 interactive:hover:border-d-primary/80",
|
|
34
|
+
"outline-destructive": "border border-d-destructive shadow-xs text-d-destructive/80 interactive:hover:text-d-destructive interactive:hover:bg-d-destructive/10 interactive:hover:border-d-destructive/80",
|
|
35
|
+
secondary: "bg-d-secondary text-d-secondary-foreground shadow-xs interactive:hover:bg-d-secondary/80 interactive:hover:text-d-secondary-foreground",
|
|
36
|
+
ghost: "interactive:hover:bg-d-accent interactive:hover:text-d-accent-foreground",
|
|
37
|
+
"ghost-destructive": "text-d-destructive bg-transparent interactive:hover:bg-d-destructive/10",
|
|
38
|
+
"ghost-accent": "text-d-primary bg-transparent interactive:hover:bg-d-primary/10",
|
|
39
|
+
link: "text-d-primary underline-offset-4 interactive:hover:underline"
|
|
38
40
|
},
|
|
39
41
|
size: {
|
|
40
42
|
default: r.sizes.default + " has-[>svg]:px-3",
|
|
@@ -49,36 +51,48 @@ const h = f(
|
|
|
49
51
|
}
|
|
50
52
|
}
|
|
51
53
|
);
|
|
52
|
-
function
|
|
53
|
-
className:
|
|
54
|
-
variant:
|
|
54
|
+
function j({
|
|
55
|
+
className: n,
|
|
56
|
+
variant: d,
|
|
55
57
|
size: e,
|
|
56
|
-
asChild:
|
|
57
|
-
iconLeft:
|
|
58
|
-
iconRight:
|
|
59
|
-
isLoading:
|
|
60
|
-
|
|
58
|
+
asChild: s = !1,
|
|
59
|
+
iconLeft: c,
|
|
60
|
+
iconRight: v,
|
|
61
|
+
isLoading: b = !1,
|
|
62
|
+
disabled: o,
|
|
63
|
+
onClick: l,
|
|
64
|
+
...a
|
|
61
65
|
}) {
|
|
62
|
-
const
|
|
63
|
-
return
|
|
64
|
-
|
|
66
|
+
const u = s ? p : "button";
|
|
67
|
+
return s ? /* @__PURE__ */ t(
|
|
68
|
+
u,
|
|
65
69
|
{
|
|
66
70
|
"data-slot": "button",
|
|
67
|
-
className:
|
|
68
|
-
...
|
|
71
|
+
className: i(f({ variant: d, size: e, className: n })),
|
|
72
|
+
...a,
|
|
73
|
+
...o && {
|
|
74
|
+
"aria-disabled": !0,
|
|
75
|
+
"data-disabled": "",
|
|
76
|
+
tabIndex: -1
|
|
77
|
+
},
|
|
78
|
+
onClick: o ? (h) => {
|
|
79
|
+
h.preventDefault(), h.stopPropagation();
|
|
80
|
+
} : l
|
|
69
81
|
}
|
|
70
|
-
) : /* @__PURE__ */
|
|
71
|
-
|
|
82
|
+
) : /* @__PURE__ */ m(
|
|
83
|
+
u,
|
|
72
84
|
{
|
|
73
85
|
"data-slot": "button",
|
|
74
|
-
className:
|
|
75
|
-
|
|
86
|
+
className: i("relative", f({ variant: d, size: e, className: n })),
|
|
87
|
+
disabled: o,
|
|
88
|
+
...a,
|
|
89
|
+
onClick: l,
|
|
76
90
|
children: [
|
|
77
|
-
(
|
|
78
|
-
|
|
91
|
+
(d ?? "default") === "default" && !o && /* @__PURE__ */ t("span", { className: "pointer-events-none absolute inset-0 overflow-hidden rounded-[inherit] motion-reduce:hidden", children: /* @__PURE__ */ t("span", { className: "absolute inset-0 -translate-x-full bg-gradient-to-r from-transparent via-white/20 to-transparent transition-transform duration-0 ease-out [@media(hover:hover)_and_(pointer:fine)]:group-hover:translate-x-full [@media(hover:hover)_and_(pointer:fine)]:group-hover:duration-700" }) }),
|
|
92
|
+
b ? /* @__PURE__ */ m(
|
|
79
93
|
"svg",
|
|
80
94
|
{
|
|
81
|
-
className:
|
|
95
|
+
className: i("animate-spin", a.children && "mr-1 -ml-1"),
|
|
82
96
|
xmlns: "http://www.w3.org/2000/svg",
|
|
83
97
|
fill: "none",
|
|
84
98
|
viewBox: "0 0 24 24",
|
|
@@ -106,18 +120,18 @@ function _({
|
|
|
106
120
|
)
|
|
107
121
|
]
|
|
108
122
|
}
|
|
109
|
-
) :
|
|
110
|
-
|
|
123
|
+
) : c && /* @__PURE__ */ t(
|
|
124
|
+
g,
|
|
111
125
|
{
|
|
112
|
-
name:
|
|
126
|
+
name: c,
|
|
113
127
|
size: e === "default" ? "md" : e === "sm" ? "xs" : "sm"
|
|
114
128
|
}
|
|
115
129
|
),
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
130
|
+
a.children,
|
|
131
|
+
v && /* @__PURE__ */ t(
|
|
132
|
+
g,
|
|
119
133
|
{
|
|
120
|
-
name:
|
|
134
|
+
name: v,
|
|
121
135
|
size: e === "default" ? "md" : e === "sm" ? "xs" : "sm"
|
|
122
136
|
}
|
|
123
137
|
)
|
|
@@ -126,6 +140,6 @@ function _({
|
|
|
126
140
|
);
|
|
127
141
|
}
|
|
128
142
|
export {
|
|
129
|
-
|
|
130
|
-
|
|
143
|
+
j as Button,
|
|
144
|
+
f as buttonVariants
|
|
131
145
|
};
|