Skip to content
This repository was archived by the owner on Feb 6, 2024. It is now read-only.

Commit f484e29

Browse files
docs(#544): new color component properties
Signed-off-by: peterpeterparker <[email protected]>
1 parent e6ffac8 commit f484e29

File tree

6 files changed

+175
-107
lines changed

6 files changed

+175
-107
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
### Applications
66

7-
- docs: v1.2.0 ([CHANGELOG](https://github.com/deckgo/deckdeckgo/blob/master/docs/CHANGELOG.md))
7+
- docs: v1.3.0 ([CHANGELOG](https://github.com/deckgo/deckdeckgo/blob/master/docs/CHANGELOG.md))
88
- remote: v1.2.0 ([CHANGELOG](https://github.com/deckgo/deckdeckgo/blob/master/remote/CHANGELOG.md))
99

1010
### Web Components: New

docs/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# 1.3.0 (2020-05-15)
2+
3+
### Features
4+
5+
- new `color` slot, property and styles
6+
17
# 1.2.0 (2020-05-14)
28

39
### Features

docs/docs/components/app-components-color/app-components-color.md

Lines changed: 94 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ It is fully configurable in terms of colors, you could define the set of colors
1818
## Showcase
1919

2020
<div>
21-
<deckgo-color>
21+
<deckgo-color style={{width: '240px'}}>
2222
<span slot="more">...</span>
2323
</deckgo-color>
2424
</div>
@@ -77,6 +77,8 @@ The "Color Picker" Web Component could be integrated using the tag `<deckgo-colo
7777

7878
The slot `more` is optional, moreover, the "more" action itself could be turned off.
7979

80+
The slot `custom-label` is optional and can be used to display another label than `Custom` when user selects a custom color.
81+
8082
### Attributes
8183

8284
This component offers the following options which could be set using attributes:
@@ -88,6 +90,7 @@ This component offers the following options which could be set using attributes:
8890
| `more` | `more` | In case you would not like to offer the "more" options. | `boolean` | `true` |
8991
| `moreAlt` | `more-alt` | An accessibility label for the "more action. | `string` | `'More'` |
9092
| `palette` | | The palette of color (see here under). | `DeckdeckgoPalette[]` | `DEFAULT_PALETTE` |
93+
| `label` | `label` | Display a label for the description of the selected color | `boolean` | `true` |
9194

9295
#### Palette
9396

@@ -113,104 +116,114 @@ The default palette is the following:
113116

114117
```
115118
export const DEFAULT_PALETTE: DeckdeckgoPalette[] = [
116-
{
117-
color: {
118-
hex: '#FF6900',
119-
rgb: '255,105,0'
119+
{
120+
color: {
121+
hex: '#8ED1FC',
122+
rgb: '142,209,252',
123+
},
124+
alt: 'Light blue',
120125
},
121-
alt: 'Orange'
122-
},
123-
{
124-
color: {
125-
hex: '#FCB900',
126-
rgb: '252,185,0'
126+
{
127+
color: {
128+
hex: '#0693E3',
129+
rgb: '6,147,227',
130+
},
131+
alt: 'Blue',
127132
},
128-
alt: 'Yellow'
129-
},
130-
{
131-
color: {
132-
hex: '#7BDCB5',
133-
rgb: '123,220,181'
133+
{
134+
color: {
135+
hex: '#7BDCB5',
136+
rgb: '123,220,181',
137+
},
138+
alt: 'Light green',
134139
},
135-
alt: 'Light green'
136-
},
137-
{
138-
color: {
139-
hex: '#00D084',
140-
rgb: '0,208,132'
140+
{
141+
color: {
142+
hex: '#00D084',
143+
rgb: '0,208,132',
144+
},
145+
alt: 'Green',
141146
},
142-
alt: 'Green'
143-
},
144-
{
145-
color: {
146-
hex: '#8ED1FC',
147-
rgb: '142,209,252'
147+
{
148+
color: {
149+
hex: '#FCB900',
150+
rgb: '252,185,0',
151+
},
152+
alt: 'Yellow',
148153
},
149-
alt: 'Light blue'
150-
},
151-
{
152-
color: {
153-
hex: '#0693E3',
154-
rgb: '6,147,227'
154+
{
155+
color: {
156+
hex: '#FF6900',
157+
rgb: '255,105,0',
158+
},
159+
alt: 'Orange',
155160
},
156-
alt: 'Blue'
157-
},
158-
{
159-
color: {
160-
hex: '#ABB8C3',
161-
rgb: '171,184,195'
161+
{
162+
color: {
163+
hex: '#F78DA7',
164+
rgb: '247,141,167',
165+
},
166+
alt: 'Pink',
162167
},
163-
alt: 'Grey'
164-
},
165-
{
166-
color: {
167-
hex: '#EB144C',
168-
rgb: '235,20,76'
168+
{
169+
color: {
170+
hex: '#EB144C',
171+
rgb: '235,20,76',
172+
},
173+
alt: 'Red',
169174
},
170-
alt: 'Red'
171-
},
172-
{
173-
color: {
174-
hex: '#F78DA7',
175-
rgb: '247,141,167'
175+
{
176+
color: {
177+
hex: '#ffffff',
178+
rgb: '255,255,255',
179+
},
180+
alt: 'White',
181+
display: {
182+
borderColor: '#ddd',
183+
boxShadowColor: '221,221,221',
184+
},
176185
},
177-
alt: 'Pink'
178-
},
179-
{
180-
color: {
181-
hex: '#9900EF',
182-
rgb: '153,0,239'
186+
{
187+
color: {
188+
hex: '#ABB8C3',
189+
rgb: '171,184,195',
190+
},
191+
alt: 'Grey',
183192
},
184-
alt: 'Violet'
185-
},
186-
{
187-
color: {
188-
hex: '#000000',
189-
rgb: '0,0,0'
193+
{
194+
color: {
195+
hex: '#000000',
196+
rgb: '0,0,0',
197+
},
198+
alt: 'Black',
190199
},
191-
alt: 'Black'
192-
}
193200
];
194201
```
195202

196203
### Theming
197204

198205
The following theming options will affect this component if set on its host or parent.
199206

200-
| CSS4 variable | Default | Note |
201-
| ---------------------------------- | ----------- | ------------------------------------------------------------- |
202-
| --deckgo-button-width | 28px | The width of a button to select a color and the more button |
203-
| --deckgo-button-height | 28px | The height of a button to select a color and the more button |
204-
| --deckgo-button-margin | 4px | The margin of a button to select a color and the more button |
205-
| --deckgo-button-outline | none | The outline of a button to select a color and the more button |
206-
| --deckgo-button-border | none | The border of a button to select a color and the more button |
207-
| --deckgo-button-border-radius | 50% | The border radius of a button to select a color |
208-
| --deckgo-button-more-border-radius | 50% | The border radius of the more button |
209-
| --deckgo-button-more-border | none | The border of the more button |
210-
| --deckgo-button-more-outline | none | The outline of the more button |
211-
| --deckgo-flex-wrap | wrap | Wrap properties of the buttons' container |
212-
| --deckgo-overflow | visible | Overflow property of the buttons's container |
213-
| --deckgo-button-more-background | transparent | The background of the more button |
207+
| CSS4 variable | Default | Note |
208+
| -------------------------------------- | ----------- | ------------------------------------------------------------- |
209+
| --deckgo-button-width | 28px | The width of a button to select a color and the more button |
210+
| --deckgo-button-height | 28px | The height of a button to select a color and the more button |
211+
| --deckgo-button-margin | 4px | The margin of a button to select a color and the more button |
212+
| --deckgo-button-outline | none | The outline of a button to select a color and the more button |
213+
| --deckgo-button-border | none | The border of a button to select a color and the more button |
214+
| --deckgo-button-border-radius | 50% | The border radius of a button to select a color |
215+
| --deckgo-button-more-border-radius | 50% | The border radius of the more button |
216+
| --deckgo-button-more-border | none | The border of the more button |
217+
| --deckgo-button-more-outline | none | The outline of the more button |
218+
| --deckgo-flex-wrap | wrap | Wrap properties of the buttons' container |
219+
| --deckgo-overflow | visible | Overflow property of the buttons's container |
220+
| --deckgo-button-more-background | transparent | The background of the more button |
221+
| --deckgo-color-label-margin | 0 | Margin of the color description |
222+
| --deckgo-color-label-padding | 12px 8px | Padding of the color description |
223+
| --deckgo-color-label-font-size | 12px | Font size of the color description |
224+
| --deckgo-color-label-min-height | 15px | Minimal height of the color description |
225+
| --deckgo-color-label-text-align | center | Text alignment of the color description |
226+
| --deckgo-color-label-color-font-weight | 300 | Font weight of the hexadecimal value of the color description |
214227

215228
### Events
216229

docs/package-lock.json

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

docs/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "deckdeckgo-docs",
3-
"version": "1.2.0",
3+
"version": "1.3.0",
44
"description": "The Progressive Web App alternative for simple presentations",
55
"license": "MIT",
66
"files": [
@@ -15,13 +15,13 @@
1515
},
1616
"dependencies": {
1717
"@deckdeckgo/charts": "^1.0.2",
18-
"@deckdeckgo/color": "^1.1.1",
18+
"@deckdeckgo/color": "^2.0.0",
1919
"@deckdeckgo/core": "^1.0.2",
2020
"@deckdeckgo/deck-utils": "^2.3.0",
2121
"@deckdeckgo/demo": "^1.0.4",
2222
"@deckdeckgo/drag-resize-rotate": "^1.0.2",
2323
"@deckdeckgo/highlight-code": "^1.0.5",
24-
"@deckdeckgo/inline-editor": "^1.2.1",
24+
"@deckdeckgo/inline-editor": "^1.3.1",
2525
"@deckdeckgo/lazy-img": "^1.0.1",
2626
"@deckdeckgo/math": "^1.0.1",
2727
"@deckdeckgo/qrcode": "^1.0.1",

0 commit comments

Comments
 (0)