diff --git a/web/src/assets/styles/blocks.scss b/web/src/assets/styles/blocks.scss index e568ae24db..65fddee327 100644 --- a/web/src/assets/styles/blocks.scss +++ b/web/src/assets/styles/blocks.scss @@ -248,7 +248,7 @@ ul[data-type="agama/list"] { li { border: 2px solid var(--color-gray-dark); - padding: var(--spacer-normal); + padding: var(--spacer-small); text-align: start; background: var(--color-gray-light); margin-block-end: 0; @@ -276,7 +276,6 @@ ul[data-type="agama/list"] { // not belongs to a listbox or grid list ul. li[aria-selected] { background: var(--color-gray-dark); - font-weight: 700; &:not(:last-child) { border-bottom-color: white; @@ -314,15 +313,33 @@ ul[data-type="agama/list"][role="grid"] { div[role="gridcell"] { display: flex; align-items: center; - gap: var(--spacer-normal); + gap: var(--spacer-small); - & > input { + input { --size: var(--fs-h2); + cursor: pointer; block-size: var(--size); inline-size: var(--size); + + &[data-auto-selected] { + accent-color: white; + box-shadow: 0 0 1px; + } + } + + & > div:first-child { + display: flex; + flex-direction: column; + align-items: center; + gap: var(--spacer-small); + + span { + font-size: var(--fs-small); + font-weight: bold; + } } - & > div { + & > div:last-child { flex: 1; } } @@ -386,6 +403,18 @@ ul[data-type="agama/list"][role="grid"] { } } +ul[data-items-type="agama/patterns"] { + div[role="gridcell"] { + & > div:first-child { + min-width: 65px; + } + + & > div:last-child * { + margin-block-end: var(--spacer-small); + } + } +} + [role="dialog"] { .sticky-top-0 { position: sticky; diff --git a/web/src/components/core/Selector.jsx b/web/src/components/core/Selector.jsx index 383fc55a16..5e5763e6e1 100644 --- a/web/src/components/core/Selector.jsx +++ b/web/src/components/core/Selector.jsx @@ -21,6 +21,7 @@ // @ts-check import React from "react"; +import { _ } from "~/i18n"; import { noop } from "~/utils"; /** @@ -61,6 +62,7 @@ import { noop } from "~/utils"; * @param {function} props.renderOption=noop - Function used for rendering options. * @param {string} [props.optionIdKey="id"] - Key used for retrieve options id. * @param {Array<*>} [props.selectedIds=[]] - Identifiers for selected options. + * @param {function} props.autoSelectionCheck=noop - Function used to check if option should be marked as auto selected. * @param {onSelectionChangeCallback} [props.onSelectionChange=noop] - Callback to be called when the selection changes. * @param {function|undefined} [props.onOptionClick] - Callback to be called when the selection changes. * @param {object} [props.props] - Other props sent to the internal selector