openproject-primer_view_components 0.56.1 → 0.58.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 +16 -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/dialog.css +1 -1
- data/app/components/primer/alpha/dialog.css.json +0 -1
- data/app/components/primer/alpha/dialog.css.map +1 -1
- data/app/components/primer/alpha/dialog.pcss +1 -4
- data/app/components/primer/alpha/select_panel.html.erb +5 -0
- data/app/components/primer/alpha/select_panel.rb +23 -24
- data/app/components/primer/alpha/select_panel_element.js +6 -4
- data/app/components/primer/alpha/select_panel_element.ts +8 -4
- data/app/components/primer/beta/auto_complete/item.rb +2 -3
- data/app/components/primer/beta/auto_complete/no_result_item.rb +21 -0
- data/lib/primer/view_components/version.rb +2 -2
- data/previews/primer/alpha/select_panel_preview/remote_fetch_form.html.erb +34 -0
- data/previews/primer/alpha/select_panel_preview.rb +9 -0
- data/previews/primer/beta/auto_complete_preview.rb +6 -0
- data/previews/primer/beta/nav_list_preview/truncate.html.erb +25 -0
- data/previews/primer/beta/nav_list_preview.rb +4 -24
- data/static/arguments.json +13 -80
- data/static/audited_at.json +1 -0
- data/static/constants.json +4 -0
- data/static/info_arch.json +95 -96
- data/static/previews.json +28 -15
- data/static/statuses.json +1 -0
- metadata +5 -2
data/static/info_arch.json
CHANGED
@@ -7438,7 +7438,7 @@
|
|
7438
7438
|
},
|
7439
7439
|
{
|
7440
7440
|
"fully_qualified_name": "Primer::Alpha::SelectPanel",
|
7441
|
-
"description": "Select panels allow for selecting from a large number of options and can be thought of as a more capable\nversion of the traditional HTML `<select>` element.\n\nSelect panels:\n\n1. feature an input field at the top that allows an end user to filter the list of results.\n1. can render their items statically or dynamically by fetching results from the server.\n1. allow selecting a single item or multiple items.\n1. permit leading visuals like Octicons, avatars, and custom SVGs.\n1. can be used as form inputs in Rails forms.\n\n## Static list items\n\nThe Rails `SelectPanel` component allows items to be provided statically or loaded dynamically from the\nserver. Providing items statically is done using a fetch strategy of `:local` in combination with the\n`item` slot:\n\n```erb\n<%= render(Primer::Alpha::SelectPanel.new(fetch_strategy: :local))) do |panel| %>\n <% panel.with_show_button { \"Select item\" } %>\n <% panel.with_item(label: \"Item 1\") %>\n <% panel.with_item(label: \"Item 2\") %>\n<% end %>\n```\n\n## Dynamic list items\n\nList items can also be fetched dynamically from the server and will require creating a Rails controller action\nto respond with the list of items in addition to rendering the `SelectPanel` instance. Render the instance as\nnormal, providing your desired [fetch strategy](#fetch-strategies):\n\n```erb\n<%= render(\n Primer::Alpha::SelectPanel.new(\n fetch_strategy: :remote,\n src: search_items_path # perhaps a Rails URL helper\n )\n) %>\n```\n\nDefine a controller action to serve the list of items. The `SelectPanel` component passes any filter text in\nthe `q=` URL parameter.\n\n```ruby\nclass SearchItemsController < ApplicationController\n def show\n # NOTE: params[:q] may be nil since there is no filter string available\n # when the panel is first opened\n @results = SomeModel.search(params[:q] || \"\")\n end\nend\n```\n\nResponses must be HTML fragments, eg. have a content type of `text/html+fragment`. This content type isn't\navailable by default in Rails, so you may have to register it eg. in an initializer:\n\n```ruby\nMime::Type.register(\"text/fragment+html\", :html_fragment)\n```\n\nRender a `Primer::Alpha::SelectPanel::ItemList` in the action's template, search_items/show.html_fragment.erb:\n\n```erb\n<%= render(Primer::Alpha::SelectPanel::ItemList.new) do |list| %>\n <% @results.each do |result| %>\n <% list.with_item(label: result.title) do |item| %>\n <% item.with_description(result.description) %>\n <% end %>\n <% end %>\n<% end %>\n```\n\n### Selection consistency\n\nThe `SelectPanel` component automatically \"remembers\" which items have been selected across item fetch requests,\nmeaning the controller that renders dynamic list items does not (and should not) remember these selections or\npersist them until the user has confirmed them, either by submitting the form or otherwise indicating completion.\nThe `SelectPanel` component does not include unconfirmed selection data in requests.\n\n## Fetch strategies\n\nThe list of items can be fetched from a remote URL, or provided as a static list, configured using the\n`fetch_strategy` attribute. Fetch strategies are summarized below.\n\n1. `:remote`: a query is made to the URL in the `src` attribute every time the input field changes.\n\n2. `:eventually_local`: a query is made to the URL in the `src` attribute when the panel is first opened. The\n results are \"remembered\" and filtered in-memory for all subsequent filter operations, i.e. when the input\n field changes.\n\n3. `:local`: the list of items is provided statically ahead of time and filtered in-memory. No requests are made\n to the server.\n\n## Customizing filter behavior\n\nIf the fetch strategy is `:remote`, then filtering is handled server-side. The server should render a\n`Primer::Alpha::SelectPanel::ItemList` (an alias of {{#link_to_component}}Primer::Alpha::ActionList{{/link_to_component}})\nin the response containing the filtered list of items. The component achieves remote fetching via the\n[remote-input-element](https://github.com/github/remote-input-element), which sends a request to the\nserver with the filter string in the `q=` parameter. Responses must be HTML fragments, eg. have a content\ntype of `text/html+fragment`.\n\n### Local filtering\n\nIf the fetch strategy is `:local` or `:eventually_local`, filtering is performed client-side. Filter behavior can\nbe customized in JavaScript by setting the `filterFn` attribute on the instance of `SelectPanelElement`, eg:\n\n```javascript\ndocument.querySelector(\"select-panel\").filterFn = (item: HTMLElement, query: string): boolean => {\n // return true if the item should be displayed, false otherwise\n}\n```\n\nThe element's default filter function uses the value of the `data-filter-string` attribute, falling back to the\nelement's `innerText` property. It performs a case-insensitive substring match against the filter string.\n\n### `SelectPanel`s as form inputs\n\n`SelectPanel`s can be used as form inputs. They behave very similarly to how HTML `<select>` boxes behave, and\nplay nicely with Rails' built-in form mechanisms. Pass arguments via the `form_arguments:` argument, including\nthe Rails form builder object and the name of the field. Each list item must also have a value specified in\n`content_arguments: { data: { value: } }`.\n\n```erb\n<% form_with(model: Address.new) do |f| %>\n <%= render(Primer::Alpha::SelectPanel.new(form_arguments: { builder: f, name: \"country\" })) do |menu| %>\n <% countries.each do |country|\n <% menu.with_item(label: country.name, content_arguments: { data: { value: country.code } }) %>\n <% end %>\n <% end %>\n<% end %>\n```\n\nThe value of the `data: { value: ... }` argument is sent to the server on submit, keyed using the name provided above\n(eg. `\"country\"`). If no value is provided for an item, the value of that item is the item's label. Here's the\ncorresponding `AddressesController` that might be written to handle the form above:\n\n```ruby\nclass AddressesController < ApplicationController\n def create\n puts \"You chose #{address_params[:country]} as your country\"\n end\n\n private\n\n def address_params\n params.require(:address).permit(:country)\n end\nend\n```\n\nIf items are provided dynamically, things become a bit more complicated. The `form_for` or `form_with` method call\nhappens in the view that renders the `SelectPanel`, which means the form builder object but isn't available in the\nview that renders the list items. In such a case, it can be useful to create an instance of the form builder maually:\n\n```erb\n<% builder = ActionView::Helpers::FormBuilder.new(\n \"address\", # the name of the model, used to wrap input names, eg 'address[country]'\n nil, # object (eg. the Address instance, which we can omit)\n self, # template\n {} # options\n) %>\n<%= render(Primer::Alpha::SelectPanel::ItemList.new(\n form_arguments: { builder: builder, name: \"country\" }\n)) do |list| %>\n <% countries.each do |country| %>\n <% menu.with_item(label: country.name, content_arguments: { data: { value: country.code } }) %>\n <% end %>\n<% end %>\n```\n\n### JavaScript API\n\n`SelectPanel`s render a `<select-panel>` custom element that exposes behavior to the client.\n\n#### Utility methods\n\n* `show()`: Manually open the panel. Under normal circumstances, a show button is used to show the panel, but this method exists to support unusual use-cases.\n* `hide()`: Manually hides (closes) the panel.\n\n#### Query methods\n\n* `getItemById(itemId: string): Element`: Returns the item's HTML `<li>` element. The return value can be passed as the `item` argument to the other methods listed below.\n* `isItemChecked(item: Element): boolean`: Returns `true` if the item is checked, `false` otherwise.\n* `isItemHidden(item: Element): boolean`: Returns `true` if the item is hidden, `false` otherwise.\n* `isItemDisabled(item: Element): boolean`: Returns `true` if the item is disabled, `false` otherwise.\n\nNOTE: Item IDs are special values provided by the user that are attached to `SelectPanel` list items as the `data-item-id`\nHTML attribute. Item IDs can be provided by passing an `item_id:` attribute when adding items to the panel, eg:\n\n```erb\n<%= render(Primer::Alpha::SelectPanel.new) do |panel| %>\n <% panel.with_item(item_id: \"my-id\") %>\n<% end %>\n```\n\nThe same is true when rendering `ItemList`s:\n\n```erb\n<%= render(Primer::Alpha::SelectPanel::ItemList.new) do |list| %>\n <% list.with_item(item_id: \"my-id\") %>\n<% end %>\n```\n\n#### State methods\n\n* `enableItem(item: Element)`: Enables the item, i.e. makes it clickable by the mouse and keyboard.\n* `disableItem(item: Element)`: Disables the item, i.e. makes it unclickable by the mouse and keyboard.\n* `checkItem(item: Element)`: Checks the item. Only has an effect in single- and multi-select modes.\n* `uncheckItem(item: Element)`: Unchecks the item. Only has an effect in multi-select mode, since items cannot be unchecked in single-select mode.\n\n#### Events\n\n|Name |Type |Bubbles |Cancelable |\n|:--------------------|:------------------------------------------|:-------|:----------|\n|`itemActivated` |`CustomEvent<ItemActivatedEvent>` |Yes |No |\n|`beforeItemActivated`|`CustomEvent<ItemActivatedEvent>` |Yes |Yes |\n|`dialog:open` |`CustomEvent<{dialog: HTMLDialogElement}>` |No |No |\n|`panelClosed` |`CustomEvent<{panel: SelectPanelElement}>` |Yes |No |\n\n_Item activation_\n\nThe `<select-panel>` element fires an `itemActivated` event whenever an item is activated (eg. clicked) via the mouse or keyboard.\n\n```typescript\ndocument.querySelector(\"select-panel\").addEventListener(\n \"itemActivated\",\n (event: CustomEvent<ItemActivatedEvent>) => {\n event.detail.item // Element: the <li> item that was activated\n event.detail.checked // boolean: whether or not the result of the activation checked the item\n }\n)\n```\n\nThe `beforeItemActivated` event fires before an item is activated. Canceling this event will prevent the item\nfrom being activated.\n\n```typescript\ndocument.querySelector(\"select-panel\").addEventListener(\n \"beforeItemActivated\",\n (event: CustomEvent<ItemActivatedEvent>) => {\n event.detail.item // Element: the <li> item that was activated\n event.detail.checked // boolean: whether or not the result of the activation checked the item\n event.preventDefault() // Cancel the event to prevent activation (eg. checking/unchecking)\n }\n)\n```",
|
7441
|
+
"description": "Select panels allow for selecting from a large number of options and can be thought of as a more capable\nversion of the traditional HTML `<select>` element.\n\nSelect panels:\n\n1. feature an input field at the top that allows an end user to filter the list of results.\n1. can render their items statically or dynamically by fetching results from the server.\n1. allow selecting a single item or multiple items.\n1. permit leading visuals like Octicons, avatars, and custom SVGs.\n1. can be used as form inputs in Rails forms.\n\n## Static list items\n\nThe Rails `SelectPanel` component allows items to be provided statically or loaded dynamically from the\nserver. Providing items statically is done using a fetch strategy of `:local` in combination with the\n`item` slot:\n\n```erb\n<%= render(Primer::Alpha::SelectPanel.new(fetch_strategy: :local))) do |panel| %>\n <% panel.with_show_button { \"Select item\" } %>\n <% panel.with_item(label: \"Item 1\") %>\n <% panel.with_item(label: \"Item 2\") %>\n<% end %>\n```\n\n## Dynamic list items\n\nList items can also be fetched dynamically from the server and will require creating a Rails controller action\nto respond with the list of items in addition to rendering the `SelectPanel` instance. Render the instance as\nnormal, providing your desired [fetch strategy](#fetch-strategies):\n\n```erb\n<%= render(\n Primer::Alpha::SelectPanel.new(\n fetch_strategy: :remote,\n src: search_items_path # perhaps a Rails URL helper\n )\n) %>\n```\n\nDefine a controller action to serve the list of items. The `SelectPanel` component passes any filter text in\nthe `q=` URL parameter.\n\n```ruby\nclass SearchItemsController < ApplicationController\n def show\n # NOTE: params[:q] may be nil since there is no filter string available\n # when the panel is first opened\n @results = SomeModel.search(params[:q] || \"\")\n end\nend\n```\n\nResponses must be HTML fragments, eg. have a content type of `text/html+fragment`. This content type isn't\navailable by default in Rails, so you may have to register it eg. in an initializer:\n\n```ruby\nMime::Type.register(\"text/fragment+html\", :html_fragment)\n```\n\nRender a `Primer::Alpha::SelectPanel::ItemList` in the action's template, search_items/show.html_fragment.erb:\n\n```erb\n<%= render(Primer::Alpha::SelectPanel::ItemList.new) do |list| %>\n <% @results.each do |result| %>\n <% list.with_item(label: result.title) do |item| %>\n <% item.with_description(result.description) %>\n <% end %>\n <% end %>\n<% end %>\n```\n\n### Selection consistency\n\nThe `SelectPanel` component automatically \"remembers\" which items have been selected across item fetch requests,\nmeaning the controller that renders dynamic list items does not (and should not) remember these selections or\npersist them until the user has confirmed them, either by submitting the form or otherwise indicating completion.\nThe `SelectPanel` component does not include unconfirmed selection data in requests.\n\n## Fetch strategies\n\nThe list of items can be fetched from a remote URL, or provided as a static list, configured using the\n`fetch_strategy` attribute. Fetch strategies are summarized below.\n\n1. `:remote`: a query is made to the URL in the `src` attribute every time the input field changes.\n\n2. `:eventually_local`: a query is made to the URL in the `src` attribute when the panel is first opened. The\n results are \"remembered\" and filtered in-memory for all subsequent filter operations, i.e. when the input\n field changes.\n\n3. `:local`: the list of items is provided statically ahead of time and filtered in-memory. No requests are made\n to the server.\n\n## Customizing filter behavior\n\nIf the fetch strategy is `:remote`, then filtering is handled server-side. The server should render a\n`Primer::Alpha::SelectPanel::ItemList` (an alias of {{#link_to_component}}Primer::Alpha::ActionList{{/link_to_component}})\nin the response containing the filtered list of items. The component achieves remote fetching via the\n[remote-input-element](https://github.com/github/remote-input-element), which sends a request to the\nserver with the filter string in the `q=` parameter. Responses must be HTML fragments, eg. have a content\ntype of `text/html+fragment`.\n\n### Local filtering\n\nIf the fetch strategy is `:local` or `:eventually_local`, filtering is performed client-side. Filter behavior can\nbe customized in JavaScript by setting the `filterFn` attribute on the instance of `SelectPanelElement`, eg:\n\n```javascript\ndocument.querySelector(\"select-panel\").filterFn = (item: HTMLElement, query: string): boolean => {\n // return true if the item should be displayed, false otherwise\n}\n```\n\nThe element's default filter function uses the value of the `data-filter-string` attribute, falling back to the\nelement's `innerText` property. It performs a case-insensitive substring match against the filter string.\n\n### `SelectPanel`s as form inputs\n\n`SelectPanel`s can be used as form inputs. They behave very similarly to how HTML `<select>` boxes behave, and\nplay nicely with Rails' built-in form mechanisms. Pass arguments via the `form_arguments:` argument, including\nthe Rails form builder object and the name of the field. Each list item must also have a value specified in\n`content_arguments: { data: { value: } }`.\n\n```erb\n<% form_with(model: Address.new) do |f| %>\n <%= render(Primer::Alpha::SelectPanel.new(form_arguments: { builder: f, name: \"country\" })) do |menu| %>\n <% countries.each do |country|\n <% menu.with_item(label: country.name, content_arguments: { data: { value: country.code } }) %>\n <% end %>\n <% end %>\n<% end %>\n```\n\nThe value of the `data: { value: ... }` argument is sent to the server on submit, keyed using the name provided above\n(eg. `\"country\"`). If no value is provided for an item, the value of that item is the item's label. Here's the\ncorresponding `AddressesController` that might be written to handle the form above:\n\n```ruby\nclass AddressesController < ApplicationController\n def create\n puts \"You chose #{address_params[:country]} as your country\"\n end\n\n private\n\n def address_params\n params.require(:address).permit(:country)\n end\nend\n```\n### JavaScript API\n\n`SelectPanel`s render a `<select-panel>` custom element that exposes behavior to the client.\n\n#### Utility methods\n\n* `show()`: Manually open the panel. Under normal circumstances, a show button is used to show the panel, but this method exists to support unusual use-cases.\n* `hide()`: Manually hides (closes) the panel.\n\n#### Query methods\n\n* `getItemById(itemId: string): Element`: Returns the item's HTML `<li>` element. The return value can be passed as the `item` argument to the other methods listed below.\n* `isItemChecked(item: Element): boolean`: Returns `true` if the item is checked, `false` otherwise.\n* `isItemHidden(item: Element): boolean`: Returns `true` if the item is hidden, `false` otherwise.\n* `isItemDisabled(item: Element): boolean`: Returns `true` if the item is disabled, `false` otherwise.\n\nNOTE: Item IDs are special values provided by the user that are attached to `SelectPanel` list items as the `data-item-id`\nHTML attribute. Item IDs can be provided by passing an `item_id:` attribute when adding items to the panel, eg:\n\n```erb\n<%= render(Primer::Alpha::SelectPanel.new) do |panel| %>\n <% panel.with_item(item_id: \"my-id\") %>\n<% end %>\n```\n\nThe same is true when rendering `ItemList`s:\n\n```erb\n<%= render(Primer::Alpha::SelectPanel::ItemList.new) do |list| %>\n <% list.with_item(item_id: \"my-id\") %>\n<% end %>\n```\n\n#### State methods\n\n* `enableItem(item: Element)`: Enables the item, i.e. makes it clickable by the mouse and keyboard.\n* `disableItem(item: Element)`: Disables the item, i.e. makes it unclickable by the mouse and keyboard.\n* `checkItem(item: Element)`: Checks the item. Only has an effect in single- and multi-select modes.\n* `uncheckItem(item: Element)`: Unchecks the item. Only has an effect in multi-select mode, since items cannot be unchecked in single-select mode.\n\n#### Events\n\n|Name |Type |Bubbles |Cancelable |\n|:--------------------|:------------------------------------------|:-------|:----------|\n|`itemActivated` |`CustomEvent<ItemActivatedEvent>` |Yes |No |\n|`beforeItemActivated`|`CustomEvent<ItemActivatedEvent>` |Yes |Yes |\n|`dialog:open` |`CustomEvent<{dialog: HTMLDialogElement}>` |No |No |\n|`panelClosed` |`CustomEvent<{panel: SelectPanelElement}>` |Yes |No |\n\n_Item activation_\n\nThe `<select-panel>` element fires an `itemActivated` event whenever an item is activated (eg. clicked) via the mouse or keyboard.\n\n```typescript\ndocument.querySelector(\"select-panel\").addEventListener(\n \"itemActivated\",\n (event: CustomEvent<ItemActivatedEvent>) => {\n event.detail.item // Element: the <li> item that was activated\n event.detail.checked // boolean: whether or not the result of the activation checked the item\n }\n)\n```\n\nThe `beforeItemActivated` event fires before an item is activated. Canceling this event will prevent the item\nfrom being activated.\n\n```typescript\ndocument.querySelector(\"select-panel\").addEventListener(\n \"beforeItemActivated\",\n (event: CustomEvent<ItemActivatedEvent>) => {\n event.detail.item // Element: the <li> item that was activated\n event.detail.checked // boolean: whether or not the result of the activation checked the item\n event.preventDefault() // Cancel the event to prevent activation (eg. checking/unchecking)\n }\n)\n```",
|
7442
7442
|
"accessibility_docs": null,
|
7443
7443
|
"is_form_component": false,
|
7444
7444
|
"is_published": true,
|
@@ -7451,88 +7451,10 @@
|
|
7451
7451
|
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/alpha/select_panel/default/",
|
7452
7452
|
"parameters": [
|
7453
7453
|
{
|
7454
|
-
"name": "
|
7455
|
-
"type": "String",
|
7456
|
-
"default": "`nil`",
|
7457
|
-
"description": "The URL to fetch search results from."
|
7458
|
-
},
|
7459
|
-
{
|
7460
|
-
"name": "title",
|
7461
|
-
"type": "String",
|
7462
|
-
"default": "`\"Menu\"`",
|
7463
|
-
"description": "The title that appears at the top of the panel."
|
7464
|
-
},
|
7465
|
-
{
|
7466
|
-
"name": "id",
|
7467
|
-
"type": "String",
|
7468
|
-
"default": "`self.class.generate_id`",
|
7469
|
-
"description": "The unique ID of the panel."
|
7470
|
-
},
|
7471
|
-
{
|
7472
|
-
"name": "size",
|
7473
|
-
"type": "Symbol",
|
7474
|
-
"default": "`:small`",
|
7475
|
-
"description": "The size of the panel. One of `:auto`, `:large`, `:medium`, `:medium_portrait`, `:small`, or `:xlarge`."
|
7476
|
-
},
|
7477
|
-
{
|
7478
|
-
"name": "select_variant",
|
7479
|
-
"type": "Symbol",
|
7480
|
-
"default": "`:single`",
|
7481
|
-
"description": "One of `:multiple`, `:none`, or `:single`."
|
7482
|
-
},
|
7483
|
-
{
|
7484
|
-
"name": "fetch_strategy",
|
7485
|
-
"type": "Symbol",
|
7486
|
-
"default": "`:remote`",
|
7487
|
-
"description": "One of `:eventually_local`, `:local`, or `:remote`."
|
7488
|
-
},
|
7489
|
-
{
|
7490
|
-
"name": "no_results_label",
|
7491
|
-
"type": "String",
|
7492
|
-
"default": "`\"No results found\"`",
|
7493
|
-
"description": "The label to display when no results are found."
|
7494
|
-
},
|
7495
|
-
{
|
7496
|
-
"name": "preload",
|
7454
|
+
"name": "use_experimental_non_local_form",
|
7497
7455
|
"type": "Boolean",
|
7498
7456
|
"default": "`false`",
|
7499
|
-
"description": "
|
7500
|
-
},
|
7501
|
-
{
|
7502
|
-
"name": "dynamic_label",
|
7503
|
-
"type": "Boolean",
|
7504
|
-
"default": "`false`",
|
7505
|
-
"description": "Whether or not to display the text of the currently selected item in the show button."
|
7506
|
-
},
|
7507
|
-
{
|
7508
|
-
"name": "dynamic_label_prefix",
|
7509
|
-
"type": "String",
|
7510
|
-
"default": "`nil`",
|
7511
|
-
"description": "If provided, the prefix is prepended to the dynamic label and displayed in the show button."
|
7512
|
-
},
|
7513
|
-
{
|
7514
|
-
"name": "dynamic_aria_label_prefix",
|
7515
|
-
"type": "String",
|
7516
|
-
"default": "`nil`",
|
7517
|
-
"description": "If provided, the prefix is prepended to the dynamic label and set as the value of the `aria-label` attribute on the show button."
|
7518
|
-
},
|
7519
|
-
{
|
7520
|
-
"name": "body_id",
|
7521
|
-
"type": "String",
|
7522
|
-
"default": "`nil`",
|
7523
|
-
"description": "The unique ID of the panel body. If not provided, the body ID will be set to the panel ID with a \"-body\" suffix."
|
7524
|
-
},
|
7525
|
-
{
|
7526
|
-
"name": "list_arguments",
|
7527
|
-
"type": "Hash",
|
7528
|
-
"default": "`{}`",
|
7529
|
-
"description": "Arguments to pass to the underlying {{#link_to_component}}Primer::Alpha::ActionList{{/link_to_component}} component. Only has an effect for the local fetch strategy."
|
7530
|
-
},
|
7531
|
-
{
|
7532
|
-
"name": "form_arguments",
|
7533
|
-
"type": "Hash",
|
7534
|
-
"default": "`{}`",
|
7535
|
-
"description": "Form arguments to pass to the underlying {{#link_to_component}}Primer::Alpha::ActionList{{/link_to_component}} component. Only has an effect for the local fetch strategy."
|
7457
|
+
"description": "A feature flag used to slowly roll out moving the input field (generated from form arguments) to the top of the SelectPanel HTML thus allowing remote fetching to have default form values."
|
7536
7458
|
},
|
7537
7459
|
{
|
7538
7460
|
"name": "show_filter",
|
@@ -8052,6 +7974,19 @@
|
|
8052
7974
|
]
|
8053
7975
|
}
|
8054
7976
|
},
|
7977
|
+
{
|
7978
|
+
"preview_path": "primer/alpha/select_panel/remote_fetch_form",
|
7979
|
+
"name": "remote_fetch_form",
|
7980
|
+
"snapshot": "interactive",
|
7981
|
+
"skip_rules": {
|
7982
|
+
"wont_fix": [
|
7983
|
+
"region"
|
7984
|
+
],
|
7985
|
+
"will_fix": [
|
7986
|
+
"color-contrast"
|
7987
|
+
]
|
7988
|
+
}
|
7989
|
+
},
|
8055
7990
|
{
|
8056
7991
|
"preview_path": "primer/alpha/select_panel/multiselect_form",
|
8057
7992
|
"name": "multiselect_form",
|
@@ -10771,6 +10706,19 @@
|
|
10771
10706
|
"color-contrast"
|
10772
10707
|
]
|
10773
10708
|
}
|
10709
|
+
},
|
10710
|
+
{
|
10711
|
+
"preview_path": "primer/beta/auto_complete/no_results",
|
10712
|
+
"name": "no_results",
|
10713
|
+
"snapshot": "false",
|
10714
|
+
"skip_rules": {
|
10715
|
+
"wont_fix": [
|
10716
|
+
"region"
|
10717
|
+
],
|
10718
|
+
"will_fix": [
|
10719
|
+
"color-contrast"
|
10720
|
+
]
|
10721
|
+
}
|
10774
10722
|
}
|
10775
10723
|
],
|
10776
10724
|
"subcomponents": [
|
@@ -10871,6 +10819,70 @@
|
|
10871
10819
|
],
|
10872
10820
|
"subcomponents": [
|
10873
10821
|
|
10822
|
+
]
|
10823
|
+
},
|
10824
|
+
{
|
10825
|
+
"fully_qualified_name": "Primer::Beta::AutoComplete::NoResultItem",
|
10826
|
+
"description": "",
|
10827
|
+
"accessibility_docs": null,
|
10828
|
+
"is_form_component": false,
|
10829
|
+
"is_published": true,
|
10830
|
+
"requires_js": false,
|
10831
|
+
"component": "AutoComplete::NoResultItem",
|
10832
|
+
"status": "beta",
|
10833
|
+
"a11y_reviewed": false,
|
10834
|
+
"short_name": "AutoCompleteNoResultItem",
|
10835
|
+
"source": "https://github.com/primer/view_components/tree/main/app/components/primer/beta/auto_complete/no_result_item.rb",
|
10836
|
+
"lookbook": "https://primer.style/view-components/lookbook/inspect/primer/beta/auto_complete/no_result_item/default/",
|
10837
|
+
"parameters": [
|
10838
|
+
|
10839
|
+
],
|
10840
|
+
"slots": [
|
10841
|
+
{
|
10842
|
+
"name": "leading_visual",
|
10843
|
+
"description": "The leading visual rendered before the link.",
|
10844
|
+
"parameters": [
|
10845
|
+
{
|
10846
|
+
"name": "kwargs",
|
10847
|
+
"type": "Hash",
|
10848
|
+
"default": "N/A",
|
10849
|
+
"description": "The arguments accepted by {{#link_to_component}}Primer::Beta::Avatar{{/link_to_component}} or {{#link_to_component}}Primer::Beta::Octicon{{/link_to_component}}"
|
10850
|
+
}
|
10851
|
+
]
|
10852
|
+
},
|
10853
|
+
{
|
10854
|
+
"name": "trailing_visual",
|
10855
|
+
"description": "The trailing visual rendered after the link.",
|
10856
|
+
"parameters": [
|
10857
|
+
{
|
10858
|
+
"name": "kwargs",
|
10859
|
+
"type": "Hash",
|
10860
|
+
"default": "N/A",
|
10861
|
+
"description": "The arguments accepted by {{#link_to_component}}Primer::Beta::Octicon{{/link_to_component}}, {{#link_to_component}}Primer::Beta::Label{{/link_to_component}}, or {{#link_to_component}}Primer::Beta::Counter{{/link_to_component}}"
|
10862
|
+
}
|
10863
|
+
]
|
10864
|
+
},
|
10865
|
+
{
|
10866
|
+
"name": "description",
|
10867
|
+
"description": "Optional description",
|
10868
|
+
"parameters": [
|
10869
|
+
{
|
10870
|
+
"name": "system_arguments",
|
10871
|
+
"type": "Hash",
|
10872
|
+
"default": "N/A",
|
10873
|
+
"description": "{{link_to_system_arguments_docs}}"
|
10874
|
+
}
|
10875
|
+
]
|
10876
|
+
}
|
10877
|
+
],
|
10878
|
+
"methods": [
|
10879
|
+
|
10880
|
+
],
|
10881
|
+
"previews": [
|
10882
|
+
|
10883
|
+
],
|
10884
|
+
"subcomponents": [
|
10885
|
+
|
10874
10886
|
]
|
10875
10887
|
}
|
10876
10888
|
]
|
@@ -14853,8 +14865,8 @@
|
|
14853
14865
|
}
|
14854
14866
|
},
|
14855
14867
|
{
|
14856
|
-
"preview_path": "primer/beta/nav_list/
|
14857
|
-
"name": "
|
14868
|
+
"preview_path": "primer/beta/nav_list/truncate",
|
14869
|
+
"name": "truncate",
|
14858
14870
|
"snapshot": "true",
|
14859
14871
|
"skip_rules": {
|
14860
14872
|
"wont_fix": [
|
@@ -14878,19 +14890,6 @@
|
|
14878
14890
|
]
|
14879
14891
|
}
|
14880
14892
|
},
|
14881
|
-
{
|
14882
|
-
"preview_path": "primer/beta/nav_list/long_label_truncate_no_tooltip",
|
14883
|
-
"name": "long_label_truncate_no_tooltip",
|
14884
|
-
"snapshot": "false",
|
14885
|
-
"skip_rules": {
|
14886
|
-
"wont_fix": [
|
14887
|
-
"region"
|
14888
|
-
],
|
14889
|
-
"will_fix": [
|
14890
|
-
"color-contrast"
|
14891
|
-
]
|
14892
|
-
}
|
14893
|
-
},
|
14894
14893
|
{
|
14895
14894
|
"preview_path": "primer/beta/nav_list/long_label_show_tooltip_no_truncate_label",
|
14896
14895
|
"name": "long_label_show_tooltip_no_truncate_label",
|
data/static/previews.json
CHANGED
@@ -1154,6 +1154,19 @@
|
|
1154
1154
|
"color-contrast"
|
1155
1155
|
]
|
1156
1156
|
}
|
1157
|
+
},
|
1158
|
+
{
|
1159
|
+
"preview_path": "primer/beta/auto_complete/no_results",
|
1160
|
+
"name": "no_results",
|
1161
|
+
"snapshot": "false",
|
1162
|
+
"skip_rules": {
|
1163
|
+
"wont_fix": [
|
1164
|
+
"region"
|
1165
|
+
],
|
1166
|
+
"will_fix": [
|
1167
|
+
"color-contrast"
|
1168
|
+
]
|
1169
|
+
}
|
1157
1170
|
}
|
1158
1171
|
]
|
1159
1172
|
},
|
@@ -5397,8 +5410,8 @@
|
|
5397
5410
|
}
|
5398
5411
|
},
|
5399
5412
|
{
|
5400
|
-
"preview_path": "primer/beta/nav_list/
|
5401
|
-
"name": "
|
5413
|
+
"preview_path": "primer/beta/nav_list/truncate",
|
5414
|
+
"name": "truncate",
|
5402
5415
|
"snapshot": "true",
|
5403
5416
|
"skip_rules": {
|
5404
5417
|
"wont_fix": [
|
@@ -5422,19 +5435,6 @@
|
|
5422
5435
|
]
|
5423
5436
|
}
|
5424
5437
|
},
|
5425
|
-
{
|
5426
|
-
"preview_path": "primer/beta/nav_list/long_label_truncate_no_tooltip",
|
5427
|
-
"name": "long_label_truncate_no_tooltip",
|
5428
|
-
"snapshot": "false",
|
5429
|
-
"skip_rules": {
|
5430
|
-
"wont_fix": [
|
5431
|
-
"region"
|
5432
|
-
],
|
5433
|
-
"will_fix": [
|
5434
|
-
"color-contrast"
|
5435
|
-
]
|
5436
|
-
}
|
5437
|
-
},
|
5438
5438
|
{
|
5439
5439
|
"preview_path": "primer/beta/nav_list/long_label_show_tooltip_no_truncate_label",
|
5440
5440
|
"name": "long_label_show_tooltip_no_truncate_label",
|
@@ -6909,6 +6909,19 @@
|
|
6909
6909
|
]
|
6910
6910
|
}
|
6911
6911
|
},
|
6912
|
+
{
|
6913
|
+
"preview_path": "primer/alpha/select_panel/remote_fetch_form",
|
6914
|
+
"name": "remote_fetch_form",
|
6915
|
+
"snapshot": "interactive",
|
6916
|
+
"skip_rules": {
|
6917
|
+
"wont_fix": [
|
6918
|
+
"region"
|
6919
|
+
],
|
6920
|
+
"will_fix": [
|
6921
|
+
"color-contrast"
|
6922
|
+
]
|
6923
|
+
}
|
6924
|
+
},
|
6912
6925
|
{
|
6913
6926
|
"preview_path": "primer/alpha/select_panel/multiselect_form",
|
6914
6927
|
"name": "multiselect_form",
|
data/static/statuses.json
CHANGED
@@ -68,6 +68,7 @@
|
|
68
68
|
"Primer::BaseComponent": "beta",
|
69
69
|
"Primer::Beta::AutoComplete": "beta",
|
70
70
|
"Primer::Beta::AutoComplete::Item": "beta",
|
71
|
+
"Primer::Beta::AutoComplete::NoResultItem": "beta",
|
71
72
|
"Primer::Beta::Avatar": "beta",
|
72
73
|
"Primer::Beta::AvatarStack": "beta",
|
73
74
|
"Primer::Beta::BaseButton": "beta",
|
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.58.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: 2025-03-
|
12
|
+
date: 2025-03-27 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: actionview
|
@@ -330,6 +330,7 @@ files:
|
|
330
330
|
- app/components/primer/beta/auto_complete/auto_complete.ts
|
331
331
|
- app/components/primer/beta/auto_complete/item.html.erb
|
332
332
|
- app/components/primer/beta/auto_complete/item.rb
|
333
|
+
- app/components/primer/beta/auto_complete/no_result_item.rb
|
333
334
|
- app/components/primer/beta/avatar.css
|
334
335
|
- app/components/primer/beta/avatar.css.json
|
335
336
|
- app/components/primer/beta/avatar.css.map
|
@@ -904,6 +905,7 @@ files:
|
|
904
905
|
- previews/primer/alpha/select_panel_preview/playground.html.erb
|
905
906
|
- previews/primer/alpha/select_panel_preview/remote_fetch.html.erb
|
906
907
|
- previews/primer/alpha/select_panel_preview/remote_fetch_filter_failure.html.erb
|
908
|
+
- previews/primer/alpha/select_panel_preview/remote_fetch_form.html.erb
|
907
909
|
- previews/primer/alpha/select_panel_preview/remote_fetch_initial_failure.html.erb
|
908
910
|
- previews/primer/alpha/select_panel_preview/remote_fetch_no_results.html.erb
|
909
911
|
- previews/primer/alpha/select_panel_preview/scroll_container.html.erb
|
@@ -993,6 +995,7 @@ files:
|
|
993
995
|
- previews/primer/beta/markdown_preview.rb
|
994
996
|
- previews/primer/beta/nav_list_preview.rb
|
995
997
|
- previews/primer/beta/nav_list_preview/trailing_action.html.erb
|
998
|
+
- previews/primer/beta/nav_list_preview/truncate.html.erb
|
996
999
|
- previews/primer/beta/octicon_preview.rb
|
997
1000
|
- previews/primer/beta/popover_preview.rb
|
998
1001
|
- previews/primer/beta/progress_bar_preview.rb
|