Skip to content

Commit 5f7a323

Browse files
committed
Merge branch 'staging' into main
2 parents 32be828 + 44793b6 commit 5f7a323

60 files changed

Lines changed: 1735 additions & 620 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/pages/components/data-subsetter.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,6 @@ The `<terra-data-subsetter>` component provides a complete UI for subsetting and
6262
</div>
6363
```
6464

65-
### Displaying an Existing Job
66-
67-
```html:preview
68-
<terra-data-subsetter job-id="harmony-job-123456"></terra-data-subsetter>
69-
```
70-
7165
## Best Practices
7266

7367
- Use `collection-entry-id` to pre-select a collection and skip the search UI for a streamlined experience.

docs/pages/frameworks/react.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ Previously, it was recommended to import from a single entrypoint like so:
5858
import { TerraButton } from '@nasa-terra/components/%NPMDIR%/react'
5959
```
6060

61-
However, tree-shaking extra Shoelace components proved to be a challenge. As a result, we now recommend cherry-picking components you want to use, rather than importing from a single entrypoint.
61+
However, tree-shaking extra Terra components proved to be a challenge. As a result, we now recommend cherry-picking components you want to use, rather than importing from a single entrypoint.
6262

6363
```diff
6464
- import { TerraButton } from '@nasa-terra/components/%NPMDIR%/react';
@@ -69,7 +69,7 @@ You can find a copy + paste import for each component in the "importing" section
6969

7070
### Event Handling
7171

72-
Many Shoelace components emit [custom events](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent). For example, the [input component](/components/input) emits the `terra-input` event when it receives input. In React, you can listen for the event using `onSlInput`.
72+
Many Terra components emit [custom events](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent). For example, the [input component](/components/input) emits the `terra-input` event when it receives input. In React, you can listen for the event using `onSlInput`.
7373

7474
Here's how you can bind the input's value to a state variable.
7575

@@ -137,7 +137,7 @@ export default MyComponent
137137

138138
Testing with web components can be challenging if your test environment runs in a Node environment (i.e. it doesn't run in a real browser). Fortunately, [Jest](https://jestjs.io/) has made a number of strides to support web components and provide additional browser APIs. However, it's still not a complete replication of a browser environment.
139139

140-
Here are some tips that will help smooth things over if you're having trouble with Jest + Shoelace.
140+
Here are some tips that will help smooth things over if you're having trouble with Jest + Terra.
141141

142142
:::tip
143143
If you're looking for a fast, modern testing alternative, consider [Web Test Runner](https://modern-web.dev/docs/test-runner/overview/).
@@ -179,18 +179,18 @@ For more details, refer to Jest's [manual mocking](https://jestjs.io/docs/manual
179179

180180
### Transform ES Modules
181181

182-
ES Modules are a [well-supported browser standard](https://hacks.mozilla.org/2018/03/es-modules-a-cartoon-deep-dive/). This is how Shoelace is distributed, but most React apps expect CommonJS. As a result, you'll probably run into the following error.
182+
ES Modules are a [well-supported browser standard](https://hacks.mozilla.org/2018/03/es-modules-a-cartoon-deep-dive/). This is how Terra is distributed, but most React apps expect CommonJS. As a result, you'll probably run into the following error.
183183

184184
```
185185
Error: Unable to import outside of a module
186186
```
187187

188-
To fix this, add the following to your `package.json` which tells the transpiler to process Shoelace modules.
188+
To fix this, add the following to your `package.json` which tells the transpiler to process Terra modules.
189189

190190
```js
191191
{
192192
"jest": {
193-
"transformIgnorePatterns": ["node_modules/(?!(@shoelace))"]
193+
"transformIgnorePatterns": ["node_modules/(?!(@nasa/terra-ui-components))"]
194194
}
195195
}
196196
```
@@ -200,5 +200,5 @@ These instructions are for apps created via Create React App. If you're using Je
200200
For more details, refer to Jest's [`transformIgnorePatterns` customization](https://jestjs.io/docs/tutorial-react-native#transformignorepatterns-customization) documentation.
201201

202202
:::tip
203-
Are you using Shoelace with React? [Help us improve this page!](https://github.com/nasa/terra-ui-components/blob/next/docs/frameworks/react.md)
203+
Are you using Terra with React? [Help us improve this page!](https://github.com/nasa/terra-ui-components/blob/next/docs/frameworks/react.md)
204204
:::

docs/pages/frameworks/vue-2.md

Lines changed: 5 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
---
22
meta:
33
title: Vue (version 2)
4-
description: Tips for using Shoelace in your Vue 2 app.
4+
description: Tips for using Terra in your Vue 2 app.
55
---
66

77
# Vue (version 2)
88

9-
Vue [plays nice](https://custom-elements-everywhere.com/#vue) with custom elements, so you can use Shoelace in your Vue apps with ease.
9+
Vue [plays nice](https://custom-elements-everywhere.com/#vue) with custom elements, so you can use Terra in your Vue apps with ease.
1010

1111
:::tip
1212
These instructions are for Vue 2. If you're using Vue 3 or above, please see the [Vue 3 instructions](/frameworks/vue).
1313
:::
1414

1515
## Installation
1616

17-
To add Shoelace to your Vue app, install the package from npm.
17+
To add Terra to your Vue app, install the package from npm.
1818

1919
```bash
2020
npm install @nasa-terra/components
@@ -35,7 +35,7 @@ If you'd rather not use the CDN for assets, you can create a build task that cop
3535

3636
## Configuration
3737

38-
You'll need to tell Vue to ignore Shoelace components. This is pretty easy because they all start with `terra-`.
38+
You'll need to tell Vue to ignore Terra components. This is pretty easy because they all start with `terra-`.
3939

4040
```js
4141
import Vue from 'vue'
@@ -50,7 +50,7 @@ const app = new Vue({
5050
app.$mount('#app')
5151
```
5252

53-
Now you can start using Shoelace components in your app!
53+
Now you can start using Terra components in your app!
5454

5555
## Usage
5656

@@ -72,36 +72,3 @@ One caveat is there's currently [no support for v-model on custom elements](http
7272
<!-- This works, but it's a bit longer -->
7373
<sl-input :value="name" @input="name = $event.target.value"></sl-input>
7474
```
75-
76-
If that's too verbose for your liking, you can use a custom directive instead. [This utility](https://www.npmjs.com/package/@shoelace-style/vue-terra-model) adds a custom directive that will work just like `v-model` but for Shoelace components. To install it, use this command.
77-
78-
```bash
79-
npm install @shoelace-style/vue-terra-model@1
80-
```
81-
82-
Next, import the directive and enable it like this.
83-
84-
```js
85-
import Vue from 'vue'
86-
import ShoelaceModelDirective from '@shoelace-style/vue-terra-model'
87-
import App from './App.vue'
88-
89-
Vue.use(ShoelaceModelDirective)
90-
Vue.config.ignoredElements = [/terra-/]
91-
92-
const app = new Vue({
93-
render: h => h(App),
94-
})
95-
96-
app.$mount('#app')
97-
```
98-
99-
Now you can use the `v-terra-model` directive to keep your data in sync!
100-
101-
```html
102-
<sl-input v-terra-model="name"></sl-input>
103-
```
104-
105-
:::tip
106-
Are you using Shoelace with Vue? [Help us improve this page!](https://github.com/nasa/terra-ui-components/blob/next/docs/frameworks/vue-2.md)
107-
:::

docs/pages/frameworks/vue.md

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
---
22
meta:
33
title: Vue
4-
description: Tips for using Shoelace in your Vue 3 app.
4+
description: Tips for using terra in your Vue 3 app.
55
---
66

77
# Vue
88

9-
Vue [plays nice](https://custom-elements-everywhere.com/#vue) with custom elements, so you can use Shoelace in your Vue apps with ease.
9+
Vue [plays nice](https://custom-elements-everywhere.com/#vue) with custom elements, so you can use Terra in your Vue apps with ease.
1010

1111
:::tip
1212
These instructions are for Vue 3 and above. If you're using Vue 2, please see the [Vue 2 instructions](/frameworks/vue-2).
1313
:::
1414

1515
## Installation
1616

17-
To add Shoelace to your Vue app, install the package from npm.
17+
To add Terra to your Vue app, install the package from npm.
1818

1919
```bash
2020
npm install @nasa-terra/components
@@ -37,11 +37,11 @@ If you'd rather not use the CDN for assets, you can create a build task that cop
3737

3838
If you haven't configured your Vue.js project to work with custom elements/web components, follow [the instructions here](https://vuejs.org/guide/extras/web-components.html#using-custom-elements-in-vue) based on your project type to ensure your project will not throw an error when it encounters a custom element.
3939

40-
Now you can start using Shoelace components in your app!
40+
Now you can start using Terra components in your app!
4141

4242
## Types
4343

44-
Once you have configured your application for custom elements, you should be able to use Shoelace in your application without it causing any errors. Unfortunately, this doesn't register the custom elements to behave like components built using Vue. To provide autocomplete information and type safety for your components, you can import the Shoelace Vue types into your `tsconfig.json` to get better integration in your standard Vue and JSX templates.
44+
Once you have configured your application for custom elements, you should be able to use Terra in your application without it causing any errors. Unfortunately, this doesn't register the custom elements to behave like components built using Vue. To provide autocomplete information and type safety for your components, you can import the Terra Vue types into your `tsconfig.json` to get better integration in your standard Vue and JSX templates.
4545

4646
```json
4747
{
@@ -105,15 +105,9 @@ One caveat is there's currently [no support for v-model on custom elements](http
105105
<sl-input :value="name" @input="name = $event.target.value"></sl-input>
106106
```
107107

108-
If that's too verbose for your liking, you can use a custom directive instead. [This utility](https://www.npmjs.com/package/@shoelace-style/vue-terra-model) adds a custom directive that will work just like `v-model` but for Shoelace components.
109-
110-
:::tip
111-
Are you using Shoelace with Vue? [Help us improve this page!](https://github.com/nasa/terra-ui-components/blob/next/docs/frameworks/vue.md)
112-
:::
113-
114108
### Slots
115109

116-
Slots in Shoelace/web components are functionally the same as basic slots in Vue. Slots can be assigned to elements using the `slot` attribute followed by the name of the slot it is being assigned to.
110+
Slots in Terra/web components are functionally the same as basic slots in Vue. Slots can be assigned to elements using the `slot` attribute followed by the name of the slot it is being assigned to.
117111

118112
Here is an example:
119113

docs/pages/getting-started/customizing.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
---
22
meta:
33
title: Customizing
4-
description: Learn how to customize Shoelace through parts and custom properties.
4+
description: Learn how to customize Terra through parts and custom properties.
55
---
66

77
# Customizing
88

9-
Shoelace components can be customized at a high level through design tokens. This gives you control over theme colors and general styling. For more advanced customizations, you can make use of CSS parts and custom properties to target individual components.
9+
Terra components can be customized at a high level through design tokens. This gives you control over theme colors and general styling. For more advanced customizations, you can make use of CSS parts and custom properties to target individual components.
1010

1111
## Design Tokens
1212

13-
Shoelace makes use of several design tokens to provide a consistent appearance across components. You can customize them and use them in your own application with pure CSS — no preprocessor required.
13+
Terra makes use of several design tokens to provide a consistent appearance across components. You can customize them and use them in your own application with pure CSS — no preprocessor required.
1414

1515
Design tokens offer a high-level way to customize the library with minimal effort. There are no component-specific variables, however, as design tokens are intended to be generic and highly reusable. To customize an individual component, refer to the section entitled [CSS Parts](#css-parts).
1616

@@ -41,7 +41,7 @@ Many design tokens are described further along in this documentation. For a comp
4141

4242
Whereas design tokens offer a high-level way to customize the library, CSS parts offer a low-level way to customize individual components. Again, this is done with pure CSS — no preprocessor required.
4343

44-
Shoelace components use a [shadow DOM](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_shadow_DOM) to encapsulate their styles and behaviors. As a result, you can't simply target their internals with the usual CSS selectors. Instead, components expose "parts" that can be targeted with the [CSS part selector](https://developer.mozilla.org/en-US/docs/Web/CSS/::part), or `::part()`.
44+
Terra components use a [shadow DOM](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_shadow_DOM) to encapsulate their styles and behaviors. As a result, you can't simply target their internals with the usual CSS selectors. Instead, components expose "parts" that can be targeted with the [CSS part selector](https://developer.mozilla.org/en-US/docs/Web/CSS/::part), or `::part()`.
4545

4646
Here's an example that modifies buttons with the `tomato-button` class.
4747

@@ -112,7 +112,7 @@ Not all components expose CSS custom properties. For those that do, they can be
112112

113113
## Animations
114114

115-
Some components use animation, such as when a dialog is shown or hidden. Animations are performed using the [Web Animations API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Animations_API) rather than CSS. However, you can still customize them through Shoelace's animation registry. If a component has customizable animations, they'll be listed in the "Animation" section of its documentation.
115+
Some components use animation, such as when a dialog is shown or hidden. Animations are performed using the [Web Animations API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Animations_API) rather than CSS. However, you can still customize them through Terra's animation registry. If a component has customizable animations, they'll be listed in the "Animation" section of its documentation.
116116

117117
To customize a default animation, use the `setDefaultAnimation()` method. The function accepts an animation name (found in the component's docs) and an object with `keyframes`, and `options` or `null` to disable the animation.
118118

0 commit comments

Comments
 (0)