UNPKG

@lanaco/lnc-react-ui

Version:

React component library

200 lines (173 loc) 4.1 kB
import { jsx as n } from "react/jsx-runtime"; import { forwardRef as f } from "react"; import m from "./Chip.js"; import { s as r } from "./emotion-styled.browser.esm-DfbrHHed.js"; import { d as o } from "./breakpoints-BubDitvo.js"; const d = r.div` display: flex; gap: 0.75rem; align-items: center; align-content: center; & .tags__item { color: var(--gray-900, #0c1520); background: var(--neutral-95004, rgba(20, 22, 26, 0.04)); font-size: 0.875rem; font-style: normal; font-weight: 400; line-height: 1.25rem; letter-spacing: -0.0056rem; padding: 0.5rem 0.75rem; &.active { color: var(--white, #fff); background: var(--gray-900, #0c1520); font-weight: 500; &:hover { color: var(--white, #fff); background: var(--gray-900, #0c1520); } } &:hover { background: var(--gray-200, #e4e9f0); background: var(--neutral-95008, rgba(20, 22, 26, 0.08)); } &:focus { outline: none; } } @media ${o("S")} { width: 100%; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; ::-webkit-scrollbar { -webkit-appearance: none; } -ms-overflow-style: none; /* Internet Explorer 10+ */ scrollbar-width: none; /* Firefox */ &::-webkit-scrollbar { display: none; /* Safari and Chrome */ } } `, w = r.div` display: flex; gap: 1.25rem; width: 100%; & .section__column { display: flex; flex-direction: column; gap: 1.25rem; width: 100%; } & .section__show-more { color: var(--neutral-600, #0f2a46); font-size: 0.875rem; font-style: normal; font-weight: 500; line-height: 1.25rem; letter-spacing: -0.0056rem; &:focus { outline: none; } } @media ${o("S")} { flex-direction: column; } `, v = r.div` width: 100%; height: fit-content; background: var(--white, #fff); border: 1px solid var(--gray-100, #f3f6fb); display: flex; flex-direction: column; gap: 0.75rem; padding: 1rem; border-radius: 0.75rem; &:hover { cursor: pointer; } &.expanded { border: 1px solid #ff7621; box-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.16), 0 1px 4px 0 rgba(255, 118, 33, 0.5) inset; } & .card__heading { display: flex; justify-content: space-between; width: 100%; & .card__title { color: var(--neutral-600, #0f2a46); font-size: 1rem; font-style: normal; font-weight: 500; line-height: 1.5rem; } & .card__icon { color: var(--neutral-600, #0f2a46); } } & .card__description { color: var(--neutral-400, #47607b); font-size: 0.875rem; font-style: normal; font-weight: 400; line-height: 1.25rem; letter-spacing: 0.0156rem; } & .card__impression { display: flex; align-items: center; gap: 0.75rem; & .imppression__question { color: var(--gray-500, #7a8594); font-size: 0.75rem; font-style: normal; font-weight: 500; line-height: 1rem; letter-spacing: 0.0313rem; } & .impression__actions { display: flex; gap: 0.5rem; button { color: var(--gray-600, #676e79); &:focus { outline: none; } } } &.feedback { gap: 0.25rem; } } @media ${o("S")} { & .card__impression { justify-content: space-between; &.feedback { justify-content: flex-start; } } } `, _ = f( ({ tags: t = [], allTagText: a, selectedTagCode: i = null, onSelectTag: l = () => { } }, s) => /* @__PURE__ */ n(d, { ref: s, className: "section__tags", children: [{ name: a, code: null }, ...t].map((e, c) => /* @__PURE__ */ n( m, { label: e == null ? void 0 : e.name, borderRadius: "curved", color: "neutral", className: `tags__item ${i === (e == null ? void 0 : e.code) ? "active" : ""}`, onClick: () => { l(e); } }, `faq-section-tag__${c + 1}` )) }) ); export { _ as F, w as I, v as a };