Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
}
}
],
"parser": "@babel/eslint-parser",
"rules": {
"max-len": ["warn", { "code": 120 }],
"no-console": ["error", {
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* Provide ability to disable an Icon Button. Refs STCOM-1028.
* `MultiSelection` support for `aria-label`. Refs STCOM-977.
* Fix regex matching of search options in `<AdvancedSearch>`. Fixes STCOM-1031.
* Export `staticFirstWeekDay` and `staticLangCountryCodes` from `Datepicker`. Refs STCOM-1038.

## [10.2.0](https://github.com/folio-org/stripes-components/tree/v10.2.0) (2022-06-14)
[Full Changelog](https://github.com/folio-org/stripes-components/compare/v10.1.0...v10.2.0)
Expand Down Expand Up @@ -65,6 +66,7 @@
* MultiSelection - fix exception when using special characters in search string. Fixes STCOM-1010.
* Browse contributors > Second pane should not show a horizontal scrollbar. Fixes STCOM-1011.
* Record detail panes are empty when printed. Refs STCOM-975.
* Add initial TypeScript definition files. Refs STCOM-1012.

## [10.1.5](https://github.com/folio-org/stripes-components/tree/v10.1.5) (2022-06-06)
[Full Changelog](https://github.com/folio-org/stripes-components/compare/v10.1.4...v10.1.5)
Expand Down
304 changes: 304 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,304 @@
// lib/Accordion
export {
Accordion,
AccordionSet,
AccordionStatus,
DefaultAccordionHeader,
FilterAccordionHeader,
ExpandAllButton,
expandAllFunction,
} from './lib/Accordion';

// lib/AdvancedSearch

// lib/AutoSuggest

// lib/Avatar

// lib/Badge
export { default as Badge, BadgeProps } from './lib/Badge';

// lib/Button
export { default as Button, ButtonProps } from './lib/Button';

// lib/ButtonGroup
export { default as ButtonGroup, ButtonGroupProps } from './lib/ButtonGroup';

// lib/Callout

// lib/Card

// lib/Checkbox
export {
default as Checkbox,
CheckboxProps,
CheckboxRenderProps,
} from './lib/Checkbox';

// lib/Commander

// lib/ConfirmationModal
export {
default as ConfirmationModal,
ConfirmationModalProps,
} from './lib/ConfirmationModal';

// lib/ConflictDetectionBanner

// lib/CountrySelection

// lib/CurrencySelect

// lib/Datepicker
export {
default as Datepicker,
DatepickerProps,
DatepickerFieldRenderProps,
staticFirstWeekDay,
staticLangCountryCodes,
} from './lib/Datepicker';

// lib/DateRangeWrapper

// lib/Dropdown
export { Dropdown, UncontrolledDropdown, DropdownProps } from './lib/Dropdown';

// lib/DropdownButton
export {
default as DropdownButton,
DropdownButtonProps,
} from './lib/DropdownButton';

// lib/DropdownMenu
export { default as DropdownMenu, DropdownMenuProps } from './lib/DropdownMenu';

// lib/Editor

// lib/EmptyMessage

// lib/ErrorBoundary
export {
default as ErrorBoundary,
ErrorBoundaryProps,
} from './lib/ErrorBoundary';

// lib/ErrorModal

// lib/ExportCsv

// lib/FilterControlGroup

// lib/FilterGroups

// lib/FilterPaneSearch

// lib/FocusLink

// lib/FormattedDate

// lib/FormattedTime

// lib/FormattedUTCDate

// lib/Headline
export { default as Headline, HeadlineProps } from './lib/Headline';

// lib/Highlighter

// lib/HotKeys
export { HotKeys, HotKeysProps } from './lib/HotKeys';

// lib/Icon
export { default as Icon, IconProps } from './lib/Icon';

// lib/IconButton
export { default as IconButton, IconButtonProps } from './lib/IconButton';

// lib/InfoPopover

// lib/KeyboardShortcutsModal

// lib/KeyValue
export { default as KeyValue, KeyValueProps } from './lib/KeyValue';

// lib/Label

// lib/Layer
export { default as Layer, LayerProps } from './lib/Layer';

// lib/Layout
export { default as Layout, LayoutProps } from './lib/Layout';

// lib/LayoutBox

// lib/LayoutGrid
export { Grid, Row, Col } from './lib/LayoutGrid';

// lib/LayoutHeader

// lib/List
export { default as List, ListProps } from './lib/List';

// lib/Loading
export {
Loading,
LoadingPane,
LoadingView,
LoadingProps,
LoadingPaneProps,
LoadingViewProps,
} from './lib/Loading';

// lib/MenuItem

// lib/MenuSection
export { default as MenuSection, MenuSectionProps } from './lib/MenuSection';

// lib/MessageBanner

// lib/MetaSection

// lib/Modal
export { default as Modal, ModalProps } from './lib/Modal';

// lib/ModalFooter
export { default as ModalFooter, ModalFooterProps } from './lib/ModalFooter';

// lib/MultiColumnList
export {
default as MultiColumnList,
MultiColumnListProps,
MultiColumnListRowFormatterProps,
} from './lib/MultiColumnList';

// lib/MultiSelection
export {
default as MultiSelection,
MultiSelectionProps,
MultiSelectionFieldRenderProps,
} from './lib/MultiSelection';

// lib/NavList
export { default as NavList, NavListProps } from './lib/NavList';

// lib/NavListItem
export { default as NavListItem, NavListItemProps } from './lib/NavListItem';

// lib/NavListSection
export {
default as NavListSection,
NavListSectionProps,
} from './lib/NavListSection';

// lib/NoValue

// lib/Pane
export { default as Pane, PaneProps } from './lib/Pane';

// lib/PaneBackLink
export { default as PaneBackLink, PaneBackLinkProps } from './lib/PaneBackLink';

// lib/PaneCloseLink
export {
default as PaneCloseLink,
PaneCloseLinkProps,
} from './lib/PaneCloseLink';

// lib/PaneFooter
export { default as PaneFooter, PaneFooterProps } from './lib/PaneFooter';

// lib/PaneHeader
export { default as PaneHeader, PaneHeaderProps } from './lib/PaneHeader';

// lib/PaneHeaderIconButton
export {
default as PaneHeaderIconButton,
PaneHeaderIconButtonProps,
} from './lib/PaneHeaderIconButton';

// lib/PaneMenu
export { default as PaneMenu, PaneMenuProps } from './lib/PaneMenu';

// lib/Paneset
export { default as Paneset, PanesetProps } from './lib/Paneset';

// lib/PaneSubheader
export {
default as PaneSubheader,
PaneSubheaderProps,
} from './lib/PaneSubheader';

// lib/PasswordStrength

// lib/Popover

// lib/Popper

// lib/RadioButton

// lib/RadioButtonGroup

// lib/RepeatableField

// lib/SearchField

// lib/Select
export {
default as Select,
OptionType as SelectOptionType,
SelectProps,
SelectFieldRenderProps,
} from './lib/Select';

// lib/Selection
export { OptionSegment, OptionSegmentProps } from './lib/Selection';

// lib/Spinner

// lib/SRStatus

// lib/TextArea

// lib/TextField
export {
default as TextField,
TextFieldProps,
TextFieldRenderProps,
} from './lib/TextField';

// lib/TextLink

// lib/Timepicker
export {
default as Timepicker,
TimepickerProps,
TimepickerFieldRenderProps,
} from './lib/Timepicker';

// lib/Tooltip

// hooks/useCurrencyOptions

// hooks/useFormatDate

// hooks/useFormatTime

// util/countries

// util/currencies

// util/dateTimeUtils
export {
getLocaleDateFormat,
getLocalizedTimeFormatInfo,
} from './util/dateTimeUtils';

// util/getFocusableElements

// util/languages

// util/nativeChangeFieldValue

// util/omitProps

// util/RootCloseWrapper
7 changes: 6 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ export { default as ButtonGroup } from './lib/ButtonGroup';
export { default as Checkbox } from './lib/Checkbox';
export { default as CurrencySelect } from './lib/CurrencySelect';
export { default as CountrySelection } from './lib/CountrySelection';
export { default as Datepicker, Calendar } from './lib/Datepicker';
export {
default as Datepicker,
Calendar,
staticFirstWeekDay,
staticLangCountryCodes
} from './lib/Datepicker';
export { getLocaleDateFormat, getLocalizedTimeFormatInfo } from './util/dateTimeUtils';
export { default as DateRangeWrapper } from './lib/DateRangeWrapper';
export { default as FormattedDate } from './lib/FormattedDate';
Expand Down
55 changes: 55 additions & 0 deletions lib/Accordion/Accordion.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
import { Component, CSSProperties, ReactNode, RefObject } from 'react';
import { HotKeysProps } from '../HotKeys';
import { DefaultAccordionHeaderProps } from './headers/DefaultAccordionHeader';

export interface AccordionProps extends Partial<DefaultAccordionHeaderProps> {
/** The containing accordionSet */
accordionSet?: ReactNode;
/** The accordion's contents */
children: ReactNode | ((open: boolean) => ReactNode);
/** Add class(es) to the component */
className?: string;
/** If the accordion should be closed by default */
closedByDefault?: boolean;
/** Sets the height of the accordion */
contentHeight?: CSSProperties['height'];
/** The id of the content div */
contentId?: string;
/** A reference to the content div */
contentRef?: RefObject<HTMLDivElement>;
/** If the accordion should be disabled */
disabled?: boolean;
/** Supplies a custom header */
header?: ReactNode;
/** Adds props to the default header */
headerProps?: Partial<DefaultAccordionHeaderProps>;
/** The id of the accordion */
id?: string;
/** A label for the accordion */
label: ReactNode;
/** A callback for when the header is clicked to toggle open/closed */
onClickToggle?: (args: { id: string; label: string; open: boolean }) => void;
/** A callback for when the header is toggled (not just clicked, but external e.g. expand all) */
onToggle?: (args: { id: string; label: string }) => void;
/** If the accordion is currently open */
open?: boolean;
/** If the separator between header and contents should be drawn */
separator?: boolean;
toggleKeyHandlers?: HotKeysProps['handlers'];
toggleKeyMap?: HotKeysProps['keyMap'];
}

/**
* Displays information in an accordion
* @example
* <AccordionSet>
* <Accordion label="AccordionSet_one">
* <p>first content</p>
* </Accordion>
* <Accordion label="AccordionSet_two">
* <p>second content</p>
* </Accordion>
* </AccordionSet>
*/
export class Accordion extends Component<AccordionProps> {}
export default Accordion;
Loading