primer_view_components 0.0.108 → 0.0.110

Sign up to get free protection for your applications and to get access to all the features.
Files changed (101) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +38 -0
  3. data/app/assets/javascripts/primer_view_components.js +1 -1
  4. data/app/assets/javascripts/primer_view_components.js.map +1 -1
  5. data/app/assets/styles/primer_view_components.css +1 -1
  6. data/app/assets/styles/primer_view_components.css.map +1 -1
  7. data/app/components/primer/alpha/action_list.css.json +1 -1
  8. data/app/components/primer/{beta → alpha}/banner.css +0 -0
  9. data/app/components/primer/alpha/banner.css.json +1 -0
  10. data/app/components/primer/{beta → alpha}/banner.css.map +1 -1
  11. data/app/components/primer/{beta → alpha}/banner.html.erb +2 -2
  12. data/app/components/primer/{beta → alpha}/banner.pcss +1 -0
  13. data/app/components/primer/{beta → alpha}/banner.rb +14 -15
  14. data/app/components/primer/alpha/dialog.rb +0 -1
  15. data/app/components/primer/alpha/segmented_control/item.rb +1 -1
  16. data/app/components/primer/alpha/segmented_control.css.json +1 -1
  17. data/app/components/primer/alpha/segmented_control.css.map +1 -1
  18. data/app/components/primer/alpha/segmented_control.pcss +1 -0
  19. data/app/components/primer/alpha/toggle_switch.css +1 -0
  20. data/app/components/primer/alpha/toggle_switch.css.json +1 -0
  21. data/app/components/primer/alpha/toggle_switch.css.map +1 -0
  22. data/app/components/primer/alpha/toggle_switch.pcss +244 -0
  23. data/app/components/primer/{beta → alpha}/x_banner.d.ts +1 -3
  24. data/app/components/primer/{beta → alpha}/x_banner.js +2 -4
  25. data/app/components/primer/{beta → alpha}/x_banner.ts +2 -3
  26. data/app/components/primer/beta/blankslate.css +1 -0
  27. data/app/components/primer/beta/blankslate.css.json +1 -0
  28. data/app/components/primer/beta/blankslate.css.map +1 -0
  29. data/app/components/primer/beta/blankslate.pcss +90 -0
  30. data/app/components/primer/beta/breadcrumbs.css +1 -0
  31. data/app/components/primer/beta/breadcrumbs.css.json +1 -0
  32. data/app/components/primer/beta/breadcrumbs.css.map +1 -0
  33. data/app/components/primer/beta/breadcrumbs.pcss +30 -0
  34. data/app/components/primer/beta/button.css.json +1 -1
  35. data/app/components/primer/beta/button.css.map +1 -1
  36. data/app/components/primer/beta/button.pcss +0 -4
  37. data/app/components/primer/beta/counter.css +1 -0
  38. data/app/components/primer/beta/counter.css.json +1 -0
  39. data/app/components/primer/beta/counter.css.map +1 -0
  40. data/app/components/primer/beta/counter.pcss +35 -0
  41. data/app/components/primer/beta/label.css +1 -0
  42. data/app/components/primer/beta/label.css.json +1 -0
  43. data/app/components/primer/beta/label.css.map +1 -0
  44. data/app/components/primer/beta/label.pcss +103 -0
  45. data/app/components/primer/beta/progress_bar.css +1 -0
  46. data/app/components/primer/beta/progress_bar.css.json +1 -0
  47. data/app/components/primer/beta/progress_bar.css.map +1 -0
  48. data/app/components/primer/{progress_bar_component.html.erb → beta/progress_bar.html.erb} +0 -0
  49. data/app/components/primer/beta/progress_bar.pcss +26 -0
  50. data/app/components/primer/beta/progress_bar.rb +72 -0
  51. data/app/components/primer/beta/truncate.css +1 -0
  52. data/app/components/primer/beta/truncate.css.json +1 -0
  53. data/app/components/primer/beta/truncate.css.map +1 -0
  54. data/app/components/primer/beta/truncate.pcss +31 -0
  55. data/app/components/primer/primer.d.ts +1 -1
  56. data/app/components/primer/primer.js +1 -1
  57. data/app/components/primer/primer.pcss +12 -2
  58. data/app/components/primer/primer.ts +1 -1
  59. data/app/components/primer/progress_bar_component.rb +2 -65
  60. data/app/components/primer/state_component.css +1 -0
  61. data/app/components/primer/state_component.css.json +1 -0
  62. data/app/components/primer/state_component.css.map +1 -0
  63. data/app/components/primer/state_component.pcss +50 -0
  64. data/app/components/primer/subhead_component.css +1 -0
  65. data/app/components/primer/subhead_component.css.json +1 -0
  66. data/app/components/primer/subhead_component.css.map +1 -0
  67. data/app/components/primer/subhead_component.pcss +49 -0
  68. data/app/components/primer/truncate.css +1 -0
  69. data/app/components/primer/truncate.css.json +1 -0
  70. data/app/components/primer/truncate.css.map +1 -0
  71. data/app/components/primer/truncate.pcss +30 -0
  72. data/app/forms/name_with_question_mark_form/enabled_caption.html.erb +1 -0
  73. data/app/forms/name_with_question_mark_form.rb +11 -0
  74. data/app/lib/primer/css/layout.css +1918 -0
  75. data/app/lib/primer/css/layout.css.json +1 -0
  76. data/app/lib/primer/css/utilities.css +7304 -0
  77. data/app/lib/primer/css/utilities.css.json +1 -0
  78. data/lib/primer/classify/utilities.rb +1 -1
  79. data/lib/primer/deprecations.rb +2 -1
  80. data/lib/primer/forms/base.rb +7 -3
  81. data/lib/primer/view_components/version.rb +1 -1
  82. data/lib/tasks/docs.rake +3 -3
  83. data/lib/tasks/test.rake +8 -0
  84. data/lib/tasks/utilities.rake +3 -18
  85. data/previews/primer/alpha/banner_preview/with_action_button.html.erb +4 -0
  86. data/previews/primer/{beta → alpha}/banner_preview/with_action_content.html.erb +1 -1
  87. data/previews/primer/alpha/banner_preview.rb +97 -0
  88. data/previews/primer/alpha/segmented_control_preview.rb +106 -20
  89. data/previews/primer/beta/counter_preview.rb +55 -8
  90. data/previews/primer/beta/progress_bar_preview.rb +60 -0
  91. data/previews/primer/forms/forms_preview/name_with_question_mark_form.html.erb +3 -0
  92. data/previews/primer/forms/forms_preview.rb +2 -0
  93. data/static/arguments.json +76 -76
  94. data/static/audited_at.json +2 -1
  95. data/static/constants.json +34 -26
  96. data/static/statuses.json +3 -2
  97. metadata +64 -16
  98. data/app/components/primer/beta/banner.css.json +0 -1
  99. data/previews/primer/beta/banner_preview/with_action_button.html.erb +0 -4
  100. data/previews/primer/beta/banner_preview.rb +0 -54
  101. data/previews/primer/progress_bar_component_preview.rb +0 -28
@@ -0,0 +1,49 @@
1
+ /* Subhead */
2
+
3
+ .Subhead {
4
+ display: flex;
5
+ padding-bottom: var(--primer-stack-padding-condensed, 8px);
6
+ margin-bottom: var(--primer-stack-gap-normal, 16px);
7
+ border-bottom: var(--primer-borderWidth-thin, 1px) solid var(--color-border-muted);
8
+ flex-flow: row wrap;
9
+ justify-content: flex-end; /* Keep actions right aligned. */
10
+ }
11
+
12
+ /* Modifier class to give a lot of breathing room between sections of content. */
13
+ .Subhead--spacious {
14
+ margin-top: var(--base-size-40, 40px);
15
+ }
16
+
17
+ /* <h2> sized heading with normal font weight */
18
+ .Subhead-heading {
19
+ font-size: 24px;
20
+ font-weight: var(--base-text-weight-normal, 400);
21
+ flex: 1 1 auto;
22
+ order: 0;
23
+ }
24
+
25
+ /* Make the text bold and red for dangerous content */
26
+ .Subhead-heading--danger {
27
+ font-weight: var(--base-text-weight-semibold, 600);
28
+ color: var(--color-danger-fg);
29
+ }
30
+
31
+ /* One-liner of supporting text */
32
+ .Subhead-description {
33
+ font-size: var(--primer-text-body-size-medium, 14px);
34
+ color: var(--color-fg-muted);
35
+ flex: 1 100%;
36
+ order: 2;
37
+ }
38
+
39
+ /* Add 1 or 2 buttons to the right of the heading */
40
+ .Subhead-actions {
41
+ margin: var(--base-size-4, 4px) 0 var(--base-size-4, 4px) var(--base-size-4, 4px);
42
+ align-self: center;
43
+ justify-content: flex-end;
44
+ order: 1;
45
+
46
+ & + .Subhead-description {
47
+ margin-top: var(--base-size-4, 4px);
48
+ }
49
+ }
@@ -0,0 +1 @@
1
+ .css-truncate .css-truncate-overflow,.css-truncate .css-truncate-target,.css-truncate.css-truncate-overflow,.css-truncate.css-truncate-target{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.css-truncate .css-truncate-target,.css-truncate.css-truncate-target{display:inline-block;max-width:125px;vertical-align:top}.css-truncate.expandable.css-truncate-target:hover,.css-truncate.expandable.zeroclipboard-is-hover .css-truncate-target,.css-truncate.expandable.zeroclipboard-is-hover.css-truncate-target,.css-truncate.expandable:hover .css-truncate-target{max-width:10000px!important}
@@ -0,0 +1 @@
1
+ {"name":"truncate","selectors":[".css-truncate .css-truncate-overflow",".css-truncate .css-truncate-target",".css-truncate.css-truncate-overflow",".css-truncate.css-truncate-target",".css-truncate.expandable.css-truncate-target:hover",".css-truncate.expandable.zeroclipboard-is-hover .css-truncate-target",".css-truncate.expandable.zeroclipboard-is-hover.css-truncate-target",".css-truncate.expandable:hover .css-truncate-target"]}
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["truncate.pcss"],"names":[],"mappings":"AAME,8IAIE,eAAgB,CAChB,sBAAuB,CACvB,kBACF,CAGA,qEAEE,oBAAqB,CACrB,eAAgB,CAChB,kBACF,CAEA,gPAIE,2BACF","file":"truncate.css","sourcesContent":["/* CSS truncate */\n\n/* css-truncate will shorten text with an ellipsis. */\n\n.css-truncate {\n /* css-truncate-overflow will shorten text with an ellipsis when overflowing */\n &.css-truncate-overflow,\n & .css-truncate-overflow,\n &.css-truncate-target,\n & .css-truncate-target {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n /* css-truncate-target will shorten text with an ellipsis and a max width */\n &.css-truncate-target,\n & .css-truncate-target {\n display: inline-block;\n max-width: 125px;\n vertical-align: top;\n }\n\n &.expandable.zeroclipboard-is-hover .css-truncate-target,\n &.expandable.zeroclipboard-is-hover.css-truncate-target,\n &.expandable:hover .css-truncate-target,\n &.expandable:hover.css-truncate-target {\n max-width: 10000px !important;\n }\n}\n"]}
@@ -0,0 +1,30 @@
1
+ /* CSS truncate */
2
+
3
+ /* css-truncate will shorten text with an ellipsis. */
4
+
5
+ .css-truncate {
6
+ /* css-truncate-overflow will shorten text with an ellipsis when overflowing */
7
+ &.css-truncate-overflow,
8
+ & .css-truncate-overflow,
9
+ &.css-truncate-target,
10
+ & .css-truncate-target {
11
+ overflow: hidden;
12
+ text-overflow: ellipsis;
13
+ white-space: nowrap;
14
+ }
15
+
16
+ /* css-truncate-target will shorten text with an ellipsis and a max width */
17
+ &.css-truncate-target,
18
+ & .css-truncate-target {
19
+ display: inline-block;
20
+ max-width: 125px;
21
+ vertical-align: top;
22
+ }
23
+
24
+ &.expandable.zeroclipboard-is-hover .css-truncate-target,
25
+ &.expandable.zeroclipboard-is-hover.css-truncate-target,
26
+ &.expandable:hover .css-truncate-target,
27
+ &.expandable:hover.css-truncate-target {
28
+ max-width: 10000px !important;
29
+ }
30
+ }
@@ -0,0 +1 @@
1
+ <p class="my-test-caption">The caption for Enabled?</p>
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ # :nodoc:
4
+ class NameWithQuestionMarkForm < ApplicationForm
5
+ form do |name_with_question_mark_form|
6
+ name_with_question_mark_form.check_box(
7
+ name: :enabled?,
8
+ label: "Enabled"
9
+ )
10
+ end
11
+ end