@cloud-ru/uikit-product-utils 8.1.0 → 8.1.1-preview-23c44fe9.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 +75 -75
- package/dist/cjs/components/ForThemeMode/hooks.js +1 -1
- package/dist/cjs/constants/environment.js +1 -1
- package/dist/cjs/hooks/useConfig.js +16 -19
- package/dist/cjs/types/theme.d.ts +5 -7
- package/dist/cjs/types/theme.js +4 -6
- package/dist/esm/components/ForThemeMode/hooks.js +1 -1
- package/dist/esm/constants/environment.js +1 -1
- package/dist/esm/hooks/useConfig.js +8 -11
- package/dist/esm/types/theme.d.ts +5 -7
- package/dist/esm/types/theme.js +4 -6
- package/package.json +10 -14
- package/src/components/ForThemeMode/hooks.ts +1 -1
- package/src/constants/environment.ts +1 -1
- package/src/hooks/useConfig.ts +8 -11
- package/src/types/theme.ts +4 -6
package/CHANGELOG.md
CHANGED
|
@@ -260,7 +260,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
260
260
|
|
|
261
261
|
### Features
|
|
262
262
|
|
|
263
|
-
* **
|
|
263
|
+
* **FF-5836:** support cjs syntax ([d44abd0](https://gitverse.ru/cloud-ru-tech/uikit-product/commits/d44abd0ddbbea0cd2bf0e1b99442cdb83b87df48))
|
|
264
264
|
|
|
265
265
|
|
|
266
266
|
|
|
@@ -271,7 +271,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
271
271
|
|
|
272
272
|
### Bug Fixes
|
|
273
273
|
|
|
274
|
-
* **
|
|
274
|
+
* **FF-5846:** getting rid of circular import ([f78432a](https://gitverse.ru/cloud-ru-tech/uikit-product/commits/f78432a0c63bb6f33e1d586fb183dcddc068f5d0))
|
|
275
275
|
|
|
276
276
|
|
|
277
277
|
### Features
|
|
@@ -287,7 +287,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
287
287
|
|
|
288
288
|
### Dependencies
|
|
289
289
|
|
|
290
|
-
* **
|
|
290
|
+
* **PDS-611:** up deps ([c30ac4c](https://gitverse.ru/cloud-ru-tech/uikit-product/commits/c30ac4c2adb7c00e84fbe557d85314add6b6977a))
|
|
291
291
|
|
|
292
292
|
|
|
293
293
|
|
|
@@ -298,7 +298,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
298
298
|
|
|
299
299
|
### Features
|
|
300
300
|
|
|
301
|
-
* **
|
|
301
|
+
* **FF-5375:** add hooks/utils for adaptiveness ([2c5a3cc](https://gitverse.ru/cloud-ru-tech/uikit-product/commits/2c5a3cc2bec030525f81dd5b02c1b7aee653bb32))
|
|
302
302
|
|
|
303
303
|
|
|
304
304
|
|
|
@@ -309,7 +309,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
309
309
|
|
|
310
310
|
### Features
|
|
311
311
|
|
|
312
|
-
* **
|
|
312
|
+
* **FF-5392:** css optimization ([79cc390](https://gitverse.ru/cloud-ru-tech/uikit-product/commits/79cc390d1d49b0434b75f8e1ae893e7c7f9f450b))
|
|
313
313
|
|
|
314
314
|
|
|
315
315
|
|
|
@@ -320,7 +320,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
320
320
|
|
|
321
321
|
### Bug Fixes
|
|
322
322
|
|
|
323
|
-
* **
|
|
323
|
+
* **FF-3789:** updated typescript to v5 ([1e50951](https://gitverse.ru/cloud-ru-tech/uikit-product/commits/1e50951d88db18b69a760d38a6a8bf93335dcd1c))
|
|
324
324
|
|
|
325
325
|
|
|
326
326
|
|
|
@@ -331,12 +331,12 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
331
331
|
|
|
332
332
|
### Dependencies
|
|
333
333
|
|
|
334
|
-
* **
|
|
334
|
+
* **FF-4699:** change product -> snack divider ([bd49fc6](https://gitverse.ru/cloud-ru-tech/uikit-product/commits/bd49fc619626923b0278b7b72221ad1aca7800f8))
|
|
335
335
|
|
|
336
336
|
|
|
337
337
|
### Features
|
|
338
338
|
|
|
339
|
-
* **
|
|
339
|
+
* **FF-5149:** add ForThemeMode component and useForThemeMode hook ([4d88452](https://gitverse.ru/cloud-ru-tech/uikit-product/commits/4d88452e8142e1359dc702e048586ac1f5d8e5b5))
|
|
340
340
|
|
|
341
341
|
|
|
342
342
|
|
|
@@ -358,7 +358,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
358
358
|
|
|
359
359
|
### Features
|
|
360
360
|
|
|
361
|
-
* **
|
|
361
|
+
* **FF-3478:** add deps graph addon ([0f59586](https://gitverse.ru/cloud-ru-tech/uikit-product/commits/0f5958674746342fe3ed3005da67905c0920f907))
|
|
362
362
|
|
|
363
363
|
|
|
364
364
|
|
|
@@ -369,7 +369,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
369
369
|
|
|
370
370
|
### Bug Fixes
|
|
371
371
|
|
|
372
|
-
* **
|
|
372
|
+
* **FF-2821:** added stylelint config and refactored styles ([f201954](https://gitverse.ru/cloud-ru-tech/uikit-product/commits/f201954303601b6dc5873b2ce2ee0928bc84a253))
|
|
373
373
|
|
|
374
374
|
|
|
375
375
|
|
|
@@ -407,7 +407,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
407
407
|
|
|
408
408
|
### Bug Fixes
|
|
409
409
|
|
|
410
|
-
* **
|
|
410
|
+
* **FF-2270:** update types ([cd843f1](https://gitverse.ru/cloud-ru-tech/uikit-product/commits/cd843f1db5c1aac401a27c2d67b314e81f5ddda3))
|
|
411
411
|
|
|
412
412
|
|
|
413
413
|
|
|
@@ -418,8 +418,8 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
418
418
|
|
|
419
419
|
### Features
|
|
420
420
|
|
|
421
|
-
* **
|
|
422
|
-
* **
|
|
421
|
+
* **FF-1803:** add support for tokens from new uikit ([6683f17](https://gitverse.ru/cloud-ru-tech/uikit-product/commits/6683f176f80aceadf8458af10d21b3fd55a7f4eb))
|
|
422
|
+
* **FF-1803:** extract useConfig hook ([adc776e](https://gitverse.ru/cloud-ru-tech/uikit-product/commits/adc776e078ea234d26639b4aef3d59d6e1d21e0f))
|
|
423
423
|
|
|
424
424
|
|
|
425
425
|
|
|
@@ -471,11 +471,11 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
471
471
|
|
|
472
472
|
### Features
|
|
473
473
|
|
|
474
|
-
- remove logMode handling, now it uses '@
|
|
474
|
+
- remove logMode handling, now it uses '@cloud-ru/ft-debug-mode' ([5b28fe0](https://gitverse.ru/cloud-ru-tech/uikit-product/commits/5b28fe0c91961a0d20f54295daaa699b1f7c4970))
|
|
475
475
|
|
|
476
476
|
### BREAKING CHANGES
|
|
477
477
|
|
|
478
|
-
- remove logMode handling, now it uses '@
|
|
478
|
+
- remove logMode handling, now it uses '@cloud-ru/ft-debug-mode'
|
|
479
479
|
|
|
480
480
|
# [2.10.0](https://gitverse.ru/cloud-ru-tech/uikit-product/compare/@cloud-ru/uikit-product-utils@2.9.0...@cloud-ru/uikit-product-utils@2.10.0) (2022-07-13)
|
|
481
481
|
|
|
@@ -514,64 +514,64 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
514
514
|
- change page grouping strategy ([ef61e36](https://gitverse.ru/cloud-ru-tech/uikit-product/commits/ef61e36cdb1dc03c6c43c0e84472552706999a17))
|
|
515
515
|
- renaming packages ([6c4e34d](https://gitverse.ru/cloud-ru-tech/uikit-product/commits/6c4e34d4b5b8aa4a3386187b996f4856e642d0b5))
|
|
516
516
|
|
|
517
|
-
# [2.6.0](https://gitverse.ru/cloud-ru-tech/uikit-product/compare/@
|
|
517
|
+
# [2.6.0](https://gitverse.ru/cloud-ru-tech/uikit-product/compare/@cloud-ru/uikit-utils@2.5.0...@cloud-ru/uikit-utils@2.6.0) (2022-04-18)
|
|
518
518
|
|
|
519
519
|
### Features
|
|
520
520
|
|
|
521
|
-
-
|
|
521
|
+
- **AICE-5510** add shadow styles ([b3c8d9e](https://gitverse.ru/cloud-ru-tech/uikit-product/commits/b3c8d9e356ace8d91cd1976c864ff20abda855c6))
|
|
522
522
|
|
|
523
|
-
# [2.5.0](https://gitverse.ru/cloud-ru-tech/uikit-product/compare/@
|
|
523
|
+
# [2.5.0](https://gitverse.ru/cloud-ru-tech/uikit-product/compare/@cloud-ru/uikit-utils@2.4.0...@cloud-ru/uikit-utils@2.5.0) (2022-04-13)
|
|
524
524
|
|
|
525
525
|
### Features
|
|
526
526
|
|
|
527
527
|
- add breakpoints constants to utils ([83a90e8](https://gitverse.ru/cloud-ru-tech/uikit-product/commits/83a90e8a917e8cdaa11bfd5295410e88f09f93e4))
|
|
528
528
|
|
|
529
|
-
# [2.4.0](https://gitverse.ru/cloud-ru-tech/uikit-product/compare/@
|
|
529
|
+
# [2.4.0](https://gitverse.ru/cloud-ru-tech/uikit-product/compare/@cloud-ru/uikit-utils@2.3.0...@cloud-ru/uikit-utils@2.4.0) (2022-04-01)
|
|
530
530
|
|
|
531
531
|
### Features
|
|
532
532
|
|
|
533
533
|
- `keyboardSelectHandler` utility ([7423696](https://gitverse.ru/cloud-ru-tech/uikit-product/commits/742369639c5d24a7ea1ba0a37312a5ed033102e1))
|
|
534
534
|
- `useForceUpdate` and `useForceUpdateOnPageLoadedCompletely` hooks ([5523c0a](https://gitverse.ru/cloud-ru-tech/uikit-product/commits/5523c0a4db6e39678659742d6c95ee033392412e))
|
|
535
535
|
|
|
536
|
-
# [2.3.0](https://gitverse.ru/cloud-ru-tech/uikit-product/compare/@
|
|
536
|
+
# [2.3.0](https://gitverse.ru/cloud-ru-tech/uikit-product/compare/@cloud-ru/uikit-utils@2.2.4...@cloud-ru/uikit-utils@2.3.0) (2022-03-29)
|
|
537
537
|
|
|
538
538
|
### Features
|
|
539
539
|
|
|
540
540
|
- introduce `LOADING_WHEEL` animation ([4931f85](https://gitverse.ru/cloud-ru-tech/uikit-product/commits/4931f85b0df1fc3e450cc03f91597d9e68720f3c))
|
|
541
541
|
|
|
542
|
-
## [2.2.4](https://gitverse.ru/cloud-ru-tech/uikit-product/compare/@
|
|
542
|
+
## [2.2.4](https://gitverse.ru/cloud-ru-tech/uikit-product/compare/@cloud-ru/uikit-utils@2.2.3...@cloud-ru/uikit-utils@2.2.4) (2022-03-25)
|
|
543
543
|
|
|
544
|
-
**Note:** Version bump only for package @
|
|
544
|
+
**Note:** Version bump only for package @cloud-ru/uikit-utils
|
|
545
545
|
|
|
546
|
-
## [2.2.3](https://gitverse.ru/cloud-ru-tech/uikit-product/compare/@
|
|
546
|
+
## [2.2.3](https://gitverse.ru/cloud-ru-tech/uikit-product/compare/@cloud-ru/uikit-utils@2.2.2...@cloud-ru/uikit-utils@2.2.3) (2022-03-23)
|
|
547
547
|
|
|
548
|
-
**Note:** Version bump only for package @
|
|
548
|
+
**Note:** Version bump only for package @cloud-ru/uikit-utils
|
|
549
549
|
|
|
550
|
-
## [2.2.2](https://gitverse.ru/cloud-ru-tech/uikit-product/compare/@
|
|
550
|
+
## [2.2.2](https://gitverse.ru/cloud-ru-tech/uikit-product/compare/@cloud-ru/uikit-utils@2.2.1...@cloud-ru/uikit-utils@2.2.2) (2022-03-22)
|
|
551
551
|
|
|
552
|
-
**Note:** Version bump only for package @
|
|
552
|
+
**Note:** Version bump only for package @cloud-ru/uikit-utils
|
|
553
553
|
|
|
554
554
|
## 2.2.1 (2022-03-22)
|
|
555
555
|
|
|
556
|
-
**Note:** Version bump only for package @
|
|
556
|
+
**Note:** Version bump only for package @cloud-ru/uikit-utils
|
|
557
557
|
|
|
558
|
-
# [2.2.0](https://gitverse.ru/cloud-ru-tech/uikit-product/-/compare/@
|
|
558
|
+
# [2.2.0](https://gitverse.ru/cloud-ru-tech/uikit-product/-/compare/@cloud-ru/uikit-utils@2.1.3...@cloud-ru/uikit-utils@2.2.0) (2022-03-02)
|
|
559
559
|
|
|
560
560
|
### Features
|
|
561
561
|
|
|
562
|
-
-
|
|
562
|
+
- **AICE-4932** add reset default styles ([f0195ff](https://gitverse.ru/cloud-ru-tech/uikit-product/-/commit/f0195ffa2e281fc6b47247fc5fd8a39e9c293fb2))
|
|
563
563
|
|
|
564
|
-
## [2.1.3](https://gitverse.ru/cloud-ru-tech/uikit-product/-/compare/@
|
|
564
|
+
## [2.1.3](https://gitverse.ru/cloud-ru-tech/uikit-product/-/compare/@cloud-ru/uikit-utils@2.1.2...@cloud-ru/uikit-utils@2.1.3) (2022-02-25)
|
|
565
565
|
|
|
566
|
-
**Note:** Version bump only for package @
|
|
566
|
+
**Note:** Version bump only for package @cloud-ru/uikit-utils
|
|
567
567
|
|
|
568
|
-
## [2.1.2](https://gitverse.ru/cloud-ru-tech/uikit-product/-/compare/@
|
|
568
|
+
## [2.1.2](https://gitverse.ru/cloud-ru-tech/uikit-product/-/compare/@cloud-ru/uikit-utils@2.1.1...@cloud-ru/uikit-utils@2.1.2) (2022-02-16)
|
|
569
569
|
|
|
570
570
|
### Bug Fixes
|
|
571
571
|
|
|
572
572
|
- got rid of the typography deprecated usages ([98a9e66](https://gitverse.ru/cloud-ru-tech/uikit-product/-/commit/98a9e66aafaaf5e9a9663dc9a73d82572b90fb93))
|
|
573
573
|
|
|
574
|
-
## [2.1.1](https://gitverse.ru/cloud-ru-tech/uikit-product/-/compare/@
|
|
574
|
+
## [2.1.1](https://gitverse.ru/cloud-ru-tech/uikit-product/-/compare/@cloud-ru/uikit-utils@2.1.0...@cloud-ru/uikit-utils@2.1.1) (2022-01-21)
|
|
575
575
|
|
|
576
576
|
### Bug Fixes
|
|
577
577
|
|
|
@@ -587,29 +587,29 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
587
587
|
|
|
588
588
|
- adds createTextProvider utility ([1595d05](https://gitverse.ru/cloud-ru-tech/uikit-product/-/commit/1595d054b975e1196259b23329daae89d838db66))
|
|
589
589
|
|
|
590
|
-
## [2.0.1](https://gitverse.ru/cloud-ru-tech/uikit-product/-/compare/@
|
|
590
|
+
## [2.0.1](https://gitverse.ru/cloud-ru-tech/uikit-product/-/compare/@cloud-ru/uikit-utils@2.0.0...@cloud-ru/uikit-utils@2.0.1) (2021-12-02)
|
|
591
591
|
|
|
592
|
-
**Note:** Version bump only for package @
|
|
592
|
+
**Note:** Version bump only for package @cloud-ru/uikit-utils
|
|
593
593
|
|
|
594
|
-
# [2.0.0](https://gitverse.ru/cloud-ru-tech/uikit-product/-/compare/@
|
|
594
|
+
# [2.0.0](https://gitverse.ru/cloud-ru-tech/uikit-product/-/compare/@cloud-ru/uikit-utils@1.2.2...@cloud-ru/uikit-utils@2.0.0) (2021-12-01)
|
|
595
595
|
|
|
596
596
|
### Features
|
|
597
597
|
|
|
598
|
-
- packages moved to
|
|
598
|
+
- packages moved to frontend-tools 6930cbe
|
|
599
599
|
|
|
600
600
|
### BREAKING CHANGES
|
|
601
601
|
|
|
602
|
-
- packages moved to
|
|
602
|
+
- packages moved to frontend-tools
|
|
603
603
|
|
|
604
|
-
## [1.2.2](https://gitverse.ru/cloud-ru-tech/uikit-product/-/compare/@
|
|
604
|
+
## [1.2.2](https://gitverse.ru/cloud-ru-tech/uikit-product/-/compare/@cloud-ru/uikit-utils@1.2.1...@cloud-ru/uikit-utils@1.2.2) (2021-11-17)
|
|
605
605
|
|
|
606
606
|
### Bug Fixes
|
|
607
607
|
|
|
608
608
|
- repository.directory field has been added ([82e2345](https://gitverse.ru/cloud-ru-tech/uikit-product/-/commit/82e2345880c4011971b193ebd87eedbb1c804ea6))
|
|
609
609
|
|
|
610
|
-
## [1.2.1](https://gitverse.ru/cloud-ru-tech/uikit-product/-/compare/@
|
|
610
|
+
## [1.2.1](https://gitverse.ru/cloud-ru-tech/uikit-product/-/compare/@cloud-ru/uikit-utils@1.2.0...@cloud-ru/uikit-utils@1.2.1) (2021-11-11)
|
|
611
611
|
|
|
612
|
-
**Note:** Version bump only for package @
|
|
612
|
+
**Note:** Version bump only for package @cloud-ru/uikit-utils
|
|
613
613
|
|
|
614
614
|
# 1.2.0 (2021-11-02)
|
|
615
615
|
|
|
@@ -617,70 +617,70 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
617
617
|
|
|
618
618
|
- added useComponentSize hook ([2bf57bf](https://gitverse.ru/cloud-ru-tech/uikit-product/-/commit/2bf57bfc8797ab775c5196a83254ffd09ecdef04))
|
|
619
619
|
|
|
620
|
-
# [1.1.0](https://gitverse.ru/cloud-ru-tech/uikit-product/-/compare/@
|
|
620
|
+
# [1.1.0](https://gitverse.ru/cloud-ru-tech/uikit-product/-/compare/@cloud-ru/uikit-utils@1.0.4...@cloud-ru/uikit-utils@1.1.0) (2021-10-13)
|
|
621
621
|
|
|
622
622
|
### Features
|
|
623
623
|
|
|
624
|
-
- added extractDataProps function (
|
|
624
|
+
- added extractDataProps function (AICDC-4028) ([917d1bb](https://gitverse.ru/cloud-ru-tech/uikit-product/-/commit/917d1bb05304db1d7a7f4ba7f32e5523a9a6e655))
|
|
625
625
|
|
|
626
|
-
## [1.0.4](https://gitverse.ru/cloud-ru-tech/uikit-product/-/compare/@
|
|
626
|
+
## [1.0.4](https://gitverse.ru/cloud-ru-tech/uikit-product/-/compare/@cloud-ru/uikit-utils@1.0.3...@cloud-ru/uikit-utils@1.0.4) (2021-10-11)
|
|
627
627
|
|
|
628
628
|
### Bug Fixes
|
|
629
629
|
|
|
630
630
|
- republish all packages ([b7ce3da](https://gitverse.ru/cloud-ru-tech/uikit-product/-/commit/b7ce3da1966f2f099d5d47aa13d62058cfa6fc98))
|
|
631
631
|
|
|
632
|
-
## [1.0.3](https://gitverse.ru/cloud-ru-tech/uikit-product/-/compare/@
|
|
632
|
+
## [1.0.3](https://gitverse.ru/cloud-ru-tech/uikit-product/-/compare/@cloud-ru/uikit-utils@1.0.2...@cloud-ru/uikit-utils@1.0.3) (2021-10-08)
|
|
633
633
|
|
|
634
634
|
### Bug Fixes
|
|
635
635
|
|
|
636
636
|
- window custom store decorated via react hook ([8ac326d](https://gitverse.ru/cloud-ru-tech/uikit-product/-/commit/8ac326dccdbd8a0cf02a4cea49c1c36a904a47fa))
|
|
637
637
|
|
|
638
|
-
## [1.0.2](https://gitverse.ru/cloud-ru-tech/uikit-product/-/compare/@
|
|
638
|
+
## [1.0.2](https://gitverse.ru/cloud-ru-tech/uikit-product/-/compare/@cloud-ru/uikit-utils@1.0.1...@cloud-ru/uikit-utils@1.0.2) (2021-10-07)
|
|
639
639
|
|
|
640
|
-
**Note:** Version bump only for package @
|
|
640
|
+
**Note:** Version bump only for package @cloud-ru/uikit-utils
|
|
641
641
|
|
|
642
|
-
## [1.0.1](https://gitverse.ru/cloud-ru-tech/uikit-product/-/compare/@
|
|
642
|
+
## [1.0.1](https://gitverse.ru/cloud-ru-tech/uikit-product/-/compare/@cloud-ru/uikit-utils@1.0.0...@cloud-ru/uikit-utils@1.0.1) (2021-09-30)
|
|
643
643
|
|
|
644
644
|
### Bug Fixes
|
|
645
645
|
|
|
646
646
|
- improved type declarations, linaria core/react peerDeps version is ^3.0.0-beta.13 ([942799a](https://gitverse.ru/cloud-ru-tech/uikit-product/-/commit/942799aa59ae420fb90d00b0d379f30af3d01394))
|
|
647
647
|
|
|
648
|
-
# [1.0.0](https://gitverse.ru/cloud-ru-tech/uikit-product/-/compare/@
|
|
648
|
+
# [1.0.0](https://gitverse.ru/cloud-ru-tech/uikit-product/-/compare/@cloud-ru/uikit-utils@0.8.1...@cloud-ru/uikit-utils@1.0.0) (2021-09-29)
|
|
649
649
|
|
|
650
650
|
### Features
|
|
651
651
|
|
|
652
|
-
- utils first stable version (
|
|
652
|
+
- utils first stable version (AICD-1813) ([ed13c42](https://gitverse.ru/cloud-ru-tech/uikit-product/-/commit/ed13c421ac564f6a5b155780ce473c78eb94aacc))
|
|
653
653
|
|
|
654
654
|
### BREAKING CHANGE
|
|
655
655
|
|
|
656
656
|
- useLanguage and useTheme return types were changed
|
|
657
657
|
- ConfigProvider no longer extends html tag by color classes, but extends body tag
|
|
658
658
|
|
|
659
|
-
## [0.8.1](https://gitverse.ru/cloud-ru-tech/uikit-product/-/compare/@
|
|
659
|
+
## [0.8.1](https://gitverse.ru/cloud-ru-tech/uikit-product/-/compare/@cloud-ru/uikit-utils@0.8.0...@cloud-ru/uikit-utils@0.8.1) (2021-09-14)
|
|
660
660
|
|
|
661
|
-
**Note:** Version bump only for package @
|
|
661
|
+
**Note:** Version bump only for package @cloud-ru/uikit-utils
|
|
662
662
|
|
|
663
|
-
# [0.8.0](https://gitverse.ru/cloud-ru-tech/uikit-product/-/compare/@
|
|
663
|
+
# [0.8.0](https://gitverse.ru/cloud-ru-tech/uikit-product/-/compare/@cloud-ru/uikit-utils@0.7.1...@cloud-ru/uikit-utils@0.8.0) (2021-09-08)
|
|
664
664
|
|
|
665
665
|
### Features
|
|
666
666
|
|
|
667
667
|
- extracting copy-to-clipboard functionality into utils ([3a9b50f](https://gitverse.ru/cloud-ru-tech/uikit-product/-/commit/3a9b50f8384279beb0cc27c79441e346f697bee1))
|
|
668
668
|
|
|
669
|
-
## [0.7.1](https://gitverse.ru/cloud-ru-tech/uikit-product/-/compare/@
|
|
669
|
+
## [0.7.1](https://gitverse.ru/cloud-ru-tech/uikit-product/-/compare/@cloud-ru/uikit-utils@0.7.0...@cloud-ru/uikit-utils@0.7.1) (2021-09-07)
|
|
670
670
|
|
|
671
|
-
**Note:** Version bump only for package @
|
|
671
|
+
**Note:** Version bump only for package @cloud-ru/uikit-utils
|
|
672
672
|
|
|
673
|
-
# [0.7.0](https://gitverse.ru/cloud-ru-tech/uikit-product/-/compare/@
|
|
673
|
+
# [0.7.0](https://gitverse.ru/cloud-ru-tech/uikit-product/-/compare/@cloud-ru/uikit-utils@0.6.1...@cloud-ru/uikit-utils@0.7.0) (2021-09-03)
|
|
674
674
|
|
|
675
675
|
### Features
|
|
676
676
|
|
|
677
677
|
- downloadFile util function ([6c543dc](https://gitverse.ru/cloud-ru-tech/uikit-product/-/commit/6c543dc3e17267e6e0c1c80071d39e2403d8f0f5))
|
|
678
678
|
|
|
679
|
-
## [0.6.1](https://gitverse.ru/cloud-ru-tech/uikit-product/-/compare/@
|
|
679
|
+
## [0.6.1](https://gitverse.ru/cloud-ru-tech/uikit-product/-/compare/@cloud-ru/uikit-utils@0.6.0...@cloud-ru/uikit-utils@0.6.1) (2021-08-25)
|
|
680
680
|
|
|
681
|
-
**Note:** Version bump only for package @
|
|
681
|
+
**Note:** Version bump only for package @cloud-ru/uikit-utils
|
|
682
682
|
|
|
683
|
-
# [0.6.0](https://gitverse.ru/cloud-ru-tech/uikit-product/-/compare/@
|
|
683
|
+
# [0.6.0](https://gitverse.ru/cloud-ru-tech/uikit-product/-/compare/@cloud-ru/uikit-utils@0.5.0...@cloud-ru/uikit-utils@0.6.0) (2021-08-20)
|
|
684
684
|
|
|
685
685
|
### Bug Fixes
|
|
686
686
|
|
|
@@ -694,53 +694,53 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
694
694
|
|
|
695
695
|
- button has been implemented according to design system
|
|
696
696
|
|
|
697
|
-
#
|
|
697
|
+
# 0.5.0 (2021-08-19)
|
|
698
698
|
|
|
699
699
|
### Features
|
|
700
700
|
|
|
701
|
-
- truncate string tool (
|
|
701
|
+
- truncate string tool (75112c2)
|
|
702
702
|
|
|
703
|
-
##
|
|
703
|
+
## 0.4.1 (2021-08-12)
|
|
704
704
|
|
|
705
705
|
### Bug Fixes
|
|
706
706
|
|
|
707
|
-
- get rid of window.navigator (
|
|
707
|
+
- get rid of window.navigator (0a8381f)
|
|
708
708
|
|
|
709
|
-
#
|
|
709
|
+
# 0.4.0 (2021-08-12)
|
|
710
710
|
|
|
711
711
|
### Features
|
|
712
712
|
|
|
713
|
-
- exclude props util (
|
|
713
|
+
- exclude props util (b043bee)
|
|
714
714
|
|
|
715
|
-
##
|
|
715
|
+
## 0.3.1 (2021-08-10)
|
|
716
716
|
|
|
717
|
-
**Note:** Version bump only for package @
|
|
717
|
+
**Note:** Version bump only for package @cloud-ru/uikit-utils
|
|
718
718
|
|
|
719
|
-
#
|
|
719
|
+
# 0.3.0 (2021-08-03)
|
|
720
720
|
|
|
721
721
|
### Features
|
|
722
722
|
|
|
723
|
-
- data-test-\* props extractor (
|
|
723
|
+
- data-test-\* props extractor (3f53737)
|
|
724
724
|
|
|
725
|
-
##
|
|
725
|
+
## 0.2.1 (2021-07-26)
|
|
726
726
|
|
|
727
727
|
### Bug Fixes
|
|
728
728
|
|
|
729
|
-
- fix console errors on JSON.parse failures (
|
|
729
|
+
- fix console errors on JSON.parse failures (dc9ff96)
|
|
730
730
|
|
|
731
731
|
# 0.2.0 (2021-07-26)
|
|
732
732
|
|
|
733
733
|
### Features
|
|
734
734
|
|
|
735
|
-
- button icon
|
|
736
|
-
- create ConfigProvider
|
|
737
|
-
- create ConfigProvider
|
|
735
|
+
- button icon 22d9559
|
|
736
|
+
- create ConfigProvider 26d5984
|
|
737
|
+
- create ConfigProvider 24c5cef
|
|
738
738
|
|
|
739
739
|
# 0.1.0 (2021-07-22)
|
|
740
740
|
|
|
741
741
|
### Features
|
|
742
742
|
|
|
743
|
-
- create ConfigProvider
|
|
743
|
+
- create ConfigProvider 24c5cef
|
|
744
744
|
|
|
745
745
|
## CHANGELOG
|
|
746
746
|
|
|
@@ -4,7 +4,7 @@ exports.useForThemeMode = useForThemeMode;
|
|
|
4
4
|
const hooks_1 = require("../../hooks");
|
|
5
5
|
const theme_1 = require("../../types/theme");
|
|
6
6
|
const DARK_THEMES = [theme_1.Themes.GreenDark, theme_1.Themes.PurpleDark];
|
|
7
|
-
const DARK_BRANDS = [theme_1.Brand.CloudDark, theme_1.Brand.
|
|
7
|
+
const DARK_BRANDS = [theme_1.Brand.CloudDark, theme_1.Brand.GitverseDark, theme_1.Brand.SiteDark, theme_1.Brand.GigaIdDark];
|
|
8
8
|
function useForThemeMode({ light, dark }) {
|
|
9
9
|
const { theme } = (0, hooks_1.useTheme)();
|
|
10
10
|
const { brand } = (0, hooks_1.useBrand)();
|
|
@@ -5,33 +5,30 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.useConfig = useConfig;
|
|
7
7
|
const react_1 = require("react");
|
|
8
|
-
const brand_module_css_1 = __importDefault(require("@
|
|
9
|
-
const brand_module_css_2 = __importDefault(require("@
|
|
10
|
-
const brand_module_css_3 = __importDefault(require("@
|
|
11
|
-
const brand_module_css_4 = __importDefault(require("@
|
|
12
|
-
const brand_module_css_5 = __importDefault(require("@sbercloud/figma-tokens-web/build/css/brand.module.css"));
|
|
8
|
+
const brand_module_css_1 = __importDefault(require("@cloud-ru/figma-tokens-cloud-platform/build/css/brand.module.css"));
|
|
9
|
+
const brand_module_css_2 = __importDefault(require("@cloud-ru/figma-tokens-giga-id/build/css/brand.module.css"));
|
|
10
|
+
const brand_module_css_3 = __importDefault(require("@cloud-ru/figma-tokens-gitverse/build/css/brand.module.css"));
|
|
11
|
+
const brand_module_css_4 = __importDefault(require("@cloud-ru/figma-tokens-web/build/css/brand.module.css"));
|
|
13
12
|
const utils_1 = require("@snack-uikit/utils");
|
|
14
13
|
const environment_1 = require("../constants/environment");
|
|
15
14
|
const tryParseJson_1 = require("../helpers/tryParseJson");
|
|
16
15
|
const types_1 = require("../types");
|
|
17
16
|
const getCustomStore_1 = require("./private/getCustomStore");
|
|
18
17
|
const themeMap = {
|
|
19
|
-
[types_1.Themes.Green]:
|
|
20
|
-
[types_1.Themes.GreenDark]:
|
|
21
|
-
[types_1.Themes.Purple]:
|
|
22
|
-
[types_1.Themes.PurpleDark]:
|
|
18
|
+
[types_1.Themes.Green]: brand_module_css_1.default.light,
|
|
19
|
+
[types_1.Themes.GreenDark]: brand_module_css_1.default.dark,
|
|
20
|
+
[types_1.Themes.Purple]: brand_module_css_3.default.light,
|
|
21
|
+
[types_1.Themes.PurpleDark]: brand_module_css_3.default.dark,
|
|
23
22
|
};
|
|
24
23
|
const brandMap = {
|
|
25
|
-
[types_1.Brand.Cloud]:
|
|
26
|
-
[types_1.Brand.CloudDark]:
|
|
27
|
-
[types_1.Brand.
|
|
28
|
-
[types_1.Brand.
|
|
29
|
-
[types_1.Brand.
|
|
30
|
-
[types_1.Brand.
|
|
31
|
-
[types_1.Brand.
|
|
32
|
-
[types_1.Brand.
|
|
33
|
-
[types_1.Brand.GigaId]: brand_module_css_3.default.light,
|
|
34
|
-
[types_1.Brand.GigaIdDark]: brand_module_css_3.default.dark,
|
|
24
|
+
[types_1.Brand.Cloud]: brand_module_css_1.default.light,
|
|
25
|
+
[types_1.Brand.CloudDark]: brand_module_css_1.default.dark,
|
|
26
|
+
[types_1.Brand.Gitverse]: brand_module_css_3.default.light,
|
|
27
|
+
[types_1.Brand.GitverseDark]: brand_module_css_3.default.dark,
|
|
28
|
+
[types_1.Brand.Site]: brand_module_css_4.default.light,
|
|
29
|
+
[types_1.Brand.SiteDark]: brand_module_css_4.default.dark,
|
|
30
|
+
[types_1.Brand.GigaId]: brand_module_css_2.default.light,
|
|
31
|
+
[types_1.Brand.GigaIdDark]: brand_module_css_2.default.dark,
|
|
35
32
|
};
|
|
36
33
|
function useConfig({ languageCode, theme, brand }) {
|
|
37
34
|
const store = (0, getCustomStore_1.getCustomStore)({ brand, theme, languageCode });
|
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
export declare enum Themes {
|
|
2
|
-
Purple = "purple",
|
|
3
|
-
PurpleDark = "purpleDark",
|
|
4
2
|
Green = "green",
|
|
5
|
-
GreenDark = "greenDark"
|
|
3
|
+
GreenDark = "greenDark",
|
|
4
|
+
Purple = "purple",
|
|
5
|
+
PurpleDark = "purpleDark"
|
|
6
6
|
}
|
|
7
7
|
export declare enum Brand {
|
|
8
8
|
Cloud = "Cloud",
|
|
9
9
|
CloudDark = "CloudDark",
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
Gitverse = "Gitverse",
|
|
11
|
+
GitverseDark = "GitverseDark",
|
|
12
12
|
Site = "Site",
|
|
13
13
|
SiteDark = "SiteDark",
|
|
14
|
-
Admin = "Admin",
|
|
15
|
-
AdminDark = "AdminDark",
|
|
16
14
|
GigaId = "GigaId",
|
|
17
15
|
GigaIdDark = "GigaIdDark"
|
|
18
16
|
}
|
package/dist/cjs/types/theme.js
CHANGED
|
@@ -3,21 +3,19 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Brand = exports.Themes = void 0;
|
|
4
4
|
var Themes;
|
|
5
5
|
(function (Themes) {
|
|
6
|
-
Themes["Purple"] = "purple";
|
|
7
|
-
Themes["PurpleDark"] = "purpleDark";
|
|
8
6
|
Themes["Green"] = "green";
|
|
9
7
|
Themes["GreenDark"] = "greenDark";
|
|
8
|
+
Themes["Purple"] = "purple";
|
|
9
|
+
Themes["PurpleDark"] = "purpleDark";
|
|
10
10
|
})(Themes || (exports.Themes = Themes = {}));
|
|
11
11
|
var Brand;
|
|
12
12
|
(function (Brand) {
|
|
13
13
|
Brand["Cloud"] = "Cloud";
|
|
14
14
|
Brand["CloudDark"] = "CloudDark";
|
|
15
|
-
Brand["
|
|
16
|
-
Brand["
|
|
15
|
+
Brand["Gitverse"] = "Gitverse";
|
|
16
|
+
Brand["GitverseDark"] = "GitverseDark";
|
|
17
17
|
Brand["Site"] = "Site";
|
|
18
18
|
Brand["SiteDark"] = "SiteDark";
|
|
19
|
-
Brand["Admin"] = "Admin";
|
|
20
|
-
Brand["AdminDark"] = "AdminDark";
|
|
21
19
|
Brand["GigaId"] = "GigaId";
|
|
22
20
|
Brand["GigaIdDark"] = "GigaIdDark";
|
|
23
21
|
})(Brand || (exports.Brand = Brand = {}));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useBrand, useTheme } from '../../hooks';
|
|
2
2
|
import { Brand, Themes } from '../../types/theme';
|
|
3
3
|
const DARK_THEMES = [Themes.GreenDark, Themes.PurpleDark];
|
|
4
|
-
const DARK_BRANDS = [Brand.CloudDark, Brand.
|
|
4
|
+
const DARK_BRANDS = [Brand.CloudDark, Brand.GitverseDark, Brand.SiteDark, Brand.GigaIdDark];
|
|
5
5
|
export function useForThemeMode({ light, dark }) {
|
|
6
6
|
const { theme } = useTheme();
|
|
7
7
|
const { brand } = useBrand();
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import SiteBrandThemes from '@sbercloud/figma-tokens-web/build/css/brand.module.css';
|
|
2
|
+
import CloudBrandThemes from '@cloud-ru/figma-tokens-cloud-platform/build/css/brand.module.css';
|
|
3
|
+
import GigaIdBrandThemes from '@cloud-ru/figma-tokens-giga-id/build/css/brand.module.css';
|
|
4
|
+
import GitverseBrandThemes from '@cloud-ru/figma-tokens-gitverse/build/css/brand.module.css';
|
|
5
|
+
import SiteBrandThemes from '@cloud-ru/figma-tokens-web/build/css/brand.module.css';
|
|
7
6
|
import { isBrowser, useLayoutEffect } from '@snack-uikit/utils';
|
|
8
7
|
import { POST_MESSAGE_KEY } from '../constants/environment';
|
|
9
8
|
import { tryParseJson } from '../helpers/tryParseJson';
|
|
@@ -12,16 +11,14 @@ import { getCustomStore } from './private/getCustomStore';
|
|
|
12
11
|
const themeMap = {
|
|
13
12
|
[Themes.Green]: CloudBrandThemes.light,
|
|
14
13
|
[Themes.GreenDark]: CloudBrandThemes.dark,
|
|
15
|
-
[Themes.Purple]:
|
|
16
|
-
[Themes.PurpleDark]:
|
|
14
|
+
[Themes.Purple]: GitverseBrandThemes.light,
|
|
15
|
+
[Themes.PurpleDark]: GitverseBrandThemes.dark,
|
|
17
16
|
};
|
|
18
17
|
const brandMap = {
|
|
19
18
|
[Brand.Cloud]: CloudBrandThemes.light,
|
|
20
19
|
[Brand.CloudDark]: CloudBrandThemes.dark,
|
|
21
|
-
[Brand.
|
|
22
|
-
[Brand.
|
|
23
|
-
[Brand.Admin]: AdminBrandThemes.light,
|
|
24
|
-
[Brand.AdminDark]: AdminBrandThemes.dark,
|
|
20
|
+
[Brand.Gitverse]: GitverseBrandThemes.light,
|
|
21
|
+
[Brand.GitverseDark]: GitverseBrandThemes.dark,
|
|
25
22
|
[Brand.Site]: SiteBrandThemes.light,
|
|
26
23
|
[Brand.SiteDark]: SiteBrandThemes.dark,
|
|
27
24
|
[Brand.GigaId]: GigaIdBrandThemes.light,
|
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
export declare enum Themes {
|
|
2
|
-
Purple = "purple",
|
|
3
|
-
PurpleDark = "purpleDark",
|
|
4
2
|
Green = "green",
|
|
5
|
-
GreenDark = "greenDark"
|
|
3
|
+
GreenDark = "greenDark",
|
|
4
|
+
Purple = "purple",
|
|
5
|
+
PurpleDark = "purpleDark"
|
|
6
6
|
}
|
|
7
7
|
export declare enum Brand {
|
|
8
8
|
Cloud = "Cloud",
|
|
9
9
|
CloudDark = "CloudDark",
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
Gitverse = "Gitverse",
|
|
11
|
+
GitverseDark = "GitverseDark",
|
|
12
12
|
Site = "Site",
|
|
13
13
|
SiteDark = "SiteDark",
|
|
14
|
-
Admin = "Admin",
|
|
15
|
-
AdminDark = "AdminDark",
|
|
16
14
|
GigaId = "GigaId",
|
|
17
15
|
GigaIdDark = "GigaIdDark"
|
|
18
16
|
}
|
package/dist/esm/types/theme.js
CHANGED
|
@@ -1,20 +1,18 @@
|
|
|
1
1
|
export var Themes;
|
|
2
2
|
(function (Themes) {
|
|
3
|
-
Themes["Purple"] = "purple";
|
|
4
|
-
Themes["PurpleDark"] = "purpleDark";
|
|
5
3
|
Themes["Green"] = "green";
|
|
6
4
|
Themes["GreenDark"] = "greenDark";
|
|
5
|
+
Themes["Purple"] = "purple";
|
|
6
|
+
Themes["PurpleDark"] = "purpleDark";
|
|
7
7
|
})(Themes || (Themes = {}));
|
|
8
8
|
export var Brand;
|
|
9
9
|
(function (Brand) {
|
|
10
10
|
Brand["Cloud"] = "Cloud";
|
|
11
11
|
Brand["CloudDark"] = "CloudDark";
|
|
12
|
-
Brand["
|
|
13
|
-
Brand["
|
|
12
|
+
Brand["Gitverse"] = "Gitverse";
|
|
13
|
+
Brand["GitverseDark"] = "GitverseDark";
|
|
14
14
|
Brand["Site"] = "Site";
|
|
15
15
|
Brand["SiteDark"] = "SiteDark";
|
|
16
|
-
Brand["Admin"] = "Admin";
|
|
17
|
-
Brand["AdminDark"] = "AdminDark";
|
|
18
16
|
Brand["GigaId"] = "GigaId";
|
|
19
17
|
Brand["GigaIdDark"] = "GigaIdDark";
|
|
20
18
|
})(Brand || (Brand = {}));
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloud-ru/uikit-product-utils",
|
|
3
3
|
"title": "Utils",
|
|
4
|
-
"version": "8.1.0",
|
|
4
|
+
"version": "8.1.1-preview-23c44fe9.0",
|
|
5
5
|
"sideEffects": [
|
|
6
6
|
"*.css",
|
|
7
7
|
"*.woff",
|
|
@@ -60,29 +60,25 @@
|
|
|
60
60
|
"@types/ua-parser-js": "0.7.39"
|
|
61
61
|
},
|
|
62
62
|
"peerDependencies": {
|
|
63
|
-
"@
|
|
64
|
-
"@
|
|
65
|
-
"@
|
|
66
|
-
"@
|
|
67
|
-
"@sbercloud/figma-tokens-web": "*",
|
|
63
|
+
"@cloud-ru/figma-tokens-cloud-platform": "*",
|
|
64
|
+
"@cloud-ru/figma-tokens-giga-id": "*",
|
|
65
|
+
"@cloud-ru/figma-tokens-gitverse": "*",
|
|
66
|
+
"@cloud-ru/figma-tokens-web": "*",
|
|
68
67
|
"@snack-uikit/figma-tokens": "*"
|
|
69
68
|
},
|
|
70
69
|
"peerDependenciesMeta": {
|
|
71
|
-
"@
|
|
70
|
+
"@cloud-ru/figma-tokens-cloud-platform": {
|
|
72
71
|
"optional": true
|
|
73
72
|
},
|
|
74
|
-
"@
|
|
73
|
+
"@cloud-ru/figma-tokens-giga-id": {
|
|
75
74
|
"optional": true
|
|
76
75
|
},
|
|
77
|
-
"@
|
|
76
|
+
"@cloud-ru/figma-tokens-gitverse": {
|
|
78
77
|
"optional": true
|
|
79
78
|
},
|
|
80
|
-
"@
|
|
81
|
-
"optional": true
|
|
82
|
-
},
|
|
83
|
-
"@sbercloud/figma-tokens-web": {
|
|
79
|
+
"@cloud-ru/figma-tokens-web": {
|
|
84
80
|
"optional": true
|
|
85
81
|
}
|
|
86
82
|
},
|
|
87
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "eb43cd21d0a4d229011e2f7e87f87d862dcda635"
|
|
88
84
|
}
|
|
@@ -7,7 +7,7 @@ type UseForThemeModeParams<L, D> = {
|
|
|
7
7
|
};
|
|
8
8
|
|
|
9
9
|
const DARK_THEMES = [Themes.GreenDark, Themes.PurpleDark];
|
|
10
|
-
const DARK_BRANDS = [Brand.CloudDark, Brand.
|
|
10
|
+
const DARK_BRANDS = [Brand.CloudDark, Brand.GitverseDark, Brand.SiteDark, Brand.GigaIdDark];
|
|
11
11
|
|
|
12
12
|
export function useForThemeMode<L, D>({ light, dark }: UseForThemeModeParams<L, D>): L | D {
|
|
13
13
|
const { theme } = useTheme();
|
package/src/hooks/useConfig.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
2
2
|
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import SiteBrandThemes from '@sbercloud/figma-tokens-web/build/css/brand.module.css';
|
|
3
|
+
import CloudBrandThemes from '@cloud-ru/figma-tokens-cloud-platform/build/css/brand.module.css';
|
|
4
|
+
import GigaIdBrandThemes from '@cloud-ru/figma-tokens-giga-id/build/css/brand.module.css';
|
|
5
|
+
import GitverseBrandThemes from '@cloud-ru/figma-tokens-gitverse/build/css/brand.module.css';
|
|
6
|
+
import SiteBrandThemes from '@cloud-ru/figma-tokens-web/build/css/brand.module.css';
|
|
8
7
|
import { isBrowser, useLayoutEffect } from '@snack-uikit/utils';
|
|
9
8
|
|
|
10
9
|
import { POST_MESSAGE_KEY } from '../constants/environment';
|
|
@@ -21,17 +20,15 @@ type UseConfigProps = {
|
|
|
21
20
|
const themeMap = {
|
|
22
21
|
[Themes.Green]: CloudBrandThemes.light,
|
|
23
22
|
[Themes.GreenDark]: CloudBrandThemes.dark,
|
|
24
|
-
[Themes.Purple]:
|
|
25
|
-
[Themes.PurpleDark]:
|
|
23
|
+
[Themes.Purple]: GitverseBrandThemes.light,
|
|
24
|
+
[Themes.PurpleDark]: GitverseBrandThemes.dark,
|
|
26
25
|
};
|
|
27
26
|
|
|
28
27
|
const brandMap = {
|
|
29
28
|
[Brand.Cloud]: CloudBrandThemes.light,
|
|
30
29
|
[Brand.CloudDark]: CloudBrandThemes.dark,
|
|
31
|
-
[Brand.
|
|
32
|
-
[Brand.
|
|
33
|
-
[Brand.Admin]: AdminBrandThemes.light,
|
|
34
|
-
[Brand.AdminDark]: AdminBrandThemes.dark,
|
|
30
|
+
[Brand.Gitverse]: GitverseBrandThemes.light,
|
|
31
|
+
[Brand.GitverseDark]: GitverseBrandThemes.dark,
|
|
35
32
|
[Brand.Site]: SiteBrandThemes.light,
|
|
36
33
|
[Brand.SiteDark]: SiteBrandThemes.dark,
|
|
37
34
|
[Brand.GigaId]: GigaIdBrandThemes.light,
|
package/src/types/theme.ts
CHANGED
|
@@ -1,19 +1,17 @@
|
|
|
1
1
|
export enum Themes {
|
|
2
|
-
Purple = 'purple',
|
|
3
|
-
PurpleDark = 'purpleDark',
|
|
4
2
|
Green = 'green',
|
|
5
3
|
GreenDark = 'greenDark',
|
|
4
|
+
Purple = 'purple',
|
|
5
|
+
PurpleDark = 'purpleDark',
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
export enum Brand {
|
|
9
9
|
Cloud = 'Cloud',
|
|
10
10
|
CloudDark = 'CloudDark',
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
Gitverse = 'Gitverse',
|
|
12
|
+
GitverseDark = 'GitverseDark',
|
|
13
13
|
Site = 'Site',
|
|
14
14
|
SiteDark = 'SiteDark',
|
|
15
|
-
Admin = 'Admin',
|
|
16
|
-
AdminDark = 'AdminDark',
|
|
17
15
|
GigaId = 'GigaId',
|
|
18
16
|
GigaIdDark = 'GigaIdDark',
|
|
19
17
|
}
|