@cahyo-dimas/freeday 1.39.0 → 1.40.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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,29 @@
3
3
  Semua perubahan penting dicatat di sini. Format longgar mengikuti
4
4
  [Keep a Changelog](https://keepachangelog.com/); tiap versi = git tag.
5
5
 
6
+ ## [1.40.0] — 2026-08-19
7
+ One note from the back-office app (IDU_EMATE_APPL_WEB, #017).
8
+ ### Fixed
9
+ - **A picker inside a `.fdy-field` now fills it.** `.fdy-field`, `.fdy-combo` and
10
+ `.fdy-input-group` all cap at 22rem; `.fdy-datepicker` capped at 14rem and `.fdy-timepicker`
11
+ at 11rem. In a two-column form grid that left a **224px** date box beside a **319px** combo —
12
+ measured, not eyeballed — and the row read as ragged with no fix available to the consuming
13
+ app, because the cap sits on the component. `.fdy-field > .fdy-datepicker` / `> .fdy-timepicker`
14
+ / `> .fdy-daterange` drop the cap; a picker standing on its own keeps its narrower width, which
15
+ is right for a short value.
16
+
17
+ ### Added — guards
18
+ - **The enhancer string contract is asserted in a real browser** (#016). 1.39.0 moved every
19
+ user-facing string in **nine** enhancers into a `TEXT` table read through `textOf()`, and only
20
+ **one of the nine** — upload — had any browser coverage at all. The node guard proves the
21
+ literals *sit* in the table; it reads the source as text and cannot prove the wiring *runs*, so a
22
+ `zone` out of scope or a `getAttribute` on a non-element would have thrown at init with all 51
23
+ node tests still green. `browser/text-override.mjs` initialises table, stepper, mask, carousel,
24
+ cascade, form and toast on real markup and asserts **both halves**: the documented Indonesian
25
+ default still renders, and `data-fdy-text-*` wins. The default is a contract too — an enhancer
26
+ that quietly turned English would be a breaking change wearing a bugfix's clothes.
27
+ Mutation-tested: making `textOf()` ignore the attribute fails it by name and value.
28
+
6
29
  ## [1.39.0] — 2026-08-19
7
30
  The sweep #013 §2 filed and #015 restated: the vanilla enhancers' strings are reachable now.
8
31
  ### Added
@@ -1112,6 +1112,12 @@ a { color: var(--color-primary); }
1112
1112
  /* Freeday — Date picker (input-styled trigger + calendar popover).
1113
1113
  * Built by freeday-datepicker.js from an empty [data-fdy-datepicker] wrapper. */
1114
1114
  .fdy-datepicker{position:relative;display:inline-block;width:100%;max-width:14rem;}
1115
+ /* Inside a labelled field, a picker fills the field like every other control.
1116
+ The 14rem/11rem caps above suit a picker standing on its own; in a form grid
1117
+ they leave the date box visibly short of the combo beside it — 224px against
1118
+ 319px in a two-column layout — and the row reads as ragged. The field's own
1119
+ max-width is what should govern there. */
1120
+ .fdy-field>.fdy-datepicker,.fdy-field>.fdy-timepicker,.fdy-field>.fdy-daterange{max-width:none;}
1115
1121
  .fdy-datepicker__trigger{display:inline-flex;align-items:center;gap:var(--space-2);width:100%;height:var(--control-h);padding:0 var(--space-3);text-align:left;cursor:pointer;font-family:var(--font-body);font-size:var(--text-sm);color:var(--color-text);background:var(--color-surface);border:1.5px solid var(--color-control-border);border-radius:var(--radius-md);box-shadow:inset 0 1px 2px rgba(16,14,30,.06);transition:border-color var(--dur-fast) var(--ease-standard),box-shadow var(--dur-fast) var(--ease-standard);}
1116
1122
  .fdy-datepicker__trigger:hover{border-color:var(--color-text-muted);}
1117
1123
  .fdy-datepicker__trigger:focus-visible{outline:none;border-color:var(--color-primary);box-shadow:inset 0 1px 2px rgba(16,14,30,.04),0 0 0 3px color-mix(in srgb,var(--color-primary) 26%,transparent);}
package/dist/freeday.css CHANGED
@@ -729,6 +729,12 @@ a { color: var(--color-primary); }
729
729
  /* Freeday — Date picker (input-styled trigger + calendar popover).
730
730
  * Built by freeday-datepicker.js from an empty [data-fdy-datepicker] wrapper. */
731
731
  .fdy-datepicker{position:relative;display:inline-block;width:100%;max-width:14rem;}
732
+ /* Inside a labelled field, a picker fills the field like every other control.
733
+ The 14rem/11rem caps above suit a picker standing on its own; in a form grid
734
+ they leave the date box visibly short of the combo beside it — 224px against
735
+ 319px in a two-column layout — and the row reads as ragged. The field's own
736
+ max-width is what should govern there. */
737
+ .fdy-field>.fdy-datepicker,.fdy-field>.fdy-timepicker,.fdy-field>.fdy-daterange{max-width:none;}
732
738
  .fdy-datepicker__trigger{display:inline-flex;align-items:center;gap:var(--space-2);width:100%;height:var(--control-h);padding:0 var(--space-3);text-align:left;cursor:pointer;font-family:var(--font-body);font-size:var(--text-sm);color:var(--color-text);background:var(--color-surface);border:1.5px solid var(--color-control-border);border-radius:var(--radius-md);box-shadow:inset 0 1px 2px rgba(16,14,30,.06);transition:border-color var(--dur-fast) var(--ease-standard),box-shadow var(--dur-fast) var(--ease-standard);}
733
739
  .fdy-datepicker__trigger:hover{border-color:var(--color-text-muted);}
734
740
  .fdy-datepicker__trigger:focus-visible{outline:none;border-color:var(--color-primary);box-shadow:inset 0 1px 2px rgba(16,14,30,.04),0 0 0 3px color-mix(in srgb,var(--color-primary) 26%,transparent);}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cahyo-dimas/freeday",
3
- "version": "1.39.0",
3
+ "version": "1.40.0",
4
4
  "description": "Freeday — token-driven, framework-agnostic UI KIT (design source-of-truth).",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -92,7 +92,7 @@
92
92
  "scripts": {
93
93
  "build": "node tokens/build.mjs",
94
94
  "test": "node --test",
95
- "test:browser": "node --test browser/vanilla.mjs browser/adapter.mjs browser/layout.mjs browser/theme.mjs browser/state.mjs browser/root-init.mjs browser/upload-states.mjs browser/number.mjs browser/card-stretch.mjs",
95
+ "test:browser": "node --test browser/vanilla.mjs browser/adapter.mjs browser/layout.mjs browser/theme.mjs browser/state.mjs browser/root-init.mjs browser/upload-states.mjs browser/number.mjs browser/card-stretch.mjs browser/text-override.mjs",
96
96
  "prepack": "node tokens/build.mjs",
97
97
  "version": "node tokens/build.mjs && git add dist",
98
98
  "typecheck:react": "tsc -p adapters/react/tsconfig.json --noEmit"
@@ -1,6 +1,12 @@
1
1
  /* Freeday — Date picker (input-styled trigger + calendar popover).
2
2
  * Built by freeday-datepicker.js from an empty [data-fdy-datepicker] wrapper. */
3
3
  .fdy-datepicker{position:relative;display:inline-block;width:100%;max-width:14rem;}
4
+ /* Inside a labelled field, a picker fills the field like every other control.
5
+ The 14rem/11rem caps above suit a picker standing on its own; in a form grid
6
+ they leave the date box visibly short of the combo beside it — 224px against
7
+ 319px in a two-column layout — and the row reads as ragged. The field's own
8
+ max-width is what should govern there. */
9
+ .fdy-field>.fdy-datepicker,.fdy-field>.fdy-timepicker,.fdy-field>.fdy-daterange{max-width:none;}
4
10
  .fdy-datepicker__trigger{display:inline-flex;align-items:center;gap:var(--space-2);width:100%;height:var(--control-h);padding:0 var(--space-3);text-align:left;cursor:pointer;font-family:var(--font-body);font-size:var(--text-sm);color:var(--color-text);background:var(--color-surface);border:1.5px solid var(--color-control-border);border-radius:var(--radius-md);box-shadow:inset 0 1px 2px rgba(16,14,30,.06);transition:border-color var(--dur-fast) var(--ease-standard),box-shadow var(--dur-fast) var(--ease-standard);}
5
11
  .fdy-datepicker__trigger:hover{border-color:var(--color-text-muted);}
6
12
  .fdy-datepicker__trigger:focus-visible{outline:none;border-color:var(--color-primary);box-shadow:inset 0 1px 2px rgba(16,14,30,.04),0 0 0 3px color-mix(in srgb,var(--color-primary) 26%,transparent);}