Skip to content

Commit 859861f

Browse files
committed
Merge branch 'next' into current
2 parents 6c3f1be + 762d0b0 commit 859861f

File tree

9 files changed

+85
-9
lines changed

9 files changed

+85
-9
lines changed

docs/pages/components/details.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,9 @@ Details are designed to function independently, but you can simulate a group or
123123
124124
// Close all other details when one is shown
125125
container.addEventListener('sl-show', event => {
126-
[...container.querySelectorAll('sl-details')].map(details => (details.open = event.target === details));
126+
if (event.target.localName === 'sl-details') {
127+
[...container.querySelectorAll('sl-details')].map(details => (details.open = event.target === details));
128+
}
127129
});
128130
</script>
129131

docs/pages/frameworks/angular.md

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,40 @@ Angular [plays nice](https://custom-elements-everywhere.com/#angular) with custo
1010

1111
## Installation
1212

13+
### Download the npm package
14+
1315
To add Shoelace to your Angular app, install the package from npm.
1416

1517
```bash
1618
npm install @shoelace-style/shoelace
1719
```
1820

19-
Next, [include a theme](/getting-started/themes) and set the [base path](/getting-started/installation#setting-the-base-path) for icons and other assets. In this example, we'll import the light theme and use the CDN as a base path.
21+
### Update the Angular Configuration
22+
23+
Next, [include a theme](/getting-started/themes). In this example, we'll import the light theme.
24+
Its also important to load the components, by using a <script> tag into the index.html file. However, the Angular way to do it is by adding a script configurations into your angular.json file as follows:
25+
26+
```
27+
"architect": {
28+
"build": {
29+
...
30+
"options": {
31+
...
32+
"styles": [
33+
"src/styles.scss",
34+
"@shoelace-style/shoelace/dist/themes/light.css"
35+
],
36+
"scripts": [
37+
"@shoelace-style/shoelace/dist/shoelace.js"
38+
]
39+
...
40+
```
41+
42+
### Setting up the base path
43+
44+
Next, set the [base path](/getting-started/installation#setting-the-base-path) for icons and other assets in the `main.ts`. In this example, we'll use the CDN as a base path.
2045

2146
```jsx
22-
import '@shoelace-style/shoelace/%NPMDIR%/themes/light.css';
2347
import { setBasePath } from '@shoelace-style/shoelace/%NPMDIR%/utilities/base-path';
2448

2549
setBasePath('https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@%VERSION%/%CDNDIR%/');

docs/pages/resources/changelog.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@ Components with the <sl-badge variant="warning" pill>Experimental</sl-badge> bad
1212

1313
New versions of Shoelace are released as-needed and generally occur when a critical mass of changes have accumulated. At any time, you can see what's coming in the next release by visiting [next.shoelace.style](https://next.shoelace.style).
1414

15+
## 2.11.0
16+
17+
- Added the Croatian translation [#1656]
18+
- Fixed a bug that caused the [[Escape]] key to stop propagating when tooltips are disabled [#1607]
19+
- Fixed a bug that made it impossible to style placeholders in `<sl-select>` [#1667]
20+
- Fixed a bug that caused `dist/react/index.js` to be blank [#1659]
21+
1522
## 2.10.0
1623

1724
- Added the Simplified Chinese translation [#1604]

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@shoelace-style/shoelace",
33
"description": "A forward-thinking library of web components.",
4-
"version": "2.10.0",
4+
"version": "2.11.0",
55
"homepage": "https://github.com/shoelace-style/shoelace",
66
"author": "Cory LaViska",
77
"license": "MIT",

scripts/make-react.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const metadata = JSON.parse(fs.readFileSync(path.join(outdir, 'custom-elements.j
1919
const components = getAllComponents(metadata);
2020
const index = [];
2121

22-
components.forEach(async component => {
22+
for await (const component of components) {
2323
const tagWithoutPrefix = component.tagName.replace(/^sl-/, '');
2424
const componentDir = path.join(reactDir, tagWithoutPrefix);
2525
const componentFile = path.join(componentDir, 'index.ts');
@@ -73,7 +73,7 @@ components.forEach(async component => {
7373
index.push(`export { default as ${component.name} } from './${tagWithoutPrefix}/index.js';`);
7474

7575
fs.writeFileSync(componentFile, source, 'utf8');
76-
});
76+
}
7777

7878
// Generate the index file
7979
fs.writeFileSync(path.join(reactDir, 'index.ts'), index.join('\n'), 'utf8');

src/components/select/select.styles.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ export default css`
6767
-webkit-appearance: none;
6868
}
6969
70+
.select__display-input::placeholder {
71+
color: var(--sl-input-placeholder-color);
72+
}
73+
7074
.select:not(.select--disabled):hover .select__display-input {
7175
color: var(--sl-input-color-hover);
7276
}

src/components/tooltip/tooltip.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ export default class SlTooltip extends ShoelaceElement {
145145

146146
private handleKeyDown = (event: KeyboardEvent) => {
147147
// Pressing escape when the target element has focus should dismiss the tooltip
148-
if (this.open && event.key === 'Escape') {
148+
if (this.open && !this.disabled && event.key === 'Escape') {
149149
event.stopPropagation();
150150
this.hide();
151151
}

src/translations/hr.ts

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
import { registerTranslation } from '@shoelace-style/localize';
2+
import type { Translation } from '../utilities/localize.js';
3+
4+
const translation: Translation = {
5+
$code: 'hr',
6+
$name: 'Hrvatski',
7+
$dir: 'ltr',
8+
9+
carousel: 'Vrtuljak',
10+
clearEntry: 'Očisti unos',
11+
close: 'Zatvori',
12+
copied: 'Kopirano',
13+
copy: 'Kopiraj',
14+
currentValue: 'Trenutna vrijednost',
15+
error: 'Greška',
16+
goToSlide: (slide, count) => `Idi na slajd ${slide} od ${count}`,
17+
hidePassword: 'Sakrij lozinku',
18+
loading: 'Učitavanje',
19+
nextSlide: 'Sljedeći slajd',
20+
numOptionsSelected: num => {
21+
if (num === 0) return 'Nije odabrana nijedna opcija';
22+
if (num === 1) return '1 opcija je odabrana';
23+
return `${num} odabranih opcija`;
24+
},
25+
previousSlide: 'Prethodni slajd',
26+
progress: 'Napredak',
27+
remove: 'Makni',
28+
resize: 'Promijeni veličinu',
29+
scrollToEnd: 'Skrolaj do kraja',
30+
scrollToStart: 'Skrolaj na početak',
31+
selectAColorFromTheScreen: 'Odaberi boju sa ekrana',
32+
showPassword: 'Pokaži lozinku',
33+
slideNum: slide => `Slajd ${slide}`,
34+
toggleColorFormat: 'Zamijeni format boje'
35+
};
36+
37+
registerTranslation(translation);
38+
39+
export default translation;

0 commit comments

Comments
 (0)