├── .eslintignore
├── .eslintrc.yaml
├── .gitattributes
├── .github
├── CODEOWNERS
├── CONTRIBUTING.md
├── ISSUE_TEMPLATE
│ ├── bug.md
│ ├── documentation.md
│ ├── feature-request.md
│ └── question.md
├── PULL_REQUEST_TEMPLATE.md
├── dependabot.yml
└── workflows
│ ├── codeql-analysis.yml
│ ├── commitlint.yml
│ ├── deploy.yml
│ └── pr-build.yml
├── .gitignore
├── .husky
├── .gitignore
├── commit-msg
├── pre-commit
└── pre-push
├── .lintstagedrc.js
├── .npmrc
├── .nvmrc
├── .prettierignore
├── .prettierrc.js
├── .storybook
├── config.scss
├── index.stories.mdx
├── main.js
├── manager-head.html
├── manager.js
├── preview.js
├── static
│ ├── avfavicon.ico
│ └── icon.png
└── stories
│ ├── alert.stories.tsx
│ ├── badge.stories.tsx
│ ├── button.stories.tsx
│ ├── buttonGroup.stories.tsx
│ ├── card.stories.tsx
│ ├── modal.stories.tsx
│ ├── options.js
│ ├── reactstrap-installation.stories.mdx
│ └── utils.js
├── .yarn
├── plugins
│ └── @yarnpkg
│ │ └── plugin-interactive-tools.cjs
└── releases
│ └── yarn-3.6.3.cjs
├── .yarnrc.yml
├── CHANGELOG.md
├── LICENSE
├── README.md
├── babel.config.json
├── codecov.yml
├── commitlint.config.js
├── docusaurus
├── CHANGELOG.md
├── README.md
├── babel.config.js
├── docs
│ ├── components
│ │ ├── analytics
│ │ │ ├── analytics.md
│ │ │ ├── hook.md
│ │ │ └── index.md
│ │ ├── app-icon.mdx
│ │ ├── app-tiles.mdx
│ │ ├── authorize
│ │ │ ├── authorize.mdx
│ │ │ ├── index.mdx
│ │ │ └── useAuthorize.mdx
│ │ ├── avatar.mdx
│ │ ├── badge.mdx
│ │ ├── block-ui.mdx
│ │ ├── breadcrumbs.mdx
│ │ ├── button.mdx
│ │ ├── change-password
│ │ │ ├── change-password-form.md
│ │ │ ├── change-password.md
│ │ │ ├── index.md
│ │ │ └── use-change-password.md
│ │ ├── favorites
│ │ │ ├── favorites.md
│ │ │ ├── heart.md
│ │ │ ├── hook.md
│ │ │ └── index.md
│ │ ├── feature.mdx
│ │ ├── feedback
│ │ │ ├── feedback.md
│ │ │ ├── form.md
│ │ │ └── index.md
│ │ ├── help.mdx
│ │ ├── hooks
│ │ │ ├── index.md
│ │ │ ├── use-current-user.md
│ │ │ ├── use-effect-async.md
│ │ │ ├── use-mount.md
│ │ │ ├── use-organizations.md
│ │ │ ├── use-permissions.md
│ │ │ ├── use-providers.md
│ │ │ ├── use-region.md
│ │ │ ├── use-timeout.md
│ │ │ ├── use-toggle.md
│ │ │ ├── use-update-nav.md
│ │ │ └── use-window-dimensions.md
│ │ ├── icon.mdx
│ │ ├── json-viewer
│ │ │ ├── index.md
│ │ │ └── json-viewer.md
│ │ ├── link.mdx
│ │ ├── list-group-item
│ │ │ ├── index.md
│ │ │ ├── list-group-item-status.md
│ │ │ └── list-group-item.md
│ │ ├── list-group.mdx
│ │ ├── page-header.mdx
│ │ ├── pagination
│ │ │ ├── content.md
│ │ │ ├── context.md
│ │ │ ├── controls.md
│ │ │ ├── hook.md
│ │ │ ├── index.md
│ │ │ ├── pagination.md
│ │ │ └── resource.md
│ │ ├── progress.mdx
│ │ ├── spaces
│ │ │ ├── agreement.md
│ │ │ ├── context.md
│ │ │ ├── disclaimer.md
│ │ │ ├── ghost-text.md
│ │ │ ├── images.md
│ │ │ ├── index.md
│ │ │ ├── space.md
│ │ │ ├── spaces-link.md
│ │ │ ├── use-spaces-context.md
│ │ │ └── use-spaces.md
│ │ ├── step-wizard
│ │ │ ├── index.md
│ │ │ ├── wizard-step.md
│ │ │ └── wizard.md
│ │ ├── table
│ │ │ ├── index.md
│ │ │ ├── scrollableContainer.md
│ │ │ └── tableControls.md
│ │ ├── tooltip.mdx
│ │ ├── training-link.mdx
│ │ ├── tree.mdx
│ │ └── typography
│ │ │ ├── agreement.md
│ │ │ ├── disclaimer.md
│ │ │ └── index.md
│ ├── contributing.md
│ ├── form
│ │ ├── components
│ │ │ ├── checkbox-group.md
│ │ │ ├── checkbox.md
│ │ │ ├── currency-input.md
│ │ │ ├── feedback.md
│ │ │ ├── field.md
│ │ │ ├── form-group.md
│ │ │ ├── form.md
│ │ │ ├── help-icon.md
│ │ │ ├── input.md
│ │ │ ├── label.md
│ │ │ ├── radio-group.md
│ │ │ └── radio.md
│ │ ├── date
│ │ │ ├── components
│ │ │ │ ├── date-field.md
│ │ │ │ ├── date-range-field.md
│ │ │ │ ├── date-range.mdx
│ │ │ │ └── date.md
│ │ │ └── index.mdx
│ │ ├── index.mdx
│ │ ├── migrating.md
│ │ ├── phone
│ │ │ ├── components
│ │ │ │ ├── phone.md
│ │ │ │ └── validate-phone.md
│ │ │ └── index.mdx
│ │ ├── select
│ │ │ ├── components
│ │ │ │ ├── organization-select.md
│ │ │ │ ├── payer-select.md
│ │ │ │ ├── region-select.md
│ │ │ │ ├── resource-select.md
│ │ │ │ ├── select-field.md
│ │ │ │ └── select.md
│ │ │ └── index.mdx
│ │ └── upload
│ │ │ ├── file-picker-btn.md
│ │ │ ├── file-picker.md
│ │ │ ├── index.md
│ │ │ ├── upload-progress-bar.md
│ │ │ └── upload.md
│ └── intro.md
├── docusaurus.config.js
├── package.json
├── project.json
├── sidebars.js
├── src
│ └── css
│ │ └── custom.css
└── static
│ ├── .nojekyll
│ └── img
│ ├── favicon.ico
│ ├── icon.png
│ ├── logo.svg
│ ├── undraw_docusaurus_mountain.svg
│ ├── undraw_docusaurus_react.svg
│ └── undraw_docusaurus_tree.svg
├── jest.preset.js
├── jest
├── css.js
├── file.js
├── global-config.js
├── global-setup.js
└── setupTests.js
├── netlify.toml
├── nx.json
├── package.json
├── packages
├── analytics
│ ├── .npmignore
│ ├── CHANGELOG.md
│ ├── README.md
│ ├── jest.config.js
│ ├── package.json
│ ├── project.json
│ ├── src
│ │ ├── Analytics.d.ts
│ │ ├── Analytics.js
│ │ ├── Analytics.stories.tsx
│ │ ├── Analytics.test.js
│ │ ├── index.d.ts
│ │ └── index.js
│ ├── tsconfig.json
│ └── tsconfig.spec.json
├── app-icon
│ ├── .npmignore
│ ├── CHANGELOG.md
│ ├── README.md
│ ├── jest.config.js
│ ├── package.json
│ ├── project.json
│ ├── src
│ │ ├── AppIcon.stories.tsx
│ │ ├── AppIcon.test.tsx
│ │ ├── AppIcon.tsx
│ │ └── index.ts
│ ├── tsconfig.json
│ └── tsconfig.spec.json
├── app-tiles
│ ├── .npmignore
│ ├── CHANGELOG.md
│ ├── README.md
│ ├── jest.config.js
│ ├── package.json
│ ├── project.json
│ ├── src
│ │ ├── AppTiles.module.scss
│ │ ├── AppTiles.stories.tsx
│ │ ├── AppTiles.test.tsx
│ │ ├── AppTiles.tsx
│ │ ├── declarations.d.ts
│ │ └── index.ts
│ ├── tsconfig.json
│ ├── tsconfig.spec.json
│ └── tsup.config.js
├── authorize
│ ├── .npmignore
│ ├── CHANGELOG.md
│ ├── README.md
│ ├── jest.config.js
│ ├── package.json
│ ├── project.json
│ ├── src
│ │ ├── Authorize.stories.tsx
│ │ ├── Authorize.test.tsx
│ │ ├── Authorize.tsx
│ │ ├── UseAuthorize.stories.tsx
│ │ ├── api.test.ts
│ │ ├── api.ts
│ │ ├── index.ts
│ │ ├── types.ts
│ │ ├── useAuthorize.test.tsx
│ │ └── useAuthorize.ts
│ ├── tsconfig.json
│ └── tsconfig.spec.json
├── avatar
│ ├── .npmignore
│ ├── CHANGELOG.md
│ ├── README.md
│ ├── index.d.ts
│ ├── index.js
│ ├── jest.config.js
│ ├── package.json
│ ├── project.json
│ ├── src
│ │ ├── Avatar.d.ts
│ │ └── Avatar.js
│ ├── stories
│ │ ├── avatar.stories.tsx
│ │ └── props.stories.mdx
│ ├── tests
│ │ └── Avatar.test.js
│ ├── tsconfig.json
│ └── tsconfig.spec.json
├── badge
│ ├── .npmignore
│ ├── CHANGELOG.md
│ ├── README.md
│ ├── jest.config.js
│ ├── package.json
│ ├── project.json
│ ├── src
│ │ ├── RemovableBadge.stories.tsx
│ │ ├── RemovableBadge.tsx
│ │ ├── RemovableBadgeList.stories.tsx
│ │ ├── RemovableBadgeList.test.tsx
│ │ ├── RemovableBadgeList.tsx
│ │ ├── RemoveableBadge.test.tsx
│ │ ├── index.ts
│ │ └── props.stories.mdx
│ ├── tsconfig.json
│ └── tsconfig.spec.json
├── block-ui
│ ├── .npmignore
│ ├── CHANGELOG.md
│ ├── README.md
│ ├── jest.config.js
│ ├── package.json
│ ├── project.json
│ ├── src
│ │ ├── BlockUi.css
│ │ ├── BlockUi.stories.tsx
│ │ ├── BlockUi.test.tsx
│ │ ├── BlockUi.tsx
│ │ ├── Loader.css
│ │ ├── Loader.test.tsx
│ │ ├── Loader.tsx
│ │ └── index.ts
│ ├── tsconfig.json
│ └── tsconfig.spec.json
├── breadcrumbs
│ ├── .npmignore
│ ├── CHANGELOG.md
│ ├── README.md
│ ├── index.d.ts
│ ├── index.js
│ ├── jest.config.js
│ ├── package.json
│ ├── project.json
│ ├── src
│ │ ├── Breadcrumbs.d.ts
│ │ └── Breadcrumbs.js
│ ├── stories
│ │ ├── breadcrumbs.stories.tsx
│ │ └── props.stories.mdx
│ ├── tests
│ │ ├── Breadcrumbs.test.tsx
│ │ └── __snapshots__
│ │ │ └── Breadcrumbs.test.tsx.snap
│ ├── tsconfig.json
│ └── tsconfig.spec.json
├── button
│ ├── .npmignore
│ ├── CHANGELOG.md
│ ├── README.md
│ ├── jest.config.js
│ ├── package.json
│ ├── project.json
│ ├── src
│ │ ├── LoadingButton.stories.tsx
│ │ ├── LoadingButton.test.tsx
│ │ ├── LoadingButton.tsx
│ │ └── index.ts
│ ├── styles.scss
│ ├── tsconfig.json
│ └── tsconfig.spec.json
├── change-password
│ ├── CHANGELOG.md
│ ├── README.md
│ ├── index.d.ts
│ ├── index.js
│ ├── jest.config.js
│ ├── package.json
│ ├── project.json
│ ├── src
│ │ ├── ChangePassword.js
│ │ ├── ChangePasswordFeedback.js
│ │ ├── ChangePasswordFeedback.scss
│ │ ├── ChangePasswordForm.js
│ │ └── ChangePasswordForm.scss
│ ├── stories
│ │ └── change-password.stories.tsx
│ ├── tests
│ │ ├── ChangePasswordFeedback.test.js
│ │ └── ChangePasswordForm.test.js
│ ├── tsconfig.json
│ ├── tsconfig.spec.json
│ └── types
│ │ ├── ChangePassword.d.ts
│ │ ├── ChangePasswordFeedback.d.ts
│ │ └── ChangePasswordForm.d.ts
├── date
│ ├── .npmignore
│ ├── CHANGELOG.md
│ ├── README.md
│ ├── jest.config.js
│ ├── package.json
│ ├── polyfills
│ │ ├── index.js
│ │ └── padStart.js
│ ├── project.json
│ ├── src
│ │ ├── Date.d.ts
│ │ ├── Date.js
│ │ ├── DateField.d.ts
│ │ ├── DateField.js
│ │ ├── DateRange.d.ts
│ │ ├── DateRange.js
│ │ ├── DateRangeField.d.ts
│ │ ├── DateRangeField.js
│ │ ├── index.d.ts
│ │ ├── index.js
│ │ └── utils.js
│ ├── stories
│ │ ├── date.stories.tsx
│ │ └── props.stories.mdx
│ ├── styles.scss
│ ├── tests
│ │ ├── Date.test.js
│ │ ├── DateField.test.js
│ │ ├── DateRange.test.js
│ │ ├── DateRangeField.test.js
│ │ └── utils.test.js
│ ├── tsconfig.json
│ ├── tsconfig.spec.json
│ └── tsup.config.js
├── favorites
│ ├── .npmignore
│ ├── CHANGELOG.md
│ ├── README.md
│ ├── jest.config.js
│ ├── package.json
│ ├── project.json
│ ├── src
│ │ ├── FavoriteHeart.module.scss
│ │ ├── FavoriteHeart.stories.tsx
│ │ ├── FavoriteHeart.tsx
│ │ ├── Icons.tsx
│ │ ├── components
│ │ │ └── FavoritesTooltip
│ │ │ │ ├── FavoritesTooltip.module.scss
│ │ │ │ ├── FavoritesTooltip.tsx
│ │ │ │ └── index.ts
│ │ ├── context
│ │ │ ├── FavoritesProvider.tsx
│ │ │ ├── constants.ts
│ │ │ ├── index.ts
│ │ │ └── utils.ts
│ │ ├── declarations.d.ts
│ │ ├── index.ts
│ │ └── tests
│ │ │ ├── FavoriteHeart.test.js
│ │ │ └── maxFavorites.json
│ ├── style.scss
│ ├── tsconfig.json
│ ├── tsconfig.spec.json
│ └── tsup.config.js
├── feature
│ ├── .npmignore
│ ├── CHANGELOG.md
│ ├── README.md
│ ├── bin.js
│ ├── index.d.ts
│ ├── index.js
│ ├── jest.config.js
│ ├── package.json
│ ├── project.json
│ ├── src
│ │ ├── Feature.d.ts
│ │ ├── Feature.js
│ │ └── isFeatureEnabled.js
│ ├── stories
│ │ └── feature.stories.tsx
│ ├── tests
│ │ ├── Feature.test.js
│ │ └── isFeatureEnabled.test.js
│ ├── tsconfig.json
│ └── tsconfig.spec.json
├── feedback
│ ├── .npmignore
│ ├── CHANGELOG.md
│ ├── README.md
│ ├── index.d.ts
│ ├── index.js
│ ├── jest.config.js
│ ├── package.json
│ ├── project.json
│ ├── src
│ │ ├── Feedback.d.ts
│ │ ├── Feedback.js
│ │ ├── FeedbackButton.d.ts
│ │ ├── FeedbackButton.js
│ │ ├── FeedbackDropdown.d.ts
│ │ ├── FeedbackDropdown.js
│ │ ├── FeedbackForm.d.ts
│ │ ├── FeedbackForm.js
│ │ ├── FeedbackModal.d.ts
│ │ ├── FeedbackModal.js
│ │ ├── SmileField.js
│ │ ├── SupportDropdown.js
│ │ ├── SupportForm.js
│ │ └── SupportModal.js
│ ├── stories
│ │ ├── FeedbackWithForm.stories.tsx
│ │ └── feedback.stories.tsx
│ ├── tests
│ │ ├── Feedback.test.js
│ │ ├── FeedbackButton.test.js
│ │ ├── FeedbackForm.test.js
│ │ └── SupportForm.test.js
│ ├── tsconfig.json
│ └── tsconfig.spec.json
├── form-upload
│ ├── .npmignore
│ ├── CHANGELOG.md
│ ├── README.md
│ ├── jest.config.js
│ ├── package.json
│ ├── project.json
│ ├── src
│ │ ├── FileList.d.ts
│ │ ├── FileList.js
│ │ ├── FilePicker.d.ts
│ │ ├── FilePicker.js
│ │ ├── FilePickerBtn.d.ts
│ │ ├── FilePickerBtn.js
│ │ ├── FileRow.d.ts
│ │ ├── FileRow.js
│ │ ├── Upload.d.ts
│ │ ├── Upload.js
│ │ ├── Upload.stories.tsx
│ │ ├── UploadProgressBar.d.ts
│ │ ├── UploadProgressBar.js
│ │ ├── index.d.ts
│ │ ├── index.js
│ │ └── props.stories.mdx
│ ├── styles.scss
│ ├── tests
│ │ ├── FilePicker.test.js
│ │ ├── FilePickerBtn.test.js
│ │ ├── Upload.test.tsx
│ │ ├── UploadProgressBar.test.js
│ │ ├── filesDelivery.test.js
│ │ └── mockUpload.js
│ ├── tsconfig.json
│ └── tsconfig.spec.json
├── form
│ ├── .npmignore
│ ├── CHANGELOG.md
│ ├── MIGRATION.md
│ ├── README.md
│ ├── jest.config.js
│ ├── package.json
│ ├── project.json
│ ├── src
│ │ ├── Checkbox.d.ts
│ │ ├── Checkbox.js
│ │ ├── CheckboxGroup.d.ts
│ │ ├── CheckboxGroup.js
│ │ ├── CheckboxGroup.stories.tsx
│ │ ├── CurrencyInput.stories.tsx
│ │ ├── CurrencyInput.tsx
│ │ ├── Feedback.d.ts
│ │ ├── Feedback.js
│ │ ├── Field.d.ts
│ │ ├── Field.js
│ │ ├── Field.stories.tsx
│ │ ├── FieldHelpIcon.d.ts
│ │ ├── FieldHelpIcon.js
│ │ ├── FieldHelpIcon.stories.tsx
│ │ ├── Form.d.ts
│ │ ├── Form.js
│ │ ├── Form.stories.tsx
│ │ ├── FormGroup.d.ts
│ │ ├── FormGroup.js
│ │ ├── FormGroup.stories.tsx
│ │ ├── Input.d.ts
│ │ ├── Input.js
│ │ ├── InputForm.stories.tsx
│ │ ├── Label.d.ts
│ │ ├── Label.js
│ │ ├── Label.stories.tsx
│ │ ├── Radio.d.ts
│ │ ├── Radio.js
│ │ ├── RadioGroup.d.ts
│ │ ├── RadioGroup.js
│ │ ├── RadioGroup.stories.tsx
│ │ ├── index.d.ts
│ │ ├── index.js
│ │ └── props.stories.mdx
│ ├── tests
│ │ ├── Checkbox.test.js
│ │ ├── CheckboxGroup.test.js
│ │ ├── CurrencyInput.test.js
│ │ ├── Feedback.test.js
│ │ ├── Field.test.js
│ │ ├── FieldHelpIcon.test.js
│ │ ├── Form.test.js
│ │ ├── FormGroup.test.js
│ │ ├── Input.test.js
│ │ ├── Label.test.js
│ │ ├── Radio.test.js
│ │ └── RadioGroup.test.js
│ ├── tsconfig.json
│ └── tsconfig.spec.json
├── help
│ ├── .npmignore
│ ├── CHANGELOG.md
│ ├── README.md
│ ├── jest.config.js
│ ├── package.json
│ ├── project.json
│ ├── src
│ │ ├── Help.stories.tsx
│ │ ├── Help.test.tsx
│ │ ├── Help.tsx
│ │ └── index.ts
│ ├── tsconfig.json
│ └── tsconfig.spec.json
├── hooks
│ ├── .npmignore
│ ├── CHANGELOG.md
│ ├── README.md
│ ├── index.d.ts
│ ├── index.js
│ ├── jest.config.js
│ ├── package.json
│ ├── project.json
│ ├── src
│ │ ├── useCurrentRegion.js
│ │ ├── useCurrentUser.js
│ │ ├── useEffectAsync.js
│ │ ├── useMount.js
│ │ ├── useOrganizations.js
│ │ ├── usePermissions.js
│ │ ├── useProviders.js
│ │ ├── useTimeout.js
│ │ ├── useToggle.js
│ │ ├── useUpdateNav.js
│ │ └── useWindowDimensions.js
│ ├── stories
│ │ ├── ResourceComponent.tsx
│ │ ├── useCurrentRegion.stories.tsx
│ │ ├── useCurrentUser.stories.tsx
│ │ ├── useEffectAsync.stories.tsx
│ │ ├── useMount.stories.tsx
│ │ ├── useOrganizations.stories.tsx
│ │ ├── usePermissions.stories.tsx
│ │ ├── useProviders.stories.tsx
│ │ ├── useTimeout.stories.tsx
│ │ ├── useToggle.stories.tsx
│ │ └── useWindowDimensions.stories.tsx
│ ├── tests
│ │ ├── useCurrentRegion.test.js
│ │ ├── useCurrentUser.test.js
│ │ ├── useEffectAsync.test.js
│ │ ├── useMount.test.js
│ │ ├── useOrganizations.test.js
│ │ ├── usePermissions.test.js
│ │ ├── useProviders.test.js
│ │ ├── useTimeout.test.js
│ │ ├── useToggle.test.js
│ │ ├── useUpdateNav.test.js
│ │ ├── useWindowDimensions.test.js
│ │ └── util.js
│ ├── tsconfig.json
│ ├── tsconfig.spec.json
│ └── types
│ │ ├── aries.d.ts
│ │ ├── useCurrentRegion.d.ts
│ │ ├── useCurrentUser.d.ts
│ │ ├── useEffectAsync.d.ts
│ │ ├── useMount.d.ts
│ │ ├── useOrganizations.d.ts
│ │ ├── usePermissions.d.ts
│ │ ├── useProviders.d.ts
│ │ ├── useTimeout.d.ts
│ │ ├── useToggle.d.ts
│ │ ├── useUpdateNav.d.ts
│ │ └── useWindowDimensions.d.ts
├── icon
│ ├── .npmignore
│ ├── CHANGELOG.md
│ ├── README.md
│ ├── jest.config.js
│ ├── package.json
│ ├── project.json
│ ├── src
│ │ ├── Icon.stories.tsx
│ │ ├── Icon.test.tsx
│ │ ├── Icon.tsx
│ │ └── index.ts
│ ├── tsconfig.json
│ └── tsconfig.spec.json
├── json-viewer
│ ├── .npmignore
│ ├── CHANGELOG.md
│ ├── README.md
│ ├── jest.config.js
│ ├── package.json
│ ├── project.json
│ ├── src
│ │ ├── JsonViewer.stories.tsx
│ │ ├── JsonViewer.test.tsx
│ │ ├── JsonViewer.tsx
│ │ └── index.ts
│ ├── tsconfig.json
│ └── tsconfig.spec.json
├── link
│ ├── .npmignore
│ ├── CHANGELOG.md
│ ├── README.md
│ ├── index.d.ts
│ ├── index.js
│ ├── jest.config.js
│ ├── package.json
│ ├── project.json
│ ├── src
│ │ └── Link.js
│ ├── stories
│ │ └── link.stories.tsx
│ ├── tests
│ │ └── Link.test.js
│ ├── tsconfig.json
│ ├── tsconfig.spec.json
│ └── types
│ │ └── Link.d.ts
├── list-group-item
│ ├── .npmignore
│ ├── CHANGELOG.md
│ ├── README.md
│ ├── index.d.ts
│ ├── index.js
│ ├── jest.config.js
│ ├── package.json
│ ├── project.json
│ ├── src
│ │ ├── ListGroupItem.d.ts
│ │ ├── ListGroupItem.js
│ │ ├── ListGroupItem.stories.tsx
│ │ ├── ListGroupItemStatus.d.ts
│ │ ├── ListGroupItemStatus.js
│ │ └── props.stories.mdx
│ ├── tests
│ │ ├── ListGroupItem.test.js
│ │ └── ListGroupItemStatus.test.js
│ ├── tsconfig.json
│ └── tsconfig.spec.json
├── list-group
│ ├── .npmignore
│ ├── CHANGELOG.md
│ ├── README.md
│ ├── index.d.ts
│ ├── index.js
│ ├── jest.config.js
│ ├── package.json
│ ├── project.json
│ ├── src
│ │ ├── ListGroup.d.ts
│ │ ├── ListGroup.js
│ │ ├── ListGroup.stories.tsx
│ │ └── props.stories.mdx
│ ├── tests
│ │ ├── ListGroup.test.js
│ │ └── __snapshots__
│ │ │ └── ListGroup.test.js.snap
│ ├── tsconfig.json
│ └── tsconfig.spec.json
├── mock
│ ├── CHANGELOG.md
│ ├── README.md
│ ├── package.json
│ └── src
│ │ ├── browser.ts
│ │ ├── data
│ │ ├── axi-user-permissions.json
│ │ ├── codes.json
│ │ ├── custom-graphql.json
│ │ ├── custom.json
│ │ ├── extended-payers.json
│ │ ├── features.json
│ │ ├── navigation-spaces.json
│ │ ├── notifications.json
│ │ ├── organizations.json
│ │ ├── pagination.json
│ │ ├── patients.json
│ │ ├── permissions.json
│ │ ├── providers.json
│ │ ├── region.json
│ │ ├── regions.json
│ │ ├── settings.json
│ │ ├── spaces.json
│ │ ├── user.json
│ │ └── users.json
│ │ ├── handlers.ts
│ │ ├── routes.ts
│ │ └── server.ts
├── page-header
│ ├── .npmignore
│ ├── CHANGELOG.md
│ ├── README.md
│ ├── index.d.ts
│ ├── index.js
│ ├── jest.config.js
│ ├── package.json
│ ├── project.json
│ ├── src
│ │ └── PageHeader.js
│ ├── stories
│ │ └── page-header.stories.tsx
│ ├── styles.scss
│ ├── tests
│ │ └── PageHeader.test.js
│ ├── tsconfig.json
│ ├── tsconfig.spec.json
│ └── types
│ │ └── PageHeader.d.ts
├── pagination
│ ├── .npmignore
│ ├── CHANGELOG.md
│ ├── README.md
│ ├── jest.config.js
│ ├── package.json
│ ├── project.json
│ ├── src
│ │ ├── AvResourcePagination.tsx
│ │ ├── Pagination.stories.tsx
│ │ ├── Pagination.tsx
│ │ ├── PaginationContent.tsx
│ │ ├── PaginationControls.tsx
│ │ ├── index.ts
│ │ ├── props.stories.mdx
│ │ └── tests
│ │ │ ├── AvResourcePagination.test.js
│ │ │ ├── Pagination.test.js
│ │ │ ├── PaginationContent.test.js
│ │ │ ├── PaginationControls.test.js
│ │ │ └── data
│ │ │ └── pagination.json
│ ├── tsconfig.json
│ └── tsconfig.spec.json
├── payer-logo
│ ├── .npmignore
│ ├── CHANGELOG.md
│ ├── README.md
│ ├── index.d.ts
│ ├── index.js
│ ├── jest.config.js
│ ├── package.json
│ ├── project.json
│ ├── src
│ │ ├── PayerLogo.d.ts
│ │ ├── PayerLogo.js
│ │ ├── PayerLogo.stories.tsx
│ │ └── PayerLogo.test.js
│ ├── tsconfig.json
│ └── tsconfig.spec.json
├── phone
│ ├── .npmignore
│ ├── CHANGELOG.md
│ ├── README.md
│ ├── index.d.ts
│ ├── index.js
│ ├── jest.config.js
│ ├── package.json
│ ├── project.json
│ ├── src
│ │ ├── Phone.d.ts
│ │ ├── Phone.js
│ │ ├── Phone.stories.tsx
│ │ └── validatePhone.js
│ ├── tests
│ │ └── Phone.test.js
│ ├── tsconfig.json
│ └── tsconfig.spec.json
├── progress
│ ├── .npmignore
│ ├── CHANGELOG.md
│ ├── README.md
│ ├── jest.config.js
│ ├── package.json
│ ├── project.json
│ ├── src
│ │ ├── Progress.stories.tsx
│ │ ├── Progress.test.tsx
│ │ ├── Progress.tsx
│ │ └── index.ts
│ ├── tsconfig.json
│ └── tsconfig.spec.json
├── reactstrap-validation-date
│ ├── .npmignore
│ ├── CHANGELOG.md
│ ├── README.md
│ ├── index.d.ts
│ ├── index.js
│ ├── jest.config.js
│ ├── package.json
│ ├── polyfills
│ │ ├── index.js
│ │ └── padStart.js
│ ├── project.json
│ ├── src
│ │ ├── AvDate.js
│ │ ├── AvDateField.js
│ │ ├── AvDateRange.js
│ │ ├── AvDateRangeField.js
│ │ └── utils.js
│ ├── stories
│ │ ├── avdate.stories.tsx
│ │ └── props.stories.mdx
│ ├── styles.scss
│ ├── tests
│ │ ├── AvDate.test.js
│ │ ├── AvDateField.test.js
│ │ ├── AvDateRange.test.js
│ │ ├── AvDateRangeField.test.js
│ │ └── utils.test.js
│ ├── tsconfig.json
│ ├── tsconfig.spec.json
│ └── types
│ │ ├── AvDate.d.ts
│ │ ├── AvDateField.d.ts
│ │ ├── AvDateRange.d.ts
│ │ ├── AvDateRangeField.d.ts
│ │ └── AvInput.d.ts
├── reactstrap-validation-select
│ ├── .npmignore
│ ├── CHANGELOG.md
│ ├── README.md
│ ├── index.d.ts
│ ├── index.js
│ ├── jest.config.js
│ ├── package.json
│ ├── project.json
│ ├── resources.d.ts
│ ├── resources.js
│ ├── src
│ │ ├── AvResourceSelect.js
│ │ ├── AvSelect.js
│ │ └── AvSelectField.js
│ ├── stories
│ │ ├── avSelectResources.stories.tsx
│ │ ├── avselect.stories.tsx
│ │ └── props.stories.mdx
│ ├── styles.scss
│ ├── tests
│ │ ├── AvResourceSelect.test.js
│ │ ├── AvSelect.test.js
│ │ └── AvSelectField.test.js
│ ├── tsconfig.json
│ ├── tsconfig.spec.json
│ └── types
│ │ ├── AvInput.d.ts
│ │ ├── AvResourceSelect.d.ts
│ │ ├── AvSelect.d.ts
│ │ └── AvSelectField.d.ts
├── select
│ ├── .npmignore
│ ├── CHANGELOG.md
│ ├── README.md
│ ├── jest.config.js
│ ├── package.json
│ ├── project.json
│ ├── src
│ │ ├── AvOrganizationSelect.d.ts
│ │ ├── AvOrganizationSelect.js
│ │ ├── AvPayerSelect.js
│ │ ├── AvRegionSelect.d.ts
│ │ ├── AvRegionSelect.js
│ │ ├── ResourceSelect.d.ts
│ │ ├── ResourceSelect.js
│ │ ├── Select.d.ts
│ │ ├── Select.js
│ │ ├── SelectField.d.ts
│ │ ├── SelectField.js
│ │ ├── index.d.ts
│ │ ├── index.js
│ │ ├── resources.d.ts
│ │ └── resources.js
│ ├── stories
│ │ ├── ResourceSelect.stories.tsx
│ │ ├── props.stories.mdx
│ │ ├── select.stories.tsx
│ │ └── utils.tsx
│ ├── tests
│ │ ├── ResourceSelect.test.js
│ │ ├── Select.test.js
│ │ └── SelectField.test.js
│ ├── tsconfig.json
│ └── tsconfig.spec.json
├── spaces
│ ├── .npmignore
│ ├── CHANGELOG.md
│ ├── README.md
│ ├── index.d.ts
│ ├── index.js
│ ├── jest.config.js
│ ├── package.json
│ ├── project.json
│ ├── src
│ │ ├── Loader.js
│ │ ├── Spaces.js
│ │ ├── SpacesAgreement.js
│ │ ├── SpacesDisclaimer.js
│ │ ├── SpacesGhostText.js
│ │ ├── SpacesIcon.js
│ │ ├── SpacesImage.js
│ │ ├── SpacesLink.js
│ │ ├── helpers.js
│ │ ├── linkHandlers.js
│ │ ├── modals
│ │ │ ├── DisclaimerModal.js
│ │ │ ├── ModalProvider.js
│ │ │ └── MultiPayerModal.js
│ │ └── useLink.js
│ ├── stories
│ │ ├── props.stories.mdx
│ │ └── spaces.stories.tsx
│ ├── styles.scss
│ ├── tests
│ │ ├── DisclaimerModal.test.js
│ │ ├── MultiPayerModal.test.js
│ │ ├── Spaces.test.js
│ │ ├── SpacesAgreement.test.js
│ │ ├── SpacesDisclaimer.test.js
│ │ ├── SpacesGhostText.test.js
│ │ ├── SpacesImage.test.js
│ │ ├── SpacesLink.test.js
│ │ ├── helpers.test.js
│ │ └── useLink.test.js
│ ├── tsconfig.json
│ ├── tsconfig.spec.json
│ └── types
│ │ ├── Spaces.d.ts
│ │ ├── SpacesAgreement.d.ts
│ │ ├── SpacesDisclaimer.d.ts
│ │ ├── SpacesGhostText.d.ts
│ │ ├── SpacesImage.d.ts
│ │ ├── helpers.d.ts
│ │ └── linkHandlers.d.ts
├── step-wizard
│ ├── .npmignore
│ ├── CHANGELOG.md
│ ├── README.md
│ ├── index.d.ts
│ ├── index.js
│ ├── jest.config.js
│ ├── package.json
│ ├── project.json
│ ├── src
│ │ ├── Wizard.js
│ │ ├── WizardStep.js
│ │ ├── WizardStepBadge.js
│ │ └── WizardStepTitle.js
│ ├── stories
│ │ ├── props.stories.mdx
│ │ └── step-wizard.stories.tsx
│ ├── tests
│ │ ├── Wizard.test.js
│ │ ├── WizardStep.test.js
│ │ ├── WizardStepBadge.test.js
│ │ └── WizardStepTitle.test.js
│ ├── tsconfig.json
│ ├── tsconfig.spec.json
│ └── types
│ │ ├── Wizard.d.ts
│ │ ├── WizardStep.d.ts
│ │ ├── WizardStepBadge.d.ts
│ │ └── WizardStepTitle.d.ts
├── table
│ ├── .npmignore
│ ├── CHANGELOG.md
│ ├── README.md
│ ├── jest.config.js
│ ├── package.json
│ ├── project.json
│ ├── src
│ │ ├── CellDefinitions
│ │ │ ├── ActionCell.tsx
│ │ │ ├── BadgeCell.tsx
│ │ │ ├── CurrencyCell.tsx
│ │ │ ├── DateCell.tsx
│ │ │ ├── DefaultValueCell.tsx
│ │ │ ├── IconCell.tsx
│ │ │ ├── IconWIthTooltipCell.tsx
│ │ │ └── index.ts
│ │ ├── Controls
│ │ │ ├── BulkTableActions.tsx
│ │ │ ├── TableControls.tsx
│ │ │ ├── TableSorter.tsx
│ │ │ └── index.ts
│ │ ├── IndeterminateCheckbox.tsx
│ │ ├── ScrollableContainer.tsx
│ │ ├── Table.stories.tsx
│ │ ├── Table.tsx
│ │ ├── TableActionMenu.tsx
│ │ ├── TableActionMenuItem.tsx
│ │ ├── TableCell.tsx
│ │ ├── TableContent.tsx
│ │ ├── TableContext.tsx
│ │ ├── TableHeader.tsx
│ │ ├── TableHeaderCell.tsx
│ │ ├── TableHeaderRow.tsx
│ │ ├── TableRow.tsx
│ │ ├── index.ts
│ │ ├── props.stories.mdx
│ │ ├── tests
│ │ │ ├── BulkTableActions.test.tsx
│ │ │ ├── ScrollableContainer.test.tsx
│ │ │ ├── Table.test.tsx
│ │ │ ├── TableControls.test.tsx
│ │ │ ├── TableSorter.test.tsx
│ │ │ ├── __snapshots__
│ │ │ │ ├── BulkTableActions.test.tsx.snap
│ │ │ │ ├── ScrollableContainer.test.tsx.snap
│ │ │ │ ├── Table.test.tsx.snap
│ │ │ │ ├── TableControls.test.tsx.snap
│ │ │ │ └── TableSorter.test.tsx.snap
│ │ │ └── data
│ │ │ │ ├── basicData.json
│ │ │ │ └── needsFormattedData.json
│ │ └── types
│ │ │ ├── BulkRecordAction.ts
│ │ │ ├── OnRowSelectedEvent.ts
│ │ │ ├── OnTableClickEvent.ts
│ │ │ ├── PrimaryRecordAction.ts
│ │ │ ├── ReactTable.ts
│ │ │ ├── RecordAction.ts
│ │ │ ├── TableAction.ts
│ │ │ ├── TableSort.ts
│ │ │ ├── TableSortOption.ts
│ │ │ └── index.ts
│ ├── styles.scss
│ ├── tsconfig.json
│ └── tsconfig.spec.json
├── tooltip
│ ├── .npmignore
│ ├── CHANGELOG.md
│ ├── README.md
│ ├── jest.config.js
│ ├── package.json
│ ├── project.json
│ ├── src
│ │ ├── Tooltip.stories.tsx
│ │ ├── Tooltip.test.tsx
│ │ ├── Tooltip.tsx
│ │ └── index.ts
│ ├── tsconfig.json
│ └── tsconfig.spec.json
├── training-link
│ ├── .npmignore
│ ├── CHANGELOG.md
│ ├── README.md
│ ├── jest.config.js
│ ├── package.json
│ ├── project.json
│ ├── src
│ │ ├── TrainingLink.stories.tsx
│ │ ├── TrainingLink.test.tsx
│ │ ├── TrainingLink.tsx
│ │ └── index.ts
│ ├── tsconfig.json
│ └── tsconfig.spec.json
├── tree
│ ├── .npmignore
│ ├── CHANGELOG.md
│ ├── README.md
│ ├── jest.config.js
│ ├── package.json
│ ├── project.json
│ ├── src
│ │ ├── Tree.stories.tsx
│ │ ├── Tree.test.tsx
│ │ ├── Tree.tsx
│ │ ├── TreeItem.ts
│ │ ├── TreeItemContent.tsx
│ │ ├── index.ts
│ │ └── props.stories.mdx
│ ├── styles.scss
│ ├── tsconfig.json
│ └── tsconfig.spec.json
├── typography
│ ├── .npmignore
│ ├── CHANGELOG.md
│ ├── README.md
│ ├── jest.config.js
│ ├── package.json
│ ├── project.json
│ ├── src
│ │ ├── Agreement.tsx
│ │ ├── Disclaimer.tsx
│ │ └── index.ts
│ ├── stories
│ │ ├── typography-disclaimer.stories.tsx
│ │ └── typography.stories.tsx
│ ├── tests
│ │ ├── Agreement.test.tsx
│ │ └── Disclaimer.test.tsx
│ ├── tsconfig.json
│ └── tsconfig.spec.json
└── upload
│ ├── .npmignore
│ ├── CHANGELOG.md
│ ├── README.md
│ ├── index.d.ts
│ ├── index.js
│ ├── jest.config.js
│ ├── package.json
│ ├── project.json
│ ├── src
│ ├── FileList.js
│ ├── FilePicker.js
│ ├── FilePickerBtn.js
│ ├── FileRow.js
│ ├── Upload.js
│ └── UploadProgressBar.js
│ ├── stories
│ ├── filelist.stories.tsx
│ ├── filepicker.stories.tsx
│ ├── pickerbutton.stories.tsx
│ └── upload.stories.tsx
│ ├── styles.scss
│ ├── tests
│ ├── FilePicker.test.js
│ ├── FilePickerBtn.test.js
│ ├── Upload.test.js
│ ├── UploadProgressBar.test.js
│ ├── __snapshots__
│ │ ├── FilePicker.test.js.snap
│ │ └── FilePickerBtn.test.js.snap
│ └── mockUpload.js
│ ├── tsconfig.json
│ ├── tsconfig.spec.json
│ └── types
│ ├── FileList.d.ts
│ ├── FilePicker.d.ts
│ ├── FilePickerBtn.d.ts
│ ├── FileRow.d.ts
│ ├── Upload.d.ts
│ └── UploadProgressBar.d.ts
├── plop-templates
└── package
│ ├── CHANGELOG.md.hbs
│ ├── Package.d.ts.hbs
│ ├── Package.js.hbs
│ ├── Package.mdx.hbs
│ ├── Package.test.js.hbs
│ ├── README.md.hbs
│ ├── index.d.ts.hbs
│ ├── index.js.hbs
│ ├── package.json.hbs
│ └── stories.js.hbs
├── scripts
├── artifactory-check.sh
├── check-missing-deps.js
├── generate-many.js
└── merge-coverage.js
├── static
├── import-file.d.ts
├── mockServiceWorker.js
├── public
│ └── apps
│ │ ├── my-profile
│ │ └── images
│ │ │ └── Avatars-00.png
│ │ └── tiles
│ │ └── images
│ │ ├── availity_tile_1.jpeg
│ │ ├── availity_tile_2.jpeg
│ │ └── availity_tile_3.jpeg
└── static
│ └── spaces
│ └── 12345
│ ├── sample-billboard.png
│ ├── sample-logo.png
│ └── sample-tile.png
├── story-utils
├── AvFormResults.tsx
├── FormikResults.tsx
└── ResourceComponent.tsx
├── tsconfig.json
└── yarn.lock
/.eslintignore:
--------------------------------------------------------------------------------
1 | .yarn
2 | !.storybook/
3 |
4 | docs/
5 | storybook-docs/
6 | coverage/
7 | static/
8 |
9 | /**/.docusaurus
10 | /**/build
11 | /**/dist
12 |
13 | # temporary to pass builds until TS errors fixed
14 | *.d.ts
15 |
--------------------------------------------------------------------------------
/.eslintrc.yaml:
--------------------------------------------------------------------------------
1 | root: true
2 | extends: availity/browser
3 | env:
4 | jest: true
5 | rules:
6 | react/destructuring-assignment: 0
7 | react/forbid-foreign-prop-types: 0
8 | react/no-access-state-in-setstate: 0
9 | jest/expect-expect: 0
10 | guard-for-in: 0
11 | no-restricted-syntax: 0
12 | react/prefer-stateless-function: 0
13 | # disabled to support older versions of workflow that do not polyfill Array.prototype.find (not supported in IE)
14 | unicorn/prefer-array-find: 0
15 | unicorn/no-abusive-eslint-disable: 0
16 | unicorn/no-lonely-if: 0
17 | unicorn/no-array-for-each: 0
18 | no-restricted-exports: 0
19 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | * text=auto
2 |
--------------------------------------------------------------------------------
/.github/CODEOWNERS:
--------------------------------------------------------------------------------
1 | # https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-on-github/about-code-owners#example-of-a-codeowners-file
2 | # These owners will be the default owners for everything in the repo.
3 | # Unless a later match takes precedence,
4 | # these users will be requested for review when someone opens a pull request.
5 | # Order is important; the last matching pattern takes the most precedence.
6 |
7 | * @jordan-a-young @LauRoxx @gregmartDOTin
8 |
9 | /packages/upload/ @bjnewman
10 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/bug.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: "\U0001F41B Bug report"
3 | about: Open a new issue here if something isn't working as expected.
4 | ---
5 |
6 | ## 🐛 Bug report
7 |
8 | ### Current Behavior
9 |
10 |
11 |
12 | ### Expected behavior
13 |
14 |
15 |
16 | ### Reproducible example
17 |
18 |
19 |
20 | ### Suggested solution(s)
21 |
22 |
23 |
24 | ### Additional context
25 |
26 |
27 |
28 | ### Your environment
29 |
30 |
31 |
32 | ```bash
33 | npx envinfo --npmPackages '@availity/*' --binaries
34 | ```
35 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/documentation.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: "\U0001f4da Documentation"
3 | about: Improvements or suggestions for the storybook/gatsby docs.
4 | ---
5 |
6 | ## 📖 Documentation
7 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/question.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: '❓Question'
3 | about: 'Any other issue that is not bug, feature, or docs related.'
4 | ---
5 |
6 | ## ❓Question
7 |
8 |
9 |
--------------------------------------------------------------------------------
/.github/PULL_REQUEST_TEMPLATE.md:
--------------------------------------------------------------------------------
1 | **Before submitting a pull request,** please make sure the following is done:
2 |
3 | 1. Fork [the repository](https://github.com/availity/availity-react) and create your branch from `master`.
4 | 2. Run `yarn` in the repository root.
5 | 3. If you've fixed a bug or added code that should be tested, add tests!
6 | 4. Ensure the test suite passes (`yarn test`). Tip: `yarn test --watch TestName` is helpful in development.
7 | 5. Make sure your code passed the conventional commits check. Read more about [conventional commits](https://www.conventionalcommits.org/en/v1.0.0-beta.4/#summary)
8 |
--------------------------------------------------------------------------------
/.github/dependabot.yml:
--------------------------------------------------------------------------------
1 | version: 2
2 | updates:
3 | - package-ecosystem: npm
4 | directory: '/'
5 | schedule:
6 | interval: weekly
7 | time: '10:00'
8 | open-pull-requests-limit: 10
9 | ignore:
10 | - dependency-name: '@typescript-eslint/parser'
11 | versions: ['5.x']
12 | - dependency-name: '@typescript-eslint/eslint-plugin'
13 | versions: ['5.x']
14 | - dependency-name: '@types/node'
15 | versions: ['15.x', '16.x', '17.x']
16 | - dependency-name: '@types/jest'
17 | versions: ['27.x']
18 | - dependency-name: yup
19 |
--------------------------------------------------------------------------------
/.github/workflows/commitlint.yml:
--------------------------------------------------------------------------------
1 | name: Lint Commit Messages
2 | on: [workflow_dispatch]
3 |
4 | jobs:
5 | commitlint:
6 | if: github.actor != 'dependabot[bot]'
7 | runs-on: ubuntu-latest
8 | steps:
9 | - uses: actions/checkout@v3
10 | with:
11 | fetch-depth: 0
12 |
13 | - uses: actions/setup-node@v3
14 | with:
15 | node-version: 22
16 |
17 | - run: yarn install --immutable
18 |
19 | - uses: wagoid/commitlint-github-action@v5
20 | env:
21 | NODE_PATH: ${{ github.workspace }}/node_modules
22 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | .history
3 | .tmp
4 | .vscode
5 |
6 | /**/.idea/
7 | *.log
8 |
9 | coverage/
10 | reports/
11 |
12 | /**/.cache
13 | /**/.docusaurus
14 | /**/build
15 | /**/dist
16 | /**/lib
17 | /**/node_modules
18 | /**/storybook-docs
19 | /**/storybook-static
20 |
21 | .yarn/*
22 | !.yarn/patches
23 | !.yarn/releases
24 | !.yarn/plugins
25 | !.yarn/sdks
26 | !.yarn/versions
27 | yarn-error.log
28 | .pnp.*
29 |
30 | .nx/cache
31 | .nx/workspace-data
--------------------------------------------------------------------------------
/.husky/.gitignore:
--------------------------------------------------------------------------------
1 | _
2 |
--------------------------------------------------------------------------------
/.husky/commit-msg:
--------------------------------------------------------------------------------
1 | yarn commitlint -e $1
2 |
--------------------------------------------------------------------------------
/.husky/pre-commit:
--------------------------------------------------------------------------------
1 | yarn lint-staged --relative
2 |
--------------------------------------------------------------------------------
/.husky/pre-push:
--------------------------------------------------------------------------------
1 | yarn lint:affected
2 | yarn test:affected
3 | # yarn check:deps
4 | yarn check:registry
5 |
--------------------------------------------------------------------------------
/.lintstagedrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | '*.{js,ts,tsx}': ['yarn nx affected --target=lint --fix --files', 'prettier --write'],
3 | '*.json': ['prettier --write'],
4 | '*.md': ['prettier --write'],
5 | };
6 |
--------------------------------------------------------------------------------
/.npmrc:
--------------------------------------------------------------------------------
1 | package-lock=false
2 | registry="https://registry.npmjs.org/"
--------------------------------------------------------------------------------
/.nvmrc:
--------------------------------------------------------------------------------
1 | 22
2 |
--------------------------------------------------------------------------------
/.prettierignore:
--------------------------------------------------------------------------------
1 | # root
2 | .yarn
3 | **/.docusaurus
4 | coverage/
5 | storybook-docs/
6 | plop-templates/
7 | static/
8 |
9 | # packages
10 | /**/dist
11 | /**/build
12 | **/CHANGELOG.md
13 |
14 | /.nx/cache
15 | /.nx/workspace-data
--------------------------------------------------------------------------------
/.prettierrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | singleQuote: true,
3 | trailingComma: 'es5',
4 | printWidth: 120,
5 | tabWidth: 2,
6 | };
7 |
--------------------------------------------------------------------------------
/.storybook/config.scss:
--------------------------------------------------------------------------------
1 | $availity-font-path: '~availity-uikit/fonts';
2 | @import '~availity-uikit/scss/_bootstrap.scss';
3 |
4 | pre.prismjs {
5 | color: inherit;
6 | }
7 |
8 | // Doesn't work for sidebar items, must place sidebar styling in manager-head.html
9 | [id*='--hidden'] {
10 | display: none !important;
11 | }
12 |
13 | .argstable-remove-default th:last-child,
14 | .argstable-remove-default td:last-child {
15 | display: none !important;
16 | }
--------------------------------------------------------------------------------
/.storybook/manager-head.html:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/.storybook/static/avfavicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Availity/availity-react/8c51a0b2dcf03186546912f81bbb40ccbe6ba7b7/.storybook/static/avfavicon.ico
--------------------------------------------------------------------------------
/.storybook/static/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Availity/availity-react/8c51a0b2dcf03186546912f81bbb40ccbe6ba7b7/.storybook/static/icon.png
--------------------------------------------------------------------------------
/.storybook/stories/options.js:
--------------------------------------------------------------------------------
1 | export const colors = ['primary', 'secondary', 'success', 'danger', 'warning', 'info', 'light', 'dark'];
2 | export const buttonColors = [...colors, 'link'];
3 | export const bgColors = [...colors, 'transparent'];
4 | export const textColors = [...colors, 'body', 'muted', 'white', 'black-50', 'white-50'];
5 |
--------------------------------------------------------------------------------
/.storybook/stories/utils.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { ArgsTable } from '@storybook/addon-docs';
3 |
4 | const OutsideArgsTable = (...props) => (
5 |
8 | );
9 |
10 | export default OutsideArgsTable;
11 |
--------------------------------------------------------------------------------
/.yarnrc.yml:
--------------------------------------------------------------------------------
1 | nodeLinker: node-modules
2 |
3 | npmPublishRegistry: "https://registry.npmjs.org/"
4 |
5 | npmRegistryServer: "https://registry.npmjs.org/"
6 |
7 | plugins:
8 | - path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
9 | spec: "@yarnpkg/plugin-interactive-tools"
10 |
11 | yarnPath: .yarn/releases/yarn-3.6.3.cjs
12 |
--------------------------------------------------------------------------------
/babel.config.json:
--------------------------------------------------------------------------------
1 | {
2 | "sourceType": "unambiguous",
3 | "presets": [
4 | [
5 | "@babel/preset-env",
6 | {
7 | "targets": {
8 | "chrome": 100,
9 | "safari": 15,
10 | "firefox": 91
11 | }
12 | }
13 | ],
14 | "@babel/preset-typescript",
15 | "@babel/preset-react"
16 | ],
17 | "plugins": []
18 | }
19 |
--------------------------------------------------------------------------------
/codecov.yml:
--------------------------------------------------------------------------------
1 | coverage:
2 | status:
3 | project:
4 | default: on
5 |
--------------------------------------------------------------------------------
/commitlint.config.js:
--------------------------------------------------------------------------------
1 | const Configuration = {
2 | extends: ['@commitlint/config-conventional', '@commitlint/config-nx-scopes'],
3 | rules: {
4 | 'header-max-length': [0, 'always', 100],
5 | },
6 | };
7 |
8 | module.exports = Configuration;
9 |
--------------------------------------------------------------------------------
/docusaurus/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
3 | };
4 |
--------------------------------------------------------------------------------
/docusaurus/docs/components/analytics/hook.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: useAnalytics
3 | ---
4 |
5 | Hook giving you access to the instance of `@availity/analytics-core` for manually tracking events, and changing different variables.
6 |
7 | ### Example
8 |
9 | ```jsx
10 | import React from 'react';
11 | import { Button } from 'reactstrap';
12 | import { useAnalytics } from '@availity/analytics';
13 |
14 | const Example = () => {
15 | const { trackEvent } = useAnalytics();
16 |
17 | return (
18 | trackEvent({ url: '/test', data: 'some-data' })}>
19 | Click Me
20 |
21 | );
22 | };
23 | ```
24 |
--------------------------------------------------------------------------------
/docusaurus/docs/components/analytics/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Getting Started
3 | ---
4 |
5 | Track page events and user clicks.
6 |
7 | [](https://www.npmjs.com/package/@availity/analytics)
8 |
9 | ### Installation
10 |
11 | npm
12 |
13 | ```bash
14 | npm install @availity/analytics --save
15 | ```
16 |
17 | Yarn
18 |
19 | ```bash
20 | yarn add @availity/analytics
21 | ```
22 |
--------------------------------------------------------------------------------
/docusaurus/docs/components/authorize/index.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: Getting Started
3 | ---
4 |
5 | [](https://www.npmjs.com/package/@availity/authorize)
6 |
7 | Check user permissions to see if the current user is authorized to see your content. This packages exports a [component](./authorize) and [hook](./useAuthorize) for validating authorization
8 |
9 | ## Installation
10 |
11 | npm
12 |
13 | ```bash
14 | npm install @availity/authorize @availity/api-axios axios
15 | ```
16 |
17 | Yarn
18 |
19 | ```bash
20 | yarn add @availity/authorize @availity/api-axios axios
21 | ```
22 |
--------------------------------------------------------------------------------
/docusaurus/docs/components/change-password/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Getting Started
3 | ---
4 |
5 | Easy to use change password components
6 |
7 | ### Installation
8 |
9 | [](https://www.npmjs.com/package/@availity/change-password)
10 |
11 | ```bash
12 | npx install-peerdeps @availity/change-password --save
13 | ```
14 |
15 |
--------------------------------------------------------------------------------
/docusaurus/docs/components/favorites/favorites.md:
--------------------------------------------------------------------------------
1 | ---
2 | title:
3 | slug: favorites
4 | ---
5 |
6 | The Provider Component that stores all of the user's favorites for use in the favorite components.
7 |
8 | ### Example
9 |
10 | ```jsx
11 | import React from 'react';
12 | import Favorites, { FavoriteHeart } from '@availity/favorites';
13 | import '@availity/favorites/style.scss';
14 |
15 | const Example = () => (
16 |
17 |
18 |
19 | );
20 | ```
21 |
--------------------------------------------------------------------------------
/docusaurus/docs/components/favorites/hook.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: useFavorites
3 | ---
4 |
5 | Hook that allows you to "hook" into the favorites logic and create a custom component with the same logic. Can only be used inside of a ` ` Provider.
6 |
7 | ### Arguments
8 |
9 | - **`id`**: The id of the favorite you want to create/update.
10 |
11 | ### Example
12 |
13 | ```jsx
14 | import React from 'react';
15 | import Icon from '@availity/icon';
16 | import { useFavorites } from '@availity/favorites';
17 |
18 | const Example = () => {
19 | const [isFavorite, toggleFavorite] = useFavorites('1234');
20 |
21 | return (
22 |
26 | );
27 | };
28 | ```
29 |
--------------------------------------------------------------------------------
/docusaurus/docs/components/feedback/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Getting Started
3 | ---
4 |
5 | Availity feedback with smiley faces react component.
6 |
7 | [](https://www.npmjs.com/package/@availity/feedback)
8 |
9 | ### Installation
10 |
11 | NPM
12 |
13 | ```bash
14 | npm install @availity/feedback @availity/api-axios @availity/yup axios formik reactstrap@^8.0.0
15 | ```
16 |
17 | Yarn
18 |
19 | ```bash
20 | yarn add @availity/feedback @availity/api-axios @availity/yup axios formik reactstrap@^8.0.0
21 | ```
22 |
--------------------------------------------------------------------------------
/docusaurus/docs/components/hooks/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Getting Started
3 | ---
4 |
5 | Compilation of Custom Hooks that are common in our apps.
6 |
7 | [](https://www.npmjs.com/package/@availity/hooks)
8 |
9 | ### Installation
10 |
11 | npm
12 |
13 | ```sh
14 | npm install @availity/hooks --save
15 | ```
16 |
17 | Yarn
18 |
19 | ```sh
20 | yarn add @availity/hooks
21 | ```
22 |
--------------------------------------------------------------------------------
/docusaurus/docs/components/hooks/use-current-user.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: useCurrentUser
3 | ---
4 |
5 | Hook that returns the current user.
6 |
7 | ### Example
8 |
9 | ```jsx
10 | import React from 'react';
11 | import { useCurrentUser } from '@availity/hooks';
12 |
13 | const Example = () => {
14 | const { data: user, isFetching } = useCurrentUser();
15 |
16 | return {isFetching ? 'Loading...' : user?.id}
;
17 | };
18 | ```
19 |
20 | ## Props
21 |
22 | ### `options?: QueryConfig`
23 |
24 | Options to be passed to the `useQuery` hook such as `enabled`, `retry`, and `onSuccess`.
25 |
26 | > More information on the options can be found [here](https://react-query.tanstack.com/docs/api/#usequery)
27 |
--------------------------------------------------------------------------------
/docusaurus/docs/components/hooks/use-effect-async.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: useEffectAsync
3 | ---
4 |
5 | Hook that allows asynchronous functions to be called in the standard useEffect hook.
6 |
7 | ### Example
8 |
9 | ```jsx
10 | import React, { useState } from 'react';
11 | import { useEffectAsync } from '@availity/hooks';
12 |
13 | const Example = ({ asyncFunction }) => {
14 | const [state, setState] = useState('Hello');
15 |
16 | useEffectAsync(async () => {
17 | const newState = await asyncFunction();
18 |
19 | setState(newState);
20 | }, []);
21 |
22 | return {state}
;
23 | };
24 | ```
25 |
26 | ### Props
27 |
28 | #### `effect: React.useEffect`
29 |
30 | The effect to call - just like the function given to `useEffect`.
31 |
32 | #### `inputs: any[]`
33 |
34 | The watch params for the effect - just like the second arg in `useEffect`.
35 |
--------------------------------------------------------------------------------
/docusaurus/docs/components/hooks/use-mount.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: useMount
3 | ---
4 |
5 | Hook that runs a function on mount and dismount if a function is returned.
6 |
7 | ### Example
8 |
9 | ```jsx
10 | import React from 'react';
11 | import { useMount } from '@availity/hooks';
12 |
13 | const Example = () => {
14 | useMount(() => {
15 | doSomethingOnMount();
16 |
17 | return () => {
18 | doSomethingOnDismount();
19 | };
20 | });
21 |
22 | return Test Component
;
23 | };
24 | ```
25 |
26 | ### Props
27 |
28 | #### `callback: () => void`
29 |
30 | Function to run when the component mounts.
31 |
--------------------------------------------------------------------------------
/docusaurus/docs/components/hooks/use-region.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: useCurrentRegion
3 | ---
4 |
5 | Hook that returns the user's current region.
6 |
7 | ### Example
8 |
9 | ```jsx
10 | import React from 'react';
11 | import { useCurrentRegion } from '@availity/hooks';
12 |
13 | const Example = () => {
14 | const { data: region, isFetching } = useCurrentRegion();
15 |
16 | return {isFetching ? 'Loading...' : region?.value || 'Nowhere'}
;
17 | };
18 | ```
19 |
20 | ## Props
21 |
22 | ### `options?: QueryConfig`
23 |
24 | Options to be passed to the `useQuery` hook such as `enabled`, `retry`, and `onSuccess`.
25 |
26 | > More information on the options can be found [here](https://react-query.tanstack.com/docs/api/#usequery)
27 |
--------------------------------------------------------------------------------
/docusaurus/docs/components/hooks/use-timeout.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: useTimeout
3 | ---
4 |
5 | Hook that returns true after the given amount of time in milliseconds.
6 |
7 | ### Example
8 |
9 | ```jsx
10 | import React from 'react';
11 | import { useTimeout } from '@availity/hooks';
12 |
13 | const Example = () => {
14 | const timeIsUp = useTimeout(5000);
15 |
16 | return {timeIsUp ? 'Time is up' : 'Still waiting'}
;
17 | };
18 | ```
19 |
20 | ### Props
21 |
22 | #### `milliseconds?: number`
23 |
24 | The number of milliseconds to wait before returning true.
25 |
--------------------------------------------------------------------------------
/docusaurus/docs/components/hooks/use-window-dimensions.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: useWindowDimensions
3 | ---
4 |
5 | Hook that returns the window's current dimensions
6 |
7 | ### Example
8 |
9 | ```jsx
10 | import React from 'react';
11 | import { useWindowDimensions } from '@availity/hooks';
12 |
13 | const Example = () => {
14 | const { height, width } = useWindowDimensions();
15 | return (
16 |
17 | {' '}
18 | Current Window Dimensions: height: {height}, width: {width}
19 |
20 | );
21 | };
22 | ```
23 |
--------------------------------------------------------------------------------
/docusaurus/docs/components/json-viewer/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Getting Started
3 | ---
4 |
5 | A straightforward and accessible component for rendering json. Typically used for internal/admin pages for formatting deeply nested objects.
6 |
7 | [](https://www.npmjs.com/package/@availity/json-viewer)
8 |
9 | ### Installation
10 |
11 | npm
12 |
13 | ```sh
14 | npm install @availity/json-viewer --save
15 | ```
16 |
17 | Yarn
18 |
19 | ```sh
20 | yarn add @availity/json-viewer
21 | ```
22 |
--------------------------------------------------------------------------------
/docusaurus/docs/components/list-group-item/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Getting Started
3 | ---
4 |
5 | List Group Item with some Availity flair
6 |
7 | [](https://www.npmjs.com/package/@availity/pagination)
8 |
9 | ### Installation
10 |
11 | npm
12 |
13 | ```bash
14 | npm install @availity/list-group-item --save
15 | ```
16 |
17 | Yarn
18 |
19 | ```bash
20 | yarn add @availity/list-group-item
21 | ```
22 |
--------------------------------------------------------------------------------
/docusaurus/docs/components/pagination/context.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: PaginationContext
3 | ---
4 |
5 | If you are using a class component, you can subscribe to the pagination by using this context.
6 |
7 | ### Example
8 |
9 | ```jsx
10 | import React from 'react';
11 | import { PaginationContext } from '@availity/pagination';
12 |
13 | class PageSetter extends React.Component {
14 | render() {
15 | const { page, setPage } = this.context;
16 |
17 | return (
18 | setPage(target.value)}
22 | />
23 | );
24 | }
25 | }
26 |
27 | PageSetter.contextType = PaginationContext;
28 | ```
29 |
--------------------------------------------------------------------------------
/docusaurus/docs/components/pagination/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Getting Started
3 | ---
4 |
5 | Pagination, the Availity way.
6 |
7 | [](https://www.npmjs.com/package/@availity/pagination)
8 |
9 | ### Installation
10 |
11 | npm
12 |
13 | ```bash
14 | npm install @availity/pagination --save
15 | ```
16 |
17 | Yarn
18 |
19 | ```bash
20 | yarn add @availity/pagination
21 | ```
22 |
--------------------------------------------------------------------------------
/docusaurus/docs/components/spaces/context.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: SpacesContext
3 | ---
4 |
5 | If you are using a class component, you can subscribe to the spaces by using this context.
6 |
7 | ### Example
8 |
9 | ```jsx
10 | import React from 'react';
11 | import { SpacesContext } from '@availity/spaces';
12 |
13 | class SpacesComponent extends React.Component {
14 | render() {
15 | // id can be a space or a payer id
16 | const { space, images } = this.context;
17 | // Returns space and images for id
18 | }
19 | }
20 |
21 | SpacesComponent.contextType = SpacesContext;
22 | ```
23 |
--------------------------------------------------------------------------------
/docusaurus/docs/components/spaces/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Getting Started
3 | ---
4 |
5 | Easy to use spaces components
6 |
7 | ### Installation
8 |
9 | [](https://www.npmjs.com/package/@availity/spaces)
10 |
11 | ```bash
12 | npx install-peerdeps @availity/spaces --save
13 | ```
14 |
--------------------------------------------------------------------------------
/docusaurus/docs/components/spaces/use-spaces-context.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: useSpacesContext
3 | ---
4 |
5 | If you are using a function component, you can subscribe to the spaces by using this hook.
6 |
7 | ### Example
8 |
9 | ```jsx
10 | import React from 'react';
11 | import { useSpacesContext } from '@availity/spaces';
12 |
13 | const SpacesComponent = () => {
14 | const { spaces, loading, error } = useSpacesContext();
15 | };
16 | ```
17 |
--------------------------------------------------------------------------------
/docusaurus/docs/components/spaces/use-spaces.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: useSpaces
3 | ---
4 |
5 | This is a custom hook for grabbing spaces from the `Spaces` provider.
6 |
7 | `useSpaces` accepts a variadic number of `ids`. `useSpaces` returns a tuple containing the spaces for the `ids` passed in, in the order they are passed in. If there is no space in the `Spaces` provider for an id, it is returned as `undefined`. If no `ids` are passed in - or a single `id` is passed in and it is `undefined`, all spaces from the `Spaces` provider are returned.
8 |
9 | ### Example
10 |
11 | ```jsx
12 | import React from 'react';
13 | import { useSpaces } from '@availity/spaces';
14 |
15 | const SpacesComponent = () => {
16 | // ids can be space ids or payer ids
17 | const [space1, space2, space3] = useSpaces('1', '2', '3');
18 | };
19 | ```
20 |
--------------------------------------------------------------------------------
/docusaurus/docs/components/step-wizard/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Getting Started
3 | ---
4 |
5 | Step Wizard - the Availity Way
6 |
7 | [](https://www.npmjs.com/package/@availity/step-wizard)
8 |
9 | ### Installation
10 |
11 | npm
12 |
13 | ```bash
14 | npm install @availity/step-wizard --save
15 | ```
16 |
17 | Yarn
18 |
19 | ```bash
20 | yarn add @availity/step-wizard
21 | ```
22 |
--------------------------------------------------------------------------------
/docusaurus/docs/components/typography/agreement.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Agreement
3 | ---
4 |
5 | ### Example
6 |
7 | ```jsx
8 | import React from 'react';
9 | import { Agreement } from '@availity/typography';
10 |
11 | const Example = () => (
12 |
13 |
14 | veritatis doloremque ut hic et etvitae amet natus perferendisdolores illum
15 | et rerum officia autiste deserunt quis sed corporis explicabo qui non
16 | pariaturaccusantium molestias non aut ut utnumquam qui vero est nihil eum
17 | ullam autemrerum repellat dicta quae dolorest occaecati sapiente a
18 | cupiditatereprehenderit quibusdam nam eveniet voluptatem quis soluta
19 | quamdelectus consequatur qui incidunt voluptatem consequuntur
20 |
21 |
22 | );
23 | ```
24 |
--------------------------------------------------------------------------------
/docusaurus/docs/components/typography/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Getting Started
3 | ---
4 |
5 | Availity typography components
6 |
7 | [](https://www.npmjs.com/package/@availity/typography)
8 |
9 | ## Installation
10 |
11 | npm
12 |
13 | ```bash
14 | npm install @availity/typography --save
15 | ```
16 |
17 | Yarn
18 |
19 | ```bash
20 | yarn add @availity/typography
21 | ```
22 |
--------------------------------------------------------------------------------
/docusaurus/docs/form/components/checkbox-group.md:
--------------------------------------------------------------------------------
1 | ---
2 | title:
3 | ---
4 |
5 | ### Props
6 |
7 | #### `name: string`
8 |
9 | Name of the checkbox group. Should match name given in `initialValues`/`validationSchema`.
10 |
11 | #### `label?: string`
12 |
13 | Label for the group or checkboxes.
14 |
15 | #### `groupClassName?: string`
16 |
17 | Class name to apply to the form control.
18 |
19 | #### `labelClassName?: string`
20 |
21 | Class name to apply to the Label. Default is Legend styling
22 |
23 | #### `helpId?: string`
24 |
25 | Help topic id, adds ` ` next to the label (should not be within label for accessibility).
26 |
27 | #### `required?: boolean`
28 |
29 | Will add ` ` to label.
30 |
31 | #### `isHelpVideoType?: boolean`
32 |
33 | Allows the type of ` ` to be changed between help-icon and video-help
34 |
--------------------------------------------------------------------------------
/docusaurus/docs/form/select/index.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: Getting Started
3 | ---
4 |
5 | Wrapper for react-select-async-paginate to work with formik.
6 |
7 | ### Installation
8 |
9 | ```bash
10 | npx install-peerdeps @availity/select --save
11 | ```
12 |
13 | ### Validation
14 |
15 | See [yup](https://github.com/jquense/yup) and [@availity/yup](https://github.com/Availity/sdk-js/tree/master/packages/yup)
16 |
17 | ### References
18 |
19 | - [react-select-async-paginate](https://github.com/vtaits/react-select-async-paginate)
20 | - [formik](https://github.com/jaredpalmer/formik)
21 |
--------------------------------------------------------------------------------
/docusaurus/docs/form/upload/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Getting Started
3 | ---
4 |
5 | Availity component for uploading files, compatible with @availity/form
6 |
7 | ### Installation
8 |
9 | npm
10 |
11 | ```bash
12 | npm install @availity/form-upload --save
13 | ```
14 |
15 | Yarn
16 |
17 | ```bash
18 | yarn add @availity/form-upload
19 | ```
20 |
21 | ### Example
22 |
23 | ```jsx
24 | import React from 'react';
25 | import { Form } from '@availity/form';
26 | import Upload from '@availity/form-upload';
27 |
28 | const Example = () => (
29 |
32 | );
33 | ```
34 |
--------------------------------------------------------------------------------
/docusaurus/static/.nojekyll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Availity/availity-react/8c51a0b2dcf03186546912f81bbb40ccbe6ba7b7/docusaurus/static/.nojekyll
--------------------------------------------------------------------------------
/docusaurus/static/img/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Availity/availity-react/8c51a0b2dcf03186546912f81bbb40ccbe6ba7b7/docusaurus/static/img/favicon.ico
--------------------------------------------------------------------------------
/docusaurus/static/img/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Availity/availity-react/8c51a0b2dcf03186546912f81bbb40ccbe6ba7b7/docusaurus/static/img/icon.png
--------------------------------------------------------------------------------
/jest.preset.js:
--------------------------------------------------------------------------------
1 | const nxPreset = require('@nx/jest/preset');
2 |
3 | module.exports = { ...nxPreset };
4 |
--------------------------------------------------------------------------------
/jest/css.js:
--------------------------------------------------------------------------------
1 | // https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/config/jest/cssTransform.js
2 |
3 | module.exports = {
4 | process() {
5 | return 'module.exports = {};';
6 | },
7 | getCacheKey() {
8 | // The output is always the same.
9 | return 'cssTransform';
10 | },
11 | };
12 |
--------------------------------------------------------------------------------
/jest/file.js:
--------------------------------------------------------------------------------
1 | // https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/config/jest/fileTransform.js
2 |
3 | const path = require('path');
4 |
5 | module.exports = {
6 | process(src, filename) {
7 | return `module.exports = ${JSON.stringify(path.basename(filename))};`;
8 | },
9 | };
10 |
--------------------------------------------------------------------------------
/jest/global-setup.js:
--------------------------------------------------------------------------------
1 | module.exports = async () => {
2 | process.env.TZ = 'UTC';
3 | };
4 |
--------------------------------------------------------------------------------
/jest/setupTests.js:
--------------------------------------------------------------------------------
1 | // eslint-disable-next-line no-console
2 | const originalError = console.error;
3 |
4 | beforeAll(() => {
5 | // eslint-disable-next-line no-console
6 | console.error = (...args) => {
7 | if (/Warning.*not wrapped in act/.test(args[0])) {
8 | return;
9 | }
10 | originalError.call(console, ...args);
11 | };
12 | });
13 |
14 | afterAll(() => {
15 | // eslint-disable-next-line no-console
16 | console.error = originalError;
17 | });
18 |
--------------------------------------------------------------------------------
/netlify.toml:
--------------------------------------------------------------------------------
1 | [build]
2 | publish = "docusaurus/build"
3 | command = "yarn run build:docs"
4 |
5 | [build.environment]
6 | NODE_VERSION = "14"
7 | YARN_VERSION = "1.19.1"
8 |
9 | [[redirects]]
10 | from = "/availity-react/*" # docusaurus baseUrl
11 | to = "/:splat"
12 | force = true # ensure redirect
13 | status = 200 # changes redirect to rewrite, keeps baseUrl for docusaurus but serves / from netlify
14 |
15 | [build.processing.html]
16 | pretty_urls = false # https://v2.docusaurus.io/docs/deployment/#deploying-to-netlify
17 |
--------------------------------------------------------------------------------
/packages/analytics/.npmignore:
--------------------------------------------------------------------------------
1 | **/*test.js
2 | **/*.stories.tsx
--------------------------------------------------------------------------------
/packages/analytics/jest.config.js:
--------------------------------------------------------------------------------
1 | const global = require('../../jest/global-config');
2 |
3 | module.exports = {
4 | ...global,
5 | displayName: 'analytics',
6 | coverageDirectory: '../../coverage/analytics',
7 | };
8 |
--------------------------------------------------------------------------------
/packages/analytics/src/index.d.ts:
--------------------------------------------------------------------------------
1 | export { default, useAnalytics } from './Analytics';
2 |
--------------------------------------------------------------------------------
/packages/analytics/src/index.js:
--------------------------------------------------------------------------------
1 | export { default, useAnalytics } from './Analytics';
2 |
--------------------------------------------------------------------------------
/packages/analytics/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.json",
3 | "include": ["."],
4 | "exclude": ["dist", "build", "node_modules"]
5 | }
6 |
--------------------------------------------------------------------------------
/packages/analytics/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "module": "commonjs",
6 | "types": ["jest", "node", "@testing-library/jest-dom"],
7 | "allowJs": true
8 | },
9 | "include": ["**/*.test.js", "**/*.test.ts", "**/*.test.tsx", "**/*.d.ts"]
10 | }
11 |
--------------------------------------------------------------------------------
/packages/app-icon/.npmignore:
--------------------------------------------------------------------------------
1 | **/*test.js
2 | **/*.stories.tsx
--------------------------------------------------------------------------------
/packages/app-icon/jest.config.js:
--------------------------------------------------------------------------------
1 | const global = require('../../jest/global-config');
2 |
3 | module.exports = {
4 | ...global,
5 | displayName: 'app-icon',
6 | coverageDirectory: '../../coverage/app-icon',
7 | };
8 |
--------------------------------------------------------------------------------
/packages/app-icon/src/index.ts:
--------------------------------------------------------------------------------
1 | export { default } from './AppIcon';
2 | export type { AppIconProps } from './AppIcon';
3 |
--------------------------------------------------------------------------------
/packages/app-icon/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.json",
3 | "include": ["."],
4 | "exclude": ["dist", "build", "node_modules"]
5 | }
6 |
--------------------------------------------------------------------------------
/packages/app-icon/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "module": "commonjs",
6 | "types": ["jest", "node", "@testing-library/jest-dom"]
7 | },
8 | "include": ["**/*.test.js", "**/*.test.ts", "**/*.test.tsx", "**/*.d.ts"]
9 | }
10 |
--------------------------------------------------------------------------------
/packages/app-tiles/.npmignore:
--------------------------------------------------------------------------------
1 | **/*test.js
2 | **/*.stories.tsx
--------------------------------------------------------------------------------
/packages/app-tiles/jest.config.js:
--------------------------------------------------------------------------------
1 | const global = require('../../jest/global-config');
2 |
3 | module.exports = {
4 | ...global,
5 | displayName: 'app-tiles',
6 | coverageDirectory: '../../coverage/app-tiles',
7 | };
8 |
--------------------------------------------------------------------------------
/packages/app-tiles/src/AppTiles.module.scss:
--------------------------------------------------------------------------------
1 | .tile {
2 | width: 50%;
3 | height: 50%;
4 | line-height: normal;
5 | aspect-ratio: 1;
6 | display: flex;
7 | align-items: center;
8 | justify-content: center;
9 | }
10 |
11 | .container {
12 | height: 100%;
13 | line-height: normal;
14 | display: flex;
15 | align-items: center;
16 | justify-content: center;
17 | flex-wrap: wrap;
18 | }
--------------------------------------------------------------------------------
/packages/app-tiles/src/declarations.d.ts:
--------------------------------------------------------------------------------
1 | type CSSModuleClasses = { readonly [key: string]: string };
2 |
3 | declare module '*.module.css' {
4 | const classes: CSSModuleClasses;
5 | export default classes;
6 | }
7 | declare module '*.module.scss' {
8 | const classes: CSSModuleClasses;
9 | export default classes;
10 | }
11 |
12 | declare module '*.css' {
13 | const classes: CSSModuleClasses;
14 | export default classes;
15 | }
16 | declare module '*.scss' {
17 | const classes: CSSModuleClasses;
18 | export default classes;
19 | }
20 |
--------------------------------------------------------------------------------
/packages/app-tiles/src/index.ts:
--------------------------------------------------------------------------------
1 | export { default } from './AppTiles';
2 | export type { AppTilesProps } from './AppTiles';
3 |
--------------------------------------------------------------------------------
/packages/app-tiles/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.json",
3 | "include": ["."],
4 | "exclude": ["dist", "build", "node_modules"]
5 | }
6 |
--------------------------------------------------------------------------------
/packages/app-tiles/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "module": "commonjs",
6 | "types": ["jest", "node", "@testing-library/jest-dom"]
7 | },
8 | "include": ["**/*.test.js", "**/*.test.ts", "**/*.test.tsx", "**/*.d.ts"]
9 | }
10 |
--------------------------------------------------------------------------------
/packages/app-tiles/tsup.config.js:
--------------------------------------------------------------------------------
1 | const { defineConfig } = require('tsup');
2 | const { sassPlugin, postcssModules } = require('esbuild-sass-plugin');
3 |
4 | module.exports = defineConfig({
5 | entry: ['src/index.ts'],
6 | format: ['esm', 'cjs'],
7 | esbuildPlugins: [
8 | sassPlugin({
9 | type: 'style',
10 | transform: postcssModules({
11 | modules: {
12 | generateScopedName: '[hash:base64:12]',
13 | },
14 | }),
15 | }),
16 | ],
17 | });
18 |
--------------------------------------------------------------------------------
/packages/authorize/.npmignore:
--------------------------------------------------------------------------------
1 | **/*.test.tsx
2 | **/*.test.ts
3 | **/*.stories.tsx
--------------------------------------------------------------------------------
/packages/authorize/jest.config.js:
--------------------------------------------------------------------------------
1 | const global = require('../../jest/global-config');
2 |
3 | module.exports = {
4 | ...global,
5 | displayName: 'authorize',
6 | coverageDirectory: '../../coverage/authorize',
7 | };
8 |
--------------------------------------------------------------------------------
/packages/authorize/src/index.ts:
--------------------------------------------------------------------------------
1 | export { default } from './Authorize';
2 | export type { AuthorizeProps } from './Authorize';
3 | export { default as useAuthorize } from './useAuthorize';
4 | export type { UseAuthorizeProps } from './useAuthorize';
5 |
--------------------------------------------------------------------------------
/packages/authorize/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.json",
3 | "include": ["."],
4 | "exclude": ["dist", "build", "node_modules"]
5 | }
6 |
--------------------------------------------------------------------------------
/packages/authorize/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "module": "commonjs",
6 | "types": ["jest", "node", "@testing-library/jest-dom"]
7 | },
8 | "include": ["**/*.test.js", "**/*.test.ts", "**/*.test.tsx", "**/*.d.ts"]
9 | }
10 |
--------------------------------------------------------------------------------
/packages/avatar/.npmignore:
--------------------------------------------------------------------------------
1 | **/*test.js
2 | **/*.stories.tsx
--------------------------------------------------------------------------------
/packages/avatar/README.md:
--------------------------------------------------------------------------------
1 | # @availity/avatar
2 |
3 | > Availity user avatar component
4 |
5 | [](https://www.npmjs.com/package/@availity/avatar)
6 | [](https://www.npmjs.com/package/@availity/avatar)
7 | [](https://github.com/Availity/availity-react/blob/master/packages/avatar/package.json)
8 |
9 | ## Installation
10 |
11 | ### NPM
12 |
13 | ```bash
14 | npm install @availity/avatar
15 | ```
16 |
17 | ### Yarn
18 |
19 | ```bash
20 | yarn add @availity/avatar
21 | ```
22 |
23 | ## Documentation
24 |
25 | Check out more documentation at [availity.github.io](https://availity.github.io/availity-react/components/avatar)
26 |
--------------------------------------------------------------------------------
/packages/avatar/index.d.ts:
--------------------------------------------------------------------------------
1 | export { default } from './src/Avatar';
2 |
--------------------------------------------------------------------------------
/packages/avatar/index.js:
--------------------------------------------------------------------------------
1 | export { default } from './src/Avatar';
2 |
--------------------------------------------------------------------------------
/packages/avatar/jest.config.js:
--------------------------------------------------------------------------------
1 | const global = require('../../jest/global-config');
2 |
3 | module.exports = {
4 | ...global,
5 | displayName: 'avatar',
6 | coverageDirectory: '../../coverage/avatar',
7 | };
8 |
--------------------------------------------------------------------------------
/packages/avatar/src/Avatar.d.ts:
--------------------------------------------------------------------------------
1 | import type { ImgProps } from 'react-image';
2 |
3 | export type SkeletonType = {
4 | width?: string | number;
5 | height?: string | number;
6 | };
7 |
8 | export type AvatarProps = {
9 | fallback?: string;
10 | skeletonProps?: SkeletonType;
11 | src?: string;
12 | } & Omit;
13 |
14 | declare const Avatar: React.FC;
15 |
16 | export default Avatar;
17 |
--------------------------------------------------------------------------------
/packages/avatar/stories/props.stories.mdx:
--------------------------------------------------------------------------------
1 | import { Meta, ArgTypes } from '@storybook/addon-docs';
2 | import { Img } from 'react-image';
3 | import { hidden_RSImg, hidden_RSSkeleton } from './avatar.stories';
4 |
5 |
6 |
7 | # React Image Props
8 |
9 | These props can be passed to the `Avatar` component
10 |
11 |
12 |
13 | # React Skeleton Props
14 |
15 | These props can be passed to the `Avatar` component as `skeletonProps`
16 |
17 |
18 |
--------------------------------------------------------------------------------
/packages/avatar/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.json",
3 | "include": ["."],
4 | "exclude": ["dist", "build", "node_modules"]
5 | }
6 |
--------------------------------------------------------------------------------
/packages/avatar/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "module": "commonjs",
6 | "types": ["jest", "node", "@testing-library/jest-dom"],
7 | "allowJs": true
8 | },
9 | "include": ["**/*.test.js", "**/*.test.ts", "**/*.test.tsx", "**/*.d.ts"]
10 | }
11 |
--------------------------------------------------------------------------------
/packages/badge/.npmignore:
--------------------------------------------------------------------------------
1 | **/*.test.tsx
2 | **/*.test.ts
3 | **/*.stories.tsx
--------------------------------------------------------------------------------
/packages/badge/README.md:
--------------------------------------------------------------------------------
1 | # @availity/badge
2 |
3 | > Removable Badge Component
4 |
5 | [](https://www.npmjs.com/package/@availity/badge)
6 | [](https://www.npmjs.com/package/@availity/badge)
7 | [](https://github.com/Availity/availity-react/blob/master/packages/badge/package.json)
8 |
9 | ## Installation
10 |
11 | ### NPM
12 |
13 | ```bash
14 | npm install @availity/badge
15 | ```
16 |
17 | ### Yarn
18 |
19 | ```bash
20 | yarn add @availity/badge
21 | ```
22 |
23 | ## Documentation
24 |
25 | Check out more documentation at [availity.github.io](https://availity.github.io/availity-react/components/badge)
26 |
--------------------------------------------------------------------------------
/packages/badge/jest.config.js:
--------------------------------------------------------------------------------
1 | const global = require('../../jest/global-config');
2 |
3 | module.exports = {
4 | ...global,
5 | displayName: 'badge',
6 | coverageDirectory: '../../coverage/badge',
7 | };
8 |
--------------------------------------------------------------------------------
/packages/badge/src/index.ts:
--------------------------------------------------------------------------------
1 | export { default as RemovableBadge } from './RemovableBadge';
2 | export type { RemovableBadgeProps } from './RemovableBadge';
3 | export { default as RemovableBadgeList } from './RemovableBadgeList';
4 | export type { BadgeItem } from './RemovableBadgeList';
5 |
--------------------------------------------------------------------------------
/packages/badge/src/props.stories.mdx:
--------------------------------------------------------------------------------
1 | import { Meta, ArgTypes } from '@storybook/addon-docs';
2 | import { hidden_RSBadge } from './RemovableBadge.stories';
3 |
4 |
5 |
6 | # Badge Props
7 |
8 | These props can be passed to the `RemovableBadge` component
9 |
10 |
11 |
--------------------------------------------------------------------------------
/packages/badge/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.json",
3 | "include": ["."],
4 | "exclude": ["dist", "build", "node_modules"]
5 | }
6 |
--------------------------------------------------------------------------------
/packages/badge/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "module": "commonjs",
6 | "types": ["jest", "node", "@testing-library/jest-dom"]
7 | },
8 | "include": ["**/*.test.js", "**/*.test.ts", "**/*.test.tsx", "**/*.d.ts"]
9 | }
10 |
--------------------------------------------------------------------------------
/packages/block-ui/.npmignore:
--------------------------------------------------------------------------------
1 | **/*.test.tsx
2 | **/*.stories.tsx
--------------------------------------------------------------------------------
/packages/block-ui/jest.config.js:
--------------------------------------------------------------------------------
1 | const global = require('../../jest/global-config');
2 |
3 | module.exports = {
4 | ...global,
5 | displayName: 'block-ui',
6 | coverageDirectory: '../../coverage/block-ui',
7 | };
8 |
--------------------------------------------------------------------------------
/packages/block-ui/src/Loader.test.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { render } from '@testing-library/react';
3 |
4 | import Loader, { Bullet } from './Loader';
5 |
6 | describe('Loader', () => {
7 | test('should be defined', () => {
8 | expect(Loader).toBeDefined();
9 | });
10 |
11 | test('should render', () => {
12 | const { getAllByText } = render( );
13 | const result = getAllByText(/•/);
14 | expect(result.length).toBe(3);
15 | });
16 | });
17 |
18 | describe('Bullet', () => {
19 | test('should be defined', () => {
20 | expect(Bullet).toBeDefined();
21 | });
22 |
23 | test('should render', () => {
24 | const { getByText } = render( );
25 | expect(getByText(/•/)).toBeDefined();
26 | });
27 | });
28 |
--------------------------------------------------------------------------------
/packages/block-ui/src/Loader.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 | import './Loader.css';
4 |
5 | export function Bullet(): JSX.Element {
6 | return • ;
7 | }
8 |
9 | function Loader(): JSX.Element {
10 | return (
11 |
12 |
13 |
14 |
15 |
16 | );
17 | }
18 |
19 | export default Loader;
20 |
--------------------------------------------------------------------------------
/packages/block-ui/src/index.ts:
--------------------------------------------------------------------------------
1 | export { default } from './BlockUi';
2 | export type { Props } from './BlockUi';
3 |
--------------------------------------------------------------------------------
/packages/block-ui/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.json",
3 | "include": ["."],
4 | "exclude": ["dist", "build", "node_modules"]
5 | }
6 |
--------------------------------------------------------------------------------
/packages/block-ui/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "module": "commonjs",
6 | "types": ["jest", "node", "@testing-library/jest-dom"]
7 | },
8 | "include": ["**/*.test.js", "**/*.test.ts", "**/*.test.tsx", "**/*.d.ts"]
9 | }
10 |
--------------------------------------------------------------------------------
/packages/breadcrumbs/.npmignore:
--------------------------------------------------------------------------------
1 | **/*test.js
2 | **/*.stories.tsx
--------------------------------------------------------------------------------
/packages/breadcrumbs/index.d.ts:
--------------------------------------------------------------------------------
1 | export { default, Crumb, BreadCrumbProps } from './src/Breadcrumbs';
2 |
--------------------------------------------------------------------------------
/packages/breadcrumbs/index.js:
--------------------------------------------------------------------------------
1 | export { default } from './src/Breadcrumbs';
2 |
--------------------------------------------------------------------------------
/packages/breadcrumbs/jest.config.js:
--------------------------------------------------------------------------------
1 | const global = require('../../jest/global-config');
2 |
3 | module.exports = {
4 | ...global,
5 | displayName: 'breadcrumbs',
6 | coverageDirectory: '../../coverage/breadcrumbs',
7 | };
8 |
--------------------------------------------------------------------------------
/packages/breadcrumbs/src/Breadcrumbs.d.ts:
--------------------------------------------------------------------------------
1 | import { BreadcrumbProps as RsBreadcrumbsProps } from 'reactstrap';
2 |
3 | export type Crumb = {
4 | name: string;
5 | url: string;
6 | };
7 |
8 | export interface BreadcrumbsProps extends RsBreadcrumbsProps {
9 | crumbs?: Crumb[];
10 | active: string;
11 | emptyState?: string;
12 | linkTag?: React.ComponentType> | string;
13 | homeUrl?: string;
14 | }
15 |
16 | declare const Breadcrumbs: React.FC;
17 |
18 | export default Breadcrumbs;
19 |
--------------------------------------------------------------------------------
/packages/breadcrumbs/stories/props.stories.mdx:
--------------------------------------------------------------------------------
1 | import { Meta, ArgTypes } from '@storybook/addon-docs';
2 | import { hidden_RSBreadcrumb, hidden_RSBreadcrumbItem } from './breadcrumbs.stories';
3 |
4 |
5 |
6 | # Reactstrap Breadcrumb Props
7 |
8 | These props can be passed to the `Breadcrumb` component
9 |
10 |
11 |
12 | # Reactstrap BreadcrumbItem Props
13 |
14 | These props can be passed to the `BreadcrumbItem` component
15 |
16 |
17 |
--------------------------------------------------------------------------------
/packages/breadcrumbs/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.json",
3 | "include": ["."],
4 | "exclude": ["dist", "build", "node_modules"]
5 | }
6 |
--------------------------------------------------------------------------------
/packages/breadcrumbs/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "module": "commonjs",
6 | "types": ["jest", "node", "@testing-library/jest-dom"],
7 | "allowJs": true
8 | },
9 | "include": ["**/*.test.js", "**/*.test.ts", "**/*.test.tsx", "**/*.d.ts"]
10 | }
11 |
--------------------------------------------------------------------------------
/packages/button/.npmignore:
--------------------------------------------------------------------------------
1 | **/*.test.tsx
2 | **/*.test.ts
3 | **/*.stories.tsx
--------------------------------------------------------------------------------
/packages/button/jest.config.js:
--------------------------------------------------------------------------------
1 | const global = require('../../jest/global-config');
2 |
3 | module.exports = {
4 | ...global,
5 | displayName: 'button',
6 | coverageDirectory: '../../coverage/button',
7 | };
8 |
--------------------------------------------------------------------------------
/packages/button/src/index.ts:
--------------------------------------------------------------------------------
1 | export { default as LoadingButton } from './LoadingButton';
2 | export type { LoadingButtonProps } from './LoadingButton';
3 |
--------------------------------------------------------------------------------
/packages/button/styles.scss:
--------------------------------------------------------------------------------
1 | .button {
2 | max-height: 38px;
3 |
4 | &.is-loading {
5 | min-width: 200px;
6 | }
7 |
8 | .block-ui {
9 | min-height: 38px;
10 | }
11 |
12 | .block-ui-message-container {
13 | transform: translateY(-80%);
14 | }
15 |
16 | .block-ui-message {
17 | height: 38px;
18 | }
19 |
20 | .block-ui-overlay {
21 | background: transparent;
22 | }
23 |
24 | &:not(.btn-light) {
25 | .loading-bullet {
26 | color: #fff;
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/packages/button/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.json",
3 | "include": ["."],
4 | "exclude": ["dist", "build", "node_modules"]
5 | }
6 |
--------------------------------------------------------------------------------
/packages/button/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "module": "commonjs",
6 | "types": ["jest", "node", "@testing-library/jest-dom"]
7 | },
8 | "include": ["**/*.test.js", "**/*.test.ts", "**/*.test.tsx", "**/*.d.ts"]
9 | }
10 |
--------------------------------------------------------------------------------
/packages/change-password/index.d.ts:
--------------------------------------------------------------------------------
1 | import ChangePassword, { useChangePasswordContext, ChangePasswordContext } from './types/ChangePassword';
2 | import ChangePasswordForm from './types/ChangePasswordForm';
3 |
4 | export default ChangePassword;
5 |
6 | export {
7 | ChangePasswordForm,
8 | useChangePasswordContext,
9 | ChangePasswordContext,
10 | };
11 |
--------------------------------------------------------------------------------
/packages/change-password/index.js:
--------------------------------------------------------------------------------
1 | export { default, useChangePasswordContext, ChangePasswordContext } from './src/ChangePassword';
2 | export { default as ChangePasswordForm } from './src/ChangePasswordForm';
3 |
--------------------------------------------------------------------------------
/packages/change-password/jest.config.js:
--------------------------------------------------------------------------------
1 | const global = require('../../jest/global-config');
2 |
3 | module.exports = {
4 | ...global,
5 | displayName: 'change-password',
6 | coverageDirectory: '../../coverage/change-password',
7 | };
8 |
9 |
--------------------------------------------------------------------------------
/packages/change-password/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.json",
3 | "include": ["."],
4 | "exclude": ["dist", "build", "node_modules"]
5 | }
6 |
--------------------------------------------------------------------------------
/packages/change-password/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "module": "commonjs",
6 | "types": ["jest", "node", "@testing-library/jest-dom"],
7 | "allowJs": true
8 | },
9 | "include": ["**/*.test.js", "**/*.test.ts", "**/*.d.ts"]
10 | }
11 |
--------------------------------------------------------------------------------
/packages/change-password/types/ChangePasswordFeedback.d.ts:
--------------------------------------------------------------------------------
1 | declare const ChangePasswordFeedback: React.FC<>;
2 |
3 | export default ChangePasswordFeedback;
4 |
5 |
--------------------------------------------------------------------------------
/packages/change-password/types/ChangePasswordForm.d.ts:
--------------------------------------------------------------------------------
1 | export interface ChangePasswordFormProps {
2 | onHandleSubmit?: (arg: { result: any }) => void;
3 | onError?: (arg: { error: Error }) => void;
4 | additionalButtons?: React.ReactNode;
5 | additionalFields?: React.ReactNode;
6 | header?: React.ReactNode;
7 | initialFields?: any;
8 | maxLength?: number;
9 | currentPasswordProps?: any;
10 | showCurrentPassword?: boolean;
11 | newPasswordProps?: any;
12 | confirmNewPasswordProps?: any;
13 | }
14 |
15 | declare const ChangePasswordForm: React.FC;
16 |
17 | export default ChangePasswordForm;
18 |
--------------------------------------------------------------------------------
/packages/date/.npmignore:
--------------------------------------------------------------------------------
1 | **/*test.js
2 | **/*.stories.tsx
--------------------------------------------------------------------------------
/packages/date/jest.config.js:
--------------------------------------------------------------------------------
1 | const global = require('../../jest/global-config');
2 |
3 | module.exports = {
4 | ...global,
5 | displayName: 'date',
6 | coverageDirectory: '../../coverage/date',
7 | };
8 |
--------------------------------------------------------------------------------
/packages/date/polyfills/index.js:
--------------------------------------------------------------------------------
1 | import './padStart';
2 |
--------------------------------------------------------------------------------
/packages/date/src/DateField.d.ts:
--------------------------------------------------------------------------------
1 | import * as React from 'react';
2 | import { LabelProps } from '@availity/form';
3 |
4 | import { DateProps } from './Date';
5 |
6 | export type DateFieldProps = {
7 | label?: React.ReactNode;
8 | labelClass?: string;
9 | labelHidden?: boolean;
10 | labelAttrs?: LabelProps;
11 | required?: boolean;
12 | helpId?: string;
13 | isHelpVideoType?: boolean;
14 | } & DateProps;
15 |
16 | declare const DateField: (props: DateFieldProps) => JSX.Element;
17 |
18 | export default DateField;
19 |
--------------------------------------------------------------------------------
/packages/date/src/DateRangeField.d.ts:
--------------------------------------------------------------------------------
1 | import * as React from 'react';
2 |
3 | import { DateRangeProps } from './DateRange';
4 |
5 | export type DateRangeFieldProps = {
6 | label?: React.ReactNode;
7 | labelClass?: string;
8 | labelHidden?: boolean;
9 | labelAttrs?: React.HTMLAttributes;
10 | required?: boolean;
11 | helpId?: string;
12 | isHelpVideoType?: boolean;
13 | } & DateRangeProps;
14 |
15 | declare const DateRangeField: (props: DateRangeFieldProps) => JSX.Element;
16 |
17 | export default DateRangeField;
18 |
--------------------------------------------------------------------------------
/packages/date/src/index.d.ts:
--------------------------------------------------------------------------------
1 | export { default } from './Date';
2 | export { default as DateField } from './DateField';
3 | export { default as DateRange } from './DateRange';
4 | export { default as DateRangeField } from './DateRangeField';
5 |
--------------------------------------------------------------------------------
/packages/date/src/index.js:
--------------------------------------------------------------------------------
1 | export { default } from './Date';
2 | export { default as DateField } from './DateField';
3 | export { default as DateRange } from './DateRange';
4 | export { default as DateRangeField } from './DateRangeField';
5 |
--------------------------------------------------------------------------------
/packages/date/stories/props.stories.mdx:
--------------------------------------------------------------------------------
1 | import { Meta, ArgTypes } from '@storybook/addon-docs';
2 | import { hidden_DateField, hidden_DateRange, hidden_DateRangeField } from './date.stories';
3 |
4 |
5 |
6 | # DateField Props
7 |
8 | These props can be passed to the `DateField` component
9 |
10 |
11 |
12 | # DateRange Props
13 |
14 | These props can be passed to the `DateRange` component
15 |
16 |
17 |
18 | # DateRangeField Props
19 |
20 | These props can be passed to the `DateRangeField` component
21 |
22 |
23 |
--------------------------------------------------------------------------------
/packages/date/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.json",
3 | "include": ["."],
4 | "exclude": ["dist", "build", "node_modules"]
5 | }
6 |
--------------------------------------------------------------------------------
/packages/date/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "module": "commonjs",
6 | "types": ["jest", "node", "@testing-library/jest-dom"],
7 | "allowJs": true
8 | },
9 | "include": ["**/*.test.js", "**/*.test.ts", "**/*.test.tsx", "**/*.d.ts"]
10 | }
11 |
--------------------------------------------------------------------------------
/packages/date/tsup.config.js:
--------------------------------------------------------------------------------
1 | const { defineConfig } = require('tsup');
2 | const { sassPlugin, postcssModules } = require('esbuild-sass-plugin');
3 |
4 | module.exports = defineConfig({
5 | entry: ['src/index.js'],
6 | format: ['esm', 'cjs'],
7 | esbuildPlugins: [
8 | sassPlugin({
9 | transform: postcssModules({
10 | extract: false,
11 | modules: {
12 | generateScopedName: '[hash:base64:12]',
13 | },
14 | }),
15 | }),
16 | ],
17 | external: ['~@availity/react-dates/lib/css/_datepicker.css'],
18 | });
19 |
--------------------------------------------------------------------------------
/packages/favorites/.npmignore:
--------------------------------------------------------------------------------
1 | **/*test.js
2 | **/*.stories.tsx
--------------------------------------------------------------------------------
/packages/favorites/jest.config.js:
--------------------------------------------------------------------------------
1 | const global = require('../../jest/global-config');
2 |
3 | module.exports = {
4 | ...global,
5 | displayName: 'favorites',
6 | coverageDirectory: '../../coverage/favorites',
7 | };
8 |
--------------------------------------------------------------------------------
/packages/favorites/src/components/FavoritesTooltip/FavoritesTooltip.module.scss:
--------------------------------------------------------------------------------
1 | .arrow {
2 | fill: #30383f;
3 | }
4 |
5 | .content {
6 | background-color: #30383f;
7 | color: #ffffff;
8 | max-width: 20rem;
9 | padding: 0.25rem 0.5rem;
10 | border-radius: 0.25rem;
11 | font-size: 0.75rem;
12 | }
13 |
--------------------------------------------------------------------------------
/packages/favorites/src/components/FavoritesTooltip/FavoritesTooltip.tsx:
--------------------------------------------------------------------------------
1 | import React, { ReactNode } from 'react';
2 | import { Provider, Root, Trigger, Content, Arrow } from '@radix-ui/react-tooltip';
3 | import css from './FavoritesTooltip.module.scss';
4 |
5 | const Tooltip = ({
6 | children,
7 | content,
8 | 'data-testid': dataTestId,
9 | }: {
10 | children: ReactNode;
11 | content: string;
12 | 'data-testid'?: string;
13 | }): JSX.Element => (
14 |
15 |
16 | {children}
17 |
18 | {content}
19 |
20 |
21 |
22 |
23 | );
24 |
25 | export default Tooltip;
26 |
--------------------------------------------------------------------------------
/packages/favorites/src/components/FavoritesTooltip/index.ts:
--------------------------------------------------------------------------------
1 | export { default } from './FavoritesTooltip';
2 |
--------------------------------------------------------------------------------
/packages/favorites/src/context/constants.ts:
--------------------------------------------------------------------------------
1 | export const MAX_FAVORITES = 60;
2 | export const NAV_APP_ID = 'Gateway-AvNavigation';
3 |
4 | export const AV_INTERNAL_GLOBALS = {
5 | FAVORITES_UPDATE: 'av:favorites:update',
6 | FAVORITES_CHANGED: 'av:favorites:changed',
7 | MAX_FAVORITES: 'av:favorites:maxed',
8 | MY_TOP_APPS_UPDATED: 'av:topApps:updated',
9 | } as const;
10 |
--------------------------------------------------------------------------------
/packages/favorites/src/context/index.ts:
--------------------------------------------------------------------------------
1 | export * from './FavoritesProvider';
2 |
--------------------------------------------------------------------------------
/packages/favorites/src/declarations.d.ts:
--------------------------------------------------------------------------------
1 | type CSSModuleClasses = { readonly [key: string]: string };
2 |
3 | declare module '*.module.css' {
4 | const classes: CSSModuleClasses;
5 | export default classes;
6 | }
7 | declare module '*.module.scss' {
8 | const classes: CSSModuleClasses;
9 | export default classes;
10 | }
11 |
12 | declare module '*.css' {
13 | const classes: CSSModuleClasses;
14 | export default classes;
15 | }
16 | declare module '*.scss' {
17 | const classes: CSSModuleClasses;
18 | export default classes;
19 | }
20 |
--------------------------------------------------------------------------------
/packages/favorites/src/index.ts:
--------------------------------------------------------------------------------
1 | export { FavoriteHeart } from './FavoriteHeart';
2 | export { useFavoritesQuery } from './context/utils';
3 | // this is weird, but we were exporting this way previously, so keeping for backwards compatibility
4 | export { FavoritesProvider, FavoritesProvider as default } from './context/FavoritesProvider';
5 |
--------------------------------------------------------------------------------
/packages/favorites/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.json",
3 | "include": ["."],
4 | "exclude": ["dist", "build", "node_modules"]
5 | }
6 |
--------------------------------------------------------------------------------
/packages/favorites/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "module": "commonjs",
6 | "types": ["jest", "node", "@testing-library/jest-dom"],
7 | "allowJs": true,
8 | "strict": false
9 | },
10 | "include": ["**/*.test.js", "**/*.test.ts", "**/*.test.tsx", "**/*.d.ts"]
11 | }
12 |
--------------------------------------------------------------------------------
/packages/favorites/tsup.config.js:
--------------------------------------------------------------------------------
1 | const { defineConfig } = require('tsup');
2 | const { sassPlugin, postcssModules } = require('esbuild-sass-plugin');
3 |
4 | module.exports = defineConfig({
5 | entry: ['src/index.ts'],
6 | format: ['esm', 'cjs'],
7 | esbuildPlugins: [
8 | sassPlugin({
9 | transform: postcssModules({
10 | extract: false,
11 | modules: {
12 | generateScopedName: '[hash:base64:12]',
13 | },
14 | }),
15 | }),
16 | ],
17 | });
18 |
--------------------------------------------------------------------------------
/packages/feature/.npmignore:
--------------------------------------------------------------------------------
1 | **/*test.js
2 | **/*.stories.tsx
--------------------------------------------------------------------------------
/packages/feature/index.d.ts:
--------------------------------------------------------------------------------
1 | export { default, FeatureProps } from './src/Feature';
2 |
--------------------------------------------------------------------------------
/packages/feature/index.js:
--------------------------------------------------------------------------------
1 | export { default } from './src/Feature';
2 | export { default as isFeatureEnabled, getFeatureCache } from './src/isFeatureEnabled';
3 |
--------------------------------------------------------------------------------
/packages/feature/jest.config.js:
--------------------------------------------------------------------------------
1 | const global = require('../../jest/global-config');
2 |
3 | module.exports = {
4 | ...global,
5 | displayName: 'feature',
6 | coverageDirectory: '../../coverage/feature',
7 | };
8 |
--------------------------------------------------------------------------------
/packages/feature/src/Feature.d.ts:
--------------------------------------------------------------------------------
1 | export interface FeatureProps {
2 | features: string | Array | string>;
3 | loader?: boolean | React.ReactNode;
4 | whenDisabled?: React.ReactNode;
5 | negate?: boolean;
6 | }
7 |
8 | declare const Feature: React.FC;
9 |
10 | export default Feature;
11 |
--------------------------------------------------------------------------------
/packages/feature/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.json",
3 | "include": ["."],
4 | "exclude": ["dist", "build", "node_modules"]
5 | }
6 |
--------------------------------------------------------------------------------
/packages/feature/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "module": "commonjs",
6 | "types": ["jest", "node", "@testing-library/jest-dom"],
7 | "allowJs": true
8 | },
9 | "include": ["**/*.test.js", "**/*.test.ts", "**/*.test.tsx", "**/*.d.ts"]
10 | }
11 |
--------------------------------------------------------------------------------
/packages/feedback/.npmignore:
--------------------------------------------------------------------------------
1 | **/*test.js
2 | **/*.stories.tsx
--------------------------------------------------------------------------------
/packages/feedback/index.d.ts:
--------------------------------------------------------------------------------
1 | export { default } from './src/Feedback';
2 | export { default as FeedbackForm } from './src/FeedbackForm';
3 | export { default as FeedbackModal } from './src/FeedbackModal';
4 |
--------------------------------------------------------------------------------
/packages/feedback/index.js:
--------------------------------------------------------------------------------
1 | export { default } from './src/Feedback';
2 | export { default as FeedbackForm } from './src/FeedbackForm';
3 | export { default as FeedbackModal } from './src/FeedbackModal';
4 |
--------------------------------------------------------------------------------
/packages/feedback/jest.config.js:
--------------------------------------------------------------------------------
1 | const global = require('../../jest/global-config');
2 |
3 | module.exports = {
4 | ...global,
5 | displayName: 'feedback',
6 | coverageDirectory: '../../coverage/feedback',
7 | };
8 |
--------------------------------------------------------------------------------
/packages/feedback/src/Feedback.d.ts:
--------------------------------------------------------------------------------
1 | import { DropdownProps } from 'reactstrap';
2 |
3 | export interface AnalyticsType {
4 | [key: string]: any;
5 | info: (data: any) => Promise;
6 | }
7 |
8 | export interface FeedbackProps extends DropdownProps {
9 | appName?: string;
10 | modal?: boolean;
11 | zIndex?: number | string;
12 | outline?: boolean;
13 | color?: string;
14 | analytics?: AnalyticsType;
15 | formProps?: { [key: string]: any };
16 | prompt?: React.ReactType;
17 | onFeedbackSent?: (feedback?: { [key: string]: any }) => void;
18 | onModalOpenChange?: (isOpen: boolean) => void;
19 | showSupport?: boolean;
20 | supportZIndex?: number | string;
21 | }
22 |
23 | declare const Feedback: React.FC;
24 |
25 | export default Feedback;
26 |
--------------------------------------------------------------------------------
/packages/feedback/src/FeedbackButton.d.ts:
--------------------------------------------------------------------------------
1 | export interface FeedbackButtonProps {
2 | onClick?: Function;
3 | icon?: string;
4 | active?: string;
5 | children?: React.ReactType;
6 | }
7 |
8 | declare const FeedbackButton: React.ComponentType;
9 |
10 | export default FeedbackButton;
--------------------------------------------------------------------------------
/packages/feedback/src/FeedbackDropdown.d.ts:
--------------------------------------------------------------------------------
1 | export interface FeedbackProps {
2 | appName: string;
3 | className?: string;
4 | prompt?: string;
5 | color?: string;
6 | outline?: boolean;
7 | formProps?: object;
8 | children?: React.ReactType;
9 | onFeedbackSent: Function;
10 | }
11 |
12 | declare const Feedback: React.StatelessComponent;
13 |
14 | export default Feedback;
15 |
--------------------------------------------------------------------------------
/packages/feedback/src/FeedbackModal.d.ts:
--------------------------------------------------------------------------------
1 | export interface FeedbackModalProps {
2 | isOpen: boolean;
3 | toggle: Function;
4 | zIndex?: number | string;
5 | }
6 |
7 | declare const FeedbackModal: React.FC;
8 |
9 | export default FeedbackModal;
10 |
--------------------------------------------------------------------------------
/packages/feedback/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.json",
3 | "include": ["."],
4 | "exclude": ["dist", "build", "node_modules"]
5 | }
6 |
--------------------------------------------------------------------------------
/packages/feedback/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "module": "commonjs",
6 | "types": ["jest", "node", "@testing-library/jest-dom"],
7 | "allowJs": true
8 | },
9 | "include": ["**/*.test.js", "**/*.test.ts", "**/*.test.tsx", "**/*.d.ts"]
10 | }
11 |
--------------------------------------------------------------------------------
/packages/form-upload/.npmignore:
--------------------------------------------------------------------------------
1 | **/*test.js
2 | **/*.stories.tsx
--------------------------------------------------------------------------------
/packages/form-upload/jest.config.js:
--------------------------------------------------------------------------------
1 | const global = require('../../jest/global-config');
2 |
3 | module.exports = {
4 | ...global,
5 | displayName: 'form-upload',
6 | coverageDirectory: '../../coverage/form-upload',
7 | testRunner: 'jest-jasmine2',
8 | };
9 |
--------------------------------------------------------------------------------
/packages/form-upload/src/FileList.d.ts:
--------------------------------------------------------------------------------
1 | export interface FileListProps {
2 | files?: any[];
3 | children?: Function;
4 | onRemoveFile?: Function;
5 | }
6 |
7 | declare const FileList: (props: FileListProps) => JSX.Element | null;
8 |
9 | export default FileList;
10 |
--------------------------------------------------------------------------------
/packages/form-upload/src/FilePicker.d.ts:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 | export interface FilePickerProps {
4 | tag?: React.ElementType;
5 | multiple?: boolean;
6 | children?: React.ReactNode;
7 | name?: string;
8 | allowedFileTypes?: string[];
9 | maxSize?: number | string;
10 | onChange?: React.ChangeEventHandler;
11 | }
12 |
13 | declare const FilePicker: (props: FilePickerProps) => JSX.Element;
14 |
15 | export default FilePicker;
16 |
--------------------------------------------------------------------------------
/packages/form-upload/src/FilePickerBtn.d.ts:
--------------------------------------------------------------------------------
1 | export interface FilePickerBtnProps extends React.ButtonHTMLAttributes {
2 | onChange?: React.ChangeEventHandler;
3 | multiple?: boolean;
4 | name?: string;
5 | allowedFileTypes?: string[];
6 | maxSize?: number;
7 | 'data-testid'?: string;
8 | }
9 |
10 | declare const FilePickerBtn: (props: FilePickerBtnProps) => JSX.Element;
11 |
12 | export default FilePickerBtn;
13 |
--------------------------------------------------------------------------------
/packages/form-upload/src/FileRow.d.ts:
--------------------------------------------------------------------------------
1 | type File = {
2 | name: string;
3 | };
4 |
5 | type FileType = {
6 | id: string;
7 | file: File;
8 | };
9 |
10 | type ChildrenArgument = {
11 | file: FileType;
12 | metadata?: object;
13 | name: string;
14 | remove: () => void;
15 | ext: string;
16 | icon: string;
17 | progressBar: () => JSX.Element;
18 | };
19 |
20 | export interface FileRowProps {
21 | onRemove: (id: string) => void;
22 | children?: (args: ChildrenArgument) => JSX.Element;
23 | file?: File;
24 | }
25 |
26 | declare const FileRow: (props: FileRowProps) => JSX.Element;
27 |
28 | export default FileRow;
29 |
--------------------------------------------------------------------------------
/packages/form-upload/src/UploadProgressBar.d.ts:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 | type UploadType = {
4 | sendPassword: Function;
5 | onProgress: any[];
6 | onSuccess: any[];
7 | onError: any[];
8 | percentage?: number;
9 | errorMessage?: string;
10 | id: string;
11 | status?: string;
12 | };
13 |
14 | export interface UploadProgressBarProps {
15 | upload: UploadType;
16 | onProgress?: Function;
17 | onSuccess?: Function;
18 | onError?: Function;
19 | animated?: boolean;
20 | className?: string;
21 | tag?: React.ElementType;
22 | striped?: boolean;
23 | }
24 |
25 | declare const UploadProgressBar: (props: UploadProgressBarProps) => JSX.Element;
26 |
27 | export default UploadProgressBar;
28 |
--------------------------------------------------------------------------------
/packages/form-upload/src/index.d.ts:
--------------------------------------------------------------------------------
1 | import Upload from './Upload';
2 | import FilePicker from './FilePicker';
3 | import FileList from './FileList';
4 | import FileRow from './FileRow';
5 | import FilePickerBtn from './FilePickerBtn';
6 | import UploadProgressBar from './UploadProgressBar';
7 |
8 | export default Upload;
9 |
10 | export { FilePicker, FileList, FileRow, FilePickerBtn, UploadProgressBar };
11 |
--------------------------------------------------------------------------------
/packages/form-upload/src/index.js:
--------------------------------------------------------------------------------
1 | export { default } from './Upload';
2 | export { default as FilePicker } from './FilePicker';
3 | export { default as FileList } from './FileList';
4 | export { default as FileRow } from './FileRow';
5 | export { default as FilePickerBtn } from './FilePickerBtn';
6 | export { default as UploadProgressBar } from './UploadProgressBar';
7 |
--------------------------------------------------------------------------------
/packages/form-upload/src/props.stories.mdx:
--------------------------------------------------------------------------------
1 | import { Meta, ArgTypes } from '@storybook/addon-docs';
2 | import { hidden_FileList, hidden_FilePicker, hidden_FilePickerBtn, hidden_UploadProgressBar } from './Upload.stories';
3 |
4 |
5 |
6 | # FileList Props
7 |
8 | These props can be passed to the `FileList` component
9 |
10 |
11 |
12 | # FilePicker Props
13 |
14 | These props can be passed to the `FilePicker` component
15 |
16 |
17 |
18 | # FilePickerBtn Props
19 |
20 | These props can be passed to the `FilePickerBtn` component
21 |
22 |
23 |
24 | # UploadProgressBar Props
25 |
26 | These props can be passed to the `UploadProgressBar` component
27 |
28 |
29 |
--------------------------------------------------------------------------------
/packages/form-upload/styles.scss:
--------------------------------------------------------------------------------
1 | .file-drop {
2 | color: #464a4c;
3 | text-align: center;
4 | border: 1px dashed rgba(0, 0, 0, .15);
5 | width: 8rem;
6 | min-width: fit-content;
7 | height: 8rem;
8 | padding: 3rem 0;
9 | }
10 |
11 | .file-drop-active {
12 | border: 1px solid #3960ed;
13 | border-width: 2px;
14 | background-color: #ebebeb;
15 | border-radius: 5px;
16 | }
--------------------------------------------------------------------------------
/packages/form-upload/tests/FilePicker.test.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { render } from '@testing-library/react';
3 | import { Form } from '@availity/form';
4 |
5 | import { FilePicker } from '../src';
6 |
7 | const renderFilePicker = (formProps, pickerProps) =>
8 | render(
9 |
12 | );
13 |
14 | describe('FilePicker', () => {
15 | test('should render', () => {
16 | const { container } = renderFilePicker(
17 | { initialValues: { file: null } },
18 | {
19 | name: 'file',
20 | onChange: () => {
21 | // noop
22 | },
23 | }
24 | );
25 |
26 | expect(container).toBeDefined();
27 | });
28 | });
29 |
--------------------------------------------------------------------------------
/packages/form-upload/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.json",
3 | "include": ["."],
4 | "exclude": ["dist", "build", "node_modules"]
5 | }
6 |
--------------------------------------------------------------------------------
/packages/form-upload/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "module": "commonjs",
6 | "types": ["jest", "node", "@testing-library/jest-dom"],
7 | "allowJs": true,
8 | "strict": false
9 | },
10 | "include": ["**/*.test.js", "**/*.test.ts", "**/*.test.tsx", "**/*.d.ts"]
11 | }
12 |
--------------------------------------------------------------------------------
/packages/form/.npmignore:
--------------------------------------------------------------------------------
1 | **/*test.js
2 | **/*.stories.tsx
--------------------------------------------------------------------------------
/packages/form/jest.config.js:
--------------------------------------------------------------------------------
1 | const global = require('../../jest/global-config');
2 |
3 | module.exports = {
4 | ...global,
5 | displayName: 'form',
6 | coverageDirectory: '../../coverage/form',
7 | };
8 |
--------------------------------------------------------------------------------
/packages/form/src/Checkbox.d.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable @typescript-eslint/ban-types */
2 | import { HTMLAttributes, ReactNode } from 'react';
3 |
4 | export interface CheckboxProps extends HTMLAttributes {
5 | label?: ReactNode;
6 | value?: string | boolean | object;
7 | inline?: boolean;
8 | disabled?: boolean;
9 | id?: string;
10 | groupClassName?: string;
11 | groupName?: string;
12 | helpId?: string;
13 | isHelpVideoType?: boolean;
14 | }
15 |
16 | declare const Checkbox: (props: CheckboxProps) => JSX.Element;
17 |
18 | export default Checkbox;
19 |
--------------------------------------------------------------------------------
/packages/form/src/CheckboxGroup.d.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable @typescript-eslint/no-explicit-any */
2 | import { ReactNode } from 'react';
3 | import { FormGroupProps } from 'reactstrap';
4 |
5 | export interface CheckboxGroupProps extends FormGroupProps {
6 | name: string;
7 | label?: ReactNode;
8 | labelClassName?: string;
9 | groupClassName?: string;
10 | onChange?: (value: any) => void;
11 | helpId?: string;
12 | required?: boolean;
13 | isHelpVideoType?: boolean;
14 | }
15 |
16 | declare const CheckboxGroup: (props: CheckboxGroupProps) => JSX.Element;
17 |
18 | export default CheckboxGroup;
19 |
--------------------------------------------------------------------------------
/packages/form/src/Feedback.d.ts:
--------------------------------------------------------------------------------
1 | import { ErrorMessage } from 'formik';
2 |
3 | export default ErrorMessage;
4 |
--------------------------------------------------------------------------------
/packages/form/src/Feedback.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import PropTypes from 'prop-types';
3 | import { FormFeedback } from 'reactstrap';
4 | import { ErrorMessage } from 'formik';
5 |
6 | const AvFeedback = ({ children, ...rest }) => (
7 |
8 |
9 | Error:
10 | {children}
11 |
12 | );
13 |
14 | const Feedback = ({ name, ...rest }) => {
15 | const feedbackId = `${name}-feedback`.toLowerCase();
16 | return ;
17 | };
18 |
19 | AvFeedback.propTypes = {
20 | children: PropTypes.node,
21 | };
22 |
23 | Feedback.propTypes = {
24 | name: PropTypes.string.isRequired,
25 | };
26 |
27 | export default Feedback;
28 |
--------------------------------------------------------------------------------
/packages/form/src/FieldHelpIcon.d.ts:
--------------------------------------------------------------------------------
1 | type FieldHelpIconProps = {
2 | /** The field Help ID Required */
3 | id: string;
4 | /** The bootstrap 3 color of the icon. Default:primary */
5 | color?: string;
6 | /** The size of the help icon. Default: 1x */
7 | size?: string;
8 | /** The id of the associated label for aria-describedby, needed for accessibility. */
9 | labelId?: string;
10 | /** The prop that allows the type of icon to be changed to video-help, if needed */
11 | isHelpVideoType?: boolean;
12 | };
13 |
14 | declare const FieldHelpIcon: (props: FieldHelpIconProps) => JSX.Element;
15 |
16 | declare const triggerFieldHelp: (id: string) => void;
17 |
18 | declare const OPEN_FIELD_HELP: string;
19 |
20 | export { FieldHelpIconProps, OPEN_FIELD_HELP, triggerFieldHelp };
21 |
22 | export default FieldHelpIcon;
23 |
--------------------------------------------------------------------------------
/packages/form/src/Form.d.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable @typescript-eslint/no-explicit-any */
2 | import { FormikConfig } from 'formik';
3 |
4 | export type FormProps = {
5 | id?: string;
6 | focusInvalidField?: boolean;
7 | invalidInputSelectors?: string;
8 | } & FormikConfig;
9 |
10 | declare const Form: (props: FormProps) => JSX.Element;
11 |
12 | export default Form;
13 |
--------------------------------------------------------------------------------
/packages/form/src/FormGroup.d.ts:
--------------------------------------------------------------------------------
1 | import { FormGroupProps } from 'reactstrap';
2 |
3 | export type Props = {
4 | for: string;
5 | } & FormGroupProps;
6 |
7 | declare const FormGroup: (props: Props) => JSX.Element;
8 |
9 | export default FormGroup;
10 |
--------------------------------------------------------------------------------
/packages/form/src/FormGroup.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import PropTypes from 'prop-types';
3 | import { FormGroup as RsFormGroup } from 'reactstrap';
4 | import classNames from 'classnames';
5 | import { useField } from 'formik';
6 |
7 | const FormGroup = ({ className, for: For, ...props }) => {
8 | const [, metadata] = useField(For);
9 |
10 | const classname = classNames(className, metadata.touched && metadata.error && `text-danger`);
11 |
12 | return ;
13 | };
14 |
15 | FormGroup.propTypes = {
16 | className: PropTypes.string,
17 | /** Used to match the wrapped input. Must be the same name given to the input field. */
18 | for: PropTypes.string,
19 | };
20 |
21 | export default FormGroup;
22 |
--------------------------------------------------------------------------------
/packages/form/src/Label.d.ts:
--------------------------------------------------------------------------------
1 | import { LabelProps as RSLabelProps } from 'reactstrap';
2 |
3 | export interface LabelProps extends RSLabelProps {
4 | helpId?: string;
5 | required?: boolean;
6 | isHelpVideoType?: boolean;
7 | }
8 |
9 | declare const Label: (props: LabelProps) => JSX.Element;
10 |
11 | declare const RequiredAsterisk: () => JSX.Element;
12 |
13 | declare const RequiredKey: () => JSX.Element;
14 |
15 | export { RequiredAsterisk, RequiredKey };
16 |
17 | export default Label;
18 |
--------------------------------------------------------------------------------
/packages/form/src/Radio.d.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable @typescript-eslint/ban-types */
2 | import { HTMLAttributes, ReactNode } from 'react';
3 |
4 | export interface RadioProps extends HTMLAttributes {
5 | label?: ReactNode;
6 | name?: string;
7 | id?: string;
8 | groupClassName?: string;
9 | value?: string | boolean | object;
10 | disabled?: boolean;
11 | helpId?: string;
12 | isHelpVideoType?: boolean;
13 | }
14 |
15 | declare const Radio: (props: RadioProps) => JSX.Element;
16 |
17 | export default Radio;
18 |
--------------------------------------------------------------------------------
/packages/form/src/RadioGroup.d.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable @typescript-eslint/no-explicit-any */
2 | import { ReactNode } from 'react';
3 | import { FormGroupProps } from 'reactstrap';
4 |
5 | export interface RadioGroupProps extends FormGroupProps {
6 | name: string;
7 | label?: ReactNode;
8 | labelClassName?: string;
9 | groupClassName?: string;
10 | onChange?: (value: any) => void;
11 | inline?: boolean;
12 | helpId?: string;
13 | required?: boolean;
14 | isHelpVideoType?: boolean;
15 | }
16 |
17 | declare const RadioGroup: (props: RadioGroupProps) => JSX.Element;
18 |
19 | export default RadioGroup;
20 |
--------------------------------------------------------------------------------
/packages/form/src/index.d.ts:
--------------------------------------------------------------------------------
1 | export { default as Form, FormProps } from './Form';
2 | export { default as Field, FieldProps } from './Field';
3 | export { default as Input } from './Input';
4 | export { default as FormGroup } from './FormGroup';
5 | export { default as CheckboxGroup } from './CheckboxGroup';
6 | export { default as Checkbox } from './Checkbox';
7 | export { default as RadioGroup } from './RadioGroup';
8 | export { default as Radio } from './Radio';
9 | export { default as Feedback } from './Feedback';
10 | export { default as Label, LabelProps, RequiredAsterisk, RequiredKey } from './Label';
11 | export { default as FieldHelpIcon, FieldHelpIconProps, triggerFieldHelp } from './FieldHelpIcon';
12 | export { default as CurrencyInput } from './CurrencyInput';
13 |
--------------------------------------------------------------------------------
/packages/form/src/index.js:
--------------------------------------------------------------------------------
1 | export { default as Form } from './Form';
2 | export { default as Field } from './Field';
3 | export { default as Input } from './Input';
4 | export { default as FormGroup } from './FormGroup';
5 | export { default as CheckboxGroup } from './CheckboxGroup';
6 | export { default as Checkbox } from './Checkbox';
7 | export { default as RadioGroup } from './RadioGroup';
8 | export { default as Radio } from './Radio';
9 | export { default as Feedback } from './Feedback';
10 | export { default as Label, RequiredAsterisk, RequiredKey } from './Label';
11 | export { default as FieldHelpIcon, triggerFieldHelp } from './FieldHelpIcon';
12 | export { default as CurrencyInput } from './CurrencyInput';
13 |
--------------------------------------------------------------------------------
/packages/form/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.json",
3 | "include": ["."],
4 | "compilerOptions": {
5 | "allowJs": true,
6 | "outDir": "dist"
7 | },
8 | "exclude": ["dist", "build", "node_modules"]
9 | }
10 |
--------------------------------------------------------------------------------
/packages/form/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "module": "commonjs",
6 | "types": ["jest", "node", "@testing-library/jest-dom"],
7 | "allowJs": true
8 | },
9 | "include": ["**/*.test.js", "**/*.test.ts", "**/*.test.tsx", "**/*.d.ts"]
10 | }
11 |
--------------------------------------------------------------------------------
/packages/help/.npmignore:
--------------------------------------------------------------------------------
1 | **/*test.js
2 | **/*.stories.tsx
--------------------------------------------------------------------------------
/packages/help/jest.config.js:
--------------------------------------------------------------------------------
1 | const global = require('../../jest/global-config');
2 |
3 | module.exports = {
4 | ...global,
5 | displayName: 'help',
6 | coverageDirectory: '../../coverage/help',
7 | };
8 |
--------------------------------------------------------------------------------
/packages/help/src/Help.stories.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { StoryObj } from '@storybook/react';
3 |
4 | import HelpProvider, { Help } from '.';
5 | import { HelpProps } from './Help';
6 | // import README from "../README.md";
7 |
8 | /**
9 | * # Help Wrapper for Oxygen Learning Docs on the Portal (This component will only work in the Availity Portal).
10 | */
11 | export default {
12 | title: 'Components/Help',
13 | component: Help,
14 | };
15 |
16 | export const _Help: StoryObj = {
17 | render: ({ type, id }) => (
18 |
19 |
20 |
21 | Some Content You May need documentation for.
22 |
23 |
24 |
25 | ),
26 | args: {
27 | type: 'provider',
28 | id: '1234-5678-9101-1213',
29 | },
30 | };
31 |
--------------------------------------------------------------------------------
/packages/help/src/index.ts:
--------------------------------------------------------------------------------
1 | export { default, Help, useHelp, constants } from './Help';
2 |
--------------------------------------------------------------------------------
/packages/help/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.json",
3 | "exclude": ["dist", "build", "node_modules"]
4 | }
5 |
--------------------------------------------------------------------------------
/packages/help/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "module": "commonjs",
6 | "types": ["jest", "node", "@testing-library/jest-dom"]
7 | },
8 | "include": ["**/*.test.js", "**/*.test.ts", "**/*.test.tsx", "**/*.d.ts"]
9 | }
10 |
--------------------------------------------------------------------------------
/packages/hooks/.npmignore:
--------------------------------------------------------------------------------
1 | **/*test.js
2 | **/*.stories.tsx
--------------------------------------------------------------------------------
/packages/hooks/index.d.ts:
--------------------------------------------------------------------------------
1 | export { default as useEffectAsync } from './types/useEffectAsync';
2 | export { default as useMount } from './types/useMount';
3 | export { default as useTimeout } from './types/useTimeout';
4 | export { default as useToggle } from './types/useToggle';
5 | export { default as useCurrentRegion } from './types/useCurrentRegion';
6 | export { default as useCurrentUser } from './types/useCurrentUser';
7 | export { default as useProviders } from './types/useProviders';
8 | export { default as usePermissions } from './types/usePermissions';
9 | export { default as useOrganizations } from './types/useOrganizations';
10 | export { default as useUpdateNav } from './types/useUpdateNav';
11 | export { default as useWindowDimensions } from './types/useWindowDimensions';
12 |
--------------------------------------------------------------------------------
/packages/hooks/index.js:
--------------------------------------------------------------------------------
1 | export { default as useEffectAsync } from './src/useEffectAsync';
2 | export { default as useMount } from './src/useMount';
3 | export { default as useTimeout } from './src/useTimeout';
4 | export { default as useToggle } from './src/useToggle';
5 | export { default as useCurrentRegion } from './src/useCurrentRegion';
6 | export { default as useCurrentUser } from './src/useCurrentUser';
7 | export { default as useProviders } from './src/useProviders';
8 | export { default as usePermissions } from './src/usePermissions';
9 | export { default as useOrganizations } from './src/useOrganizations';
10 | export { default as useUpdateNav } from './src/useUpdateNav';
11 | export { default as useWindowDimensions } from './src/useWindowDimensions';
12 |
--------------------------------------------------------------------------------
/packages/hooks/jest.config.js:
--------------------------------------------------------------------------------
1 | const global = require('../../jest/global-config');
2 |
3 | module.exports = {
4 | ...global,
5 | displayName: 'hooks',
6 | coverageDirectory: '../../coverage/hooks',
7 | };
8 |
--------------------------------------------------------------------------------
/packages/hooks/src/useCurrentRegion.js:
--------------------------------------------------------------------------------
1 | import { useQuery } from '@tanstack/react-query';
2 | import { avRegionsApi } from '@availity/api-axios';
3 |
4 | async function fetchRegion() {
5 | const response = await avRegionsApi.getCurrentRegion();
6 |
7 | return {
8 | code: response?.data?.regions?.[0]?.id || '',
9 | value: response?.data?.regions?.[0]?.value || '',
10 | };
11 | }
12 |
13 | export default function useCurrentRegion(options) {
14 | return useQuery(['region'], fetchRegion, options);
15 | }
16 |
--------------------------------------------------------------------------------
/packages/hooks/src/useCurrentUser.js:
--------------------------------------------------------------------------------
1 | import { avUserApi } from '@availity/api-axios';
2 | import { useQuery } from '@tanstack/react-query';
3 |
4 | const fetchUser = async () => avUserApi.me();
5 |
6 | export default function useCurrentUser(options) {
7 | return useQuery(['user'], fetchUser, options);
8 | }
9 |
--------------------------------------------------------------------------------
/packages/hooks/src/useEffectAsync.js:
--------------------------------------------------------------------------------
1 | import { useEffect } from 'react';
2 |
3 | export default function useEffectAsync(effect, inputs) {
4 | useEffect(() => {
5 | effect();
6 | // eslint-disable-next-line react-hooks/exhaustive-deps
7 | }, inputs);
8 | }
9 |
--------------------------------------------------------------------------------
/packages/hooks/src/useMount.js:
--------------------------------------------------------------------------------
1 | import { useEffect } from 'react';
2 |
3 | export default function useMount(effect) {
4 | // eslint-disable-next-line react-hooks/exhaustive-deps
5 | useEffect(effect, []);
6 | }
7 |
--------------------------------------------------------------------------------
/packages/hooks/src/useOrganizations.js:
--------------------------------------------------------------------------------
1 | import { useQuery } from '@tanstack/react-query';
2 | import { avOrganizationsApi } from '@availity/api-axios';
3 |
4 | const fetchOrganization = async (config) => avOrganizationsApi.getOrganizations(config);
5 |
6 | export default function useOrganization(config, options) {
7 | return useQuery(['organizations', config], () => fetchOrganization(config), options);
8 | }
9 |
--------------------------------------------------------------------------------
/packages/hooks/src/usePermissions.js:
--------------------------------------------------------------------------------
1 | import { useQuery } from '@tanstack/react-query';
2 | import { avPermissionsApi } from '@availity/api-axios';
3 |
4 | const fetchPermissions = async (config) => avPermissionsApi.getPermissions(config);
5 |
6 | export default function usePermissions(config, options) {
7 | return useQuery(['permissions', config], () => fetchPermissions(config), options);
8 | }
9 |
--------------------------------------------------------------------------------
/packages/hooks/src/useProviders.js:
--------------------------------------------------------------------------------
1 | import { useQuery } from '@tanstack/react-query';
2 | import { avProvidersApi } from '@availity/api-axios';
3 |
4 | const fetchProviders = async (config) => avProvidersApi.getProviders(config.customerId, config);
5 |
6 | export default function useProviders(config, options) {
7 | return useQuery(['providers', config], () => fetchProviders(config), options);
8 | }
9 |
--------------------------------------------------------------------------------
/packages/hooks/src/useTimeout.js:
--------------------------------------------------------------------------------
1 | import { useEffect, useState } from 'react';
2 |
3 | export default function useTimeout(ms = 0) {
4 | const [ready, setReady] = useState(false);
5 |
6 | useEffect(() => {
7 | let unmounted = false;
8 | const timer = setTimeout(() => {
9 | if (!unmounted) {
10 | setReady(true);
11 | }
12 | }, ms);
13 |
14 | return () => {
15 | unmounted = true;
16 | clearTimeout(timer);
17 | };
18 | }, [ms]);
19 |
20 | return ready;
21 | }
22 |
--------------------------------------------------------------------------------
/packages/hooks/src/useToggle.js:
--------------------------------------------------------------------------------
1 | import { useState } from 'react';
2 |
3 | export default function useToggle(initialState = false) {
4 | const [state, setState] = useState(initialState);
5 | const toggle = (newState) => {
6 | if (newState !== undefined && newState !== state) {
7 | setState(newState);
8 | } else if (newState === undefined) {
9 | setState(!state);
10 | }
11 | };
12 |
13 | return [state, toggle];
14 | }
15 |
--------------------------------------------------------------------------------
/packages/hooks/src/useUpdateNav.js:
--------------------------------------------------------------------------------
1 | import { useEffect } from 'react';
2 | import { useLocation } from 'react-router-dom';
3 | import avMessage from '@availity/message-core';
4 |
5 | const useUpdateNav = () => {
6 | const location = useLocation();
7 |
8 | useEffect(() => {
9 | try {
10 | avMessage.send({ event: 'navChange', url: window.location.href });
11 | } catch {
12 | // noop
13 | }
14 | }, [location]);
15 | };
16 |
17 | export default useUpdateNav;
18 |
--------------------------------------------------------------------------------
/packages/hooks/src/useWindowDimensions.js:
--------------------------------------------------------------------------------
1 | import { useEffect, useState } from 'react';
2 |
3 | const getWindowDimensions = () => {
4 | const { innerWidth: width, innerHeight: height } = window;
5 | return {
6 | width,
7 | height,
8 | };
9 | };
10 |
11 | const useWindowDimensions = () => {
12 | const [windowDimensions, setWindowDimensions] = useState(getWindowDimensions());
13 |
14 | useEffect(() => {
15 | const handleResize = () => {
16 | setWindowDimensions(getWindowDimensions());
17 | };
18 |
19 | window.addEventListener('resize', handleResize);
20 | return () => window.removeEventListener('resize', handleResize);
21 | }, []);
22 |
23 | return windowDimensions;
24 | };
25 |
26 | export default useWindowDimensions;
27 |
--------------------------------------------------------------------------------
/packages/hooks/stories/ResourceComponent.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Card, CardBody, CardTitle } from 'reactstrap';
3 |
4 | type Props = {
5 | data: Record;
6 | loading: boolean;
7 | title?: string;
8 | };
9 |
10 | const ResourceComponent = ({ data, loading, title = '' }: Props): JSX.Element => (
11 |
12 |
13 | {title}
14 |
15 | {loading ? 'Loading...' : {JSON.stringify(data, null, 2)} }
16 |
17 | );
18 |
19 | export default ResourceComponent;
20 |
--------------------------------------------------------------------------------
/packages/hooks/stories/useWindowDimensions.stories.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Meta, Story } from '@storybook/react';
3 | import { useWindowDimensions } from '..';
4 |
5 | const ListenerComponent = () => {
6 | const { height, width } = useWindowDimensions();
7 | return (
8 |
9 | {' '}
10 | Current Window Dimensions: height: {height}, width: {width}
11 |
12 | );
13 | };
14 |
15 | export default {
16 | title: 'Hooks/useWindowDimensions',
17 | parameters: {
18 | docs: {
19 | description: {
20 | component: "Hook that returns the window's current dimensions.",
21 | },
22 | },
23 | },
24 | } as Meta;
25 |
26 | export const Default: Story = () => ;
27 | Default.storyName = 'default';
28 |
--------------------------------------------------------------------------------
/packages/hooks/tests/useMount.test.js:
--------------------------------------------------------------------------------
1 | import React, { useState } from 'react';
2 | import { render, cleanup } from '@testing-library/react';
3 | import { useMount } from '..';
4 |
5 | afterEach(cleanup);
6 |
7 | // eslint-disable-next-line react/prop-types
8 | const Component = () => {
9 | const [state, setState] = useState();
10 |
11 | useMount(() => {
12 | setState('test');
13 | });
14 |
15 | return {state}
;
16 | };
17 |
18 | describe('useMount', () => {
19 | test('should render "test"', () => {
20 | const { getByTestId } = render( );
21 |
22 | expect(getByTestId('mount-test').textContent).toEqual('test');
23 | });
24 | });
25 |
--------------------------------------------------------------------------------
/packages/hooks/tests/useTimeout.test.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { render, waitFor } from '@testing-library/react';
3 | import { useTimeout } from '..';
4 |
5 | const Component = () => {
6 | const timeout = useTimeout(1000);
7 |
8 | return {timeout ? 'True' : 'False'}
;
9 | };
10 |
11 | jest.useFakeTimers();
12 |
13 | describe('useTimeout', () => {
14 | test('should render "False"', () => {
15 | const { getByTestId } = render( );
16 |
17 | expect(getByTestId('timeout-test').textContent).toEqual('False');
18 | });
19 |
20 | test('should render "True"', async () => {
21 | const { getByTestId } = render( );
22 |
23 | jest.runAllTimers();
24 |
25 | await waitFor(() => {
26 | expect(getByTestId('timeout-test').textContent).toEqual('True');
27 | });
28 | });
29 | });
30 |
--------------------------------------------------------------------------------
/packages/hooks/tests/util.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { render } from '@testing-library/react';
3 | import { QueryClientProvider } from '@tanstack/react-query';
4 |
5 | // Taken from https://github.com/tannerlinsley/react-query/blob/master/src/react/tests/utils.tsx#L6
6 | export default function renderWithClient(client, ui) {
7 | return render({ui} );
8 | }
9 |
--------------------------------------------------------------------------------
/packages/hooks/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.json",
3 | "include": ["."],
4 | "exclude": ["dist", "build", "node_modules"]
5 | }
6 |
--------------------------------------------------------------------------------
/packages/hooks/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "module": "commonjs",
6 | "types": ["jest", "node", "@testing-library/jest-dom"],
7 | "allowJs": true
8 | },
9 | "include": ["**/*.test.js", "**/*.test.ts", "**/*.test.tsx", "**/*.d.ts"]
10 | }
11 |
--------------------------------------------------------------------------------
/packages/hooks/types/aries.d.ts:
--------------------------------------------------------------------------------
1 | export interface AriesHookBase {
2 | data: {
3 | totalCount: number;
4 | count: number;
5 | offSet: number;
6 | links: {
7 | next: { href: string };
8 | last: { href: string };
9 | self: { href: string };
10 | };
11 | };
12 | }
13 |
--------------------------------------------------------------------------------
/packages/hooks/types/useCurrentRegion.d.ts:
--------------------------------------------------------------------------------
1 | import { UseQueryOptions, UseQueryResult } from '@tanstack/react-query';
2 |
3 | export type CurrentRegion = {
4 | code: string;
5 | value: string;
6 | };
7 |
8 | declare function useCurrentRegion(
9 | options?: UseQueryOptions
10 | ): UseQueryResult;
11 |
12 | export default useCurrentRegion;
13 |
--------------------------------------------------------------------------------
/packages/hooks/types/useCurrentUser.d.ts:
--------------------------------------------------------------------------------
1 | import { UseQueryOptions, UseQueryResult } from '@tanstack/react-query';
2 |
3 | export type CurrentUser = {
4 | akaname: string;
5 | createDate: string;
6 | currentRegion: string;
7 | email: string;
8 | firstName: string;
9 | lastName: string;
10 | id: string;
11 | jobTitle: string;
12 | userHasSecurityException: boolean;
13 | userId: string;
14 | userValidated: boolean;
15 | };
16 |
17 | declare function useCurrentUser(
18 | options?: UseQueryOptions
19 | ): UseQueryResult;
20 |
21 | export default useCurrentUser;
22 |
--------------------------------------------------------------------------------
/packages/hooks/types/useEffectAsync.d.ts:
--------------------------------------------------------------------------------
1 | import { useEffect } from 'react';
2 |
3 | export default useEffect;
4 |
--------------------------------------------------------------------------------
/packages/hooks/types/useMount.d.ts:
--------------------------------------------------------------------------------
1 | import { EffectCallback } from 'react';
2 |
3 | declare function useMount(effect: EffectCallback): void;
4 |
5 | export default useMount;
6 |
--------------------------------------------------------------------------------
/packages/hooks/types/usePermissions.d.ts:
--------------------------------------------------------------------------------
1 | import { AxiosRequestConfig } from 'axios';
2 | import { UseQueryOptions, UseQueryResult } from '@tanstack/react-query';
3 | import { AriesHookBase } from './aries';
4 |
5 | export interface PermissionsBase {
6 | data: {
7 | permissions: {
8 | id: string;
9 | description: string;
10 | links: { self: { href: string } };
11 | }[];
12 | };
13 | }
14 |
15 | type Permissions = AriesHookBase & PermissionsBase;
16 |
17 | declare function usePermissions(
18 | config: AxiosRequestConfig,
19 | options?: UseQueryOptions
20 | ): UseQueryResult;
21 |
22 | export default usePermissions;
23 |
--------------------------------------------------------------------------------
/packages/hooks/types/useTimeout.d.ts:
--------------------------------------------------------------------------------
1 | declare function useTimeout(ms?: number | 0): boolean;
2 |
3 | export default useTimeout;
--------------------------------------------------------------------------------
/packages/hooks/types/useToggle.d.ts:
--------------------------------------------------------------------------------
1 | declare const useToggle: (initialValue?: boolean) => [isToggled: boolean, toggle: (state?: boolean) => void];
2 |
3 | export default useToggle;
4 |
--------------------------------------------------------------------------------
/packages/hooks/types/useUpdateNav.d.ts:
--------------------------------------------------------------------------------
1 | declare const useUpdateNav: () => void;
2 |
3 | export default useUpdateNav;
4 |
--------------------------------------------------------------------------------
/packages/hooks/types/useWindowDimensions.d.ts:
--------------------------------------------------------------------------------
1 | export type Dimensions = {
2 | width: number;
3 | height: number;
4 | };
5 |
6 | declare function useWindowDimensions(): Dimensions;
7 |
8 | export default useWindowDimensions;
9 |
--------------------------------------------------------------------------------
/packages/icon/.npmignore:
--------------------------------------------------------------------------------
1 | **/*.test.tsx
2 | **/*.stories.tsx
--------------------------------------------------------------------------------
/packages/icon/jest.config.js:
--------------------------------------------------------------------------------
1 | const global = require('../../jest/global-config');
2 |
3 | module.exports = {
4 | ...global,
5 | displayName: 'icon',
6 | coverageDirectory: '../../coverage/icon',
7 | };
8 |
--------------------------------------------------------------------------------
/packages/icon/src/index.ts:
--------------------------------------------------------------------------------
1 | export { default } from './Icon';
2 | export type { IconProps } from './Icon';
3 |
--------------------------------------------------------------------------------
/packages/icon/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.json",
3 | "include": ["."],
4 | "exclude": ["dist", "build", "node_modules"]
5 | }
6 |
--------------------------------------------------------------------------------
/packages/icon/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "module": "commonjs",
6 | "types": ["jest", "node", "@testing-library/jest-dom"]
7 | },
8 | "include": ["**/*.test.js", "**/*.test.ts", "**/*.test.tsx", "**/*.d.ts"]
9 | }
10 |
--------------------------------------------------------------------------------
/packages/json-viewer/.npmignore:
--------------------------------------------------------------------------------
1 | **/*test.tsx
2 | **/*.stories.tsx
3 | **/*.stories.tsx
--------------------------------------------------------------------------------
/packages/json-viewer/jest.config.js:
--------------------------------------------------------------------------------
1 | const global = require('../../jest/global-config');
2 |
3 | module.exports = {
4 | ...global,
5 | displayName: 'json-viewer',
6 | coverageDirectory: '../../coverage/json-viewer',
7 | };
8 |
--------------------------------------------------------------------------------
/packages/json-viewer/src/index.ts:
--------------------------------------------------------------------------------
1 | export { default } from './JsonViewer';
2 | export type { JsonViewerProps } from './JsonViewer';
3 |
--------------------------------------------------------------------------------
/packages/json-viewer/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.json",
3 | "include": ["."],
4 | "exclude": ["dist", "build", "node_modules"]
5 | }
6 |
--------------------------------------------------------------------------------
/packages/json-viewer/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "module": "commonjs",
6 | "types": ["jest", "node", "@testing-library/jest-dom"]
7 | },
8 | "include": ["**/*.test.js", "**/*.test.ts", "**/*.test.tsx", "**/*.d.ts"]
9 | }
10 |
--------------------------------------------------------------------------------
/packages/link/.npmignore:
--------------------------------------------------------------------------------
1 | **/*test.js
2 | **/*.stories.tsx
3 | **/*.stories.tsx
--------------------------------------------------------------------------------
/packages/link/index.d.ts:
--------------------------------------------------------------------------------
1 | export { default, getUrl, getTarget, AvLinkProps } from './types/Link';
2 |
--------------------------------------------------------------------------------
/packages/link/index.js:
--------------------------------------------------------------------------------
1 | export { default, getTarget, getUrl } from './src/Link';
2 |
--------------------------------------------------------------------------------
/packages/link/jest.config.js:
--------------------------------------------------------------------------------
1 | const global = require('../../jest/global-config');
2 |
3 | module.exports = {
4 | ...global,
5 | displayName: 'link',
6 | coverageDirectory: '../../coverage/link',
7 | };
8 |
--------------------------------------------------------------------------------
/packages/link/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.json",
3 | "include": ["."],
4 | "exclude": ["dist", "build", "node_modules"]
5 | }
6 |
--------------------------------------------------------------------------------
/packages/link/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "module": "commonjs",
6 | "types": ["jest", "node", "@testing-library/jest-dom"],
7 | "allowJs": true
8 | },
9 | "include": ["**/*.test.js", "**/*.test.ts", "**/*.test.tsx", "**/*.d.ts"]
10 | }
11 |
--------------------------------------------------------------------------------
/packages/link/types/Link.d.ts:
--------------------------------------------------------------------------------
1 | export interface AvLinkProps extends React.AnchorHTMLAttributes {
2 | target?: string;
3 | tag?: React.ReactType | string;
4 | onClick?: (event: React.SyntheticEvent, url: string) => void;
5 | href: string;
6 | loadApp?: boolean;
7 | rel?: string;
8 | }
9 |
10 | declare const AvLink: React.FC;
11 |
12 | declare function getUrl(url: string, loadApp: boolean, absolute: boolean): string;
13 |
14 | declare function getTarget(target: string): string;
15 |
16 | export { getUrl, getTarget };
17 |
18 | export default AvLink;
19 |
--------------------------------------------------------------------------------
/packages/list-group-item/.npmignore:
--------------------------------------------------------------------------------
1 | **/*test.js
2 | **/*.stories.tsx
--------------------------------------------------------------------------------
/packages/list-group-item/index.d.ts:
--------------------------------------------------------------------------------
1 | export { default, ListGroupItemProps } from './src/ListGroupItem';
2 | export { default as ListGroupItemStatus, ListGroupItemStatusProps } from './src/ListGroupItemStatus';
3 |
--------------------------------------------------------------------------------
/packages/list-group-item/index.js:
--------------------------------------------------------------------------------
1 | export { default } from './src/ListGroupItem';
2 | export { default as ListGroupItemStatus } from './src/ListGroupItemStatus';
3 |
--------------------------------------------------------------------------------
/packages/list-group-item/jest.config.js:
--------------------------------------------------------------------------------
1 | const global = require('../../jest/global-config');
2 |
3 | module.exports = {
4 | ...global,
5 | displayName: 'list-group-item',
6 | coverageDirectory: '../../coverage/list-group-item',
7 | };
8 |
--------------------------------------------------------------------------------
/packages/list-group-item/src/ListGroupItem.d.ts:
--------------------------------------------------------------------------------
1 | import { ListGroupItemProps as RsListGroupItemProps } from 'reactstrap';
2 |
3 | export interface ListGroupItemProps extends RsListGroupItemProps {
4 | borderColor?: string;
5 | className?: string;
6 | }
7 |
8 | declare const ListGroupItem: (props: ListGroupItemProps) => JSX.Element;
9 |
10 | export default ListGroupItem;
11 |
--------------------------------------------------------------------------------
/packages/list-group-item/src/ListGroupItem.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import PropTypes from 'prop-types';
3 | import { ListGroupItem as RsListGroupItem } from 'reactstrap';
4 |
5 | const ListGroupItem = ({ borderColor, className, ...props }) => {
6 | const classname = [className, borderColor].filter(Boolean).join(' ');
7 | return ;
8 | };
9 |
10 | ListGroupItem.propTypes = {
11 | /** The border color to display on the left of the item. Uses Availity UI Kit variants. Must be used within a `ListGroup` from `@availity/list-group` with the `cards` prop set to `true` */
12 | borderColor: PropTypes.string,
13 | /** The name of the class. */
14 | className: PropTypes.string,
15 | };
16 |
17 | export default ListGroupItem;
18 |
--------------------------------------------------------------------------------
/packages/list-group-item/src/ListGroupItemStatus.d.ts:
--------------------------------------------------------------------------------
1 | import { ListGroupItemProps as RsListGroupItemProps } from 'reactstrap';
2 |
3 | type BadgeType = {
4 | color?: string;
5 | text?: string;
6 | };
7 |
8 | export interface ListGroupItemStatusProps extends RsListGroupItemProps {
9 | titleContent?: React.ReactNode;
10 | children: React.ReactNode;
11 | color?: string;
12 | badge?: boolean | string | BadgeType;
13 | }
14 |
15 | declare const ListGroupItemStatus: (props: ListGroupItemStatusProps) => JSX.Element;
16 |
17 | export default ListGroupItemStatus;
18 |
--------------------------------------------------------------------------------
/packages/list-group-item/src/props.stories.mdx:
--------------------------------------------------------------------------------
1 | import { Meta, ArgTypes } from '@storybook/addon-docs';
2 | import { hidden_RsListGroupItem, hidden_RsListGroupItemStatus } from './ListGroupItem.stories';
3 |
4 |
5 |
6 | # Reactstrap ListGroupItem Props
7 |
8 | These props can be passed to the `ListGroupItem` component
9 |
10 |
11 |
12 | # Reactstrap ListGroupItemStatus Props
13 |
14 | These props can be passed to the `ListGroupItemStatus` component
15 |
16 |
17 |
--------------------------------------------------------------------------------
/packages/list-group-item/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.json",
3 | "include": ["."],
4 | "exclude": ["dist", "build", "node_modules"]
5 | }
6 |
--------------------------------------------------------------------------------
/packages/list-group-item/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "module": "commonjs",
6 | "types": ["jest", "node", "@testing-library/jest-dom"],
7 | "allowJs": true
8 | },
9 | "include": ["**/*.test.js", "**/*.test.ts", "**/*.test.tsx", "**/*.d.ts"]
10 | }
11 |
--------------------------------------------------------------------------------
/packages/list-group/.npmignore:
--------------------------------------------------------------------------------
1 | **/*test.js
2 | **/*.stories.tsx
--------------------------------------------------------------------------------
/packages/list-group/index.d.ts:
--------------------------------------------------------------------------------
1 | export { default, ListGroupProps } from './src/ListGroup';
2 |
--------------------------------------------------------------------------------
/packages/list-group/index.js:
--------------------------------------------------------------------------------
1 | export { default } from './src/ListGroup';
2 |
--------------------------------------------------------------------------------
/packages/list-group/jest.config.js:
--------------------------------------------------------------------------------
1 | const global = require('../../jest/global-config');
2 |
3 | module.exports = {
4 | ...global,
5 | displayName: 'list-group',
6 | coverageDirectory: '../../coverage/list-group',
7 | };
8 |
--------------------------------------------------------------------------------
/packages/list-group/src/ListGroup.d.ts:
--------------------------------------------------------------------------------
1 | import { ListGroupProps as RsListGroupProps } from 'reactstrap';
2 |
3 | export interface ListGroupProps extends RsListGroupProps {
4 | cards?: boolean;
5 | selectable?: boolean;
6 | className?: string;
7 | }
8 |
9 | declare const ListGroup: (props: ListGroupProps) => JSX.Element;
10 |
11 | export default ListGroup;
12 |
--------------------------------------------------------------------------------
/packages/list-group/src/props.stories.mdx:
--------------------------------------------------------------------------------
1 | import { Meta, ArgTypes } from '@storybook/addon-docs';
2 | import { hidden_RsListGroup } from './ListGroup.stories';
3 |
4 |
5 |
6 | # Reactstrap ListGroup Props
7 |
8 | These props can be passed to the `ListGroup` component
9 |
10 |
11 |
--------------------------------------------------------------------------------
/packages/list-group/tests/__snapshots__/ListGroup.test.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`ListGroup should render 1`] = `
4 |
9 | `;
10 |
11 | exports[`ListGroup should render cards 1`] = `
12 |
17 | `;
18 |
19 | exports[`ListGroup should render selectable 1`] = `
20 |
25 | `;
26 |
27 | exports[`ListGroup should render selectable cards 1`] = `
28 |
33 | `;
34 |
--------------------------------------------------------------------------------
/packages/list-group/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.json",
3 | "include": ["."],
4 | "exclude": ["dist", "build", "node_modules"]
5 | }
6 |
--------------------------------------------------------------------------------
/packages/list-group/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "module": "commonjs",
6 | "types": ["jest", "node", "@testing-library/jest-dom"],
7 | "allowJs": true
8 | },
9 | "include": ["**/*.test.js", "**/*.test.ts", "**/*.test.tsx", "**/*.d.ts"]
10 | }
11 |
--------------------------------------------------------------------------------
/packages/mock/README.md:
--------------------------------------------------------------------------------
1 | # Mock
2 |
3 | > Used for mocking xhr requests for storybook and gatsby docs
4 |
5 | Private Package not to be published
6 |
--------------------------------------------------------------------------------
/packages/mock/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@availity/mock",
3 | "version": "3.2.0",
4 | "private": true,
5 | "description": "Contains xhr mocks for storybook and gatsby docs",
6 | "keywords": [
7 | "react",
8 | "availity",
9 | "mock"
10 | ],
11 | "homepage": "https://github.com/Availity/availity-react/tree/master/packages/mock#readme",
12 | "bugs": {
13 | "url": "https://github.com/Availity/availity-react/issues"
14 | },
15 | "repository": {
16 | "type": "git",
17 | "url": "git+ssh://git@github.com/Availity/availity-react.git",
18 | "directory": "packages/mock"
19 | },
20 | "license": "MIT",
21 | "author": "Kyle Gray ",
22 | "main": "src/index.js",
23 | "dependencies": {
24 | "msw": "^0.36.8",
25 | "qs": "^6.14.0"
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/packages/mock/src/browser.ts:
--------------------------------------------------------------------------------
1 | import { setupWorker, rest } from 'msw';
2 |
3 | import { handlers } from './handlers';
4 |
5 | // Worker to use in the browser eg: Storybook
6 | const worker = setupWorker(...handlers);
7 |
8 | export { worker, rest };
9 |
--------------------------------------------------------------------------------
/packages/mock/src/data/custom-graphql.json:
--------------------------------------------------------------------------------
1 | {
2 | "customPagination": {
3 | "count": 3,
4 | "pageInfo": {
5 | "hasNextPage": false
6 | },
7 | "items": [
8 | {
9 | "id": 1,
10 | "value": "New York"
11 | },
12 | {
13 | "id": 2,
14 | "value": "Florida"
15 | },
16 | {
17 | "id": 3,
18 | "value": "Georgia"
19 | }
20 | ]
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/packages/mock/src/data/custom.json:
--------------------------------------------------------------------------------
1 | {
2 | "resources": [
3 | {
4 | "id": 1,
5 | "name": "Option 1",
6 | "value": "resource1"
7 | },
8 | {
9 | "id": 2,
10 | "name": "Option 2",
11 | "value": "resource2"
12 | },
13 | {
14 | "id": 3,
15 | "name": "Option 3",
16 | "value": "resource3"
17 | }
18 | ]
19 | }
20 |
--------------------------------------------------------------------------------
/packages/mock/src/data/features.json:
--------------------------------------------------------------------------------
1 | ["AV-1234", "AV-2345", "AV-3456", "AV-4567", "AV-5678", "AV-6789"]
2 |
--------------------------------------------------------------------------------
/packages/mock/src/data/permissions.json:
--------------------------------------------------------------------------------
1 | {
2 | "permissions": [
3 | {
4 | "id": "123",
5 | "description": "Do the thing",
6 | "organizations": [
7 | {
8 | "id": "999",
9 | "customerId": "999",
10 | "name": "Test",
11 | "resources": [
12 | {
13 | "id": "111"
14 | }
15 | ]
16 | }
17 | ]
18 | },
19 | {
20 | "id": "987",
21 | "description": "Do the other thing",
22 | "organizations": [
23 | {
24 | "id": "111",
25 | "customerId": "111",
26 | "name": "Example",
27 | "resources": [
28 | {
29 | "id": "999"
30 | }
31 | ]
32 | }
33 | ]
34 | }
35 | ]
36 | }
37 |
--------------------------------------------------------------------------------
/packages/mock/src/data/region.json:
--------------------------------------------------------------------------------
1 | {
2 | "totalCount": 1,
3 | "count": 1,
4 | "offset": 0,
5 | "limit": 50,
6 | "links": {
7 | "self": {
8 | "href": "https://apps.availity.com/api/sdk/platform/v1/regions?currentlySelected=true"
9 | },
10 | "user": {
11 | "href": "https://apps.availity.com/api/sdk/platform/v1/users/aka123456789"
12 | }
13 | },
14 | "regions": [
15 | {
16 | "links": {
17 | "self": {
18 | "href": "https://apps.availity.com/api/sdk/platform/v1/regions/FL"
19 | }
20 | },
21 | "id": "FL",
22 | "value": "Florida",
23 | "currentlySelected": true
24 | }
25 | ]
26 | }
27 |
--------------------------------------------------------------------------------
/packages/mock/src/data/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "settings": [
3 | {
4 | "favorites": [
5 | {
6 | "id": "6qadjDnjjq",
7 | "pos": 0
8 | },
9 | {
10 | "id": "S1gCq-eiVL",
11 | "pos": 1
12 | },
13 | {
14 | "id": "SygihlP82f",
15 | "pos": 5
16 | },
17 | {
18 | "id": "0D7iZKebje",
19 | "pos": 6
20 | },
21 | {
22 | "id": "SkwD2VFjXrf",
23 | "pos": 11
24 | },
25 | {
26 | "id": "ryec0RrOL7",
27 | "pos": 12
28 | },
29 | {
30 | "id": "Sei-7q6aMw",
31 | "pos": 13
32 | },
33 | {
34 | "id": "a-retired-app",
35 | "pos": 15
36 | }
37 | ]
38 | }
39 | ]
40 | }
41 |
--------------------------------------------------------------------------------
/packages/mock/src/data/user.json:
--------------------------------------------------------------------------------
1 | {
2 | "links": {
3 | "regions": {
4 | "href": "https://apps.availity.com/api/sdk/platform/v1/regions?userId=aka123456789"
5 | },
6 | "organizations": {
7 | "href": "https://apps.availity.com/api/sdk/platform/v1/organizations?userId=aka123456789"
8 | },
9 | "self": {
10 | "href": "https://apps.availity.com/api/sdk/platform/v1/users/aka123456789"
11 | }
12 | },
13 | "id": "aka123456789",
14 | "userId": "rsanchez",
15 | "akaname": "aka123456789",
16 | "lastName": "Sanchez",
17 | "firstName": "Rick",
18 | "email": "rick.sanchez@test.com",
19 | "userValidated": false,
20 | "userHasSecurityException": false,
21 | "userLatestVerifyStatusCode": "7",
22 | "currentRegion": "FL",
23 | "createDate": "2018-07-30T15:23:45.000+0000",
24 | "lastUpdateDate": "2021-11-02T17:49:30.000+0000"
25 | }
26 |
--------------------------------------------------------------------------------
/packages/mock/src/server.ts:
--------------------------------------------------------------------------------
1 | import { setupServer } from 'msw/node';
2 |
3 | import { handlers } from './handlers';
4 |
5 | // Server to run from terminal eg: jest tests
6 | // eslint-disable-next-line import/prefer-default-export
7 | export const server = setupServer(...handlers);
8 |
--------------------------------------------------------------------------------
/packages/page-header/.npmignore:
--------------------------------------------------------------------------------
1 | **/*test.js
2 | **/*.stories.tsx
--------------------------------------------------------------------------------
/packages/page-header/index.d.ts:
--------------------------------------------------------------------------------
1 | export { default } from './types/PageHeader';
2 | export * from './types/PageHeader';
3 |
--------------------------------------------------------------------------------
/packages/page-header/index.js:
--------------------------------------------------------------------------------
1 | export { default } from './src/PageHeader';
2 |
--------------------------------------------------------------------------------
/packages/page-header/jest.config.js:
--------------------------------------------------------------------------------
1 | const global = require('../../jest/global-config');
2 |
3 | module.exports = {
4 | ...global,
5 | displayName: 'page-header',
6 | coverageDirectory: '../../coverage/page-header',
7 | };
8 |
--------------------------------------------------------------------------------
/packages/page-header/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.json",
3 | "include": ["."],
4 | "exclude": ["dist", "build", "node_modules"]
5 | }
6 |
--------------------------------------------------------------------------------
/packages/page-header/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "module": "commonjs",
6 | "types": ["jest", "node", "@testing-library/jest-dom"],
7 | "allowJs": true
8 | },
9 | "include": ["**/*.test.js", "**/*.test.ts", "**/*.test.tsx", "**/*.d.ts"]
10 | }
11 |
--------------------------------------------------------------------------------
/packages/pagination/.npmignore:
--------------------------------------------------------------------------------
1 | **/*test.js
2 | **/*.stories.tsx
--------------------------------------------------------------------------------
/packages/pagination/jest.config.js:
--------------------------------------------------------------------------------
1 | const global = require('../../jest/global-config');
2 |
3 | module.exports = {
4 | ...global,
5 | displayName: 'pagination',
6 | coverageDirectory: '../../coverage/pagination',
7 | };
8 |
--------------------------------------------------------------------------------
/packages/pagination/src/props.stories.mdx:
--------------------------------------------------------------------------------
1 | import { Meta, ArgTypes } from '@storybook/addon-docs';
2 | import {
3 | hidden_RsPagination,
4 | hidden_PaginationContent,
5 | hidden_PaginationControls,
6 | hidden_AvResourcePagination,
7 | } from './Pagination.stories';
8 |
9 |
10 |
11 | # PaginationContent Props
12 |
13 | These props can be passed to the `PaginationContent` component
14 |
15 |
16 |
17 | # PaginationControls Props
18 |
19 | These props can be passed to the `PaginationControls` component
20 |
21 |
22 |
23 | # AvResourcePagination Props
24 |
25 | These props can be passed to the `AvResourcePagination` component
26 |
27 |
28 |
--------------------------------------------------------------------------------
/packages/pagination/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.json",
3 | "include": ["."],
4 | "exclude": ["dist", "build", "node_modules"]
5 | }
6 |
--------------------------------------------------------------------------------
/packages/pagination/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "module": "commonjs",
6 | "types": ["jest", "node", "@testing-library/jest-dom"],
7 | "allowJs": true
8 | },
9 | "include": ["**/*.test.js", "**/*.test.ts", "**/*.test.tsx", "**/*.d.ts"]
10 | }
11 |
--------------------------------------------------------------------------------
/packages/payer-logo/.npmignore:
--------------------------------------------------------------------------------
1 | **/*test.js
2 | **/*.stories.tsx
--------------------------------------------------------------------------------
/packages/payer-logo/index.d.ts:
--------------------------------------------------------------------------------
1 | export { default, PayerLogoProps, getLogo } from './src/PayerLogo';
2 |
--------------------------------------------------------------------------------
/packages/payer-logo/index.js:
--------------------------------------------------------------------------------
1 | export { default, getLogo } from './src/PayerLogo';
2 |
--------------------------------------------------------------------------------
/packages/payer-logo/jest.config.js:
--------------------------------------------------------------------------------
1 | const global = require('../../jest/global-config');
2 |
3 | module.exports = {
4 | ...global,
5 | displayName: 'payer-logo',
6 | coverageDirectory: '../../coverage/payer-logo',
7 | };
8 |
--------------------------------------------------------------------------------
/packages/payer-logo/src/PayerLogo.d.ts:
--------------------------------------------------------------------------------
1 | export interface PayerLogoProps {
2 | spaceId?: string;
3 | payerId?: string;
4 | clientId: string;
5 | }
6 |
7 | declare function getLogo(spaceId?: string, payerId?: string, clientId?: string): Promise;
8 |
9 | declare const PayerLogo: (props: PayerLogoProps) => JSX.Element | null;
10 |
11 | export default PayerLogo;
12 |
13 | export { getLogo };
14 |
--------------------------------------------------------------------------------
/packages/payer-logo/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.json",
3 | "include": ["."],
4 | "exclude": ["dist", "build", "node_modules"]
5 | }
6 |
--------------------------------------------------------------------------------
/packages/payer-logo/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "module": "commonjs",
6 | "types": ["jest", "node", "@testing-library/jest-dom"],
7 | "allowJs": true
8 | },
9 | "include": ["**/*.test.js", "**/*.test.ts", "**/*.test.tsx", "**/*.d.ts"]
10 | }
11 |
--------------------------------------------------------------------------------
/packages/phone/.npmignore:
--------------------------------------------------------------------------------
1 | **/*test.js
2 | **/*.stories.tsx
--------------------------------------------------------------------------------
/packages/phone/index.d.ts:
--------------------------------------------------------------------------------
1 | export { default as Phone, PhoneProps } from './src/Phone';
2 | export { default as validatePhone } from './src/validatePhone';
3 |
4 | declare module 'yup' {
5 | import { AnyObject, Maybe } from 'yup/lib/types';
6 | import BaseSchema from 'yup/lib/schema';
7 |
8 | interface StringSchema<
9 | TType extends Maybe = string | undefined,
10 | TContext extends AnyObject = AnyObject,
11 | TOut extends TType = TType
12 | > extends BaseSchema {
13 | validatePhone(message?: string, strict?: boolean, country?: string): StringSchema;
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/packages/phone/index.js:
--------------------------------------------------------------------------------
1 | export { default as Phone } from './src/Phone';
2 | export { default as validatePhone } from './src/validatePhone';
3 |
--------------------------------------------------------------------------------
/packages/phone/jest.config.js:
--------------------------------------------------------------------------------
1 | const global = require('../../jest/global-config');
2 |
3 | module.exports = {
4 | ...global,
5 | displayName: 'phone',
6 | coverageDirectory: '../../coverage/phone',
7 | };
8 |
--------------------------------------------------------------------------------
/packages/phone/src/Phone.d.ts:
--------------------------------------------------------------------------------
1 | import { FieldProps } from '@availity/form';
2 |
3 | interface ExtensionProps extends FieldProps {
4 | name: string;
5 | id?: string;
6 | extColProps?: object;
7 | }
8 |
9 | export interface PhoneProps extends FieldProps {
10 | name: string;
11 | id?: string;
12 | country?: string;
13 | showExtension?: boolean;
14 | phoneColProps?: object;
15 | extProps?: ExtensionProps;
16 | formatInitialValue?: boolean;
17 | }
18 |
19 | declare const Phone: (props: PhoneProps) => JSX.Element;
20 |
21 | export default Phone;
22 |
--------------------------------------------------------------------------------
/packages/phone/src/validatePhone.js:
--------------------------------------------------------------------------------
1 | import { addMethod, string } from 'yup';
2 | import { AsYouType } from 'libphonenumber-js';
3 |
4 | export default function validatePhone(msg, strict = false, country = 'US') {
5 | return this.test({
6 | name: 'validatePhone',
7 | exclusive: true,
8 | message: msg || 'This field is invalid.',
9 | test(phoneValue) {
10 | if (!phoneValue) return true;
11 |
12 | const asYouType = new AsYouType(country);
13 | asYouType.input(phoneValue);
14 | if (strict) {
15 | return asYouType.getNumber() && asYouType.getNumber().isValid();
16 | }
17 | return asYouType.getNumber() && asYouType.getNumber().isPossible();
18 | },
19 | });
20 | }
21 |
22 | addMethod(string, 'validatePhone', validatePhone);
23 |
--------------------------------------------------------------------------------
/packages/phone/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.json",
3 | "include": ["."],
4 | "exclude": ["dist", "build", "node_modules"]
5 | }
6 |
--------------------------------------------------------------------------------
/packages/phone/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "module": "commonjs",
6 | "types": ["jest", "node", "@testing-library/jest-dom"],
7 | "allowJs": true
8 | },
9 | "include": ["**/*.test.js", "**/*.test.ts", "**/*.test.tsx", "**/*.d.ts"]
10 | }
11 |
--------------------------------------------------------------------------------
/packages/progress/.npmignore:
--------------------------------------------------------------------------------
1 | **/*test.js
2 | **/*.stories.tsx
--------------------------------------------------------------------------------
/packages/progress/jest.config.js:
--------------------------------------------------------------------------------
1 | const global = require('../../jest/global-config');
2 |
3 | module.exports = {
4 | ...global,
5 | displayName: 'progress',
6 | coverageDirectory: '../../coverage/progress',
7 | };
8 |
--------------------------------------------------------------------------------
/packages/progress/src/Progress.stories.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { StoryObj } from '@storybook/react';
3 | import Progress from '.';
4 | // import README from '../README.md';
5 |
6 | export default {
7 | title: 'Components/Progress',
8 | component: Progress,
9 | };
10 |
11 | export const _Default: StoryObj = {
12 | render: ({ value, max, animated, striped, complete, color }) => (
13 |
14 |
{Math.round((value / max) * 100)}% Complete
15 |
16 |
17 | ),
18 | args: {
19 | value: 50,
20 | max: 100,
21 | animated: false,
22 | striped: false,
23 | complete: false,
24 | color: 'success',
25 | },
26 | };
27 |
--------------------------------------------------------------------------------
/packages/progress/src/index.ts:
--------------------------------------------------------------------------------
1 | export { default } from './Progress';
2 | export type { ProgressProps } from './Progress';
3 |
--------------------------------------------------------------------------------
/packages/progress/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.json",
3 | "include": ["."],
4 | "exclude": ["dist", "build", "node_modules"]
5 | }
6 |
--------------------------------------------------------------------------------
/packages/progress/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "module": "commonjs",
6 | "types": ["jest", "node", "@testing-library/jest-dom"],
7 | "allowJs": true
8 | },
9 | "include": ["**/*.test.js", "**/*.test.ts", "**/*.test.tsx", "**/*.d.ts"]
10 | }
11 |
--------------------------------------------------------------------------------
/packages/reactstrap-validation-date/.npmignore:
--------------------------------------------------------------------------------
1 | **/*test.js
2 | **/*.stories.tsx
--------------------------------------------------------------------------------
/packages/reactstrap-validation-date/index.d.ts:
--------------------------------------------------------------------------------
1 | export { default, default as AvDate } from './types/AvDate';
2 | export { default as AvDateField } from './types/AvDateField';
3 | export { default as AvDateRange } from './types/AvDateRange';
4 | export { default as AvDateRangeField } from './types/AvDateRangeField';
5 |
--------------------------------------------------------------------------------
/packages/reactstrap-validation-date/index.js:
--------------------------------------------------------------------------------
1 | export { default, default as AvDate } from './src/AvDate';
2 | export { default as AvDateField } from './src/AvDateField';
3 | export { default as AvDateRange } from './src/AvDateRange';
4 | export { default as AvDateRangeField } from './src/AvDateRangeField';
5 |
--------------------------------------------------------------------------------
/packages/reactstrap-validation-date/jest.config.js:
--------------------------------------------------------------------------------
1 | const global = require('../../jest/global-config');
2 |
3 | module.exports = {
4 | ...global,
5 | displayName: 'reactstrap-validation-date',
6 | coverageDirectory: '../../coverage/reactstrap-validation-date',
7 | };
8 |
--------------------------------------------------------------------------------
/packages/reactstrap-validation-date/polyfills/index.js:
--------------------------------------------------------------------------------
1 | import './padStart';
2 |
--------------------------------------------------------------------------------
/packages/reactstrap-validation-date/stories/props.stories.mdx:
--------------------------------------------------------------------------------
1 | import { Meta, ArgTypes } from '@storybook/addon-docs';
2 | import { hidden_AvDateField, hidden_AvDateRange, hidden_AvDateRangeField } from './avdate.stories';
3 |
4 |
5 |
6 | # AvDateField
7 |
8 |
9 |
10 | # AvDateRange
11 |
12 |
13 |
14 | # AvDateRangeField
15 |
16 |
17 |
--------------------------------------------------------------------------------
/packages/reactstrap-validation-date/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.json",
3 | "include": ["."],
4 | "exclude": ["dist", "build", "node_modules"]
5 | }
6 |
--------------------------------------------------------------------------------
/packages/reactstrap-validation-date/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "module": "commonjs",
6 | "types": ["jest", "node", "@testing-library/jest-dom"],
7 | "allowJs": true
8 | },
9 | "include": ["**/*.test.js", "**/*.test.ts", "**/*.test.tsx", "**/*.d.ts"]
10 | }
11 |
--------------------------------------------------------------------------------
/packages/reactstrap-validation-date/types/AvDate.d.ts:
--------------------------------------------------------------------------------
1 | import { SingleDatePickerShape } from '@availity/react-dates';
2 | import { AvInput } from './AvInput';
3 |
4 | export interface AvDateProps extends AvInput, SingleDatePickerShape {
5 | id: any;
6 | datepicker?: boolean;
7 | }
8 |
9 | declare const AvDate: React.ComponentType;
10 |
11 | export default AvDate;
12 |
--------------------------------------------------------------------------------
/packages/reactstrap-validation-date/types/AvDateField.d.ts:
--------------------------------------------------------------------------------
1 | import { AvDateProps } from './AvDate';
2 |
3 | export interface AvDateFieldProps extends AvDateProps {
4 | label?: React.ReactNode;
5 | labelHidden?: boolean;
6 | disabled?: boolean;
7 | readOnly?: boolean;
8 | inputClass?: string;
9 | labelClass?: string;
10 | helpMessage?: string | object;
11 | errorMessage?: string | object;
12 | labelAttrs?: React.HTMLAttributes;
13 | groupAttrs?: object;
14 | grid?: object;
15 | children?: React.ReactType;
16 | name: string;
17 | size?: string | number;
18 | }
19 |
20 | declare const AvDateField: React.ComponentType;
21 |
22 | export default AvDateField;
23 |
--------------------------------------------------------------------------------
/packages/reactstrap-validation-date/types/AvDateRange.d.ts:
--------------------------------------------------------------------------------
1 | import { DateRangePicker } from '@availity/react-dates';
2 | import { AvInput } from './AvInput';
3 |
4 | export interface AvDateRangeProps extends AvInput, DateRangePicker {
5 | start?: AvInput;
6 | end?: AvInput;
7 | validate?: object;
8 | type?: string;
9 | disabled?: boolean;
10 | distance?: object;
11 | defaultValues?: object;
12 | theme?: object;
13 | hideIcon?: boolean;
14 | autoSync?: boolean;
15 | }
16 |
17 | declare const AvDateRange: React.ComponentType;
18 |
19 | export default AvDateRange;
20 |
--------------------------------------------------------------------------------
/packages/reactstrap-validation-date/types/AvDateRangeField.d.ts:
--------------------------------------------------------------------------------
1 | import { AvDateRangeProps } from './AvDateRange';
2 |
3 | export interface AvDateRangeFieldProps extends AvDateRangeProps {
4 | label?: React.ReactNode;
5 | labelHidden?: boolean;
6 | readOnly?: boolean;
7 | inputClass?: string;
8 | labelClass?: string;
9 | helpMessage?: string | object;
10 | errorMessage?: string | object;
11 | // todo - make these more defined shapes
12 | labelAttrs?: object;
13 | groupAttrs?: object;
14 | grid?: object;
15 | size?: string | number;
16 | name: string;
17 | }
18 |
19 | declare const AvDateRangeField: React.ComponentType;
20 |
21 | export default AvDateRangeField;
22 |
--------------------------------------------------------------------------------
/packages/reactstrap-validation-date/types/AvInput.d.ts:
--------------------------------------------------------------------------------
1 | export type LimitType = {
2 | value: number;
3 | units: number;
4 | };
5 | export interface AvInput extends React.HTMLAttributes {
6 | name: string;
7 | validationEvent?:
8 | | ''
9 | | 'onInput'
10 | | 'onChange'
11 | | 'onBlur'
12 | | 'onFocus'
13 | | Array<'onInput' | 'onChange' | 'onBlur' | 'onFocus'>;
14 | validate?: object;
15 | value?: any;
16 | defaultValue?: any;
17 | min?: string | LimitType;
18 | max?: string | LimitType;
19 | trueValue?: any;
20 | falseValue?: any;
21 | checked?: boolean;
22 | defaultChecked?: boolean;
23 | state?: boolean;
24 | multiple?: boolean;
25 | disabled?: boolean;
26 | readOnly?: boolean;
27 | }
28 |
--------------------------------------------------------------------------------
/packages/reactstrap-validation-select/.npmignore:
--------------------------------------------------------------------------------
1 | **/*test.js
2 | **/*.stories.tsx
--------------------------------------------------------------------------------
/packages/reactstrap-validation-select/index.d.ts:
--------------------------------------------------------------------------------
1 | export { default } from './types/AvSelect';
2 | export { default as AvSelectField } from './types/AvSelectField';
3 | export { default as AvResourceSelect } from './types/AvResourceSelect';
4 |
--------------------------------------------------------------------------------
/packages/reactstrap-validation-select/index.js:
--------------------------------------------------------------------------------
1 | export { default } from './src/AvSelect';
2 | export { default as AvSelectField } from './src/AvSelectField';
3 | export { default as AvResourceSelect } from './src/AvResourceSelect';
4 |
--------------------------------------------------------------------------------
/packages/reactstrap-validation-select/jest.config.js:
--------------------------------------------------------------------------------
1 | const global = require('../../jest/global-config');
2 |
3 | module.exports = {
4 | ...global,
5 | displayName: 'reactstrap-validation-select',
6 | coverageDirectory: '../../coverage/reactstrap-validation-select',
7 | };
8 |
--------------------------------------------------------------------------------
/packages/reactstrap-validation-select/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.json",
3 | "include": ["."],
4 | "exclude": ["dist", "build", "node_modules"]
5 | }
6 |
--------------------------------------------------------------------------------
/packages/reactstrap-validation-select/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "module": "commonjs",
6 | "types": ["jest", "node", "@testing-library/jest-dom"],
7 | "allowJs": true
8 | },
9 | "include": ["**/*.test.js", "**/*.test.ts", "**/*.test.tsx", "**/*.d.ts"]
10 | }
11 |
--------------------------------------------------------------------------------
/packages/reactstrap-validation-select/types/AvInput.d.ts:
--------------------------------------------------------------------------------
1 | export type AvInput = {
2 | name: string;
3 | validationEvent?:
4 | | ''
5 | | 'onInput'
6 | | 'onChange'
7 | | 'onBlur'
8 | | 'onFocus'
9 | | Array<'onInput' | 'onChange' | 'onBlur' | 'onFocus'>;
10 | validate?: object;
11 | value?: any;
12 | defaultValue?: any;
13 | trueValue?: any;
14 | falseValue?: any;
15 | checked?: boolean;
16 | defaultChecked?: boolean;
17 | state?: boolean;
18 | type?: string;
19 | multiple?: boolean;
20 | disabled?: boolean;
21 | readOnly?: boolean;
22 | onKeyUp?: Function;
23 | onInput?: Function;
24 | onFocus?: Function;
25 | onBlur?: Function;
26 | onChange?: Function;
27 | onReset?: Function;
28 | };
29 |
--------------------------------------------------------------------------------
/packages/reactstrap-validation-select/types/AvSelect.d.ts:
--------------------------------------------------------------------------------
1 | import { AvInput } from './AvInput';
2 |
3 | interface AriaFeedbackType {
4 | feedbackId: string;
5 | errorMessage: string;
6 | }
7 |
8 | export interface AvSelectProps extends AvInput {
9 | options?: Array;
10 | loadOptions?: Function;
11 | raw?: boolean;
12 | autofill?: boolean | object;
13 | ariaFeedback?: AriaFeedbackType;
14 | }
15 |
16 | declare const AvSelect: React.ComponentType;
17 |
18 | export default AvSelect;
19 |
--------------------------------------------------------------------------------
/packages/reactstrap-validation-select/types/AvSelectField.d.ts:
--------------------------------------------------------------------------------
1 | import { ComponentType, ReactNode } from 'react';
2 | import { AvSelectProps } from './AvSelect';
3 |
4 | export interface AvSelectFieldProps extends AvSelectProps {
5 | label?: ReactNode;
6 | labelHidden?: boolean;
7 | id?: string;
8 | feedbackClass?: string;
9 | groupClass?: string;
10 | labelClass?: string;
11 | name: string;
12 | helpMessage?: ReactNode;
13 | }
14 |
15 | declare const AvSelectField: ComponentType;
16 |
17 | export default AvSelectField;
18 |
--------------------------------------------------------------------------------
/packages/select/.npmignore:
--------------------------------------------------------------------------------
1 | **/*test.js
2 | **/*.stories.tsx
--------------------------------------------------------------------------------
/packages/select/jest.config.js:
--------------------------------------------------------------------------------
1 | const global = require('../../jest/global-config');
2 |
3 | module.exports = {
4 | ...global,
5 | displayName: 'select',
6 | coverageDirectory: '../../coverage/select',
7 | };
8 |
--------------------------------------------------------------------------------
/packages/select/src/AvRegionSelect.d.ts:
--------------------------------------------------------------------------------
1 | import type { GroupBase } from 'react-select';
2 |
3 | import type { ResourceSelectProps } from './ResourceSelect';
4 |
5 | type PrebuiltResourceSelectProps<
6 | Option,
7 | IsMulti extends boolean,
8 | Group extends GroupBase = GroupBase
9 | > = Omit, 'resource'>;
10 |
11 | type Region = {
12 | id: string;
13 | value: string;
14 | };
15 |
16 | declare const AvRegionSelect: <
17 | Option = Region,
18 | IsMulti extends boolean = boolean,
19 | Group extends GroupBase = GroupBase
20 | >(
21 | props: PrebuiltResourceSelectProps & { defaultToCurrentRegion?: boolean }
22 | ) => JSX.Element;
23 |
24 | export default AvRegionSelect;
25 |
--------------------------------------------------------------------------------
/packages/select/src/SelectField.d.ts:
--------------------------------------------------------------------------------
1 | import type { ReactNode } from 'react';
2 | import type { GroupBase } from 'react-select';
3 |
4 | import type { SelectProps } from './Select';
5 |
6 | export type SelectFieldProps = GroupBase > = {
7 | feedbackClass?: string;
8 | groupClass?: string;
9 | helpId?: string;
10 | label?: ReactNode;
11 | labelClass?: string;
12 | labelHidden?: boolean;
13 | required?: boolean;
14 | isHelpVideoType?: boolean;
15 | } & SelectProps ;
16 |
17 | declare const SelectField: = GroupBase >(
18 | props: SelectFieldProps
19 | ) => JSX.Element;
20 |
21 | export default SelectField;
22 |
--------------------------------------------------------------------------------
/packages/select/src/index.d.ts:
--------------------------------------------------------------------------------
1 | export { default, SelectProps, selectStyles, SelectStyleArgs } from './Select';
2 | export { default as SelectField, SelectFieldProps } from './SelectField';
3 | export { default as ResourceSelect, ResourceSelectProps } from './ResourceSelect';
4 | export * from './resources';
5 |
--------------------------------------------------------------------------------
/packages/select/src/index.js:
--------------------------------------------------------------------------------
1 | export { default, selectStyles } from './Select';
2 | export { default as SelectField } from './SelectField';
3 | export { default as ResourceSelect } from './ResourceSelect';
4 | export * from './resources';
5 |
--------------------------------------------------------------------------------
/packages/select/stories/props.stories.mdx:
--------------------------------------------------------------------------------
1 | import { Meta, ArgTypes } from '@storybook/addon-docs';
2 | import { hidden_SelectField } from './select.stories';
3 |
4 |
5 |
6 | # SelectField Props
7 |
8 | These props can be passed to the `SelectField` component
9 |
10 |
11 |
--------------------------------------------------------------------------------
/packages/select/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.json",
3 | "include": ["."],
4 | "exclude": ["dist", "build", "node_modules"]
5 | }
6 |
--------------------------------------------------------------------------------
/packages/select/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "module": "commonjs",
6 | "types": ["jest", "node", "@testing-library/jest-dom"],
7 | "allowJs": true
8 | },
9 | "include": ["**/*.test.js", "**/*.test.ts", "**/*.test.tsx", "**/*.d.ts"]
10 | }
11 |
--------------------------------------------------------------------------------
/packages/spaces/.npmignore:
--------------------------------------------------------------------------------
1 | **/*test.js
2 | **/*.stories.tsx
--------------------------------------------------------------------------------
/packages/spaces/jest.config.js:
--------------------------------------------------------------------------------
1 | const global = require('../../jest/global-config');
2 |
3 | module.exports = {
4 | ...global,
5 | displayName: 'spaces',
6 | coverageDirectory: '../../coverage/spaces',
7 | };
8 |
--------------------------------------------------------------------------------
/packages/spaces/src/Loader.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import PropTypes from 'prop-types';
3 | import Skeleton from 'react-loading-skeleton';
4 |
5 | export const skeletonPropType = PropTypes.shape({
6 | width: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
7 | height: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
8 | });
9 |
10 | const Loader = ({ skeletonProps, ...rest }) => (
11 |
12 |
13 |
14 | );
15 | Loader.propTypes = {
16 | skeletonProps: skeletonPropType,
17 | };
18 | Loader.defaultProps = {
19 | skeletonProps: {
20 | height: '100%',
21 | },
22 | };
23 |
24 | export default Loader;
25 |
--------------------------------------------------------------------------------
/packages/spaces/styles.scss:
--------------------------------------------------------------------------------
1 | *[role='link'] {
2 | color: #2261b5;
3 | text-decoration: none;
4 | background-color: transparent;
5 | &:hover {
6 | color: #0056b3;
7 | text-decoration: underline;
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/packages/spaces/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.json",
3 | "include": ["."],
4 | "exclude": ["dist", "build", "node_modules"]
5 | }
6 |
--------------------------------------------------------------------------------
/packages/spaces/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "module": "commonjs",
6 | "types": ["jest", "node", "@testing-library/jest-dom"],
7 | "allowJs": true
8 | },
9 | "include": ["**/*.test.js", "**/*.test.ts", "**/*.d.ts"]
10 | }
11 |
--------------------------------------------------------------------------------
/packages/spaces/types/SpacesAgreement.d.ts:
--------------------------------------------------------------------------------
1 | export interface SpacesAgreementProps {
2 | spaceId?: string;
3 | markdown?: boolean;
4 | }
5 |
6 | declare const SpacesAgreement: React.FC;
7 |
8 | export default SpacesAgreement;
9 |
--------------------------------------------------------------------------------
/packages/spaces/types/SpacesDisclaimer.d.ts:
--------------------------------------------------------------------------------
1 | export interface SpacesDisclaimerProps {
2 | spaceId?: string;
3 | styled?: boolean;
4 | markdown?: boolean;
5 | }
6 |
7 | declare const SpacesDisclaimer: React.FC;
8 |
9 | export default SpacesDisclaimer;
10 |
--------------------------------------------------------------------------------
/packages/spaces/types/SpacesGhostText.d.ts:
--------------------------------------------------------------------------------
1 | export interface SpacesGhostTextProps {
2 | spaceId?: string;
3 | }
4 |
5 | declare const SpacesGhostText: React.FC;
6 |
7 | export default SpacesGhostText;
8 |
--------------------------------------------------------------------------------
/packages/spaces/types/SpacesImage.d.ts:
--------------------------------------------------------------------------------
1 | type SkeletonType = {
2 | width?: string | number;
3 | height?: string | number;
4 | };
5 |
6 | export interface SpacesImageProps {
7 | spaceId?: string;
8 | payerId?: string;
9 | imageType: string;
10 | skeletonProps?: SkeletonType;
11 | }
12 |
13 | declare const SpacesImage: React.FC;
14 |
15 | export default SpacesImage;
16 |
--------------------------------------------------------------------------------
/packages/spaces/types/helpers.d.ts:
--------------------------------------------------------------------------------
1 | // eslint-disable-next-line import/prefer-default-export
2 | export function normalizeSpaces(spaces: object[]): object[];
3 | const updateTopApps: (
4 | space: { configurationId?: string | null; type?: string | null },
5 | akaname: string
6 | ) => Promise;
7 |
--------------------------------------------------------------------------------
/packages/spaces/types/linkHandlers.d.ts:
--------------------------------------------------------------------------------
1 | import { Space } from './Spaces';
2 |
3 | export function openLink(
4 | space: Space,
5 | settings: {
6 | akaname: string;
7 | payerSpaceId: string;
8 | }
9 | ): Promise;
10 |
11 | export function openLinkWithSso(
12 | space: Space,
13 | settings: {
14 | akaname: string;
15 | clientId: string;
16 | payerSpaceId: string;
17 | ssoParams?: Record;
18 | }
19 | ): Promise;
20 |
--------------------------------------------------------------------------------
/packages/step-wizard/.npmignore:
--------------------------------------------------------------------------------
1 | **/*test.js
2 | **/*.stories.tsx
--------------------------------------------------------------------------------
/packages/step-wizard/index.d.ts:
--------------------------------------------------------------------------------
1 | export { default } from './types/Wizard';
2 | export { default as WizardStep } from './types/WizardStep';
3 | export { default as WizardStepBadge } from './types/WizardStepBadge';
4 | export { default as WizardStepTitle } from './types/WizardStepTitle';
5 |
--------------------------------------------------------------------------------
/packages/step-wizard/index.js:
--------------------------------------------------------------------------------
1 | export { default } from './src/Wizard';
2 | export { default as WizardStep } from './src/WizardStep';
3 | export { default as WizardStepBadge } from './src/WizardStepBadge';
4 | export { default as WizardStepTitle } from './src/WizardStepTitle';
5 |
--------------------------------------------------------------------------------
/packages/step-wizard/jest.config.js:
--------------------------------------------------------------------------------
1 | const global = require('../../jest/global-config');
2 |
3 | module.exports = {
4 | ...global,
5 | displayName: 'step-wizard',
6 | coverageDirectory: '../../coverage/step-wizard',
7 | };
8 |
--------------------------------------------------------------------------------
/packages/step-wizard/src/WizardStepBadge.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import PropTypes from 'prop-types';
3 | import classNames from 'classnames';
4 |
5 | const WizardStepBadge = ({ tag: Tag, className: classes, children, ...rest }) => (
6 |
7 | {children}
8 |
9 | );
10 |
11 | WizardStepBadge.defaultProps = {
12 | tag: 'span',
13 | };
14 |
15 | WizardStepBadge.propTypes = {
16 | /** Additional classes that should be applied to agreement. * */
17 | className: PropTypes.string,
18 | /** Children can be a react child. * */
19 | children: PropTypes.node,
20 | /** The actual name of the tag being generated. Defaults to 'a' or 'div'. * */
21 | tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
22 | };
23 |
24 | export default WizardStepBadge;
25 |
--------------------------------------------------------------------------------
/packages/step-wizard/src/WizardStepTitle.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import PropTypes from 'prop-types';
3 | import classNames from 'classnames';
4 |
5 | const WizardStepTitle = ({ tag: Tag, className: classes, children, ...rest }) => (
6 |
7 | {children}
8 |
9 | );
10 |
11 | WizardStepTitle.defaultProps = {
12 | tag: 'span',
13 | };
14 |
15 | WizardStepTitle.propTypes = {
16 | /** Additional classes that should be applied to agreement. * */
17 | className: PropTypes.string,
18 | /** Children can be a react child. * */
19 | children: PropTypes.node,
20 | /** The actual name of the tag being generated. Defaults to 'a' or 'div'. * */
21 | tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
22 | };
23 |
24 | export default WizardStepTitle;
25 |
--------------------------------------------------------------------------------
/packages/step-wizard/stories/props.stories.mdx:
--------------------------------------------------------------------------------
1 | import { Meta, ArgTypes } from '@storybook/addon-docs';
2 | import { hidden_WizardStep, hidden_WizardStepBadge, hidden_WizardStepTitle } from './step-wizard.stories';
3 |
4 |
5 |
6 | # WizardStep Props
7 |
8 | These props can be passed to the `WizardStep` component
9 |
10 |
11 |
12 | # WizardStepBadge Props
13 |
14 | These props can be passed to the `WizardStepBadge` component
15 |
16 |
17 |
18 | # WizardStepTitle Props
19 |
20 | These props can be passed to the `WizardStepTitle` component
21 |
22 |
23 |
--------------------------------------------------------------------------------
/packages/step-wizard/tests/WizardStepBadge.test.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { render, cleanup } from '@testing-library/react';
3 | import { WizardStepBadge } from '..';
4 |
5 | describe('WizardStepBadge', () => {
6 | afterEach(cleanup);
7 |
8 | test('should render with stepwizard class', () => {
9 | const { getByTestId } = render( );
10 |
11 | const container = getByTestId('step-wizard-badge');
12 |
13 | expect(container.className).toContain('stepwizard-badge');
14 | });
15 | });
16 |
--------------------------------------------------------------------------------
/packages/step-wizard/tests/WizardStepTitle.test.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { render, cleanup } from '@testing-library/react';
3 | import { WizardStepTitle } from '..';
4 |
5 | describe('WizardStepTitle', () => {
6 | afterEach(cleanup);
7 |
8 | test('should render with stepwizard class', () => {
9 | const { getByTestId } = render( );
10 |
11 | const container = getByTestId('step-wizard-title');
12 |
13 | expect(container.className).toContain('stepwizard-title');
14 | });
15 | });
16 |
--------------------------------------------------------------------------------
/packages/step-wizard/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.json",
3 | "include": ["."],
4 | "exclude": ["dist", "build", "node_modules"]
5 | }
6 |
--------------------------------------------------------------------------------
/packages/step-wizard/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "module": "commonjs",
6 | "types": ["jest", "node", "@testing-library/jest-dom"],
7 | "allowJs": true
8 | },
9 | "include": ["**/*.test.js", "**/*.test.ts", "**/*.test.tsx", "**/*.d.ts"]
10 | }
11 |
--------------------------------------------------------------------------------
/packages/step-wizard/types/Wizard.d.ts:
--------------------------------------------------------------------------------
1 | export interface WizardProps {
2 | bar?: boolean;
3 | stacked?: boolean;
4 | progress?: boolean;
5 | tag?: React.ReactType | string;
6 | className?: string;
7 | }
8 |
9 | declare const Wizard: React.FC;
10 |
11 | export default Wizard;
12 |
--------------------------------------------------------------------------------
/packages/step-wizard/types/WizardStep.d.ts:
--------------------------------------------------------------------------------
1 | export interface WizardStepProps {
2 | complete?: boolean;
3 | active?: boolean;
4 | disabled?: boolean;
5 | clickable?: boolean;
6 | href?: string;
7 | tag?: React.ReactType | string;
8 | className?: string;
9 | }
10 |
11 | declare const WizardStep: React.FC;
12 |
13 | export default WizardStep;
14 |
--------------------------------------------------------------------------------
/packages/step-wizard/types/WizardStepBadge.d.ts:
--------------------------------------------------------------------------------
1 | export interface WizardStepBadgeProps {
2 | className?: string;
3 | tag?: React.ReactType | string;
4 | }
5 |
6 | declare const WizardStepBadge: React.FC;
7 |
8 | export default WizardStepBadge;
9 |
--------------------------------------------------------------------------------
/packages/step-wizard/types/WizardStepTitle.d.ts:
--------------------------------------------------------------------------------
1 | export interface WizardStepTitleProps {
2 | className?: string;
3 | tag?: React.ReactType | string;
4 | }
5 |
6 | declare const WizardStepTitle: React.FC;
7 |
8 | export default WizardStepTitle;
9 |
--------------------------------------------------------------------------------
/packages/table/.npmignore:
--------------------------------------------------------------------------------
1 | **/*.test.tsx
2 | **/*.test.ts
3 | **/*.stories.tsx
--------------------------------------------------------------------------------
/packages/table/README.md:
--------------------------------------------------------------------------------
1 | # @availity/table
2 |
3 | > Generic table component built with react-table.
4 |
5 | [](https://www.npmjs.com/package/@availity/table)
6 |
7 | ## [Documentation](https://availity.github.io/availity-react/components/table/)
8 |
--------------------------------------------------------------------------------
/packages/table/jest.config.js:
--------------------------------------------------------------------------------
1 | const global = require('../../jest/global-config');
2 |
3 | module.exports = {
4 | ...global,
5 | displayName: 'table',
6 | coverageDirectory: '../../coverage/table',
7 | };
8 |
--------------------------------------------------------------------------------
/packages/table/src/CellDefinitions/BadgeCell.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Badge } from 'reactstrap';
3 |
4 | type CellProps = {
5 | value: string;
6 | };
7 |
8 | const BadgeCell = (
9 | color: string,
10 | displayText = '',
11 | defaultValue?: string | null | React.ReactChild | React.ElementType
12 | ): JSX.Element | ((cell: CellProps) => JSX.Element | null) | null => {
13 | const BadgeCellDef = ({ value }: CellProps): JSX.Element | null => {
14 | const defaultVal = defaultValue || null;
15 | // eslint-disable-next-line react/jsx-no-useless-fragment
16 | return value ? {value} : defaultValue ? <>{defaultVal}> : null;
17 | };
18 |
19 | if (displayText !== '') {
20 | return BadgeCellDef({ value: displayText });
21 | }
22 |
23 | return BadgeCellDef;
24 | };
25 |
26 | export default BadgeCell;
27 |
--------------------------------------------------------------------------------
/packages/table/src/CellDefinitions/DefaultValueCell.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 | type CellValue = T;
4 | type CellProps = {
5 | value: CellValue;
6 | };
7 |
8 | export type DefaultValueCellProps = {
9 | defaultValue?: string | React.ReactChild | React.ElementType;
10 | };
11 |
12 | const DefaultValueCell = ({
13 | defaultValue = '',
14 | }: DefaultValueCellProps): JSX.Element | ((cell: CellProps) => JSX.Element | null) => {
15 | // eslint-disable-next-line react/jsx-no-useless-fragment
16 | const DefaultValueCellDef = ({ value }: CellProps): JSX.Element | null => <>{value || defaultValue}>;
17 |
18 | return DefaultValueCellDef;
19 | };
20 |
21 | export default DefaultValueCell;
22 |
--------------------------------------------------------------------------------
/packages/table/src/CellDefinitions/index.ts:
--------------------------------------------------------------------------------
1 | export { default as ActionCell } from './ActionCell';
2 | export { default as BadgeCell } from './BadgeCell';
3 | export { default as CurrencyCell } from './CurrencyCell';
4 | export { default as DateCell } from './DateCell';
5 | export { default as DefaultValueCell } from './DefaultValueCell';
6 | export { default as IconCell } from './IconCell';
7 | export { default as IconWithTooltipCell } from './IconWIthTooltipCell';
8 |
9 | export type { ActionCellConfig } from './ActionCell';
10 | export type { CurrencyCellConfig } from './CurrencyCell';
11 | export type { DateTimeCellConfig } from './DateCell';
12 | export type { DefaultValueCellProps } from './DefaultValueCell';
13 | export type { IconConfig } from './IconCell';
14 |
--------------------------------------------------------------------------------
/packages/table/src/Controls/index.ts:
--------------------------------------------------------------------------------
1 | export { default as TableControls } from './TableControls';
2 |
3 | export { default as TableSorter } from './TableSorter';
4 |
5 | export { default as BulkTableActions } from './BulkTableActions';
6 | export type { BulkTableActionsProps } from './BulkTableActions';
7 |
--------------------------------------------------------------------------------
/packages/table/src/TableHeader.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 | export type Props = {
4 | /** This is a unique id that is prepended to the element */
5 | id?: string;
6 | /** This determines if the element is sticky or not */
7 | sticky?: boolean;
8 | /** Children can be a react child. */
9 | children?: React.ReactNode;
10 | } & React.HTMLAttributes;
11 |
12 | const TableHeader = ({ sticky, children, ...rest }: Props): JSX.Element => (
13 |
14 | {children}
15 |
16 | );
17 |
18 | export default TableHeader;
19 |
--------------------------------------------------------------------------------
/packages/table/src/props.stories.mdx:
--------------------------------------------------------------------------------
1 | import { Meta, ArgTypes } from '@storybook/addon-docs';
2 | import { hidden_avTable } from './Table.stories';
3 |
4 |
5 |
6 | # Table Props
7 |
8 | These props can be passed to the `Table` component
9 |
10 |
11 |
--------------------------------------------------------------------------------
/packages/table/src/tests/__snapshots__/ScrollableContainer.test.tsx.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`Scrollable Container should render 1`] = `
4 |
15 | `;
16 |
17 | exports[`Scrollable Container should render multiple children 1`] = `
18 |
34 | `;
35 |
--------------------------------------------------------------------------------
/packages/table/src/tests/data/basicData.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "id": 1,
4 | "first_name": "Barbra",
5 | "last_name": "Tull",
6 | "email": "btull0@usatoday.com",
7 | "isActive": true,
8 | "aPropThatIsHidden": "1"
9 | },
10 | {
11 | "id": 2,
12 | "first_name": "Karlis",
13 | "last_name": "Yurshev",
14 | "email": "kyurshev1@spotify.com",
15 | "isActive": false,
16 | "aPropThatIsHidden": "1"
17 | },
18 | {
19 | "id": 3,
20 | "first_name": "Bordie",
21 | "last_name": "Marsy",
22 | "email": "bmarsy2@elegantthemes.com",
23 | "isActive": true,
24 | "aPropThatIsHidden": "1"
25 | }
26 | ]
27 |
--------------------------------------------------------------------------------
/packages/table/src/tests/data/needsFormattedData.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "id": 1,
4 | "text": "My Text Field",
5 | "currency": "43.08",
6 | "badge": "badge field",
7 | "icon": true,
8 | "date": "1956-02-16T05:00:00.000+0000",
9 | "icon2": "someValue",
10 | "iconWithTooltip": "Value!",
11 | "quickAction": true
12 | },
13 | {
14 | "id": 2,
15 | "text": "My Text Field",
16 | "currency": "43.08",
17 | "badge": "badge field",
18 | "icon": false,
19 | "date": "1990-02-16T05:00:00.000+0000",
20 | "quickAction": false
21 | }
22 | ]
23 |
--------------------------------------------------------------------------------
/packages/table/src/types/BulkRecordAction.ts:
--------------------------------------------------------------------------------
1 | import { DropdownItemProps } from 'reactstrap';
2 | import { IdType, Row } from './ReactTable';
3 | import { TableAction } from './TableAction';
4 |
5 | export interface BulkRecordAction extends TableAction {
6 | onClick?: (records?: T[], rows?: Row[]) => void;
7 | isVisible?: (records?: T[], rows?: Row[]) => boolean;
8 | displayText?:
9 | | string
10 | | React.ReactChild
11 | | React.ElementType
12 | | ((records: T[], rows?: Row[]) => string | React.ReactChild | React.ElementType);
13 | dropdownItemProps?: DropdownItemProps;
14 | }
15 |
--------------------------------------------------------------------------------
/packages/table/src/types/OnRowSelectedEvent.ts:
--------------------------------------------------------------------------------
1 | import { IdType, Row } from './ReactTable';
2 |
3 | export interface OnRowSelectedEvent {
4 | selectedRows: Row[];
5 | }
6 |
--------------------------------------------------------------------------------
/packages/table/src/types/OnTableClickEvent.ts:
--------------------------------------------------------------------------------
1 | import { IdType, Row } from './ReactTable';
2 |
3 | export interface OnTableClickEvent extends React.MouseEvent {
4 | row: Row;
5 | data: J;
6 | index: number;
7 | }
8 |
--------------------------------------------------------------------------------
/packages/table/src/types/PrimaryRecordAction.ts:
--------------------------------------------------------------------------------
1 | export interface PrimaryRecordAction {
2 | iconName: string | ((record?: T) => string);
3 | title: string | ((record?: T) => string);
4 | onClick: (record?: T) => void;
5 | isVisible?: (record?: T) => boolean;
6 | }
7 |
--------------------------------------------------------------------------------
/packages/table/src/types/RecordAction.ts:
--------------------------------------------------------------------------------
1 | import { TableAction } from './TableAction';
2 |
3 | export interface RecordAction extends TableAction {
4 | onClick?: (record?: T) => void;
5 | isVisible?: (record?: T) => boolean;
6 | displayText?:
7 | | string
8 | | React.ReactChild
9 | | React.ElementType
10 | | ((record?: T) => string | React.ReactChild | React.ElementType);
11 | }
12 |
--------------------------------------------------------------------------------
/packages/table/src/types/TableAction.ts:
--------------------------------------------------------------------------------
1 | export interface TableAction {
2 | id: string;
3 | divider?: boolean;
4 | }
5 |
--------------------------------------------------------------------------------
/packages/table/src/types/TableSort.ts:
--------------------------------------------------------------------------------
1 | export type TableSort = {
2 | id: string;
3 | desc: boolean;
4 | };
5 |
--------------------------------------------------------------------------------
/packages/table/src/types/TableSortOption.ts:
--------------------------------------------------------------------------------
1 | export type TableSortOption = {
2 | value: string;
3 | label: string;
4 | isDesc?: boolean;
5 | order?: number;
6 | };
7 |
--------------------------------------------------------------------------------
/packages/table/src/types/index.ts:
--------------------------------------------------------------------------------
1 | export type { OnTableClickEvent } from './OnTableClickEvent';
2 | export type { OnRowSelectedEvent } from './OnRowSelectedEvent';
3 |
4 | export type {
5 | Row,
6 | Column,
7 | Cell,
8 | ExtendedTableHeader,
9 | CurrentTableState,
10 | TableInstance,
11 | RowProps,
12 | IdType,
13 | } from './ReactTable';
14 |
15 | export type { TableAction } from './TableAction';
16 | export type { BulkRecordAction } from './BulkRecordAction';
17 | export type { RecordAction } from './RecordAction';
18 | export type { PrimaryRecordAction } from './PrimaryRecordAction';
19 |
20 | export type { TableSort } from './TableSort';
21 | export type { TableSortOption } from './TableSortOption';
22 |
--------------------------------------------------------------------------------
/packages/table/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.json",
3 | "include": ["."],
4 | "exclude": ["dist", "build", "node_modules"]
5 | }
6 |
--------------------------------------------------------------------------------
/packages/table/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "module": "commonjs",
6 | "types": ["jest", "node", "@testing-library/jest-dom"],
7 | "allowJs": true
8 | },
9 | "include": ["**/*.test.js", "**/*.test.ts", "**/*.test.tsx", "**/*.d.ts"]
10 | }
11 |
--------------------------------------------------------------------------------
/packages/tooltip/.npmignore:
--------------------------------------------------------------------------------
1 | **/*test.js
2 | **/*.stories.tsx
--------------------------------------------------------------------------------
/packages/tooltip/jest.config.js:
--------------------------------------------------------------------------------
1 | const global = require('../../jest/global-config');
2 |
3 | module.exports = {
4 | ...global,
5 | displayName: 'tooltip',
6 | coverageDirectory: '../../coverage/tooltip',
7 | };
8 |
--------------------------------------------------------------------------------
/packages/tooltip/src/Tooltip.stories.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { StoryObj } from '@storybook/react';
3 |
4 | import Tooltip from './Tooltip';
5 | // import README from "../README.md";
6 |
7 | /**
8 | * Accessible tooltip for hovering over.
9 | */
10 | export default {
11 | title: 'Components/Tooltip',
12 | component: Tooltip,
13 | };
14 |
15 | export const _Tooltip: StoryObj = {
16 | render: () => (
17 |
18 |
19 | This is a tooltip
20 |
21 | hover me!
22 |
23 | ),
24 | };
25 |
--------------------------------------------------------------------------------
/packages/tooltip/src/index.ts:
--------------------------------------------------------------------------------
1 | export { default } from './Tooltip';
2 |
--------------------------------------------------------------------------------
/packages/tooltip/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.json",
3 | "include": [".", "src/Tooltip.stories.tsx"],
4 | "exclude": ["dist", "build", "node_modules"]
5 | }
6 |
--------------------------------------------------------------------------------
/packages/tooltip/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "module": "commonjs",
6 | "types": ["jest", "node", "@testing-library/jest-dom"]
7 | },
8 | "include": ["**/*.test.js", "**/*.test.ts", "**/*.test.tsx", "**/*.d.ts"]
9 | }
10 |
--------------------------------------------------------------------------------
/packages/training-link/.npmignore:
--------------------------------------------------------------------------------
1 | **/*.test.tsx
2 | **/*.stories.tsx
--------------------------------------------------------------------------------
/packages/training-link/jest.config.js:
--------------------------------------------------------------------------------
1 | const global = require('../../jest/global-config');
2 |
3 | module.exports = {
4 | ...global,
5 | displayName: 'training-link',
6 | coverageDirectory: '../../coverage/training-link',
7 | };
8 |
--------------------------------------------------------------------------------
/packages/training-link/src/TrainingLink.stories.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { StoryObj } from '@storybook/react';
3 | import TrainingLink from './TrainingLink';
4 |
5 | export default {
6 | title: 'Components/Training Link',
7 | parameters: {
8 | docs: {
9 | description: {
10 | component: 'A component for allowing link out to training in the Header component',
11 | },
12 | },
13 | },
14 | component: TrainingLink,
15 | };
16 |
17 | export const _Default: StoryObj = {
18 | render: ({ link, name }) => ,
19 | args: {
20 | name: 'Appeals',
21 | link: 'https://google.com',
22 | },
23 | };
24 |
--------------------------------------------------------------------------------
/packages/training-link/src/index.ts:
--------------------------------------------------------------------------------
1 | export { default } from './TrainingLink';
2 | export type { TrainingLinkProps } from './TrainingLink';
3 |
--------------------------------------------------------------------------------
/packages/training-link/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.json",
3 | "include": ["."],
4 | "exclude": ["dist", "build", "node_modules"]
5 | }
6 |
--------------------------------------------------------------------------------
/packages/training-link/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "module": "commonjs",
6 | "types": ["jest", "node", "@testing-library/jest-dom"]
7 | },
8 | "include": ["**/*.test.js", "**/*.test.ts", "**/*.test.tsx", "**/*.d.ts"]
9 | }
10 |
--------------------------------------------------------------------------------
/packages/tree/.npmignore:
--------------------------------------------------------------------------------
1 | **/*.test.tsx
2 | **/*.test.ts
3 | **/*.stories.tsx
--------------------------------------------------------------------------------
/packages/tree/jest.config.js:
--------------------------------------------------------------------------------
1 | const global = require('../../jest/global-config');
2 |
3 | module.exports = {
4 | ...global,
5 | displayName: 'tree',
6 | coverageDirectory: '../../coverage/tree',
7 | };
8 |
--------------------------------------------------------------------------------
/packages/tree/src/TreeItem.ts:
--------------------------------------------------------------------------------
1 | export default class TreeItem {
2 | id: string;
3 |
4 | isExpanded?: boolean;
5 |
6 | isSelected?: boolean;
7 |
8 | isHidden?: boolean;
9 |
10 | isDisabled?: boolean;
11 |
12 | name: string;
13 |
14 | parentId?: string;
15 |
16 | children?: TreeItem[];
17 |
18 | areAllChildrenSelected?: boolean;
19 |
20 | constructor(obj: TreeItem) {
21 | this.id = obj.id;
22 | this.parentId = obj.parentId;
23 | this.isExpanded = obj.isExpanded || false;
24 | this.isSelected = obj.isSelected || false;
25 | this.isHidden = obj.isHidden || false;
26 | this.isDisabled = obj.isDisabled || false;
27 | this.name = obj.name;
28 | this.children = obj.children;
29 | this.areAllChildrenSelected = obj.areAllChildrenSelected;
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/packages/tree/src/index.ts:
--------------------------------------------------------------------------------
1 | export { default, buildTree } from './Tree';
2 | export type { default as TreeItem } from './TreeItem';
3 | export { default as TreeItemContent } from './TreeItemContent';
4 |
--------------------------------------------------------------------------------
/packages/tree/src/props.stories.mdx:
--------------------------------------------------------------------------------
1 | import { Meta, ArgTypes } from '@storybook/addon-docs';
2 | import { hidden_TreeItemComponent } from './Tree.stories';
3 |
4 |
5 |
6 | # TreeItem Props
7 |
8 | These props can be passed to the `TreeItem` component
9 |
10 |
11 |
--------------------------------------------------------------------------------
/packages/tree/styles.scss:
--------------------------------------------------------------------------------
1 | .tree-view {
2 | padding-left: 0;
3 |
4 | .custom-checkbox {
5 | display: inline-block;
6 | }
7 |
8 | .custom-control-label::before {
9 | top: 0;
10 | }
11 | .custom-control-label::after {
12 | top: 0;
13 | }
14 |
15 | ul:not(:first-child) {
16 | padding-left: 0 !important;
17 | }
18 | ul:first-child {
19 | padding-left: 20px;
20 | }
21 |
22 | li {
23 | list-style: none;
24 | }
25 |
26 | .expand-tree {
27 | cursor: pointer;
28 | }
29 |
30 | .icon-expand,
31 | icon-expand:hover {
32 | color: #363f45;
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/packages/tree/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.json",
3 | "include": ["."],
4 | "exclude": ["dist", "build", "node_modules"]
5 | }
6 |
--------------------------------------------------------------------------------
/packages/tree/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "module": "commonjs",
6 | "types": ["jest", "node", "@testing-library/jest-dom"]
7 | },
8 | "include": ["**/*.test.js", "**/*.test.ts", "**/*.test.tsx", "**/*.d.ts"]
9 | }
10 |
--------------------------------------------------------------------------------
/packages/typography/.npmignore:
--------------------------------------------------------------------------------
1 | **/*test.js
2 | **/*.stories.tsx
--------------------------------------------------------------------------------
/packages/typography/jest.config.js:
--------------------------------------------------------------------------------
1 | const global = require('../../jest/global-config');
2 |
3 | module.exports = {
4 | ...global,
5 | displayName: 'typography',
6 | coverageDirectory: '../../coverage/typography',
7 | };
8 |
--------------------------------------------------------------------------------
/packages/typography/src/Agreement.tsx:
--------------------------------------------------------------------------------
1 | import React, { ReactNode, ElementType } from 'react';
2 | import classNames from 'classnames';
3 |
4 | export type AgreementProps = {
5 | /** Custom tag. Can be an HTML tag or a React component. */
6 | tag?: ElementType;
7 | /** Additional classes to apply to the Agreement */
8 | className?: string;
9 | /** The children to render within the Agreement */
10 | children?: ReactNode;
11 | };
12 |
13 | const Agreement = ({ tag: Tag = 'div', className, children, ...rest }: AgreementProps): JSX.Element => (
14 |
15 | {children}
16 |
17 | );
18 |
19 | export default Agreement;
20 |
--------------------------------------------------------------------------------
/packages/typography/src/index.ts:
--------------------------------------------------------------------------------
1 | export { default as Agreement } from './Agreement';
2 | export { default as Disclaimer } from './Disclaimer';
3 |
--------------------------------------------------------------------------------
/packages/typography/stories/typography-disclaimer.stories.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import type { StoryObj } from '@storybook/react';
3 | import Disclaimer from '../src/Disclaimer';
4 |
5 | export default {
6 | title: 'Components/Typography/Disclaimer',
7 | component: Disclaimer,
8 | };
9 |
10 | export const _Disclaimer: StoryObj = {
11 | render: ({ tag, className, styled, children }) => (
12 |
13 | {children}
14 |
15 | ),
16 | args: {
17 | tag: 'div',
18 | className: 'my-disclaimer-class',
19 | styled: true,
20 | children: 'Sample disclaimer text',
21 | },
22 | };
23 |
--------------------------------------------------------------------------------
/packages/typography/stories/typography.stories.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import type { StoryObj } from '@storybook/react';
3 | import Agreement from '../src/Agreement';
4 |
5 | export default {
6 | title: 'Components/Typography/Agreement',
7 | component: Agreement,
8 | };
9 |
10 | export const _Agreement: StoryObj = {
11 | render: ({ tag, className, children }) => (
12 |
13 | {children}
14 |
15 | ),
16 | args: {
17 | tag: 'div',
18 | className: 'my-agreement-class',
19 | children: 'Sample agreement text',
20 | },
21 | };
22 |
--------------------------------------------------------------------------------
/packages/typography/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.json",
3 | "include": ["."],
4 | "exclude": ["dist", "build", "node_modules"]
5 | }
6 |
--------------------------------------------------------------------------------
/packages/typography/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "module": "commonjs",
6 | "types": ["jest", "node", "@testing-library/jest-dom"],
7 | "allowJs": true
8 | },
9 | "include": ["**/*.test.js", "**/*.test.ts", "**/*.test.tsx", "**/*.d.ts"]
10 | }
11 |
--------------------------------------------------------------------------------
/packages/upload/.npmignore:
--------------------------------------------------------------------------------
1 | **/*test.js
2 | **/*.stories.tsx
--------------------------------------------------------------------------------
/packages/upload/index.d.ts:
--------------------------------------------------------------------------------
1 | import Upload from './types/Upload';
2 | import FilePicker from './types/FilePicker';
3 | import FileList from './types/FileList';
4 | import FileRow from './types/FileRow';
5 | import FilePickerBtn from './types/FilePickerBtn';
6 | import UploadProgressBar from './types/UploadProgressBar';
7 |
8 | export default Upload;
9 |
10 | export { FilePicker, FileList, FileRow, FilePickerBtn, UploadProgressBar };
11 |
--------------------------------------------------------------------------------
/packages/upload/index.js:
--------------------------------------------------------------------------------
1 | export { default } from './src/Upload';
2 | export { default as FilePicker } from './src/FilePicker';
3 | export { default as FileList } from './src/FileList';
4 | export { default as FileRow } from './src/FileRow';
5 | export { default as FilePickerBtn } from './src/FilePickerBtn';
6 | export { default as UploadProgressBar } from './src/UploadProgressBar';
7 |
--------------------------------------------------------------------------------
/packages/upload/styles.scss:
--------------------------------------------------------------------------------
1 | .file-drop {
2 | color: #464a4c;
3 | text-align: center;
4 | border: 1px dashed rgba(0, 0, 0, .15);
5 | width: 8rem;
6 | min-width: fit-content;
7 | height: 8rem;
8 | padding: 3rem 0;
9 | }
10 |
11 | .file-drop-active {
12 | border: 1px solid #3960ed;
13 | border-width: 2px;
14 | background-color: #ebebeb;
15 | border-radius: 5px;
16 | }
--------------------------------------------------------------------------------
/packages/upload/tests/FilePicker.test.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { render } from '@testing-library/react';
3 | import { FilePicker } from '..';
4 |
5 | describe('FilePicker', () => {
6 | test('should render', () => {
7 | const { container } = render( {}} />);
8 |
9 | expect(container).toMatchSnapshot();
10 | });
11 | });
12 |
--------------------------------------------------------------------------------
/packages/upload/tests/__snapshots__/FilePicker.test.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`FilePicker should render 1`] = `
4 |
5 |
8 |
14 |
18 | Choose file
19 |
20 |
21 |
22 | `;
23 |
--------------------------------------------------------------------------------
/packages/upload/tests/__snapshots__/FilePickerBtn.test.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`FilePickerBtn should render 1`] = `
4 |
5 |
8 |
14 |
15 |
19 | Select File
20 |
21 |
22 | `;
23 |
--------------------------------------------------------------------------------
/packages/upload/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.json",
3 | "include": ["."],
4 | "exclude": ["dist", "build", "node_modules"]
5 | }
6 |
--------------------------------------------------------------------------------
/packages/upload/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../../dist/out-tsc",
5 | "module": "commonjs",
6 | "types": ["jest", "node", "@testing-library/jest-dom"],
7 | "allowJs": true
8 | },
9 | "include": ["**/*.test.js", "**/*.test.ts", "**/*.test.tsx", "**/*.d.ts"]
10 | }
11 |
--------------------------------------------------------------------------------
/packages/upload/types/FileList.d.ts:
--------------------------------------------------------------------------------
1 | export interface FileListProps {
2 | files?: Array;
3 | children?: Function;
4 | onRemoveFile?: Function;
5 | onPasswordSubmit?: Function;
6 | passwordModalZIndex?: number | string;
7 | }
8 |
9 | declare const FileList: React.ComponentType;
10 |
11 | export default FileList;
12 |
--------------------------------------------------------------------------------
/packages/upload/types/FilePicker.d.ts:
--------------------------------------------------------------------------------
1 | export interface FilePickerProps {
2 | tag?: React.ElementType;
3 | multiple?: boolean;
4 | children?: React.ReactNode;
5 | name?: string;
6 | allowedFileTypes?: string[];
7 | maxSize?: number | string;
8 | onChange?: React.ChangeEventHandler;
9 | }
10 |
11 | declare const FilePicker: React.ComponentType;
12 |
13 | export default FilePicker;
14 |
--------------------------------------------------------------------------------
/packages/upload/types/FilePickerBtn.d.ts:
--------------------------------------------------------------------------------
1 | export interface FilePickerBtnProps extends React.ButtonHTMLAttributes {
2 | onChange?: React.ChangeEventHandler;
3 | multiple?: boolean;
4 | name?: string;
5 | allowedFileTypes?: string[];
6 | maxSize?: number;
7 | 'data-testid'?: string;
8 | }
9 |
10 | declare const FilePickerBtn: React.ComponentType;
11 |
12 | export default FilePickerBtn;
13 |
--------------------------------------------------------------------------------
/packages/upload/types/FileRow.d.ts:
--------------------------------------------------------------------------------
1 | type File = {
2 | name: string;
3 | };
4 | type FileType = {
5 | id: string;
6 | file: File;
7 | };
8 | export interface FileRowProps {
9 | onRemove: Function;
10 | children?: Function;
11 | file?: File;
12 | onPasswordSubmit?: Function;
13 | passwordModalZIndex?: number | string;
14 | }
15 |
16 | declare const FileRow: React.ComponentType;
17 |
18 | export default FileRow;
19 |
--------------------------------------------------------------------------------
/packages/upload/types/UploadProgressBar.d.ts:
--------------------------------------------------------------------------------
1 | type UploadType = {
2 | sendPassword: Function;
3 | onProgress: Array;
4 | onSuccess: Array;
5 | onError: Array;
6 | percentage?: number;
7 | errorMessage?: string;
8 | id: string;
9 | status?: string;
10 | };
11 |
12 | export interface UploadProgressBarProps {
13 | upload: UploadType;
14 | onProgress?: Function;
15 | onSuccess?: Function;
16 | onError?: Function;
17 | animated?: boolean;
18 | className?: string;
19 | tag?: React.ReactType | string;
20 | striped?: boolean;
21 | onPasswordSubmit?: Function;
22 | passwordModalZIndex?: number | string;
23 | }
24 |
25 | declare const UploadProgressBar: React.ComponentType;
26 |
27 | export default UploadProgressBar;
28 |
--------------------------------------------------------------------------------
/plop-templates/package/CHANGELOG.md.hbs:
--------------------------------------------------------------------------------
1 | # Change Log
2 |
3 | All notable changes to this project will be documented in this file.
4 | See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5 |
--------------------------------------------------------------------------------
/plop-templates/package/Package.d.ts.hbs:
--------------------------------------------------------------------------------
1 | export interface {{pascalCase packageName}}Props {
2 |
3 | }
4 |
5 | declare const {{pascalCase packageName}}: React.FC<{{pascalCase packageName}}Props>;
6 |
7 | export default {{pascalCase packageName}};
8 |
--------------------------------------------------------------------------------
/plop-templates/package/Package.js.hbs:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import PropTypes from 'prop-types';
3 |
4 | const {{pascalCase packageName}} = props => {
5 |
6 | };
7 |
8 | {{pascalCase packageName}}.propTypes = {
9 |
10 | };
11 |
12 | export default {{pascalCase packageName}};
13 |
--------------------------------------------------------------------------------
/plop-templates/package/Package.mdx.hbs:
--------------------------------------------------------------------------------
1 | ---
2 | title: {{kebabCase packageName}}
3 | summary: {{packageDescription}}
4 | ---
5 |
6 | [](https://www.npmjs.com/package/@availity/{{kebabCase packageName}})
7 |
8 |
9 |
10 | ## Installation
11 |
12 | ```bash
13 | npm install @availity/{{kebabCase packageName}} --save
14 | ```
15 |
16 | ## Usage
17 |
18 |
19 | ## Props
20 |
21 | | Prop Name | Types | Required | Default | Description |
22 | | ------------- | ------- | -------- | -------- | -------------------------------------------------------------------------------------- |
23 | | | | | | |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/plop-templates/package/Package.test.js.hbs:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { render, cleanup } from '@testing-library/react';
3 | import {{pascalCase packageName}} from '..';
4 |
5 | describe('{{pascalCase packageName}}', () => {
6 | afterEach(() => {
7 | cleanup();
8 | });
9 | });
10 |
--------------------------------------------------------------------------------
/plop-templates/package/README.md.hbs:
--------------------------------------------------------------------------------
1 | # @availity/{{kebabCase packageName}}
2 |
3 | > {{packageDescription}}
4 |
5 | [](https://www.npmjs.com/package/@availity/{{kebabCase packageName}})
6 |
7 | ## Installation
8 |
9 | ```bash
10 | npm install @availity/{{kebabCase packageName}} --save
11 | ```
12 |
--------------------------------------------------------------------------------
/plop-templates/package/index.d.ts.hbs:
--------------------------------------------------------------------------------
1 | import {{pascalCase packageName}} from './src/{{pascalCase packageName}}';
2 |
3 | export default {{pascalCase packageName}};
4 |
--------------------------------------------------------------------------------
/plop-templates/package/index.js.hbs:
--------------------------------------------------------------------------------
1 | import {{pascalCase packageName}} from './src/{{pascalCase packageName}}';
2 |
3 | export default {{pascalCase packageName}};
4 |
--------------------------------------------------------------------------------
/plop-templates/package/package.json.hbs:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@availity/{{kebabCase packageName}}",
3 | "version": "1.0.0",
4 | "description": "{{packageDescription}}",
5 | "main": "index.js",
6 | "keywords": [{{{packageKeywords}}}],
7 | "author": "{{userFullName}} <{{userEmail}}>",
8 | "license": "MIT",
9 | "publishConfig": {
10 | "access": "public"
11 | },
12 | "dependencies": {
13 | "prop-types": "^15.7.2"
14 | },
15 | "devDependencies": {
16 | "react": "^17.0.2",
17 | "react-dom": "^17.0.2",
18 | "reactstrap": "^8.9.0"
19 | },
20 | "peerDependencies": {
21 | "react": "^16.8.6",
22 | "reactstrap": ">=8.0.0"
23 | }
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/plop-templates/package/stories.js.hbs:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { storiesOf } from '@storybook/react';
3 | import { withKnobs } from '@storybook/addon-knobs/react';
4 |
5 | import {{pascalCase packageName}} from '@availity/{{kebabCase packageName}}';
6 | import README from '@availity/{{kebabCase packageName}}/README.md';
7 |
8 | storiesOf('TODO|{{pascalCase packageName}}', module)
9 | .addParameters({
10 | readme: {
11 | // Show readme at the addons panel
12 | sidebar: README,
13 | // eslint-disable-next-line react/prop-types
14 | StoryPreview: ({ children }) => {children}
,
15 | },
16 | })
17 | .addDecorator(withKnobs)
18 | .add('default', () => (
19 |
20 | <{{pascalCase packageName}} />
21 |
22 | ));
23 |
24 |
--------------------------------------------------------------------------------
/static/import-file.d.ts:
--------------------------------------------------------------------------------
1 | declare module "*.png" {
2 | const value: string;
3 | export default value;
4 | }
5 |
6 | declare module "*.gif" {
7 | const value: string;
8 | export default value;
9 | }
10 |
11 | declare module "*.jpeg" {
12 | const value: string;
13 | export default value;
14 | }
15 |
16 | declare module "*.bmp" {
17 | const value: string;
18 | export default value;
19 | }
--------------------------------------------------------------------------------
/static/public/apps/my-profile/images/Avatars-00.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Availity/availity-react/8c51a0b2dcf03186546912f81bbb40ccbe6ba7b7/static/public/apps/my-profile/images/Avatars-00.png
--------------------------------------------------------------------------------
/static/public/apps/tiles/images/availity_tile_1.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Availity/availity-react/8c51a0b2dcf03186546912f81bbb40ccbe6ba7b7/static/public/apps/tiles/images/availity_tile_1.jpeg
--------------------------------------------------------------------------------
/static/public/apps/tiles/images/availity_tile_2.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Availity/availity-react/8c51a0b2dcf03186546912f81bbb40ccbe6ba7b7/static/public/apps/tiles/images/availity_tile_2.jpeg
--------------------------------------------------------------------------------
/static/public/apps/tiles/images/availity_tile_3.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Availity/availity-react/8c51a0b2dcf03186546912f81bbb40ccbe6ba7b7/static/public/apps/tiles/images/availity_tile_3.jpeg
--------------------------------------------------------------------------------
/static/static/spaces/12345/sample-billboard.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Availity/availity-react/8c51a0b2dcf03186546912f81bbb40ccbe6ba7b7/static/static/spaces/12345/sample-billboard.png
--------------------------------------------------------------------------------
/static/static/spaces/12345/sample-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Availity/availity-react/8c51a0b2dcf03186546912f81bbb40ccbe6ba7b7/static/static/spaces/12345/sample-logo.png
--------------------------------------------------------------------------------
/static/static/spaces/12345/sample-tile.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Availity/availity-react/8c51a0b2dcf03186546912f81bbb40ccbe6ba7b7/static/static/spaces/12345/sample-tile.png
--------------------------------------------------------------------------------
/story-utils/ResourceComponent.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Card, CardBody, CardTitle } from 'reactstrap';
3 |
4 | type Props = {
5 | data: Record;
6 | loading: boolean;
7 | title?: string;
8 | };
9 |
10 | const ResourceComponent = ({ data, loading, title = '' }: Props): JSX.Element => (
11 |
12 |
13 | {title}
14 |
15 | {loading ? 'Loading...' : {JSON.stringify(data, null, 2)} }
16 |
17 | );
18 |
19 | export default ResourceComponent;
20 |
--------------------------------------------------------------------------------