├── .nvmrc
├── .npmrc
├── CODEOWNERS
├── packages
├── select-input
│ ├── README.md
│ ├── .npmignore
│ └── package.json
├── alert
│ ├── .npmignore
│ ├── fragment.graphql
│ └── README.md
├── button
│ ├── .npmignore
│ ├── fragment.graphql
│ └── icons
│ │ ├── arrow-right.svg
│ │ ├── corner-right-down.svg
│ │ ├── download.svg
│ │ └── external-link.svg
├── callouts
│ ├── .npmignore
│ ├── partials
│ │ └── callout-item
│ │ │ └── fixtures
│ │ │ └── default.json
│ └── readme.md
├── combobox
│ ├── .npmignore
│ └── utils
│ │ └── filter-options.ts
├── content
│ ├── .npmignore
│ ├── styles
│ │ ├── p.module.css
│ │ ├── strong.module.css
│ │ ├── img.module.css
│ │ ├── iframe.module.css
│ │ ├── hr.module.css
│ │ ├── blockquote.module.css
│ │ ├── a.module.css
│ │ └── pre.module.css
│ ├── README.md
│ ├── index.js
│ ├── index.test.js
│ ├── props.js
│ └── package.json
├── head
│ ├── .npmignore
│ ├── docs.mdx
│ └── package.json
├── hero
│ ├── .npmignore
│ ├── carousel.test.js
│ └── fragment.graphql
├── image
│ ├── .npmignore
│ ├── fragment.graphql
│ └── package.json
├── search
│ ├── .npmignore
│ ├── img
│ │ ├── return.svg.js
│ │ ├── search-x.svg.js
│ │ ├── search.svg.js
│ │ └── search-legend-page.svg.js
│ └── types.ts
├── subnav
│ ├── .npmignore
│ ├── partials
│ │ ├── DropdownTrigger
│ │ │ └── icons
│ │ │ │ └── chevron-down.svg
│ │ ├── CtaLinks
│ │ │ ├── icons
│ │ │ │ └── star.js
│ │ │ └── github-stars-link
│ │ │ │ └── formatStarCount
│ │ │ │ └── index.js
│ │ └── nav-item-text
│ │ │ └── style.module.css
│ └── helpers
│ │ ├── areBasePathsMatching.ts
│ │ └── useNavRef.js
├── tabs
│ ├── .npmignore
│ ├── icons
│ │ ├── chevron-right.svg
│ │ └── tooltip.svg
│ ├── style.module.css
│ ├── package.json
│ └── provider.js
├── terminal
│ ├── .npmignore
│ ├── README.md
│ ├── CHANGELOG.md
│ └── package.json
├── toggle
│ ├── .npmignore
│ ├── readme.md
│ ├── props.js
│ ├── package.json
│ └── docs.mdx
├── accordion
│ ├── .npmignore
│ ├── readme.md
│ ├── style.css
│ ├── partials
│ │ ├── AccordionItems
│ │ │ ├── icons
│ │ │ │ └── arrow-down.svg
│ │ │ └── fixtures
│ │ │ │ └── default.json
│ │ └── Collapsible
│ │ │ └── style.module.css
│ ├── style.module.css
│ ├── package.json
│ └── index.js
├── alert-banner
│ ├── .npmignore
│ ├── fragment.graphql
│ ├── README.md
│ └── img
│ │ └── close-icon.svg
├── code-block
│ ├── .npmignore
│ ├── mdx
│ │ └── style.module.css
│ ├── fragment.graphql
│ ├── README.md
│ ├── style.module.css
│ ├── package.json
│ └── utils
│ │ └── clamp.js
├── docs-sidenav
│ ├── .npmignore
│ ├── icons
│ │ ├── bullet.svg
│ │ ├── search.svg
│ │ └── external-link.svg
│ ├── README.md
│ ├── fixtures
│ │ ├── content
│ │ │ ├── index.mdx
│ │ │ ├── ambiguous.mdx
│ │ │ └── ambiguous
│ │ │ │ └── index.mdx
│ │ └── content-with-unlinked
│ │ │ ├── hello.mdx
│ │ │ └── nested
│ │ │ ├── index.mdx
│ │ │ └── another-file.mdx
│ ├── docs.mdx
│ └── package.json
├── learn-callout
│ ├── .npmignore
│ ├── README.md
│ └── package.json
├── link-wrap
│ ├── .npmignore
│ ├── CHANGELOG.md
│ └── package.json
├── logo-grid
│ ├── .npmignore
│ ├── fragment.graphql
│ ├── icons
│ │ └── x.svg
│ ├── docs.mdx
│ └── hooks
│ │ └── use-on-focus-outside.js
├── marketo-form
│ ├── README.md
│ ├── server
│ │ └── index.ts
│ ├── partials
│ │ ├── fields
│ │ │ ├── name-field
│ │ │ │ ├── style.module.css
│ │ │ │ └── index.tsx
│ │ │ ├── htmltext-field
│ │ │ │ ├── style.module.css
│ │ │ │ └── index.tsx
│ │ │ └── form-page-url-field
│ │ │ │ └── index.tsx
│ │ ├── label
│ │ │ ├── style.module.css
│ │ │ └── index.tsx
│ │ ├── error-message
│ │ │ ├── style.module.css
│ │ │ └── index.tsx
│ │ └── field-wrapper
│ │ │ └── index.tsx
│ ├── contexts
│ │ └── FormMetadata.ts
│ └── index.ts
├── text-input
│ ├── .npmignore
│ ├── docs.mdx
│ └── package.json
├── text-split
│ ├── .npmignore
│ ├── README.md
│ └── partials
│ │ ├── checkbox-list
│ │ └── icons
│ │ │ └── check-square.svg
│ │ └── button-group
│ │ └── style.module.css
├── text-splits
│ ├── .npmignore
│ ├── README.md
│ ├── CHANGELOG.md
│ └── package.json
├── use-cases
│ ├── .npmignore
│ └── img
│ │ ├── check.svg
│ │ └── arrow.svg
├── call-to-action
│ ├── .npmignore
│ ├── README.md
│ └── docs.mdx
├── checkbox-input
│ ├── .npmignore
│ └── package.json
├── consent-manager
│ ├── .npmignore
│ ├── style.module.css
│ ├── loader
│ │ └── presets
│ │ │ ├── oss.ts
│ │ │ └── enterprise.ts
│ └── img
│ │ └── icn_close.js
├── enterprise-alert
│ ├── .npmignore
│ ├── README.md
│ ├── docs.mdx
│ └── props.js
├── hashi-stack-menu
│ ├── .npmignore
│ ├── README.md
│ ├── assets
│ │ ├── icon-dropdown-gray-1.svg
│ │ ├── icon-dropdown-gray-3.svg
│ │ └── icon-arrow.svg
│ ├── docs.mdx
│ ├── props.js
│ ├── browse-panel
│ │ └── index.jsx
│ ├── stack-menu-section
│ │ └── stack-menu-section.module.css
│ └── package.json
├── section-header
│ ├── .npmignore
│ ├── fragment.graphql
│ ├── CHANGELOG.md
│ ├── README.md
│ ├── props.js
│ ├── package.json
│ └── style.module.css
├── sentinel-embedded
│ ├── .npmignore
│ ├── README.md
│ ├── docs.mdx
│ ├── CHANGELOG.md
│ └── package.json
├── tabbed-accordion
│ ├── .npmignore
│ ├── README.md
│ ├── style.module.css
│ └── package.json
├── textarea-input
│ ├── .npmignore
│ ├── docs.mdx
│ └── package.json
├── product-download-page
│ ├── .npmignore
│ ├── utils
│ │ └── __tests__
│ │ │ └── downloader.test.ts
│ └── partials
│ │ └── dropdown
│ │ └── style.module.css
├── product-features-list
│ ├── .npmignore
│ ├── README.md
│ └── package.json
├── stepped-feature-list
│ ├── .npmignore
│ ├── README.md
│ ├── CHANGELOG.md
│ └── package.json
├── text-split-with-code
│ ├── .npmignore
│ ├── index.js
│ ├── README.md
│ ├── package.json
│ └── props.js
├── text-split-with-image
│ ├── .npmignore
│ ├── styles
│ │ └── text-split-with-image.module.css
│ ├── README.md
│ ├── index.js
│ ├── package.json
│ ├── props.js
│ └── CHANGELOG.md
├── text-split-with-logo-grid
│ ├── .npmignore
│ ├── README.md
│ └── CHANGELOG.md
├── vertical-text-block-list
│ └── .npmignore
├── markdown-page
│ ├── .npmignore
│ ├── fixtures
│ │ ├── test-page.mdx
│ │ ├── test-page-with-component.mdx
│ │ └── test-component.jsx
│ ├── style.module.css
│ ├── props.js
│ └── index.js
├── docs-page
│ ├── .npmignore
│ ├── content-api
│ │ └── __fixtures__
│ │ │ ├── document_404.json
│ │ │ ├── navData_404.json
│ │ │ └── versionMetadata_empty.json
│ ├── server
│ │ ├── resolve-nav-data.test.ts
│ │ ├── consts.ts
│ │ ├── resolve-nav-data.ts
│ │ └── get-paths-from-nav-data.test.ts
│ ├── components.ts
│ └── components
│ │ └── version-select
│ │ └── props.js
├── featured-slider
│ ├── README.md
│ ├── partials
│ │ ├── status-bar.js
│ │ └── status-bar.module.css
│ └── package.json
├── form-fields
│ ├── index.ts
│ ├── package.json
│ ├── radio
│ │ ├── index.tsx
│ │ └── docs.mdx
│ ├── radio-group
│ │ └── index.tsx
│ ├── checkbox-group
│ │ ├── index.tsx
│ │ └── style.module.css
│ ├── checkbox
│ │ ├── docs.mdx
│ │ └── index.tsx
│ ├── text
│ │ └── style.module.css
│ ├── textarea
│ │ └── style.module.css
│ └── partials
│ │ └── choice-group
│ │ └── style.module.css
├── inline-video
│ ├── README.md
│ ├── types.ts
│ ├── package.json
│ └── index.test.js
├── inline-svg
│ ├── README.md
│ ├── index.js
│ ├── CHANGELOG.md
│ ├── props.js
│ └── docs.mdx
├── video-feature
│ ├── README.md
│ ├── package.json
│ └── types.ts
├── close-button
│ ├── docs.mdx
│ ├── package.json
│ ├── CHANGELOG.md
│ └── index.test.js
├── notification
│ ├── README.md
│ ├── components
│ │ ├── notification-with-language
│ │ │ └── flags
│ │ │ │ ├── es.svg
│ │ │ │ ├── de.svg
│ │ │ │ ├── fr.svg
│ │ │ │ └── jp.svg
│ │ └── notifications
│ │ │ └── style.module.css
│ ├── core
│ │ └── utils.ts
│ └── package.json
├── glossary-page
│ └── style.module.css
├── min-100-layout
│ ├── style.module.css
│ ├── README.md
│ ├── CHANGELOG.md
│ ├── package.json
│ └── docs.mdx
├── case-study-slider
│ ├── readme.md
│ ├── fragment.graphql
│ └── package.json
├── placeholder
│ ├── README.md
│ ├── props.js
│ ├── package.json
│ └── CHANGELOG.md
├── pricing-tiers
│ ├── README.md
│ └── package.json
├── feedback-form
│ ├── icons
│ │ └── thumbs-up.svg
│ ├── README.md
│ └── package.json
├── open-api-page
│ ├── partials
│ │ ├── collapsible
│ │ │ └── style.module.css
│ │ └── two-column-layout
│ │ │ ├── style.module.css
│ │ │ └── index.tsx
│ └── README.md
├── aside
│ ├── README.md
│ ├── CHANGELOG.md
│ ├── package.json
│ ├── style.module.css
│ ├── props.js
│ └── index.tsx
├── card
│ ├── career-card
│ │ └── style.module.css
│ ├── README.md
│ ├── event-card
│ │ └── style.module.css
│ ├── package.json
│ ├── person-card
│ │ └── style.module.css
│ └── index.tsx
├── error-view
│ ├── props.js
│ ├── style.module.css
│ └── package.json
├── product-badge
│ ├── package.json
│ ├── types.ts
│ └── CHANGELOG.md
├── quote
│ ├── types.ts
│ ├── package.json
│ └── style.module.css
├── products-used
│ ├── package.json
│ └── types.ts
├── motion-config
│ ├── package.json
│ ├── index.tsx
│ ├── features.ts
│ └── README.md
├── expandable-arrow
│ ├── package.json
│ ├── docs.mdx
│ ├── CHANGELOG.md
│ └── index.test.js
├── pricing-features
│ ├── package.json
│ ├── global-font.css
│ ├── fixtures
│ │ └── table.json
│ └── components
│ │ └── download-block
│ │ └── style.module.css
├── actions
│ ├── style.module.css
│ └── package.json
├── author-byline
│ ├── types.ts
│ ├── package.json
│ └── props.js
├── intro
│ └── package.json
├── badge
│ ├── package.json
│ └── types.ts
├── radio-group
│ └── package.json
├── standalone-link
│ ├── package.json
│ ├── types.ts
│ ├── docs.mdx
│ └── props.js
├── related-content
│ ├── package.json
│ └── types.ts
├── split-rich-cta-list
│ ├── img
│ │ └── arrow-right.svg
│ └── CHANGELOG.md
├── content-cta
│ ├── docs.mdx
│ └── package.json
└── next-steps
│ └── package.json
├── .gitignore
├── global.d.ts
├── postcss.config.js
├── .env
├── next-env.d.ts
├── .stylelintrc.js
├── prettier.config.js
├── .copywrite.hcl
├── graphql.d.ts
├── swingset-extensions
├── next-router-debugger
│ └── style.module.css
├── usage-details
│ ├── usage-details.module.css
│ ├── svg
│ │ ├── x-icon.svg
│ │ ├── external-link.svg
│ │ └── loading-spinner.svg
│ ├── utils
│ │ └── query-string.js
│ └── partials
│ │ ├── package-version
│ │ └── style.module.css
│ │ ├── project-list-item
│ │ └── project-list-item.module.css
│ │ └── top-bar
│ │ └── top-bar.module.css
├── playground
│ ├── hooks
│ │ └── use-safe-layout-effect.ts
│ ├── components
│ │ ├── button-with-icon.module.css
│ │ ├── button-with-icon.tsx
│ │ ├── icon-refresh.tsx
│ │ ├── icon-copy.tsx
│ │ ├── icon-maximize.tsx
│ │ └── icon-minimize.tsx
│ └── lib
│ │ └── get-code-from-child-pre.ts
└── formik-state-viewer
│ └── style.module.css
├── pages
├── global.css
└── _app.jsx
├── .eslintrc.js
├── jest.config.js
├── __test-helpers
└── expect-throw.js
├── .github
└── workflows
│ ├── release.yml
│ └── canary-release.yml
├── .changeset
├── README.md
└── config.json
├── props.js
├── scripts
└── release-check-branch.sh
└── tsconfig.json
/.nvmrc:
--------------------------------------------------------------------------------
1 | v16
2 |
--------------------------------------------------------------------------------
/.npmrc:
--------------------------------------------------------------------------------
1 | engine-strict=true
2 |
--------------------------------------------------------------------------------
/CODEOWNERS:
--------------------------------------------------------------------------------
1 | * @hashicorp/web-presence
2 |
--------------------------------------------------------------------------------
/packages/select-input/README.md:
--------------------------------------------------------------------------------
1 | # Select Input
2 |
--------------------------------------------------------------------------------
/packages/alert/.npmignore:
--------------------------------------------------------------------------------
1 | docs.mdx
2 | props.js
3 | *.test.js
--------------------------------------------------------------------------------
/packages/button/.npmignore:
--------------------------------------------------------------------------------
1 | docs.mdx
2 | props.js
3 | *.test.js
--------------------------------------------------------------------------------
/packages/callouts/.npmignore:
--------------------------------------------------------------------------------
1 | docs.mdx
2 | props.js
3 | *.test.js
--------------------------------------------------------------------------------
/packages/combobox/.npmignore:
--------------------------------------------------------------------------------
1 | docs.mdx
2 | props.js
3 | *.test.js
--------------------------------------------------------------------------------
/packages/content/.npmignore:
--------------------------------------------------------------------------------
1 | docs.mdx
2 | props.js
3 | *.test.js
--------------------------------------------------------------------------------
/packages/head/.npmignore:
--------------------------------------------------------------------------------
1 | docs.mdx
2 | props.js
3 | *.test.js
--------------------------------------------------------------------------------
/packages/hero/.npmignore:
--------------------------------------------------------------------------------
1 | docs.mdx
2 | props.js
3 | *.test.js
--------------------------------------------------------------------------------
/packages/image/.npmignore:
--------------------------------------------------------------------------------
1 | docs.mdx
2 | props.js
3 | *.test.js
--------------------------------------------------------------------------------
/packages/search/.npmignore:
--------------------------------------------------------------------------------
1 | docs.mdx
2 | props.js
3 | *.test.js
--------------------------------------------------------------------------------
/packages/subnav/.npmignore:
--------------------------------------------------------------------------------
1 | docs.mdx
2 | props.js
3 | *.test.js
--------------------------------------------------------------------------------
/packages/tabs/.npmignore:
--------------------------------------------------------------------------------
1 | docs.mdx
2 | props.js
3 | *.test.js
--------------------------------------------------------------------------------
/packages/terminal/.npmignore:
--------------------------------------------------------------------------------
1 | docs.mdx
2 | props.js
3 | *.test.js
--------------------------------------------------------------------------------
/packages/toggle/.npmignore:
--------------------------------------------------------------------------------
1 | docs.mdx
2 | props.js
3 | *.test.js
--------------------------------------------------------------------------------
/packages/accordion/.npmignore:
--------------------------------------------------------------------------------
1 | docs.mdx
2 | props.js
3 | *.test.js
--------------------------------------------------------------------------------
/packages/alert-banner/.npmignore:
--------------------------------------------------------------------------------
1 | docs.mdx
2 | props.js
3 | *.test.js
--------------------------------------------------------------------------------
/packages/code-block/.npmignore:
--------------------------------------------------------------------------------
1 | docs.mdx
2 | props.js
3 | *.test.js
--------------------------------------------------------------------------------
/packages/docs-sidenav/.npmignore:
--------------------------------------------------------------------------------
1 | docs.mdx
2 | props.js
3 | *.test.js
--------------------------------------------------------------------------------
/packages/learn-callout/.npmignore:
--------------------------------------------------------------------------------
1 | docs.mdx
2 | props.js
3 | *.test.js
--------------------------------------------------------------------------------
/packages/link-wrap/.npmignore:
--------------------------------------------------------------------------------
1 | docs.mdx
2 | props.js
3 | *.test.js
--------------------------------------------------------------------------------
/packages/logo-grid/.npmignore:
--------------------------------------------------------------------------------
1 | docs.mdx
2 | props.js
3 | *.test.js
--------------------------------------------------------------------------------
/packages/marketo-form/README.md:
--------------------------------------------------------------------------------
1 | # @hashicorp/react-marketo-form
2 |
--------------------------------------------------------------------------------
/packages/select-input/.npmignore:
--------------------------------------------------------------------------------
1 | docs.mdx
2 | props.js
3 | *.test.js
--------------------------------------------------------------------------------
/packages/text-input/.npmignore:
--------------------------------------------------------------------------------
1 | docs.mdx
2 | props.js
3 | *.test.js
--------------------------------------------------------------------------------
/packages/text-split/.npmignore:
--------------------------------------------------------------------------------
1 | docs.mdx
2 | props.js
3 | *.test.js
--------------------------------------------------------------------------------
/packages/text-splits/.npmignore:
--------------------------------------------------------------------------------
1 | docs.mdx
2 | props.js
3 | *.test.js
--------------------------------------------------------------------------------
/packages/use-cases/.npmignore:
--------------------------------------------------------------------------------
1 | docs.mdx
2 | props.js
3 | *.test.js
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules
3 | .next
4 | out
5 | .env.local
--------------------------------------------------------------------------------
/packages/call-to-action/.npmignore:
--------------------------------------------------------------------------------
1 | docs.mdx
2 | props.js
3 | *.test.js
--------------------------------------------------------------------------------
/packages/checkbox-input/.npmignore:
--------------------------------------------------------------------------------
1 | docs.mdx
2 | props.js
3 | *.test.js
--------------------------------------------------------------------------------
/packages/consent-manager/.npmignore:
--------------------------------------------------------------------------------
1 | docs.mdx
2 | props.js
3 | *.test.js
--------------------------------------------------------------------------------
/packages/enterprise-alert/.npmignore:
--------------------------------------------------------------------------------
1 | docs.mdx
2 | props.js
3 | *.test.js
--------------------------------------------------------------------------------
/packages/hashi-stack-menu/.npmignore:
--------------------------------------------------------------------------------
1 | docs.mdx
2 | props.js
3 | *.test.js
--------------------------------------------------------------------------------
/packages/section-header/.npmignore:
--------------------------------------------------------------------------------
1 | docs.mdx
2 | props.js
3 | *.test.js
--------------------------------------------------------------------------------
/packages/sentinel-embedded/.npmignore:
--------------------------------------------------------------------------------
1 | docs.mdx
2 | props.js
3 | *.test.js
--------------------------------------------------------------------------------
/packages/tabbed-accordion/.npmignore:
--------------------------------------------------------------------------------
1 | docs.mdx
2 | props.js
3 | *.test.js
--------------------------------------------------------------------------------
/packages/textarea-input/.npmignore:
--------------------------------------------------------------------------------
1 | docs.mdx
2 | props.js
3 | *.test.js
--------------------------------------------------------------------------------
/packages/product-download-page/.npmignore:
--------------------------------------------------------------------------------
1 | docs.mdx
2 | props.js
3 | *.test.js
--------------------------------------------------------------------------------
/packages/product-features-list/.npmignore:
--------------------------------------------------------------------------------
1 | docs.mdx
2 | props.js
3 | *.test.js
--------------------------------------------------------------------------------
/packages/stepped-feature-list/.npmignore:
--------------------------------------------------------------------------------
1 | docs.mdx
2 | props.js
3 | *.test.js
--------------------------------------------------------------------------------
/packages/text-split-with-code/.npmignore:
--------------------------------------------------------------------------------
1 | docs.mdx
2 | props.js
3 | *.test.js
--------------------------------------------------------------------------------
/packages/text-split-with-image/.npmignore:
--------------------------------------------------------------------------------
1 | docs.mdx
2 | props.js
3 | *.test.js
--------------------------------------------------------------------------------
/packages/text-split-with-logo-grid/.npmignore:
--------------------------------------------------------------------------------
1 | docs.mdx
2 | props.js
3 | *.test.js
--------------------------------------------------------------------------------
/packages/vertical-text-block-list/.npmignore:
--------------------------------------------------------------------------------
1 | docs.mdx
2 | props.js
3 | *.test.js
--------------------------------------------------------------------------------
/packages/markdown-page/.npmignore:
--------------------------------------------------------------------------------
1 | docs.mdx
2 | props.js
3 | *.test.js
4 | fixtures
5 |
--------------------------------------------------------------------------------
/packages/docs-page/.npmignore:
--------------------------------------------------------------------------------
1 | docs.mdx
2 | props.js
3 | *.test.*
4 |
5 | __fixtures__
6 | __snapshots__
--------------------------------------------------------------------------------
/packages/product-features-list/README.md:
--------------------------------------------------------------------------------
1 | # Product Features List
2 |
3 | A list for product features
4 |
--------------------------------------------------------------------------------
/packages/featured-slider/README.md:
--------------------------------------------------------------------------------
1 | # Featured Slider
2 |
3 | A slider for featuring and linking to use cases
4 |
--------------------------------------------------------------------------------
/packages/tabbed-accordion/README.md:
--------------------------------------------------------------------------------
1 | # TabbedAccordion
2 |
3 | Display a set of Accordion items grouped under tabs.
4 |
--------------------------------------------------------------------------------
/packages/call-to-action/README.md:
--------------------------------------------------------------------------------
1 | # Call To Action
2 |
3 | Display a title, content, and links in a call-to-action format.
4 |
--------------------------------------------------------------------------------
/packages/text-split/README.md:
--------------------------------------------------------------------------------
1 | # Text Split
2 |
3 | Display a title, description, and links alongside arbitrary content.
4 |
--------------------------------------------------------------------------------
/packages/sentinel-embedded/README.md:
--------------------------------------------------------------------------------
1 | # Sentinel embedded playground
2 |
3 | Provides support for embedding the Sentinel playground.
--------------------------------------------------------------------------------
/packages/markdown-page/fixtures/test-page.mdx:
--------------------------------------------------------------------------------
1 | # Test Page
2 |
3 | This is a cool test page for the ` ` component, wow!
4 |
--------------------------------------------------------------------------------
/packages/toggle/readme.md:
--------------------------------------------------------------------------------
1 | # Toggle
2 |
3 | A simple toggle component.
4 |
5 | ### Props
6 |
7 | - `enabled` (boolean) - State of toggle
8 |
--------------------------------------------------------------------------------
/packages/button/fragment.graphql:
--------------------------------------------------------------------------------
1 | fragment buttonFields on SbcButtonV2Record {
2 | id
3 | title
4 | url
5 | external
6 | brand
7 | }
8 |
--------------------------------------------------------------------------------
/packages/alert/fragment.graphql:
--------------------------------------------------------------------------------
1 | fragment alertFields on AlertRecord {
2 | id
3 | tag
4 | text
5 | textColor
6 | tagColor
7 | url
8 | }
9 |
--------------------------------------------------------------------------------
/packages/form-fields/index.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | export default {}
7 |
--------------------------------------------------------------------------------
/packages/image/fragment.graphql:
--------------------------------------------------------------------------------
1 | fragment imageFields on FileFieldInterface {
2 | id
3 | url
4 | alt
5 | format
6 | width
7 | height
8 | }
9 |
--------------------------------------------------------------------------------
/packages/docs-page/content-api/__fixtures__/document_404.json:
--------------------------------------------------------------------------------
1 | {
2 | "meta": {
3 | "status_code": 404,
4 | "status_text": "Not Found"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/packages/docs-page/content-api/__fixtures__/navData_404.json:
--------------------------------------------------------------------------------
1 | {
2 | "meta": {
3 | "status_code": 404,
4 | "status_text": "Not Found"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/global.d.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | ///
7 |
--------------------------------------------------------------------------------
/packages/hashi-stack-menu/README.md:
--------------------------------------------------------------------------------
1 | # HashiStack Menu
2 |
3 | Display the entire suite of products, platforms, and technologies provided by HashiCorp in a single menu
4 |
--------------------------------------------------------------------------------
/packages/markdown-page/fixtures/test-page-with-component.mdx:
--------------------------------------------------------------------------------
1 | # Test Page
2 |
3 | Check out this custom component:
4 |
5 |
6 |
7 | how great is that?
8 |
--------------------------------------------------------------------------------
/packages/inline-video/README.md:
--------------------------------------------------------------------------------
1 | # InlineVideo
2 |
3 | Featured video with optional description.
4 |
5 | ### Props
6 |
7 | See [the props file](props.js) for more details.
8 |
--------------------------------------------------------------------------------
/packages/section-header/fragment.graphql:
--------------------------------------------------------------------------------
1 | fragment sectionHeaderFields on SbcSectionHeaderRecord {
2 | id
3 | headline
4 | description(markdown: true)
5 | useH1
6 | }
7 |
--------------------------------------------------------------------------------
/packages/text-splits/README.md:
--------------------------------------------------------------------------------
1 | # Text Splits
2 |
3 | Display an array of `text-split` components, automatically switching to the appropriate component for each array item.
4 |
--------------------------------------------------------------------------------
/packages/docs-page/content-api/__fixtures__/versionMetadata_empty.json:
--------------------------------------------------------------------------------
1 | {
2 | "meta": {
3 | "status_code": 200,
4 | "status_text": "OK"
5 | },
6 | "result": []
7 | }
8 |
--------------------------------------------------------------------------------
/packages/code-block/mdx/style.module.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | .codeMargin {
7 | margin: 1.5rem 0;
8 | }
9 |
--------------------------------------------------------------------------------
/packages/docs-sidenav/icons/bullet.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/packages/alert-banner/fragment.graphql:
--------------------------------------------------------------------------------
1 | fragment alertBannerFields on AlertBannerRecord {
2 | id
3 | tag
4 | theme
5 | text
6 | linkText
7 | url
8 | expirationDate
9 | }
10 |
--------------------------------------------------------------------------------
/postcss.config.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | module.exports = {
7 | ...require('@hashicorp/platform-postcss-config'),
8 | }
9 |
--------------------------------------------------------------------------------
/.env:
--------------------------------------------------------------------------------
1 | NEXT_PUBLIC_ALGOLIA_APP_ID=YY0FFNI7MF
2 | NEXT_PUBLIC_ALGOLIA_INDEX=react-components_TEST
3 | NEXT_PUBLIC_ALGOLIA_SEARCH_ONLY_API_KEY=44ed2a0b923b306ea74acd4ac0dee741
4 | OCKTOKIT_ACCESS_TOKEN=abcd_TEST
--------------------------------------------------------------------------------
/packages/alert-banner/README.md:
--------------------------------------------------------------------------------
1 | ### Alert Banner
2 |
3 | An alert banner that links somewhere, such as to a new release or announcement. Sets a cookie when closed to hide itself on future page visits.
4 |
--------------------------------------------------------------------------------
/packages/code-block/fragment.graphql:
--------------------------------------------------------------------------------
1 | fragment codeBlockFields on SbcCodeBlockRecord {
2 | id
3 | code
4 | chrome
5 | language {
6 | slug
7 | position
8 | name
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/packages/content/styles/p.module.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | .p {
7 | & p {
8 | margin: 20px 0;
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/packages/accordion/readme.md:
--------------------------------------------------------------------------------
1 | # Accordion
2 |
3 | Display a list of titled items with expandable content.
4 |
5 | [See Accordion Documentation Here](https://react-components.vercel.app/?component=Accordion)
6 |
--------------------------------------------------------------------------------
/packages/marketo-form/server/index.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | import { buildApiRoutes } from './api-routes'
7 |
8 | export { buildApiRoutes }
9 |
--------------------------------------------------------------------------------
/packages/content/styles/strong.module.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | .strong {
7 | & strong {
8 | color: var(--black);
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/packages/inline-svg/README.md:
--------------------------------------------------------------------------------
1 | # InlineSvg
2 |
3 | The `` component renders an `` from a given string.
4 |
5 | ## Installation
6 |
7 | ```sh
8 | npm install @hashicorp/react-inline-svg
9 | ```
10 |
--------------------------------------------------------------------------------
/packages/video-feature/README.md:
--------------------------------------------------------------------------------
1 | # VideoFeature
2 |
3 | A component used to showcase a video alongside more details about its content and creator.
4 |
5 | ### Props
6 |
7 | See [the props file](props.js) for more details.
8 |
--------------------------------------------------------------------------------
/next-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 |
4 | // NOTE: This file should not be edited
5 | // see https://nextjs.org/docs/basic-features/typescript for more information.
6 |
--------------------------------------------------------------------------------
/packages/stepped-feature-list/README.md:
--------------------------------------------------------------------------------
1 | # SteppedFeatureList
2 |
3 | The ` ` component renders a stepped list (on larger breakpoints) and a carousel (on mobile breakpoints) to navigate through
4 | a list of features.
5 |
--------------------------------------------------------------------------------
/packages/tabs/icons/chevron-right.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/terminal/README.md:
--------------------------------------------------------------------------------
1 | # Alert
2 |
3 | The `` is a representation of a terminal in a static state.
4 |
5 | ## Installation
6 |
7 | ```sh
8 | npm install @hashicorp/react-command-line-terminal
9 | ```
10 |
--------------------------------------------------------------------------------
/packages/text-split-with-image/styles/text-split-with-image.module.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | .imgElem {
7 | display: block;
8 | width: 100%;
9 | }
10 |
--------------------------------------------------------------------------------
/packages/markdown-page/fixtures/test-component.jsx:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | export default function TestComponent() {
7 | return hello im a test component!
8 | }
9 |
--------------------------------------------------------------------------------
/packages/tabs/style.module.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | .content {
7 | composes: g-grid-container from global;
8 | color: var(--content-default-color);
9 | }
10 |
--------------------------------------------------------------------------------
/packages/close-button/docs.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | componentName: 'CloseButton'
3 | ---
4 |
5 |
6 | {` {}} ariaLabel="Close video" />`}
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/packages/content/styles/img.module.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | .img {
7 | & img {
8 | margin: 1rem auto;
9 | width: 100%;
10 | height: auto;
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/packages/learn-callout/README.md:
--------------------------------------------------------------------------------
1 | # LearnCallout
2 |
3 | The ` ` component renders callouts that lead to guides on HashiCorp Learn.
4 |
5 | ## Installation
6 |
7 | ```sh
8 | npm install @hashicorp/react-learn-callout
9 | ```
10 |
--------------------------------------------------------------------------------
/.stylelintrc.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | module.exports = {
7 | ...require('@hashicorp/platform-cli/config/stylelint.config.js'),
8 | /* Specify overrides here */
9 | }
10 |
--------------------------------------------------------------------------------
/packages/accordion/style.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | @import './styles/index.css';
7 | @import './partials/AccordionItems/style.css';
8 | @import './partials/Collapsible/style.css';
9 |
--------------------------------------------------------------------------------
/packages/content/styles/iframe.module.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | .iframe {
7 | & iframe:not([class]) {
8 | margin: 1rem auto;
9 | max-width: 100%;
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/packages/form-fields/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@hashicorp/react-form-fields",
3 | "version": "0.2.2",
4 | "dependencies": {
5 | "@hashicorp/flight-icons": "^2.5.0",
6 | "classnames": "^2.3.2",
7 | "clsx": "^1.2.1"
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/packages/hashi-stack-menu/assets/icon-dropdown-gray-1.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/hashi-stack-menu/assets/icon-dropdown-gray-3.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/notification/README.md:
--------------------------------------------------------------------------------
1 | # Notification
2 |
3 | > A suite of components for rendering notifications
4 |
5 | A large portion of the core library is lifted from [react-hot-toast](https://react-hot-toast.com/) and modified to fit our specific needs.
6 |
--------------------------------------------------------------------------------
/prettier.config.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | module.exports = {
7 | ...require('@hashicorp/platform-cli/config/prettier.config.js'),
8 | /* Specify overrides here */
9 | }
10 |
--------------------------------------------------------------------------------
/.copywrite.hcl:
--------------------------------------------------------------------------------
1 | schema_version = 1
2 |
3 | project {
4 | license = "MPL-2.0"
5 | # The year the repo was created, matches the HashiCorp default
6 | copyright_year = 2020
7 |
8 | header_ignore = [
9 | "next-env.d.ts",
10 | ]
11 | }
12 |
--------------------------------------------------------------------------------
/graphql.d.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | declare module '*.graphql' {
7 | import { DocumentNode } from 'graphql'
8 |
9 | const value: DocumentNode
10 | export = value
11 | }
12 |
--------------------------------------------------------------------------------
/swingset-extensions/next-router-debugger/style.module.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | .debugger {
7 | border: 1px dashed red;
8 | font-size: 0.75em;
9 | padding: 12px;
10 | }
11 |
--------------------------------------------------------------------------------
/packages/accordion/partials/AccordionItems/icons/arrow-down.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/inline-svg/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | export default function InlineSvg({ src, ...props }) {
7 | return
8 | }
9 |
--------------------------------------------------------------------------------
/packages/notification/components/notification-with-language/flags/es.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/pages/global.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | @import '~@hashicorp/mktg-global-styles/style.css';
7 |
8 | .swingset-logo {
9 | margin: 1rem 1rem 0.25rem 2rem;
10 | height: 32px;
11 | }
12 |
--------------------------------------------------------------------------------
/packages/alert/README.md:
--------------------------------------------------------------------------------
1 | # Alert
2 |
3 | The `` component renders a small alert banner with a link. It is often used to redirect users to a new release or announcement.
4 |
5 | ## Installation
6 |
7 | ```sh
8 | npm install @hashicorp/react-alert
9 | ```
10 |
--------------------------------------------------------------------------------
/.eslintrc.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | module.exports = {
7 | root: true,
8 | extends: './node_modules/@hashicorp/platform-cli/config/.eslintrc.js',
9 | /* Specify overrides here */
10 | }
11 |
--------------------------------------------------------------------------------
/packages/enterprise-alert/README.md:
--------------------------------------------------------------------------------
1 | # EnterpriseAlert
2 |
3 | The `` component renders an alert used to note the requirement of an enterprise product.
4 |
5 | ## Installation
6 |
7 | ```sh
8 | npm install @hashicorp/react-enterprise-alert
9 | ```
10 |
--------------------------------------------------------------------------------
/packages/subnav/partials/DropdownTrigger/icons/chevron-down.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/packages/code-block/README.md:
--------------------------------------------------------------------------------
1 | # Code Block
2 |
3 | A styled code block with clipboard functionality.
4 |
5 | ## Props
6 |
7 | Refer to our [component playground](https://react-components.hashicorp.vercel.app/?component=CodeBlock) for details on the props this component accepts.
8 |
--------------------------------------------------------------------------------
/packages/consent-manager/style.module.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | .root {
7 | @media only percy {
8 | display: none;
9 | }
10 |
11 | @media print {
12 | display: none;
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/packages/hashi-stack-menu/docs.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | componentName: 'HashiStackMenu'
3 | ---
4 |
5 |
6 | {` `}
7 |
8 |
9 |
10 |
11 | ### Props
12 |
13 |
14 |
--------------------------------------------------------------------------------
/packages/glossary-page/style.module.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | .tableOfContents {
7 | column-width: 14em;
8 | margin-block-start: 0;
9 |
10 | & li:first-of-type {
11 | margin-top: 0;
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/packages/min-100-layout/style.module.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | .root {
7 | display: flex;
8 | min-height: 100vh;
9 | flex-direction: column;
10 | }
11 |
12 | .footer {
13 | margin-top: auto;
14 | }
15 |
--------------------------------------------------------------------------------
/packages/notification/components/notification-with-language/flags/de.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/case-study-slider/readme.md:
--------------------------------------------------------------------------------
1 | # Case Study Slider
2 |
3 | A slider component that can display up to three case studies and allow a visitor to toggle between them, and click through to read.
4 |
5 | ### Props
6 |
7 | See the [props file](props.js) for more details on the component's props!
8 |
--------------------------------------------------------------------------------
/packages/docs-page/server/resolve-nav-data.test.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | import { resolveNavData } from './resolve-nav-data'
7 |
8 | describe('resolveNavData', () => {
9 | it.todo('should resolve nav data')
10 | })
11 |
--------------------------------------------------------------------------------
/packages/content/styles/hr.module.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | .hr {
7 | & hr:not([class]) {
8 | height: 1px;
9 | border: none;
10 | color: var(--gray-5);
11 | background-color: var(--gray-5);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/packages/placeholder/README.md:
--------------------------------------------------------------------------------
1 | # Placeholder
2 |
3 | The ` ` component is used to render pre-styled skeleton loading states.
4 |
5 | ## Installation
6 |
7 | ```sh
8 | npm install @hashicorp/react-placeholder
9 | ```
10 |
11 | ## Usage
12 |
13 | See usage examples in [docs.mdx](docs.mdx).
14 |
--------------------------------------------------------------------------------
/swingset-extensions/usage-details/usage-details.module.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | .root {
7 | margin: 48px 0;
8 | }
9 |
10 | .list {
11 | list-style: none;
12 | padding: 0;
13 | display: flex;
14 | flex-wrap: wrap;
15 | }
16 |
--------------------------------------------------------------------------------
/packages/hero/carousel.test.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | test.todo('renders each video')
7 | test.todo('shows the currently active video')
8 | test.todo('switches videos automatically when one ends')
9 | test.todo('switches videos on click')
10 |
--------------------------------------------------------------------------------
/packages/pricing-tiers/README.md:
--------------------------------------------------------------------------------
1 | # Pricing Tier List
2 |
3 | The ` ` component is used to display a list of cards, each containing pricing-related details on product tiers. Supports a maximum of 5 tiers.
4 |
5 | ## Installation
6 |
7 | ```sh
8 | npm install @hashicorp/react-pricing-tiers
9 | ```
10 |
--------------------------------------------------------------------------------
/packages/button/icons/arrow-right.svg:
--------------------------------------------------------------------------------
1 | Arrow pointing right
2 |
--------------------------------------------------------------------------------
/packages/docs-sidenav/README.md:
--------------------------------------------------------------------------------
1 | # Docs Sidenav
2 |
3 | Side navigation for HashiCorp's product documentation. Fairly tightly tied to our specific documentation sites and the format that middleman uses to catalog pages and frontmatter at the moment.
4 |
5 | ## Props
6 |
7 | See [the props file](props.js) for more details.
8 |
--------------------------------------------------------------------------------
/packages/accordion/partials/Collapsible/style.module.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | .root {
7 | overflow: hidden;
8 | height: 0;
9 | transition: height 0.3s;
10 | }
11 |
12 | .inner {
13 | opacity: 1;
14 | transition: opacity 0.3s;
15 | }
16 |
--------------------------------------------------------------------------------
/packages/callouts/partials/callout-item/fixtures/default.json:
--------------------------------------------------------------------------------
1 | {
2 | "icon": "Default svg title ",
3 | "heading": "My test heading",
4 | "content": "My test content",
5 | "product": "hashicorp",
6 | "link": {
7 | "text": "My test link",
8 | "url": "/some/test/path"
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/packages/feedback-form/icons/thumbs-up.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/packages/hashi-stack-menu/props.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | module.exports = {
7 | onPanelChange: {
8 | type: 'function',
9 | description:
10 | 'An optional callback function run on change of the active panel state',
11 | },
12 | }
13 |
--------------------------------------------------------------------------------
/packages/marketo-form/partials/fields/name-field/style.module.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | .name {
7 | display: grid;
8 | grid-gap: 8px;
9 | @media (--medium-up) {
10 | grid-gap: 32px;
11 | grid-template-columns: 1fr 1fr;
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/packages/marketo-form/partials/label/style.module.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | .label {
7 | color: var(--gray-3);
8 | composes: g-type-label from global;
9 | display: block;
10 | padding-bottom: 8px;
11 | text-transform: uppercase;
12 | }
13 |
--------------------------------------------------------------------------------
/packages/open-api-page/partials/collapsible/style.module.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | .root {
7 | overflow: hidden;
8 | height: 0;
9 | transition: height 0.3s;
10 | }
11 |
12 | .inner {
13 | opacity: 1;
14 | transition: opacity 0.3s;
15 | }
16 |
--------------------------------------------------------------------------------
/swingset-extensions/playground/hooks/use-safe-layout-effect.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | import { useEffect, useLayoutEffect } from 'react'
7 |
8 | export const useSafeLayoutEffect =
9 | typeof window === 'undefined' ? useEffect : useLayoutEffect
10 |
--------------------------------------------------------------------------------
/packages/accordion/style.module.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | .root {
7 | background: var(--white);
8 | padding-top: 128px;
9 | padding-bottom: 128px;
10 | }
11 |
12 | .heading {
13 | composes: g-type-display-2 from global;
14 | margin: 0;
15 | }
16 |
--------------------------------------------------------------------------------
/packages/aside/README.md:
--------------------------------------------------------------------------------
1 | # Aside
2 |
3 | The `` component is used to render a highlighted box of content. It is intended for use in long form content areas.
4 |
5 | ## Installation
6 |
7 | ```sh
8 | npm install @hashicorp/react-aside
9 | ```
10 |
11 | ## Usage
12 |
13 | See usage examples in [docs.mdx](docs.mdx).
14 |
--------------------------------------------------------------------------------
/packages/aside/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # @hashicorp/react-aside
2 |
3 | ## 0.0.1
4 |
5 | ### Patch Changes
6 |
7 | - [#329](https://github.com/hashicorp/react-components/pull/329) [`13d1bfb`](https://github.com/hashicorp/react-components/commit/13d1bfb4d62432a60739a5bd2ae10601cab71811) Thanks [@zchsh](https://github.com/zchsh)! - Adds Aside component
8 |
--------------------------------------------------------------------------------
/packages/head/docs.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | componentName: 'Head'
3 | ---
4 |
5 | A component used to define items in the `` portion of a page. No live example will be shown here as it does not present any UI at all.
6 |
7 |
8 |
9 | ### Props
10 |
11 |
12 |
--------------------------------------------------------------------------------
/jest.config.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | const makeConfig = require('@hashicorp/platform-configs/jest/config')
7 |
8 | module.exports = makeConfig({
9 | setupFilesAfterEnv: ['/__test-helpers/extend-expect.js'],
10 | testEnvironment: 'jsdom',
11 | })
12 |
--------------------------------------------------------------------------------
/packages/marketo-form/contexts/FormMetadata.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | import { createContext } from 'react'
7 | import type { MarketoFormMetadata } from '../types'
8 |
9 | export const FormMetadataContext = createContext(
10 | null
11 | )
12 |
--------------------------------------------------------------------------------
/__test-helpers/expect-throw.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | export default function expectToThrow(fn, throwResult) {
7 | jest.spyOn(console, 'error')
8 | console.error.mockImplementation(() => {})
9 | expect(fn).toThrow(throwResult)
10 | console.error.mockRestore()
11 | }
12 |
--------------------------------------------------------------------------------
/packages/open-api-page/partials/two-column-layout/style.module.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | .twoColumnLayout {
7 | display: grid;
8 | grid-template-columns: 1fr;
9 | grid-gap: 32px;
10 |
11 | @media (--large) {
12 | grid-template-columns: 1fr 1fr;
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/swingset-extensions/playground/components/button-with-icon.module.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | .button {
7 | border: 0;
8 | background: transparent;
9 | vertical-align: middle;
10 | cursor: pointer;
11 |
12 | & svg {
13 | vertical-align: middle;
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/packages/alert-banner/img/close-icon.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/packages/logo-grid/fragment.graphql:
--------------------------------------------------------------------------------
1 | fragment logoGridFields on SbcLogoGridRecord {
2 | id
3 | size
4 | removeBorders
5 | companies {
6 | name
7 | companyType
8 | logo {
9 | ...imageFields
10 | }
11 | monochromeLogo {
12 | ...imageFields
13 | }
14 | integrationPage {
15 | slug
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/packages/marketo-form/partials/fields/htmltext-field/style.module.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | .htmltext {
7 | composes: g-type-body-small from global;
8 | color: var(--wpl-neutral-500);
9 | margin-top: var(--wpl-spacing-02);
10 | margin-bottom: var(--wpl-spacing-05);
11 | }
12 |
--------------------------------------------------------------------------------
/packages/terminal/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # @hashicorp/react-command-line-terminal
2 |
3 | ## 3.0.0
4 |
5 | ### Major Changes
6 |
7 | - [#568](https://github.com/hashicorp/react-components/pull/568) [`26918b9e`](https://github.com/hashicorp/react-components/commit/26918b9e32b3d4882bb18786f09eaa63c178bbc6) Thanks [@dstaley](https://github.com/dstaley)! - Add TypeScript types
8 |
--------------------------------------------------------------------------------
/swingset-extensions/usage-details/svg/x-icon.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/packages/markdown-page/style.module.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | .root {
7 | composes: g-grid-container from global;
8 | margin-top: 75px;
9 | margin-bottom: 75px;
10 |
11 | & article {
12 | padding-left: 0;
13 | max-width: 875px;
14 | margin-left: 0;
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/packages/marketo-form/partials/error-message/style.module.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | .errorText {
7 | --error-text-color: var(--danger);
8 |
9 | composes: g-type-body-small from global;
10 | color: var(--error-text-color);
11 | line-height: 1.4;
12 | margin-top: 4px;
13 | }
14 |
--------------------------------------------------------------------------------
/packages/consent-manager/loader/presets/oss.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | import services from '../services'
7 |
8 | export default {
9 | segmentServices: [
10 | services.googleAnalytics,
11 | services.googleAds,
12 | services.linkedIn,
13 | services.marketo,
14 | ],
15 | }
16 |
--------------------------------------------------------------------------------
/packages/marketo-form/partials/error-message/index.tsx:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | import styles from './style.module.css'
7 |
8 | const ErrorMessage = ({ error }: { error: string }) => {
9 | return {error}
10 | }
11 |
12 | export default ErrorMessage
13 |
--------------------------------------------------------------------------------
/packages/section-header/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # @hashicorp/react-section-header
2 |
3 | ## 5.0.5
4 |
5 | ### Patch Changes
6 |
7 | - [#919](https://github.com/hashicorp/react-components/pull/919) [`7a22a4bf`](https://github.com/hashicorp/react-components/commit/7a22a4bf417f11adbe3daada16dc2878d07e928c) Thanks [@dstaley](https://github.com/dstaley)! - Add ID field to GraphQL query
8 |
--------------------------------------------------------------------------------
/.github/workflows/release.yml:
--------------------------------------------------------------------------------
1 | name: Release
2 |
3 | on:
4 | push:
5 | branches:
6 | - main
7 |
8 | jobs:
9 | release:
10 | uses: hashicorp/web-platform-packages/.github/workflows/release.yml@5eee43c8a4a8f311e08f473132c617f757a8c6b5
11 | secrets:
12 | CHANGESETS_PAT: ${{ secrets.CHANGESETS_PAT }}
13 | NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
14 |
--------------------------------------------------------------------------------
/packages/inline-svg/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # @hashicorp/react-inline-svg
2 |
3 | ## 6.1.0
4 |
5 | ### Minor Changes
6 |
7 | - [#823](https://github.com/hashicorp/react-components/pull/823) [`80ef3a38`](https://github.com/hashicorp/react-components/commit/80ef3a38ba67e23ba2d019530fb57d218e9d8268) Thanks [@alexcarpenter](https://github.com/alexcarpenter)! - Update neutral and blue colors
8 |
--------------------------------------------------------------------------------
/packages/text-split/partials/checkbox-list/icons/check-square.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/packages/card/career-card/style.module.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | .bottom {
7 | display: flex;
8 | align-items: flex-end;
9 | height: 100%;
10 | }
11 |
12 | .subHeading {
13 | composes: g-type-body-small-x-strong from global;
14 | margin: 0;
15 | color: var(--secondary-text-color);
16 | }
17 |
--------------------------------------------------------------------------------
/packages/content/styles/blockquote.module.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | .blockquote {
7 | & blockquote {
8 | margin: 2em 0;
9 | padding-left: 2em;
10 | font-style: italic;
11 | border-left: 6px solid var(--gray-6);
12 | & em {
13 | font-style: normal;
14 | }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/packages/stepped-feature-list/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # @hashicorp/react-stepped-feature-list
2 |
3 | ## 4.0.4
4 |
5 | ### Patch Changes
6 |
7 | - [#498](https://github.com/hashicorp/react-components/pull/498) [`e60fa8f`](https://github.com/hashicorp/react-components/commit/e60fa8f437a98f97f6c0ed396f194192cf5e376e) Thanks [@BRKalow](https://github.com/BRKalow)! - Bumps underlying dependencies.
8 |
--------------------------------------------------------------------------------
/packages/link-wrap/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # @hashicorp/react-link-wrap
2 |
3 | ## 3.1.0
4 |
5 | ### Minor Changes
6 |
7 | - [#808](https://github.com/hashicorp/react-components/pull/808) [`45fe15ee`](https://github.com/hashicorp/react-components/commit/45fe15eec86e09d324624b0398e81edd92b3af37) Thanks [@dstaley](https://github.com/dstaley)! - Use `legacyBehavior` prop for `next/link` to support Next v13
8 |
--------------------------------------------------------------------------------
/packages/error-view/props.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | module.exports = {
7 | statusCode: {
8 | type: 'number',
9 | description:
10 | 'Integer representing an HTTP response status code. Passing `404` will render "Not Found" vibes, passing any other error code will render generic error vibes.',
11 | },
12 | }
13 |
--------------------------------------------------------------------------------
/swingset-extensions/usage-details/utils/query-string.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | function qs(params) {
7 | return Object.keys(params)
8 | .map((key) => {
9 | const [k, v] = [key, params[key]].map(encodeURIComponent)
10 | return `${k}=${v}`
11 | })
12 | .join('&')
13 | }
14 |
15 | export default qs
16 |
--------------------------------------------------------------------------------
/packages/button/icons/corner-right-down.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/packages/consent-manager/loader/presets/enterprise.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | import services from '../services'
7 |
8 | export default {
9 | segmentServices: [
10 | services.googleAnalytics,
11 | services.googleTagManager,
12 | services.linkedIn,
13 | services.marketo,
14 | services.googleAds,
15 | ],
16 | }
17 |
--------------------------------------------------------------------------------
/packages/placeholder/props.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | module.exports = {
7 | children: {
8 | type: 'function',
9 | description:
10 | 'Render prop used to render the placeholder layout. The function accepts a single argument, which is the renderable placeholder component.',
11 | required: true,
12 | },
13 | }
14 |
--------------------------------------------------------------------------------
/packages/accordion/partials/AccordionItems/fixtures/default.json:
--------------------------------------------------------------------------------
1 | {
2 | "items": [
3 | {
4 | "heading": "My Accordion Item",
5 | "content": "This is text in the collapsable area"
6 | },
7 | {
8 | "heading": "Another Accordion Item",
9 | "content": "This is some text content with some strong text and some code as well."
10 | }
11 | ]
12 | }
13 |
--------------------------------------------------------------------------------
/packages/docs-page/server/consts.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | /**
7 | * So far, we have a pattern of using a common value for
8 | * docs catchall route parameters: route/[[...page]].jsx.
9 | * This default parameter ID captures that pattern.
10 | * It can be overridden via options.
11 | */
12 | export const DEFAULT_PARAM_ID = 'page'
13 |
--------------------------------------------------------------------------------
/packages/inline-video/types.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | export interface InlineVideoProps {
7 | appearance?: 'light' | 'dark'
8 | url: string
9 | description?: string
10 | solution?: 'infrastructure' | 'security' | 'networking' | 'applications'
11 | gradientPosition?: 'left' | 'right' | false
12 | videoClassName?: string
13 | }
14 |
--------------------------------------------------------------------------------
/packages/marketo-form/index.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | import { useFormContext, useFormState, useWatch } from 'react-hook-form'
7 | import Form, { defaultFieldGroupings } from './form'
8 | import Field from './partials/field'
9 |
10 | export { useFormContext, useFormState, useWatch, defaultFieldGroupings, Field }
11 | export default Form
12 |
--------------------------------------------------------------------------------
/packages/search/img/return.svg.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | export default ` `
7 |
--------------------------------------------------------------------------------
/packages/section-header/README.md:
--------------------------------------------------------------------------------
1 | # Section Header
2 |
3 | Very simple headline & subheading for a section of a page.
4 |
5 | ### Params
6 |
7 | - `headline` (str) _[optional]_ - primary headline
8 | - `description` (str) _[optional]_ - smaller text under the headline, markdown enabled
9 | - `useH1` (bool) _[optional]_ - whether or not to use a h1 for the headline
10 |
11 | ### Dependents
12 |
13 | - sales-form
14 |
--------------------------------------------------------------------------------
/packages/hashi-stack-menu/browse-panel/index.jsx:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | import styles from './browse-panel.module.css'
7 |
8 | export default function BrowsePanel({ isOpen, children }) {
9 | return (
10 |
13 | )
14 | }
15 |
--------------------------------------------------------------------------------
/swingset-extensions/playground/components/button-with-icon.tsx:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | import s from './button-with-icon.module.css'
7 |
8 | export const ButtonWithIcon = ({ children, title, onClick }) => {
9 | return (
10 |
11 | {children}
12 |
13 | )
14 | }
15 |
--------------------------------------------------------------------------------
/packages/card/README.md:
--------------------------------------------------------------------------------
1 | # Card
2 |
3 | A component used to promote and link to marketing pages, always using a descriptive heading but optionally other elements as needed.
4 |
5 | ### Props
6 |
7 | See [the props file](props.js) for more details.
8 |
9 | ### Notes
10 |
11 | Sub-components of this card can be directly accessed from the base component (e.g.: ` `) and used to compose the card's `children`.
12 |
--------------------------------------------------------------------------------
/packages/docs-sidenav/icons/search.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/packages/pricing-tiers/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@hashicorp/react-pricing-tiers",
3 | "version": "0.2.1",
4 | "description": "",
5 | "author": "HashiCorp",
6 | "license": "MPL-2.0",
7 | "dependencies": {
8 | "classnames": "^2.3.1",
9 | "@hashicorp/react-button": "^6.3.0"
10 | },
11 | "peerDependencies": {
12 | "@hashicorp/mktg-global-styles": ">=3.x",
13 | "react": ">=16.x"
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/packages/text-input/docs.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | componentName: TextInput
3 | ---
4 |
5 | A text input to be used within Formik forms.
6 |
7 |
8 | {` `}
12 |
13 |
14 |
15 |
16 | ### Props
17 |
18 |
19 |
--------------------------------------------------------------------------------
/swingset-extensions/playground/lib/get-code-from-child-pre.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | import { ReactElement } from 'react'
7 |
8 | /**
9 | * Pulls out the text node child of a pre element rendered via MDX
10 | */
11 | export function getCodeFromChildPre(child: ReactElement): string {
12 | return child?.props?.children?.props?.children ?? ''
13 | }
14 |
--------------------------------------------------------------------------------
/packages/sentinel-embedded/docs.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | componentName: SentinelEmbedded
3 | ---
4 |
5 | An embedded version of the Sentinel playground.
6 |
7 |
8 | {` `}
12 |
13 |
14 |
15 |
16 | ### Props
17 |
18 |
19 |
--------------------------------------------------------------------------------
/packages/textarea-input/docs.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | componentName: TextareaInput
3 | ---
4 |
5 | A textarea input to be used within Formik forms.
6 |
7 | {` `}
11 |
12 |
13 |
14 | ### Props
15 |
16 |
17 |
--------------------------------------------------------------------------------
/packages/hashi-stack-menu/assets/icon-arrow.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/min-100-layout/README.md:
--------------------------------------------------------------------------------
1 | # Min100Layout
2 |
3 | The ` ` component is used to render page layouts that include footers, and are intended to have a minimum height of `100vh`, such that the footer always appears at the bottom of the viewport.
4 |
5 | ## Installation
6 |
7 | ```sh
8 | npm install @hashicorp/react-min-100-layout
9 | ```
10 |
11 | ## Usage
12 |
13 | See usage examples in [docs.mdx](docs.mdx).
14 |
--------------------------------------------------------------------------------
/packages/product-badge/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@hashicorp/react-product-badge",
3 | "version": "0.3.0",
4 | "description": "",
5 | "author": "HashiCorp",
6 | "license": "MPL-2.0",
7 | "dependencies": {
8 | "classnames": "^2.3.1"
9 | },
10 | "peerDependencies": {
11 | "@hashicorp/mktg-global-styles": ">=3.x",
12 | "@hashicorp/platform-product-meta": "^0.1.0",
13 | "react": ">=16.x"
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/packages/search/img/search-x.svg.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | export default ` `
7 |
--------------------------------------------------------------------------------
/packages/notification/components/notification-with-language/flags/fr.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/notification/components/notification-with-language/flags/jp.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/toggle/props.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | module.exports = {
7 | enabled: {
8 | type: 'boolean',
9 | description: 'Whether the toggle is on or off',
10 | default: false,
11 | },
12 | onChange: {
13 | type: 'function',
14 | description:
15 | 'Function that will be called when the toggle is changed to on or off',
16 | },
17 | }
18 |
--------------------------------------------------------------------------------
/packages/button/icons/download.svg:
--------------------------------------------------------------------------------
1 | Download icon
2 |
--------------------------------------------------------------------------------
/packages/search/types.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | export interface AlgoliaConfigObject {
7 | /** The ID of the target Algolia application. */
8 | appId?: string
9 | /** The name of the index to search. */
10 | indexName?: string
11 | /** A publishable search-only API key that can access the provided application and index. */
12 | searchOnlyApiKey?: string
13 | }
14 |
--------------------------------------------------------------------------------
/packages/quote/types.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | import type { AuthorBylineProps } from '@hashicorp/react-author-byline/types'
7 |
8 | export interface QuoteProps extends AuthorBylineProps {
9 | /**
10 | * The display size the text should render as.
11 | */
12 | textSize?: 4 | 5
13 | /**
14 | * The text displayed as the quote
15 | */
16 | text: string
17 | }
18 |
--------------------------------------------------------------------------------
/packages/products-used/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@hashicorp/react-products-used",
3 | "version": "1.3.0",
4 | "description": "",
5 | "author": "HashiCorp",
6 | "license": "MPL-2.0",
7 | "peerDependencies": {
8 | "@hashicorp/mktg-global-styles": ">=3.x"
9 | },
10 | "repository": {
11 | "type": "git",
12 | "url": "https://github.com/hashicorp/react-components.git",
13 | "directory": "packages/products-used"
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/packages/motion-config/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@hashicorp/react-motion-config",
3 | "version": "0.3.0",
4 | "description": "",
5 | "author": "HashiCorp",
6 | "license": "MPL-2.0",
7 | "peerDependencies": {
8 | "react": ">=16.x",
9 | "framer-motion": "^6.3.11"
10 | },
11 | "repository": {
12 | "type": "git",
13 | "url": "https://github.com/hashicorp/react-components.git",
14 | "directory": "packages/motion-config"
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/.github/workflows/canary-release.yml:
--------------------------------------------------------------------------------
1 | name: Canary Release
2 |
3 | on:
4 | pull_request:
5 | types:
6 | - opened
7 | - synchronize
8 | - reopened
9 | - labeled
10 |
11 | jobs:
12 | release-canary:
13 | uses: hashicorp/web-platform-packages/.github/workflows/canary-release.yml@5eee43c8a4a8f311e08f473132c617f757a8c6b5
14 | secrets:
15 | CHANGESETS_PAT: ${{ secrets.CHANGESETS_PAT }}
16 | NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
17 |
--------------------------------------------------------------------------------
/packages/motion-config/index.tsx:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | import { LazyMotion } from 'framer-motion'
7 |
8 | export default function MotionConfig({ children }) {
9 | return (
10 | import('./features').then((mod) => mod.default)}
12 | strict={process.env.NODE_ENV === 'development'}
13 | >
14 | {children}
15 |
16 | )
17 | }
18 |
--------------------------------------------------------------------------------
/pages/_app.jsx:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | import './global.css'
7 | import { TabProvider } from '../packages/tabs'
8 | import MotionConfig from '../packages/motion-config'
9 |
10 | export default function MyApp({ Component, pageProps }) {
11 | return (
12 |
13 |
14 |
15 |
16 |
17 | )
18 | }
19 |
--------------------------------------------------------------------------------
/packages/text-split-with-logo-grid/README.md:
--------------------------------------------------------------------------------
1 | # Text Split With Logo Grid
2 |
3 | Display a logo grid alongside a title, description, and links.
4 |
5 | ## Note on Props
6 |
7 | - `logoSlugs` are mapped to SVG images through the [`mktg-assets`](https://github.com/hashicorp/mktg-assets) package. These are then passed as an array of `images` to `@hashicorp/react-text-split-with-image-grid`.
8 | - `textSplit` props are passed directly through to `@hashicorp/react-text-split-with-image-grid`.
9 |
--------------------------------------------------------------------------------
/packages/feedback-form/README.md:
--------------------------------------------------------------------------------
1 | # FeedbackForm
2 |
3 | The ` ` component is used to render a multi-step feedback form. Useful for collecting feedback from users at the bottom of pages.
4 |
5 | ## Installation
6 |
7 | ```sh
8 | npm install @hashicorp/react-feedback-form
9 | ```
10 |
11 | ## Usage
12 |
13 | See usage example in [docs.mdx](docs.mdx). To collect the feedback, pass in an `onQuestionSubmit` callback. For additional props detail, see [props.js](props.js).
14 |
--------------------------------------------------------------------------------
/packages/open-api-page/README.md:
--------------------------------------------------------------------------------
1 | # OpenApiPage
2 |
3 | The ` ` component, and related server utilities, are used to render documentation pages for a provided [Swagger OpenAPI 2.0 specification](https://swagger.io/specification/v2/).
4 |
5 | ## Installation
6 |
7 | ```sh
8 | npm install @hashicorp/react-open-api-page
9 | ```
10 |
11 | ## Usage
12 |
13 | See usage examples in [docs.mdx](docs.mdx), or in [Swingset](http://react-components.vercel.app/components/openapipage).
14 |
--------------------------------------------------------------------------------
/packages/subnav/helpers/areBasePathsMatching.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | export function areBasePathsMatching(pathA: string, pathB: string) {
7 | if (!pathA || !pathB) return false
8 | // use .filter(Boolean) to remove any falsy values, like ""
9 | const [pathABase] = pathA.split('/').filter(Boolean)
10 | const [pathBBase] = pathB.split('/').filter(Boolean)
11 |
12 | return pathABase === pathBBase
13 | }
14 |
--------------------------------------------------------------------------------
/packages/motion-config/features.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | import { domAnimation } from 'framer-motion'
7 | import { layoutFeatures } from 'framer-motion/dist/es/motion/features/layout'
8 | import { HTMLProjectionNode } from 'framer-motion/dist/es/projection/node/HTMLProjectionNode'
9 |
10 | export default {
11 | ...domAnimation,
12 | ...layoutFeatures,
13 | projectionNodeConstructor: HTMLProjectionNode,
14 | }
15 |
--------------------------------------------------------------------------------
/swingset-extensions/usage-details/partials/package-version/style.module.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | .root {
7 | display: block;
8 | composes: g-type-code from global;
9 | line-height: 1.625rem;
10 | color: var(--gray-3);
11 | background: #f6f8fa;
12 | padding: 0 8px;
13 | border-radius: 2px;
14 |
15 | &[href] {
16 | color: #d73a49;
17 | &:hover {
18 | color: var(--brand);
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/packages/call-to-action/docs.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | componentName: CallToAction
3 | ---
4 |
5 |
6 | {` `}
16 |
17 |
18 |
19 |
20 | #### Props
21 |
22 |
23 |
--------------------------------------------------------------------------------
/packages/expandable-arrow/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@hashicorp/react-expandable-arrow",
3 | "version": "0.1.0",
4 | "description": "",
5 | "author": "HashiCorp",
6 | "license": "MPL-2.0",
7 | "dependencies": {
8 | "classnames": "^2.3.1"
9 | },
10 | "peerDependencies": {
11 | "react": ">=16.x"
12 | },
13 | "repository": {
14 | "type": "git",
15 | "url": "https://github.com/hashicorp/react-components.git",
16 | "directory": "packages/expandable-arrow"
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/packages/docs-page/components.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | import defaultMdxComponents from '@hashicorp/platform-docs-mdx'
7 | import { MDXProviderComponentsProp } from '@mdx-js/react'
8 |
9 | export default function generateComponents(
10 | productName: string,
11 | additionalComponents: MDXProviderComponentsProp = {}
12 | ) {
13 | return defaultMdxComponents({
14 | product: productName,
15 | additionalComponents,
16 | })
17 | }
18 |
--------------------------------------------------------------------------------
/packages/pricing-features/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@hashicorp/react-pricing-features",
3 | "version": "0.2.0",
4 | "description": "",
5 | "author": "HashiCorp",
6 | "license": "MPL-2.0",
7 | "dependencies": {
8 | "@hashicorp/flight-icons": "^2.0.2",
9 | "@hashicorp/react-button": "^6.3.0",
10 | "@reach/tabs": "^0.16.1",
11 | "@reach/visually-hidden": "^0.16.0"
12 | },
13 | "peerDependencies": {
14 | "@hashicorp/mktg-global-styles": ">=3.x",
15 | "react": ">=16.x"
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/packages/actions/style.module.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | .actions {
7 | display: flex;
8 | align-items: center;
9 | flex-wrap: wrap;
10 | gap: 16px 18px;
11 |
12 | &.stacked {
13 | flex-direction: column;
14 |
15 | &.left {
16 | align-items: flex-start;
17 | }
18 |
19 | &.center {
20 | align-items: center;
21 | }
22 | }
23 |
24 | &.mixed {
25 | column-gap: 24px;
26 | row-gap: 32px;
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/packages/author-byline/types.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | export interface AuthorBylineProps {
7 | /**
8 | * Source url of the image
9 | */
10 | avatar?: string
11 | /**
12 | * Renders as the first line of the byline
13 | */
14 | name: string
15 | /**
16 | * Renders as the second line of the byline
17 | */
18 | role: string
19 | /**
20 | * Render on light or dark backgrounds
21 | */
22 | appearance?: 'light' | 'dark'
23 | }
24 |
--------------------------------------------------------------------------------
/packages/content/README.md:
--------------------------------------------------------------------------------
1 | # Content
2 |
3 | Styling wrapper for content markup, typically used to render markdown content. Support a small number of customizations, as well as a variable product color to be used as an accent.
4 |
5 | ### Props
6 |
7 | - `content`: A [slot](https://reactjs.org/docs/composition-vs-inheritance.html#containment) to render child elements
8 | - `product` _[optional]_: lowercase product name (vault, nomad, consul, terraform) - this will set link colors to the selected product color as defined in `global-styles`
9 |
--------------------------------------------------------------------------------
/packages/search/img/search.svg.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | export default ` `
7 |
--------------------------------------------------------------------------------
/.changeset/README.md:
--------------------------------------------------------------------------------
1 | # Changesets
2 |
3 | Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
4 | with multi-package repos, or single-package repos to help you version and publish your code. You can
5 | find the full documentation for it [in our repository](https://github.com/changesets/changesets)
6 |
7 | We have a quick list of common questions to get you started engaging with this project in
8 | [our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
9 |
--------------------------------------------------------------------------------
/packages/subnav/partials/CtaLinks/icons/star.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | import React from 'react'
7 |
8 | function StarIcon(props) {
9 | return (
10 |
11 |
16 |
17 | )
18 | }
19 |
20 | export default StarIcon
21 |
--------------------------------------------------------------------------------
/packages/close-button/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@hashicorp/react-close-button",
3 | "version": "0.1.2",
4 | "description": "",
5 | "author": "HashiCorp",
6 | "license": "MPL-2.0",
7 | "dependencies": {
8 | "classnames": "^2.3.1"
9 | },
10 | "peerDependencies": {
11 | "@hashicorp/mktg-global-styles": ">=3.x",
12 | "react": ">=16.x"
13 | },
14 | "repository": {
15 | "type": "git",
16 | "url": "https://github.com/hashicorp/react-components.git",
17 | "directory": "packages/close-button"
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/packages/product-badge/types.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | import type { Products } from '@hashicorp/platform-product-meta'
7 |
8 | export type ProductBadgeProps = BaseProps & ConditionalProps
9 |
10 | type BaseProps = {
11 | productName: Products
12 | appearance?: 'light' | 'dark'
13 | }
14 |
15 | type ConditionalProps =
16 | | {
17 | theme?: 'primary'
18 | hasDot?: never
19 | }
20 | | {
21 | theme?: 'secondary'
22 | hasDot?: boolean
23 | }
24 |
--------------------------------------------------------------------------------
/packages/text-split-with-code/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | import TextSplit from '@hashicorp/react-text-split'
7 | import CodeBlock from '@hashicorp/react-code-block'
8 |
9 | function TextSplitWithCode({ className, textSplit, codeBlock }) {
10 | return (
11 |
12 |
13 |
14 | )
15 | }
16 |
17 | TextSplitWithCode.defaultProps = {}
18 | export default TextSplitWithCode
19 |
--------------------------------------------------------------------------------
/packages/text-split-with-logo-grid/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # @hashicorp/react-text-split-with-logo-grid
2 |
3 | ## 5.1.6
4 |
5 | ### Patch Changes
6 |
7 | - Updated dependencies [[`26918b9e`](https://github.com/hashicorp/react-components/commit/26918b9e32b3d4882bb18786f09eaa63c178bbc6)]:
8 | - @hashicorp/react-text-split@5.0.0
9 |
10 | ## 5.1.5
11 |
12 | ### Patch Changes
13 |
14 | - Updated dependencies [[`14cf3ad`](https://github.com/hashicorp/react-components/commit/14cf3ad2c8f20adfa1c50971f3646f66537a778b)]:
15 | - @hashicorp/react-text-split@4.0.0
16 |
--------------------------------------------------------------------------------
/packages/search/img/search-legend-page.svg.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | export default ` `
7 |
--------------------------------------------------------------------------------
/packages/use-cases/img/check.svg:
--------------------------------------------------------------------------------
1 | Icons/Feather/check/check
2 |
--------------------------------------------------------------------------------
/.changeset/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://unpkg.com/@changesets/config@1.6.0/schema.json",
3 | "changelog": [
4 | "@changesets/changelog-github",
5 | { "repo": "hashicorp/react-components" }
6 | ],
7 | "commit": false,
8 | "linked": [],
9 | "access": "public",
10 | "baseBranch": "main",
11 | "updateInternalDependencies": "patch",
12 | "ignore": [],
13 | "___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": {
14 | "onlyUpdatePeerDependentsWhenOutOfRange": true,
15 | "useCalculatedVersionForSnapshots": true
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/packages/motion-config/README.md:
--------------------------------------------------------------------------------
1 | # MotionConfig
2 |
3 | MotionConfig handles lazing loading [Framer Motion features](https://www.framer.com/docs/guide-reduce-bundle-size/#available-features). By default, we are including `domMax` to enable layout animations.
4 |
5 | ## Usage
6 |
7 | ```tsx
8 | // _app.tsx
9 | import MotionConfig from '@hashicorp/react-motion-config'
10 |
11 | export default function App({ Component, pageProps }) {
12 | return (
13 |
14 |
15 |
16 | )
17 | }
18 | ```
19 |
--------------------------------------------------------------------------------
/packages/text-splits/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # @hashicorp/react-text-splits
2 |
3 | ## 3.2.8
4 |
5 | ### Patch Changes
6 |
7 | - [#498](https://github.com/hashicorp/react-components/pull/498) [`e60fa8f`](https://github.com/hashicorp/react-components/commit/e60fa8f437a98f97f6c0ed396f194192cf5e376e) Thanks [@BRKalow](https://github.com/BRKalow)! - Bumps underlying dependencies.
8 |
9 | - Updated dependencies [[`e60fa8f`](https://github.com/hashicorp/react-components/commit/e60fa8f437a98f97f6c0ed396f194192cf5e376e)]:
10 | - @hashicorp/react-text-split-with-code@3.4.1
11 |
--------------------------------------------------------------------------------
/packages/text-split-with-code/README.md:
--------------------------------------------------------------------------------
1 | # Text Split with Code
2 |
3 | Display a title, description, and links alongside a code block.
4 |
5 | ## Styles
6 |
7 | In order for this component to render correctly, you'll need to import styles from `@hashicorp/react-text-split` and `@hashicorp/react-code-block` as well as styles for this component. For example:
8 |
9 | ```css
10 | @import '@hashicorp/react-code-block/dist/style.css';
11 | @import '@hashicorp/react-text-split/dist/style.css';
12 | @import '@hashicorp/react-text-split-with-code/dist/style.css';
13 | ```
14 |
--------------------------------------------------------------------------------
/packages/content/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | import React from 'react'
7 | import useProductMeta from '@hashicorp/platform-product-meta'
8 | import classnames from 'classnames'
9 | import s from './style.module.css'
10 |
11 | export default function Content({ content, product, className }) {
12 | const { themeClass } = useProductMeta(product)
13 |
14 | return (
15 |
16 | {content}
17 |
18 | )
19 | }
20 |
--------------------------------------------------------------------------------
/packages/intro/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@hashicorp/react-intro",
3 | "version": "0.7.1",
4 | "description": "",
5 | "author": "HashiCorp",
6 | "license": "MPL-2.0",
7 | "dependencies": {
8 | "@hashicorp/react-actions": "^0.4.4",
9 | "classnames": "^2.3.1"
10 | },
11 | "peerDependencies": {
12 | "@hashicorp/mktg-global-styles": ">=3.x",
13 | "react": ">=16.x"
14 | },
15 | "repository": {
16 | "type": "git",
17 | "url": "https://github.com/hashicorp/react-components.git",
18 | "directory": "packages/intro"
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/packages/subnav/helpers/useNavRef.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | import useOverflowRef from './useOverflowRef'
7 | import useStuckRef from './useStuckRef'
8 |
9 | export default function useNavRef(deps) {
10 | const [isStuck, stuckRef] = useStuckRef()
11 | const [hasOverflow, overflowRef] = useOverflowRef()
12 |
13 | return [
14 | isStuck,
15 | hasOverflow,
16 | function navRef(target) {
17 | stuckRef(target, deps)
18 | overflowRef(target, deps)
19 | },
20 | ]
21 | }
22 |
--------------------------------------------------------------------------------
/packages/tabs/icons/tooltip.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/author-byline/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@hashicorp/react-author-byline",
3 | "version": "0.4.0",
4 | "description": "",
5 | "author": "HashiCorp",
6 | "license": "MPL-2.0",
7 | "dependencies": {
8 | "classnames": "^2.3.1"
9 | },
10 | "peerDependencies": {
11 | "@hashicorp/mktg-global-styles": ">=3.x",
12 | "react": ">=16.x",
13 | "next": ">=13.x"
14 | },
15 | "repository": {
16 | "type": "git",
17 | "url": "https://github.com/hashicorp/react-components.git",
18 | "directory": "packages/author-byline"
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/packages/badge/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@hashicorp/react-badge",
3 | "version": "0.2.0",
4 | "description": "",
5 | "author": "HashiCorp",
6 | "license": "MPL-2.0",
7 | "dependencies": {
8 | "@hashicorp/platform-product-meta": "^0.1.0",
9 | "classnames": "^2.3.1"
10 | },
11 | "peerDependencies": {
12 | "@hashicorp/mktg-global-styles": ">=3.x",
13 | "react": ">=16.x"
14 | },
15 | "repository": {
16 | "type": "git",
17 | "url": "https://github.com/hashicorp/react-components.git",
18 | "directory": "packages/badge"
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/packages/card/event-card/style.module.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | .pseudoCta {
7 | --transition-duration: 250ms;
8 | --transition-timing-function: ease-in-out;
9 |
10 | margin-top: auto;
11 | display: inline-flex;
12 | align-items: center;
13 | gap: 8px;
14 | color: var(--secondary-text-color);
15 | }
16 |
17 | .pseudoCtaLabel {
18 | font-weight: var(--font-weight-bold);
19 | font-size: 16px;
20 | line-height: 1.25;
21 | }
22 |
23 | .pseudoCtaIcon {
24 | flex-shrink: 0;
25 | }
26 |
--------------------------------------------------------------------------------
/packages/docs-page/server/resolve-nav-data.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | import path from 'path'
7 | import fs from 'fs'
8 |
9 | import { validateNavData } from './validate-nav-data'
10 |
11 | export async function resolveNavData(filePath, localContentDir) {
12 | const navDataFile = path.join(process.cwd(), filePath)
13 | const navDataRaw = JSON.parse(fs.readFileSync(navDataFile, 'utf8'))
14 | const withFilePaths = await validateNavData(navDataRaw, localContentDir)
15 | return withFilePaths
16 | }
17 |
--------------------------------------------------------------------------------
/packages/inline-svg/props.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | module.exports = {
7 | src: {
8 | description: 'Serialized SVG string to render',
9 | type: 'string',
10 | control: { type: 'json' },
11 | testValue:
12 | '\n \n \n SVG \n ',
13 | required: true,
14 | },
15 | }
16 |
--------------------------------------------------------------------------------
/packages/quote/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@hashicorp/react-quote",
3 | "version": "0.3.2",
4 | "description": "",
5 | "author": "HashiCorp",
6 | "license": "MPL-2.0",
7 | "dependencies": {
8 | "classnames": "^2.3.1",
9 | "@hashicorp/react-author-byline": "^0.4.0"
10 | },
11 | "peerDependencies": {
12 | "@hashicorp/mktg-global-styles": ">=3.x",
13 | "react": ">=16.x"
14 | },
15 | "repository": {
16 | "type": "git",
17 | "url": "https://github.com/hashicorp/react-components.git",
18 | "directory": "packages/quote"
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/packages/text-split-with-image/README.md:
--------------------------------------------------------------------------------
1 | # Text Split With Image
2 |
3 | Display an image alongside a title, description, and links.
4 |
5 | ## Note on Props
6 |
7 | This component passes its props directly to ` ` and ` `:
8 |
9 | - `image` is passed to the ` ` component. This **must** be an object with at minimum a valid `url`, ie `{ url }`
10 | - `textSplit` is passed to ` `
11 |
12 | Please refer to `@hashicorp/react-image` and `@hashicorp/react-text-split` for documentation on ` ` and ` ` props respectively.
13 |
--------------------------------------------------------------------------------
/swingset-extensions/usage-details/svg/external-link.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/marketo-form/partials/field-wrapper/index.tsx:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | import type { ReactNode } from 'react'
7 |
8 | const FieldWrapper = ({
9 | children,
10 | fieldId,
11 | }: {
12 | children: ReactNode
13 | fieldId: string
14 | }) => {
15 | return (
16 |
21 | {children}
22 |
23 | )
24 | }
25 |
26 | export default FieldWrapper
27 |
--------------------------------------------------------------------------------
/packages/radio-group/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@hashicorp/react-radio-group",
3 | "version": "0.2.0",
4 | "description": "",
5 | "author": "HashiCorp",
6 | "license": "MPL-2.0",
7 | "dependencies": {
8 | "@react-aria/utils": "^3.11.1",
9 | "classnames": "^2.3.1"
10 | },
11 | "peerDependencies": {
12 | "@hashicorp/mktg-global-styles": ">=3.x",
13 | "react": ">=16.x"
14 | },
15 | "repository": {
16 | "type": "git",
17 | "url": "https://github.com/hashicorp/react-components.git",
18 | "directory": "packages/radio-group"
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/packages/aside/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@hashicorp/react-aside",
3 | "description": "The Aside component is used to render a highlighted box of content. It is intended for use in long form content areas.",
4 | "author": "HashiCorp",
5 | "version": "0.0.1",
6 | "license": "MPL-2.0",
7 | "publishConfig": {
8 | "access": "public"
9 | },
10 | "dependencies": {
11 | "classnames": "^2.3.1"
12 | },
13 | "repository": {
14 | "type": "git",
15 | "url": "https://github.com/hashicorp/react-components.git",
16 | "directory": "packages/aside"
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/packages/badge/types.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | import type { Products } from '@hashicorp/platform-product-meta'
7 |
8 | export type ProductThemes = Exclude
9 | export type ExtraThemes = 'neutral' | 'action'
10 | export type BadgeThemes = ProductThemes | ExtraThemes
11 |
12 | export interface BadgeProps {
13 | children: string
14 | variant?: 'primary' | 'secondary'
15 | theme?: BadgeThemes
16 | page?: 'light' | 'faint' | 'strong' | 'strongFaint' | 'action' | 'actionFaint'
17 | }
18 |
--------------------------------------------------------------------------------
/packages/marketo-form/partials/label/index.tsx:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | import clsx from 'clsx'
7 | import s from './style.module.css'
8 |
9 | interface LabelProps {
10 | label: string
11 | fieldName: string
12 | className?: string
13 | }
14 |
15 | export default function Label({ label, fieldName, className }: LabelProps) {
16 | return (
17 |
21 | {label}
22 |
23 | )
24 | }
25 |
--------------------------------------------------------------------------------
/packages/form-fields/radio/index.tsx:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | import React, { ReactNode, ComponentProps } from 'react'
7 | import RadioCheckbox from '../partials/radio-checkbox'
8 |
9 | interface RadioInputProps {
10 | label: ReactNode
11 | appearance?: 'light' | 'dark'
12 | className?: string
13 | field: ComponentProps<'input'>
14 | error?: string
15 | }
16 |
17 | function RadioInput(props: RadioInputProps) {
18 | return
19 | }
20 |
21 | export default RadioInput
22 |
--------------------------------------------------------------------------------
/packages/form-fields/radio-group/index.tsx:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | import ChoiceGroup, { type RadioProps } from '../partials/choice-group'
7 |
8 | interface CheckboxGroupProps {
9 | label?: string
10 | helpText?: string
11 | required?: boolean
12 | error?: string
13 | appearance?: 'light' | 'dark'
14 | className?: string
15 | inputs: RadioProps[]
16 | }
17 |
18 | function RadioGroup(props: CheckboxGroupProps) {
19 | return
20 | }
21 |
22 | export default RadioGroup
23 |
--------------------------------------------------------------------------------
/packages/button/icons/external-link.svg:
--------------------------------------------------------------------------------
1 | External link icon
2 |
--------------------------------------------------------------------------------
/packages/expandable-arrow/docs.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | componentName: 'ExpandableArrow'
3 | ---
4 |
5 | {` `}
6 |
7 | ## Example usage
8 |
9 | ```tsx
10 | function Button() {
11 | const [isHovered, setIsHovered] = React.useState(false)
12 | return (
13 | {
15 | setIsHovered(true)
16 | }}
17 | onMouseOut={() => {
18 | setIsHovered(false)
19 | }}
20 | >
21 | {children}
22 |
23 |
24 | )
25 | }
26 | ```
27 |
--------------------------------------------------------------------------------
/packages/inline-svg/docs.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | componentName: 'InlineSvg'
3 | ---
4 |
5 | The `` component renders an `` from a given string.
6 |
7 |
8 | {`
10 |
11 |
12 | SVG
13 | \`}
14 | />`}
15 |
16 |
17 |
18 |
19 | ## Props
20 |
21 |
22 |
--------------------------------------------------------------------------------
/packages/pricing-features/global-font.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | /* Body X Small */
7 | .g-type-body-x-small {
8 | font-weight: var(--font-weight-medium);
9 | font-family: var(--font-body);
10 | font-size: 0.8125rem;
11 | line-height: 1.219em;
12 | letter-spacing: 0.0125em;
13 | }
14 |
15 | /* Body X Small Strong */
16 | .g-type-body-x-small-strong {
17 | font-weight: var(--font-weight-bold);
18 | font-family: var(--font-body);
19 | font-size: 0.8125rem;
20 | line-height: 1.219em;
21 | letter-spacing: 0.0125em;
22 | }
23 |
--------------------------------------------------------------------------------
/packages/code-block/style.module.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | .root {
7 | position: relative;
8 | background: var(--background-base);
9 | color: var(--text-color-base);
10 | border-radius: 4px;
11 |
12 | &.hasBarAbove {
13 | border-top-left-radius: 0;
14 | border-top-right-radius: 0;
15 | }
16 | }
17 |
18 | .linesContainer {
19 | position: relative;
20 | }
21 |
22 | .copyButtonContainer {
23 | position: absolute;
24 | top: 12px;
25 | right: 12px;
26 |
27 | @media print {
28 | display: none;
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/packages/content/index.test.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | import { render, screen } from '@testing-library/react'
7 | import Content from './'
8 |
9 | test('renders content accurately', () => {
10 | render(test
} />)
11 | expect(screen.getByTestId('test')).toHaveTextContent('test')
12 | })
13 |
14 | test('renders a product class if one is passed', () => {
15 | const { container } = render( )
16 |
17 | expect(container.firstChild).toHaveClass('terraform')
18 | })
19 |
--------------------------------------------------------------------------------
/packages/docs-sidenav/fixtures/content/index.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | page_title: Index
3 | description: >-
4 | This file is the index page
5 | ---
6 |
7 | # Index Page
8 |
9 | Welcome to the introduction guide to HashiCorp Vault! This guide is the best
10 | place to get started with Vault. This guide covers what Vault is, what problems
11 | it can solve, how it compares to existing software, and contains a quick start
12 | for using Vault.
13 |
14 | If you are already familiar with the basics of Vault, the
15 | [documentation](/docs) provides a better reference guide for all
16 | available features as well as internals.
17 |
--------------------------------------------------------------------------------
/packages/form-fields/checkbox-group/index.tsx:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | import ChoiceGroup, { type CheckboxProps } from '../partials/choice-group'
7 |
8 | interface CheckboxGroupProps {
9 | label?: string
10 | helpText?: string
11 | required?: boolean
12 | error?: string
13 | appearance?: 'light' | 'dark'
14 | className?: string
15 | inputs: CheckboxProps[]
16 | }
17 |
18 | function CheckboxGroup(props: CheckboxGroupProps) {
19 | return
20 | }
21 |
22 | export default CheckboxGroup
23 |
--------------------------------------------------------------------------------
/packages/consent-manager/img/icn_close.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | export default function CloseIcon() {
7 | return (
8 |
14 | Close Button
15 |
22 |
23 | )
24 | }
25 |
--------------------------------------------------------------------------------
/packages/docs-sidenav/fixtures/content-with-unlinked/hello.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | page_title: An MDX file
3 | description: Description text
4 | ---
5 |
6 | # Introduction to Vault
7 |
8 | Welcome to the introduction guide to HashiCorp Vault! This guide is the best
9 | place to get started with Vault. This guide covers what Vault is, what problems
10 | it can solve, how it compares to existing software, and contains a quick start
11 | for using Vault.
12 |
13 | If you are already familiar with the basics of Vault, the
14 | [documentation](/docs) provides a better reference guide for all
15 | available features as well as internals.
16 |
--------------------------------------------------------------------------------
/packages/inline-video/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@hashicorp/react-inline-video",
3 | "version": "0.5.1",
4 | "description": "",
5 | "author": "HashiCorp",
6 | "license": "MPL-2.0",
7 | "dependencies": {
8 | "classnames": "^2.3.1",
9 | "react-player": "^2.11.0"
10 | },
11 | "peerDependencies": {
12 | "@hashicorp/flight-icons": ">=2.x",
13 | "@hashicorp/mktg-global-styles": ">=3.x",
14 | "react": ">=16.x"
15 | },
16 | "repository": {
17 | "type": "git",
18 | "url": "https://github.com/hashicorp/react-components.git",
19 | "directory": "packages/inline-video"
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/packages/docs-sidenav/fixtures/content-with-unlinked/nested/index.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | page_title: An MDX file
3 | description: Description text
4 | ---
5 |
6 | # Introduction to Vault
7 |
8 | Welcome to the introduction guide to HashiCorp Vault! This guide is the best
9 | place to get started with Vault. This guide covers what Vault is, what problems
10 | it can solve, how it compares to existing software, and contains a quick start
11 | for using Vault.
12 |
13 | If you are already familiar with the basics of Vault, the
14 | [documentation](/docs) provides a better reference guide for all
15 | available features as well as internals.
16 |
--------------------------------------------------------------------------------
/packages/form-fields/radio/docs.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | componentName: 'Radio'
3 | componentCategory: 'Form Fields'
4 | ---
5 |
6 |
7 | {`
8 | <>
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 | >
18 | `}
19 |
--------------------------------------------------------------------------------
/packages/head/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@hashicorp/react-head",
3 | "description": "Create a Hashicorp branded in NextJS projects.",
4 | "version": "3.3.2",
5 | "author": "HashiCorp",
6 | "contributors": [
7 | "Jonathan Neal"
8 | ],
9 | "license": "MPL-2.0",
10 | "peerDependencies": {
11 | "@hashicorp/mktg-global-styles": ">=3.x",
12 | "react": ">=16.x"
13 | },
14 | "publishConfig": {
15 | "access": "public"
16 | },
17 | "repository": {
18 | "type": "git",
19 | "url": "https://github.com/hashicorp/react-components.git",
20 | "directory": "packages/head"
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/packages/callouts/readme.md:
--------------------------------------------------------------------------------
1 | # Callouts
2 |
3 | Display a set of items, each with a title, description, option links, and an optional icon.
4 |
5 | ## Notes on Props
6 |
7 | - `items.icon` - Can be given an SVG string, or used as a render prop, which will be passed `{ theme, brand }`. Whatever it renders, it shouldn't exceed `96px` square in size. If it does, there's no guarantee this component will display it in a nice way.
8 | - `items.content` - Can be given a string of content, or used as a render prop, which will be passed `{ theme, brand }`. Whatever it renders, it wil likely be constrained to a container only a few hundred pixels wide.
9 |
--------------------------------------------------------------------------------
/packages/case-study-slider/fragment.graphql:
--------------------------------------------------------------------------------
1 | fragment caseStudySliderFields on SbcCaseStudyRecord {
2 | id
3 | caseStudyResource {
4 | description
5 | id
6 | slug
7 | showDemoRequest
8 | image {
9 | ...imageFields
10 | }
11 | }
12 | company {
13 | id
14 | name
15 | logo {
16 | ...imageFields
17 | }
18 | monochromeLogo {
19 | ...imageFields
20 | }
21 | whiteLogo {
22 | ...imageFields
23 | }
24 | link
25 | }
26 | headline
27 | description
28 | buttonLabel
29 | caseStudyImage {
30 | ...imageFields
31 | }
32 | caseStudyLink
33 | }
34 |
--------------------------------------------------------------------------------
/packages/docs-sidenav/fixtures/content-with-unlinked/nested/another-file.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | page_title: An MDX file
3 | description: Description text
4 | ---
5 |
6 | # Introduction to Vault
7 |
8 | Welcome to the introduction guide to HashiCorp Vault! This guide is the best
9 | place to get started with Vault. This guide covers what Vault is, what problems
10 | it can solve, how it compares to existing software, and contains a quick start
11 | for using Vault.
12 |
13 | If you are already familiar with the basics of Vault, the
14 | [documentation](/docs) provides a better reference guide for all
15 | available features as well as internals.
16 |
--------------------------------------------------------------------------------
/packages/docs-sidenav/icons/external-link.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/packages/standalone-link/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@hashicorp/react-standalone-link",
3 | "version": "0.4.0",
4 | "description": "",
5 | "author": "HashiCorp",
6 | "license": "MPL-2.0",
7 | "dependencies": {
8 | "@hashicorp/react-expandable-arrow": "^0.1.0",
9 | "classnames": "^2.3.1"
10 | },
11 | "peerDependencies": {
12 | "@hashicorp/mktg-global-styles": ">=3.x",
13 | "next": ">=11.x",
14 | "react": ">=16.x"
15 | },
16 | "repository": {
17 | "type": "git",
18 | "url": "https://github.com/hashicorp/react-components.git",
19 | "directory": "packages/standalone-link"
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/packages/standalone-link/types.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | type AnchorElementProps = JSX.IntrinsicElements['a']
7 |
8 | export interface StandaloneLinkProps extends AnchorElementProps {
9 | /**
10 | * Display on light or dark backgrounds.
11 | */
12 | appearance?: 'light' | 'dark'
13 | /**
14 | * The text that appears inside the link.
15 | */
16 | children: string
17 | /**
18 | * The url destination.
19 | */
20 | href: string
21 | /**
22 | * The link color.
23 | */
24 | theme?: 'primary' | 'secondary' | 'tertiary'
25 | }
26 |
--------------------------------------------------------------------------------
/props.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | module.exports = {
7 | product: {
8 | description:
9 | 'A lower-case product identifier to pull in respective theme colors. The default is hashicorp blue.',
10 | type: 'string',
11 | control: { type: 'select' },
12 | options: [
13 | 'hashicorp',
14 | 'boundary',
15 | 'consul',
16 | 'nomad',
17 | 'packer',
18 | 'terraform',
19 | 'vault',
20 | 'vagrant',
21 | 'waypoint',
22 | ],
23 | testValue: 'terraform',
24 | required: false,
25 | },
26 | }
27 |
--------------------------------------------------------------------------------
/packages/use-cases/img/arrow.svg:
--------------------------------------------------------------------------------
1 |
8 |
12 |
--------------------------------------------------------------------------------
/packages/form-fields/checkbox/docs.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | componentName: 'Checkbox'
3 | componentCategory: 'Form Fields'
4 | ---
5 |
6 |
7 | {`
8 | <>
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 | >
18 | `}
19 |
--------------------------------------------------------------------------------
/packages/notification/components/notifications/style.module.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | .root {
7 | position: fixed;
8 | pointer-events: none;
9 | display: flex;
10 | flex-direction: column;
11 | align-items: flex-start;
12 | justify-content: flex-end;
13 | bottom: calc(var(--inset) * 1px);
14 | gap: calc(var(--gutter) * 1px);
15 | z-index: 9999;
16 |
17 | &.left {
18 | left: calc(var(--inset) * 1px);
19 | }
20 |
21 | &.right {
22 | right: calc(var(--inset) * 1px);
23 | }
24 |
25 | & > * {
26 | pointer-events: auto;
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/scripts/release-check-branch.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | # Copyright (c) HashiCorp, Inc.
3 | # SPDX-License-Identifier: MPL-2.0
4 |
5 |
6 | NL=$'\n'
7 | GRAY=$'\e[02;39m'
8 | RED=$'\e[31m'
9 | GREEN=$'\e[32m'
10 | NC=$'\e[0m'
11 |
12 | PUBLISH_BRANCH="main"
13 | echo "${NL}${GRAY}Checking branch..."
14 | currentbranch=$(git rev-parse --abbrev-ref HEAD)
15 | if [ $currentbranch != $PUBLISH_BRANCH ]; then
16 | echo "${RED}ERROR!${NC} Publish should only be run from ${PUBLISH_BRANCH}.${NL}You're on a branch ${RED}${currentbranch}${NC}${NL}"
17 | exit 1
18 | else
19 | echo "${GREEN}✓${NC} Publishing off ${PUBLISH_BRANCH}${NL}"
20 | fi
21 |
--------------------------------------------------------------------------------
/packages/aside/style.module.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | .root {
7 | padding: 1em;
8 | border-radius: 3px;
9 |
10 | & > *:first-child {
11 | margin-top: 0;
12 | }
13 |
14 | & > *:last-child {
15 | margin-bottom: 0;
16 | }
17 |
18 | &.type-info {
19 | background-color: var(--info-l2);
20 | }
21 |
22 | &.type-success {
23 | background-color: var(--success-l2);
24 | }
25 |
26 | &.type-warning {
27 | background-color: var(--warning-l2);
28 | }
29 |
30 | &.type-danger {
31 | background-color: var(--danger-l2);
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/packages/content/props.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | module.exports = {
7 | content: {
8 | type: 'React.Element',
9 | description: 'Content to be rendered and styled by the component',
10 | },
11 | product: {
12 | type: 'string',
13 | description: 'Product name for accent color',
14 | control: { type: 'select' },
15 | options: [
16 | 'hashicorp',
17 | 'terraform',
18 | 'vault',
19 | 'consul',
20 | 'nomad',
21 | 'packer',
22 | 'vagrant',
23 | 'boundary',
24 | 'waypoint',
25 | ],
26 | },
27 | }
28 |
--------------------------------------------------------------------------------
/packages/link-wrap/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@hashicorp/react-link-wrap",
3 | "description": "Wraps a standard 'a' element to enable NextJS Link usage",
4 | "version": "3.1.0",
5 | "author": "Hashicorp",
6 | "contributors": [
7 | "Jeff Escalante"
8 | ],
9 | "license": "MPL-2.0",
10 | "peerDependencies": {
11 | "@hashicorp/mktg-global-styles": ">=3.x",
12 | "react": ">=16.x"
13 | },
14 | "publishConfig": {
15 | "access": "public"
16 | },
17 | "repository": {
18 | "type": "git",
19 | "url": "https://github.com/hashicorp/react-components.git",
20 | "directory": "packages/link-wrap"
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/packages/marketo-form/partials/fields/name-field/index.tsx:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | import TextField from '../text-field'
7 | import type { MarketoFormField, MarketoFormTextField } from '../../../types'
8 | import styles from './style.module.css'
9 |
10 | const NameFields = ({ fields }: { fields: MarketoFormField[] }) => {
11 | return (
12 |
13 |
14 |
15 |
16 | )
17 | }
18 |
19 | export default NameFields
20 |
--------------------------------------------------------------------------------
/packages/min-100-layout/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # @hashicorp/react-min-100-layout
2 |
3 | ## 2.0.1
4 |
5 | ### Patch Changes
6 |
7 | - [#330](https://github.com/hashicorp/react-components/pull/330) [`44a0e60`](https://github.com/hashicorp/react-components/commit/44a0e60b577a36978275ef1b0efa0e351a9802c6) Thanks [@zchsh](https://github.com/zchsh)! - Removes package-lock.json
8 |
9 | ## 2.0.0
10 |
11 | ### Major Changes
12 |
13 | - [#321](https://github.com/hashicorp/react-components/pull/321) [`4b2cc29`](https://github.com/hashicorp/react-components/commit/4b2cc298247f458ebd142abd8e13f6655eef1d92) Thanks [@zchsh](https://github.com/zchsh)! - Initial release.
14 |
--------------------------------------------------------------------------------
/packages/subnav/partials/nav-item-text/style.module.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | /* Note: consumes from theme.module.css, as marked */
7 |
8 | .root {
9 | color: var(--menu-item-text-color); /* from theme.module.css */
10 | position: relative;
11 |
12 | &::after {
13 | content: '';
14 | position: absolute;
15 | left: 0;
16 | right: 0;
17 | bottom: 0;
18 | height: 2px;
19 | background: var(--menu-item-underline-color); /* from theme.module.css */
20 | opacity: 0;
21 | }
22 |
23 | &.isActive::after {
24 | opacity: 1;
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/packages/video-feature/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@hashicorp/react-video-feature",
3 | "version": "0.2.2",
4 | "description": "",
5 | "author": "HashiCorp",
6 | "license": "MPL-2.0",
7 | "dependencies": {
8 | "@hashicorp/react-author-byline": "^0.4.0",
9 | "@hashicorp/react-inline-video": "^0.5.0",
10 | "classnames": "^2.3.1"
11 | },
12 | "peerDependencies": {
13 | "@hashicorp/mktg-global-styles": ">=3.x",
14 | "react": ">=16.x"
15 | },
16 | "repository": {
17 | "type": "git",
18 | "url": "https://github.com/hashicorp/react-components.git",
19 | "directory": "packages/video-feature"
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/packages/marketo-form/partials/fields/htmltext-field/index.tsx:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | import FieldWrapper from '../../field-wrapper'
7 | import type { MarketoFormHtmltextField } from '../../../types'
8 | import styles from './style.module.css'
9 |
10 | const Index = ({ field }: { field: MarketoFormHtmltextField }) => {
11 | return (
12 |
13 |
17 |
18 | )
19 | }
20 |
21 | export default Index
22 |
--------------------------------------------------------------------------------
/packages/placeholder/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@hashicorp/react-placeholder",
3 | "description": "Generate skeleton placeholders to reserve space while loading",
4 | "version": "0.1.2",
5 | "author": "HashiCorp",
6 | "contributors": [
7 | "Bryce Kalow"
8 | ],
9 | "license": "MPL-2.0",
10 | "peerDependencies": {
11 | "@hashicorp/mktg-global-styles": ">=3.x",
12 | "react": ">=16.x"
13 | },
14 | "publishConfig": {
15 | "access": "public"
16 | },
17 | "repository": {
18 | "type": "git",
19 | "url": "https://github.com/hashicorp/react-components.git",
20 | "directory": "packages/placeholder"
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/packages/quote/style.module.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | .quote {
7 | --color: var(--wpl-neutral-700);
8 | --gap: 32px;
9 |
10 | margin: 0;
11 | display: grid;
12 | gap: var(--gap);
13 |
14 | &.dark {
15 | --color: var(--wpl-neutral-0);
16 | }
17 | }
18 |
19 | .text {
20 | margin: 0;
21 | composes: g-type-display-4 from global;
22 | color: var(--color);
23 |
24 | & > p {
25 | margin: 0;
26 | color: inherit;
27 |
28 | &::before {
29 | content: '“';
30 | }
31 |
32 | &::after {
33 | content: '”';
34 | }
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/packages/docs-sidenav/docs.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | componentName: 'DocsSidenav'
3 | ---
4 |
5 | DocsSidenav renders a tree of links, with the option to include nested sections. Horizontal dividers can also be included between items.
6 |
7 |
8 | {` `}
14 |
15 |
16 |
17 |
18 | ### Props
19 |
20 |
21 |
--------------------------------------------------------------------------------
/packages/logo-grid/icons/x.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/packages/pricing-features/fixtures/table.json:
--------------------------------------------------------------------------------
1 | {
2 | "columns": ["", "Col 1", "Col 2"],
3 | "rows": [
4 | {
5 | "header": {
6 | "heading": "Row Header "
7 | },
8 | "cells": [false, true],
9 | "isCollapsible": false
10 | },
11 | {
12 | "header": {
13 | "heading": "Row Header 2 ",
14 | "content": "Row Header 2 Content
"
15 | },
16 | "cells": [
17 | true,
18 | {
19 | "heading": "Cell Heading ",
20 | "content": "Cell Content
"
21 | }
22 | ],
23 | "isCollapsible": true
24 | }
25 | ]
26 | }
27 |
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "allowJs": true,
4 | "baseUrl": ".",
5 | "esModuleInterop": true,
6 | "forceConsistentCasingInFileNames": true,
7 | "isolatedModules": true,
8 | "jsx": "preserve",
9 | "lib": ["dom", "dom.iterable", "esnext"],
10 | "module": "esnext",
11 | "moduleResolution": "node",
12 | "noEmit": true,
13 | "resolveJsonModule": true,
14 | "skipLibCheck": true,
15 | "strict": true,
16 | "noImplicitAny": false,
17 | "target": "es5",
18 | "incremental": true
19 | },
20 | "exclude": ["node_modules"],
21 | "include": ["global.d.ts", "**/*.ts", "**/*.tsx"]
22 | }
23 |
--------------------------------------------------------------------------------
/packages/markdown-page/props.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | module.exports = {
7 | components: {
8 | type: 'object',
9 | description:
10 | 'An object in which the key is the name of a react component, and the value is the actual component. Identical objects should be passed to `generateStaticProps` and ` ` if used.',
11 | },
12 | staticProps: {
13 | required: true,
14 | type: 'object',
15 | description:
16 | 'the return value from the `generateStaticProps` function from `@hashicorp/react-markdown-page/server`. See docs for details.',
17 | },
18 | }
19 |
--------------------------------------------------------------------------------
/packages/section-header/props.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | module.exports = {
7 | headline: {
8 | type: 'string',
9 | description: 'The primary headline.',
10 | testValue: 'Lorem ipsum dolor sit amet.',
11 | },
12 | description: {
13 | type: 'string',
14 | description: 'A smaller line of text below the headline.',
15 | testValue:
16 | 'Praesent commodo cursus magna, vel scelerisque nisl consectetur et.',
17 | },
18 | useH1: {
19 | type: 'boolean',
20 | description: 'Whether to make the headline an h1 or h2.',
21 | testValue: true,
22 | },
23 | }
24 |
--------------------------------------------------------------------------------
/swingset-extensions/formik-state-viewer/style.module.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | .formikStateViewer {
7 | border: 1px solid #e5e5e5;
8 | border-radius: 3px;
9 | padding: 20px;
10 | display: flex;
11 | flex-direction: column;
12 | }
13 |
14 | .grid {
15 | width: 100%;
16 | display: grid;
17 | grid-gap: 32px;
18 | @media (--large) {
19 | grid-template-columns: 1fr 1fr 1fr;
20 | }
21 | & h4 {
22 | padding: 16px 0;
23 | margin: 0;
24 | font-size: 20px;
25 | }
26 | }
27 |
28 | .heading {
29 | font-size: 32px;
30 | padding: 16px 0;
31 | margin: 0;
32 | }
33 |
--------------------------------------------------------------------------------
/packages/code-block/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@hashicorp/react-code-block",
3 | "description": "A simple code block with clipboard functionality",
4 | "version": "6.7.0",
5 | "author": "HashiCorp",
6 | "dependencies": {
7 | "shellwords": "^0.1.1"
8 | },
9 | "license": "MPL-2.0",
10 | "main": "index.js",
11 | "peerDependencies": {
12 | "@hashicorp/mktg-global-styles": ">=3.x",
13 | "react": ">=16.x"
14 | },
15 | "publishConfig": {
16 | "access": "public"
17 | },
18 | "repository": {
19 | "type": "git",
20 | "url": "https://github.com/hashicorp/react-components.git",
21 | "directory": "packages/code-block"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/packages/code-block/utils/clamp.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | /**
7 | * Ensures a number is limited to a given range.
8 | *
9 | * @private
10 | * @param {number} number The number to clamp.
11 | * @param {number} min The smallest possible value
12 | * @param {number} max The largest possible value
13 | * @returns {number} min if num <= min, max if num >= max, or num otherwise
14 | */
15 | function clamp(number, min, max) {
16 | const isNaN = number !== number
17 | if (isNaN) return number
18 | return number <= min ? min : number >= max ? max : number
19 | }
20 |
21 | export default clamp
22 |
--------------------------------------------------------------------------------
/packages/form-fields/text/style.module.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | .root {
7 | composes: wpl-variables input-root from '../style.module.css';
8 | width: 100%;
9 | margin-bottom: 24px;
10 |
11 | &.hidden {
12 | display: none;
13 | }
14 | }
15 |
16 | .theme-dark {
17 | composes: wpl-variables-dark from '../style.module.css';
18 | }
19 |
20 | .input {
21 | composes: wpl-input-base from '../style.module.css';
22 | }
23 |
24 | .hasError {
25 | composes: hasError from '../style.module.css';
26 | }
27 |
28 | .error {
29 | composes: wpl-error-message from '../style.module.css';
30 | }
31 |
--------------------------------------------------------------------------------
/packages/pricing-features/components/download-block/style.module.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | .container {
7 | padding-top: 64px;
8 | padding-bottom: 64px;
9 | background: var(--gray-6);
10 | }
11 |
12 | .inner {
13 | composes: g-grid-container from global;
14 | display: flex;
15 | flex-direction: column;
16 | }
17 |
18 | .heading {
19 | composes: g-type-display-3 from global;
20 | color: var(--wpl-neutral-900);
21 | margin: 0;
22 | }
23 |
24 | .description {
25 | composes: g-type-body from global;
26 | color: var(--gray-3);
27 | margin: 0;
28 | padding: 16px 0 32px;
29 | }
30 |
--------------------------------------------------------------------------------
/packages/expandable-arrow/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # @hashicorp/react-expandable-arrow
2 |
3 | ## 0.1.0
4 |
5 | ### Minor Changes
6 |
7 | - [#822](https://github.com/hashicorp/react-components/pull/822) [`a0df5f89`](https://github.com/hashicorp/react-components/commit/a0df5f899ac43033032bbe0559f53b6897ae0ca1) Thanks [@alexcarpenter](https://github.com/alexcarpenter)! - Round arrow paths
8 |
9 | ## 0.0.2
10 |
11 | ### Patch Changes
12 |
13 | - [#798](https://github.com/hashicorp/react-components/pull/798) [`2dbf0b99`](https://github.com/hashicorp/react-components/commit/2dbf0b99a0716e7cdfbb40f01dd7c05fc3aedfe1) Thanks [@alexcarpenter](https://github.com/alexcarpenter)! - Initial release
14 |
--------------------------------------------------------------------------------
/packages/form-fields/textarea/style.module.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | .root {
7 | composes: wpl-variables input-root from '../style.module.css';
8 | width: 100%;
9 | margin-bottom: 24px;
10 |
11 | &.hidden {
12 | display: none;
13 | }
14 | }
15 |
16 | .theme-dark {
17 | composes: wpl-variables-dark from '../style.module.css';
18 | }
19 |
20 | .input {
21 | composes: wpl-input-base from '../style.module.css';
22 | }
23 |
24 | .hasError {
25 | composes: hasError from '../style.module.css';
26 | }
27 |
28 | .error {
29 | composes: wpl-error-message from '../style.module.css';
30 | }
31 |
--------------------------------------------------------------------------------
/packages/related-content/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@hashicorp/react-related-content",
3 | "version": "0.3.8",
4 | "description": "",
5 | "author": "HashiCorp",
6 | "license": "MPL-2.0",
7 | "dependencies": {
8 | "classnames": "^2.3.1",
9 | "@hashicorp/react-card": "^0.15.0",
10 | "@hashicorp/react-standalone-link": "^0.4.0"
11 | },
12 | "peerDependencies": {
13 | "@hashicorp/mktg-global-styles": ">=3.x",
14 | "react": ">=16.x",
15 | "next": ">=11.x"
16 | },
17 | "repository": {
18 | "type": "git",
19 | "url": "https://github.com/hashicorp/react-components.git",
20 | "directory": "packages/related-content"
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/packages/split-rich-cta-list/img/arrow-right.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/packages/tabs/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@hashicorp/react-tabs",
3 | "description": "Display content in a tabbed interface",
4 | "version": "8.2.0",
5 | "author": "HashiCorp",
6 | "contributors": [
7 | "Zach Shilton"
8 | ],
9 | "dependencies": {
10 | "classnames": "^2.3.1"
11 | },
12 | "peerDependencies": {
13 | "@hashicorp/mktg-global-styles": ">=3.x",
14 | "react": ">=16.x"
15 | },
16 | "license": "MPL-2.0",
17 | "publishConfig": {
18 | "access": "public"
19 | },
20 | "repository": {
21 | "type": "git",
22 | "url": "https://github.com/hashicorp/react-components.git",
23 | "directory": "packages/tabs"
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/packages/actions/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@hashicorp/react-actions",
3 | "version": "0.4.4",
4 | "description": "",
5 | "author": "HashiCorp",
6 | "license": "MPL-2.0",
7 | "dependencies": {
8 | "@hashicorp/platform-product-meta": "^0.1.0",
9 | "@hashicorp/react-button": "^6.3.0",
10 | "@hashicorp/react-standalone-link": "^0.4.0",
11 | "classnames": "^2.3.1"
12 | },
13 | "peerDependencies": {
14 | "@hashicorp/mktg-global-styles": ">=3.x",
15 | "react": ">=16.x"
16 | },
17 | "repository": {
18 | "type": "git",
19 | "url": "https://github.com/hashicorp/react-components.git",
20 | "directory": "packages/actions"
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/packages/close-button/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # @hashicorp/react-close-button
2 |
3 | ## 0.1.2
4 |
5 | ### Patch Changes
6 |
7 | - [#701](https://github.com/hashicorp/react-components/pull/701) [`67831914`](https://github.com/hashicorp/react-components/commit/678319141917736de691882294bb6827f09f60ea) Thanks [@alexcarpenter](https://github.com/alexcarpenter)! - Adds size prop
8 |
9 | ## 0.1.1
10 |
11 | ### Patch Changes
12 |
13 | - [#560](https://github.com/hashicorp/react-components/pull/560) [`48120ce4`](https://github.com/hashicorp/react-components/commit/48120ce48399527a677cf78ddac4b5f7b4d9bb40) Thanks [@alexcarpenter](https://github.com/alexcarpenter)! - Initial setup
14 |
--------------------------------------------------------------------------------
/packages/tabs/provider.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | import { createContext, useState, useContext, useMemo } from 'react'
7 |
8 | export function useTabGroups() {
9 | return useContext(TabContext)
10 | }
11 |
12 | const TabContext = createContext()
13 |
14 | export default function TabProvider({ children }) {
15 | const [activeTabGroup, setActiveTabGroup] = useState()
16 | const contextValue = useMemo(() => ({ activeTabGroup, setActiveTabGroup }), [
17 | activeTabGroup,
18 | ])
19 |
20 | return (
21 | {children}
22 | )
23 | }
24 |
--------------------------------------------------------------------------------
/packages/error-view/style.module.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | .root {
7 | composes: .g-grid-container from global;
8 | display: flex;
9 | flex-direction: column;
10 | justify-content: center;
11 | margin: 64px auto;
12 |
13 | /* max-width overrides g-grid-container default */
14 | max-width: 784px;
15 | min-height: 50vh;
16 | padding-inline: 32px;
17 | text-align: center;
18 |
19 | @media (--large) {
20 | padding-inline: 24px;
21 | }
22 | }
23 |
24 | .heading {
25 | composes: g-type-display-3 from global;
26 | }
27 |
28 | .link {
29 | color: var(--brand-link, var(--brand));
30 | }
31 |
--------------------------------------------------------------------------------
/packages/toggle/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@hashicorp/react-toggle",
3 | "description": "a simple toggle",
4 | "version": "5.1.1",
5 | "author": "HashiCorp",
6 | "contributors": [
7 | "Jennifer Yip",
8 | "Jeff Escalante"
9 | ],
10 | "license": "MPL-2.0",
11 | "peerDependencies": {
12 | "@hashicorp/mktg-global-styles": ">=3.x",
13 | "react": ">=16.x"
14 | },
15 | "publishConfig": {
16 | "access": "public"
17 | },
18 | "dependencies": {
19 | "classnames": "^2.3.1"
20 | },
21 | "repository": {
22 | "type": "git",
23 | "url": "https://github.com/hashicorp/react-components.git",
24 | "directory": "packages/toggle"
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/packages/expandable-arrow/index.test.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | import { render, screen } from '@testing-library/react'
7 | import ExpandableArrow from '.'
8 |
9 | describe(' ', () => {
10 | it('should render', () => {
11 | render( )
12 | const element = screen.getByTestId('expandable-arrow')
13 | expect(element).toBeInTheDocument()
14 | })
15 |
16 | it('should render expanded', () => {
17 | render( )
18 | const element = screen.getByTestId('expandable-arrow')
19 | expect(element).toHaveClass('expanded')
20 | })
21 | })
22 |
--------------------------------------------------------------------------------
/packages/open-api-page/partials/two-column-layout/index.tsx:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | import React from 'react'
7 | import s from './style.module.css'
8 |
9 | function TwoColumnLayout({
10 | columnOne,
11 | columnTwo,
12 | }: {
13 | /** Render slot for the first column. */
14 | columnOne: React.ReactNode
15 | /** Render slot for the second column. */
16 | columnTwo: React.ReactNode
17 | }): React.ReactElement {
18 | return (
19 |
20 |
{columnOne}
21 |
{columnTwo}
22 |
23 | )
24 | }
25 |
26 | export default TwoColumnLayout
27 |
--------------------------------------------------------------------------------
/packages/product-badge/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # @hashicorp/react-product-badge
2 |
3 | ## 0.3.0
4 |
5 | ### Minor Changes
6 |
7 | - [#823](https://github.com/hashicorp/react-components/pull/823) [`80ef3a38`](https://github.com/hashicorp/react-components/commit/80ef3a38ba67e23ba2d019530fb57d218e9d8268) Thanks [@alexcarpenter](https://github.com/alexcarpenter)! - Update neutral and blue colors
8 |
9 | ## 0.2.0
10 |
11 | ### Minor Changes
12 |
13 | - [#739](https://github.com/hashicorp/react-components/pull/739) [`203b534e`](https://github.com/hashicorp/react-components/commit/203b534e4a58cd056e2eff7db29d9815d220e9c9) Thanks [@nandereck](https://github.com/nandereck)! - Create ProductBadge component
14 |
--------------------------------------------------------------------------------
/packages/sentinel-embedded/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # @hashicorp/react-sentinel-embedded
2 |
3 | ## 2.0.0
4 |
5 | ### Major Changes
6 |
7 | - [#568](https://github.com/hashicorp/react-components/pull/568) [`26918b9e`](https://github.com/hashicorp/react-components/commit/26918b9e32b3d4882bb18786f09eaa63c178bbc6) Thanks [@dstaley](https://github.com/dstaley)! - Add TypeScript types
8 |
9 | ## 1.0.4
10 |
11 | ### Patch Changes
12 |
13 | - [#367](https://github.com/hashicorp/react-components/pull/367) [`9e64fa1`](https://github.com/hashicorp/react-components/commit/9e64fa13ca53055782165a9e862b26261faa2752) Thanks [@BRKalow](https://github.com/BRKalow)! - Publish to update the sentinel-embedded dependency
14 |
--------------------------------------------------------------------------------
/packages/split-rich-cta-list/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # @hashicorp/react-split-rich-cta-list
2 |
3 | ## 2.1.0
4 |
5 | ### Minor Changes
6 |
7 | - [#1007](https://github.com/hashicorp/react-components/pull/1007) [`e49d8f65`](https://github.com/hashicorp/react-components/commit/e49d8f65f6f7403ef73e250568fa202effadc2b6) Thanks [@dstaley](https://github.com/dstaley)! - Use next/image instead of react-inline-svg
8 |
9 | ## 2.0.4
10 |
11 | ### Patch Changes
12 |
13 | - [#950](https://github.com/hashicorp/react-components/pull/950) [`aab08441`](https://github.com/hashicorp/react-components/commit/aab0844140e85c3977227c4f3f254e7e3e3192ab) Thanks [@dstaley](https://github.com/dstaley)! - Update dependencies
14 |
--------------------------------------------------------------------------------
/packages/card/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@hashicorp/react-card",
3 | "version": "0.15.0",
4 | "description": "",
5 | "author": "HashiCorp",
6 | "license": "MPL-2.0",
7 | "dependencies": {
8 | "@hashicorp/react-expandable-arrow": "^0.1.0",
9 | "@hashicorp/react-product-badge": "^0.3.0",
10 | "classnames": "^2.3.1"
11 | },
12 | "peerDependencies": {
13 | "@hashicorp/flight-icons": ">=2.x",
14 | "@hashicorp/mktg-global-styles": ">=3.x",
15 | "react": ">=16.x",
16 | "next": ">=13.x"
17 | },
18 | "repository": {
19 | "type": "git",
20 | "url": "https://github.com/hashicorp/react-components.git",
21 | "directory": "packages/card"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/packages/markdown-page/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | import s from './style.module.css'
7 | import { MDXRemote } from 'next-mdx-remote'
8 | import HashiHead from '@hashicorp/react-head'
9 | import Content from '@hashicorp/react-content'
10 |
11 | export default function MarkdownPage({
12 | staticProps: { head, mdxSource },
13 | components = {},
14 | }) {
15 | const content =
16 | return (
17 | <>
18 |
19 |
20 |
21 |
22 | >
23 | )
24 | }
25 |
--------------------------------------------------------------------------------
/packages/min-100-layout/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@hashicorp/react-min-100-layout",
3 | "description": "The ` ` component is used to render page layouts that include footers, and are intended to have a minimum height of `100vh`, such that the footer always appears at the bottom of the viewport.",
4 | "author": "HashiCorp",
5 | "version": "2.0.1",
6 | "license": "MPL-2.0",
7 | "publishConfig": {
8 | "access": "public"
9 | },
10 | "dependencies": {
11 | "classnames": "^2.3.1"
12 | },
13 | "repository": {
14 | "type": "git",
15 | "url": "https://github.com/hashicorp/react-components.git",
16 | "directory": "packages/min-100-layout"
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/packages/related-content/types.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | import type { CardProps } from '@hashicorp/react-card/types'
7 | import type { StandaloneLinkProps } from '@hashicorp/react-standalone-link/types'
8 | export interface RelatedContentProps {
9 | appearance?: 'light' | 'dark'
10 | headline: string
11 | description?: string
12 | cards: Array
13 | cta: RelatedContentCtaProps
14 | }
15 |
16 | interface RelatedContentCtaProps
17 | extends Omit {
18 | text: string
19 | }
20 |
21 | type RelatedContentCardProps = Omit
22 |
--------------------------------------------------------------------------------
/packages/standalone-link/docs.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | componentName: 'StandaloneLink'
3 | ---
4 |
5 | As navigational element directly following content.
6 |
7 | {`Call-to-action `}
8 |
9 |
10 |
11 |
12 |
13 | ## Rules
14 |
15 | - They may appear on their own, directly following content, or in combination with a primary Button
16 |
17 | ## UX writing guidelines
18 |
19 | - Target a maximum of 2-3 words.
20 | - Target a readability grade level score of 8 to meet plain language guidelines.
21 | - Text uses Sentence case capitalization.
22 |
--------------------------------------------------------------------------------
/packages/text-input/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@hashicorp/react-text-input",
3 | "description": "Text field input to be used in formik forms",
4 | "version": "6.0.0",
5 | "author": "HashiCorp",
6 | "contributors": [
7 | "Zach Shilton"
8 | ],
9 | "dependencies": {
10 | "classnames": "^2.3.1"
11 | },
12 | "license": "MPL-2.0",
13 | "peerDependencies": {
14 | "@hashicorp/mktg-global-styles": ">=3.x",
15 | "react": ">=18.x"
16 | },
17 | "publishConfig": {
18 | "access": "public"
19 | },
20 | "repository": {
21 | "type": "git",
22 | "url": "https://github.com/hashicorp/react-components.git",
23 | "directory": "packages/text-input"
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/packages/video-feature/types.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | import type { AuthorBylineProps } from '@hashicorp/react-author-byline/types'
7 | import type { IntroProps } from '@hashicorp/react-intro/types'
8 | import type { InlineVideoProps } from '@hashicorp/react-inline-video/types'
9 |
10 | export interface VideoFeatureProps {
11 | appearance?: 'light' | 'dark'
12 | contentPosition?: 'left' | 'right'
13 | heading: IntroProps['heading']
14 | description: IntroProps['description']
15 | author?: Pick
16 | video: Pick
17 | }
18 |
--------------------------------------------------------------------------------
/packages/combobox/utils/filter-options.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | import fuzzysearch from 'fuzzysearch'
7 | import { OptionMatchParam } from '../'
8 |
9 | export default function filterOptions({ term, options }: OptionMatchParam) {
10 | // if there's no search term we short-circuit and return everything
11 | if (!term) return options
12 | // Otherwise we reduce the options array to only matching options
13 | return options.reduce((acc, item) => {
14 | const isValueMatch = fuzzysearch(term.toLowerCase(), item.toLowerCase())
15 | if (isValueMatch) return acc.concat(item)
16 | return acc
17 | }, [] as string[])
18 | }
19 |
--------------------------------------------------------------------------------
/packages/inline-video/index.test.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | import { render, screen } from '@testing-library/react'
7 | import InlineVideo from '.'
8 |
9 | const defaultProps = {
10 | url: 'https://youtu.be/nJ0aI6sEDRo',
11 | description:
12 | 'Description - 2 lines with character limit of 90. Tempus in egestas sagittis nulla feugiat',
13 | }
14 |
15 | describe(' ', () => {
16 | it('renders the provided description text', () => {
17 | render( )
18 | const element = screen.getByText(defaultProps.description)
19 | expect(element).toBeInTheDocument()
20 | })
21 | })
22 |
--------------------------------------------------------------------------------
/packages/placeholder/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # @hashicorp/react-placeholder
2 |
3 | ## 0.1.2
4 |
5 | ### Patch Changes
6 |
7 | - [#905](https://github.com/hashicorp/react-components/pull/905) [`1f8ee91d`](https://github.com/hashicorp/react-components/commit/1f8ee91db48fb2962464632b2ce7e507a07de46f) Thanks [@EnMod](https://github.com/EnMod)! - Fixes shine animation height not filling its containing box
8 |
9 | ## 0.1.1
10 |
11 | ### Patch Changes
12 |
13 | - [#901](https://github.com/hashicorp/react-components/pull/901) [`f2846930`](https://github.com/hashicorp/react-components/commit/f2846930196beb30ec8340873e4f2390b0964675) Thanks [@BRKalow](https://github.com/BRKalow)! - Fixes types of the Placeholder component.
14 |
--------------------------------------------------------------------------------
/packages/aside/props.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | module.exports = {
7 | children: {
8 | type: 'function',
9 | description: 'Children to render into the Alert block.',
10 | required: true,
11 | },
12 | type: {
13 | type: 'string',
14 | description:
15 | 'The type of message being displayed, which mainly affects coloration. Defaults to "info".',
16 | control: { type: 'select' },
17 | options: ['info', 'success', 'warning', 'danger'],
18 | required: false,
19 | },
20 | className: {
21 | type: 'function',
22 | description: 'Optional className to add to the root element.',
23 | },
24 | }
25 |
--------------------------------------------------------------------------------
/packages/docs-page/components/version-select/props.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | module.exports = {
7 | versions: {
8 | type: 'Array',
9 | description: 'Array of version options',
10 | required: true,
11 | properties: [
12 | {
13 | type: 'object',
14 | properties: {
15 | name: {
16 | type: 'string',
17 | description: 'A version’s programmatic value',
18 | },
19 | label: {
20 | type: 'string',
21 | description: 'A version’s human-friendly display value',
22 | },
23 | },
24 | },
25 | ],
26 | },
27 | }
28 |
--------------------------------------------------------------------------------
/packages/select-input/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@hashicorp/react-select-input",
3 | "description": "Select input field",
4 | "version": "5.1.0",
5 | "author": "HashiCorp",
6 | "contributors": [
7 | "Richard Flosi"
8 | ],
9 | "dependencies": {
10 | "classnames": "^2.3.1",
11 | "downshift": "3.1.5"
12 | },
13 | "license": "MPL-2.0",
14 | "peerDependencies": {
15 | "@hashicorp/mktg-global-styles": ">=3.x",
16 | "react": ">=16.x"
17 | },
18 | "publishConfig": {
19 | "access": "public"
20 | },
21 | "repository": {
22 | "type": "git",
23 | "url": "https://github.com/hashicorp/react-components.git",
24 | "directory": "packages/select-input"
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/packages/textarea-input/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@hashicorp/react-textarea-input",
3 | "description": "Textarea field input to be used in formik forms",
4 | "version": "2.0.0",
5 | "author": "HashiCorp",
6 | "contributors": [
7 | "Zach Shilton"
8 | ],
9 | "dependencies": {
10 | "clsx": "^1.1.1"
11 | },
12 | "license": "MPL-2.0",
13 | "peerDependencies": {
14 | "@hashicorp/mktg-global-styles": ">=3.x",
15 | "react": ">=18.x"
16 | },
17 | "publishConfig": {
18 | "access": "public"
19 | },
20 | "repository": {
21 | "type": "git",
22 | "url": "https://github.com/hashicorp/react-components.git",
23 | "directory": "packages/textarea-input"
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/packages/featured-slider/partials/status-bar.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | import classNames from 'classnames'
7 | import s from './status-bar.module.css'
8 |
9 | export default function StatusBar({ dark, active, timing }) {
10 | return (
11 |
15 |
23 |
24 | )
25 | }
26 |
--------------------------------------------------------------------------------
/packages/logo-grid/docs.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | componentName: LogoGrid
3 | ---
4 |
5 | Displays a grid of company logos. Typically populated by data from DatoCMS.
6 |
7 |
8 | {` `}
19 |
20 |
21 |
22 |
23 | ### Props
24 |
25 |
26 |
27 | ### Playground
28 |
29 | {/* */}
30 |
--------------------------------------------------------------------------------
/packages/text-split-with-image/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | import TextSplit from '@hashicorp/react-text-split'
7 | import Image from '@hashicorp/react-image'
8 | import styles from './styles/text-split-with-image.module.css'
9 |
10 | export default function TextSplitWithImage({ className, image, textSplit }) {
11 | const altWithFallback = image.alt || textSplit.heading || ''
12 | return (
13 |
14 |
15 |
16 |
17 |
18 | )
19 | }
20 |
--------------------------------------------------------------------------------
/packages/checkbox-input/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@hashicorp/react-checkbox-input",
3 | "description": "A boolean input that displays a checkbox and label.",
4 | "version": "6.0.0",
5 | "author": "HashiCorp",
6 | "contributors": [
7 | "Zach Shilton"
8 | ],
9 | "dependencies": {
10 | "classnames": "^2.3.1"
11 | },
12 | "license": "MPL-2.0",
13 | "peerDependencies": {
14 | "@hashicorp/mktg-global-styles": ">=3.x",
15 | "react": ">=18.x"
16 | },
17 | "publishConfig": {
18 | "access": "public"
19 | },
20 | "repository": {
21 | "type": "git",
22 | "url": "https://github.com/hashicorp/react-components.git",
23 | "directory": "packages/checkbox-input"
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/packages/docs-sidenav/fixtures/content/ambiguous.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | page_title: Ambiguous
3 | description: >-
4 | This file is located at both ambiguous.mdx and ambiguous/index.mdx, so trying to
5 | include it should throw an error.
6 | ---
7 |
8 | # Introduction to Vault
9 |
10 | Welcome to the introduction guide to HashiCorp Vault! This guide is the best
11 | place to get started with Vault. This guide covers what Vault is, what problems
12 | it can solve, how it compares to existing software, and contains a quick start
13 | for using Vault.
14 |
15 | If you are already familiar with the basics of Vault, the
16 | [documentation](/docs) provides a better reference guide for all
17 | available features as well as internals.
18 |
--------------------------------------------------------------------------------
/packages/docs-sidenav/fixtures/content/ambiguous/index.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | page_title: Ambiguous
3 | description: >-
4 | This file is located at both ambiguous.mdx and ambiguous/index.mdx, so trying to
5 | include it should throw an error.
6 | ---
7 |
8 | # Introduction to Vault
9 |
10 | Welcome to the introduction guide to HashiCorp Vault! This guide is the best
11 | place to get started with Vault. This guide covers what Vault is, what problems
12 | it can solve, how it compares to existing software, and contains a quick start
13 | for using Vault.
14 |
15 | If you are already familiar with the basics of Vault, the
16 | [documentation](/docs) provides a better reference guide for all
17 | available features as well as internals.
18 |
--------------------------------------------------------------------------------
/packages/stepped-feature-list/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@hashicorp/react-stepped-feature-list",
3 | "description": "Renders a list of features for a product",
4 | "version": "4.0.4",
5 | "author": "HashiCorp",
6 | "contributors": [
7 | "Zack Tanner"
8 | ],
9 | "dependencies": {
10 | "nuka-carousel": "^4.8.4"
11 | },
12 | "peerDependencies": {
13 | "@hashicorp/mktg-global-styles": ">=3.x",
14 | "react": ">=16.x"
15 | },
16 | "license": "MPL-2.0",
17 | "publishConfig": {
18 | "access": "public"
19 | },
20 | "repository": {
21 | "type": "git",
22 | "url": "https://github.com/hashicorp/react-components.git",
23 | "directory": "packages/stepped-feature-list"
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/packages/enterprise-alert/docs.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | componentName: 'EnterpriseAlert'
3 | ---
4 |
5 | The `` component renders a small alert used to note an enterprise feature.
6 |
7 |
8 | {` `}
9 |
10 |
11 |
12 |
13 | ### Props
14 |
15 |
16 |
17 | ### Inline
18 |
19 | Intended to be used as a "tag" after a headline, bullet point, etc.
20 |
21 |
22 | {` `}
23 |
24 |
25 | ### Custom Content
26 |
27 |
28 | {`custom message `}
29 |
30 |
--------------------------------------------------------------------------------
/packages/notification/core/utils.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | import type { ValueFunction, ValueOrFunction } from '../types'
7 |
8 | export const genId = (() => {
9 | let count = 0
10 | return () => {
11 | return (++count).toString()
12 | }
13 | })()
14 |
15 | const isFunction = (
16 | valOrFunction: ValueOrFunction
17 | ): valOrFunction is ValueFunction =>
18 | typeof valOrFunction === 'function'
19 |
20 | export const renderNotification = (
21 | valOrFunction: ValueOrFunction,
22 | arg: TArg
23 | ): TValue => (isFunction(valOrFunction) ? valOrFunction(arg) : valOrFunction)
24 |
--------------------------------------------------------------------------------
/packages/form-fields/checkbox/index.tsx:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | import React, { ReactNode, ComponentProps } from 'react'
7 | import RadioCheckbox from '../partials/radio-checkbox'
8 |
9 | interface CheckboxInputProps {
10 | label: ReactNode
11 | appearance?: 'light' | 'dark'
12 | className?: string
13 | field: ComponentProps<'input'>
14 | error?: string
15 | }
16 |
17 | /**
18 | * A basic checkbox and label that allow the user to
19 | * control a ` ` element.
20 | */
21 | function CheckboxInput(props: CheckboxInputProps) {
22 | return
23 | }
24 |
25 | export default CheckboxInput
26 |
--------------------------------------------------------------------------------
/packages/hashi-stack-menu/stack-menu-section/stack-menu-section.module.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | .stackMenuSection {
7 | display: flex;
8 | flex-direction: column;
9 | align-items: flex-start;
10 | justify-content: space-between;
11 | padding: 0;
12 | margin: 0;
13 | flex: 1 1 125px;
14 | }
15 |
16 | .stackMenuSectionPlusDivider {
17 | composes: stackMenuSection;
18 | padding: 0;
19 | margin-left: 80px;
20 | position: relative;
21 | flex: 1 0 260px;
22 |
23 | &::before {
24 | position: absolute;
25 | content: '';
26 | width: 1px;
27 | height: 100%;
28 | background: var(--gray-5);
29 | left: -64px;
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/packages/marketo-form/partials/fields/form-page-url-field/index.tsx:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | import { useEffect } from 'react'
7 | import { useFormContext } from 'react-hook-form'
8 | import type { MarketoFormHiddenField } from '../../../types'
9 |
10 | const FormPageUrlField = ({ field }: { field: MarketoFormHiddenField }) => {
11 | const { register, setValue } = useFormContext()
12 |
13 | useEffect(() => {
14 | const { protocol, host, pathname } = window.location
15 | setValue(field.id, `${protocol}//${host}${pathname}`)
16 | }, [])
17 |
18 | return
19 | }
20 |
21 | export default FormPageUrlField
22 |
--------------------------------------------------------------------------------
/packages/section-header/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@hashicorp/react-section-header",
3 | "description": "very simple headline & subheading for a section of a page",
4 | "version": "5.0.5",
5 | "author": "HashiCorp",
6 | "contributors": [
7 | "Jeff Escalante"
8 | ],
9 | "dependencies": {
10 | "@hashicorp/js-utils": "^1.0.10"
11 | },
12 | "license": "MPL-2.0",
13 | "peerDependencies": {
14 | "@hashicorp/mktg-global-styles": ">=3.x",
15 | "react": ">=16.x"
16 | },
17 | "publishConfig": {
18 | "access": "public"
19 | },
20 | "repository": {
21 | "type": "git",
22 | "url": "https://github.com/hashicorp/react-components.git",
23 | "directory": "packages/section-header"
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/swingset-extensions/playground/components/icon-refresh.tsx:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | import * as React from 'react'
7 | import { SVGProps } from 'react'
8 |
9 | export const IconRefresh = (props: SVGProps) => (
10 |
22 |
23 |
24 |
25 | )
26 |
--------------------------------------------------------------------------------
/swingset-extensions/usage-details/svg/loading-spinner.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/packages/content-cta/docs.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | componentName: 'ContentCta'
3 | ---
4 |
5 | A flexible call-to-action component used in a variety of places on HashiCorp websites
6 |
7 |
8 | {` `}
23 |
24 |
25 |
26 |
27 | ### Props
28 |
29 |
30 |
--------------------------------------------------------------------------------
/swingset-extensions/playground/components/icon-copy.tsx:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | import * as React from 'react'
7 | import { SVGProps } from 'react'
8 |
9 | export const IconCopy = (props: SVGProps) => (
10 |
22 |
23 |
24 |
25 | )
26 |
--------------------------------------------------------------------------------
/packages/card/person-card/style.module.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | .location {
7 | composes: g-type-body-small-x-strong from global;
8 | margin: 0;
9 | color: var(--secondary-text-color);
10 | }
11 |
12 | .thumbnailContainer {
13 | position: relative;
14 | }
15 |
16 | .thumbnailIcon {
17 | --size: 40px;
18 |
19 | position: absolute;
20 | bottom: 20px;
21 | right: 20px;
22 | width: var(--size);
23 | height: var(--size);
24 | display: grid;
25 | place-items: center;
26 | border-radius: 9999px;
27 | overflow: hidden;
28 | background-color: var(--wpl-neutral-0);
29 | opacity: 0.5;
30 |
31 | & svg {
32 | position: relative;
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/packages/case-study-slider/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@hashicorp/react-case-study-slider",
3 | "description": "displays up to three case studies",
4 | "version": "7.0.3",
5 | "author": "HashiCorp",
6 | "contributors": [
7 | "Mike Wickett"
8 | ],
9 | "dependencies": {
10 | "@hashicorp/react-featured-slider": "^5.0.2",
11 | "@hashicorp/react-image": "^4.0.4"
12 | },
13 | "peerDependencies": {
14 | "@hashicorp/mktg-global-styles": ">=3.x",
15 | "react": ">=16.x"
16 | },
17 | "publishConfig": {
18 | "access": "public"
19 | },
20 | "repository": {
21 | "type": "git",
22 | "url": "https://github.com/hashicorp/react-components.git",
23 | "directory": "packages/case-study-slider"
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/packages/content/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@hashicorp/react-content",
3 | "description": "Styled prose content",
4 | "version": "8.3.0",
5 | "author": "HashiCorp",
6 | "contributors": [
7 | "Mike Wickett",
8 | "Zach Shilton"
9 | ],
10 | "license": "MPL-2.0",
11 | "peerDependencies": {
12 | "@hashicorp/mktg-global-styles": ">=3.x",
13 | "react": ">=16.x"
14 | },
15 | "publishConfig": {
16 | "access": "public"
17 | },
18 | "dependencies": {
19 | "@hashicorp/platform-product-meta": "^0.1.0",
20 | "classnames": "^2.3.1"
21 | },
22 | "repository": {
23 | "type": "git",
24 | "url": "https://github.com/hashicorp/react-components.git",
25 | "directory": "packages/content"
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/packages/sentinel-embedded/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@hashicorp/react-sentinel-embedded",
3 | "description": "Embed the Sentinel playground into an MDX page.",
4 | "version": "2.0.0",
5 | "author": "HashiCorp",
6 | "contributors": [
7 | "Cameron Stitt"
8 | ],
9 | "dependencies": {
10 | "@hashicorp/sentinel-embedded": "^0.0.14"
11 | },
12 | "license": "MPL-2.0",
13 | "peerDependencies": {
14 | "@hashicorp/mktg-global-styles": ">=3.x",
15 | "react": ">=16.x"
16 | },
17 | "publishConfig": {
18 | "access": "public"
19 | },
20 | "repository": {
21 | "type": "git",
22 | "url": "https://github.com/hashicorp/react-components.git",
23 | "directory": "packages/sentinel-embedded"
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/packages/card/index.tsx:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | import Card from './card'
7 | import { BlogCard } from './blog-card'
8 | import { CareerCard } from './career-card'
9 | import { CustomerStoryCard } from './customer-story-card'
10 | import { EventCard } from './event-card'
11 | import { NewsroomCard } from './newsroom-card'
12 | import { PartnerCard } from './partner-card'
13 | import { PersonCard } from './person-card'
14 | import { ResourceCard } from './resource-card'
15 |
16 | export default Card
17 | export {
18 | BlogCard,
19 | CareerCard,
20 | CustomerStoryCard,
21 | EventCard,
22 | NewsroomCard,
23 | PartnerCard,
24 | PersonCard,
25 | ResourceCard,
26 | }
27 |
--------------------------------------------------------------------------------
/packages/notification/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@hashicorp/react-notification",
3 | "version": "0.5.1",
4 | "description": "",
5 | "author": "HashiCorp",
6 | "license": "MPL-2.0",
7 | "dependencies": {
8 | "@hashicorp/flight-icons": "^2.0.2",
9 | "@hashicorp/platform-product-meta": "^0.1.0",
10 | "@hashicorp/react-close-button": "^0.1.1",
11 | "classnames": "^2.3.1"
12 | },
13 | "peerDependencies": {
14 | "@hashicorp/mktg-global-styles": ">=3.x",
15 | "framer-motion": "^6.3.11",
16 | "react": ">=16.x",
17 | "next": ">=13.x"
18 | },
19 | "repository": {
20 | "type": "git",
21 | "url": "https://github.com/hashicorp/react-components.git",
22 | "directory": "packages/notification"
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/packages/feedback-form/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@hashicorp/react-feedback-form",
3 | "description": "Create a feedback form to solicit feedback from users",
4 | "version": "0.3.0",
5 | "author": "HashiCorp",
6 | "contributors": [
7 | "Bryce Kalow"
8 | ],
9 | "dependencies": {
10 | "@hashicorp/react-button": "^6.0.4",
11 | "shortid": "^2.2.16"
12 | },
13 | "license": "MPL-2.0",
14 | "peerDependencies": {
15 | "@hashicorp/mktg-global-styles": ">=3.x",
16 | "react": ">=16.x"
17 | },
18 | "publishConfig": {
19 | "access": "public"
20 | },
21 | "repository": {
22 | "type": "git",
23 | "url": "https://github.com/hashicorp/react-components.git",
24 | "directory": "packages/feedback-form"
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/swingset-extensions/playground/components/icon-maximize.tsx:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | import { SVGProps } from 'react'
7 |
8 | export const IconMaximize = (props: SVGProps) => (
9 |
21 |
22 |
23 |
24 |
25 |
26 | )
27 |
--------------------------------------------------------------------------------
/swingset-extensions/playground/components/icon-minimize.tsx:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | import { SVGProps } from 'react'
7 |
8 | export const IconMinimize = (props: SVGProps) => (
9 |
21 |
22 |
23 |
24 |
25 |
26 | )
27 |
--------------------------------------------------------------------------------
/packages/learn-callout/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@hashicorp/react-learn-callout",
3 | "version": "2.0.2",
4 | "description": "A split view of CTA to the learn platform and tutorial links.",
5 | "author": "Hashicorp",
6 | "license": "MPL-2.0",
7 | "dependencies": {
8 | "@hashicorp/platform-product-meta": "^0.1.0",
9 | "@hashicorp/react-button": "^6.0.4",
10 | "classnames": "^2.3.1"
11 | },
12 | "peerDependencies": {
13 | "@hashicorp/mktg-global-styles": ">=3.x",
14 | "react": ">=16.x"
15 | },
16 | "publishConfig": {
17 | "access": "public"
18 | },
19 | "repository": {
20 | "type": "git",
21 | "url": "https://github.com/hashicorp/react-components.git",
22 | "directory": "packages/learn-callout"
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/packages/min-100-layout/docs.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | componentName: 'Min100Layout'
3 | ---
4 |
5 | The ` ` component is used to render page layouts that include footers, and are intended to have a minimum height of `100vh`, such that the footer always appears at the bottom of the viewport.
6 |
7 |
8 | {`
9 | This is the footer.}>
10 | This is the content area.
11 | Put everything that will be visible on the page in this area.
12 | This includes Navigation, AlertBanners, etc etc.
13 |
14 | `}
15 |
16 |
17 |
18 |
19 | ### Props
20 |
21 |
22 |
--------------------------------------------------------------------------------
/packages/subnav/partials/CtaLinks/github-stars-link/formatStarCount/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | /*
7 | * Given:
8 | * starCount (int)
9 | * Return:
10 | * Formatted string, to match GitHub's typical display of star counts,
11 | * that is, expressed as thousands of stars
12 | * Or returns false for falsy starCount values
13 | */
14 | function formatStarCount(starCount) {
15 | if (!starCount || starCount <= 0) return false
16 | if (starCount < 1000) return `${starCount}`
17 | const thousands = Math.floor(starCount / 100.0) / 10.0
18 | if (starCount < 100000) return `${thousands.toFixed(1)}k`
19 | return `${Math.floor(thousands)}k`
20 | }
21 |
22 | export default formatStarCount
23 |
--------------------------------------------------------------------------------
/packages/terminal/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@hashicorp/react-command-line-terminal",
3 | "description": "Static UI element to render a command line terminal with code",
4 | "version": "3.0.0",
5 | "author": "HashiCorp",
6 | "contributors": [
7 | "Zack Tanner",
8 | "Brandon Romano"
9 | ],
10 | "license": "MPL-2.0",
11 | "dependencies": {
12 | "@hashicorp/platform-product-meta": "^0.1.0"
13 | },
14 | "peerDependencies": {
15 | "@hashicorp/mktg-global-styles": ">=3.x",
16 | "react": ">=16.x"
17 | },
18 | "publishConfig": {
19 | "access": "public"
20 | },
21 | "repository": {
22 | "type": "git",
23 | "url": "https://github.com/hashicorp/react-components.git",
24 | "directory": "packages/terminal"
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/packages/text-split/partials/button-group/style.module.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | .buttonGroup {
7 | margin-top: 32px;
8 |
9 | @media (--large) {
10 | margin-top: 40px;
11 | }
12 |
13 | &.as-buttons {
14 | margin-bottom: -16px;
15 |
16 | & .button {
17 | margin-right: 16px;
18 | margin-bottom: 16px;
19 | }
20 | }
21 |
22 | &.as-links {
23 | & .button {
24 | display: block;
25 | float: left;
26 | clear: both;
27 | & + .button {
28 | margin-top: 8px;
29 | }
30 | }
31 |
32 | &::after {
33 | display: block;
34 | float: none;
35 | content: '';
36 | clear: both;
37 | }
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/packages/enterprise-alert/props.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | const baseProps = require('../../props.js')
7 |
8 | module.exports = {
9 | product: {
10 | ...baseProps.product,
11 | },
12 | inline: {
13 | description:
14 | 'Determines whether to display the alert inline and only with a tagline',
15 | type: 'boolean',
16 | control: { type: 'checkbox' },
17 | testValue: false,
18 | },
19 | children: {
20 | description: 'Custom content replacing the content of the alert',
21 | type: 'string',
22 | control: { type: 'textarea' },
23 | },
24 | className: {
25 | type: 'string',
26 | description: 'Optional className to add to the root element',
27 | },
28 | }
29 |
--------------------------------------------------------------------------------
/swingset-extensions/usage-details/partials/project-list-item/project-list-item.module.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | .root {
7 | display: flex;
8 | align-items: center;
9 | width: 25em;
10 | }
11 |
12 | .linkContainer {
13 | display: flex;
14 | padding: 2px 0;
15 | align-items: center;
16 | composes: g-type-code from global;
17 | line-height: 28px;
18 | margin-right: 8px;
19 | }
20 |
21 | .repoLabel {
22 | margin-left: 8px;
23 | color: var(--gray-2);
24 |
25 | &[data-not-used='true'] {
26 | color: var(--gray-3);
27 | }
28 |
29 | &[data-hovered='true'] {
30 | color: var(--brand);
31 | }
32 | }
33 |
34 | .error {
35 | margin-left: 8px;
36 | color: var(--danger);
37 | }
38 |
--------------------------------------------------------------------------------
/packages/error-view/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@hashicorp/react-error-view",
3 | "description": "error view for use on docs sites",
4 | "version": "0.2.0",
5 | "author": "HashiCorp",
6 | "contributors": [
7 | "Zach Shilton"
8 | ],
9 | "main": "index.tsx",
10 | "license": "MPL-2.0",
11 | "peerDependencies": {
12 | "@hashicorp/mktg-global-styles": ">=3.x",
13 | "next": ">=11.x",
14 | "react": ">=16.x"
15 | },
16 | "publishConfig": {
17 | "access": "public"
18 | },
19 | "scripts": {
20 | "test": "echo \"Error: no test specified\" && exit 1"
21 | },
22 | "keywords": [],
23 | "repository": {
24 | "type": "git",
25 | "url": "https://github.com/hashicorp/react-components.git",
26 | "directory": "packages/error-view"
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/packages/toggle/docs.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | componentName: Toggle
3 | ---
4 |
5 | A simple toggle, used primarily in consent manager.
6 |
7 | {` `}
8 |
9 |
10 |
11 | ### Props
12 |
13 |
14 |
15 | ### Examples
16 |
17 | You can pass the `enabled` prop in to toggle.
18 |
19 | {` `}
20 |
21 | You can also pass the `onChange` function to react when the toggle changes state
22 |
23 | {` console.log('toggle changed')} />`}
24 |
25 | Appearance set to `dark`
26 |
27 | {`
`}
28 |
--------------------------------------------------------------------------------
/swingset-extensions/usage-details/partials/top-bar/top-bar.module.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | .root {
7 | display: flex;
8 | align-items: flex-end;
9 | flex-wrap: wrap;
10 | padding-bottom: 1rem;
11 | border-bottom: 1px solid var(--gray-5);
12 | margin-bottom: 1rem;
13 | }
14 |
15 | .heading {
16 | margin: 0 16px 0 0;
17 | composes: g-type-display-3 from global;
18 | }
19 |
20 | .packageDetails {
21 | display: flex;
22 | flex-wrap: wrap;
23 | align-items: flex-end;
24 | justify-content: space-between;
25 | flex-grow: 1;
26 | }
27 |
28 | .currentVersion {
29 | display: flex;
30 | }
31 | .currentVersionLabel {
32 | display: block;
33 | color: var(--gray-2);
34 | margin-right: 8px;
35 | }
36 |
--------------------------------------------------------------------------------
/packages/docs-page/server/get-paths-from-nav-data.test.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | import {
7 | getPathArraysFromNodes,
8 | getPathsFromNavData,
9 | } from './get-paths-from-nav-data'
10 |
11 | import navData from './__fixtures__/navData.json'
12 |
13 | describe('getPathArraysFromNodes', () => {
14 | it('should return an array of "path arrays"', () => {
15 | expect(getPathArraysFromNodes(navData)).toMatchSnapshot()
16 | })
17 | })
18 |
19 | describe('getPathsFromNavData', () => {
20 | // https://nextjs.org/docs/basic-features/data-fetching#getstaticpaths-static-generation
21 | it('should return an array of Next.js paths', () => {
22 | expect(getPathsFromNavData(navData)).toMatchSnapshot()
23 | })
24 | })
25 |
--------------------------------------------------------------------------------
/packages/hashi-stack-menu/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@hashicorp/react-hashi-stack-menu",
3 | "description": "A menu for displaying the entire HashiCorp stack",
4 | "version": "3.0.0",
5 | "author": "HashiCorp",
6 | "contributors": [
7 | "Jimmy Merritello"
8 | ],
9 | "dependencies": {
10 | "@hashicorp/react-inline-svg": "^6.0.3",
11 | "@hashicorp/react-link-wrap": "^3.0.3",
12 | "slugify": "1.6.5"
13 | },
14 | "peerDependencies": {
15 | "@hashicorp/mktg-global-styles": ">=3.x",
16 | "@hashicorp/mktg-logos": ">=1.x",
17 | "react": ">=16.x"
18 | },
19 | "license": "MPL-2.0",
20 | "repository": {
21 | "type": "git",
22 | "url": "https://github.com/hashicorp/react-components.git",
23 | "directory": "packages/hashi-stack-menu"
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/packages/product-download-page/utils/__tests__/downloader.test.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | import { prettyArch } from '../downloader'
7 |
8 | describe('prettyArch', () => {
9 | test('returns expected label for architecture', () => {
10 | const mapping = {
11 | // inputs that require special handling
12 | all: 'Universal (386 and Amd64)',
13 | x86_64: 'Amd64',
14 | i686: '686',
15 | // inputs that can use default handling
16 | amd64: 'Amd64',
17 | '386': '386',
18 | arm: 'Arm',
19 | arm64: 'Arm64',
20 | }
21 |
22 | for (const [input, expectedOutput] of Object.entries(mapping)) {
23 | expect(prettyArch(input)).toBe(expectedOutput)
24 | }
25 | })
26 | })
27 |
--------------------------------------------------------------------------------
/packages/form-fields/checkbox-group/style.module.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | .root {
7 | composes: wpl-variables input-root from '../style.module.css';
8 |
9 | /* reset fieldset UA styles */
10 | margin: 0;
11 | padding: 0;
12 | border: 0;
13 | width: 100%;
14 | margin-bottom: 24px;
15 |
16 | &.hidden {
17 | display: none;
18 | }
19 | }
20 |
21 | .theme-dark {
22 | composes: wpl-variables-dark from '../style.module.css';
23 |
24 | & .input {
25 | background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23e1e2e5' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/packages/image/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@hashicorp/react-image",
3 | "description": "super optimized image element, pulls from dato and formats for 7 screen sizes in two formats. Skips optimization for SVGs.",
4 | "version": "4.1.1",
5 | "author": "Hashicorp",
6 | "contributors": [
7 | "Jeff Escalante"
8 | ],
9 | "dependencies": {
10 | "object-assign": "^4.1.1",
11 | "query-string": "^6.14.1"
12 | },
13 | "license": "MPL-2.0",
14 | "peerDependencies": {
15 | "@hashicorp/mktg-global-styles": ">=3.x",
16 | "react": ">=16.x"
17 | },
18 | "publishConfig": {
19 | "access": "public"
20 | },
21 | "repository": {
22 | "type": "git",
23 | "url": "https://github.com/hashicorp/react-components.git",
24 | "directory": "packages/image"
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/packages/section-header/style.module.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | .root {
7 | text-align: center;
8 | max-width: 784px;
9 | margin: 0 auto;
10 | }
11 |
12 | .headlineOne {
13 | composes: g-type-display-1 from global;
14 | margin: 0;
15 | }
16 |
17 | .headlineTwo {
18 | composes: g-type-display-2 from global;
19 | margin: 0;
20 | }
21 |
22 | .description {
23 | composes: g-type-body-large from global;
24 | margin-top: 16px;
25 | color: var(--gray-2);
26 |
27 | @media (--large) {
28 | margin-top: 24px;
29 | }
30 |
31 | & > p {
32 | margin: 0;
33 |
34 | & + p {
35 | margin-top: 16px;
36 |
37 | @media (--large) {
38 | margin-top: 24px;
39 | }
40 | }
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/packages/tabbed-accordion/style.module.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | .root {
7 | background: white;
8 | padding: 64px 0;
9 |
10 | @media (--medium) {
11 | padding: 88px 0;
12 | }
13 | @media (--large) {
14 | padding: 128px 0;
15 | }
16 |
17 | & .tabsAfterHeading {
18 | margin-top: 48px;
19 | @media (--medium) {
20 | margin-top: 56px;
21 | }
22 | @media (--large) {
23 | margin-top: 64px;
24 | }
25 | }
26 |
27 | & .accordionItems {
28 | margin-top: 40px;
29 | }
30 | }
31 |
32 | .headingContainer {
33 | composes: g-grid-container from global;
34 | text-align: center;
35 | }
36 |
37 | .heading {
38 | composes: g-type-display-2 from global;
39 | margin: 0;
40 | }
41 |
--------------------------------------------------------------------------------
/packages/docs-sidenav/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@hashicorp/react-docs-sidenav",
3 | "description": "Sidebar used for navigation HashiCorp docs",
4 | "version": "9.1.0",
5 | "author": "HashiCorp",
6 | "contributors": [
7 | "Jeff Escalante"
8 | ],
9 | "dependencies": {
10 | "@hashicorp/platform-product-meta": "^0.1.0",
11 | "@hashicorp/react-link-wrap": "^3.1.0",
12 | "fuzzysearch": "1.0.3"
13 | },
14 | "license": "MPL-2.0",
15 | "peerDependencies": {
16 | "@hashicorp/mktg-global-styles": ">=3.x",
17 | "react": ">=16.x"
18 | },
19 | "publishConfig": {
20 | "access": "public"
21 | },
22 | "repository": {
23 | "type": "git",
24 | "url": "https://github.com/hashicorp/react-components.git",
25 | "directory": "packages/docs-sidenav"
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/packages/product-features-list/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@hashicorp/react-product-features-list",
3 | "description": "list for product features",
4 | "version": "5.0.2",
5 | "author": "HashiCorp",
6 | "contributors": [
7 | "Nicole Forrester"
8 | ],
9 | "dependencies": {
10 | "@hashicorp/react-button": "^6.0.4",
11 | "@hashicorp/react-image": "^4.0.4",
12 | "classnames": "^2.3.1"
13 | },
14 | "license": "MPL-2.0",
15 | "peerDependencies": {
16 | "@hashicorp/mktg-global-styles": ">=3.x",
17 | "react": ">=16.x"
18 | },
19 | "publishConfig": {
20 | "access": "public"
21 | },
22 | "repository": {
23 | "type": "git",
24 | "url": "https://github.com/hashicorp/react-components.git",
25 | "directory": "packages/product-features-list"
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/packages/standalone-link/props.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | module.exports = {
7 | appearance: {
8 | type: 'string',
9 | description: 'Display on light or dark backgrounds.',
10 | options: ['light', 'dark'],
11 | },
12 | children: {
13 | description: 'The text that appears inside the link.',
14 | type: 'string',
15 | control: { type: 'text' },
16 | testValue: 'Call-to-action',
17 | required: true,
18 | },
19 | href: {
20 | description: 'The url destination.',
21 | type: 'string',
22 | required: true,
23 | },
24 | theme: {
25 | description: 'The link color.',
26 | type: 'string',
27 | options: ['primary', 'secondary', 'tertiary'],
28 | required: false,
29 | },
30 | }
31 |
--------------------------------------------------------------------------------
/packages/text-split-with-image/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@hashicorp/react-text-split-with-image",
3 | "version": "4.3.1",
4 | "description": "Display an image alongside a title, description, and links.",
5 | "author": "HashiCorp",
6 | "contributors": [
7 | "Brandon Romano"
8 | ],
9 | "publishConfig": {
10 | "access": "public"
11 | },
12 | "license": "MPL-2.0",
13 | "dependencies": {
14 | "@hashicorp/react-image": "^4.0.3",
15 | "@hashicorp/react-text-split": "^5.0.0"
16 | },
17 | "peerDependencies": {
18 | "@hashicorp/mktg-global-styles": ">=3.x",
19 | "react": ">=16.x"
20 | },
21 | "repository": {
22 | "type": "git",
23 | "url": "https://github.com/hashicorp/react-components.git",
24 | "directory": "packages/text-split-with-image"
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/packages/accordion/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@hashicorp/react-accordion",
3 | "description": "A block that displays a set of title + content items, with content collapsed by default, but expandable to view. Also includes an optional heading for the block.",
4 | "version": "3.1.0",
5 | "author": "HashiCorp",
6 | "contributors": [
7 | "Zach Shilton"
8 | ],
9 | "dependencies": {
10 | "classnames": "^2.3.1"
11 | },
12 | "license": "MPL-2.0",
13 | "peerDependencies": {
14 | "@hashicorp/mktg-global-styles": ">=3.x",
15 | "react": ">=16.x"
16 | },
17 | "publishConfig": {
18 | "access": "public"
19 | },
20 | "repository": {
21 | "type": "git",
22 | "url": "https://github.com/hashicorp/react-components.git",
23 | "directory": "packages/accordion"
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/packages/product-download-page/partials/dropdown/style.module.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | .root {
7 | display: inline-block;
8 | position: relative;
9 | }
10 |
11 | .menu {
12 | position: absolute;
13 | list-style: none;
14 | max-height: 250px;
15 | overflow-y: auto;
16 | top: 35px;
17 | width: 100%;
18 | padding: 0;
19 | background-color: var(--white);
20 | box-shadow: 0 2px 1px -1px rgba(0, 0, 0, 0.2), 0 1px 1px 0 rgba(0, 0, 0, 0.14),
21 | 0 1px 3px 0 rgba(0, 0, 0, 0.12);
22 | }
23 |
24 | .option {
25 | padding: 8px 16px;
26 | cursor: pointer;
27 | background-color: var(--brand);
28 | color: var(--brand-text-on-primary,--white);
29 |
30 | &:hover {
31 | background-color: var(--brand);
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/packages/text-split-with-code/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@hashicorp/react-text-split-with-code",
3 | "description": "Display a title, description, and links alongside a code block",
4 | "version": "3.4.3",
5 | "author": "HashiCorp",
6 | "contributors": [
7 | "Brandon Romano"
8 | ],
9 | "dependencies": {
10 | "@hashicorp/react-code-block": "^6.0.0",
11 | "@hashicorp/react-text-split": "^5.0.0"
12 | },
13 | "license": "MPL-2.0",
14 | "peerDependencies": {
15 | "@hashicorp/mktg-global-styles": ">=3.x",
16 | "react": ">=16.x"
17 | },
18 | "publishConfig": {
19 | "access": "public"
20 | },
21 | "repository": {
22 | "type": "git",
23 | "url": "https://github.com/hashicorp/react-components.git",
24 | "directory": "packages/text-split-with-code"
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/packages/featured-slider/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@hashicorp/react-featured-slider",
3 | "description": "featured slider for case studies",
4 | "version": "5.0.2",
5 | "author": "HashiCorp",
6 | "contributors": [
7 | "Zach Shilton"
8 | ],
9 | "main": "index.js",
10 | "license": "MPL-2.0",
11 | "dependencies": {
12 | "@hashicorp/react-button": "^6.0.4",
13 | "@hashicorp/react-image": "^4.0.4",
14 | "classnames": "^2.3.1"
15 | },
16 | "peerDependencies": {
17 | "@hashicorp/mktg-global-styles": ">=3.x",
18 | "react": ">=16.x"
19 | },
20 | "publishConfig": {
21 | "access": "public"
22 | },
23 | "repository": {
24 | "type": "git",
25 | "url": "https://github.com/hashicorp/react-components.git",
26 | "directory": "packages/featured-slider"
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/packages/form-fields/partials/choice-group/style.module.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | .root {
7 | composes: wpl-variables input-root from '../../style.module.css';
8 |
9 | /* reset fieldset UA styles */
10 | margin: 0;
11 | padding: 0;
12 | border: 0;
13 | width: 100%;
14 | margin-bottom: 24px;
15 |
16 | &.hidden {
17 | display: none;
18 | }
19 | }
20 |
21 | .theme-dark {
22 | composes: wpl-variables-dark from '../../style.module.css';
23 |
24 | & .input {
25 | background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23e1e2e5' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/packages/hero/fragment.graphql:
--------------------------------------------------------------------------------
1 | fragment heroFields on HeroSectionRecord {
2 | id
3 | _modelApiKey
4 | videos {
5 | id
6 | name
7 | src {
8 | url
9 | srcType
10 | }
11 | playbackRate
12 | }
13 | image {
14 | url
15 | alt
16 | size
17 | }
18 | title
19 | titleLogo {
20 | url
21 | alt
22 | height
23 | format
24 | id
25 | size
26 | title
27 | width
28 | }
29 | alert {
30 | ...alertFields
31 | }
32 | description(markdown: true)
33 | centered
34 | backgroundTheme
35 | backgroundImage {
36 | width
37 | size
38 | url
39 | alt
40 | }
41 | buttons {
42 | id
43 | title
44 | position
45 | external
46 | url
47 | }
48 | helpText(markdown: true)
49 | smallTextTag
50 | theme
51 | }
52 |
--------------------------------------------------------------------------------
/packages/accordion/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | import React from 'react'
7 | import AccordionItems, { AccordionItem } from './partials/AccordionItems'
8 | import classNames from 'classnames'
9 | import s from './style.module.css'
10 |
11 | function Accordion({ heading, items, className }) {
12 | return (
13 |
14 |
15 | {heading && (
16 |
17 | {heading}
18 |
19 | )}
20 |
21 |
22 |
23 | )
24 | }
25 |
26 | export default Accordion
27 |
28 | export { AccordionItems, AccordionItem }
29 |
--------------------------------------------------------------------------------
/packages/author-byline/props.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | module.exports = {
7 | avatar: {
8 | type: 'string',
9 | description: 'Source url of the image',
10 | },
11 | name: {
12 | type: 'string',
13 | required: true,
14 | description: 'Renders as the first line of the byline',
15 | },
16 | role: {
17 | type: 'string',
18 | required: true,
19 | description: 'Renders as the second line of the byline',
20 | },
21 | variant: {
22 | type: 'string',
23 | options: ['light', 'dark'],
24 | description: 'Render on light or dark backgrounds',
25 | },
26 | appearance: {
27 | type: 'string',
28 | options: ['light', 'dark'],
29 | description: 'Render on light or dark backgrounds',
30 | },
31 | }
32 |
--------------------------------------------------------------------------------
/packages/products-used/types.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | import type { Products } from '@hashicorp/platform-product-meta'
7 |
8 | export interface ProductsUsedProps {
9 | /**
10 | * Display actions on light or dark background.
11 | */
12 | appearance?: 'light' | 'dark'
13 | /**
14 | * Array of products or products with links. Only supports one or the other, not a mix of the two.
15 | */
16 | products: Array | Array
17 | }
18 |
19 | interface Product {
20 | /**
21 | * Renders a product name
22 | */
23 | name: Exclude
24 | }
25 |
26 | interface ProductLink extends Product {
27 | /**
28 | * Where the anchor element links to when clicked.
29 | */
30 | href: string
31 | }
32 |
--------------------------------------------------------------------------------
/packages/tabbed-accordion/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@hashicorp/react-tabbed-accordion",
3 | "description": "Tabs with accordions nested inside",
4 | "version": "5.0.3",
5 | "author": "HashiCorp",
6 | "contributors": [
7 | "Zach Shilton"
8 | ],
9 | "dependencies": {
10 | "@hashicorp/react-accordion": "^3.0.2",
11 | "@hashicorp/react-tabs": "^8.0.0",
12 | "classnames": "^2.3.1"
13 | },
14 | "peerDependencies": {
15 | "@hashicorp/mktg-global-styles": ">=3.x",
16 | "react": ">=16.x"
17 | },
18 | "keywords": [],
19 | "license": "MPL-2.0",
20 | "publishConfig": {
21 | "access": "public"
22 | },
23 | "repository": {
24 | "type": "git",
25 | "url": "https://github.com/hashicorp/react-components.git",
26 | "directory": "packages/tabbed-accordion"
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/packages/close-button/index.test.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | import { fireEvent, render, screen } from '@testing-library/react'
7 | import CloseButton from '.'
8 |
9 | describe(' ', () => {
10 | it('should render', () => {
11 | render( {}} ariaLabel="Close video" />)
12 | const element = screen.getByLabelText('Close video')
13 | expect(element).toBeInTheDocument()
14 | })
15 |
16 | it('should handle onClick events', () => {
17 | const mockOnClick = jest.fn()
18 | render( )
19 | const element = screen.getByLabelText('Close video')
20 | fireEvent.click(element)
21 | expect(mockOnClick).toHaveBeenCalled()
22 | })
23 | })
24 |
--------------------------------------------------------------------------------
/packages/content/styles/a.module.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | .a {
7 | /* Links */
8 |
9 | /*
10 | Note: custom components are used in g-content areas.
11 | We don't want to clobber these with our default link styles,
12 | so we use the :not([class]) selector to ensure these defaults
13 | can be easily overriden.
14 | */
15 | & a:not([class]) {
16 | color: var(--brand-link);
17 | position: relative;
18 | transition: color 0.3s;
19 | text-decoration: none;
20 |
21 | &:hover {
22 | color: var(--brand-link);
23 | text-decoration: underline;
24 | }
25 |
26 | &:visited {
27 | color: var(--visited);
28 |
29 | &:hover {
30 | color: var(--visited-d1);
31 | }
32 | }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/packages/text-split-with-image/props.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | const textSplitProps = require('../text-split/props')
7 | const imageProps = require('../image/props')
8 |
9 | module.exports = {
10 | textSplit: {
11 | type: 'object',
12 | description: 'Data sent to the TextSplit component',
13 | required: true,
14 | properties: textSplitProps,
15 | },
16 | image: {
17 | type: 'object',
18 | description: 'Data passed to the Image component',
19 | required: true,
20 | properties: imageProps,
21 | },
22 | className: {
23 | type: 'string',
24 | description:
25 | 'Optional className to add to the root element of the TextSplit. If textSplit.className is provided, it will override this prop.',
26 | },
27 | }
28 |
--------------------------------------------------------------------------------
/packages/content/styles/pre.module.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | .pre {
7 | /* Note: only targets without className,
8 | to avoid conflicts with @hashicorp/react-code-block */
9 | & pre:not([class]) {
10 | background-color: var(--code-dark);
11 | border-radius: 3px;
12 | margin: 1.5rem 0;
13 | padding: 16px;
14 | overflow: auto;
15 | color: var(--code-light);
16 | font-family: var(--font-monospace);
17 | font-weight: var(--font-weight-reg);
18 | font-size: 0.844rem;
19 | line-height: 1.63em;
20 |
21 | & code {
22 | font: inherit;
23 | line-height: inherit;
24 | color: inherit;
25 | overflow-wrap: normal;
26 | white-space: pre;
27 | padding: 0;
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/packages/next-steps/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@hashicorp/react-next-steps",
3 | "version": "0.8.1",
4 | "description": "",
5 | "author": "HashiCorp",
6 | "license": "MPL-2.0",
7 | "dependencies": {
8 | "@hashicorp/platform-product-meta": "^0.1.0",
9 | "@hashicorp/react-actions": "^0.4.3",
10 | "@hashicorp/react-badge": "^0.2.0",
11 | "@hashicorp/react-expandable-arrow": "^0.1.0",
12 | "@hashicorp/react-intro": "^0.7.0",
13 | "@hashicorp/react-standalone-link": "^0.4.0",
14 | "classnames": "^2.3.1"
15 | },
16 | "peerDependencies": {
17 | "@hashicorp/mktg-global-styles": ">=3.x",
18 | "react": ">=16.x"
19 | },
20 | "repository": {
21 | "type": "git",
22 | "url": "https://github.com/hashicorp/react-components.git",
23 | "directory": "packages/next-steps"
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/packages/content-cta/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@hashicorp/react-content-cta",
3 | "description": "alert style content callout with product theming",
4 | "version": "4.0.1",
5 | "author": "HashiCorp",
6 | "contributors": [
7 | "Nicole Forrester"
8 | ],
9 | "dependencies": {
10 | "@hashicorp/platform-product-meta": "^0.1.0",
11 | "@hashicorp/react-button": "^6.0.4",
12 | "classnames": "^2.3.1"
13 | },
14 | "license": "MPL-2.0",
15 | "peerDependencies": {
16 | "@hashicorp/mktg-global-styles": ">=3.x",
17 | "react": ">=16.x"
18 | },
19 | "publishConfig": {
20 | "access": "public"
21 | },
22 | "style": "./style.css",
23 | "repository": {
24 | "type": "git",
25 | "url": "https://github.com/hashicorp/react-components.git",
26 | "directory": "packages/content-cta"
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/packages/logo-grid/hooks/use-on-focus-outside.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | import { useEffect } from 'react'
7 |
8 | /**
9 | * Hook that runs a callback on focus outside the ref
10 | */
11 | function useOnFocusOutside(ref, handler) {
12 | useEffect(() => {
13 | function handleFocusChange(event) {
14 | const isOutside = ref.current && !ref.current.contains(event.target)
15 | if (isOutside) handler(event)
16 | }
17 |
18 | // Bind the event listener
19 | document.addEventListener('focusin', handleFocusChange)
20 | return () => {
21 | // Unbind the event listener on clean up
22 | document.removeEventListener('focusin', handleFocusChange)
23 | }
24 | }, [ref, handler])
25 | }
26 |
27 | export default useOnFocusOutside
28 |
--------------------------------------------------------------------------------
/packages/text-split-with-image/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # @hashicorp/react-text-split-with-image
2 |
3 | ## 4.3.1
4 |
5 | ### Patch Changes
6 |
7 | - Updated dependencies [[`26918b9e`](https://github.com/hashicorp/react-components/commit/26918b9e32b3d4882bb18786f09eaa63c178bbc6)]:
8 | - @hashicorp/react-text-split@5.0.0
9 |
10 | ## 4.3.0
11 |
12 | ### Minor Changes
13 |
14 | - [#335](https://github.com/hashicorp/react-components/pull/335) [`8012b33`](https://github.com/hashicorp/react-components/commit/8012b33fa39d62b3227b3ad00e4e0cab683ffead) Thanks [@zchsh](https://github.com/zchsh)! - Add support for className prop.
15 |
16 | ## 4.2.5
17 |
18 | ### Patch Changes
19 |
20 | - Updated dependencies [[`14cf3ad`](https://github.com/hashicorp/react-components/commit/14cf3ad2c8f20adfa1c50971f3646f66537a778b)]:
21 | - @hashicorp/react-text-split@4.0.0
22 |
--------------------------------------------------------------------------------
/packages/aside/index.tsx:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | import React from 'react'
7 | import s from './style.module.css'
8 | import classNames from 'classnames'
9 |
10 | function Aside({
11 | className,
12 | children,
13 | type = 'info',
14 | }: {
15 | /** Optional className to add to the root element. */
16 | className?: string
17 | /** Children to render into the Alert block. */
18 | children: React.ReactNode
19 | /** The type of message being displayed, which mainly affects coloration. Defaults to "info". */
20 | type?: 'info' | 'success' | 'warning' | 'danger'
21 | }): React.ReactElement {
22 | return (
23 |
24 | {children}
25 |
26 | )
27 | }
28 |
29 | export default Aside
30 |
--------------------------------------------------------------------------------
/packages/featured-slider/partials/status-bar.module.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | .root {
7 | --foreground-color: var(--black);
8 |
9 | width: 100%;
10 | height: 2px;
11 | display: block;
12 | background-color: rgba(0, 0, 0, 0.15);
13 |
14 | &.dark {
15 | --foreground-color: var(--white);
16 |
17 | background-color: var(--gray-2);
18 | }
19 | }
20 |
21 | .bar {
22 | width: 0;
23 | height: 100%;
24 | display: block;
25 | animation-duration: 10s;
26 | background-color: var(--foreground-color);
27 |
28 | &.active {
29 | animation-name: case-study-bar;
30 | animation-timing-function: linear;
31 | }
32 | }
33 |
34 | @keyframes case-study-bar {
35 | 0% {
36 | width: 0;
37 | }
38 | 100% {
39 | width: 100%;
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/packages/text-split-with-code/props.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) HashiCorp, Inc.
3 | * SPDX-License-Identifier: MPL-2.0
4 | */
5 |
6 | const textSplitProps = require('../text-split/props')
7 | const codeBlockProps = require('../code-block/props')
8 |
9 | module.exports = {
10 | textSplit: {
11 | type: 'object',
12 | description: 'Data sent to the TextSplit component',
13 | required: true,
14 | properties: textSplitProps,
15 | },
16 | codeBlock: {
17 | type: 'object',
18 | description: 'Data passed to the CodeBlock component',
19 | required: true,
20 | properties: codeBlockProps,
21 | },
22 | className: {
23 | type: 'string',
24 | description:
25 | 'Optional className to add to the root element of the TextSplit. If textSplit.className is provided, it will override this prop.',
26 | },
27 | }
28 |
--------------------------------------------------------------------------------
/packages/text-splits/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@hashicorp/react-text-splits",
3 | "description": "Renders an array of text-split components",
4 | "version": "3.2.8",
5 | "author": "HashiCorp",
6 | "contributors": [
7 | "Zach Shilton"
8 | ],
9 | "license": "MPL-2.0",
10 | "publishConfig": {
11 | "access": "public"
12 | },
13 | "dependencies": {
14 | "@hashicorp/react-text-split-with-code": "^3.4.1",
15 | "@hashicorp/react-text-split-with-image": "^4.3.0",
16 | "@hashicorp/react-text-split-with-logo-grid": "^5.1.5"
17 | },
18 | "peerDependencies": {
19 | "@hashicorp/mktg-global-styles": ">=3.x",
20 | "react": ">=16.x"
21 | },
22 | "repository": {
23 | "type": "git",
24 | "url": "https://github.com/hashicorp/react-components.git",
25 | "directory": "packages/text-splits"
26 | }
27 | }
28 |
--------------------------------------------------------------------------------