@atlaskit/status 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +27 -0
- package/dist/cjs/components/Status.js +5 -2
- package/dist/cjs/components/StatusPicker.js +24 -18
- package/dist/cjs/components/analytics.js +2 -2
- package/dist/cjs/components/i18n.js +5 -0
- package/dist/cjs/components/internal/color-palette.js +84 -24
- package/dist/cjs/components/internal/color.js +21 -10
- package/dist/cjs/i18n/cs.js +4 -3
- package/dist/cjs/i18n/da.js +4 -3
- package/dist/cjs/i18n/de.js +4 -3
- package/dist/cjs/i18n/en_ZZ.js +24 -0
- package/dist/cjs/i18n/es.js +4 -3
- package/dist/cjs/i18n/et.js +2 -2
- package/dist/cjs/i18n/fi.js +4 -3
- package/dist/cjs/i18n/fr.js +4 -3
- package/dist/cjs/i18n/hu.js +4 -3
- package/dist/cjs/i18n/it.js +4 -3
- package/dist/cjs/i18n/ja.js +4 -3
- package/dist/cjs/i18n/ko.js +4 -3
- package/dist/cjs/i18n/nb.js +4 -3
- package/dist/cjs/i18n/nl.js +4 -3
- package/dist/cjs/i18n/pl.js +4 -3
- package/dist/cjs/i18n/pt_BR.js +4 -3
- package/dist/cjs/i18n/pt_PT.js +2 -2
- package/dist/cjs/i18n/ru.js +4 -3
- package/dist/cjs/i18n/sk.js +2 -2
- package/dist/cjs/i18n/sv.js +4 -3
- package/dist/cjs/i18n/th.js +4 -3
- package/dist/cjs/i18n/tr.js +4 -3
- package/dist/cjs/i18n/uk.js +4 -3
- package/dist/cjs/i18n/vi.js +4 -3
- package/dist/cjs/i18n/zh.js +4 -3
- package/dist/cjs/i18n/zh_TW.js +4 -3
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/Status.js +6 -2
- package/dist/es2019/components/StatusPicker.js +20 -13
- package/dist/es2019/components/i18n.js +5 -0
- package/dist/es2019/components/internal/color-palette.js +77 -18
- package/dist/es2019/components/internal/color.js +25 -13
- package/dist/es2019/i18n/cs.js +4 -3
- package/dist/es2019/i18n/da.js +4 -3
- package/dist/es2019/i18n/de.js +4 -3
- package/dist/es2019/i18n/en_ZZ.js +16 -0
- package/dist/es2019/i18n/es.js +4 -3
- package/dist/es2019/i18n/et.js +2 -2
- package/dist/es2019/i18n/fi.js +4 -3
- package/dist/es2019/i18n/fr.js +4 -3
- package/dist/es2019/i18n/hu.js +4 -3
- package/dist/es2019/i18n/it.js +4 -3
- package/dist/es2019/i18n/ja.js +4 -3
- package/dist/es2019/i18n/ko.js +4 -3
- package/dist/es2019/i18n/nb.js +4 -3
- package/dist/es2019/i18n/nl.js +4 -3
- package/dist/es2019/i18n/pl.js +4 -3
- package/dist/es2019/i18n/pt_BR.js +4 -3
- package/dist/es2019/i18n/pt_PT.js +2 -2
- package/dist/es2019/i18n/ru.js +4 -3
- package/dist/es2019/i18n/sk.js +2 -2
- package/dist/es2019/i18n/sv.js +4 -3
- package/dist/es2019/i18n/th.js +4 -3
- package/dist/es2019/i18n/tr.js +4 -3
- package/dist/es2019/i18n/uk.js +4 -3
- package/dist/es2019/i18n/vi.js +4 -3
- package/dist/es2019/i18n/zh.js +4 -3
- package/dist/es2019/i18n/zh_TW.js +4 -3
- package/dist/es2019/version.json +1 -1
- package/dist/esm/components/Status.js +6 -2
- package/dist/esm/components/StatusPicker.js +25 -19
- package/dist/esm/components/analytics.js +2 -2
- package/dist/esm/components/i18n.js +5 -0
- package/dist/esm/components/internal/color-palette.js +86 -24
- package/dist/esm/components/internal/color.js +22 -11
- package/dist/esm/i18n/cs.js +4 -3
- package/dist/esm/i18n/da.js +4 -3
- package/dist/esm/i18n/de.js +4 -3
- package/dist/esm/i18n/en_ZZ.js +16 -0
- package/dist/esm/i18n/es.js +4 -3
- package/dist/esm/i18n/et.js +2 -2
- package/dist/esm/i18n/fi.js +4 -3
- package/dist/esm/i18n/fr.js +4 -3
- package/dist/esm/i18n/hu.js +4 -3
- package/dist/esm/i18n/it.js +4 -3
- package/dist/esm/i18n/ja.js +4 -3
- package/dist/esm/i18n/ko.js +4 -3
- package/dist/esm/i18n/nb.js +4 -3
- package/dist/esm/i18n/nl.js +4 -3
- package/dist/esm/i18n/pl.js +4 -3
- package/dist/esm/i18n/pt_BR.js +4 -3
- package/dist/esm/i18n/pt_PT.js +2 -2
- package/dist/esm/i18n/ru.js +4 -3
- package/dist/esm/i18n/sk.js +2 -2
- package/dist/esm/i18n/sv.js +4 -3
- package/dist/esm/i18n/th.js +4 -3
- package/dist/esm/i18n/tr.js +4 -3
- package/dist/esm/i18n/uk.js +4 -3
- package/dist/esm/i18n/vi.js +4 -3
- package/dist/esm/i18n/zh.js +4 -3
- package/dist/esm/i18n/zh_TW.js +4 -3
- package/dist/esm/version.json +1 -1
- package/dist/types/components/Status.d.ts +2 -1
- package/dist/types/components/StatusPicker.d.ts +5 -13
- package/dist/types/components/i18n.d.ts +5 -0
- package/dist/types/components/internal/color-palette.d.ts +2 -2
- package/dist/types/components/internal/color.d.ts +4 -3
- package/dist/types/i18n/cs.d.ts +2 -1
- package/dist/types/i18n/da.d.ts +2 -1
- package/dist/types/i18n/de.d.ts +2 -1
- package/dist/types/i18n/en_ZZ.d.ts +16 -0
- package/dist/types/i18n/es.d.ts +2 -1
- package/dist/types/i18n/et.d.ts +1 -1
- package/dist/types/i18n/fi.d.ts +2 -1
- package/dist/types/i18n/fr.d.ts +2 -1
- package/dist/types/i18n/hu.d.ts +2 -1
- package/dist/types/i18n/it.d.ts +2 -1
- package/dist/types/i18n/ja.d.ts +2 -1
- package/dist/types/i18n/ko.d.ts +2 -1
- package/dist/types/i18n/nb.d.ts +2 -1
- package/dist/types/i18n/nl.d.ts +2 -1
- package/dist/types/i18n/pl.d.ts +2 -1
- package/dist/types/i18n/pt_BR.d.ts +2 -1
- package/dist/types/i18n/pt_PT.d.ts +1 -1
- package/dist/types/i18n/ru.d.ts +2 -1
- package/dist/types/i18n/sk.d.ts +1 -1
- package/dist/types/i18n/sv.d.ts +2 -1
- package/dist/types/i18n/th.d.ts +2 -1
- package/dist/types/i18n/tr.d.ts +2 -1
- package/dist/types/i18n/uk.d.ts +2 -1
- package/dist/types/i18n/vi.d.ts +2 -1
- package/dist/types/i18n/zh.d.ts +2 -1
- package/dist/types/i18n/zh_TW.d.ts +2 -1
- package/package.json +14 -7
package/dist/cjs/i18n/nb.js
CHANGED
|
@@ -8,16 +8,17 @@ exports.default = void 0;
|
|
|
8
8
|
/**
|
|
9
9
|
* NOTE:
|
|
10
10
|
*
|
|
11
|
-
* This file is automatically generated by
|
|
11
|
+
* This file is automatically generated by Traduki 2.0.
|
|
12
12
|
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
13
13
|
*/
|
|
14
|
-
//
|
|
14
|
+
//Norwegian (Bokmål)
|
|
15
15
|
var _default = {
|
|
16
16
|
'fabric.status.color.blue': 'Blå',
|
|
17
17
|
'fabric.status.color.green': 'Grønn',
|
|
18
18
|
'fabric.status.color.grey': 'Grå',
|
|
19
19
|
'fabric.status.color.purple': 'Lilla',
|
|
20
20
|
'fabric.status.color.red': 'Rød',
|
|
21
|
-
'fabric.status.color.yellow': 'Gul'
|
|
21
|
+
'fabric.status.color.yellow': 'Gul',
|
|
22
|
+
'fabric.status.input.label': 'Angi en status'
|
|
22
23
|
};
|
|
23
24
|
exports.default = _default;
|
package/dist/cjs/i18n/nl.js
CHANGED
|
@@ -8,16 +8,17 @@ exports.default = void 0;
|
|
|
8
8
|
/**
|
|
9
9
|
* NOTE:
|
|
10
10
|
*
|
|
11
|
-
* This file is automatically generated by
|
|
11
|
+
* This file is automatically generated by Traduki 2.0.
|
|
12
12
|
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
13
13
|
*/
|
|
14
|
-
//
|
|
14
|
+
//Dutch (Netherlands)
|
|
15
15
|
var _default = {
|
|
16
16
|
'fabric.status.color.blue': 'Blauw',
|
|
17
17
|
'fabric.status.color.green': 'Groen',
|
|
18
18
|
'fabric.status.color.grey': 'Grijs',
|
|
19
19
|
'fabric.status.color.purple': 'Paars',
|
|
20
20
|
'fabric.status.color.red': 'Rood',
|
|
21
|
-
'fabric.status.color.yellow': 'Geel'
|
|
21
|
+
'fabric.status.color.yellow': 'Geel',
|
|
22
|
+
'fabric.status.input.label': 'Status instellen'
|
|
22
23
|
};
|
|
23
24
|
exports.default = _default;
|
package/dist/cjs/i18n/pl.js
CHANGED
|
@@ -8,16 +8,17 @@ exports.default = void 0;
|
|
|
8
8
|
/**
|
|
9
9
|
* NOTE:
|
|
10
10
|
*
|
|
11
|
-
* This file is automatically generated by
|
|
11
|
+
* This file is automatically generated by Traduki 2.0.
|
|
12
12
|
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
13
13
|
*/
|
|
14
|
-
//
|
|
14
|
+
//Polish (Poland)
|
|
15
15
|
var _default = {
|
|
16
16
|
'fabric.status.color.blue': 'Niebieski',
|
|
17
17
|
'fabric.status.color.green': 'Zielony',
|
|
18
18
|
'fabric.status.color.grey': 'Szary',
|
|
19
19
|
'fabric.status.color.purple': 'Fioletowy',
|
|
20
20
|
'fabric.status.color.red': 'Czerwony',
|
|
21
|
-
'fabric.status.color.yellow': 'Żółty'
|
|
21
|
+
'fabric.status.color.yellow': 'Żółty',
|
|
22
|
+
'fabric.status.input.label': 'Ustaw status'
|
|
22
23
|
};
|
|
23
24
|
exports.default = _default;
|
package/dist/cjs/i18n/pt_BR.js
CHANGED
|
@@ -8,16 +8,17 @@ exports.default = void 0;
|
|
|
8
8
|
/**
|
|
9
9
|
* NOTE:
|
|
10
10
|
*
|
|
11
|
-
* This file is automatically generated by
|
|
11
|
+
* This file is automatically generated by Traduki 2.0.
|
|
12
12
|
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
13
13
|
*/
|
|
14
|
-
//
|
|
14
|
+
//Portuguese (Brazil)
|
|
15
15
|
var _default = {
|
|
16
16
|
'fabric.status.color.blue': 'Azul',
|
|
17
17
|
'fabric.status.color.green': 'Verde',
|
|
18
18
|
'fabric.status.color.grey': 'Cinza',
|
|
19
19
|
'fabric.status.color.purple': 'Roxo',
|
|
20
20
|
'fabric.status.color.red': 'Vermelho',
|
|
21
|
-
'fabric.status.color.yellow': 'Amarelo'
|
|
21
|
+
'fabric.status.color.yellow': 'Amarelo',
|
|
22
|
+
'fabric.status.input.label': 'Definir status'
|
|
22
23
|
};
|
|
23
24
|
exports.default = _default;
|
package/dist/cjs/i18n/pt_PT.js
CHANGED
|
@@ -8,10 +8,10 @@ exports.default = void 0;
|
|
|
8
8
|
/**
|
|
9
9
|
* NOTE:
|
|
10
10
|
*
|
|
11
|
-
* This file is automatically generated by
|
|
11
|
+
* This file is automatically generated by Traduki 2.0.
|
|
12
12
|
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
13
13
|
*/
|
|
14
|
-
//
|
|
14
|
+
//Portuguese (Portugal)
|
|
15
15
|
var _default = {
|
|
16
16
|
'fabric.status.color.blue': 'Azul',
|
|
17
17
|
'fabric.status.color.green': 'Verde',
|
package/dist/cjs/i18n/ru.js
CHANGED
|
@@ -8,16 +8,17 @@ exports.default = void 0;
|
|
|
8
8
|
/**
|
|
9
9
|
* NOTE:
|
|
10
10
|
*
|
|
11
|
-
* This file is automatically generated by
|
|
11
|
+
* This file is automatically generated by Traduki 2.0.
|
|
12
12
|
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
13
13
|
*/
|
|
14
|
-
//
|
|
14
|
+
//Russian
|
|
15
15
|
var _default = {
|
|
16
16
|
'fabric.status.color.blue': 'Синий',
|
|
17
17
|
'fabric.status.color.green': 'Зеленый',
|
|
18
18
|
'fabric.status.color.grey': 'Серый',
|
|
19
19
|
'fabric.status.color.purple': 'Фиолетовый',
|
|
20
20
|
'fabric.status.color.red': 'Красный',
|
|
21
|
-
'fabric.status.color.yellow': 'Желтый'
|
|
21
|
+
'fabric.status.color.yellow': 'Желтый',
|
|
22
|
+
'fabric.status.input.label': 'Задать статус'
|
|
22
23
|
};
|
|
23
24
|
exports.default = _default;
|
package/dist/cjs/i18n/sk.js
CHANGED
|
@@ -8,10 +8,10 @@ exports.default = void 0;
|
|
|
8
8
|
/**
|
|
9
9
|
* NOTE:
|
|
10
10
|
*
|
|
11
|
-
* This file is automatically generated by
|
|
11
|
+
* This file is automatically generated by Traduki 2.0.
|
|
12
12
|
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
13
13
|
*/
|
|
14
|
-
//
|
|
14
|
+
//Slovak
|
|
15
15
|
var _default = {
|
|
16
16
|
'fabric.status.color.blue': 'Modrá',
|
|
17
17
|
'fabric.status.color.green': 'Zelená',
|
package/dist/cjs/i18n/sv.js
CHANGED
|
@@ -8,16 +8,17 @@ exports.default = void 0;
|
|
|
8
8
|
/**
|
|
9
9
|
* NOTE:
|
|
10
10
|
*
|
|
11
|
-
* This file is automatically generated by
|
|
11
|
+
* This file is automatically generated by Traduki 2.0.
|
|
12
12
|
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
13
13
|
*/
|
|
14
|
-
//
|
|
14
|
+
//Swedish
|
|
15
15
|
var _default = {
|
|
16
16
|
'fabric.status.color.blue': 'Blå',
|
|
17
17
|
'fabric.status.color.green': 'Grön',
|
|
18
18
|
'fabric.status.color.grey': 'Grå',
|
|
19
19
|
'fabric.status.color.purple': 'Lila',
|
|
20
20
|
'fabric.status.color.red': 'Röd',
|
|
21
|
-
'fabric.status.color.yellow': 'Gul'
|
|
21
|
+
'fabric.status.color.yellow': 'Gul',
|
|
22
|
+
'fabric.status.input.label': 'Ange status'
|
|
22
23
|
};
|
|
23
24
|
exports.default = _default;
|
package/dist/cjs/i18n/th.js
CHANGED
|
@@ -8,16 +8,17 @@ exports.default = void 0;
|
|
|
8
8
|
/**
|
|
9
9
|
* NOTE:
|
|
10
10
|
*
|
|
11
|
-
* This file is automatically generated by
|
|
11
|
+
* This file is automatically generated by Traduki 2.0.
|
|
12
12
|
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
13
13
|
*/
|
|
14
|
-
//
|
|
14
|
+
//Thai (Thailand)
|
|
15
15
|
var _default = {
|
|
16
16
|
'fabric.status.color.blue': 'น้ำเงิน',
|
|
17
17
|
'fabric.status.color.green': 'เขียว',
|
|
18
18
|
'fabric.status.color.grey': 'เทา',
|
|
19
19
|
'fabric.status.color.purple': 'ม่วง',
|
|
20
20
|
'fabric.status.color.red': 'แดง',
|
|
21
|
-
'fabric.status.color.yellow': 'เหลือง'
|
|
21
|
+
'fabric.status.color.yellow': 'เหลือง',
|
|
22
|
+
'fabric.status.input.label': 'ตั้งค่าสถานะ'
|
|
22
23
|
};
|
|
23
24
|
exports.default = _default;
|
package/dist/cjs/i18n/tr.js
CHANGED
|
@@ -8,16 +8,17 @@ exports.default = void 0;
|
|
|
8
8
|
/**
|
|
9
9
|
* NOTE:
|
|
10
10
|
*
|
|
11
|
-
* This file is automatically generated by
|
|
11
|
+
* This file is automatically generated by Traduki 2.0.
|
|
12
12
|
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
13
13
|
*/
|
|
14
|
-
//
|
|
14
|
+
//Turkish (Turkey)
|
|
15
15
|
var _default = {
|
|
16
16
|
'fabric.status.color.blue': 'Mavi',
|
|
17
17
|
'fabric.status.color.green': 'Yeşil',
|
|
18
18
|
'fabric.status.color.grey': 'Gri',
|
|
19
19
|
'fabric.status.color.purple': 'Mor',
|
|
20
20
|
'fabric.status.color.red': 'Kırmızı',
|
|
21
|
-
'fabric.status.color.yellow': 'Sarı'
|
|
21
|
+
'fabric.status.color.yellow': 'Sarı',
|
|
22
|
+
'fabric.status.input.label': 'Durum ayarlayın'
|
|
22
23
|
};
|
|
23
24
|
exports.default = _default;
|
package/dist/cjs/i18n/uk.js
CHANGED
|
@@ -8,16 +8,17 @@ exports.default = void 0;
|
|
|
8
8
|
/**
|
|
9
9
|
* NOTE:
|
|
10
10
|
*
|
|
11
|
-
* This file is automatically generated by
|
|
11
|
+
* This file is automatically generated by Traduki 2.0.
|
|
12
12
|
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
13
13
|
*/
|
|
14
|
-
//
|
|
14
|
+
//Ukrainian (Ukraine)
|
|
15
15
|
var _default = {
|
|
16
16
|
'fabric.status.color.blue': 'Синій',
|
|
17
17
|
'fabric.status.color.green': 'Зелений',
|
|
18
18
|
'fabric.status.color.grey': 'Сірий',
|
|
19
19
|
'fabric.status.color.purple': 'Фіолетовий',
|
|
20
20
|
'fabric.status.color.red': 'Червоний',
|
|
21
|
-
'fabric.status.color.yellow': 'Жовтий'
|
|
21
|
+
'fabric.status.color.yellow': 'Жовтий',
|
|
22
|
+
'fabric.status.input.label': 'Додати статус'
|
|
22
23
|
};
|
|
23
24
|
exports.default = _default;
|
package/dist/cjs/i18n/vi.js
CHANGED
|
@@ -8,16 +8,17 @@ exports.default = void 0;
|
|
|
8
8
|
/**
|
|
9
9
|
* NOTE:
|
|
10
10
|
*
|
|
11
|
-
* This file is automatically generated by
|
|
11
|
+
* This file is automatically generated by Traduki 2.0.
|
|
12
12
|
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
13
13
|
*/
|
|
14
|
-
//
|
|
14
|
+
//Vietnamese (Vietnam)
|
|
15
15
|
var _default = {
|
|
16
16
|
'fabric.status.color.blue': 'Xanh lam',
|
|
17
17
|
'fabric.status.color.green': 'Xanh lục',
|
|
18
18
|
'fabric.status.color.grey': 'Xám',
|
|
19
19
|
'fabric.status.color.purple': 'Tím',
|
|
20
20
|
'fabric.status.color.red': 'Đỏ',
|
|
21
|
-
'fabric.status.color.yellow': 'Vàng'
|
|
21
|
+
'fabric.status.color.yellow': 'Vàng',
|
|
22
|
+
'fabric.status.input.label': 'Đặt trạng thái'
|
|
22
23
|
};
|
|
23
24
|
exports.default = _default;
|
package/dist/cjs/i18n/zh.js
CHANGED
|
@@ -8,16 +8,17 @@ exports.default = void 0;
|
|
|
8
8
|
/**
|
|
9
9
|
* NOTE:
|
|
10
10
|
*
|
|
11
|
-
* This file is automatically generated by
|
|
11
|
+
* This file is automatically generated by Traduki 2.0.
|
|
12
12
|
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
13
13
|
*/
|
|
14
|
-
//
|
|
14
|
+
//Chinese (Simplified)
|
|
15
15
|
var _default = {
|
|
16
16
|
'fabric.status.color.blue': '蓝色',
|
|
17
17
|
'fabric.status.color.green': '绿色',
|
|
18
18
|
'fabric.status.color.grey': '灰色',
|
|
19
19
|
'fabric.status.color.purple': '紫色',
|
|
20
20
|
'fabric.status.color.red': '红色',
|
|
21
|
-
'fabric.status.color.yellow': '黄色'
|
|
21
|
+
'fabric.status.color.yellow': '黄色',
|
|
22
|
+
'fabric.status.input.label': '设置状态'
|
|
22
23
|
};
|
|
23
24
|
exports.default = _default;
|
package/dist/cjs/i18n/zh_TW.js
CHANGED
|
@@ -8,16 +8,17 @@ exports.default = void 0;
|
|
|
8
8
|
/**
|
|
9
9
|
* NOTE:
|
|
10
10
|
*
|
|
11
|
-
* This file is automatically generated by
|
|
11
|
+
* This file is automatically generated by Traduki 2.0.
|
|
12
12
|
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
13
13
|
*/
|
|
14
|
-
//
|
|
14
|
+
//Chinese (Traditional)
|
|
15
15
|
var _default = {
|
|
16
16
|
'fabric.status.color.blue': '藍色',
|
|
17
17
|
'fabric.status.color.green': '綠色',
|
|
18
18
|
'fabric.status.color.grey': '灰色',
|
|
19
19
|
'fabric.status.color.purple': '紫色',
|
|
20
20
|
'fabric.status.color.red': '紅色',
|
|
21
|
-
'fabric.status.color.yellow': '黃色'
|
|
21
|
+
'fabric.status.color.yellow': '黃色',
|
|
22
|
+
'fabric.status.input.label': '設定狀態'
|
|
22
23
|
};
|
|
23
24
|
exports.default = _default;
|
package/dist/cjs/version.json
CHANGED
|
@@ -5,6 +5,8 @@ import Lozenge from '@atlaskit/lozenge';
|
|
|
5
5
|
import { withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
6
6
|
import { createStatusAnalyticsAndFire } from './analytics';
|
|
7
7
|
import { ANALYTICS_HOVER_DELAY } from './constants';
|
|
8
|
+
|
|
9
|
+
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
8
10
|
const colorToLozengeAppearanceMap = {
|
|
9
11
|
neutral: 'default',
|
|
10
12
|
purple: 'new',
|
|
@@ -13,6 +15,8 @@ const colorToLozengeAppearanceMap = {
|
|
|
13
15
|
yellow: 'moved',
|
|
14
16
|
green: 'success'
|
|
15
17
|
};
|
|
18
|
+
/* eslint-enable @atlaskit/design-system/ensure-design-token-usage */
|
|
19
|
+
|
|
16
20
|
const DEFAULT_APPEARANCE = 'default';
|
|
17
21
|
const MAX_WIDTH = 200;
|
|
18
22
|
|
|
@@ -49,7 +53,7 @@ class StatusInternal extends PureComponent {
|
|
|
49
53
|
text,
|
|
50
54
|
color,
|
|
51
55
|
style,
|
|
52
|
-
|
|
56
|
+
role,
|
|
53
57
|
onClick
|
|
54
58
|
} = this.props;
|
|
55
59
|
|
|
@@ -67,7 +71,7 @@ class StatusInternal extends PureComponent {
|
|
|
67
71
|
"data-node-type": "status",
|
|
68
72
|
"data-color": color,
|
|
69
73
|
"data-style": style,
|
|
70
|
-
|
|
74
|
+
role: role
|
|
71
75
|
}, /*#__PURE__*/React.createElement(Lozenge, {
|
|
72
76
|
appearance: appearance,
|
|
73
77
|
maxWidth: MAX_WIDTH
|
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
|
|
3
|
+
/** @jsx jsx */
|
|
2
4
|
import TextField from '@atlaskit/textfield';
|
|
3
5
|
import { gridSize } from '@atlaskit/theme/constants';
|
|
4
|
-
import React from 'react';
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
6
|
+
import React, { PureComponent } from 'react';
|
|
7
|
+
import { injectIntl } from 'react-intl-next';
|
|
8
|
+
import { css, jsx } from '@emotion/react';
|
|
7
9
|
import ColorPalette from './internal/color-palette';
|
|
8
|
-
|
|
10
|
+
import { messages } from './i18n';
|
|
11
|
+
const fieldTextWrapperStyles = css`
|
|
9
12
|
margin: 0 ${gridSize()}px;
|
|
10
13
|
`;
|
|
11
|
-
|
|
14
|
+
|
|
15
|
+
class Picker extends PureComponent {
|
|
12
16
|
constructor(...args) {
|
|
13
17
|
super(...args);
|
|
14
18
|
|
|
@@ -41,15 +45,16 @@ export class StatusPicker extends PureComponent {
|
|
|
41
45
|
const {
|
|
42
46
|
text,
|
|
43
47
|
selectedColor,
|
|
44
|
-
localId,
|
|
45
48
|
onColorClick,
|
|
46
|
-
onColorHover
|
|
49
|
+
onColorHover,
|
|
50
|
+
intl
|
|
47
51
|
} = this.props; // Using <React.Fragment> instead of [] to workaround Enzyme
|
|
48
52
|
// (https://github.com/airbnb/enzyme/issues/1149)
|
|
49
53
|
|
|
50
|
-
return
|
|
54
|
+
return jsx(React.Fragment, null, jsx("div", {
|
|
55
|
+
css: fieldTextWrapperStyles,
|
|
51
56
|
key: this.fieldTextWrapperKey
|
|
52
|
-
},
|
|
57
|
+
}, jsx(TextField, {
|
|
53
58
|
value: text,
|
|
54
59
|
isCompact: true,
|
|
55
60
|
ref: this.handleInputRef,
|
|
@@ -57,8 +62,8 @@ export class StatusPicker extends PureComponent {
|
|
|
57
62
|
onKeyPress: this.onKeyPress,
|
|
58
63
|
spellCheck: false,
|
|
59
64
|
autoComplete: "off",
|
|
60
|
-
"aria-
|
|
61
|
-
})),
|
|
65
|
+
"aria-label": intl.formatMessage(messages.statusInputLabel)
|
|
66
|
+
})), jsx(ColorPalette, {
|
|
62
67
|
key: this.colorPaletteKey,
|
|
63
68
|
onClick: onColorClick,
|
|
64
69
|
onHover: onColorHover,
|
|
@@ -68,6 +73,8 @@ export class StatusPicker extends PureComponent {
|
|
|
68
73
|
|
|
69
74
|
}
|
|
70
75
|
|
|
71
|
-
_defineProperty(
|
|
76
|
+
_defineProperty(Picker, "defaultProps", {
|
|
72
77
|
autoFocus: true
|
|
73
|
-
});
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
export const StatusPicker = injectIntl(Picker);
|
|
@@ -29,5 +29,10 @@ export const messages = defineMessages({
|
|
|
29
29
|
id: 'fabric.status.color.green',
|
|
30
30
|
defaultMessage: 'Green',
|
|
31
31
|
description: 'Tooltip for the green color in color palette'
|
|
32
|
+
},
|
|
33
|
+
statusInputLabel: {
|
|
34
|
+
id: 'fabric.status.input.label',
|
|
35
|
+
defaultMessage: 'Set a status',
|
|
36
|
+
description: 'Aria label text for the status input field'
|
|
32
37
|
}
|
|
33
38
|
});
|
|
@@ -1,33 +1,92 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
1
2
|
import { gridSize } from '@atlaskit/theme/constants';
|
|
2
3
|
import * as colors from '@atlaskit/theme/colors';
|
|
3
|
-
import
|
|
4
|
-
import
|
|
4
|
+
import { token } from '@atlaskit/tokens';
|
|
5
|
+
import React, { useEffect, useRef, useCallback } from 'react';
|
|
6
|
+
import { css, jsx } from '@emotion/react';
|
|
5
7
|
import Color from './color'; // color value, label, background, borderColor
|
|
6
8
|
|
|
7
|
-
const palette = [['neutral', colors.N40, colors.N400], ['purple', colors.P50, colors.P400], ['blue', colors.B50, colors.B400], ['red', colors.R50, colors.R400], ['yellow', colors.Y75, colors.Y400], ['green', colors.G50, colors.G400]];
|
|
8
|
-
const
|
|
9
|
+
const palette = [['neutral', token('color.background.neutral', colors.N40), token('color.text', colors.N400)], ['purple', token('color.background.discovery', colors.P50), token('color.text.discovery', colors.P400)], ['blue', token('color.background.information', colors.B50), token('color.text.information', colors.B400)], ['red', token('color.background.danger', colors.R50), token('color.text.danger', colors.R400)], ['yellow', token('color.background.warning', colors.Y75), token('color.text.warning', colors.Y400)], ['green', token('color.background.success', colors.G50), token('color.text.success', colors.G400)]];
|
|
10
|
+
const colorPaletteWrapperStyles = css`
|
|
9
11
|
margin: ${gridSize()}px ${gridSize()}px 0 ${gridSize()}px;
|
|
10
12
|
/* Firefox bug fix: https://product-fabric.atlassian.net/browse/ED-1789 */
|
|
11
13
|
display: flex;
|
|
12
14
|
flex-wrap: wrap;
|
|
13
15
|
`;
|
|
16
|
+
const VK_LEFT = 37; //ArrowLeft
|
|
17
|
+
|
|
18
|
+
const VK_RIGHT = 39; //ArrowRight
|
|
19
|
+
|
|
20
|
+
const VK_UP = 38; //ArrowUp
|
|
21
|
+
|
|
22
|
+
const VK_DOWN = 40; //ArrowDown
|
|
23
|
+
|
|
14
24
|
export default (({
|
|
15
25
|
cols = 7,
|
|
16
26
|
onClick,
|
|
17
27
|
selectedColor,
|
|
18
28
|
className,
|
|
19
29
|
onHover
|
|
20
|
-
}) =>
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
}) => {
|
|
31
|
+
const colorRefs = useRef([]);
|
|
32
|
+
useEffect(() => {
|
|
33
|
+
colorRefs.current = colorRefs.current.slice(0, palette.length);
|
|
34
|
+
}, []);
|
|
35
|
+
const memoizedHandleKeyDown = useCallback(e => {
|
|
36
|
+
const colorIndex = palette.findIndex(([colorValue]) => colorValue === selectedColor);
|
|
37
|
+
let newColorIndex = null;
|
|
38
|
+
|
|
39
|
+
switch (e.keyCode) {
|
|
40
|
+
case VK_RIGHT:
|
|
41
|
+
case VK_DOWN:
|
|
42
|
+
e.preventDefault();
|
|
43
|
+
newColorIndex = colorIndex + 1 > palette.length - 1 ? 0 : colorIndex + 1;
|
|
44
|
+
break;
|
|
45
|
+
|
|
46
|
+
case VK_LEFT:
|
|
47
|
+
case VK_UP:
|
|
48
|
+
e.preventDefault();
|
|
49
|
+
newColorIndex = colorIndex - 1 < 0 ? palette.length - 1 : colorIndex - 1;
|
|
50
|
+
break;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
if (newColorIndex === null) {
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const newColorValue = palette[newColorIndex][0];
|
|
58
|
+
const newRef = colorRefs.current[newColorIndex];
|
|
59
|
+
newRef === null || newRef === void 0 ? void 0 : newRef.focus();
|
|
60
|
+
onClick(newColorValue);
|
|
61
|
+
}, [selectedColor, onClick, colorRefs]);
|
|
62
|
+
return (
|
|
63
|
+
/**
|
|
64
|
+
We need to disable below eslint rule becuase of role "radiogroup". This role was added
|
|
65
|
+
in https://a11y-internal.atlassian.net/browse/AK-832 to fix accessibility issue.
|
|
66
|
+
When we migrated to emotion from styled component, we started getting this error.
|
|
67
|
+
Task added in https://product-fabric.atlassian.net/wiki/spaces/E/pages/3182068181/Potential+improvements#Moderate-changes.
|
|
68
|
+
*/
|
|
69
|
+
// eslint-disable-next-line jsx-a11y/interactive-supports-focus
|
|
70
|
+
jsx("div", {
|
|
71
|
+
css: colorPaletteWrapperStyles,
|
|
72
|
+
className: className,
|
|
73
|
+
role: "radiogroup",
|
|
74
|
+
style: {
|
|
75
|
+
maxWidth: cols * 32
|
|
76
|
+
},
|
|
77
|
+
onKeyDown: memoizedHandleKeyDown
|
|
78
|
+
}, palette.map(([colorValue, backgroundColor, borderColor], i) => {
|
|
79
|
+
return jsx(Color, {
|
|
80
|
+
key: colorValue,
|
|
81
|
+
value: colorValue,
|
|
82
|
+
backgroundColor: backgroundColor,
|
|
83
|
+
borderColor: borderColor,
|
|
84
|
+
onClick: onClick,
|
|
85
|
+
onHover: onHover,
|
|
86
|
+
isSelected: colorValue === selectedColor,
|
|
87
|
+
tabIndex: colorValue === selectedColor ? 0 : -1,
|
|
88
|
+
setRef: el => colorRefs.current[i] = el
|
|
89
|
+
});
|
|
90
|
+
}))
|
|
91
|
+
);
|
|
92
|
+
});
|
|
@@ -1,25 +1,27 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
|
|
3
|
+
/** @jsx jsx */
|
|
2
4
|
import EditorDoneIcon from '@atlaskit/icon/glyph/editor/done';
|
|
3
5
|
import { N900, N0, N50 } from '@atlaskit/theme/colors';
|
|
4
|
-
import
|
|
5
|
-
import { PureComponent } from 'react';
|
|
6
|
+
import { token } from '@atlaskit/tokens';
|
|
7
|
+
import React, { PureComponent } from 'react';
|
|
6
8
|
import { FormattedMessage } from 'react-intl-next';
|
|
7
|
-
import
|
|
9
|
+
import { css, jsx } from '@emotion/react';
|
|
8
10
|
import { ANALYTICS_HOVER_DELAY } from '../constants';
|
|
9
11
|
import { messages } from '../i18n';
|
|
10
|
-
const
|
|
12
|
+
const buttonStyles = css`
|
|
11
13
|
height: 24px;
|
|
12
14
|
width: 24px;
|
|
13
|
-
background: ${N900};
|
|
15
|
+
background: ${token('color.background.neutral', N900)};
|
|
14
16
|
padding: 0;
|
|
15
17
|
border-radius: 4px;
|
|
16
|
-
border: 1px solid ${N0};
|
|
18
|
+
border: 1px solid ${token('color.border', N0)};
|
|
17
19
|
cursor: pointer;
|
|
18
20
|
display: block;
|
|
19
21
|
box-sizing: border-box;
|
|
20
22
|
overflow: hidden;
|
|
21
23
|
`;
|
|
22
|
-
const
|
|
24
|
+
const buttonWrapperStyles = css`
|
|
23
25
|
border: 1px solid transparent;
|
|
24
26
|
margin: 0 2px;
|
|
25
27
|
font-size: 0;
|
|
@@ -28,7 +30,7 @@ const ButtonWrapper = styled.span`
|
|
|
28
30
|
padding: 1px;
|
|
29
31
|
border-radius: 6px;
|
|
30
32
|
&:hover {
|
|
31
|
-
border: 1px solid ${N50};
|
|
33
|
+
border: 1px solid ${token('color.border', N50)};
|
|
32
34
|
}
|
|
33
35
|
`;
|
|
34
36
|
export default class Color extends PureComponent {
|
|
@@ -74,22 +76,32 @@ export default class Color extends PureComponent {
|
|
|
74
76
|
backgroundColor,
|
|
75
77
|
isSelected,
|
|
76
78
|
borderColor,
|
|
77
|
-
value
|
|
79
|
+
value,
|
|
80
|
+
setRef
|
|
78
81
|
} = this.props;
|
|
79
82
|
const borderStyle = `1px solid ${borderColor}`;
|
|
80
|
-
return
|
|
83
|
+
return jsx("span", {
|
|
84
|
+
css: buttonWrapperStyles
|
|
85
|
+
}, jsx(FormattedMessage, messages[`${value}Color`], labels => jsx("button", {
|
|
86
|
+
css: buttonStyles,
|
|
81
87
|
onClick: this.onClick,
|
|
82
88
|
onMouseEnter: this.onMouseEnter,
|
|
83
89
|
onMouseLeave: this.onMouseLeave,
|
|
84
90
|
onMouseDown: this.onMouseDown,
|
|
85
91
|
tabIndex: tabIndex,
|
|
86
92
|
className: `${isSelected ? 'selected' : ''}`,
|
|
87
|
-
title: labels[0]
|
|
93
|
+
title: labels[0] // button element does not support aria-selected.
|
|
94
|
+
// For button selected (to be precise pressed) or not
|
|
95
|
+
// use aria-pressed as per
|
|
96
|
+
// https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/button_role#associated_aria_roles_states_and_properties
|
|
97
|
+
,
|
|
98
|
+
"aria-pressed": isSelected,
|
|
88
99
|
style: {
|
|
89
100
|
backgroundColor: backgroundColor || 'transparent',
|
|
90
101
|
border: borderStyle
|
|
91
|
-
}
|
|
92
|
-
|
|
102
|
+
},
|
|
103
|
+
ref: setRef
|
|
104
|
+
}, isSelected && jsx(EditorDoneIcon, {
|
|
93
105
|
primaryColor: borderColor,
|
|
94
106
|
label: labels[0]
|
|
95
107
|
}))));
|
package/dist/es2019/i18n/cs.js
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* NOTE:
|
|
3
3
|
*
|
|
4
|
-
* This file is automatically generated by
|
|
4
|
+
* This file is automatically generated by Traduki 2.0.
|
|
5
5
|
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
6
6
|
*/
|
|
7
|
-
//
|
|
7
|
+
//Czech
|
|
8
8
|
export default {
|
|
9
9
|
'fabric.status.color.blue': 'Modrá',
|
|
10
10
|
'fabric.status.color.green': 'Zelená',
|
|
11
11
|
'fabric.status.color.grey': 'Šedá',
|
|
12
12
|
'fabric.status.color.purple': 'Fialová',
|
|
13
13
|
'fabric.status.color.red': 'Červená',
|
|
14
|
-
'fabric.status.color.yellow': 'Žlutá'
|
|
14
|
+
'fabric.status.color.yellow': 'Žlutá',
|
|
15
|
+
'fabric.status.input.label': 'Nastavit stav'
|
|
15
16
|
};
|
package/dist/es2019/i18n/da.js
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* NOTE:
|
|
3
3
|
*
|
|
4
|
-
* This file is automatically generated by
|
|
4
|
+
* This file is automatically generated by Traduki 2.0.
|
|
5
5
|
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
6
6
|
*/
|
|
7
|
-
//
|
|
7
|
+
//Danish (Denmark)
|
|
8
8
|
export default {
|
|
9
9
|
'fabric.status.color.blue': 'Blå',
|
|
10
10
|
'fabric.status.color.green': 'Grøn',
|
|
11
11
|
'fabric.status.color.grey': 'Grå',
|
|
12
12
|
'fabric.status.color.purple': 'Lilla',
|
|
13
13
|
'fabric.status.color.red': 'Rød',
|
|
14
|
-
'fabric.status.color.yellow': 'Gul'
|
|
14
|
+
'fabric.status.color.yellow': 'Gul',
|
|
15
|
+
'fabric.status.input.label': 'Angiv en status'
|
|
15
16
|
};
|