Security News
CISA Brings KEV Data to GitHub
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.
@enact/i18n
Advanced tools
Internationalization library based on iLib.
@enact/i18n
provides a decorator that can be used to wrap a root component in a React (or Enact) application.
This decorator provides a context to child components that can be used to determine locale text directionality
and to update the current locale. Additionally, it provides a locale-aware Uppercase
Higher Order Component (HOC).
import {I18nDecorator, contextTypes} from `@enact/i18n/I18nDecorator`;
const MyComponent = (props, context) => (
<div>{context.rtl ? "right to left" : "left to right"}</div>
);
// Without contextTypes, your component will not receive context!
MyComponent.contextTypes = contextTypes;
const MyApp = () => (
<div>
<MyComponent />
</div>
);
const MyI18nApp = I18nDecorator(MyApp);
Uppercase
may be used independently of the app decorator. By default, it uppercases the children
property of
the wrapped component, provided it is a string
.
import Uppercase from `@enact/i18n/Uppercase`
const MyComponent = (props) => (
<div {...props} />
);
const MyUppercaseComponent = Uppercase(MyComponent);
Passing preserveCase
in the props to MyUppercaseComponent
will prevent uppercasing.
npm install --save @enact/i18n
This module is built upon the iLib library.
Unless otherwise specified, all content, including all source code files and documentation files in this repository are:
Copyright (c) 2016-2018 LG Electronics
Unless otherwise specified or set forth in the NOTICE file, all content, including all source code files and documentation files in this repository are: Licensed under the Apache License, Version 2.0 (the "License"); you may not use this content except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
This work is based on the Apache-2.0 licensed iLib from JEDLsoft.
[2.0.0-alpha.6] - 2018-03-22
core/factory
module, replaced by the css
override featuremoonstone/Slider
exports SliderFactory
and SliderBaseFactory
moonstone/IncrementSlider
exports IncrementSliderFactory
and IncrementSliderBaseFactory
moonstone/ProgressBar
, moonstone/Slider
, moonstone/Slider.SliderTooltip
, moonstone/IncrementSlider
components' vertical
property and replaced it with orientation
spotlight/SpotlightContainerDecorator
prop containerId
, to be replaced by spotlightId
ui/Transition
property clipHeight
ui/ProgressBar
property vertical
and replaced it with orientation
moonstone/VideoPlayer
property component
to handle custom video elementmoonstone/IncrementSlider
properties incrementAriaLabel
and decrementAriaLabel
to configure the label set on each buttonmoonstone/Input
support for small
propmoonstone/ProgressBar
support for tooltip
and tooltipForceSide
moonstone/ProgressBar
, moonstone/Slider
, moonstone/Slider.SliderTooltip
, moonstone/IncrementSlider
property orientation
to accept orientation strings like "vertical" and "horizontal" (replaced old vertical
prop)spotlight/Pause
module which acts as a semaphore for spotlight pause statespotlight/Spottable
prop spotlightId
to simplify focusing componentsui/Scrollable
support for scrolling by touchui/ProgressBar
property orientation
to accept orientation strings like "vertical"
and "horizontal"
moonstone/Input
input height
, vertical-align
, and margins
. Please verify your layouts to ensure everything lines up correctly; this change may require removal of old sizing and positioning CSS which is no longer necessary.moonstone/FormCheckbox
to have a small border around the circle, according to new GUI designsmoonstone/RadioItem
dot size and added an inner-dot to selected-focused state, according to new GUI designsmoonstone/ContextualPopup
prop popupContainerId
to popupSpotlightId
moonstone/Popup
prop containerId
to spotlightId
moonstone/VideoPlayer
prop containerId
to spotlightId
moonstone/VirtualList.VirtualList
and moonstone/VirtualList.VirtualGridList
prop component
to be replaced by itemRenderer
spotlight/Spotlight.focus
to support focusing by spotlightId
spotlight
container attributes data-container-disabled
and data-container-muted
to be data-spotlight-container-disabled
and data-spotlight-container-muted
, respectivelyui/VirtualList.VirtualList
and ui/VirtualList.VirtualGridList
prop component
to be replaced by itemRenderer
moonstone/ExpandableItem
to be more performant when animatingmoonstone/GridListImageItem
to hide overlay checkmark icon on focus when unselectedmoonstone/GridListImageItem
to use ui/GridListImageItem
moonstone/VirtualList
, moonstone/VirtualGridList
and moonstone/Scroller
components to use their base UI componentsmoonstone/VirtualList
to show the selected state on hovered paging controls properlymoonstone/Slider
to highlight knob when selectedmoonstone/Slider
to handle updates to its value
prop correctlymoonstone/ToggleItem
to accept HTML DOM node tag names as strings for its component
propertymoonstone/Popup
to properly pause and resume spotlight when animatingui/Transition
animation for clip
for "up"
, "left"
, and "right"
directions. This includes a DOM addition to the Transition markup.ui/ComponentOverride
and ui/ToggleItem
to accept HTML DOM node tag names as strings for its component
propertyFAQs
Internationalization support for Enact using iLib
The npm package @enact/i18n receives a total of 23,407 weekly downloads. As such, @enact/i18n popularity was classified as popular.
We found that @enact/i18n demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.
Security News
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.