openproject-primer_view_components 0.39.0 → 0.40.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 +19 -0
- data/app/assets/javascripts/app/components/primer/alpha/toggle_switch.d.ts +4 -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.css +1 -1
- data/app/components/primer/alpha/action_list.css.map +1 -1
- data/app/components/primer/alpha/action_list.pcss +1 -1
- data/app/components/primer/alpha/select_panel_element.js +43 -8
- data/app/components/primer/alpha/select_panel_element.ts +50 -9
- data/app/components/primer/alpha/toggle_switch.d.ts +4 -0
- data/app/components/primer/alpha/toggle_switch.js +16 -4
- data/app/components/primer/alpha/toggle_switch.rb +4 -2
- data/app/components/primer/alpha/toggle_switch.ts +19 -4
- data/lib/primer/view_components/version.rb +1 -1
- data/previews/primer/alpha/toggle_switch_preview.rb +4 -0
- data/previews/primer/open_project/page_header_preview/create_action.html.erb +21 -0
- data/previews/primer/open_project/page_header_preview.rb +14 -8
- data/static/arguments.json +6 -0
- data/static/info_arch.json +33 -0
- data/static/previews.json +27 -0
- metadata +3 -2
| @@ -111,28 +111,34 @@ module Primer | |
| 111 111 | 
             
                  # The missing label will be resolved automatically when included into the core
         | 
| 112 112 | 
             
                  def zen_mode_button_actions
         | 
| 113 113 | 
             
                    render(Primer::OpenProject::PageHeader.new) do |component|
         | 
| 114 | 
            -
                      component.with_title { "Great  | 
| 114 | 
            +
                      component.with_title { "Great user" }
         | 
| 115 115 | 
             
                      component.with_breadcrumbs([{ href: "/foo", text: "Foo" }, { href: "/bar", text: "Bar" }, "Baz"])
         | 
| 116 116 |  | 
| 117 117 | 
             
                      # The missing label will be resolved automatically when included into the core
         | 
| 118 118 | 
             
                      component.with_action_zen_mode_button
         | 
| 119 | 
            -
                      component.with_action_button(mobile_icon: " | 
| 120 | 
            -
                        button.with_leading_visual_icon(icon: " | 
| 121 | 
            -
                        " | 
| 119 | 
            +
                      component.with_action_button(mobile_icon: "person", mobile_label: "Profile") do |button|
         | 
| 120 | 
            +
                        button.with_leading_visual_icon(icon: "person")
         | 
| 121 | 
            +
                        "Profile"
         | 
| 122 122 | 
             
                      end
         | 
| 123 123 | 
             
                    end
         | 
| 124 124 | 
             
                  end
         | 
| 125 125 |  | 
| 126 | 
            +
                  # @label With a create action
         | 
| 127 | 
            +
                  # Create action usually belong into the Primer::OpenProject::SubHeader
         | 
| 128 | 
            +
                  def create_action
         | 
| 129 | 
            +
                    render_with_template(locals: {})
         | 
| 130 | 
            +
                  end
         | 
| 131 | 
            +
             | 
| 126 132 | 
             
                  # @label With a single action
         | 
| 127 133 | 
             
                  # The single action will not be transformed into a menu on mobile, but remains in a smaller variant
         | 
| 128 134 | 
             
                  def single_action
         | 
| 129 135 | 
             
                    render(Primer::OpenProject::PageHeader.new) do |component|
         | 
| 130 | 
            -
                      component.with_title { "Great  | 
| 136 | 
            +
                      component.with_title { "Great user" }
         | 
| 131 137 | 
             
                      component.with_breadcrumbs([{ href: "/foo", text: "Foo" }, { href: "/bar", text: "Bar" }, "Baz"])
         | 
| 132 138 |  | 
| 133 | 
            -
                      component.with_action_button(mobile_icon: " | 
| 134 | 
            -
                        button.with_leading_visual_icon(icon: " | 
| 135 | 
            -
                        " | 
| 139 | 
            +
                      component.with_action_button(mobile_icon: "person", mobile_label: "Profile") do |button|
         | 
| 140 | 
            +
                        button.with_leading_visual_icon(icon: "person")
         | 
| 141 | 
            +
                        "Profile"
         | 
| 136 142 | 
             
                      end
         | 
| 137 143 | 
             
                    end
         | 
| 138 144 | 
             
                  end
         | 
    
        data/static/arguments.json
    CHANGED
    
    | @@ -2986,6 +2986,12 @@ | |
| 2986 2986 | 
             
                    "default": "`:start`",
         | 
| 2987 2987 | 
             
                    "description": "Which side of the toggle switch to render the status label. One of `:end` or `:start`."
         | 
| 2988 2988 | 
             
                  },
         | 
| 2989 | 
            +
                  {
         | 
| 2990 | 
            +
                    "name": "turbo",
         | 
| 2991 | 
            +
                    "type": "Boolean",
         | 
| 2992 | 
            +
                    "default": "`false`",
         | 
| 2993 | 
            +
                    "description": "Whether or not to request a turbo stream and render the response as such."
         | 
| 2994 | 
            +
                  },
         | 
| 2989 2995 | 
             
                  {
         | 
| 2990 2996 | 
             
                    "name": "system_arguments",
         | 
| 2991 2997 | 
             
                    "type": "Hash",
         | 
    
        data/static/info_arch.json
    CHANGED
    
    | @@ -9334,6 +9334,12 @@ | |
| 9334 9334 | 
             
                    "default": "`:start`",
         | 
| 9335 9335 | 
             
                    "description": "Which side of the toggle switch to render the status label. One of `:end` or `:start`."
         | 
| 9336 9336 | 
             
                  },
         | 
| 9337 | 
            +
                  {
         | 
| 9338 | 
            +
                    "name": "turbo",
         | 
| 9339 | 
            +
                    "type": "Boolean",
         | 
| 9340 | 
            +
                    "default": "`false`",
         | 
| 9341 | 
            +
                    "description": "Whether or not to request a turbo stream and render the response as such."
         | 
| 9342 | 
            +
                  },
         | 
| 9337 9343 | 
             
                  {
         | 
| 9338 9344 | 
             
                    "name": "system_arguments",
         | 
| 9339 9345 | 
             
                    "type": "Hash",
         | 
| @@ -9501,6 +9507,20 @@ | |
| 9501 9507 | 
             
                        "color-contrast"
         | 
| 9502 9508 | 
             
                      ]
         | 
| 9503 9509 | 
             
                    }
         | 
| 9510 | 
            +
                  },
         | 
| 9511 | 
            +
                  {
         | 
| 9512 | 
            +
                    "preview_path": "primer/alpha/toggle_switch/with_turbo",
         | 
| 9513 | 
            +
                    "name": "with_turbo",
         | 
| 9514 | 
            +
                    "snapshot": "false",
         | 
| 9515 | 
            +
                    "skip_rules": {
         | 
| 9516 | 
            +
                      "wont_fix": [
         | 
| 9517 | 
            +
                        "region",
         | 
| 9518 | 
            +
                        "button-name"
         | 
| 9519 | 
            +
                      ],
         | 
| 9520 | 
            +
                      "will_fix": [
         | 
| 9521 | 
            +
                        "color-contrast"
         | 
| 9522 | 
            +
                      ]
         | 
| 9523 | 
            +
                    }
         | 
| 9504 9524 | 
             
                  }
         | 
| 9505 9525 | 
             
                ],
         | 
| 9506 9526 | 
             
                "subcomponents": [
         | 
| @@ -17828,6 +17848,19 @@ | |
| 17828 17848 | 
             
                      ]
         | 
| 17829 17849 | 
             
                    }
         | 
| 17830 17850 | 
             
                  },
         | 
| 17851 | 
            +
                  {
         | 
| 17852 | 
            +
                    "preview_path": "primer/open_project/page_header/create_action",
         | 
| 17853 | 
            +
                    "name": "create_action",
         | 
| 17854 | 
            +
                    "snapshot": "false",
         | 
| 17855 | 
            +
                    "skip_rules": {
         | 
| 17856 | 
            +
                      "wont_fix": [
         | 
| 17857 | 
            +
                        "region"
         | 
| 17858 | 
            +
                      ],
         | 
| 17859 | 
            +
                      "will_fix": [
         | 
| 17860 | 
            +
                        "color-contrast"
         | 
| 17861 | 
            +
                      ]
         | 
| 17862 | 
            +
                    }
         | 
| 17863 | 
            +
                  },
         | 
| 17831 17864 | 
             
                  {
         | 
| 17832 17865 | 
             
                    "preview_path": "primer/open_project/page_header/single_action",
         | 
| 17833 17866 | 
             
                    "name": "single_action",
         | 
    
        data/static/previews.json
    CHANGED
    
    | @@ -5443,6 +5443,19 @@ | |
| 5443 5443 | 
             
                      ]
         | 
| 5444 5444 | 
             
                    }
         | 
| 5445 5445 | 
             
                  },
         | 
| 5446 | 
            +
                  {
         | 
| 5447 | 
            +
                    "preview_path": "primer/open_project/page_header/create_action",
         | 
| 5448 | 
            +
                    "name": "create_action",
         | 
| 5449 | 
            +
                    "snapshot": "false",
         | 
| 5450 | 
            +
                    "skip_rules": {
         | 
| 5451 | 
            +
                      "wont_fix": [
         | 
| 5452 | 
            +
                        "region"
         | 
| 5453 | 
            +
                      ],
         | 
| 5454 | 
            +
                      "will_fix": [
         | 
| 5455 | 
            +
                        "color-contrast"
         | 
| 5456 | 
            +
                      ]
         | 
| 5457 | 
            +
                    }
         | 
| 5458 | 
            +
                  },
         | 
| 5446 5459 | 
             
                  {
         | 
| 5447 5460 | 
             
                    "preview_path": "primer/open_project/page_header/single_action",
         | 
| 5448 5461 | 
             
                    "name": "single_action",
         | 
| @@ -7810,6 +7823,20 @@ | |
| 7810 7823 | 
             
                        "color-contrast"
         | 
| 7811 7824 | 
             
                      ]
         | 
| 7812 7825 | 
             
                    }
         | 
| 7826 | 
            +
                  },
         | 
| 7827 | 
            +
                  {
         | 
| 7828 | 
            +
                    "preview_path": "primer/alpha/toggle_switch/with_turbo",
         | 
| 7829 | 
            +
                    "name": "with_turbo",
         | 
| 7830 | 
            +
                    "snapshot": "false",
         | 
| 7831 | 
            +
                    "skip_rules": {
         | 
| 7832 | 
            +
                      "wont_fix": [
         | 
| 7833 | 
            +
                        "region",
         | 
| 7834 | 
            +
                        "button-name"
         | 
| 7835 | 
            +
                      ],
         | 
| 7836 | 
            +
                      "will_fix": [
         | 
| 7837 | 
            +
                        "color-contrast"
         | 
| 7838 | 
            +
                      ]
         | 
| 7839 | 
            +
                    }
         | 
| 7813 7840 | 
             
                  }
         | 
| 7814 7841 | 
             
                ]
         | 
| 7815 7842 | 
             
              },
         | 
    
        metadata
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: openproject-primer_view_components
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0. | 
| 4 | 
            +
              version: 0.40.0
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - GitHub Open Source
         | 
| @@ -9,7 +9,7 @@ authors: | |
| 9 9 | 
             
            autorequire: 
         | 
| 10 10 | 
             
            bindir: bin
         | 
| 11 11 | 
             
            cert_chain: []
         | 
| 12 | 
            -
            date: 2024-07- | 
| 12 | 
            +
            date: 2024-07-29 00:00:00.000000000 Z
         | 
| 13 13 | 
             
            dependencies:
         | 
| 14 14 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 15 15 | 
             
              name: actionview
         | 
| @@ -987,6 +987,7 @@ files: | |
| 987 987 | 
             
            - previews/primer/open_project/input_group_preview.rb
         | 
| 988 988 | 
             
            - previews/primer/open_project/page_header_preview.rb
         | 
| 989 989 | 
             
            - previews/primer/open_project/page_header_preview/actions.html.erb
         | 
| 990 | 
            +
            - previews/primer/open_project/page_header_preview/create_action.html.erb
         | 
| 990 991 | 
             
            - previews/primer/open_project/page_header_preview/playground.html.erb
         | 
| 991 992 | 
             
            - previews/primer/open_project/side_panel_preview.rb
         | 
| 992 993 | 
             
            - previews/primer/open_project/side_panel_preview/default.html.erb
         |