@gravity-ui/page-constructor 4.28.0-alpha.0 → 4.28.1

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.
Files changed (112) hide show
  1. package/build/cjs/blocks/ContentLayout/ContentLayout.css +3 -0
  2. package/build/cjs/blocks/ContentLayout/ContentLayout.js +1 -1
  3. package/build/cjs/blocks/Header/Header.css +15 -0
  4. package/build/cjs/blocks/Header/Header.js +6 -2
  5. package/build/cjs/blocks/Header/schema.d.ts +8 -0
  6. package/build/cjs/blocks/Header/schema.js +4 -0
  7. package/build/cjs/blocks/HeaderSlider/schema.d.ts +4 -0
  8. package/build/cjs/blocks/Icons/Icons.css +10 -0
  9. package/build/cjs/blocks/Questions/QuestionBlockItem/QuestionBlockItem.css +15 -0
  10. package/build/cjs/blocks/Slider/Arrow/Arrow.css +7 -0
  11. package/build/cjs/blocks/Slider/Slider.js +12 -6
  12. package/build/cjs/components/Button/Button.css +6 -0
  13. package/build/cjs/components/ButtonTabs/ButtonTabs.css +3 -0
  14. package/build/cjs/components/ButtonTabs/ButtonTabs.js +1 -1
  15. package/build/cjs/components/CardBase/CardBase.d.ts +1 -2
  16. package/build/cjs/components/CardBase/CardBase.js +7 -3
  17. package/build/cjs/components/Control/Control.css +8 -0
  18. package/build/cjs/components/FileLink/FileLink.css +8 -0
  19. package/build/cjs/components/FullscreenImage/FullscreenImage.css +20 -1
  20. package/build/cjs/components/FullscreenImage/FullscreenImage.js +3 -6
  21. package/build/cjs/components/FullscreenMedia/FullscreenMedia.css +4 -0
  22. package/build/cjs/components/FullscreenMedia/FullscreenMedia.d.ts +1 -1
  23. package/build/cjs/components/FullscreenMedia/FullscreenMedia.js +4 -2
  24. package/build/cjs/components/Link/Link.css +8 -0
  25. package/build/cjs/components/Media/Image/Image.js +1 -1
  26. package/build/cjs/components/Media/Media.d.ts +1 -0
  27. package/build/cjs/components/Media/Media.js +3 -2
  28. package/build/cjs/components/Media/Video/Video.js +1 -1
  29. package/build/cjs/components/OverflowScroller/OverflowScroller.css +19 -0
  30. package/build/cjs/components/OverflowScroller/OverflowScroller.js +2 -1
  31. package/build/cjs/components/OverflowScroller/i18n/en.json +4 -0
  32. package/build/cjs/components/OverflowScroller/i18n/index.d.ts +2 -0
  33. package/build/cjs/components/OverflowScroller/i18n/index.js +8 -0
  34. package/build/cjs/components/OverflowScroller/i18n/ru.json +4 -0
  35. package/build/cjs/components/ReactPlayer/CustomBarControls.css +6 -4
  36. package/build/cjs/components/ReactPlayer/ReactPlayer.css +7 -0
  37. package/build/cjs/components/ReactPlayer/ReactPlayer.d.ts +2 -1
  38. package/build/cjs/components/ReactPlayer/ReactPlayer.js +17 -7
  39. package/build/cjs/components/Table/Table.css +1 -1
  40. package/build/cjs/components/Title/TitleItem.css +8 -0
  41. package/build/cjs/components/VideoBlock/VideoBlock.css +7 -0
  42. package/build/cjs/components/VideoBlock/VideoBlock.d.ts +1 -0
  43. package/build/cjs/components/VideoBlock/VideoBlock.js +3 -3
  44. package/build/cjs/containers/PageConstructor/PageConstructor.css +12 -1
  45. package/build/cjs/models/components.d.ts +1 -2
  46. package/build/cjs/models/constructor-items/blocks.d.ts +1 -0
  47. package/build/cjs/sub-blocks/BannerCard/BannerCard.css +3 -0
  48. package/build/cjs/sub-blocks/Content/Content.css +3 -0
  49. package/build/cjs/sub-blocks/HubspotForm/HubspotForm.css +42 -4
  50. package/build/cjs/sub-blocks/PriceDetailed/PriceDescription/PriceDescription.css +1 -1
  51. package/build/cjs/sub-blocks/PriceDetailed/PriceDetails/PriceDetails.css +20 -2
  52. package/build/cjs/sub-blocks/PriceDetailed/PriceDetails/PriceDetails.js +1 -1
  53. package/build/esm/blocks/ContentLayout/ContentLayout.css +3 -0
  54. package/build/esm/blocks/ContentLayout/ContentLayout.js +1 -1
  55. package/build/esm/blocks/Header/Header.css +15 -0
  56. package/build/esm/blocks/Header/Header.js +6 -2
  57. package/build/esm/blocks/Header/schema.d.ts +8 -0
  58. package/build/esm/blocks/Header/schema.js +4 -0
  59. package/build/esm/blocks/HeaderSlider/schema.d.ts +4 -0
  60. package/build/esm/blocks/Icons/Icons.css +10 -0
  61. package/build/esm/blocks/Questions/QuestionBlockItem/QuestionBlockItem.css +15 -0
  62. package/build/esm/blocks/Slider/Arrow/Arrow.css +7 -0
  63. package/build/esm/blocks/Slider/Slider.js +12 -6
  64. package/build/esm/components/Button/Button.css +6 -0
  65. package/build/esm/components/ButtonTabs/ButtonTabs.css +3 -0
  66. package/build/esm/components/ButtonTabs/ButtonTabs.js +1 -1
  67. package/build/esm/components/CardBase/CardBase.d.ts +1 -2
  68. package/build/esm/components/CardBase/CardBase.js +6 -2
  69. package/build/esm/components/Control/Control.css +8 -0
  70. package/build/esm/components/FileLink/FileLink.css +8 -0
  71. package/build/esm/components/FullscreenImage/FullscreenImage.css +20 -1
  72. package/build/esm/components/FullscreenImage/FullscreenImage.js +3 -6
  73. package/build/esm/components/FullscreenMedia/FullscreenMedia.css +4 -0
  74. package/build/esm/components/FullscreenMedia/FullscreenMedia.d.ts +1 -1
  75. package/build/esm/components/FullscreenMedia/FullscreenMedia.js +5 -3
  76. package/build/esm/components/Link/Link.css +8 -0
  77. package/build/esm/components/Media/Image/Image.js +2 -2
  78. package/build/esm/components/Media/Media.d.ts +1 -0
  79. package/build/esm/components/Media/Media.js +3 -2
  80. package/build/esm/components/Media/Video/Video.js +1 -1
  81. package/build/esm/components/OverflowScroller/OverflowScroller.css +19 -0
  82. package/build/esm/components/OverflowScroller/OverflowScroller.js +2 -1
  83. package/build/esm/components/OverflowScroller/i18n/en.json +4 -0
  84. package/build/esm/components/OverflowScroller/i18n/index.d.ts +2 -0
  85. package/build/esm/components/OverflowScroller/i18n/index.js +5 -0
  86. package/build/esm/components/OverflowScroller/i18n/ru.json +4 -0
  87. package/build/esm/components/ReactPlayer/CustomBarControls.css +6 -4
  88. package/build/esm/components/ReactPlayer/ReactPlayer.css +7 -0
  89. package/build/esm/components/ReactPlayer/ReactPlayer.d.ts +2 -1
  90. package/build/esm/components/ReactPlayer/ReactPlayer.js +17 -7
  91. package/build/esm/components/Table/Table.css +1 -1
  92. package/build/esm/components/Title/TitleItem.css +8 -0
  93. package/build/esm/components/VideoBlock/VideoBlock.css +7 -0
  94. package/build/esm/components/VideoBlock/VideoBlock.d.ts +1 -0
  95. package/build/esm/components/VideoBlock/VideoBlock.js +3 -3
  96. package/build/esm/containers/PageConstructor/PageConstructor.css +12 -1
  97. package/build/esm/models/components.d.ts +1 -2
  98. package/build/esm/models/constructor-items/blocks.d.ts +1 -0
  99. package/build/esm/sub-blocks/BannerCard/BannerCard.css +3 -0
  100. package/build/esm/sub-blocks/Content/Content.css +3 -0
  101. package/build/esm/sub-blocks/HubspotForm/HubspotForm.css +42 -4
  102. package/build/esm/sub-blocks/PriceDetailed/PriceDescription/PriceDescription.css +1 -1
  103. package/build/esm/sub-blocks/PriceDetailed/PriceDetails/PriceDetails.css +20 -2
  104. package/build/esm/sub-blocks/PriceDetailed/PriceDetails/PriceDetails.js +1 -1
  105. package/package.json +3 -3
  106. package/server/models/components.d.ts +1 -2
  107. package/server/models/constructor-items/blocks.d.ts +1 -0
  108. package/styles/mixins.scss +20 -0
  109. package/styles/root.scss +6 -0
  110. package/styles/styles.css +8 -1
  111. package/styles/yfm.scss +3 -1
  112. package/widget/index.js +1 -1
@@ -35,18 +35,22 @@ unpredictable css rules order in build */
35
35
  --pc-selected-tab-item-background-color-hover: var(
36
36
  --pc-monochrome-button-background-color-hover
37
37
  );
38
+ --pc-color-line-focus-light: var(--g-color-text-brand);
39
+ --pc-color-line-focus-dark: var(--g-color-text-light-primary);
38
40
  }
39
41
  .g-root_theme_light {
40
42
  --pc-color-base-silver: #eff2f8;
41
43
  --pc-color-base-gold: #ffdb4d;
42
44
  --pc-color-base-asphalt: #313538;
43
45
  --pc-color-base-copper: #ffe6c4;
46
+ --g-color-line-focus: var(--pc-color-line-focus-light);
44
47
  }
45
48
  .g-root_theme_dark {
46
49
  --pc-color-base-silver: #bcc0c4;
47
50
  --pc-color-base-gold: #ffde5d;
48
51
  --pc-color-base-asphalt: #474d52;
49
52
  --pc-color-base-copper: #7f7262;
53
+ --g-color-line-focus: var(--pc-color-line-focus-dark);
50
54
  }
51
55
  .g-root.g-root_theme_dark {
52
56
  --pc-color-sfx-shadow: var(--g-color-sfx-shadow);
@@ -95,7 +99,7 @@ unpredictable css rules order in build */
95
99
  margin: 0 0 12px;
96
100
  }
97
101
  .yfm_constructor.yfm_constructor p strong {
98
- font-weight: 500;
102
+ font-weight: var(--g-text-accent-font-weight);
99
103
  }
100
104
  .yfm_constructor.yfm_constructor_size_s ul,
101
105
  .yfm_constructor.yfm_constructor_size_s ol,
@@ -124,6 +128,7 @@ unpredictable css rules order in build */
124
128
  color: var(--g-color-text-link);
125
129
  text-decoration: none;
126
130
  cursor: pointer;
131
+ border-radius: var(--g-focus-border-radius);
127
132
  }
128
133
  .utilityfocus .yfm_constructor a:focus {
129
134
  outline: 2px solid #ffdb4d;
@@ -132,6 +137,12 @@ unpredictable css rules order in build */
132
137
  --pc-text-header-color: var(--g-color-text-link-hover);
133
138
  color: var(--g-color-text-link-hover);
134
139
  }
140
+ .yfm_constructor a:focus {
141
+ box-shadow: 0 0 0 2px var(--g-color-line-focus);
142
+ }
143
+ .yfm_constructor a:focus:not(:focus-visible) {
144
+ box-shadow: none;
145
+ }
135
146
  .yfm_constructor table {
136
147
  color: var(--g-color-text-primary);
137
148
  border: 1px solid var(--g-color-line-generic);
@@ -1,4 +1,3 @@
1
1
  export type ArrowDirection = 'left' | 'right';
2
- export interface ReactPlayerBlockHandler {
3
- pause: () => void;
2
+ export interface ReactPlayerBlockHandler extends Pick<HTMLVideoElement, 'play' | 'pause' | 'addEventListener'> {
4
3
  }
@@ -103,6 +103,7 @@ export interface HeaderBlockProps {
103
103
  offset?: HeaderOffset;
104
104
  image?: ThemedImage;
105
105
  video?: ThemedMediaVideoProps;
106
+ mediaView?: 'fit' | 'full';
106
107
  background?: ThemedHeaderBlockBackground;
107
108
  theme?: 'light' | 'dark';
108
109
  verticalOffset?: 's' | 'm' | 'l' | 'xl';
@@ -4,6 +4,9 @@
4
4
 
5
5
  /* use this for style redefinitions to awoid problems with
6
6
  unpredictable css rules order in build */
7
+ .pc-banner-card_theme_dark {
8
+ --g-color-line-focus: var(--pc-color-line-focus-dark);
9
+ }
7
10
  .pc-banner-card_theme_dark.pc-banner-card_theme_dark .pc-banner-card__title,
8
11
  .pc-banner-card_theme_dark.pc-banner-card_theme_dark .pc-banner-card__subtitle {
9
12
  color: var(--g-color-text-light-primary);
@@ -91,6 +91,9 @@ unpredictable css rules order in build */
91
91
  .pc-content_size_l .pc-content__button {
92
92
  margin-top: 12px;
93
93
  }
94
+ .pc-content_theme_dark {
95
+ --g-color-line-focus: var(--pc-color-line-focus-dark);
96
+ }
94
97
  .pc-content_theme_dark .pc-content__title *,
95
98
  .pc-content_theme_dark .pc-content__text .yfm,
96
99
  .pc-content_theme_dark .pc-content__text .yfm *,
@@ -1,5 +1,8 @@
1
1
  /* use this for style redefinitions to awoid problems with
2
2
  unpredictable css rules order in build */
3
+ .pc-hubspot-form {
4
+ --g-color-line-focus: var(--pc-color-line-focus-light);
5
+ }
3
6
  .pc-hubspot-form .submitted-message {
4
7
  padding-left: 10px;
5
8
  }
@@ -10,6 +13,7 @@ unpredictable css rules order in build */
10
13
  .pc-hubspot-form .hs-form-field > label {
11
14
  color: var(--g-color-text-primary);
12
15
  font-size: var(--g-text-body-2-font-size);
16
+ line-height: var(--g-text-body-2-line-height);
13
17
  display: flex;
14
18
  width: 200px;
15
19
  max-width: 100%;
@@ -77,7 +81,7 @@ unpredictable css rules order in build */
77
81
  .pc-hubspot-form .hs-form-field .input input[type=tel]:focus,
78
82
  .pc-hubspot-form .hs-form-field .input input[type=email]:focus,
79
83
  .pc-hubspot-form .hs-form-field .input textarea:focus {
80
- border: 2px solid var(--g-color-base-brand);
84
+ border: 2px solid var(--g-color-line-focus);
81
85
  outline: none;
82
86
  }
83
87
  .pc-hubspot-form .hs-form-field .input textarea {
@@ -97,7 +101,7 @@ unpredictable css rules order in build */
97
101
  padding-right: 30px;
98
102
  }
99
103
  .pc-hubspot-form .hs-form-field .input select:focus {
100
- border: 1px solid var(--g-color-line-generic-active);
104
+ border: 1px solid var(--g-color-line-focus);
101
105
  }
102
106
  .pc-hubspot-form .hs-form-field .input .hs-fieldtype-intl-phone.hs-input .hs-input {
103
107
  float: none;
@@ -139,7 +143,7 @@ unpredictable css rules order in build */
139
143
  .pc-hubspot-form .hs-form-field .hs-form-radio-display span:not(.hs-form-required) {
140
144
  color: var(--g-color-text-primary);
141
145
  font-size: var(--g-text-body-2-font-size);
142
- line-height: 16px;
146
+ line-height: var(--g-text-body-2-line-height);
143
147
  padding-left: 7px;
144
148
  margin: 0;
145
149
  flex-grow: 1;
@@ -187,6 +191,10 @@ unpredictable css rules order in build */
187
191
  .pc-hubspot-form .hs-form-field .hs-form-checkbox-display input:checked ~ span:before {
188
192
  background-color: #ffeba0;
189
193
  }
194
+ .pc-hubspot-form .hs-form-field .hs-form-booleancheckbox-display input[type=checkbox]:focus ~ span::before,
195
+ .pc-hubspot-form .hs-form-field .hs-form-checkbox-display input[type=checkbox]:focus ~ span::before {
196
+ outline: 2px solid var(--g-color-line-focus);
197
+ }
190
198
  .pc-hubspot-form .hs-form-field .hs-form-radio-display span:before {
191
199
  content: "";
192
200
  position: absolute;
@@ -229,7 +237,17 @@ unpredictable css rules order in build */
229
237
  font-size: var(--g-text-body-2-font-size);
230
238
  line-height: var(--g-text-body-2-line-height);
231
239
  font-weight: var(--g-text-body-font-weight);
232
- margin: 0 0 20px;
240
+ margin: 20px 0;
241
+ }
242
+ .pc-hubspot-form .hs-richtext a:focus {
243
+ box-shadow: 0 0 0 2px var(--g-color-line-focus);
244
+ }
245
+ .pc-hubspot-form .hs-richtext a:focus:not(:focus-visible) {
246
+ box-shadow: none;
247
+ }
248
+ .pc-hubspot-form .hs-richtext a:focus {
249
+ outline: 0;
250
+ border-radius: var(--g-focus-border-radius);
233
251
  }
234
252
  .pc-hubspot-form .hs_error_rollup {
235
253
  padding-left: 10px;
@@ -238,6 +256,9 @@ unpredictable css rules order in build */
238
256
  font-weight: var(--g-text-body-font-weight);
239
257
  color: var(--g-color-text-danger);
240
258
  }
259
+ .pc-hubspot-form .legal-consent-container {
260
+ padding-top: 8px;
261
+ }
241
262
  .pc-hubspot-form .inputs-list {
242
263
  list-style: none;
243
264
  padding: 0;
@@ -301,9 +322,23 @@ unpredictable css rules order in build */
301
322
  white-space: nowrap;
302
323
  appearance: none;
303
324
  }
325
+ .pc-hubspot-form .hs-button.primary:focus {
326
+ outline: 2px solid var(--g-color-line-focus);
327
+ outline-offset: 1px;
328
+ }
329
+ .pc-hubspot-form .hs-button.primary:focus:not(:focus-visible) {
330
+ outline: 0;
331
+ }
304
332
  .pc-hubspot-form .hs-button.primary:hover {
305
333
  background-color: var(--g-color-base-brand-hover);
306
334
  }
335
+ .pc-hubspot-form .hs-button.primary:focus {
336
+ outline: 2px solid var(--g-color-line-focus);
337
+ outline-offset: 1px;
338
+ }
339
+ .pc-hubspot-form .hs-button.primary:focus:not(:focus-visible) {
340
+ outline: 0;
341
+ }
307
342
  .pc-hubspot-form .grecaptcha-badge {
308
343
  box-shadow: none !important;
309
344
  border: 1px solid var(--g-color-line-generic);
@@ -355,6 +390,9 @@ unpredictable css rules order in build */
355
390
  .pc-hubspot-form_mobile .hs-button.primary {
356
391
  width: 80%;
357
392
  }
393
+ .pc-hubspot-form_theme_dark {
394
+ --g-color-line-focus: var(--pc-color-line-focus-dark);
395
+ }
358
396
  .pc-hubspot-form_theme_dark .hs-form-field .input select {
359
397
  background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMSIgaGVpZ2h0PSI2IiB2aWV3Qm94PSIwIDAgMTEgNiIgZmlsbD0ibm9uZSI+CiAgICA8cGF0aCBkPSJNMTAuMDggMEw1LjUgNC4zNi45MSAwIDAgLjg2bDUuNSA1LjI1TDExIC44NnoiIGZpbGw9IiNmZmZmZmYiLz4KPC9zdmc+Cg==");
360
398
  }
@@ -16,7 +16,7 @@ unpredictable css rules order in build */
16
16
  line-height: var(--g-text-body-1-line-height);
17
17
  }
18
18
  .pc-price-description__main-title {
19
- font-weight: 500;
19
+ font-weight: var(--g-text-accent-font-weight);
20
20
  }
21
21
  .pc-price-description__main-title_color_cornflower {
22
22
  color: var(--g-color-base-brand);
@@ -23,11 +23,29 @@ unpredictable css rules order in build */
23
23
  margin: auto 10px;
24
24
  }
25
25
  .pc-price-details__foldable_title {
26
+ font-size: var(--g-text-body-2-font-size);
27
+ line-height: var(--g-text-body-2-line-height);
28
+ display: inline-block;
29
+ margin: 0;
30
+ padding: 0;
31
+ font: inherit;
32
+ border: none;
33
+ outline: none;
34
+ color: inherit;
35
+ background: none;
36
+ cursor: pointer;
26
37
  cursor: pointer;
27
38
  display: flex;
39
+ align-items: center;
28
40
  font-weight: 400;
29
- font-size: var(--g-text-body-2-font-size);
30
- line-height: var(--g-text-body-2-line-height);
41
+ border-radius: var(--g-focus-border-radius);
42
+ }
43
+ .pc-price-details__foldable_title:focus {
44
+ outline: 2px solid var(--g-color-line-focus);
45
+ outline-offset: 0;
46
+ }
47
+ .pc-price-details__foldable_title:focus:not(:focus-visible) {
48
+ outline: 0;
31
49
  }
32
50
  .pc-price-details__foldable_title_color_cornflower {
33
51
  color: var(--g-color-text-link);
@@ -26,7 +26,7 @@ const PriceDetails = (props) => {
26
26
  return React.createElement("div", { className: b('foldable_block') }, getPriceDetails());
27
27
  };
28
28
  const getFoldableTitle = () => {
29
- return (React.createElement("div", { className: b('foldable_title', { color: foldableColor, size: foldableSize }), onClick: toggleOpen },
29
+ return (React.createElement("button", { className: b('foldable_title', { color: foldableColor, size: foldableSize }), onClick: toggleOpen, "aria-expanded": isOpened },
30
30
  foldableTitle,
31
31
  React.createElement(ToggleArrow, { open: isOpened, size: 14, type: 'vertical', className: b('arrow') })));
32
32
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravity-ui/page-constructor",
3
- "version": "4.28.0-alpha.0",
3
+ "version": "4.28.1",
4
4
  "description": "Gravity UI Page Constructor",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -104,7 +104,7 @@
104
104
  },
105
105
  "peerDependencies": {
106
106
  "@doc-tools/transform": "^3.3.2",
107
- "@gravity-ui/uikit": "^5.4.1",
107
+ "@gravity-ui/uikit": "^5.12.0",
108
108
  "react": "^16.0.0 || ^17.0.0 || ^18.0.0"
109
109
  },
110
110
  "devDependencies": {
@@ -120,7 +120,7 @@
120
120
  "@gravity-ui/prettier-config": "^1.0.1",
121
121
  "@gravity-ui/stylelint-config": "^1.0.0",
122
122
  "@gravity-ui/tsconfig": "^1.0.0",
123
- "@gravity-ui/uikit": "^5.9.1",
123
+ "@gravity-ui/uikit": "^5.12.2",
124
124
  "@storybook/addon-actions": "^7.1.0",
125
125
  "@storybook/addon-essentials": "^7.1.0",
126
126
  "@storybook/addon-knobs": "^7.0.2",
@@ -1,4 +1,3 @@
1
1
  export type ArrowDirection = 'left' | 'right';
2
- export interface ReactPlayerBlockHandler {
3
- pause: () => void;
2
+ export interface ReactPlayerBlockHandler extends Pick<HTMLVideoElement, 'play' | 'pause' | 'addEventListener'> {
4
3
  }
@@ -103,6 +103,7 @@ export interface HeaderBlockProps {
103
103
  offset?: HeaderOffset;
104
104
  image?: ThemedImage;
105
105
  video?: ThemedMediaVideoProps;
106
+ mediaView?: 'fit' | 'full';
106
107
  background?: ThemedHeaderBlockBackground;
107
108
  theme?: 'light' | 'dark';
108
109
  verticalOffset?: 's' | 'm' | 'l' | 'xl';
@@ -8,6 +8,26 @@
8
8
  line-height: var(--g-text-#{$name}-line-height);
9
9
  }
10
10
 
11
+ @mixin focusable($offset: 0, $mode: 'outline') {
12
+ @if $mode == 'outline' {
13
+ &:focus {
14
+ outline: 2px solid var(--g-color-line-focus);
15
+ outline-offset: $offset;
16
+ }
17
+ &:focus:not(:focus-visible) {
18
+ outline: 0;
19
+ }
20
+ }
21
+ @if $mode == 'box-shadow' {
22
+ &:focus {
23
+ box-shadow: 0 0 0 2px var(--g-color-line-focus);
24
+ }
25
+ &:focus:not(:focus-visible) {
26
+ box-shadow: none;
27
+ }
28
+ }
29
+ }
30
+
11
31
  @mixin link() {
12
32
  @include islands-focus();
13
33
 
package/styles/root.scss CHANGED
@@ -35,12 +35,18 @@
35
35
  --pc-monochrome-button-background-color-hover
36
36
  );
37
37
 
38
+ // focus color
39
+ --pc-color-line-focus-light: var(--g-color-text-brand);
40
+ --pc-color-line-focus-dark: var(--g-color-text-light-primary);
41
+
38
42
  &_theme_light {
39
43
  @include pc-colors-light;
44
+ --g-color-line-focus: var(--pc-color-line-focus-light);
40
45
  }
41
46
 
42
47
  &_theme_dark {
43
48
  @include pc-colors-dark;
49
+ --g-color-line-focus: var(--pc-color-line-focus-dark);
44
50
  }
45
51
 
46
52
  &.g-root_theme_dark {
package/styles/styles.css CHANGED
@@ -41,7 +41,7 @@ unpredictable css rules order in build */
41
41
  margin: 0 0 12px;
42
42
  }
43
43
  .yfm_constructor.yfm_constructor p strong {
44
- font-weight: 500;
44
+ font-weight: var(--g-text-accent-font-weight);
45
45
  }
46
46
  .yfm_constructor.yfm_constructor_size_s ul,
47
47
  .yfm_constructor.yfm_constructor_size_s ol,
@@ -70,6 +70,7 @@ unpredictable css rules order in build */
70
70
  color: var(--g-color-text-link);
71
71
  text-decoration: none;
72
72
  cursor: pointer;
73
+ border-radius: var(--g-focus-border-radius);
73
74
  }
74
75
  .utilityfocus .yfm_constructor a:focus {
75
76
  outline: 2px solid #ffdb4d;
@@ -78,6 +79,12 @@ unpredictable css rules order in build */
78
79
  --pc-text-header-color: var(--g-color-text-link-hover);
79
80
  color: var(--g-color-text-link-hover);
80
81
  }
82
+ .yfm_constructor a:focus {
83
+ box-shadow: 0 0 0 2px var(--g-color-line-focus);
84
+ }
85
+ .yfm_constructor a:focus:not(:focus-visible) {
86
+ box-shadow: none;
87
+ }
81
88
  .yfm_constructor table {
82
89
  color: var(--g-color-text-primary);
83
90
  border: 1px solid var(--g-color-line-generic);
package/styles/yfm.scss CHANGED
@@ -49,7 +49,7 @@
49
49
  }
50
50
 
51
51
  p strong {
52
- font-weight: 500;
52
+ font-weight: var(--g-text-accent-font-weight);
53
53
  }
54
54
 
55
55
  &_size_s {
@@ -85,6 +85,8 @@
85
85
 
86
86
  a {
87
87
  @include link();
88
+ @include focusable(0, 'box-shadow');
89
+ border-radius: var(--g-focus-border-radius);
88
90
  }
89
91
 
90
92
  table {