Fundamental white label web component features for your design system.
MIT License
Bot releases are visible (Hide)
Published by github-actions[bot] 8 months ago
Published by github-actions[bot] 8 months ago
Published by github-actions[bot] 8 months ago
Published by github-actions[bot] 8 months ago
Published by github-actions[bot] 8 months ago
Published by github-actions[bot] 8 months ago
aeab467c: [checkbox-group] add role="list" and role="listitem" to checkbox-indeterminate and its children
aeab467c: migrate deprecated performUpdate
api to scheduleUpdate
aeab467c: [form-core]: set aria-disabled next to the disabled attribute for NVDA screen reader
aeab467c: [form-core] remove fieldset label/helpt-text from input-field aria-labelledby/aria-describedby. See https://github.com/ing-bank/lion/issues/1576
aeab467c: [input-range] add screen-reader labels for minimum and maximum value
aeab467c: feat: split validate-messages-no-side-effects methods, so they can be bundled along with entrypoints.
For optimized bundling, it's reccommended to load feedback messages per entrypoint. For instance, when you only use form-core in your app:
import { LionInputTel } from '@lion/ui/input-tel.js';
import { getLocalizeManager } from '@lion/ui/localize-no-side-effects.js';
import { loadInputTelMessagesNoSideEffects } from '@lion/ui/validate-messages-no-side-effects.js';
export class MyInputTel extends LionInputTel {
constructor() {
super();
loadInputTelMessagesNoSideEffects({ localize: getLocalizeManager() });
}
}
This prevents you from loading unused entrypoints like input-tel (which loads a full phone validation library) etc.
aeab467c: [form-core] order aria-labelledby and aria-describedby based on slot order instead of dom order
Published by github-actions[bot] 8 months ago
Published by github-actions[bot] 8 months ago
Published by github-actions[bot] 8 months ago
04d08683: BREAKING: Only add XSRF token on mutable requests and on same origin or whitelisted origins
Previously the XSRF token was added to any call to any origin.
This is changed in two ways.
(1) The token is now only attached to requests that are POST/PUT/PATCH/DELETE.
(2) It will validate if the request origin is the same as current origin or when the origin is in the xsrfTrustedOrigins.
This is a fix for a vulnerability: we inadvertently revealed the confidential XSRF-TOKEN stored in cookies by including it in the HTTP header X-XSRF-TOKEN for every request made to any host. This allowed attackers to view sensitive information.
Published by github-actions[bot] 8 months ago
BREAKING:
Published by github-actions[bot] 8 months ago
allow-custom-choice
(former requireOptionMatch=false) and make it compatible with multiple-choice
allow-custom-choice
(former requireOptionMatch=false) doesn't clear selectionb44bfc5d: [calendar] updates:
137a1b6c: lion-input-file: added isDragging property
update
instead of updated
(like it already was for shadow dom),updated
loop.elementToFocusAfterHide
is in viewport when dialog is closedadfa29a0: [switch] remove one of the two role="switch" (nested-interactive). Only leave it on the switch-button.
0d4c42ab: [listbox] allow use of arrow keys when focus is not on listbox
42a463ee: Set padding of to 0 so it doesn't show a weird 1em width/height box due to user agent styles.
3256892c: lion-switch: checked-changed event is no longer fired on element initialization when checked is set through attribute
3f1c83a1: lion-accordion: changed selectors for invokers and content to only select slotted elements that are direct descendants. This is to prevent that slotted elements in accordion content and invokers are also selected and the amount of invokers and content is incorrect
a2b81b26: [combobox] Multiple improvements:
requireOptionMatch
flag.MatchesOption
validator to check if the value is matching an option.1f018baf: feat(@lion/ui): add _invokerIconTemplate to LionInputDatepicker
showAllOnEmpty
allowOverridesForExistingNamespaces
option to constructor
argument to allow for changing data in a namespace for a given localetrapsKeyboardFocus:true
, like the bottomsheet created via withBottomSheetConfig()
. When the overlay is closed the attribute is removed.cee40e55: Side-effect-free alternative for localize
(the globally shared instance of LocalizeManager).
When this function is imported, no side-effect happened yet, i.e. no global instance was registered yet.
The side effect-free approach generates:
Also see: https://github.com/ing-bank/lion/discussions/1861
Use it like this:
function myFunction() {
// note that 'localizeManager' is the same as former 'localize'
const localizeManager = getLocalizeManger();
// ...
}
In a class, we advise a shared instance:
class MyClass {
constructor() {
this._localizeManager = getLocalizeManger();
}
// ...
}
Make sure to always call this method inside a function or class (otherwise side effects are created)
Do you want to register your own LocalizeManager?
Make sure it's registered before anyone called getLocalizeManager()
import { singletonManager } from 'singleton-manager';
import { getLocalizeManger } from '@lion/ui/localize-no-side-effects.js';
// First register your own LocalizeManager (for deduping or other reasons)
singletonManager.set('lion/ui::localize::0.x', class MyLocalizeManager extends LocalizeManager {});
// Now, all your code gets the right instance
export function myFn() {
const localizeManager = getLocalizeManager();
// ...
}
export class myClass() {
constructor() {
this._localizeManager = getLocalizeManager();
// ...
}
}
0efce8e1: [localize] parse negative numbers
a47a6e61: lion-select: added test to assert that modelValue of lion-select is updated when the value or text of one or more options are changed
@lion/ui
beta 0.1.0localizeNamespaces()
of the localize mixin to allow NamespaceObject[]
accordion
: rearranging invokers and content for a correct tab order is now implemented by changing the slot attributes of both instead of moving them, changed css for this implementation, updated testsaccordion
: narrowed the scope of the selectors that query [slot=invoker] and [slot=content] to prevent that any nested elements with [slot=invoker] and [slot=content] are moved to slot=_accordion as well36910e5d: datepicker uses no calender-overlay-frame element anymore
64c0e26c: Overlay System uses <dialog>
for top layer functionality of all overlays.
This means overlays positioned relative to viewport won't be moved to the body.
This has many benefits for the App Developer:
There could be small differences in timings though (usually we're done rendering quicker now).
Code that relies on side effects could be affected. Like:
For most users using either OverlayController, OverlayMixin or an element that uses OverlayMixin (like LionInputDatepicker, LionRichSelect etc. etc.)
nothing will change in the public api.
00063d73: depend on @popperjs/core
f0e6ee92: BREAKING: remove setIcons, setOverlays, setLocalize.
Recommended approach is to do below at the top of your app (before lion code runs):
import { singletonManager } from 'singleton-manager';
import { LocalizeManager } from '@lion/ui/localize-no-side-effects.js';
class MyLocalizeManager extends LocalizeManager {}
singletonManager.set('@lion/ui::localize::0.x', new MyLocalizeManager());
de51dae2: Use the correct names for singleton registrations
@open-wc/scoped-elements
to a version that exposes its types.e08b6bec: This introduces a new package @lion/ui
which is a collection of UI components that can be used in your application. It contains all the components/systems that used to be distributed via separate @lion/*
packages.
This is a breaking as you will need to import all components from @lion/ui
instead of @lion/*
packages now.
- import { LionAccordion } from '@lion/accordion';
+ import { LionAccordion } from '@lion/ui/accordion.js';
This is also true for element registrations
- import '@lion/accordion/define';
+ import '@lion/ui/define/lion-accordion.js';
Essentially the whole public API e.g. all the available exports can be found in the exports folder.
The package only supports TS 4.7+ using "moduleResolution": "Node16"
or "moduleResolution": "NodeNext"
as described in the TS 4.7 Announcement.
This package will have a new single CHANGELOG.md for the whole package. If you are interested the older individual changelogs then you can find them in the _legacy-changelogs folder.
This new version also includes the following changes for it's containing components:
Note: This package is considered alpha until extending docs and type exports are verified.
Updated dependencies [e08b6bec]
Published by github-actions[bot] 8 months ago
Published by github-actions[bot] 8 months ago
Published by github-actions[bot] 9 months ago
Published by github-actions[bot] 10 months ago
allow-custom-choice
(former requireOptionMatch=false) and make it compatible with multiple-choice
allow-custom-choice
(former requireOptionMatch=false) doesn't clear selectionb44bfc5d: [calendar] updates:
137a1b6c: lion-input-file: added isDragging property
update
instead of updated
(like it already was for shadow dom),updated
loop.elementToFocusAfterHide
is in viewport when dialog is closedadfa29a0: [switch] remove one of the two role="switch" (nested-interactive). Only leave it on the switch-button.
0d4c42ab: [listbox] allow use of arrow keys when focus is not on listbox
42a463ee: Set padding of to 0 so it doesn't show a weird 1em width/height box due to user agent styles.
3256892c: lion-switch: checked-changed event is no longer fired on element initialization when checked is set through attribute
3f1c83a1: lion-accordion: changed selectors for invokers and content to only select slotted elements that are direct descendants. This is to prevent that slotted elements in accordion content and invokers are also selected and the amount of invokers and content is incorrect
a2b81b26: [combobox] Multiple improvements:
requireOptionMatch
flag.MatchesOption
validator to check if the value is matching an option.1f018baf: feat(@lion/ui): add _invokerIconTemplate to LionInputDatepicker
showAllOnEmpty
allowOverridesForExistingNamespaces
option to constructor
argument to allow for changing data in a namespace for a given localetrapsKeyboardFocus:true
, like the bottomsheet created via withBottomSheetConfig()
. When the overlay is closed the attribute is removed.cee40e55: Side-effect-free alternative for localize
(the globally shared instance of LocalizeManager).
When this function is imported, no side-effect happened yet, i.e. no global instance was registered yet.
The side effect-free approach generates:
Also see: https://github.com/ing-bank/lion/discussions/1861
Use it like this:
function myFunction() {
// note that 'localizeManager' is the same as former 'localize'
const localizeManager = getLocalizeManger();
// ...
}
In a class, we advise a shared instance:
class MyClass {
constructor() {
this._localizeManager = getLocalizeManger();
}
// ...
}
Make sure to always call this method inside a function or class (otherwise side effects are created)
Do you want to register your own LocalizeManager?
Make sure it's registered before anyone called getLocalizeManager()
import { singletonManager } from 'singleton-manager';
import { getLocalizeManger } from '@lion/ui/localize-no-side-effects.js';
// First register your own LocalizeManager (for deduping or other reasons)
singletonManager.set('lion/ui::localize::0.x', class MyLocalizeManager extends LocalizeManager {});
// Now, all your code gets the right instance
export function myFn() {
const localizeManager = getLocalizeManager();
// ...
}
export class myClass() {
constructor() {
this._localizeManager = getLocalizeManager();
// ...
}
}
0efce8e1: [localize] parse negative numbers
a47a6e61: lion-select: added test to assert that modelValue of lion-select is updated when the value or text of one or more options are changed
@lion/ui
beta 0.1.0localizeNamespaces()
of the localize mixin to allow NamespaceObject[]
accordion
: rearranging invokers and content for a correct tab order is now implemented by changing the slot attributes of both instead of moving them, changed css for this implementation, updated testsaccordion
: narrowed the scope of the selectors that query [slot=invoker] and [slot=content] to prevent that any nested elements with [slot=invoker] and [slot=content] are moved to slot=_accordion as well36910e5d: datepicker uses no calender-overlay-frame element anymore
64c0e26c: Overlay System uses <dialog>
for top layer functionality of all overlays.
This means overlays positioned relative to viewport won't be moved to the body.
This has many benefits for the App Developer:
There could be small differences in timings though (usually we're done rendering quicker now).
Code that relies on side effects could be affected. Like:
For most users using either OverlayController, OverlayMixin or an element that uses OverlayMixin (like LionInputDatepicker, LionRichSelect etc. etc.)
nothing will change in the public api.
00063d73: depend on @popperjs/core
f0e6ee92: BREAKING: remove setIcons, setOverlays, setLocalize.
Recommended approach is to do below at the top of your app (before lion code runs):
import { singletonManager } from 'singleton-manager';
import { LocalizeManager } from '@lion/ui/localize-no-side-effects.js';
class MyLocalizeManager extends LocalizeManager {}
singletonManager.set('@lion/ui::localize::0.x', new MyLocalizeManager());
de51dae2: Use the correct names for singleton registrations
@open-wc/scoped-elements
to a version that exposes its types.e08b6bec: This introduces a new package @lion/ui
which is a collection of UI components that can be used in your application. It contains all the components/systems that used to be distributed via separate @lion/*
packages.
This is a breaking as you will need to import all components from @lion/ui
instead of @lion/*
packages now.
- import { LionAccordion } from '@lion/accordion';
+ import { LionAccordion } from '@lion/ui/accordion.js';
This is also true for element registrations
- import '@lion/accordion/define';
+ import '@lion/ui/define/lion-accordion.js';
Essentially the whole public API e.g. all the available exports can be found in the exports folder.
The package only supports TS 4.7+ using "moduleResolution": "Node16"
or "moduleResolution": "NodeNext"
as described in the TS 4.7 Announcement.
This package will have a new single CHANGELOG.md for the whole package. If you are interested the older individual changelogs then you can find them in the _legacy-changelogs folder.
This new version also includes the following changes for it's containing components:
Note: This package is considered alpha until extending docs and type exports are verified.
Updated dependencies [e08b6bec]
Published by github-actions[bot] 10 months ago
Published by github-actions[bot] 11 months ago
Published by github-actions[bot] 11 months ago
Published by github-actions[bot] 11 months ago
Published by github-actions[bot] 12 months ago
bdb038e1: Many improvements:
BREAKING:
@providence-analytics/src/cli
=> @providence-analytics/cli.js
@providence-analytics/analyzers
=> @providence-analytics/analyzers.js