openproject-primer_view_components 0.80.2 → 0.81.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +36 -22
- data/README.md +20 -1
- data/app/assets/javascripts/components/primer/primer.d.ts +1 -0
- data/app/assets/javascripts/lib/primer/forms/character_counter.d.ts +41 -0
- data/app/assets/javascripts/lib/primer/forms/primer_text_area.d.ts +13 -0
- data/app/assets/javascripts/lib/primer/forms/primer_text_field.d.ts +2 -0
- data/app/assets/javascripts/primer_view_components.js +1 -1
- data/app/assets/javascripts/primer_view_components.js.map +1 -1
- data/app/assets/styles/primer_view_components.css +1 -1
- data/app/assets/styles/primer_view_components.css.map +1 -1
- data/app/components/primer/alpha/action_list/item.rb +2 -1
- data/app/components/primer/alpha/auto_complete/auto_complete.html.erb +8 -6
- data/app/components/primer/alpha/select_panel.rb +1 -1
- data/app/components/primer/alpha/select_panel_element.js +1 -1
- data/app/components/primer/alpha/select_panel_element.ts +1 -1
- data/app/components/primer/alpha/stack.rb +1 -0
- data/app/components/primer/alpha/tab_nav.css +1 -1
- data/app/components/primer/alpha/tab_nav.css.json +1 -0
- data/app/components/primer/alpha/tab_nav.css.map +1 -1
- data/app/components/primer/alpha/tab_nav.pcss +7 -1
- data/app/components/primer/alpha/text_area.rb +1 -0
- data/app/components/primer/alpha/text_field.rb +1 -0
- data/app/components/primer/alpha/toggle_switch.html.erb +2 -2
- data/app/components/primer/alpha/tool_tip.js +12 -5
- data/app/components/primer/alpha/tool_tip.ts +14 -5
- data/app/components/primer/beta/auto_complete/item.html.erb +5 -4
- data/app/components/primer/beta/avatar.rb +4 -0
- data/app/components/primer/beta/avatar_stack.rb +6 -0
- data/app/components/primer/beta/blankslate.css +1 -1
- data/app/components/primer/beta/blankslate.css.map +1 -1
- data/app/components/primer/beta/blankslate.pcss +2 -0
- data/app/components/primer/beta/spinner.html.erb +2 -2
- data/app/components/primer/primer.d.ts +1 -0
- data/app/components/primer/primer.js +1 -0
- data/app/components/primer/primer.ts +1 -0
- data/app/controllers/primer/view_components/toggle_switch_controller.rb +2 -2
- data/app/forms/check_box_with_nested_form.rb +9 -5
- data/app/forms/text_area_with_character_limit_form.rb +13 -0
- data/app/forms/text_field_with_character_limit_form.rb +13 -0
- data/app/lib/primer/forms/caption.html.erb +16 -9
- data/app/lib/primer/forms/character_counter.d.ts +41 -0
- data/app/lib/primer/forms/character_counter.js +114 -0
- data/app/lib/primer/forms/character_counter.ts +129 -0
- data/app/lib/primer/forms/check_box.rb +28 -0
- data/app/lib/primer/forms/dsl/input.rb +23 -0
- data/app/lib/primer/forms/dsl/multi_input.rb +3 -1
- data/app/lib/primer/forms/dsl/text_area_input.rb +12 -1
- data/app/lib/primer/forms/dsl/text_field_input.rb +11 -1
- data/app/lib/primer/forms/form_control.html.erb +2 -1
- data/app/lib/primer/forms/primer_text_area.d.ts +13 -0
- data/app/lib/primer/forms/primer_text_area.js +53 -0
- data/app/lib/primer/forms/primer_text_area.ts +37 -0
- data/app/lib/primer/forms/primer_text_field.d.ts +2 -0
- data/app/lib/primer/forms/primer_text_field.js +16 -2
- data/app/lib/primer/forms/primer_text_field.ts +16 -3
- data/app/lib/primer/forms/text_area.html.erb +6 -4
- data/app/lib/primer/forms/text_field.html.erb +1 -1
- data/app/lib/primer/forms/text_field.rb +8 -0
- data/lib/primer/accessibility.rb +9 -3
- data/lib/primer/view_components/engine.rb +1 -4
- data/lib/primer/view_components/version.rb +2 -2
- data/previews/primer/alpha/action_menu_preview/submitting_forms.html.erb +1 -1
- data/previews/primer/alpha/form_control_preview/playground.html.erb +4 -2
- data/previews/primer/alpha/octicon_symbols_preview/playground.html.erb +1 -1
- data/previews/primer/alpha/overlay_preview.rb +0 -25
- data/previews/primer/alpha/text_area_preview.rb +29 -8
- data/previews/primer/alpha/text_field_preview.rb +34 -4
- data/previews/primer/alpha/toggle_switch_preview.rb +14 -14
- data/previews/primer/alpha/tree_view_preview/loading_failure.html.erb +53 -1
- data/previews/primer/alpha/tree_view_preview/stress_test.html.erb +43 -0
- data/previews/primer/beta/button_preview/all_schemes.html.erb +1 -1
- data/previews/primer/beta/button_preview/invisible_all_visuals.html.erb +1 -1
- data/previews/primer/beta/button_preview/summary_as_button.html.erb +10 -1
- data/previews/primer/forms_preview/text_area_with_character_limit_form.html.erb +3 -0
- data/previews/primer/forms_preview/text_field_with_character_limit_form.html.erb +3 -0
- data/previews/primer/forms_preview.rb +6 -0
- data/static/arguments.json +13 -1
- data/static/form_previews.json +10 -0
- data/static/info_arch.json +106 -15
- data/static/previews.json +93 -14
- metadata +15 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2c813bdcce5915a2ad3d7f21a6676c2c31a2670b7b4e63db3bb1f7126ee7a232
|
|
4
|
+
data.tar.gz: 5c3ee4520768f61af4229e796f55ef9de57103c9d8dd4b97ad2b0939d4b05a5b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3d83d7b2203873e487fef34b6e8092949b1857d33edb9efcea0b0c5d7fbfb2cbdde25cf14c43fdb7ee5aa32304740958f5cc603161f8ec3f6ca88df3c13a0a2c
|
|
7
|
+
data.tar.gz: 1c52e3374e57c26fb38a8609b4afe3fbaff23a2e5e0c91f7b386bd144189033a3c96d95998e6fb93c62320d1eff1212115a50a8c3ef40d200ed37ee77f3729c9
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,41 @@
|
|
|
1
1
|
# CHANGELOG
|
|
2
2
|
|
|
3
|
+
## 0.81.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#3864](https://github.com/primer/view_components/pull/3864) [`5d6e909`](https://github.com/opf/primer_view_components/commit/5d6e9091133d6937c77377e63fe0715a8f87575f) Thanks [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)! - Add `none` gap option to Stack component for parity with Primer React
|
|
8
|
+
|
|
9
|
+
- [#3879](https://github.com/primer/view_components/pull/3879) [`c0db703`](https://github.com/opf/primer_view_components/commit/c0db7037adcafb04e5642703f049874be3083531) Thanks [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)! - Allow localization of TextField clear button aria-label
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#3878](https://github.com/primer/view_components/pull/3878) [`4e702c8`](https://github.com/opf/primer_view_components/commit/4e702c871ed1af3d5eb6236028ad97704996800d) Thanks [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)! - Fix generated field ids to remove brackets
|
|
14
|
+
|
|
15
|
+
- [#3898](https://github.com/primer/view_components/pull/3898) [`f9fd6c8`](https://github.com/opf/primer_view_components/commit/f9fd6c83c98ea95d79ae2d4857865e26d2b32667) Thanks [@joelhawksley](https://github.com/joelhawksley)! - Fix deprecation warning for Rails 9
|
|
16
|
+
|
|
17
|
+
- [#3881](https://github.com/primer/view_components/pull/3881) [`536345e`](https://github.com/opf/primer_view_components/commit/536345e4569ca0ff89b32600470257fccadd60b0) Thanks [@llastflowers](https://github.com/llastflowers)! - Add unique ids on each textarea to fix announcement issues
|
|
18
|
+
|
|
19
|
+
- [#3874](https://github.com/primer/view_components/pull/3874) [`5c2982d`](https://github.com/opf/primer_view_components/commit/5c2982d09e13c327d3c8face322f3185a827be45) Thanks [@llastflowers](https://github.com/llastflowers)! - Give inputs unique ids so that SR doesn't skip Label announcement
|
|
20
|
+
|
|
21
|
+
- [#3892](https://github.com/primer/view_components/pull/3892) [`e187c55`](https://github.com/opf/primer_view_components/commit/e187c55eaf6b37d840bcc34446254b23c439e7fd) Thanks [@llastflowers](https://github.com/llastflowers)! - Add group label for checkboxes in CheckBoxWithNestedForm Lookbook story
|
|
22
|
+
|
|
23
|
+
- [#3880](https://github.com/primer/view_components/pull/3880) [`2001888`](https://github.com/opf/primer_view_components/commit/2001888f9464a7d599252d8495ddcb812c0305e3) Thanks [@liuliu-dev](https://github.com/liuliu-dev)! - Fix overlapping issue in TabNav at narrow viewports.
|
|
24
|
+
|
|
25
|
+
- [#3877](https://github.com/primer/view_components/pull/3877) [`f51244e`](https://github.com/opf/primer_view_components/commit/f51244eef26f70545cc4b4a6ec8d8ee3fba3c51a) Thanks [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)! - Fix Primer::FormHelper compatibility with Rails 7+ config
|
|
26
|
+
|
|
27
|
+
- [#3875](https://github.com/primer/view_components/pull/3875) [`6971d77`](https://github.com/opf/primer_view_components/commit/6971d773e3f0f574fd94d50a6bf7efa957a4bc7c) Thanks [@liuliu-dev](https://github.com/liuliu-dev)! - Fixed SelectPanel multiselect accessibility: Use `aria-selected` instead of `aria-checked` for listbox option items.
|
|
28
|
+
|
|
29
|
+
- [#3866](https://github.com/primer/view_components/pull/3866) [`391e438`](https://github.com/opf/primer_view_components/commit/391e438715514c41c24648c7abeb27f18f72ed35) Thanks [@llastflowers](https://github.com/llastflowers)! - Make link distinguishable from surrounding text with underline styling
|
|
30
|
+
|
|
31
|
+
- [#3899](https://github.com/primer/view_components/pull/3899) [`8d9ceef`](https://github.com/opf/primer_view_components/commit/8d9ceefe28d1ced522056e1f03475fb28ec48b91) Thanks [@llastflowers](https://github.com/llastflowers)! - Generate unique labels for all form control inputs in previews
|
|
32
|
+
|
|
33
|
+
- [#3893](https://github.com/primer/view_components/pull/3893) [`024dc7e`](https://github.com/opf/primer_view_components/commit/024dc7e3647ec37253fde72d0d8c09caab512de6) Thanks [@liuliu-dev](https://github.com/liuliu-dev)! - Always use `aria-selected` for ActionList items with role="option".
|
|
34
|
+
|
|
35
|
+
- [#413](https://github.com/opf/primer_view_components/pull/413) [`d342d8d`](https://github.com/opf/primer_view_components/commit/d342d8dc2d2739d122693b42e2b1b61aebee145b) Thanks [@HDinger](https://github.com/HDinger)! - Limit the max width of description texts in Primer::Beta::Blankslate
|
|
36
|
+
|
|
37
|
+
- [#3867](https://github.com/primer/view_components/pull/3867) [`453041c`](https://github.com/opf/primer_view_components/commit/453041c579bb90e54e5075951b345d8f2037f4ef) Thanks [@llastflowers](https://github.com/llastflowers)! - Add SR announcement in Summary As Button story
|
|
38
|
+
|
|
3
39
|
## 0.80.2
|
|
4
40
|
|
|
5
41
|
### Patch Changes
|
|
@@ -480,7 +516,6 @@
|
|
|
480
516
|
|
|
481
517
|
- [#234](https://github.com/opf/primer_view_components/pull/234) [`cdb335c`](https://github.com/opf/primer_view_components/commit/cdb335ce1d5caad3cde8d4ee945461516f229577) Thanks [@myabc](https://github.com/myabc)! - [#60588] Implementation of Danger Dialog, a generalised dialog for "potentially dangerous" actions such as item deletion.
|
|
482
518
|
There are two variants:
|
|
483
|
-
|
|
484
519
|
1. **the default (or "warning") variant**, requiring the user to click the dialog confirmation button to continue.
|
|
485
520
|
2. **the second confirmation variant**, which requires the user to check a check box AND click confirm to continue with the operation.
|
|
486
521
|
|
|
@@ -771,7 +806,6 @@
|
|
|
771
806
|
- [#2983](https://github.com/primer/view_components/pull/2983) [`5d68193`](https://github.com/opf/primer_view_components/commit/5d681938247c4a957d62b05c2560fef24195ff51) Thanks [@keithamus](https://github.com/keithamus)! - Ensure ActionMenu restores focus on close of a dialog, if a menu item opened that dialog
|
|
772
807
|
|
|
773
808
|
- [#3010](https://github.com/primer/view_components/pull/3010) [`ebab85a`](https://github.com/opf/primer_view_components/commit/ebab85a3a3d2644079aaf495fd1e6689b89f713b) Thanks [@camertron](https://github.com/camertron)! - Fixes several SelectPanel bugs:
|
|
774
|
-
|
|
775
809
|
1. If multiple server-rendered items are checked, the panel will only show one item checked.
|
|
776
810
|
2. If no `data-value` attributes are provided, panels in single-select mode will allow multiple items to be checked.
|
|
777
811
|
|
|
@@ -1043,7 +1077,6 @@
|
|
|
1043
1077
|
- [#105](https://github.com/opf/primer_view_components/pull/105) [`a4ab139`](https://github.com/opf/primer_view_components/commit/a4ab1393ef25f4f6f1f0a9bf3ef6e32cb301c5ec) Thanks [@HDinger](https://github.com/HDinger)! - Fine-tuning of PageHeader component (spacings, size, font-weight)
|
|
1044
1078
|
|
|
1045
1079
|
- [#2751](https://github.com/primer/view_components/pull/2751) [`b1fef3c`](https://github.com/opf/primer_view_components/commit/b1fef3cf8ae547241b4d63fde81bc6c127fbd862) Thanks [@langermank](https://github.com/langermank)! - - Add `label_wrap` param to `Beta::Button`
|
|
1046
|
-
|
|
1047
1080
|
- Bug fix: text overflows in SegmentedControl instead of ellipses
|
|
1048
1081
|
|
|
1049
1082
|
- [#2765](https://github.com/primer/view_components/pull/2765) [`1857983`](https://github.com/opf/primer_view_components/commit/1857983591752336d34133c83af3c8cfe232f1af) Thanks [@camertron](https://github.com/camertron)! - Fix issue preventing expansion and collapse of nav list items with tooltips
|
|
@@ -1071,7 +1104,6 @@
|
|
|
1071
1104
|
### Minor Changes
|
|
1072
1105
|
|
|
1073
1106
|
- [#96](https://github.com/opf/primer_view_components/pull/96) [`f52bbfa`](https://github.com/opf/primer_view_components/commit/f52bbfafcba707bd24e76495e84dc9e5128b0284) Thanks [@HDinger](https://github.com/HDinger)! - \* Add support for Dialogs inside the Primer::OpenProject::PageHeader component
|
|
1074
|
-
|
|
1075
1107
|
- Limit the number of allowed actions to 5
|
|
1076
1108
|
|
|
1077
1109
|
- [#69](https://github.com/opf/primer_view_components/pull/69) [`81bb4b7`](https://github.com/opf/primer_view_components/commit/81bb4b7f746da1e076d085387a4ef2000067b946) Thanks [@bsatarnejad](https://github.com/bsatarnejad)! - Add `Primer::OpenProject::ZenModeButton` component. By clicking on the button, screen will be in full-mode or back in normal-mode.
|
|
@@ -1107,7 +1139,6 @@
|
|
|
1107
1139
|
- [#2603](https://github.com/primer/view_components/pull/2603) [`bbc1776`](https://github.com/opf/primer_view_components/commit/bbc1776b44e089516658aa76d2fec3724a4dccfc) Thanks [@langermank](https://github.com/langermank)! - Tooltip visual refresh to match Primer React
|
|
1108
1140
|
|
|
1109
1141
|
- [#89](https://github.com/opf/primer_view_components/pull/89) [`0d06bec`](https://github.com/opf/primer_view_components/commit/0d06bec7224ad70c071586f5884b2ef8692237dc) Thanks [@HDinger](https://github.com/HDinger)! - Changes `Primer::OpenProject::PageHeader`:
|
|
1110
|
-
|
|
1111
1142
|
- Remove the `context_bar_actions` slot
|
|
1112
1143
|
- Make `breadcrumbs` required
|
|
1113
1144
|
- Remove the `parent_link` slot (will be derived automatically from the breadcrumb)
|
|
@@ -1127,7 +1158,6 @@
|
|
|
1127
1158
|
- [#2627](https://github.com/primer/view_components/pull/2627) [`226481e`](https://github.com/opf/primer_view_components/commit/226481e51e8c459dcd6d2a49d57c5005a8103aff) Thanks [@camertron](https://github.com/camertron)! - Support `<select>` elements that allow selecting multiple values
|
|
1128
1159
|
|
|
1129
1160
|
- [#2689](https://github.com/primer/view_components/pull/2689) [`a7f7dad`](https://github.com/opf/primer_view_components/commit/a7f7dad6170afc1dea1071639b5beb3aa20b7918) Thanks [@langermank](https://github.com/langermank)! - - Bug fix: inactive button colors
|
|
1130
|
-
|
|
1131
1161
|
- Bug fix: double border/box-shadow on popover and dropdown
|
|
1132
1162
|
- Bug fix: text color for primary button in dark dimmed
|
|
1133
1163
|
|
|
@@ -1278,7 +1308,6 @@
|
|
|
1278
1308
|
- [#2426](https://github.com/primer/view_components/pull/2426) [`78dd9dd`](https://github.com/opf/primer_view_components/commit/78dd9ddb70ee5ade30e243968c87364a80ff1325) Thanks [@camertron](https://github.com/camertron)! - Fix typo in argument passed to event listener in ToolTip
|
|
1279
1309
|
|
|
1280
1310
|
- [#2379](https://github.com/primer/view_components/pull/2379) [`2c59c33`](https://github.com/opf/primer_view_components/commit/2c59c33bf54e392d743fbdd1076d06bff2151b42) Thanks [@mperrotti](https://github.com/mperrotti)! - Updates 'inactive' state for buttons based on feedback from the a11y team:
|
|
1281
|
-
|
|
1282
1311
|
- inactive buttons need to meet the color contrast ratio minimum
|
|
1283
1312
|
- inactive buttons shouldn't have aria-disabled since they can still accept interactions such as:
|
|
1284
1313
|
- hover/focus to show a tooltip
|
|
@@ -1362,7 +1391,6 @@
|
|
|
1362
1391
|
- [#48](https://github.com/opf/primer_view_components/pull/48) [`102a2ee9`](https://github.com/opf/primer_view_components/commit/102a2ee9fe7b6a049906ca108607c38e3468d0ae) Thanks [@apfohl](https://github.com/apfohl)! - Added a "width" attribute to control how wide an input is rendered on screen.
|
|
1363
1392
|
|
|
1364
1393
|
It is active for:
|
|
1365
|
-
|
|
1366
1394
|
- TextField
|
|
1367
1395
|
- Select
|
|
1368
1396
|
|
|
@@ -1393,7 +1421,6 @@
|
|
|
1393
1421
|
### Minor Changes
|
|
1394
1422
|
|
|
1395
1423
|
- [#2284](https://github.com/primer/view_components/pull/2284) [`374d10fd`](https://github.com/opf/primer_view_components/commit/374d10fd18e7371f49abf75dde135c3ed29fe33d) Thanks [@langermank](https://github.com/langermank)! - Update tooltip design
|
|
1396
|
-
|
|
1397
1424
|
- Removes caret
|
|
1398
1425
|
- Decrease offset
|
|
1399
1426
|
- Remove animation delay
|
|
@@ -1436,7 +1463,6 @@
|
|
|
1436
1463
|
### Minor Changes
|
|
1437
1464
|
|
|
1438
1465
|
- [#36](https://github.com/opf/primer_view_components/pull/36) [`cfa8b633`](https://github.com/opf/primer_view_components/commit/cfa8b633d7718abdb6ca5a54389fff542951c4d4) Thanks [@HDinger](https://github.com/HDinger)! - - Add FlexLayout Component
|
|
1439
|
-
|
|
1440
1466
|
- Add GridLayout Component
|
|
1441
1467
|
|
|
1442
1468
|
<!-- Changed components: Primer::OpenProject::FlexLayout, Primer::OpenProject::GridLayout -->
|
|
@@ -1464,7 +1490,6 @@
|
|
|
1464
1490
|
<!-- Changed components: _none_ -->
|
|
1465
1491
|
|
|
1466
1492
|
- [#2250](https://github.com/primer/view_components/pull/2250) [`66c4dd69`](https://github.com/opf/primer_view_components/commit/66c4dd6936b386caa42868beef9ea1b33f84b11b) Thanks [@langermank](https://github.com/langermank)! - - Improve contrast for icons in `invisible` button on hover in dark mode (within v8 colors)
|
|
1467
|
-
|
|
1468
1493
|
- Fix disabled button styles (v8 colors)
|
|
1469
1494
|
- Bump Primitives to latest
|
|
1470
1495
|
|
|
@@ -1551,7 +1576,6 @@
|
|
|
1551
1576
|
### Minor Changes
|
|
1552
1577
|
|
|
1553
1578
|
- [#22](https://github.com/opf/primer_view_components/pull/22) [`ebbe8d5e`](https://github.com/opf/primer_view_components/commit/ebbe8d5e8a616799b9c8b54c0f263a2f43720d1f) Thanks [@oliverguenther](https://github.com/oliverguenther)! -
|
|
1554
|
-
|
|
1555
1579
|
- Add OpenProject status for custom components
|
|
1556
1580
|
- Add PageHeader component
|
|
1557
1581
|
|
|
@@ -2236,7 +2260,6 @@
|
|
|
2236
2260
|
- [#1632](https://github.com/primer/view_components/pull/1632) [`7f1181be`](https://github.com/primer/view_components/commit/7f1181be49960337254db834e9b2b9a5fdb7b0b8) Thanks [@camertron](https://github.com/camertron)! - Improve performance of the deny\_\* methods
|
|
2237
2261
|
|
|
2238
2262
|
* [#1625](https://github.com/primer/view_components/pull/1625) [`3af9bf5e`](https://github.com/primer/view_components/commit/3af9bf5e778bb1fe475ed7efda9fc1a5ed36d695) Thanks [@jonrohan](https://github.com/jonrohan)! - Deprecate components and moving to new namespace:
|
|
2239
|
-
|
|
2240
2263
|
- Primer::Dropdown moving to Primer::Alpha::Dropdown
|
|
2241
2264
|
- Primer::Dropdown::Menu moving to Primer::Alpha::Dropdown::Menu
|
|
2242
2265
|
- Primer::Dropdown::Menu::Item moving to Primer::Alpha::Dropdown::Menu::Item
|
|
@@ -3054,7 +3077,6 @@
|
|
|
3054
3077
|
_Manuel Puyol_
|
|
3055
3078
|
|
|
3056
3079
|
- Change spacing in `Blankslate`:
|
|
3057
|
-
|
|
3058
3080
|
- Between `description` and `primary_action` to `32px`.
|
|
3059
3081
|
- Between `primary_action` and `secondary_action` to `16px`.
|
|
3060
3082
|
|
|
@@ -3412,7 +3434,6 @@
|
|
|
3412
3434
|
_Manuel Puyol_
|
|
3413
3435
|
|
|
3414
3436
|
- Linters can:
|
|
3415
|
-
|
|
3416
3437
|
- convert values with ERB interpolations.
|
|
3417
3438
|
- autocorrect cases with custom classes.
|
|
3418
3439
|
|
|
@@ -3527,7 +3548,6 @@
|
|
|
3527
3548
|
_Kate Higa_
|
|
3528
3549
|
|
|
3529
3550
|
- Renames:
|
|
3530
|
-
|
|
3531
3551
|
- `Primer::AvatarStackComponent` to `Primer::Beta::AvatarStack`.
|
|
3532
3552
|
|
|
3533
3553
|
_Manuel Puyol_
|
|
@@ -3569,7 +3589,6 @@
|
|
|
3569
3589
|
_Kate Higa_
|
|
3570
3590
|
|
|
3571
3591
|
- Renames:
|
|
3572
|
-
|
|
3573
3592
|
- `Primer::AutoComplete` to `Primer::Beta::AutoComplete`
|
|
3574
3593
|
- `Primer::AutoComplete::Item` to `Primer::Beta::AutoComplete::Item`
|
|
3575
3594
|
- `Primer::AvatarComponent` to `Primer::Beta::Avatar`
|
|
@@ -3713,7 +3732,6 @@
|
|
|
3713
3732
|
_Kate Higa_
|
|
3714
3733
|
|
|
3715
3734
|
- Renames:
|
|
3716
|
-
|
|
3717
3735
|
- `DropdownComponent` to `Dropdown`.
|
|
3718
3736
|
- `Dropdown::MenuComponent` to `Dropdown::Menu`.
|
|
3719
3737
|
- `Primer::ButtonMarketingComponent` to `Primer::Alpha::ButtonMarketing`.
|
|
@@ -4171,7 +4189,6 @@
|
|
|
4171
4189
|
_Simon Taranto_
|
|
4172
4190
|
|
|
4173
4191
|
- Update `LinkComponent`:
|
|
4174
|
-
|
|
4175
4192
|
- use `Link--muted` instead of `muted-link`.
|
|
4176
4193
|
- accept `variant` and `underline` options.
|
|
4177
4194
|
- accept `:span` as a tag.
|
|
@@ -4481,7 +4498,6 @@
|
|
|
4481
4498
|
|
|
4482
4499
|
- Add support for box_shadow
|
|
4483
4500
|
- Add components:
|
|
4484
|
-
|
|
4485
4501
|
- Popover
|
|
4486
4502
|
|
|
4487
4503
|
_Sarah Vessels_
|
|
@@ -4503,7 +4519,6 @@
|
|
|
4503
4519
|
_Joel Hawksley_
|
|
4504
4520
|
|
|
4505
4521
|
- Add components:
|
|
4506
|
-
|
|
4507
4522
|
- Avatar
|
|
4508
4523
|
- Blankslate
|
|
4509
4524
|
|
|
@@ -4524,7 +4539,6 @@
|
|
|
4524
4539
|
_Manuel Puyol_
|
|
4525
4540
|
|
|
4526
4541
|
- Add components:
|
|
4527
|
-
|
|
4528
4542
|
- BorderBox
|
|
4529
4543
|
- Box
|
|
4530
4544
|
- Breadcrumb
|
data/README.md
CHANGED
|
@@ -2,7 +2,24 @@
|
|
|
2
2
|
|
|
3
3
|
<p align="center">Fork of ViewComponents for the Primer Design System used for OpenProject.</p>
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
> [!WARNING]
|
|
6
|
+
> As part of GitHub’s move to React-based interfaces, Primer ViewComponents is in maintenance mode as of February 2026.
|
|
7
|
+
>
|
|
8
|
+
> Maintenance mode means:
|
|
9
|
+
>
|
|
10
|
+
> * this project is **not accepting new features, components, or significant enhancements.**
|
|
11
|
+
> * the Primer team at GitHub will continue providing:
|
|
12
|
+
> * Security updates
|
|
13
|
+
> * Dependency bumps
|
|
14
|
+
> * Critical/P0 bug fixes
|
|
15
|
+
> * issues, PRs, and discussions / community Q&A remain open, but maintainer response is not guaranteed
|
|
16
|
+
The Primer team continues to focus its resources on strategic investments that help GitHub and its customers to be successful, while making developers’ lives easier. The Primer design system remains a part of this vision through [guidance](https://primer.style/product/ui-patterns/), [tooling](https://primer.style/product/getting-started/react/), and ready-to-use [React](https://primer.style/product/components/) and [web components](https://github.com/github/github-elements).
|
|
17
|
+
>
|
|
18
|
+
> We encourage internal GitHub consumers to plan to migrate from Primer ViewComponents to [Primer React](https://github.com/primer/react).
|
|
19
|
+
>
|
|
20
|
+
> Non-GitHub consumers should consider forking and maintaining a copy of this repo.
|
|
21
|
+
>
|
|
22
|
+
> Questions may be posted on the [maintenance mode announcement](https://github.com/primer/view_components/discussions/3908). Thank you for your support and interest!
|
|
6
23
|
|
|
7
24
|
## Contribution
|
|
8
25
|
|
|
@@ -25,6 +42,8 @@ Primer already provides us with a lot of automation and an advanced test setup.
|
|
|
25
42
|
|
|
26
43
|
Visit [https://primer.style/view_components/](https://primer.style/design/components/) to view the documentation of the Primer ViewComponents.
|
|
27
44
|
|
|
45
|
+
_Note: This library is under active pre-1.0 development. Breaking changes are likely in patch releases._
|
|
46
|
+
|
|
28
47
|
## License
|
|
29
48
|
|
|
30
49
|
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
|
@@ -22,6 +22,7 @@ import './beta/relative_time';
|
|
|
22
22
|
import './alpha/tab_container';
|
|
23
23
|
import '../../lib/primer/forms/primer_multi_input';
|
|
24
24
|
import '../../lib/primer/forms/primer_text_field';
|
|
25
|
+
import '../../lib/primer/forms/primer_text_area';
|
|
25
26
|
import '../../lib/primer/forms/toggle_switch_input';
|
|
26
27
|
import './alpha/action_menu/action_menu_element';
|
|
27
28
|
import './alpha/select_panel_element';
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared character counting functionality for text inputs with character limits.
|
|
3
|
+
* Handles real-time character count updates, validation, and aria-live announcements.
|
|
4
|
+
*/
|
|
5
|
+
export declare class CharacterCounter {
|
|
6
|
+
private inputElement;
|
|
7
|
+
private characterLimitElement;
|
|
8
|
+
private characterLimitSrElement;
|
|
9
|
+
private SCREEN_READER_DELAY;
|
|
10
|
+
private announceTimeout;
|
|
11
|
+
private isInitialLoad;
|
|
12
|
+
constructor(inputElement: HTMLInputElement | HTMLTextAreaElement, characterLimitElement: HTMLElement, characterLimitSrElement: HTMLElement);
|
|
13
|
+
/**
|
|
14
|
+
* Initialize character counting by setting up event listener and initial count
|
|
15
|
+
*/
|
|
16
|
+
initialize(signal?: AbortSignal): void;
|
|
17
|
+
/**
|
|
18
|
+
* Clean up any pending timeouts
|
|
19
|
+
*/
|
|
20
|
+
cleanup(): void;
|
|
21
|
+
/**
|
|
22
|
+
* Pluralizes a word based on the count
|
|
23
|
+
*/
|
|
24
|
+
private pluralize;
|
|
25
|
+
/**
|
|
26
|
+
* Update the character count display and validation state
|
|
27
|
+
*/
|
|
28
|
+
private updateCharacterCount;
|
|
29
|
+
/**
|
|
30
|
+
* Announce character count to screen readers with debouncing
|
|
31
|
+
*/
|
|
32
|
+
private announceToScreenReader;
|
|
33
|
+
/**
|
|
34
|
+
* Set error when character limit is exceeded
|
|
35
|
+
*/
|
|
36
|
+
private setError;
|
|
37
|
+
/**
|
|
38
|
+
* Clear error when back under character limit
|
|
39
|
+
*/
|
|
40
|
+
private clearError;
|
|
41
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare class PrimerTextAreaElement extends HTMLElement {
|
|
2
|
+
#private;
|
|
3
|
+
inputElement: HTMLTextAreaElement;
|
|
4
|
+
characterLimitElement: HTMLElement;
|
|
5
|
+
characterLimitSrElement: HTMLElement;
|
|
6
|
+
connectedCallback(): void;
|
|
7
|
+
disconnectedCallback(): void;
|
|
8
|
+
}
|
|
9
|
+
declare global {
|
|
10
|
+
interface Window {
|
|
11
|
+
PrimerTextAreaElement: typeof PrimerTextAreaElement;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -15,6 +15,8 @@ export declare class PrimerTextFieldElement extends HTMLElement {
|
|
|
15
15
|
validationErrorIcon: HTMLElement;
|
|
16
16
|
leadingVisual: HTMLElement;
|
|
17
17
|
leadingSpinner: HTMLElement;
|
|
18
|
+
characterLimitElement: HTMLElement;
|
|
19
|
+
characterLimitSrElement: HTMLElement;
|
|
18
20
|
connectedCallback(): void;
|
|
19
21
|
disconnectedCallback(): void;
|
|
20
22
|
clearContents(): void;
|