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
@@ -1 +1 @@
1
- {"version":3,"sources":["button.pcss","<no source>","../../../../lib/postcss_mixins/focusOutlineOnEmphasis.pcss"],"names":[],"mappings":"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","file":"button.css","sourcesContent":["/* CSS for Button */\n\n/* temporary, pre primitives release */\n:root {\n --primer-duration-fast: 80ms;\n --primer-easing-easeInOut: cubic-bezier(0.65, 0, 0.35, 1);\n}\n\n/* base button */\n.Button {\n position: relative;\n font-size: var(--primer-text-body-size-medium, 14px);\n font-weight: var(--base-text-weight-medium, 500);\n cursor: pointer;\n user-select: none;\n background-color: transparent;\n border: var(--primer-borderWidth-thin, 1px) solid;\n border-color: transparent;\n border-radius: var(--primer-borderRadius-medium, 6px);\n color: var(--color-btn-text);\n transition: var(--primer-duration-fast) var(--primer-easing-easeInOut);\n transition-property: color, fill, background-color, border-color;\n text-align: center;\n height: var(--primer-control-medium-size, 32px);\n padding: 0 var(--primer-control-medium-paddingInline-normal, 12px);\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n gap: var(--primer-control-medium-gap, 8px);\n min-width: max-content;\n\n /* mobile friendly sizing */\n @media (pointer: course) {\n &::before {\n @mixin minTouchTarget 48px, 48px;\n }\n }\n\n /* base states */\n\n &:hover {\n transition-duration: var(--primer-duration-fast);\n }\n\n &:active {\n transition: none;\n }\n\n &:disabled,\n &[aria-disabled='true'] {\n cursor: not-allowed;\n box-shadow: none;\n }\n\n /* &:focus {\n @mixin focusOutline;\n } */\n}\n\n.Button-withTooltip {\n position: relative;\n display: inline-block;\n}\n\na.Button,\nsummary.Button {\n display: inline-flex;\n\n &:hover {\n text-decoration: none;\n }\n}\n\n/* wrap grid content to allow trailingAction to lock-right */\n.Button-content {\n flex: 1 0 auto;\n display: grid;\n grid-template-areas: 'leadingVisual text trailingVisual';\n grid-template-columns: min-content minmax(0, auto) min-content;\n align-items: center;\n place-content: center;\n\n /* padding-bottom: 1px; optical alignment for firefox */\n\n & > :not(:last-child) {\n margin-right: var(--primer-control-medium-gap, 8px);\n }\n}\n\n/* center child elements for fullWidth */\n.Button-content--alignStart {\n justify-content: start;\n}\n\n/* button child elements */\n\n/* align svg */\n.Button-visual {\n display: flex;\n pointer-events: none; /* allow click handler to work, avoiding visuals */\n}\n\n.Button-label {\n grid-area: text;\n white-space: nowrap;\n line-height: var(--primer-text-body-lineHeight-medium, calc(20 / 14));\n}\n\n.Button-leadingVisual {\n grid-area: leadingVisual;\n}\n\n.Button-trailingVisual {\n grid-area: trailingVisual;\n}\n\n.Button-trailingAction {\n margin-right: calc(var(--base-size-4, 4px) * -1);\n}\n\n/* sizes */\n\n.Button--small {\n font-size: var(--primer-text-body-size-small, 12px);\n height: var(--primer-control-small-size, 28px);\n padding: 0 var(--primer-control-small-paddingInline-condensed, 8px);\n gap: var(--primer-control-small-gap, 4px);\n\n & .Button-label {\n line-height: var(--primer-text-body-lineHeight-small, calc(20 / 12));\n }\n\n & .Button-content {\n & > :not(:last-child) {\n margin-right: var(--primer-control-small-gap, 4px);\n }\n }\n}\n\n.Button--large {\n height: var(--primer-control-large-size, 40px);\n padding: 0 var(--primer-control-large-paddingInline-spacious, 16px);\n gap: var(--primer-control-large-gap, 8px);\n\n & .Button-label {\n line-height: var(--primer-text-body-lineHeight-large, calc(48 / 32));\n }\n\n & .Button-content {\n & > :not(:last-child) {\n margin-right: var(--primer-control-large-gap, 8px);\n }\n }\n}\n\n.Button--fullWidth {\n width: 100%;\n}\n\n/* variants */\n\n/* primary */\n.Button--primary {\n color: var(--color-btn-primary-text);\n fill: var(--color-btn-primary-icon);\n background-color: var(--color-btn-primary-bg);\n border-color: var(--color-btn-primary-border);\n box-shadow: var(--color-btn-primary-shadow), var(--color-btn-primary-inset-shadow);\n\n &:hover:not(:disabled) {\n background-color: var(--color-btn-primary-hover-bg);\n border-color: var(--color-btn-primary-hover-border);\n }\n\n /* fallback :focus state */\n &:focus {\n @mixin focusOutlineOnEmphasis;\n\n /* remove fallback :focus if :focus-visible is supported */\n &:not(:focus-visible) {\n outline: solid 1px transparent;\n box-shadow: none;\n }\n }\n\n /* default focus state */\n &:focus-visible {\n @mixin focusOutlineOnEmphasis;\n }\n\n &:active:not(:disabled),\n &[aria-pressed='true'] {\n background-color: var(--color-btn-primary-selected-bg);\n box-shadow: var(--color-btn-primary-selected-shadow);\n }\n\n &:disabled,\n &[aria-disabled='true'] {\n color: var(--color-btn-primary-disabled-text);\n background-color: var(--color-btn-primary-disabled-bg);\n border-color: var(--color-btn-primary-disabled-border);\n fill: var(--color-btn-primary-disabled-text);\n }\n}\n\n/* default (secondary) */\n.Button--secondary {\n color: var(--color-btn-text);\n fill: var(--color-fg-muted); /* help this */\n background-color: var(--color-btn-bg);\n border-color: var(--color-btn-border);\n box-shadow: var(--color-btn-shadow), var(--color-btn-inset-shadow);\n\n &:hover:not(:disabled) {\n background-color: var(--color-btn-hover-bg);\n border-color: var(--color-btn-hover-border);\n }\n\n &:active:not(:disabled) {\n background-color: var(--color-btn-active-bg);\n border-color: var(--color-btn-active-border);\n }\n\n &[aria-pressed='true'] {\n background-color: var(--color-btn-selected-bg);\n box-shadow: var(--color-primer-shadow-inset);\n }\n\n &:disabled,\n &[aria-disabled='true'] {\n color: var(--color-primer-fg-disabled);\n background-color: var(--color-btn-bg);\n border-color: var(--color-btn-border);\n fill: var(--color-primer-fg-disabled);\n }\n}\n\n.Button--invisible {\n color: var(--color-btn-text);\n\n &:hover:not(:disabled) {\n background-color: var(--color-action-list-item-default-hover-bg);\n }\n\n &[aria-pressed='true'],\n &:active:not(:disabled) {\n background-color: var(--color-action-list-item-default-active-bg);\n }\n\n &:disabled,\n &[aria-disabled='true'] {\n color: var(--color-primer-fg-disabled);\n background-color: var(--color-btn-bg);\n border-color: var(--color-btn-border);\n fill: var(--color-primer-fg-disabled);\n }\n\n /* if button has no visuals, use link blue for text */\n &.Button--invisible-noVisuals .Button-label {\n color: var(--color-accent-fg);\n }\n\n & .Button-visual {\n color: var(--color-fg-muted);\n }\n}\n\n.Button--link {\n color: var(--color-accent-fg);\n fill: var(--color-accent-fg);\n display: inline-block;\n font-size: inherit;\n border: none;\n height: unset;\n padding: 0;\n\n &:hover:not(:disabled) {\n text-decoration: underline;\n }\n\n &:focus-visible, &:focus {\n outline-offset: 2px;\n }\n\n &:disabled,\n &[aria-disabled='true'] {\n color: var(--color-primer-fg-disabled);\n background-color: transparent;\n border-color: transparent;\n fill: var(--color-primer-fg-disabled);\n }\n}\n\n/* danger */\n.Button--danger {\n color: var(--color-btn-danger-text);\n fill: var(--color-btn-danger-icon);\n background-color: var(--color-btn-bg);\n border-color: var(--color-btn-border);\n box-shadow: var(--color-btn-shadow), var(--color-btn-inset-shadow);\n\n &:hover:not(:disabled) {\n color: var(--color-btn-danger-hover-text);\n fill: var(--color-btn-danger-hover-text);\n background-color: var(--color-btn-danger-hover-bg);\n border-color: var(--color-btn-danger-hover-border);\n box-shadow: var(--color-btn-danger-hover-shadow), var(--color-btn-danger-hover-inset-shadow);\n }\n\n &:active:not(:disabled),\n &[aria-pressed='true'] {\n color: var(--color-btn-danger-selected-text);\n fill: var(--color-btn-danger-selected-text);\n background-color: var(--color-btn-danger-selected-bg);\n border-color: var(--color-btn-danger-selected-border);\n box-shadow: var(--color-btn-danger-selected-shadow);\n }\n\n &:disabled,\n &[aria-disabled='true'] {\n color: var(--color-btn-danger-disabled-text);\n fill: var(--color-btn-danger-disabled-text);\n background-color: var(--color-btn-danger-disabled-bg);\n border-color: var(--color-btn-border);\n }\n}\n\n\n.Button--iconOnly {\n display: grid;\n place-content: center;\n padding: unset;\n width: var(--primer-control-medium-size, 32px);\n\n &.Button--small {\n width: var(--primer-control-small-size, 28px);\n }\n\n &.Button--large {\n width: var(--primer-control-large-size, 40px);\n }\n}\n",null,"/* outline with fg box-shadow for buttons */\n@define-mixin focusOutlineOnEmphasis $outlineOffset: -2px, $outlineColor: var(--color-accent-fg) {\n outline: 2px solid $outlineColor;\n outline-offset: $outlineOffset;\n box-shadow: inset 0 0 0 3px var(--color-fg-on-emphasis);\n}\n"]}
1
+ {"version":3,"sources":["button.pcss","<no source>","../../../../lib/postcss_mixins/focusOutlineOnEmphasis.pcss"],"names":[],"mappings":"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","file":"button.css","sourcesContent":["/* CSS for Button */\n\n/* temporary, pre primitives release */\n:root {\n --primer-duration-fast: 80ms;\n --primer-easing-easeInOut: cubic-bezier(0.65, 0, 0.35, 1);\n}\n\n/* base button */\n.Button {\n position: relative;\n font-size: var(--primer-text-body-size-medium, 14px);\n font-weight: var(--base-text-weight-medium, 500);\n cursor: pointer;\n user-select: none;\n background-color: transparent;\n border: var(--primer-borderWidth-thin, 1px) solid;\n border-color: transparent;\n border-radius: var(--primer-borderRadius-medium, 6px);\n color: var(--color-btn-text);\n transition: var(--primer-duration-fast) var(--primer-easing-easeInOut);\n transition-property: color, fill, background-color, border-color;\n text-align: center;\n height: var(--primer-control-medium-size, 32px);\n padding: 0 var(--primer-control-medium-paddingInline-normal, 12px);\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n gap: var(--primer-control-medium-gap, 8px);\n min-width: max-content;\n\n /* mobile friendly sizing */\n @media (pointer: course) {\n &::before {\n @mixin minTouchTarget 48px, 48px;\n }\n }\n\n /* base states */\n\n &:hover {\n transition-duration: var(--primer-duration-fast);\n }\n\n &:active {\n transition: none;\n }\n\n &:disabled,\n &[aria-disabled='true'] {\n cursor: not-allowed;\n box-shadow: none;\n }\n}\n\n.Button-withTooltip {\n position: relative;\n display: inline-block;\n}\n\na.Button,\nsummary.Button {\n display: inline-flex;\n\n &:hover {\n text-decoration: none;\n }\n}\n\n/* wrap grid content to allow trailingAction to lock-right */\n.Button-content {\n flex: 1 0 auto;\n display: grid;\n grid-template-areas: 'leadingVisual text trailingVisual';\n grid-template-columns: min-content minmax(0, auto) min-content;\n align-items: center;\n place-content: center;\n\n /* padding-bottom: 1px; optical alignment for firefox */\n\n & > :not(:last-child) {\n margin-right: var(--primer-control-medium-gap, 8px);\n }\n}\n\n/* center child elements for fullWidth */\n.Button-content--alignStart {\n justify-content: start;\n}\n\n/* button child elements */\n\n/* align svg */\n.Button-visual {\n display: flex;\n pointer-events: none; /* allow click handler to work, avoiding visuals */\n}\n\n.Button-label {\n grid-area: text;\n white-space: nowrap;\n line-height: var(--primer-text-body-lineHeight-medium, calc(20 / 14));\n}\n\n.Button-leadingVisual {\n grid-area: leadingVisual;\n}\n\n.Button-trailingVisual {\n grid-area: trailingVisual;\n}\n\n.Button-trailingAction {\n margin-right: calc(var(--base-size-4, 4px) * -1);\n}\n\n/* sizes */\n\n.Button--small {\n font-size: var(--primer-text-body-size-small, 12px);\n height: var(--primer-control-small-size, 28px);\n padding: 0 var(--primer-control-small-paddingInline-condensed, 8px);\n gap: var(--primer-control-small-gap, 4px);\n\n & .Button-label {\n line-height: var(--primer-text-body-lineHeight-small, calc(20 / 12));\n }\n\n & .Button-content {\n & > :not(:last-child) {\n margin-right: var(--primer-control-small-gap, 4px);\n }\n }\n}\n\n.Button--large {\n height: var(--primer-control-large-size, 40px);\n padding: 0 var(--primer-control-large-paddingInline-spacious, 16px);\n gap: var(--primer-control-large-gap, 8px);\n\n & .Button-label {\n line-height: var(--primer-text-body-lineHeight-large, calc(48 / 32));\n }\n\n & .Button-content {\n & > :not(:last-child) {\n margin-right: var(--primer-control-large-gap, 8px);\n }\n }\n}\n\n.Button--fullWidth {\n width: 100%;\n}\n\n/* variants */\n\n/* primary */\n.Button--primary {\n color: var(--color-btn-primary-text);\n fill: var(--color-btn-primary-icon);\n background-color: var(--color-btn-primary-bg);\n border-color: var(--color-btn-primary-border);\n box-shadow: var(--color-btn-primary-shadow), var(--color-btn-primary-inset-shadow);\n\n &:hover:not(:disabled) {\n background-color: var(--color-btn-primary-hover-bg);\n border-color: var(--color-btn-primary-hover-border);\n }\n\n /* fallback :focus state */\n &:focus {\n @mixin focusOutlineOnEmphasis;\n\n /* remove fallback :focus if :focus-visible is supported */\n &:not(:focus-visible) {\n outline: solid 1px transparent;\n box-shadow: none;\n }\n }\n\n /* default focus state */\n &:focus-visible {\n @mixin focusOutlineOnEmphasis;\n }\n\n &:active:not(:disabled),\n &[aria-pressed='true'] {\n background-color: var(--color-btn-primary-selected-bg);\n box-shadow: var(--color-btn-primary-selected-shadow);\n }\n\n &:disabled,\n &[aria-disabled='true'] {\n color: var(--color-btn-primary-disabled-text);\n background-color: var(--color-btn-primary-disabled-bg);\n border-color: var(--color-btn-primary-disabled-border);\n fill: var(--color-btn-primary-disabled-text);\n }\n}\n\n/* default (secondary) */\n.Button--secondary {\n color: var(--color-btn-text);\n fill: var(--color-fg-muted); /* help this */\n background-color: var(--color-btn-bg);\n border-color: var(--color-btn-border);\n box-shadow: var(--color-btn-shadow), var(--color-btn-inset-shadow);\n\n &:hover:not(:disabled) {\n background-color: var(--color-btn-hover-bg);\n border-color: var(--color-btn-hover-border);\n }\n\n &:active:not(:disabled) {\n background-color: var(--color-btn-active-bg);\n border-color: var(--color-btn-active-border);\n }\n\n &[aria-pressed='true'] {\n background-color: var(--color-btn-selected-bg);\n box-shadow: var(--color-primer-shadow-inset);\n }\n\n &:disabled,\n &[aria-disabled='true'] {\n color: var(--color-primer-fg-disabled);\n background-color: var(--color-btn-bg);\n border-color: var(--color-btn-border);\n fill: var(--color-primer-fg-disabled);\n }\n}\n\n.Button--invisible {\n color: var(--color-btn-text);\n\n &:hover:not(:disabled) {\n background-color: var(--color-action-list-item-default-hover-bg);\n }\n\n &[aria-pressed='true'],\n &:active:not(:disabled) {\n background-color: var(--color-action-list-item-default-active-bg);\n }\n\n &:disabled,\n &[aria-disabled='true'] {\n color: var(--color-primer-fg-disabled);\n background-color: var(--color-btn-bg);\n border-color: var(--color-btn-border);\n fill: var(--color-primer-fg-disabled);\n }\n\n /* if button has no visuals, use link blue for text */\n &.Button--invisible-noVisuals .Button-label {\n color: var(--color-accent-fg);\n }\n\n & .Button-visual {\n color: var(--color-fg-muted);\n }\n}\n\n.Button--link {\n color: var(--color-accent-fg);\n fill: var(--color-accent-fg);\n display: inline-block;\n font-size: inherit;\n border: none;\n height: unset;\n padding: 0;\n\n &:hover:not(:disabled) {\n text-decoration: underline;\n }\n\n &:focus-visible, &:focus {\n outline-offset: 2px;\n }\n\n &:disabled,\n &[aria-disabled='true'] {\n color: var(--color-primer-fg-disabled);\n background-color: transparent;\n border-color: transparent;\n fill: var(--color-primer-fg-disabled);\n }\n}\n\n/* danger */\n.Button--danger {\n color: var(--color-btn-danger-text);\n fill: var(--color-btn-danger-icon);\n background-color: var(--color-btn-bg);\n border-color: var(--color-btn-border);\n box-shadow: var(--color-btn-shadow), var(--color-btn-inset-shadow);\n\n &:hover:not(:disabled) {\n color: var(--color-btn-danger-hover-text);\n fill: var(--color-btn-danger-hover-text);\n background-color: var(--color-btn-danger-hover-bg);\n border-color: var(--color-btn-danger-hover-border);\n box-shadow: var(--color-btn-danger-hover-shadow), var(--color-btn-danger-hover-inset-shadow);\n }\n\n &:active:not(:disabled),\n &[aria-pressed='true'] {\n color: var(--color-btn-danger-selected-text);\n fill: var(--color-btn-danger-selected-text);\n background-color: var(--color-btn-danger-selected-bg);\n border-color: var(--color-btn-danger-selected-border);\n box-shadow: var(--color-btn-danger-selected-shadow);\n }\n\n &:disabled,\n &[aria-disabled='true'] {\n color: var(--color-btn-danger-disabled-text);\n fill: var(--color-btn-danger-disabled-text);\n background-color: var(--color-btn-danger-disabled-bg);\n border-color: var(--color-btn-border);\n }\n}\n\n\n.Button--iconOnly {\n display: grid;\n place-content: center;\n padding: unset;\n width: var(--primer-control-medium-size, 32px);\n\n &.Button--small {\n width: var(--primer-control-small-size, 28px);\n }\n\n &.Button--large {\n width: var(--primer-control-large-size, 40px);\n }\n}\n",null,"/* outline with fg box-shadow for buttons */\n@define-mixin focusOutlineOnEmphasis $outlineOffset: -2px, $outlineColor: var(--color-accent-fg) {\n outline: 2px solid $outlineColor;\n outline-offset: $outlineOffset;\n box-shadow: inset 0 0 0 3px var(--color-fg-on-emphasis);\n}\n"]}
@@ -52,10 +52,6 @@
52
52
  cursor: not-allowed;
53
53
  box-shadow: none;
54
54
  }
55
-
56
- /* &:focus {
57
- @mixin focusOutline;
58
- } */
59
55
  }
60
56
 
61
57
  .Button-withTooltip {
@@ -0,0 +1 @@
1
+ .Counter{background-color:var(--color-neutral-muted);border:var(--primer-borderWidth-thin,1px) solid var(--color-counter-border);border-radius:2em;color:var(--color-fg-default);display:inline-block;font-size:var(--primer-text-body-size-small,12px);font-weight:var(--base-text-weight-medium,500);line-height:calc(var(--base-size-20, 20px) - var(--primer-borderWidth-thin, 1px)*2);min-width:var(--base-size-20,20px);padding:0 6px;text-align:center}.Counter:empty{display:none}.Counter .octicon{opacity:.8;vertical-align:text-top}.Counter--primary{background-color:var(--color-neutral-emphasis);color:var(--color-fg-on-emphasis)}.Counter--secondary{background-color:var(--color-neutral-subtle);color:var(--color-fg-muted)}
@@ -0,0 +1 @@
1
+ {"name":"beta/counter","selectors":[".Counter",".Counter:empty",".Counter .octicon",".Counter--primary",".Counter--secondary"]}
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["counter.pcss"],"names":[],"mappings":"AAEA,SASE,2CAA4C,CAC5C,2EAA6E,CAC7E,iBAAkB,CAJlB,6BAA8B,CAN9B,oBAAqB,CAGrB,iDAAmD,CACnD,8CAAgD,CAChD,mFAAsF,CAJtF,kCAAoC,CACpC,aAAc,CAKd,iBAcF,CATE,eACE,YACF,CAGA,kBAEE,UAAY,CADZ,uBAEF,CAGF,kBAEE,8CAA+C,CAD/C,iCAEF,CAEA,oBAEE,4CAA6C,CAD7C,2BAEF","file":"counter.css","sourcesContent":["/* Counter */\n\n.Counter {\n display: inline-block;\n min-width: var(--base-size-20, 20px); /* makes sure it's a circle with just one digit */\n padding: 0 6px;\n font-size: var(--primer-text-body-size-small, 12px);\n font-weight: var(--base-text-weight-medium, 500);\n line-height: calc(var(--base-size-20, 20px) - var(--primer-borderWidth-thin, 1px) * 2); /* 20px - 2px for the borders */\n color: var(--color-fg-default);\n text-align: center;\n background-color: var(--color-neutral-muted);\n border: var(--primer-borderWidth-thin, 1px) solid var(--color-counter-border);\n border-radius: 2em;\n\n &:empty {\n display: none;\n }\n\n /* Is this selector used? could not find any use of it */\n & .octicon {\n vertical-align: text-top;\n opacity: 0.8;\n }\n}\n\n.Counter--primary {\n color: var(--color-fg-on-emphasis);\n background-color: var(--color-neutral-emphasis);\n}\n\n.Counter--secondary {\n color: var(--color-fg-muted);\n background-color: var(--color-neutral-subtle);\n}\n"]}
@@ -0,0 +1,35 @@
1
+ /* Counter */
2
+
3
+ .Counter {
4
+ display: inline-block;
5
+ min-width: var(--base-size-20, 20px); /* makes sure it's a circle with just one digit */
6
+ padding: 0 6px;
7
+ font-size: var(--primer-text-body-size-small, 12px);
8
+ font-weight: var(--base-text-weight-medium, 500);
9
+ line-height: calc(var(--base-size-20, 20px) - var(--primer-borderWidth-thin, 1px) * 2); /* 20px - 2px for the borders */
10
+ color: var(--color-fg-default);
11
+ text-align: center;
12
+ background-color: var(--color-neutral-muted);
13
+ border: var(--primer-borderWidth-thin, 1px) solid var(--color-counter-border);
14
+ border-radius: 2em;
15
+
16
+ &:empty {
17
+ display: none;
18
+ }
19
+
20
+ /* Is this selector used? could not find any use of it */
21
+ & .octicon {
22
+ vertical-align: text-top;
23
+ opacity: 0.8;
24
+ }
25
+ }
26
+
27
+ .Counter--primary {
28
+ color: var(--color-fg-on-emphasis);
29
+ background-color: var(--color-neutral-emphasis);
30
+ }
31
+
32
+ .Counter--secondary {
33
+ color: var(--color-fg-muted);
34
+ background-color: var(--color-neutral-subtle);
35
+ }
@@ -0,0 +1 @@
1
+ .labels{position:relative}.Label,.label{border:var(--primer-borderWidth-thin,1px) solid var(--color-border-default);border-radius:2em;display:inline-block;font-size:var(--primer-text-body-size-small,12px);font-weight:var(--base-text-weight-medium,500);line-height:18px;padding:0 7px;white-space:nowrap}.Label:hover,.label:hover{text-decoration:none}.Label--large{line-height:22px;padding-left:10px;padding-right:10px}.Label--inline{display:inline;font-size:85%;padding:.12em .5em}.Label--primary{border-color:var(--color-neutral-emphasis);color:var(--color-fg-default)}.Label--secondary{border-color:var(--color-border-default);color:var(--color-fg-muted)}.Label--accent,.Label--info{border-color:var(--color-accent-emphasis);color:var(--color-accent-fg)}.Label--success{border-color:var(--color-success-emphasis);color:var(--color-success-fg)}.Label--attention,.Label--warning{border-color:var(--color-attention-emphasis);color:var(--color-attention-fg)}.Label--severe{border-color:var(--color-severe-emphasis);color:var(--color-severe-fg)}.Label--danger{border-color:var(--color-danger-emphasis);color:var(--color-danger-fg)}.Label--open{border-color:var(--color-open-emphasis);color:var(--color-open-fg)}.Label--closed{border-color:var(--color-closed-emphasis);color:var(--color-closed-fg)}.Label--done{border-color:var(--color-done-emphasis);color:var(--color-done-fg)}.Label--sponsors{border-color:var(--color-sponsors-emphasis);color:var(--color-sponsors-fg)}
@@ -0,0 +1 @@
1
+ {"name":"beta/label","selectors":[".labels",".Label",".label",".Label:hover",".label:hover",".Label--large",".Label--inline",".Label--primary",".Label--secondary",".Label--accent",".Label--info",".Label--success",".Label--attention",".Label--warning",".Label--severe",".Label--danger",".Label--open",".Label--closed",".Label--done",".Label--sponsors"]}
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["label.pcss"],"names":[],"mappings":"AAGA,QACE,iBACF,CAIA,cAQE,2EAA6E,CAC7E,iBAAkB,CAPlB,oBAAqB,CAErB,iDAAmD,CACnD,8CAAgD,CAChD,gBAAiB,CAHjB,aAAc,CAId,kBAOF,CAHE,0BACE,oBACF,CAKF,cAGE,gBAAiB,CADjB,iBAAkB,CADlB,kBAGF,CAMA,eACE,cAAe,CAEf,aAAc,CADd,kBAEF,CAIA,gBAEE,0CAA2C,CAD3C,6BAEF,CAEA,kBAEE,wCAAyC,CADzC,2BAEF,CAIA,4BAGE,yCAA0C,CAD1C,4BAEF,CAEA,gBAEE,0CAA2C,CAD3C,6BAEF,CAEA,kCAGE,4CAA6C,CAD7C,+BAEF,CAEA,eAEE,yCAA0C,CAD1C,4BAEF,CAEA,eAEE,yCAA0C,CAD1C,4BAEF,CAEA,aAEE,uCAAwC,CADxC,0BAEF,CAEA,eAEE,yCAA0C,CAD1C,4BAEF,CAEA,aAEE,uCAAwC,CADxC,0BAEF,CAEA,iBAEE,2CAA4C,CAD5C,8BAEF","file":"label.css","sourcesContent":["/* Labels */\n\n/* Provide a wrapper to ensure labels stick together */\n.labels {\n position: relative;\n}\n\n/* Default 20px */\n\n.label, /* TODO: Deprecate */\n.Label {\n display: inline-block;\n padding: 0 7px;\n font-size: var(--primer-text-body-size-small, 12px);\n font-weight: var(--base-text-weight-medium, 500);\n line-height: 18px;\n white-space: nowrap;\n border: var(--primer-borderWidth-thin, 1px) solid var(--color-border-default);\n border-radius: 2em;\n\n &:hover {\n text-decoration: none;\n }\n}\n\n/* Large 24px */\n\n.Label--large {\n padding-right: 10px;\n padding-left: 10px;\n line-height: 22px;\n}\n\n/* Inline */\n\n/* Doesn't increase height of parent element\n** Can be used with different font-sizes */\n.Label--inline {\n display: inline;\n padding: 0.12em 0.5em;\n font-size: 85%;\n}\n\n/* Contrast */\n\n.Label--primary {\n color: var(--color-fg-default);\n border-color: var(--color-neutral-emphasis);\n}\n\n.Label--secondary {\n color: var(--color-fg-muted);\n border-color: var(--color-border-default);\n}\n\n/* Colors */\n\n.Label--info, /* TODO: deprecate */\n.Label--accent {\n color: var(--color-accent-fg);\n border-color: var(--color-accent-emphasis);\n}\n\n.Label--success {\n color: var(--color-success-fg);\n border-color: var(--color-success-emphasis);\n}\n\n.Label--warning, /* TODO: deprecate */\n.Label--attention {\n color: var(--color-attention-fg);\n border-color: var(--color-attention-emphasis);\n}\n\n.Label--severe {\n color: var(--color-severe-fg);\n border-color: var(--color-severe-emphasis);\n}\n\n.Label--danger {\n color: var(--color-danger-fg);\n border-color: var(--color-danger-emphasis);\n}\n\n.Label--open {\n color: var(--color-open-fg);\n border-color: var(--color-open-emphasis);\n}\n\n.Label--closed {\n color: var(--color-closed-fg);\n border-color: var(--color-closed-emphasis);\n}\n\n.Label--done {\n color: var(--color-done-fg);\n border-color: var(--color-done-emphasis);\n}\n\n.Label--sponsors {\n color: var(--color-sponsors-fg);\n border-color: var(--color-sponsors-emphasis);\n}\n"]}
@@ -0,0 +1,103 @@
1
+ /* Labels */
2
+
3
+ /* Provide a wrapper to ensure labels stick together */
4
+ .labels {
5
+ position: relative;
6
+ }
7
+
8
+ /* Default 20px */
9
+
10
+ .label, /* TODO: Deprecate */
11
+ .Label {
12
+ display: inline-block;
13
+ padding: 0 7px;
14
+ font-size: var(--primer-text-body-size-small, 12px);
15
+ font-weight: var(--base-text-weight-medium, 500);
16
+ line-height: 18px;
17
+ white-space: nowrap;
18
+ border: var(--primer-borderWidth-thin, 1px) solid var(--color-border-default);
19
+ border-radius: 2em;
20
+
21
+ &:hover {
22
+ text-decoration: none;
23
+ }
24
+ }
25
+
26
+ /* Large 24px */
27
+
28
+ .Label--large {
29
+ padding-right: 10px;
30
+ padding-left: 10px;
31
+ line-height: 22px;
32
+ }
33
+
34
+ /* Inline */
35
+
36
+ /* Doesn't increase height of parent element
37
+ ** Can be used with different font-sizes */
38
+ .Label--inline {
39
+ display: inline;
40
+ padding: 0.12em 0.5em;
41
+ font-size: 85%;
42
+ }
43
+
44
+ /* Contrast */
45
+
46
+ .Label--primary {
47
+ color: var(--color-fg-default);
48
+ border-color: var(--color-neutral-emphasis);
49
+ }
50
+
51
+ .Label--secondary {
52
+ color: var(--color-fg-muted);
53
+ border-color: var(--color-border-default);
54
+ }
55
+
56
+ /* Colors */
57
+
58
+ .Label--info, /* TODO: deprecate */
59
+ .Label--accent {
60
+ color: var(--color-accent-fg);
61
+ border-color: var(--color-accent-emphasis);
62
+ }
63
+
64
+ .Label--success {
65
+ color: var(--color-success-fg);
66
+ border-color: var(--color-success-emphasis);
67
+ }
68
+
69
+ .Label--warning, /* TODO: deprecate */
70
+ .Label--attention {
71
+ color: var(--color-attention-fg);
72
+ border-color: var(--color-attention-emphasis);
73
+ }
74
+
75
+ .Label--severe {
76
+ color: var(--color-severe-fg);
77
+ border-color: var(--color-severe-emphasis);
78
+ }
79
+
80
+ .Label--danger {
81
+ color: var(--color-danger-fg);
82
+ border-color: var(--color-danger-emphasis);
83
+ }
84
+
85
+ .Label--open {
86
+ color: var(--color-open-fg);
87
+ border-color: var(--color-open-emphasis);
88
+ }
89
+
90
+ .Label--closed {
91
+ color: var(--color-closed-fg);
92
+ border-color: var(--color-closed-emphasis);
93
+ }
94
+
95
+ .Label--done {
96
+ color: var(--color-done-fg);
97
+ border-color: var(--color-done-emphasis);
98
+ }
99
+
100
+ .Label--sponsors {
101
+ color: var(--color-sponsors-fg);
102
+ border-color: var(--color-sponsors-emphasis);
103
+ }
@@ -0,0 +1 @@
1
+ .Progress{background-color:var(--color-neutral-muted);border-radius:6px;display:flex;height:8px;outline:1px solid #0000;overflow:hidden}.Progress--large{height:10px}.Progress--small{height:5px}.Progress-item{outline:2px solid #0000}.Progress-item+.Progress-item{margin-left:2px}
@@ -0,0 +1 @@
1
+ {"name":"beta/progress_bar","selectors":[".Progress",".Progress--large",".Progress--small",".Progress-item",".Progress-item+.Progress-item"]}
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["progress_bar.pcss"],"names":[],"mappings":"AAEA,UAIE,2CAA4C,CAC5C,iBAAkB,CAJlB,YAAa,CACb,UAAW,CAIX,uBAA8B,CAH9B,eAIF,CAEA,iBACE,WACF,CAEA,iBACE,UACF,CAEA,eACE,uBACF,CAEA,8BACE,eACF","file":"progress_bar.css","sourcesContent":["/* Progress */\n\n.Progress {\n display: flex;\n height: 8px;\n overflow: hidden;\n background-color: var(--color-neutral-muted);\n border-radius: 6px;\n outline: 1px solid transparent; /* Support Firefox custom colors */\n}\n\n.Progress--large {\n height: 10px;\n}\n\n.Progress--small {\n height: 5px;\n}\n\n.Progress-item {\n outline: 2px solid transparent; /* Support Firefox custom colors */\n}\n\n.Progress-item + .Progress-item {\n margin-left: 2px;\n}\n"]}
@@ -0,0 +1,26 @@
1
+ /* Progress */
2
+
3
+ .Progress {
4
+ display: flex;
5
+ height: 8px;
6
+ overflow: hidden;
7
+ background-color: var(--color-neutral-muted);
8
+ border-radius: 6px;
9
+ outline: 1px solid transparent; /* Support Firefox custom colors */
10
+ }
11
+
12
+ .Progress--large {
13
+ height: 10px;
14
+ }
15
+
16
+ .Progress--small {
17
+ height: 5px;
18
+ }
19
+
20
+ .Progress-item {
21
+ outline: 2px solid transparent; /* Support Firefox custom colors */
22
+ }
23
+
24
+ .Progress-item + .Progress-item {
25
+ margin-left: 2px;
26
+ }
@@ -0,0 +1,72 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Primer
4
+ module Beta
5
+ # Use `ProgressBar` to visualize task completion.
6
+ class ProgressBar < Primer::Component
7
+ status :beta
8
+
9
+ # Use the Item slot to add an item to the progress bar
10
+ #
11
+ # @param percentage [Integer] The percent complete
12
+ # @param bg [Symbol] The background color
13
+ # @param kwargs [Hash] The same arguments as <%= link_to_system_arguments_docs %>.
14
+ renders_many :items, lambda { |percentage: 0, bg: :success_emphasis, **system_arguments|
15
+ deny_tag_argument(**system_arguments)
16
+ system_arguments[:tag] = :span
17
+ system_arguments[:bg] = bg
18
+ system_arguments[:style] = join_style_arguments(system_arguments[:style], "width: #{percentage}%;")
19
+ system_arguments[:classes] = class_names("Progress-item", system_arguments[:classes])
20
+
21
+ Primer::BaseComponent.new(**system_arguments)
22
+ }
23
+
24
+ SIZE_DEFAULT = :default
25
+
26
+ SIZE_MAPPINGS = {
27
+ SIZE_DEFAULT => "",
28
+ :small => "Progress--small",
29
+ :large => "Progress--large"
30
+ }.freeze
31
+
32
+ SIZE_OPTIONS = SIZE_MAPPINGS.keys
33
+ # @example Default
34
+ # <%= render(Primer::Beta::ProgressBar.new) do |component| %>
35
+ # <% component.item(percentage: 25) %>
36
+ # <% end %>
37
+ #
38
+ # @example Small
39
+ # <%= render(Primer::Beta::ProgressBar.new(size: :small)) do |component| %>
40
+ # <% component.item(bg: :accent_emphasis, percentage: 50) %>
41
+ # <% end %>
42
+ #
43
+ # @example Large
44
+ # <%= render(Primer::Beta::ProgressBar.new(size: :large)) do |component| %>
45
+ # <% component.item(bg: :danger_emphasis, percentage: 75) %>
46
+ # <% end %>
47
+ #
48
+ # @example Multiple items
49
+ # <%= render(Primer::Beta::ProgressBar.new) do |component| %>
50
+ # <% component.item(percentage: 10) %>
51
+ # <% component.item(bg: :accent_emphasis, percentage: 20) %>
52
+ # <% component.item(bg: :danger_emphasis, percentage: 30) %>
53
+ # <% end %>
54
+ #
55
+ # @param size [Symbol] <%= one_of(Primer::Beta::ProgressBar::SIZE_OPTIONS) %> Increases height.
56
+ # @param system_arguments [Hash] <%= link_to_system_arguments_docs %>
57
+ def initialize(size: SIZE_DEFAULT, **system_arguments)
58
+ @system_arguments = deny_tag_argument(**system_arguments)
59
+ @system_arguments[:classes] = class_names(
60
+ @system_arguments[:classes],
61
+ "Progress",
62
+ SIZE_MAPPINGS[fetch_or_fallback(SIZE_OPTIONS, size, SIZE_DEFAULT)]
63
+ )
64
+ @system_arguments[:tag] = :span
65
+ end
66
+
67
+ def render?
68
+ items.any?
69
+ end
70
+ end
71
+ end
72
+ end
@@ -0,0 +1 @@
1
+ .Truncate{display:inline-flex;max-width:100%;min-width:0}.Truncate>.Truncate-text{max-width:-moz-fit-content;max-width:fit-content;min-width:1ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:is(.Truncate>.Truncate-text)+.Truncate-text{margin-left:var(--primer-control-small-gap,4px)}.Truncate>.Truncate-text.Truncate-text--primary{flex-basis:200%}.Truncate>.Truncate-text.Truncate-text--expandable:active,.Truncate>.Truncate-text.Truncate-text--expandable:focus,.Truncate>.Truncate-text.Truncate-text--expandable:hover{cursor:pointer;flex-shrink:0;max-width:100%!important}
@@ -0,0 +1 @@
1
+ {"name":"beta/truncate","selectors":[".Truncate",".Truncate>.Truncate-text",":is(.Truncate>.Truncate-text)+.Truncate-text",".Truncate>.Truncate-text.Truncate-text--primary",".Truncate>.Truncate-text.Truncate-text--expandable:active",".Truncate>.Truncate-text.Truncate-text--expandable:focus",".Truncate>.Truncate-text.Truncate-text--expandable:hover"]}
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["truncate.pcss"],"names":[],"mappings":"AAEA,UACE,mBAAoB,CAEpB,cAAe,CADf,WA0BF,CAvBE,yBAEE,0BAAsB,CAAtB,qBAAsB,CADtB,aAAc,CAEd,eAAgB,CAChB,sBAAuB,CACvB,kBAiBF,CAfE,6CACE,+CACF,CAEA,gDACE,eACF,CAEA,4KAKE,cAAe,CADf,aAAc,CADd,wBAGF","file":"truncate.css","sourcesContent":["/* Truncate */\n\n.Truncate {\n display: inline-flex;\n min-width: 0;\n max-width: 100%;\n\n & > .Truncate-text {\n min-width: 1ch;\n max-width: fit-content;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n\n & + .Truncate-text {\n margin-left: var(--primer-control-small-gap, 4px);\n }\n\n &.Truncate-text--primary {\n flex-basis: 200%;\n }\n\n &.Truncate-text--expandable:hover,\n &.Truncate-text--expandable:focus,\n &.Truncate-text--expandable:active {\n max-width: 100% !important;\n flex-shrink: 0;\n cursor: pointer;\n }\n }\n}\n"]}
@@ -0,0 +1,31 @@
1
+ /* Truncate */
2
+
3
+ .Truncate {
4
+ display: inline-flex;
5
+ min-width: 0;
6
+ max-width: 100%;
7
+
8
+ & > .Truncate-text {
9
+ min-width: 1ch;
10
+ max-width: fit-content;
11
+ overflow: hidden;
12
+ text-overflow: ellipsis;
13
+ white-space: nowrap;
14
+
15
+ & + .Truncate-text {
16
+ margin-left: var(--primer-control-small-gap, 4px);
17
+ }
18
+
19
+ &.Truncate-text--primary {
20
+ flex-basis: 200%;
21
+ }
22
+
23
+ &.Truncate-text--expandable:hover,
24
+ &.Truncate-text--expandable:focus,
25
+ &.Truncate-text--expandable:active {
26
+ max-width: 100% !important;
27
+ flex-shrink: 0;
28
+ cursor: pointer;
29
+ }
30
+ }
31
+ }
@@ -4,8 +4,8 @@ import './alpha/nav_list';
4
4
  import './alpha/segmented_control';
5
5
  import './alpha/toggle_switch';
6
6
  import './alpha/tool_tip';
7
+ import './alpha/x_banner';
7
8
  import './beta/auto_complete/auto_complete';
8
- import './beta/x_banner';
9
9
  import './clipboard_copy';
10
10
  import './dropdown';
11
11
  import './local_time';
@@ -4,8 +4,8 @@ import './alpha/nav_list';
4
4
  import './alpha/segmented_control';
5
5
  import './alpha/toggle_switch';
6
6
  import './alpha/tool_tip';
7
+ import './alpha/x_banner';
7
8
  import './beta/auto_complete/auto_complete';
8
- import './beta/x_banner';
9
9
  import './clipboard_copy';
10
10
  import './dropdown';
11
11
  import './local_time';
@@ -1,5 +1,15 @@
1
1
  /* CSS component styles here */
2
2
  @import "./alpha/action_list.pcss";
3
- @import './alpha/segmented_control.pcss';
4
- @import "./beta/banner.pcss";
3
+ @import "./alpha/banner.pcss";
4
+ @import "./alpha/toggle_switch.pcss";
5
+ @import "./alpha/segmented_control.pcss";
6
+ @import "./beta/breadcrumbs.pcss";
5
7
  @import "./beta/button.pcss";
8
+ @import "./beta/counter.pcss";
9
+ @import "./beta/label.pcss";
10
+ @import "./beta/blankslate.pcss";
11
+ @import "./beta/progress_bar.pcss";
12
+ @import "./beta/truncate.pcss";
13
+ @import "./state_component.pcss";
14
+ @import "./subhead_component.pcss";
15
+ @import "./truncate.pcss";
@@ -4,8 +4,8 @@ import './alpha/nav_list'
4
4
  import './alpha/segmented_control'
5
5
  import './alpha/toggle_switch'
6
6
  import './alpha/tool_tip'
7
+ import './alpha/x_banner'
7
8
  import './beta/auto_complete/auto_complete'
8
- import './beta/x_banner'
9
9
  import './clipboard_copy'
10
10
  import './dropdown'
11
11
  import './local_time'
@@ -1,70 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Primer
4
- # Use `ProgressBar` to visualize task completion.
5
- class ProgressBarComponent < Primer::Component
6
- status :beta
7
-
8
- # Use the Item slot to add an item to the progress bas
9
- #
10
- # @param percentage [Integer] The percent complete
11
- # @param bg [Symbol] The background color
12
- # @param kwargs [Hash] The same arguments as <%= link_to_system_arguments_docs %>.
13
- renders_many :items, lambda { |percentage: 0, bg: :success_emphasis, **system_arguments|
14
- deny_tag_argument(**system_arguments)
15
- system_arguments[:tag] = :span
16
- system_arguments[:bg] = bg
17
- system_arguments[:style] = join_style_arguments(system_arguments[:style], "width: #{percentage}%;")
18
- system_arguments[:classes] = class_names("Progress-item", system_arguments[:classes])
19
-
20
- Primer::BaseComponent.new(**system_arguments)
21
- }
22
-
23
- SIZE_DEFAULT = :default
24
-
25
- SIZE_MAPPINGS = {
26
- SIZE_DEFAULT => "",
27
- :small => "Progress--small",
28
- :large => "Progress--large"
29
- }.freeze
30
-
31
- SIZE_OPTIONS = SIZE_MAPPINGS.keys
32
- # @example Default
33
- # <%= render(Primer::ProgressBarComponent.new) do |component| %>
34
- # <% component.item(percentage: 25) %>
35
- # <% end %>
36
- #
37
- # @example Small
38
- # <%= render(Primer::ProgressBarComponent.new(size: :small)) do |component| %>
39
- # <% component.item(bg: :accent_emphasis, percentage: 50) %>
40
- # <% end %>
41
- #
42
- # @example Large
43
- # <%= render(Primer::ProgressBarComponent.new(size: :large)) do |component| %>
44
- # <% component.item(bg: :danger_emphasis, percentage: 75) %>
45
- # <% end %>
46
- #
47
- # @example Multiple items
48
- # <%= render(Primer::ProgressBarComponent.new) do |component| %>
49
- # <% component.item(percentage: 10) %>
50
- # <% component.item(bg: :accent_emphasis, percentage: 20) %>
51
- # <% component.item(bg: :danger_emphasis, percentage: 30) %>
52
- # <% end %>
53
- #
54
- # @param size [Symbol] <%= one_of(Primer::ProgressBarComponent::SIZE_OPTIONS) %> Increases height.
55
- # @param system_arguments [Hash] <%= link_to_system_arguments_docs %>
56
- def initialize(size: SIZE_DEFAULT, **system_arguments)
57
- @system_arguments = deny_tag_argument(**system_arguments)
58
- @system_arguments[:classes] = class_names(
59
- @system_arguments[:classes],
60
- "Progress",
61
- SIZE_MAPPINGS[fetch_or_fallback(SIZE_OPTIONS, size, SIZE_DEFAULT)]
62
- )
63
- @system_arguments[:tag] = :span
64
- end
65
-
66
- def render?
67
- items.any?
68
- end
4
+ class ProgressBarComponent < Primer::Beta::ProgressBar
5
+ status :deprecated
69
6
  end
70
7
  end
@@ -0,0 +1 @@
1
+ .State,.state{border-radius:2em;display:inline-block;font-size:var(--primer-text-body-size-medium,14px);font-weight:var(--base-text-weight-medium,500);line-height:var(--primer-control-medium-lineBoxHeight,20px);padding:5px var(--primer-control-medium-paddingInline-normal,12px);text-align:center;white-space:nowrap}.State,.State--draft,.state{background-color:var(--color-neutral-emphasis);border:var(--primer-borderWidth-thin,1px) solid #0000;color:var(--color-fg-on-emphasis)}.State--open{background-color:var(--color-open-emphasis)}.State--merged,.State--open{color:var(--color-fg-on-emphasis)}.State--merged{background-color:var(--color-done-emphasis)}.State--closed{background-color:var(--color-closed-emphasis);color:var(--color-fg-on-emphasis)}.State--small{font-size:var(--primer-text-body-size-small,12px);line-height:var(--base-size-24,24px);padding:0 10px}.State--small .octicon{width:1em}
@@ -0,0 +1 @@
1
+ {"name":"state_component","selectors":[".State",".state",".State--draft",".State--open",".State--merged",".State--closed",".State--small",".State--small .octicon"]}
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["state_component.pcss"],"names":[],"mappings":"AAIA,cASE,iBAAkB,CAPlB,oBAAqB,CAErB,kDAAoD,CACpD,8CAAgD,CAChD,2DAA6D,CAH7D,kEAAoE,CAIpE,iBAAkB,CAClB,kBAEF,CAEA,4BAIE,8CAA+C,CAC/C,qDAA6D,CAF7D,iCAGF,CAEA,aAEE,2CACF,CAEA,4BAJE,iCAOF,CAHA,eAEE,2CACF,CAEA,eAEE,6CAA8C,CAD9C,iCAEF,CAIA,cAEE,iDAAmD,CACnD,oCAAsC,CAFtC,cAOF,CAHE,uBACE,SACF","file":"state_component.css","sourcesContent":["/* State */\n\n/* Default 32px */\n\n.state, /* TODO: Deprecate */\n.State {\n display: inline-block;\n padding: 5px var(--primer-control-medium-paddingInline-normal, 12px);\n font-size: var(--primer-text-body-size-medium, 14px);\n font-weight: var(--base-text-weight-medium, 500);\n line-height: var(--primer-control-medium-lineBoxHeight, 20px);\n text-align: center;\n white-space: nowrap;\n border-radius: 2em;\n}\n\n.state, /* TODO: Deprecate */\n.State,\n.State--draft {\n color: var(--color-fg-on-emphasis);\n background-color: var(--color-neutral-emphasis);\n border: var(--primer-borderWidth-thin, 1px) solid transparent;\n}\n\n.State--open {\n color: var(--color-fg-on-emphasis);\n background-color: var(--color-open-emphasis);\n}\n\n.State--merged {\n color: var(--color-fg-on-emphasis);\n background-color: var(--color-done-emphasis);\n}\n\n.State--closed {\n color: var(--color-fg-on-emphasis);\n background-color: var(--color-closed-emphasis);\n}\n\n/* Small 24px */\n\n.State--small {\n padding: 0 10px;\n font-size: var(--primer-text-body-size-small, 12px);\n line-height: var(--base-size-24, 24px);\n\n & .octicon {\n width: 1em; /* Ensures different icons don't change State indicator width */\n }\n}\n"]}
@@ -0,0 +1,50 @@
1
+ /* State */
2
+
3
+ /* Default 32px */
4
+
5
+ .state, /* TODO: Deprecate */
6
+ .State {
7
+ display: inline-block;
8
+ padding: 5px var(--primer-control-medium-paddingInline-normal, 12px);
9
+ font-size: var(--primer-text-body-size-medium, 14px);
10
+ font-weight: var(--base-text-weight-medium, 500);
11
+ line-height: var(--primer-control-medium-lineBoxHeight, 20px);
12
+ text-align: center;
13
+ white-space: nowrap;
14
+ border-radius: 2em;
15
+ }
16
+
17
+ .state, /* TODO: Deprecate */
18
+ .State,
19
+ .State--draft {
20
+ color: var(--color-fg-on-emphasis);
21
+ background-color: var(--color-neutral-emphasis);
22
+ border: var(--primer-borderWidth-thin, 1px) solid transparent;
23
+ }
24
+
25
+ .State--open {
26
+ color: var(--color-fg-on-emphasis);
27
+ background-color: var(--color-open-emphasis);
28
+ }
29
+
30
+ .State--merged {
31
+ color: var(--color-fg-on-emphasis);
32
+ background-color: var(--color-done-emphasis);
33
+ }
34
+
35
+ .State--closed {
36
+ color: var(--color-fg-on-emphasis);
37
+ background-color: var(--color-closed-emphasis);
38
+ }
39
+
40
+ /* Small 24px */
41
+
42
+ .State--small {
43
+ padding: 0 10px;
44
+ font-size: var(--primer-text-body-size-small, 12px);
45
+ line-height: var(--base-size-24, 24px);
46
+
47
+ & .octicon {
48
+ width: 1em; /* Ensures different icons don't change State indicator width */
49
+ }
50
+ }
@@ -0,0 +1 @@
1
+ .Subhead{border-bottom:var(--primer-borderWidth-thin,1px) solid var(--color-border-muted);display:flex;flex-flow:row wrap;justify-content:flex-end;margin-bottom:var(--primer-stack-gap-normal,16px);padding-bottom:var(--primer-stack-padding-condensed,8px)}.Subhead--spacious{margin-top:var(--base-size-40,40px)}.Subhead-heading{flex:1 1 auto;font-size:24px;font-weight:var(--base-text-weight-normal,400);order:0}.Subhead-heading--danger{color:var(--color-danger-fg);font-weight:var(--base-text-weight-semibold,600)}.Subhead-description{color:var(--color-fg-muted);flex:1 100%;font-size:var(--primer-text-body-size-medium,14px);order:2}.Subhead-actions{align-self:center;justify-content:flex-end;margin:var(--base-size-4,4px) 0 var(--base-size-4,4px) var(--base-size-4,4px);order:1}.Subhead-actions+.Subhead-description{margin-top:var(--base-size-4,4px)}
@@ -0,0 +1 @@
1
+ {"name":"subhead_component","selectors":[".Subhead",".Subhead--spacious",".Subhead-heading",".Subhead-heading--danger",".Subhead-description",".Subhead-actions",".Subhead-actions+.Subhead-description"]}
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["subhead_component.pcss"],"names":[],"mappings":"AAEA,SAIE,gFAAkF,CAHlF,YAAa,CAIb,kBAAmB,CACnB,wBAAyB,CAHzB,iDAAmD,CADnD,wDAKF,CAGA,mBACE,mCACF,CAGA,iBAGE,aAAc,CAFd,cAAe,CACf,8CAAgD,CAEhD,OACF,CAGA,yBAEE,4BAA6B,CAD7B,gDAEF,CAGA,qBAEE,2BAA4B,CAC5B,WAAY,CAFZ,kDAAoD,CAGpD,OACF,CAGA,iBAEE,iBAAkB,CAClB,wBAAyB,CAFzB,6EAAiF,CAGjF,OAKF,CAHE,sCACE,iCACF","file":"subhead_component.css","sourcesContent":["/* Subhead */\n\n.Subhead {\n display: flex;\n padding-bottom: var(--primer-stack-padding-condensed, 8px);\n margin-bottom: var(--primer-stack-gap-normal, 16px);\n border-bottom: var(--primer-borderWidth-thin, 1px) solid var(--color-border-muted);\n flex-flow: row wrap;\n justify-content: flex-end; /* Keep actions right aligned. */\n}\n\n/* Modifier class to give a lot of breathing room between sections of content. */\n.Subhead--spacious {\n margin-top: var(--base-size-40, 40px);\n}\n\n/* <h2> sized heading with normal font weight */\n.Subhead-heading {\n font-size: 24px;\n font-weight: var(--base-text-weight-normal, 400);\n flex: 1 1 auto;\n order: 0;\n}\n\n/* Make the text bold and red for dangerous content */\n.Subhead-heading--danger {\n font-weight: var(--base-text-weight-semibold, 600);\n color: var(--color-danger-fg);\n}\n\n/* One-liner of supporting text */\n.Subhead-description {\n font-size: var(--primer-text-body-size-medium, 14px);\n color: var(--color-fg-muted);\n flex: 1 100%;\n order: 2;\n}\n\n/* Add 1 or 2 buttons to the right of the heading */\n.Subhead-actions {\n margin: var(--base-size-4, 4px) 0 var(--base-size-4, 4px) var(--base-size-4, 4px);\n align-self: center;\n justify-content: flex-end;\n order: 1;\n\n & + .Subhead-description {\n margin-top: var(--base-size-4, 4px);\n }\n}\n"]}