npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@sectramedical/srt-components

v1.2.5

Published

Development components for creating structured report templates to Sectra IDS7.

Downloads

26

Readme

srt-components

Development components for creating structured report templates to Sectra IDS7.

Installing

In your project folder, execute:

npm install -s @sectramedical/srt-components

For styling to work you need to include the Bootstrap v3.4.1 CSS and the sectra-styling.css in your project.

E.g., install Bootstrap

npm install --save [email protected]

Include the styles in your main javascript module:

import 'bootstrap/dist/css/bootstrap.min.css';
import '@sectra/srt-components/dist/sectra-styling.css';

Using the components

The package consists of the following components. To use a component, import it with for example 'import { SectraRow } from "@sectra/srt-components"'.

Sectra row

A row with a label placed to the left and the contained components to the right. The label can be left out, the component(s) will however always be positioned to the right. All buttons in the group has the data-field-type="radio button"

Props

labelText?: string - The text that should be placed to the left
labelFor?: string - The id of the component the label should be for
marginTop?: number - How big top-margin (in rem) (default is 1).
abbrTitle: string - Displays labelText as abbr element and uses abbrTitle as title.

Example

<SectraRow labelText="Size" labelFor="size" marginTop={2}>
    <input type="text" id="size">
</SectraRow>

Sectra button group

A bootstrap button group that calls a callback when a new button is selected.

Props

name: string - Normal html name
buttonValues: string[] - The values and text of the button options
defaultButton?: string - The button that should be pressed from the start
onStateChange?: (string) => void - The callback function to run when a new button is selected
justify?: boolean - Removes the "btn-group-justified" class from the button group if false
disable?: number[] - The indices of buttons that should be disabled within the button group preventOutput?: boolean - If true, this component will not generate any report or json output (Any input or data- attribute)

Example

<SectraButtonGroup name="Completed" buttonValues={["Yes", "No"]} defaultButton="Yes" onStateChange={this.someFunction} />

Sectra select

A dropdown that calls a callback when a new option is selected. Has the data-field-type="selection_list".

Props

name: string - Normal html name
optionValues: string[] - The values and text of the select options
bsSize?: string - can be anyone of "xs", "sm", "md", "lg" or "xl" where xl will cover the whole container (default "xl").
keys?: string[] - Keys for react to identify the options. If provided, one key for each option value must be provided. If not provided, optionValues will be used as keys.
defaultOptionText?: - If set, this option will be defaulted in the dropdown, however this option is not listed inside the dropdown. This should be used as a placeholder string, for example "Select an option..." If this is not used, the first option will be defaulted.
onStateChange?: (string) => void - The callback function to run when a new option is selected
preventOutput?: boolean - If true, this component will not generate any report or json output (Any select or data- attribute)

Example

<SectraSelect name="Animal" optionValues={["Cat", "Dog", "Bird"]} defaultOptionText="Select an animal..." onStateChange={this.someFunction} />

Sectra input

An input element that can have different sizes. Has the same data-field-type as the specified inputType prop.

Props

name: string - Normal html name
type: string - The html "type" attribute (e.g "text" or "number"). This prop will also be used for the data-field-type.
bsSize?: string - can be anyone of "xs", "sm", "md", "lg" or "xl" where xl will cover the whole container (default "xl").
onInputChange?: (val: string) => void - The callback function to run when input text is changed.
onInputBlur?: (val: string) => void - The callback function to run when the input loses focus.
preventOutput?: boolean - If true, this component will not generate any report or json output (Any input or data- attribute)

Example

<SectraInput name="Length" inputType="number" size="xs" />

Sectra textarea

A simple textarea. Has the data-field-type="textarea".

Props

name: string - Normal html name.
onInputChange?: (val: string) => void - The callback function to run when input text is changed.
onInputBlur?: (val: string) => void - The callback function to run when the textarea loses focus.
preventOutput?: boolean - If true, this component will not generate any report or json output.

Example

<SectraTextArea name="Comment" />

Sectra check button

A checkbox styled as a button. Has the data-field-type="checkbox"

Props

name: string - Normal html name.
value: string - Value and text of the checkbutton.
checked?: boolean - Set the check state of the button (default false).
onStateChange?: (checked: boolean) => void - The callback function to run when the check button is toggled.
partOfGroup?: boolean - If the checkbutton is part of a button group (default false but is automatically true if the parent is a SectraCheckButtonGroup). preventOutput?: boolean - If true, this component will not generate any report or json output.

Example

<SectraCheckButton name="Include comment" value="Include comment">

Sectra check button group

Checkbuttons inside this component will be formed as a button group.

Example

<SectraCheckButtonGroup>
    <SectraCheckButton name="Year 2018" value="2018" />
    <SectraCheckButton name="Year 2019" value="2019" />
</SectraCheckButtonGroup>

Sectra canvas

A canvas where you can paint, the image is saved as base 64 png which can be used to send the image to PACS Dicom.

Props

id: string - Identifier of this canvas. width?: number - Width of canvas in px (default 500)
height?: number - Height of canvas in px (default 400)
backgroundColor?: string - Color of canvas background in hex. (default "#FFFFFF")
paintColor?: string - Color to paint in the canvas with. (default "#fd4545")
defaultImage?: string - Base64 encoded image that will be loaded into the canvas paintType?: "Brush" | "Spray" - Type of tool to paint with. (default "Brush") onPaint?: (imageData: ImageData) => void - Called on mouse release onDefaultImageLoaded?: (imageData: ImageData) => void - Called when specified default image is loaded (Any canvas or data- attribute)

Example

<SectraCanvas id="canvas-id"/>