Releases: studiometa/js-toolkit
Releases · studiometa/js-toolkit
v1.0.0-alpha.11
v1.0.0-alpha.10
Added
- Add a
$parentinstance property (6b5088d) - Add the ability to set the
$optionsinstance property (cf05aa3) - Add a
jsconfig.jsonfile (e9d1e8b) - Add an
.nvmrcfile (149aebd)
utils/css/transition (f98ba1c)
This PR introduces a new endMode parameter to the transition method:
- when set to
remove(default), it will remove the latest styles or classes applied to the element at the end of the transition - when set to
keep, the latest styles or classes will be kept at the end of the transition
See the updated doc for more details.
components/AccordionItem (8f4350c)
A new isOpen option has beend added to the AccordionItem component, allowing it to be either open or closed in its initial state.
<div data-component="AccordionItem" data-options='{ "isOpen": true }'>
...
</div>See the updated demo for an example.
Changed
v1.0.0-alpha.9
Changed
- Remove references to the package's alpha tag on NPM (d9087df)
v1.0.0-alpha.8
v1.0.0-alpha.7
v1.0.0-alpha.6
Fixed
- Fix the upload to Codecov (48b2745)
v1.0.0-alpha.5
Changed
Folder tree
The folder tree has been updated for a more robust and more logical structure (32dc7ed):
./abstracts/→ does not change./components/→ does not change./services/→ does not change./math/→ moved toutils/math/./utils/→ does not change, but its files are grouped by subject in folders :css,mathandobject
Added
Base class
- The Base class
$refs,$chilrenand$optionsprops are now getters, and event are emitted when they are accessed, following the formatget:... - Autbinding of event listeners to refs (df9fc0d, #22):
- The
onClick(event)method will be triggered when clicking onthis.$el - The
onFooClick(event, index)method will be triggered when clicking on any ofthis.$refs.foo
- The
- Add the possibility to use async components as children (7c32b72, #21)
- Refs are now resolved more strictly and their naming convention have been simplified as the component's name is not required anymore:
<!-- Foo.$el -->
<div data-component="Foo">
<!-- Foo.$refs.bar -->
<div data-ref="bar"></div>
<!-- Baz.$el === Foo.$refs.baz -->
<div data-component="Baz" data-ref="baz">
<!-- Baz.$refs.bar -->
<div data-ref="bar"></div>
</div>
</div>Components
Utils
- The
nextFramefunction is now async (1fb1fe0):
// Callback usage
nextFrame(() => doSomething());
// Async usage
await nextFrame();
doSomething();- Add CSS utilities
./utils/css/classes.jsexports methods to add, remove or toggle classes./utils/css/styles.jsexports methods to add or remove styles./utils/css/transition.jsexports a function to manage CSS transition à la Vue.js (with from, active and to states) (1e89224):
import transition from '@studiometa/js-toolkit/utils/css/transition';
transition(document.body, {
from: 'opacity-0',
active: 'transition duration-200',
});- Add and regroup object utilities
- Move the object utilities to the
./utils/objectfolder - Replace the
auto-bindpackage with a local version for easier reuse - Add a
getAllPropertiesmethod to get all the inherited properties of an object
- Move the object utilities to the
Misc.
Fixed
v1.0.0-alpha.4
v1.0.0-alpha.3
v1.0.0-alpha.2
Added
- Add breakpoints data to the
resizeservice (11bf3d9) - Add unit tests with Jest (06b2fb5, dad2f3b, b4ed45d)
- Add a
roundmethod to the math utilities (1801156) - Add a
timeproperty to therafservice props (f8729bd) - Add a
Tabscomponent (766f737) - Add a
Previewcomponent to VuePress for easier demo in the documentation (ab20944, 0b46111)