diff --git a/types/fundamental-react/fundamental-react-tests.tsx b/types/fundamental-react/fundamental-react-tests.tsx new file mode 100644 index 0000000000..6621a836c9 --- /dev/null +++ b/types/fundamental-react/fundamental-react-tests.tsx @@ -0,0 +1,3139 @@ +import { + ActionBar, + Badge, + Breadcrumb, + Button, + ButtonGroup, + Calendar, + ComboboxInput, + Counter, + DatePicker, + Dropdown, + FormFieldset, + FormGroup, + FormLegend, + FormMessage, + FormRadioGroup, + FormRadioItem, + FormSelect, + FormSet, + Icon, + Identifier, + Image, + InlineHelp, + InputGroup, + Label, + ListGroup, + LocalizationEditor, + Menu, + Modal, + MultiInput, + Pagination, + Panel, + PanelGrid, + Popover, + ProductTile, + SearchInput, + Shellbar, + SideNav, + Status, + Tab, + TabGroup, + Table, + Tile, + TileGrid, + Time, + TimePicker, + Toggle, + Token, + TreeView +} from "fundamental-react"; +import { FormItem } from "fundamental-react/lib"; +import Alert from "fundamental-react/lib/Alert/Alert"; +import { FormLabel } from "fundamental-react/lib/Forms"; +import FormInput from "fundamental-react/lib/Forms/FormInput"; +import FormTextarea from "fundamental-react/lib/Forms/FormTextarea"; +import * as React from "react"; + +const actionBars = ( +
+ + + + + + + + + + + + + + + + + + + + + + + Option 1 + Option 2 + Option 3 + Option 4 + + + } + control={
+); + +const alerts = ( +
+ + Default alert with a + + + +

A dismissible error type alert with template.

+

More information...

+
+ + + + Error Message. + + Learn More + + + + + + Message Success. + + Learn More + + + + + + Information Message. + + Learn More + + +
+); + +const badge = Default; + +const counter = 101; + +const label = ; + +const status = Default; + +const breadcrumb = ( + + + + + +); + +const buttons = ( +
+ + + + + + + + + + + + + + +
+
+
+ + + + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + + +
+); + +const buttonGroups = ( +
+ + + + + +
+); + +const calendars = ( +
+ + + + +
+); + +const comboboxInput = ( + + + Pear + Strawberry + Raspberry + + + New Item + + + + } + placeholder="Select Fruit" + /> +); + +const contextualMenus = ( +
+ + + Option 1 + Option 2 + Option 3 + Option 4 + + + } + control={} + noArrow + /> + + + Option 1 + Option 2 + Option 3 + Option 4 + + + } + control={} + noArrow + /> +
+); + +const datePickers = ( +
+ + + + +
+); + +const dropdowns = ( +
+ + + + Option 1 + Option 2 + Option 3 + Option 4 + + + } + control={} + id="jhqD0555" + noArrow + /> + + + + + Option 1 + Option 2 + Option 3 + Option 4 + + + } + control={ + + } + id="jhqD0556" + noArrow + /> + + + + + Option 1 + Option 2 + Option 3 + Option 4 + + + } + control={ + + } + id="jhqD0557" + noArrow + /> + + + + + Option 1 + Option 2 + Option 3 + Option 4 + + + } + control={ + + } + id="jhqD0558" + noArrow + /> + + + + + Option 1 + Option 2 + Option 3 + Option 4 + + + } + control={ + + } + id="jhqD0559" + noArrow + /> + + + + + Option 1 + Option 2 + Option 3 + Option 4 + + + } + control={ + + } + id="jhqD0560" + noArrow + /> + + + + + Option 1 + Option 2 + Option 3 + Option 4 + + + } + control={ + + } + disabled + id="jhqD0561" + noArrow + /> + +
+); + +const forms = ( +
+ + + Default Input + + + + + + + Required Input + + + + + + + + Password + + + + + + + + Text area + + + + + + + + Input with inline help + + + Lorem ipsum dolor sit amet, consectetur adipiscing. + + + + + + + + + Input with Help Message + + + Pellentesque metus lacus commodo eget justo ut rutrum varius + nunc + + + + + + Normal Input + + + Pellentesque metus lacus commodo eget justo ut rutrum varius + nunc + + + + + + Valid Input + + + + + + Invalid Input + + + Pellentesque metus lacus commodo eget justo ut rutrum varius + nunc + + + + + + Warning Input + + + Pellentesque metus lacus commodo eget justo ut rutrum varius + nunc + + + + + + Disabled Input + + + + + + Readonly Input + + + + + + Default Select + + + + + + + + + + Default Select + + + + + + + + + Radio buttons + + Option 1 + Option 2 + + Option 3 + + + + + Radio buttons disabled + + + Option 1 + + + Option 2 + + + Option 3 + + + + + Inline Radio buttons + + Option 1 + + Option 2 + + Option 3 + + + + Checkboxes + + + Option One + + + + Option Two + + + + Option Three + + + + Inline Checkbox buttons + + + + Option One + + + + + + Option Two + + + + + + Option Three + + + +
+); + +const icons = ( +
+ + + + + +
+); + +const identifiers = ( +
+ + + + + + + + + WW + + + WW + + + WW + + + WW + + + WW + + + WW + + + WW + + + + + + + + + + + + + + + + + WW + + + + + + + + + + + +
+); +const images = ( +
+ + + + + + +
+); + +const inlineHelp = ( +
+ Bottom Right (Default) + +
+); + +const formGroup = ; + +const inputGroup = ( +
+ + Left Aligned Text Addon + + + + +
+ + Right Aligned Text Addon + + + + +
+

Compact mode

+ + Left Aligned Text Addon + + + + +
+ + Right Aligned Text Addon + + + + + + Right Aligned Text Addon + + + + +
+

Compact mode

+ + Right Aligned Text Addon + + + + + + Search Input + + + + +
+

Compact mode

+ + Search Input + + + + +
+
+ + Input with icon on the left + + + + +
+

Compact mode

+ + Input with icon on the left + + + + +
+
+ + Input with icon on the right + + + + +
+

Compact mode

+ + Input with icon on the right + + + + + + Input with text action + + + + + + +
+

Compact mode

+ + Input with text action + + + + + + +
+
+ + Input with icon text action + + +
+); + +const listGroups = ( +
+ + + + List item 1 + + + List item 2 + + + List item 3 + + + List item 4 + + + + List item 1 + +
+); + +const localizationEditors = ( +
+ +
+ + +
+); + +const menus = ( +
+ + + Option 1 + Option 2 + Option 3 + Option 4 + + + + + + Option 1 + + + Option 1 + + + Option 1 + + + + + + Option 1 + + + Option 1 + + + Option 1 + + + + + + + + Option 1 + + + Option 1 + + + Option 1 + + + Option 1 + + + + + + + Option 1 + + + Option 1 + + + Option 1 + + + Option 1 + + + +
+); + +const modals = ( +
+ + +
+ The new product have been added to your catalog. +
+
+ Automatic Product ID: + PD-3465334 +
+
+ Expiration date: + 13/03/2018 +
+
+
+
+ + + + + } + onClose={function w() {}} + title="Delete" + > +
+ Do you want to delete item + X? +
+
+ + + + + } + onClose={function w() {}} + title="Invite user" + > +
+
+ + +
+
+
+
+); +const multiInputs = ( +
+ + +
+); + +const paginations = ( +
+ + + + + +
+); + +const panels = ( +
+ + + + + + + + +
Panel Filters
+
+ + + Option 1 + Option 2 + Option 3 + Option 4 + + + } + control={} + noArrow + /> + + + Option 1 + Option 2 + Option 3 + Option 4 + + + } + control={} + noArrow + /> +
+ +
Panel Body
+
+ + + + + +

Tile Description

+
+
+
+ Bibendum + Lorem + Dolor + Filter +
+ Panel Footer +
+ + + Panel + + + Panel + + + Panel + + + Panel + + + Panel + + + + + Panel + + + Panel + + + Panel + + + Panel + + + Panel + + + + + Panel + + + Panel + + + Panel + + + Panel + + + + + Panel with colSpan=2 + + + Panel + + + Panel + + + Panel + + + Panel + + + Panel with colSpan=3 + + + Panel + + + Panel + + + Panel + + + Panel with colSpan=4 + + + Panel + + + Panel + + + Panel with colSpan=5 + + + Panel + + + Panel with colSpan=6 + + +
+); + +const popovers = ( +
+
+
+
+ + + Option 1 + Option 2 + Option 3 + Option 4 + + + } + control={ +
+
+ + + Option 1 + Option 2 + Option 3 + Option 4 + + + } + control={ +
+
+ + + Option 1 + Option 2 + Option 3 + Option 4 + + + } + control={ +
+
+
+
+ + + Option 1 + Option 2 + Option 3 + Option 4 + + + } + control={ +
+
+ + + Option 1 + Option 2 + Option 3 + Option 4 + + + } + control={ +
+
+
+
+ + + Option 1 + Option 2 + Option 3 + Option 4 + + + } + control={ +
+
+ + + Option 1 + Option 2 + Option 3 + Option 4 + + + } + control={ +
+
+
+
+ + + Option 1 + Option 2 + Option 3 + Option 4 + + + } + control={ +
+
+ + + Option 1 + Option 2 + Option 3 + Option 4 + + + } + control={ +
+
+
+
+ + + Option 1 + Option 2 + Option 3 + Option 4 + + + } + control={ +
+
+ + + Option 1 + Option 2 + Option 3 + Option 4 + + + } + control={ +
+
+ + + Option 1 + Option 2 + Option 3 + Option 4 + + + } + control={ +
+
+
+
+ + + Option 1 + Option 2 + Option 3 + Option 4 + + + } + control={} + noArrow + placement="left" + /> + + + Option 1 + Option 2 + Option 3 + Option 4 + + + } + control={ + + } + noArrow + placement="top" + /> + + + Option 1 + Option 2 + Option 3 + Option 4 + + + } + control={} + noArrow + placement="bottom" + /> + + + Option 1 + Option 2 + Option 3 + Option 4 + + + } + control={} + noArrow + placement="right" + /> +
+
+ + +

+ Click the icon to show the popover and then scroll within + the modal body... +

+
+
+ + + Option 1 + Option 2 + Option 3 + Option 4 + + + } + control={} + placement="bottom" + /> +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+); + +const searchInputs = ( +
+ +
+ +
+ +
+); + +const shellbars = ( +
+ + } + productTitle="Corporate Portal" + profile={{ + colorAccent: 8, + initials: "JS", + userName: "John Snow" + }} + profileMenu={[ + { + callback: function w() {}, + glyph: "action-settings", + name: "Settings", + size: "s" + }, + { + callback: function w() {}, + glyph: "log", + name: "Sign Out", + size: "s" + } + ]} + /> + + + + Option 1 + Option 2 + Option 3 + + + ), + notificationCount: 5 + } + ]} + copilot + logoSAP + notifications={{ + callback: function w() {}, + label: "Notifications", + noNotificationsBody: ( + + + There are no notifications + + + ), + notificationCount: 2, + notificationsBody: ( + + + Notification 1 + Notification 2 + Notification 3 + + + ) + }} + productMenu={[ + { + callback: function w() {}, + name: "Application A" + }, + { + callback: function w() {}, + name: "Application B" + }, + { + callback: function w() {}, + name: "Application C" + }, + { + callback: function w() {}, + name: "Application D" + } + ]} + productSwitcher={{ + label: "Product Switcher" + }} + productSwitcherList={[ + { + callback: function w() {}, + glyph: "home", + image: + "data:image/gif;base64,R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==", + title: "Fiori Home" + }, + { + callback: function w() {}, + glyph: "cloud", + image: + "data:image/gif;base64,R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==", + title: "S/4 HANA Cloud" + }, + { + callback: function w() {}, + glyph: "business-objects-experience", + image: + "data:image/gif;base64,R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==", + title: "Analytics Cloud" + }, + { + callback: function w() {}, + glyph: "activate", + image: + "data:image/gif;base64,R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==", + title: "Ariba" + }, + { + callback: function w() {}, + glyph: "message-success", + image: + "data:image/gif;base64,R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==", + title: "SuccessFactors" + }, + { + callback: function w() {}, + glyph: "retail-store", + image: + "data:image/gif;base64,R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==", + title: "Commerce Cloud" + }, + { + callback: function w() {}, + glyph: "customer-view", + image: + "data:image/gif;base64,R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==", + title: "Gigya" + }, + { + callback: function w() {}, + glyph: "globe", + image: + "data:image/gif;base64,R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==", + title: "Callidus Cloud" + }, + { + callback: function w() {}, + glyph: "work-history", + image: + "data:image/gif;base64,R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==", + title: "Fieldglass" + }, + { + callback: function w() {}, + glyph: "area-chart", + image: + "data:image/gif;base64,R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==", + title: "Concur" + }, + { + callback: function w() {}, + glyph: "customer-view", + image: + "data:image/gif;base64,R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==", + title: "Cloud for Customer" + }, + { + callback: function w() {}, + glyph: "customer", + image: + "data:image/gif;base64,R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==", + title: "Cloud Portal" + } + ]} + productTitle="Corporate Portal" + profile={{ + image: + "/fundamental-react/static/media/headshot-male.10d4e22e.jpg", + userName: "John Snow" + }} + profileMenu={[ + { + callback: function w() {}, + glyph: "action-settings", + name: "Settings", + size: "s" + }, + { + callback: function w() {}, + glyph: "log", + name: "Sign Out", + size: "s" + } + ]} + searchInput={{ + callback: function w() {}, + label: "Search", + onSearch: function w() {}, + placeholder: "Enter a fruit", + searchList: [ + { + callback: function w() {}, + text: "apple" + }, + { + callback: function w() {}, + text: "apricot" + }, + { + callback: function w() {}, + text: "acai" + }, + { + callback: function w() {}, + text: "banana" + }, + { + callback: function w() {}, + text: "berry" + }, + { + callback: function w() {}, + text: "blueberry" + }, + { + callback: function w() {}, + text: "blackberry" + }, + { + callback: function w() {}, + text: "cranberry" + }, + { + callback: function w() {}, + text: "conkerberry" + }, + { + callback: function w() {}, + text: "calabash" + }, + { + callback: function w() {}, + text: "clementines" + }, + { + callback: function w() {}, + text: "kiwi" + }, + { + callback: function w() {}, + text: "orange" + } + ] + }} + subtitle="Subtitle" + /> +
+); + +const sideNavs = ( +
+ + + + + + + + + + + + + + Link Item + + + Link Item + + + Link Item + + + Link Item + + + + + Link Item + + + Link Item + + + Link Item + + + Link Item + + + Link Item + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Link Item + + + Link Item + + + Link Item + + + + + + + + + + + + + + +
+); + +const tables = ( +
+ +
, + "Avatar", + "email", + "First Name", + "Last Name", + "Date", + " " + ]} + tableData={[ + { + rowData: [ + , + , + + user.name@email.com + , + "First Name", + "Last Name", + "01/26/17", + + + Option 1 + Option 2 + Option 3 + Option 4 + + + } + control={ + ` element. */ + tableBodyProps?: { [x: string]: any }; + /* 'Additional props to be spread to the `` element.' */ + tableHeaderProps?: { [x: string]: any }; + /* Additional props to be spread to the `
` element. */ + tableProps?: { [x: string]: any }; + /* Additional props to be spread to the year's `
    ` element. */ + yearListProps?: { [x: string]: any }; + onChange?: (date: Date) => void; +} & { [x: string]: any }; + +declare class Calendar extends React.Component {} + +export default Calendar; diff --git a/types/fundamental-react/lib/Calendar/index.d.ts b/types/fundamental-react/lib/Calendar/index.d.ts new file mode 100644 index 0000000000..eca04c49a7 --- /dev/null +++ b/types/fundamental-react/lib/Calendar/index.d.ts @@ -0,0 +1 @@ +export { default as Calendar } from "./Calendar"; diff --git a/types/fundamental-react/lib/ComboboxInput/ComboboxInput.d.ts b/types/fundamental-react/lib/ComboboxInput/ComboboxInput.d.ts new file mode 100644 index 0000000000..1bef9dbf04 --- /dev/null +++ b/types/fundamental-react/lib/ComboboxInput/ComboboxInput.d.ts @@ -0,0 +1,17 @@ +import * as React from "react"; +import { MenuProps } from "../Menu/Menu"; + +export type ComboboxInputProps = { + /* An object containing a `Menu` component. */ + menu: React.ReactElement; + buttonProps?: object; + className?: string; + compact?: boolean; + inputProps?: object; + placeholder?: string; + popoverProps?: object; +} & { [x: string]: any }; + +declare const ComboboxInput: React.FunctionComponent; + +export default ComboboxInput; diff --git a/types/fundamental-react/lib/ComboboxInput/index.d.ts b/types/fundamental-react/lib/ComboboxInput/index.d.ts new file mode 100644 index 0000000000..1fa6a9ce32 --- /dev/null +++ b/types/fundamental-react/lib/ComboboxInput/index.d.ts @@ -0,0 +1 @@ +export { default as ComboboxInput } from "./ComboboxInput"; diff --git a/types/fundamental-react/lib/DatePicker/DatePicker.d.ts b/types/fundamental-react/lib/DatePicker/DatePicker.d.ts new file mode 100644 index 0000000000..cf7fc7b35e --- /dev/null +++ b/types/fundamental-react/lib/DatePicker/DatePicker.d.ts @@ -0,0 +1,14 @@ +import * as React from "react"; +import { CalendarBaseProps } from "../Calendar/Calendar"; + +export type DatePickerProps = CalendarBaseProps & { + buttonProps?: { [x: string]: any }; + compact?: boolean; + /* Set to **true** to enable the selection of a date range (begin and end). */ + enableRangeSelection?: boolean; + inputProps?: { [x: string]: any }; +} & { [x: string]: any }; + +declare class DatePicker extends React.Component {} + +export default DatePicker; diff --git a/types/fundamental-react/lib/DatePicker/index.d.ts b/types/fundamental-react/lib/DatePicker/index.d.ts new file mode 100644 index 0000000000..5dce88fa2b --- /dev/null +++ b/types/fundamental-react/lib/DatePicker/index.d.ts @@ -0,0 +1 @@ +export { default as DatePicker } from "./DatePicker"; diff --git a/types/fundamental-react/lib/Dropdown/Dropdown.d.ts b/types/fundamental-react/lib/Dropdown/Dropdown.d.ts new file mode 100644 index 0000000000..c3c4584d21 --- /dev/null +++ b/types/fundamental-react/lib/Dropdown/Dropdown.d.ts @@ -0,0 +1,11 @@ +import * as React from "react"; + +export type DropdownProps = { + className?: string; + /* Set to **true** to enable a dropdown for toolbar. */ + standard?: boolean; +} & { [x: string]: any }; + +declare const Dropdown: React.FunctionComponent; + +export default Dropdown; diff --git a/types/fundamental-react/lib/Dropdown/index.d.ts b/types/fundamental-react/lib/Dropdown/index.d.ts new file mode 100644 index 0000000000..915a928d99 --- /dev/null +++ b/types/fundamental-react/lib/Dropdown/index.d.ts @@ -0,0 +1 @@ +export { default as Dropdown } from "./Dropdown"; diff --git a/types/fundamental-react/lib/Forms/FormFieldset.d.ts b/types/fundamental-react/lib/Forms/FormFieldset.d.ts new file mode 100644 index 0000000000..00e9c1ee90 --- /dev/null +++ b/types/fundamental-react/lib/Forms/FormFieldset.d.ts @@ -0,0 +1,9 @@ +import * as React from "react"; + +export type FormFieldsetProps = { + className?: string; +} & { [x: string]: any }; + +declare const FormFieldset: React.FunctionComponent; + +export default FormFieldset; diff --git a/types/fundamental-react/lib/Forms/FormInput.d.ts b/types/fundamental-react/lib/Forms/FormInput.d.ts new file mode 100644 index 0000000000..429fe607bd --- /dev/null +++ b/types/fundamental-react/lib/Forms/FormInput.d.ts @@ -0,0 +1,23 @@ +import * as React from "react"; + +export type InputType = "normal" | "valid" | "invalid" | "warning"; + +export type FormInputProps = { + className?: string; + disabled?: boolean; + id?: string; + /* Value for the `name` attribute on the input. */ + name?: string; + placeholder?: string; + readOnly?: boolean; + /* Sets the state of the input. Can be left empty for default styles. */ + state?: InputType; + /* Value for the `type` attribute on the input. */ + type?: string; + /* Value for the `value` attribute on the input. */ + value?: string; +} & { [x: string]: any }; + +declare const FormInput: React.FunctionComponent; + +export default FormInput; diff --git a/types/fundamental-react/lib/Forms/FormItem.d.ts b/types/fundamental-react/lib/Forms/FormItem.d.ts new file mode 100644 index 0000000000..d81368958d --- /dev/null +++ b/types/fundamental-react/lib/Forms/FormItem.d.ts @@ -0,0 +1,13 @@ +import * as React from "react"; + +export type FormItemProps = { + className?: string; + /* Set to **true** to render an `` with `type` of **checkbox**. */ + isCheck?: boolean; + /* Set to **true** to display radio buttons and checkboxes in a row. */ + isInline?: boolean; +} & { [x: string]: any }; + +declare const FormItem: React.FunctionComponent; + +export default FormItem; diff --git a/types/fundamental-react/lib/Forms/FormLabel.d.ts b/types/fundamental-react/lib/Forms/FormLabel.d.ts new file mode 100644 index 0000000000..30eebf6d54 --- /dev/null +++ b/types/fundamental-react/lib/Forms/FormLabel.d.ts @@ -0,0 +1,11 @@ +import * as React from "react"; + +export type FormLabelProps = { + className?: string; + /* Set to **true** for required input fields. */ + required?: boolean; +} & { [x: string]: any }; + +declare const FormLabel: React.FunctionComponent; + +export default FormLabel; diff --git a/types/fundamental-react/lib/Forms/FormLegend.d.ts b/types/fundamental-react/lib/Forms/FormLegend.d.ts new file mode 100644 index 0000000000..d73870a670 --- /dev/null +++ b/types/fundamental-react/lib/Forms/FormLegend.d.ts @@ -0,0 +1,9 @@ +import * as React from "react"; + +export type FormLegendProps = { + className?: string; +} & { [x: string]: any }; + +declare const FormLegend: React.FunctionComponent; + +export default FormLegend; diff --git a/types/fundamental-react/lib/Forms/FormMessage.d.ts b/types/fundamental-react/lib/Forms/FormMessage.d.ts new file mode 100644 index 0000000000..944e9e8695 --- /dev/null +++ b/types/fundamental-react/lib/Forms/FormMessage.d.ts @@ -0,0 +1,12 @@ +import * as React from "react"; + +export type FormMessageType = "error" | "warning" | "help"; + +export type FormMessageProps = { + className?: string; + type?: FormMessageType; +} & { [x: string]: any }; + +declare const FormMessage: React.FunctionComponent; + +export default FormMessage; diff --git a/types/fundamental-react/lib/Forms/FormRadioGroup.d.ts b/types/fundamental-react/lib/Forms/FormRadioGroup.d.ts new file mode 100644 index 0000000000..4548bd11e4 --- /dev/null +++ b/types/fundamental-react/lib/Forms/FormRadioGroup.d.ts @@ -0,0 +1,12 @@ +import * as React from "react"; + +export type FormRadioGroupProps = { + disabled?: boolean; + /* Set to **true** to display radio buttons in a row. */ + inline?: boolean; + onChange?: (...args: any[]) => any; +} & { [x: string]: any }; + +declare class FormRadioGroup extends React.Component {} + +export default FormRadioGroup; diff --git a/types/fundamental-react/lib/Forms/FormRadioItem.d.ts b/types/fundamental-react/lib/Forms/FormRadioItem.d.ts new file mode 100644 index 0000000000..982a8cbc1e --- /dev/null +++ b/types/fundamental-react/lib/Forms/FormRadioItem.d.ts @@ -0,0 +1,21 @@ +import * as React from "react"; + +export type FormRadioItemProps = { + /* Set to **true** when radio input is checked and a controlled component. */ + checked?: boolean; + className?: string; + /* Set to **true** when the radio input is checked and an uncontrolled component. */ + defaultChecked?: boolean; + disabled?: boolean; + id?: string; + /* _INTERNAL USE ONLY._ */ + inline?: boolean; + /* Sets the `name` for the radio input. */ + name?: string; + /* Sets the `value` for the radio input. */ + value?: string; +} & { [x: string]: any }; + +declare const FormRadioItem: React.FunctionComponent; + +export default FormRadioItem; diff --git a/types/fundamental-react/lib/Forms/FormSelect.d.ts b/types/fundamental-react/lib/Forms/FormSelect.d.ts new file mode 100644 index 0000000000..4b917df76b --- /dev/null +++ b/types/fundamental-react/lib/Forms/FormSelect.d.ts @@ -0,0 +1,10 @@ +import * as React from "react"; + +export type FormSelectProps = { + className?: string; + disabled?: boolean; +} & { [x: string]: any }; + +declare const FormSelect: React.FunctionComponent; + +export default FormSelect; diff --git a/types/fundamental-react/lib/Forms/FormSet.d.ts b/types/fundamental-react/lib/Forms/FormSet.d.ts new file mode 100644 index 0000000000..bf63b53c77 --- /dev/null +++ b/types/fundamental-react/lib/Forms/FormSet.d.ts @@ -0,0 +1,9 @@ +import * as React from "react"; + +export type FormSetProps = { + className?: string; +} & { [x: string]: any }; + +declare const FormSet: React.FunctionComponent; + +export default FormSet; diff --git a/types/fundamental-react/lib/Forms/FormTextarea.d.ts b/types/fundamental-react/lib/Forms/FormTextarea.d.ts new file mode 100644 index 0000000000..249174f2c4 --- /dev/null +++ b/types/fundamental-react/lib/Forms/FormTextarea.d.ts @@ -0,0 +1,9 @@ +import * as React from "react"; + +export type FormTextareaProps = { + className?: string; +} & { [x: string]: any }; + +declare const FormTextarea: React.FunctionComponent; + +export default FormTextarea; diff --git a/types/fundamental-react/lib/Forms/index.d.ts b/types/fundamental-react/lib/Forms/index.d.ts new file mode 100644 index 0000000000..3630e0804c --- /dev/null +++ b/types/fundamental-react/lib/Forms/index.d.ts @@ -0,0 +1,11 @@ +export { default as FormFieldset } from "./FormFieldset"; +export { default as FormInput } from "./FormInput"; +export { default as FormItem } from "./FormItem"; +export { default as FormLabel } from "./FormLabel"; +export { default as FormLegend } from "./FormLegend"; +export { default as FormMessage } from "./FormMessage"; +export { default as FormRadioGroup } from "./FormRadioGroup"; +export { default as FormRadioItem } from "./FormRadioItem"; +export { default as FormSelect } from "./FormSelect"; +export { default as FormSet } from "./FormSet"; +export { default as FormTextarea } from "./FormTextarea"; diff --git a/types/fundamental-react/lib/Icon/Icon.d.ts b/types/fundamental-react/lib/Icon/Icon.d.ts new file mode 100644 index 0000000000..6f3c6c82a1 --- /dev/null +++ b/types/fundamental-react/lib/Icon/Icon.d.ts @@ -0,0 +1,14 @@ +import * as React from "react"; + +export type IconSize = "s" | "m" | "l" | "xl"; + +export type IconProps = { + glyph: string; + className?: string; + /* Size of the icon. Options include **xs**, **s**, **compact**, and **l**. If no size is provided, default (normal) will be used. */ + size?: IconSize; +} & { [x: string]: any }; + +declare const Icon: React.FunctionComponent; + +export default Icon; diff --git a/types/fundamental-react/lib/Icon/index.d.ts b/types/fundamental-react/lib/Icon/index.d.ts new file mode 100644 index 0000000000..4ae75fd135 --- /dev/null +++ b/types/fundamental-react/lib/Icon/index.d.ts @@ -0,0 +1 @@ +export { default as Icon } from "./Icon"; diff --git a/types/fundamental-react/lib/Identifier/Identifier.d.ts b/types/fundamental-react/lib/Identifier/Identifier.d.ts new file mode 100644 index 0000000000..ac23cddeb9 --- /dev/null +++ b/types/fundamental-react/lib/Identifier/Identifier.d.ts @@ -0,0 +1,31 @@ +import * as React from "react"; + +export type IdentifierModifiers = "circle" | "transparent"; + +export type IdentifierSizes = "xxs" | "xs" | "s" | "m" | "l" | "xl" | "xxl"; + +export type IdentifierProps = { + /* Image URL. */ + backgroundImageUrl?: string; + className?: string; + /* Applies a background color. */ + color?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9; + glyph?: string; + /* Localized text for label. */ + label?: string; + modifier?: IdentifierModifiers; + /* Size of the image. These sizes are available: + **xxs** (extra extra small) - 20px, + **xs** (extra small) - 28px, + **s** (small) - 32px, + **m** (medium) - 48px, + **l** (large) - 64px, + **xl** (extra lagre) - 88px, + and **xxl** (extra extra large). + Default matches the base font size (14px). */ + size: IdentifierSizes; +} & { [x: string]: any }; + +declare const Identifier: React.FunctionComponent; + +export default Identifier; diff --git a/types/fundamental-react/lib/Identifier/index.d.ts b/types/fundamental-react/lib/Identifier/index.d.ts new file mode 100644 index 0000000000..c3ecbd7df4 --- /dev/null +++ b/types/fundamental-react/lib/Identifier/index.d.ts @@ -0,0 +1 @@ +export { default as Identifier } from "./Identifier"; diff --git a/types/fundamental-react/lib/Image/Image.d.ts b/types/fundamental-react/lib/Image/Image.d.ts new file mode 100644 index 0000000000..c2acafc90d --- /dev/null +++ b/types/fundamental-react/lib/Image/Image.d.ts @@ -0,0 +1,15 @@ +import * as React from "react"; + +export type imageSize = "s" | "m" | "l"; +export type imageType = "circle"; +export type ImageProps = { + /* Picture URL. */ + photo: string; + size: imageSize; + className?: string; + type?: imageType; +} & { [x: string]: any }; + +declare const Image: React.FunctionComponent; + +export default Image; diff --git a/types/fundamental-react/lib/Image/index.d.ts b/types/fundamental-react/lib/Image/index.d.ts new file mode 100644 index 0000000000..8774255101 --- /dev/null +++ b/types/fundamental-react/lib/Image/index.d.ts @@ -0,0 +1 @@ +export { default as Image } from "./Image"; diff --git a/types/fundamental-react/lib/InlineHelp/InlineHelp.d.ts b/types/fundamental-react/lib/InlineHelp/InlineHelp.d.ts new file mode 100644 index 0000000000..8d5d6ea622 --- /dev/null +++ b/types/fundamental-react/lib/InlineHelp/InlineHelp.d.ts @@ -0,0 +1,20 @@ +import * as React from "react"; + +export type InlineHelpPlacement = + | "bottom-right" + | "bottom-left" + | "right" + | "left" + | "bottom-center"; + +export type InlineHelpProps = { + /* Location to display the inline help pop-up relative to the image. */ + placement: InlineHelpPlacement; + /* Localized text to display in the inline help pop-up. */ + text: string; + className?: string; +} & { [x: string]: any }; + +declare const InlineHelp: React.FunctionComponent; + +export default InlineHelp; diff --git a/types/fundamental-react/lib/InlineHelp/index.d.ts b/types/fundamental-react/lib/InlineHelp/index.d.ts new file mode 100644 index 0000000000..7ea5b350c9 --- /dev/null +++ b/types/fundamental-react/lib/InlineHelp/index.d.ts @@ -0,0 +1 @@ +export { default as InlineHelp } from "./InlineHelp"; diff --git a/types/fundamental-react/lib/InputGroup/FormGroup.d.ts b/types/fundamental-react/lib/InputGroup/FormGroup.d.ts new file mode 100644 index 0000000000..3a17bfb475 --- /dev/null +++ b/types/fundamental-react/lib/InputGroup/FormGroup.d.ts @@ -0,0 +1,5 @@ +import * as React from "react"; + +declare const FormGroup: React.FunctionComponent<{ [x: string]: any }>; + +export default FormGroup; diff --git a/types/fundamental-react/lib/InputGroup/InputGroup.d.ts b/types/fundamental-react/lib/InputGroup/InputGroup.d.ts new file mode 100644 index 0000000000..d8ab4de7ec --- /dev/null +++ b/types/fundamental-react/lib/InputGroup/InputGroup.d.ts @@ -0,0 +1,48 @@ +import * as React from "react"; + +export type InputGroupAddonPosition = "before" | "after"; + +export type InputGroupTypes = "text" | "number" | "search"; + +export type InputGroupProps = { + /* Set to **true** to enable an input with actions. Actions can be shown with a text label or icon. */ + actions?: boolean; + /* The value of the add-on. */ + addon?: string; + /* Location of the add-on relative to the input. */ + addonPos?: InputGroupAddonPosition; + className?: string; + compact?: boolean; + glyph?: string; + /* CSS class(es) to add to the `` element. */ + inputClassName?: string; + /* Value for the `id` attribute on the `` element. */ + inputId?: string; + /* Value for the `name` attribute on the `` element. */ + inputName?: string; + /* Value for the `placeholder` attribute on the `` element. */ + inputPlaceholder?: string; + inputProps?: { [x: string]: any }; + /* Value for the `type` attribute on the `` element. */ + inputType?: InputGroupTypes; + /* Value for the `value` attribute on the `` element. */ + inputValue?: any; + localizedText?: { + /* Value for aria-label on the clear