
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
@repositive/ui-library
Advanced tools
A set of ember components to allow frontend applications to be composed quickly and consistently. Developed by Repositive.io.
npm version <new versino>
to bump the version number in package.json
and create a new Git tag. This will be published automatically by CI.This library requires the Repositive CSS library, Liz-Skin. Please ensure you have this setup before continuing.
$ ember install @repositive/ui-library
This will put the latest version of the library into your project's package.json
.
Add the line @import 'ui-library';
to the end of your app.scss
file. This SCSS extends the Liz-Skin CSS library with custom component styles.
There are several button components:
Regular button for synchronous actions: r-button
.
Button for asynchronous actions: r-async-button
.
Link button for linking to external resources: r-link-button
.
All buttons are extended with the r-button-mixin
and therefore share a base set of properties.
Base properties of each button component:
variant
- Specifies the style of the button. Options include:
primary
secondary
cancel
E.g.
{{r-button variant='primary'}}
size
- Specifies the size of the button. Options include:
big
small
E.g.
{{r-button size='big'}}
By default a button has:
As well as the variant
and size
options detailed above, the r-button
can also take the following options:
label
- The button text. E.g.label = "Cancel"
clickHandler
- The name of the action the button will call on click. E.g.clickHandler = (action 'cancel')
disabled
- Boolean value to specify whether the button is disabled. E.g.disabled = (not validations.valid)
Typical usage of r-button
may look like:
{{r-button
clickHandler=(action "reset")
variant="secondary"
size="big"
disabled=isFormUnchanged
label="Reset"
}}
Build on Dockyards async-buttons. Async-buttons are similar to regular r-button
s but can take a few extra options:
action
- The name of the action which will be called on click. E.g.action = (action 'signup')
default
- Default text of the button. E.g.default = "Signup"
pending
- Text displayed when the promise is running i.e. not yet fulfilled or rejected. E.g.pending = "Signing up..."
disableWhen
- Boolean value which allows for the button be be disabled when in a state other than pending
.disableWhen = isInvalid
reset
- Boolean value which tells the button whether or not to reset to default state once the promise has been fulfilled or rejected. E.g.reset = true
Typical usage of r-async-button
may look like:
{{r-async-button
action=(action 'save')
default="Save Changes"
disableWhen=(not validations.isValid)
pending="Saving..."
reset=true
size="big"
variant="primary"
}}
r-link-button
s are extended from r-button
and have 2 extra arguments:
href
- The link to open. E.g.href= "https://blog.repositive.io"
target
- Where the linked document will open. E.g.target='_blank'
Typical usage of r-link-button
may look like:
{{r-link-button
clickHandler=(action "trackExit")
href= model.url
label= "Access Data"
variant="primary"
size="big"
target="_blank"
}}
r-pagination
takes the following parameters:
totalPages
- The total number of response results / resultsPerPage. E.g.totalPages=totalPages
currentPageNumber
- Number signifying which page the user is on. E.g.currentPageNumber=currentPage
nextPage
- Action to be called when the 'Next' button is pressed. E.g.nextPage=(action 'nextPage')
previousPage
- Action to be called when the 'Previous' button is pressed. E.g.previousPage=(action 'previousPage')
goToPage
- Action to be called when a page number is pressed. E.g.goToPage=(action 'goToPage')
Typical usage of r-pagination
may look like:
{{r-pagination
totalPages=totalPages
currentPageNumber=page
nextPage=(action 'nextPage')
previousPage=(action 'previousPage')
goToPage=(action 'goToPage')
}}
r-avatar
takes the following parameters:
size
- Specifies the size of the avatar. Options include:
small
medium
(default)large
x-large
E.g.
{{r-avatar size='large'}}
src
- Specifies the url of the avatar image.
{{r-avatar src='https://cdn.catimages.com/massive-cat.jpg'}}
fallbackSrc
- Specifies an alternate URL to use if src
fails (e.g. returns 404).
{{r-avatar src="https://example.com/404" fallbackSrc='https://cdn.catimages.com/massive-cat.jpg'}}
Typical usage of the r-avatar
may look like:
{{r-avatar
src=user.profile.avatar
size="large"
}}
Tabs consist of two sub-components:
r-tab-list
- A block component in which you nest any number of r-tab-list-item
s. This does not take any parameters.r-tab-list-item
- An individual tab componentr-tab-list-item
takes the following parameters:
tabName
- Tab text or label to be displayed
E.g.
{{r-tab-item tabName="Settings"}}
target
- The target route of the tab
E.g.
{{r-tab-item target="settings"}}
query
- Query param of the target route
E.g.
{{r-tab-item query="user"}}
icon
- The font-awesome icon to be displayed on the tab
E.g.
{{r-tab-item icon="user"}}
iconPosition
- Whether to display the icon left of the tabName
or right
E.g.
{{r-tab-item iconPosition="left"}}
stats
- A number to be displayed on the tab e.g. Followers (381)
E.g.
{{r-tab-item stats=user.followers.length}}
Typical usage of the tab component:
{{#r-tab-list}}
{{r-tab-list-item
tabName="Profile"
target="users.profile"
}}
{{r-tab-list-item
tabName="Account Settings"
target="users.settings"
}}
{{/r-tab-list}}
See contributing
FAQs
The default blueprint for ember-cli addons.
We found that @repositive/ui-library demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 7 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
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.