github ing-bank/lion @lion/ui@0.22.0

latest release: providence-analytics@0.20.0
3 hours ago

Minor Changes

  • b20f8f7: Combobox will correctly fire model-value-changed when text box value is leading

  • 11097cc: Fix: Initial model value takes initialModelValue.amount when available

  • c2612e3: Restore the visibility of private and protected members in the published declarations.

    TypeScript 7 no longer emits the JSDoc @private/@protected modifier for a member that is declared
    only by an assignment inside the constructor. Where TS 4.9.5 emitted private __data;, TS 7 emitted
    __data; - so private members became public and untyped ones, and any consumer that does not set
    skipLibCheck reported TS7008: Member '...' implicitly has an 'any' type (42 such errors in a
    representative consumer, 0 before).

    The affected members are restored by scripts/types-restore-visibility.js, which is wired into
    wireit.types right after tsc and re-attaches the modifier from the emitted JSDoc: the six Lit reactive properties, which cannot take a field
    without shadowing the accessor Lit installs (everything else is declared in the sources now), byte-for-byte the
    TS 4.9.5 output (private x;, protected y: T;). It touches no source and
    therefore has no runtime impact - which is what makes it the only route for the members that are Lit
    reactive properties, where a class-body field would shadow the accessor Lit installs on the prototype.
    The script is a temporary workaround for the TS 7 declaration emit (upstream issue linked in its
    header) and can be deleted once that is fixed.

    Consumers that type-check the published declarations with skipLibCheck: false:
    15 errors with the TS 4.9.5 emit -> 49 with the TS 7 emit before these fixes -> 0 now
    (0 x TS7008 in the last two, 42 x before), measured on TS 7 and on TS 4.7.4. Neither a consumer nor
    Lion's own build needs the flag any more: it is removed from the root tsconfig, and the one third-party
    declaration that required it (@open-wc/semantic-dom-diff, pinned to 0.21.0 through an override, which
    replaces the patch its 0.20.1 needed) no longer does. The rest of the work was in the declarations: four
    member kinds that disagreed across the hand-written Hosts, and a protected member named in a validator
    declaration's signature. With that, the hand-written Hosts publish exactly the visibility they did under
    TS 4.9.5 - all 21 emitted types/*.d.ts files match the 4.9.5 emit member for member.

    Also: the *-translations/* export subpaths now expose types, so consumers no longer get TS7016 for
    @lion/ui/<component>-translations/<locale>.js.

  • 986da77: Migrate the type build to TypeScript 7.

    Emitted declarations are now produced by TS 7 and no longer need the post-build correction
    script, which has been removed - the script file, its npm script, the wireit.types chain
    and the rationale docs. TS 7 emits portable specifiers itself (lit,
    @open-wc/scoped-elements/lit-element.js), and type-checks this package about 6x faster
    (measured cold tsc --build --force of singleton-manager + ui: 4.9.5 29.1s/30.2s vs
    7.0.2 4.8s/4.2s; both emitting 972 declarations).

    Also fixed: declarations that were invalid under TS 7 while valid under 4.9.5
    (export { undefined as X } from post-class statics, now hoisted into the class bodies);
    the un-done TS 4.9 -> 5.x migration (super.<field> access, mixin signatures, and
    suppressImplicitAnyIndexErrors which TS 5.5 removed); and JSDoc/JS constructs TS 7 parses
    differently (bare ? type arguments, values used as types, @readonly on getters).

    The published entry points are unaffected: across all 67 dist-types/exports/ barrels the
    exported names and re-export targets are identical (0 differences). 66 of them differ
    textually only in the quote style of their re-export specifiers ("..." under 4.9.5,
    '...' under TS 7). Declaration forms can differ too - TS 7 writes
    export declare const f: (..) => T where 4.9.5 wrote export function f(..): T, with the same
    name and signature - which is not observable to consumers.

Patch Changes

  • 61b5adb: [form-core] gate FormGroup feedback visibility on interaction state

    FormGroupMixin (lion-form, lion-fieldset) no longer sets aria-invalid="true" / shows-feedback-for="error" before user interaction when the group merely contains invalid children (e.g. a pristine Required field). The group now applies the same feedback-visibility rule as fields and choice groups ((touched && dirty) || prefilled || submitted) via a _showFeedbackConditionFor override, so aria-invalid aligns with actually visible errors again. hasFeedbackFor and validationStates keep reflecting the group's (in)validity.

  • 2697313: Prevent select-rich teardown from failing before its overlay controller is initialized.

  • c908251: Add JetBrains web-types generation and metadata to package.json

  • 20a718a: [validate] guard ValidateMixin's showsFeedbackFor custom converters

    Fixes a crash (Uncaught TypeError: can't access property "split", value is null) in ValidateMixin when the reflected shows-feedback-for attribute is removed from the host element by external code (e.g. Storybook), instead of being set to the empty string. The fromAttribute custom converter now falls back to [].

Don't miss a new lion release

NewReleases is sending notifications on new releases.