@arquimedes.co/eureka-forms 3.0.61 → 3.0.62
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/App/App.stories.d.ts +1 -1
- package/dist/App/App.stories.js +2 -2
- package/dist/FormSteps/CheckBoxStep/CheckBoxStep.mobileLabel.test.js +3 -3
- package/dist/FormSteps/CheckBoxStep/MaterialCheckBoxStep/MaterialCheckBoxStep.js +1 -1
- package/dist/FormSteps/CheckBoxStep/MaterialCheckBoxStep/MaterialCheckBoxStep.module.css +2 -2
- package/package.json +1 -1
|
@@ -31,7 +31,7 @@ export declare const Postview: Story;
|
|
|
31
31
|
/**
|
|
32
32
|
* Every checkbox variant in one form: sizes 1–4, required, description, list mode, long
|
|
33
33
|
* labels, nested `steps` / `uncheckedSteps`, and a checkbox inside a collapsible. Resize the
|
|
34
|
-
* preview below ~900px to see the collapsed label mode (100% width,
|
|
34
|
+
* preview below ~900px to see the collapsed label mode (100% width, 1-line clamp, "ver más").
|
|
35
35
|
* Inside the collapsible, close/reopen it and then check the checkbox to reproduce the clipped
|
|
36
36
|
* nested steps.
|
|
37
37
|
*/
|
package/dist/App/App.stories.js
CHANGED
|
@@ -299,7 +299,7 @@ export const Postview = {
|
|
|
299
299
|
// ---------------------------------------------------------------------------------------------
|
|
300
300
|
// Checkboxes: a full form exercising every checkbox variant side by side (sizes, required,
|
|
301
301
|
// description, list mode, long label, nested steps, uncheckedSteps and a checkbox inside a
|
|
302
|
-
// collapsible). Resize the preview to see the collapsed (100% width,
|
|
302
|
+
// collapsible). Resize the preview to see the collapsed (100% width, 1-line clamp) label mode.
|
|
303
303
|
// ---------------------------------------------------------------------------------------------
|
|
304
304
|
const cbTextInput = (id, label, size = 2) => ({
|
|
305
305
|
id,
|
|
@@ -452,7 +452,7 @@ const checkboxesForm = {
|
|
|
452
452
|
/**
|
|
453
453
|
* Every checkbox variant in one form: sizes 1–4, required, description, list mode, long
|
|
454
454
|
* labels, nested `steps` / `uncheckedSteps`, and a checkbox inside a collapsible. Resize the
|
|
455
|
-
* preview below ~900px to see the collapsed label mode (100% width,
|
|
455
|
+
* preview below ~900px to see the collapsed label mode (100% width, 1-line clamp, "ver más").
|
|
456
456
|
* Inside the collapsible, close/reopen it and then check the checkbox to reproduce the clipped
|
|
457
457
|
* nested steps.
|
|
458
458
|
*/
|
|
@@ -65,7 +65,7 @@ function getLabelDiv() {
|
|
|
65
65
|
// the leaf div holding only the label text (the wrapping column also matches by textContent)
|
|
66
66
|
return screen.getByText((_, element) => element?.tagName === 'DIV' && element.children.length === 0 && element.textContent === `${LONG_LABEL}:`);
|
|
67
67
|
}
|
|
68
|
-
/** Makes every element report a
|
|
68
|
+
/** Makes every element report a 1-line-clamped overflow (jsdom has no layout). */
|
|
69
69
|
function mockLabelOverflow() {
|
|
70
70
|
Object.defineProperty(HTMLElement.prototype, 'scrollHeight', {
|
|
71
71
|
configurable: true,
|
|
@@ -76,7 +76,7 @@ function mockLabelOverflow() {
|
|
|
76
76
|
Object.defineProperty(HTMLElement.prototype, 'clientHeight', {
|
|
77
77
|
configurable: true,
|
|
78
78
|
get() {
|
|
79
|
-
return
|
|
79
|
+
return 24;
|
|
80
80
|
},
|
|
81
81
|
});
|
|
82
82
|
}
|
|
@@ -86,7 +86,7 @@ afterEach(() => {
|
|
|
86
86
|
delete HTMLElement.prototype.clientHeight;
|
|
87
87
|
});
|
|
88
88
|
describe('CheckBoxStep long labels', () => {
|
|
89
|
-
it('
|
|
89
|
+
it('clamps the label to 1 line with a toggle instead of a plain ellipsis when the step collapses to 100% width', () => {
|
|
90
90
|
// breakpoint 1 <= size 2 → MaterialInputContainer renders the step at width: 100%
|
|
91
91
|
render(_jsx(Harness, { currentBreakPoint: 1 }));
|
|
92
92
|
const label = getLabelDiv();
|
|
@@ -19,7 +19,7 @@ function CheckBoxStep({ step, editable }) {
|
|
|
19
19
|
const { formStyle, postview } = useAppSelector((state) => state.global);
|
|
20
20
|
const form = useContext(FormContext);
|
|
21
21
|
const widthStats = useAppSelector(selectWidthStats);
|
|
22
|
-
// The label is clamped to
|
|
22
|
+
// The label is clamped to 1 line with a "ver más" toggle at every width. A plain
|
|
23
23
|
// ellipsis was used while the step kept its fixed desktop pixel width, but that left long
|
|
24
24
|
// labels unreadable wherever the step is narrow (e.g. a size-1 checkbox on a phone where 2
|
|
25
25
|
// columns fit).
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arquimedes.co/eureka-forms",
|
|
3
3
|
"repository": "git://github.com/Arquimede5/Eureka-Forms.git",
|
|
4
|
-
"version": "3.0.
|
|
4
|
+
"version": "3.0.62",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"watch": "node node_modules/@typescript/native/bin/tsc --noEmit --watch --project tsconfig.app.json",
|
|
7
7
|
"start": "vite",
|