laif-ds 0.2.79 → 0.2.83
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 +28 -0
- package/dist/_virtual/index3.js +5 -5
- package/dist/_virtual/index4.js +5 -5
- package/dist/_virtual/index5.js +4 -4
- package/dist/agent-docs/adoption-report.json +9 -9
- package/dist/agent-docs/components/AppSelect.md +46 -0
- package/dist/agent-docs/components/Chat.md +1 -0
- package/dist/agent-docs/components/FileUploader.md +8 -3
- package/dist/agent-docs/manifest.json +11 -9
- package/dist/components/ui/app-select.js +232 -143
- package/dist/components/ui/chat.js +35 -33
- package/dist/components/ui/date-picker.js +184 -153
- package/dist/components/ui/file-previewer.js +66 -61
- package/dist/components/ui/file-uploader.js +116 -112
- package/dist/index.d.ts +5 -1
- package/dist/node_modules/eventemitter3/index.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/unified/lib/index.js +1 -1
- package/dist/styles.v3.css +1 -1
- package/package.json +1 -1
package/dist/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,34 @@ 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@0.2.82]
|
|
9
|
+
|
|
10
|
+
### 🚀 Added
|
|
11
|
+
|
|
12
|
+
- **Chat**: Added a `placeholder` prop forwarded to the message input, allowing a custom composer placeholder (defaults to `"Ask AI..."`)
|
|
13
|
+
|
|
14
|
+
## [laif-ds@0.2.81]
|
|
15
|
+
|
|
16
|
+
### 🚀 Added
|
|
17
|
+
|
|
18
|
+
- **FilePreviewer**: Added a `size` option to `PreviewOptions` (`sm` | `default` | `lg` | `xl` | `full`, defaults to `xl`) to control the preview dialog size per call
|
|
19
|
+
|
|
20
|
+
### 🔧 Changed
|
|
21
|
+
|
|
22
|
+
- **FilePreviewer**: Migrated from the low-level `Dialog` to `AppDialog`, simplifying the markup and relying on its built-in header and configurable sizing
|
|
23
|
+
|
|
24
|
+
## [laif-ds@0.2.80]
|
|
25
|
+
|
|
26
|
+
### 🚀 Added
|
|
27
|
+
|
|
28
|
+
- **AppSelect**: Added `selectableAll` prop (multi-select only, default `true`) — renders a tri-state checkbox toggle to the left of the search bar with four icon states (`Square` / `SquareMinus` / `SquareCheck` / `SquareDot`). Both select-all and deselect-all are scoped to the current search filter, preserving out-of-view selections and `fixed: true` items
|
|
29
|
+
- **DatePicker**: Added range dragging — in range mode, click and drag the `from` or `to` handle to extend or shrink the selected interval; the range automatically inverts when handles cross over
|
|
30
|
+
|
|
31
|
+
### 🔧 Changed
|
|
32
|
+
|
|
33
|
+
- **AppSelect**: Prevented automatic focus of the search input on popover open via `onOpenAutoFocus` — fixes the mobile soft-keyboard collapsing the visual viewport and pushing the dropdown off-screen
|
|
34
|
+
- **DatePicker**: Reworked range click behavior — a third click on a completed range now starts a new range from that day instead of resetting to empty; clicking an end-date earlier than the current `from` resets the start anchor to that day
|
|
35
|
+
|
|
8
36
|
## [laif-ds@0.2.79]
|
|
9
37
|
|
|
10
38
|
### 🚀 Added
|
package/dist/_virtual/index3.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 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);
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
m as default
|
|
8
8
|
};
|
package/dist/_virtual/index4.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { getDefaultExportFromCjs as
|
|
3
|
-
import { __require as
|
|
4
|
-
var t =
|
|
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/index5.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { getDefaultExportFromCjs as e } from "./_commonjsHelpers.js";
|
|
3
|
-
import { __require as
|
|
4
|
-
var
|
|
5
|
-
const
|
|
3
|
+
import { __require as r } from "../node_modules/extend/index.js";
|
|
4
|
+
var t = r();
|
|
5
|
+
const x = /* @__PURE__ */ e(t);
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
x as default
|
|
8
8
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": "1.0.0",
|
|
3
|
-
"generatedAt": "2026-
|
|
3
|
+
"generatedAt": "2026-06-09T07:56:53.942Z",
|
|
4
4
|
"package": {
|
|
5
5
|
"name": "laif-ds",
|
|
6
|
-
"version": "0.2.
|
|
6
|
+
"version": "0.2.83"
|
|
7
7
|
},
|
|
8
8
|
"summary": {
|
|
9
9
|
"scannedFiles": 394,
|
|
@@ -528,6 +528,13 @@
|
|
|
528
528
|
"src/components/ui/multiple-selector.tsx"
|
|
529
529
|
]
|
|
530
530
|
},
|
|
531
|
+
{
|
|
532
|
+
"className": "bg-muted/50 rounded p-4 text-sm",
|
|
533
|
+
"occurrences": 7,
|
|
534
|
+
"files": [
|
|
535
|
+
"src/components/stories/app-select.stories.tsx"
|
|
536
|
+
]
|
|
537
|
+
},
|
|
531
538
|
{
|
|
532
539
|
"className": "border-d-border border px-3 py-1 text-center text-sm font-light",
|
|
533
540
|
"occurrences": 7,
|
|
@@ -565,13 +572,6 @@
|
|
|
565
572
|
"src/components/stories/playground.stories.tsx"
|
|
566
573
|
]
|
|
567
574
|
},
|
|
568
|
-
{
|
|
569
|
-
"className": "bg-muted/50 rounded p-4 text-sm",
|
|
570
|
-
"occurrences": 6,
|
|
571
|
-
"files": [
|
|
572
|
-
"src/components/stories/app-select.stories.tsx"
|
|
573
|
-
]
|
|
574
|
-
},
|
|
575
575
|
{
|
|
576
576
|
"className": "mb-2 text-sm font-medium",
|
|
577
577
|
"occurrences": 6,
|
|
@@ -74,6 +74,7 @@ export type MultiSelectProps = BaseProps & {
|
|
|
74
74
|
renderValue?: (option: AppSelectOption) => React.ReactNode; // Custom render for selected values
|
|
75
75
|
maxSelected?: number; // Maximum number of selectable items
|
|
76
76
|
showChipsInsteadOfCount?: boolean; // Display chips instead of count (default: false)
|
|
77
|
+
selectableAll?: boolean; // Shows tri-state select-all toggle next to the search bar (default: true)
|
|
77
78
|
};
|
|
78
79
|
```
|
|
79
80
|
|
|
@@ -154,6 +155,19 @@ When options have a `group` property:
|
|
|
154
155
|
- Options without a group value (empty string, undefined, or missing) appear under the `noGroupLabel` heading
|
|
155
156
|
- Grouping is based on the `group` property of `AppSelectOption`
|
|
156
157
|
|
|
158
|
+
### Select All / Deselect All
|
|
159
|
+
|
|
160
|
+
In multiple mode with `selectableAll={true}` (default):
|
|
161
|
+
|
|
162
|
+
- A single tri-state checkbox-style toggle appears at the left of the search bar — replacing the search icon (or in a slim header bar when `searchable` is off)
|
|
163
|
+
- **`Square`** icon → no filtered options selected; click selects all matching the current filter (respects `maxSelected` cap)
|
|
164
|
+
- **`SquareMinus`** icon → some filtered options selected; click completes the selection (within the cap)
|
|
165
|
+
- **`SquareCheck`** icon → all filtered options selected (or `maxSelected` cap reached); click deselects only the currently-filtered items — **out-of-view selections and `fixed: true` items are preserved**
|
|
166
|
+
- **`SquareDot`** icon (disabled) → search yields no matches; the button stays visible but inactive so the layout doesn't collapse
|
|
167
|
+
- Both actions are scoped to the current search filter — symmetric, predictable, and prevents accidental data loss
|
|
168
|
+
- Uses `role="checkbox"` with dynamic `aria-checked` (`true` / `false` / `"mixed"`) and a hardcoded English `aria-label` (no per-project i18n required)
|
|
169
|
+
- Available only on multi-select; type-rejected on single-select. Opt out with `selectableAll={false}`
|
|
170
|
+
|
|
157
171
|
### Max Selection Limit
|
|
158
172
|
|
|
159
173
|
In multiple mode with `maxSelected` set:
|
|
@@ -420,6 +434,37 @@ export function SelectWithDisabled() {
|
|
|
420
434
|
}
|
|
421
435
|
```
|
|
422
436
|
|
|
437
|
+
### Multiple with Select All / Deselect All
|
|
438
|
+
|
|
439
|
+
```tsx
|
|
440
|
+
import { AppSelect } from "laif-ds";
|
|
441
|
+
import { useState } from "react";
|
|
442
|
+
|
|
443
|
+
const options = [
|
|
444
|
+
{ value: "react", label: "React" },
|
|
445
|
+
{ value: "vue", label: "Vue" },
|
|
446
|
+
{ value: "angular", label: "Angular" },
|
|
447
|
+
{ value: "svelte", label: "Svelte" },
|
|
448
|
+
];
|
|
449
|
+
|
|
450
|
+
export function SelectAllExample() {
|
|
451
|
+
const [values, setValues] = useState<(string | number)[]>([]);
|
|
452
|
+
|
|
453
|
+
return (
|
|
454
|
+
<AppSelect
|
|
455
|
+
multiple
|
|
456
|
+
selectableAll
|
|
457
|
+
searchable
|
|
458
|
+
options={options}
|
|
459
|
+
value={values}
|
|
460
|
+
onValueChange={setValues}
|
|
461
|
+
placeholder="Select frameworks"
|
|
462
|
+
label="Frameworks"
|
|
463
|
+
/>
|
|
464
|
+
);
|
|
465
|
+
}
|
|
466
|
+
```
|
|
467
|
+
|
|
423
468
|
### Custom Render Value
|
|
424
469
|
|
|
425
470
|
```tsx
|
|
@@ -462,3 +507,4 @@ export function CustomRenderSelect() {
|
|
|
462
507
|
- **Performance**: Efficient rendering with useMemo for computed values
|
|
463
508
|
- **Custom Rendering**: Use `renderValue` prop to customize how selected options appear in the trigger
|
|
464
509
|
- **Controlled Component Detection**: Uses `props.hasOwnProperty('value')` to determine if component is controlled, ensuring stable behavior even when value is `undefined`
|
|
510
|
+
- **Mobile Keyboard**: Popover prevents default auto-focus on open via `onOpenAutoFocus`, so the soft keyboard does not pop up automatically when `searchable` is enabled. This avoids the visual-viewport collapse that previously caused the dropdown to flip off-screen on mobile. Tap the search input to focus it explicitly when needed.
|
|
@@ -25,6 +25,7 @@ Complete chat interface: message list with markdown rendering, auto-scroll and t
|
|
|
25
25
|
| `suggestions` | `string[]` | `undefined` | Suggestions displayed when empty. Requires `append`. |
|
|
26
26
|
| `className` | `string` | `undefined` | Wrapper classes. |
|
|
27
27
|
| `welcomeTitle` | `string` | `"Da dove iniziamo?"` | Title shown in empty state. |
|
|
28
|
+
| `placeholder` | `string` | `"Ask AI..."` | Placeholder text for the composer input. |
|
|
28
29
|
|
|
29
30
|
---
|
|
30
31
|
|
|
@@ -12,7 +12,8 @@ Drag-and-drop uploader with keyboard activation, file type filtering, limits (co
|
|
|
12
12
|
| ------------------- | ------------------------- | -------------------------------------------------- | --------------------------------------------------------- |
|
|
13
13
|
| `extensions` | `AcceptItem[]` | `["pdf","image","video","audio"]` | Allowed extensions/categories (maps to accept attribute). |
|
|
14
14
|
| `multiple` | `boolean` | `false` | Enables multiple file selection. |
|
|
15
|
-
| `onUpload` | `(files: File[]) => void` | `undefined` | Called
|
|
15
|
+
| `onUpload` | `(files: File[]) => void` | `undefined` | Called when files are **added**, with the resulting list. |
|
|
16
|
+
| `onRemove` | `(removed: File[], remaining: File[]) => void` | `undefined` | Called when files are **removed** (single or remove-all), with the removed files and the list that remains. |
|
|
16
17
|
| `description` | `string` | `"Trascina un file o clicca per selezionare"` | Dropzone hint. |
|
|
17
18
|
| `formatDescription` | `string` | `"Formato accettato: PDF, Immagini, Video, Audio"` | Accepted formats hint. |
|
|
18
19
|
| `selectedLabel` | `string` | `"File selezionati"` | Title shown above selected files list. |
|
|
@@ -30,7 +31,7 @@ Drag-and-drop uploader with keyboard activation, file type filtering, limits (co
|
|
|
30
31
|
- **Filtering**: `extensions` map to accept string; only matching files are added.
|
|
31
32
|
- **Limits**: Enforces `maxFiles` and `maxTotalSize` (with compact error caption).
|
|
32
33
|
- **Previews**: Renders selected files with `FilePreview`; supports remove per file and remove-all.
|
|
33
|
-
- **Integration**: `onUpload`
|
|
34
|
+
- **Integration**: `onUpload` fires on **add** with the resulting `File[]`; `onRemove` fires on **removal** (single file or remove-all) with the removed files and the remaining list. Removals do **not** trigger `onUpload` — a consumer mirroring the list in its own state must handle both callbacks (see example below).
|
|
34
35
|
|
|
35
36
|
---
|
|
36
37
|
|
|
@@ -127,7 +128,11 @@ export function ExternalUploadExample() {
|
|
|
127
128
|
|
|
128
129
|
return (
|
|
129
130
|
<div className="space-y-4">
|
|
130
|
-
<FileUploader
|
|
131
|
+
<FileUploader
|
|
132
|
+
multiple
|
|
133
|
+
onUpload={setFiles}
|
|
134
|
+
onRemove={(_removed, remaining) => setFiles(remaining)}
|
|
135
|
+
/>
|
|
131
136
|
{files.length > 0 && (
|
|
132
137
|
<div className="flex justify-end">
|
|
133
138
|
<Button onClick={handleSubmit} isLoading={loading} iconLeft="Upload">
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": "1.1.0",
|
|
3
|
-
"generatedAt": "2026-
|
|
3
|
+
"generatedAt": "2026-06-09T07:56:53.318Z",
|
|
4
4
|
"package": {
|
|
5
5
|
"name": "laif-ds",
|
|
6
|
-
"version": "0.2.
|
|
6
|
+
"version": "0.2.83"
|
|
7
7
|
},
|
|
8
8
|
"stats": {
|
|
9
9
|
"documentedComponentCount": 92,
|
|
@@ -847,6 +847,7 @@
|
|
|
847
847
|
"Search Functionality",
|
|
848
848
|
"Creatable Options",
|
|
849
849
|
"Grouping",
|
|
850
|
+
"Select All / Deselect All",
|
|
850
851
|
"Max Selection Limit",
|
|
851
852
|
"Chips Display",
|
|
852
853
|
"Disabled Options",
|
|
@@ -858,6 +859,7 @@
|
|
|
858
859
|
"Custom JSX Labels",
|
|
859
860
|
"Clearable Single Select",
|
|
860
861
|
"With Disabled Options",
|
|
862
|
+
"Multiple with Select All / Deselect All",
|
|
861
863
|
"Custom Render Value"
|
|
862
864
|
],
|
|
863
865
|
"controlledPattern": "controlled-uncontrolled-documented",
|
|
@@ -1932,10 +1934,10 @@
|
|
|
1932
1934
|
},
|
|
1933
1935
|
"metadata": {
|
|
1934
1936
|
"props": {
|
|
1935
|
-
"totalProps":
|
|
1937
|
+
"totalProps": 16,
|
|
1936
1938
|
"requiredPropsCount": 4,
|
|
1937
|
-
"typedPropsCount":
|
|
1938
|
-
"describedPropsCount":
|
|
1939
|
+
"typedPropsCount": 16,
|
|
1940
|
+
"describedPropsCount": 16
|
|
1939
1941
|
},
|
|
1940
1942
|
"accessibility": {
|
|
1941
1943
|
"hasCoverage": false
|
|
@@ -3167,10 +3169,10 @@
|
|
|
3167
3169
|
},
|
|
3168
3170
|
"metadata": {
|
|
3169
3171
|
"props": {
|
|
3170
|
-
"totalProps":
|
|
3172
|
+
"totalProps": 10,
|
|
3171
3173
|
"requiredPropsCount": 0,
|
|
3172
|
-
"typedPropsCount":
|
|
3173
|
-
"describedPropsCount":
|
|
3174
|
+
"typedPropsCount": 10,
|
|
3175
|
+
"describedPropsCount": 10
|
|
3174
3176
|
},
|
|
3175
3177
|
"accessibility": {
|
|
3176
3178
|
"hasCoverage": true
|
|
@@ -6059,5 +6061,5 @@
|
|
|
6059
6061
|
]
|
|
6060
6062
|
}
|
|
6061
6063
|
],
|
|
6062
|
-
"checksum": "
|
|
6064
|
+
"checksum": "911fd5d24f66568dc9007439161320c179ac69eaed81a631fe5b38ffc901e9c7"
|
|
6063
6065
|
}
|