Releases: Yegorich555/web-ui-pack
v1.2.2
New Features
- helper objectToFormData
Fixes & Improvements
- Fixed namespace for JSX/TSX React v19+
- NotifyElement
- Fixed changing $options doesn't clear related attributes
- Controls (Date, Time, Number)
- Fixed Validation required shows instead of Invalid value OR Incomplete value
- Helper stringPrettify
- Fixed behavior with abbreviations like
reminderSMS
=>Reminder SMS
(wasReminder S M S
) - Improved performance up to 3 times (rewritten Regex to for-cycle). See benchmark here
- Fixed behavior with abbreviations like
v1.2.1
New Features
- NotifyElement demo - EXPERIMENTAL (not test-covered yet)
Fixes & Improvements
- Form
- Added skip-validation (by default) for
readonly/disabled/hidden
controls. BREAKING: changed enumSubmitActions
&FormElement.$defaults.submitActions
- Added skip-validation (by default) for
- SelectManyControl. Fixed behavior for sorting (drag/drop) when item moved between lines
- PopupElement.
- Reduced opacity for tooltip background
0.8
=>0.9
- Fixed Typescript shows error on children inside wup-popup
- Reduced opacity for tooltip background
- CircleElement
- Set
minWidth: 100px
&minHeight: 50px
to avoid init size 0 for some cases - Add defined color for tooltip function
item.tooltip = (itemResult, popup) => console.warn(itemResult.color)
- Handled case with custom label: so
<wup-circle><strong>Custom label</strong></wup-circle>
works in a proper way now - Extended default colors to 8 items
- Added auto definition for half-size (radar-charts without whole circle) based on
$options.from
&$options.to
- Set
- helpers
- isIntoView, findScrollParentAll, findScrollParent. Fixed
calling helpers triggers scroll events
- onScroll. Added event to option skip:
{ skip?: (ev: WheelEvent | TouchEvent, isTouchAction: boolean) => boolean; }
- isIntoView, findScrollParentAll, findScrollParent. Fixed
v1.1.0
New Features
- BREAKING. Controls. Renamed
valueToUrl/valueFromUrl
tovalueToStorage/valueFromStorage
- Combobox controls (Select, SelectMany, Date, Time). Added method
.renderPopup()
to have ability to override popup options - SelectControl. SelectManyControl. RadioControl.
- Allowed to use mixed types in
$options.items
. Improved JSDoc (added example) - Allowed to prevent closing menu via ev.preventDefault =>
$options.items = [{value: 1, text: (v, li) => {... li.onclick = (e) => e.preventDefault();... } }]
- Allowed to use complex values with saving to storage (refactored methods
valueToStorage/valueFromStorage
)
- Allowed to use mixed types in
Fixes
- HTML. Fixed intellisense (html.json was missed in the package)
- Styles. Textbased controls. Added
opacity: 1
forbutton[clear]/prefix/postfix
as fix when controls in a flex-row and it resizes on hover - Combobox controls (Select, SelectMany, Date, Time). Memory leak: menu is closed but not removed when click on body outside control
v1.0.4
New Features
- WUPTimeObject. Add init by date to constructor
- DateControl. Add sync with TimeControl (value, min, max)
v1.0.3
New Features
- Helpers. Deprecate
mathSumFloat
in favor ofmathFixFP
- Styles.
- Moved all icons to single
./styles.ts const WUPcssIconSet
to allow re-use it - Added init root styles on script run (to allow re-use css variables before any WUP component is appended)
- Moved all icons to single
- Modal
- Allow to prevent auto closing via
form.$onSubmitEnd = (e) => e.preventDefault()
- Allow to prevent auto closing via
form.$onSubmit = (e) => e.preventDefault()
- Allow to prevent auto closing via
- Controls. Added css-animation for box-shadow/borders
- RadioControl. Added comparison by item.id to allow use cloned items/value
- NumberControl. New options
scale
&offset
- Form
- Added
form.$validate(...)
for manual triggering validations - Changed spinner to custom friendly look
- Added
Fixes
- Global. Custom event callbacks like $onChange(e) have
e.target: null
- Controls
- Wrong TS-type on $onChange() callback
- Form
- Focus lost on pending (because every active element is disabled). Refactored pending state: elements changes to
readonly
+ applied css-style [busy] + added attributearia-busy
to form - Possible to submit by Enter key in pending state
- Focus lost on pending (because every active element is disabled). Refactored pending state: elements changes to
- ModalElement. button[close] is overlayed by header
v1.0.2
New Features
- Global
- Add Preact tsx/jsx support
- Controls
- Added
text-align: start
by default to avoid unexpected inheritance - RadioControl. Added attribute
[checked]
to re-style whole item
- Added
v1.0.1
Fixes
- ModalElement. Wrong behavior on confirmModal + replace: true + click outside on previous/hidden modal
- PopupElement. Popup blinks on fast open+close
- Controls
- Missed css-var
--base-margin
- Missed style
flex: 1
for switch/checkbox controls
- Missed css-var
v1.0.0
New Features
- ModalElement demo
- Global
- Added multi language support: override
window.__wupln
(to dynamic change) or global__wupln
during the compilation (for static change) - Added css variable
--base-margin
to unify margins for all elements - Added support HTML intellisense for WebStorm (no action required from developer/user side)
- Added multi language support: override
- helper focusFirst. Added option
isFocusLast
& static querySelector (possible to get fromfocusFirst.$selector
) - FormElement
- Increased height of
button[type=submit]
- Added callback
$onSubmitEnd
& event$submitEnd
- Added public method
$submit()
for manual calling - Web Accessibility: auto-tie with closest heading via aria-labelledby
- Increased height of
- Text based controls
- Added css variable
--ctrl-label-active-pos
to simplify customization of label position
- Added css variable
- SelectControl. SelectManyControl. Improved handling promise rejection in
$options.items
- SelectManyControl. Added scrolling style & restricted max-height by default
Fixes
- helper findScrollParent. Returns parent despite on parent.child with position-fixed
- helper promiseWait. Throws error twice instead of 1 time
- PopupElement. Popup hidden if target inside content with position: fixed and target.parent.parent is scrollable
- DropdownElement. Target button is overflowed by menu in animation-stack
- PasswordControl. Input height is changed on button[eye] click
- Text based controls
- Sometimes weird blink & poor render during the animation on focus
- Button clear changes control size on hover if parent is flexbox
- SelectControl. SelectManyControl. storageKey + items as Promise don't work together
- CircleElement. Update options/items colors triggers animated re-render with blink
BREAKING CHANGES
-
Global.
-
Added static
.$use()
. Call it before using element:WUPTextControl.$use()
(self-registration by import works now and will be removed in the future) -
Renamed css-vars:
--ctrl-select-menu-hover
>>>--menu-hover-bg
--anim-time
>>>--anim-t
--popup
>>>popup-text
--popup-anim
>>>popup-anim-t
--tooltip
>>>tooltip-text
--spin-speed
>>>spin-t
--btn-submit
>>>--btn-submit-text
--ctrl
>>>--ctrl-text
--ctrl-clr-width
>>>--ctrl-clr-w
--ctrl-select-item
>>>--ctrl-select-item-text
--ctrl-time-off
>>>--ctrl-time-off-text
--ctrl-select-menu-hover
>>>--menu-hover-bg
-
Refactored & unified custom events. Now every event contains detail as object:
e.detail = { ... }
-
-
- z-index is changed from
90000
to8000
- Renamed
show/hide
toopen/close
(the same for DropdownElement):
enumShowCases
>>>PopupShowCases
enumHideCases
>>>PopupHideCases
optionshowCase
>>>openCase
method$show()
>>>$open()
method$hide()
>>>$close()
state-prop$isShown
>>>$isOpened
event$onShown
>>>$onOpened
etc. - Refactored/normalized enum PopupShowCases
- z-index is changed from
-
Combobox controls (Select, SelectMany, Date, Time)
- Renamed
show/hide
toopen/close
:
enumShowCases
>>>MenuShowCases
enumHideCases
>>>MenuHideCases
event$showMenu
>>>$openMenu
event$hideMenu
>>>$closeMenu
etc.
- Renamed
v0.10.2
Fixes:
- SelectControl. SelectManyControl. Error message in console if
$options.items = new Promise
&$initValue = ...
v0.10.1
BREAKING CHANGES:
- Controls. Renamed some css-vars (this is last big breaking change)
- FormElement. Option
autoSave
renamed toautoStore
Fixes:
- TypeScript. Updated CustomEvents
$onWillShow
,$onWillHide
,$onChange
- Text based controls
- Label doesn't go to top on browser autofill
- Value missed & undo/redo failed on browser autofill
- SelectManyControl
- Showing button[clear] on hover changes height
- Focus sometimes is wrong when user removes item & reverts changes via click on button[clear=back]
New/Features:
- Added built-in colors for darkMode. Append attr
[wupdark]
to body to use it. Don't forget to define general text & background colors yourself