@homecode/ui 5.7.6 → 5.7.8
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.
- package/dist/esm/src/components/Card/Card.js +2 -2
- package/dist/esm/src/components/Card/Card.styl.js +1 -1
- package/dist/esm/src/components/Chip/Chip.styl.js +2 -2
- package/dist/esm/src/components/Dialogue/Dialogue.styl.js +2 -2
- package/dist/esm/src/components/Icon/icons/index.js +1 -0
- package/dist/esm/src/components/Icon/icons/logout.svg.js +15 -0
- package/dist/esm/src/tiptap/slash-mention/SlashSuggestionList.js +2 -1
- package/dist/esm/src/tiptap/slash-mention/SlashSuggestionList.styl.js +2 -2
- package/dist/esm/types/src/components/Card/Card.d.ts +1 -1
- package/dist/esm/types/src/components/Icon/icons/index.d.ts +1 -0
- package/dist/esm/types/src/tiptap/slash-mention/types.d.ts +3 -0
- package/package.json +1 -1
|
@@ -8,8 +8,8 @@ const SCROLL_OFFSET = 300;
|
|
|
8
8
|
const Card = forwardRef(function Card({ className, paddingSize = 'm', blur = false, ...props }, ref) {
|
|
9
9
|
return (jsx("div", { ref: ref, className: cn(S.root, S[`padding-${paddingSize}`], blur && S.blur, className), ...props }));
|
|
10
10
|
});
|
|
11
|
-
function LinkCard({ className, ...props }) {
|
|
12
|
-
return (jsx("a", { target: "_blank", rel: "noopener noreferrer", "data-slot": "link-card", className: cn(S.root, className), ...props }));
|
|
11
|
+
function LinkCard({ className, paddingSize = 'm', blur = false, ...props }) {
|
|
12
|
+
return (jsx("a", { target: "_blank", rel: "noopener noreferrer", "data-slot": "link-card", className: cn(S.root, S[`padding-${paddingSize}`], blur && S.blur, className), ...props }));
|
|
13
13
|
}
|
|
14
14
|
function CardHeader({ className, icon, iconWithBackground = false, textsClassName, title, titleClassName, titleId, description, descriptionClassName, descriptionId, children, ...props }) {
|
|
15
15
|
return (jsxs("div", { "data-slot": "card-header", className: cn(S.header, className), ...props, children: [icon && (jsx("div", { className: cn(S.icon, iconWithBackground && S.withBackground), children: icon })), children, (title || description) && (jsxs("div", { className: cn(S.headerText, textsClassName), children: [title && (jsx(CardTitle, { id: titleId, className: titleClassName, children: title })), description && (jsx(CardDescription, { id: descriptionId, className: descriptionClassName, children: description }))] }))] }));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import styleInject from '../../../node_modules/style-inject/dist/style-inject.es.js';
|
|
2
2
|
|
|
3
|
-
var css_248z = ".Card_root__khJ4u{background-color:var(--surface-color);border-radius:var(--border-radius-l);display:flex;flex-direction:column;gap:var(--p-5);max-height:100%;position:relative}.Card_root__khJ4u.Card_blur__VbZXN{-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px);background-color:var(--decent-color-alpha-500)}.Card_root__khJ4u.Card_padding-xs__dd13Q{border-radius:var(--p-3);padding:var(--p-2)}.Card_root__khJ4u.Card_padding-s__S7iiZ{border-radius:var(--p-4);padding:var(--p-3)}.Card_root__khJ4u.Card_padding-m__thC3O{border-radius:var(--p-6);padding:var(--p-5)}.Card_root__khJ4u.Card_padding-l__gtTEF{border-radius:var(--p-8);padding:var(--p-8)}.Card_root__khJ4u.Card_padding-xl__y01o1{border-radius:var(--p-11);padding:var(--p-10)}.Card_header__LDTGV{align-items:flex-start;display:flex;gap:var(--p-5);justify-content:space-between}.Card_header__LDTGV:has([data-slot=card-action]){grid-template-columns:1fr auto}.Card_icon__aRlE5{align-items:center;border-radius:var(--p-2);box-shadow:inset 0 0 0 1px var(--decent-color-alpha-200);display:flex;flex-shrink:0;height:48px;justify-content:center;width:48px}.Card_icon__aRlE5.Card_withBackground__lIrjx{background-color:var(--accent-color-alpha-100);box-shadow:none}.Card_icon__aRlE5>img,.Card_icon__aRlE5>svg{height:20px;width:20px}.Card_headerText__hawuL{flex-grow:1;overflow:hidden}.Card_scroll__uDcXL{max-height:100%;overflow:hidden;padding-right:var(--p-5);width:calc(100% + var(--p-5))}.Card_scroll__uDcXL [data-slot=card-content]{padding-right:1px}.Card_centered__0YX4F,.Card_fullHeight__i3n8e{display:flex;flex-direction:column}.Card_centered__0YX4F{align-items:center;justify-content:center}.Card_fullHeight__i3n8e{flex-grow:1}.Card_description__RTQTR,.Card_title__Z1SQz{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.Card_title__Z1SQz{font-size:120%;font-weight:500;line-height:1}.Card_description__RTQTR{color:var(--accent-color-alpha-500);max-width:100%;word-break:break-word}.Card_action__viIuL{grid-row-span:2;align-self:start;grid-column-start:2;grid-row-start:1;justify-self:end}.Card_footer__T0DXA{align-items:center;display:flex;flex-shrink:0;justify-content:space-between;overflow:hidden}";
|
|
3
|
+
var css_248z = ".Card_root__khJ4u{background-color:var(--surface-color);border-radius:var(--border-radius-l);display:flex;flex-direction:column;gap:var(--p-5);max-height:100%;position:relative}.Card_root__khJ4u.Card_blur__VbZXN{-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px);background-color:var(--decent-color-alpha-500)}.Card_root__khJ4u.Card_padding-xs__dd13Q{border-radius:var(--p-3);padding:var(--p-2)}.Card_root__khJ4u.Card_padding-s__S7iiZ{border-radius:var(--p-4);padding:var(--p-3)}.Card_root__khJ4u.Card_padding-m__thC3O{border-radius:var(--p-6);padding:var(--p-5)}.Card_root__khJ4u.Card_padding-l__gtTEF{border-radius:var(--p-8);padding:var(--p-8)}.Card_root__khJ4u.Card_padding-xl__y01o1{border-radius:var(--p-11);padding:var(--p-10)}.Card_header__LDTGV{align-items:flex-start;display:flex;gap:var(--p-5);justify-content:space-between}.Card_header__LDTGV:has([data-slot=card-action]){grid-template-columns:1fr auto}.Card_icon__aRlE5{align-items:center;border-radius:var(--p-2);box-shadow:inset 0 0 0 1px var(--decent-color-alpha-200);display:flex;flex-shrink:0;height:48px;justify-content:center;width:48px}.Card_icon__aRlE5.Card_withBackground__lIrjx{background-color:var(--accent-color-alpha-100);box-shadow:none}.Card_icon__aRlE5>img,.Card_icon__aRlE5>svg{height:20px;width:20px}.Card_headerText__hawuL{flex-grow:1;overflow:hidden}.Card_scroll__uDcXL{max-height:100%;overflow:hidden;padding-right:var(--p-5);width:calc(100% + var(--p-5))}.Card_scroll__uDcXL [data-slot=card-content]{padding-right:1px}.Card_centered__0YX4F,.Card_fullHeight__i3n8e{display:flex;flex-direction:column}.Card_centered__0YX4F{align-items:center;justify-content:center}.Card_fullHeight__i3n8e{flex-grow:1}.Card_description__RTQTR,.Card_title__Z1SQz{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.Card_title__Z1SQz{font-size:120%;font-weight:500;line-height:1.2}.Card_description__RTQTR{color:var(--accent-color-alpha-500);max-width:100%;word-break:break-word}.Card_action__viIuL{grid-row-span:2;align-self:start;grid-column-start:2;grid-row-start:1;justify-self:end}.Card_footer__T0DXA{align-items:center;display:flex;flex-shrink:0;justify-content:space-between;overflow:hidden}";
|
|
4
4
|
var S = {"root":"Card_root__khJ4u","blur":"Card_blur__VbZXN","padding-xs":"Card_padding-xs__dd13Q","padding-s":"Card_padding-s__S7iiZ","padding-m":"Card_padding-m__thC3O","padding-l":"Card_padding-l__gtTEF","padding-xl":"Card_padding-xl__y01o1","header":"Card_header__LDTGV","icon":"Card_icon__aRlE5","withBackground":"Card_withBackground__lIrjx","headerText":"Card_headerText__hawuL","scroll":"Card_scroll__uDcXL","centered":"Card_centered__0YX4F","fullHeight":"Card_fullHeight__i3n8e","title":"Card_title__Z1SQz","description":"Card_description__RTQTR","action":"Card_action__viIuL","footer":"Card_footer__T0DXA"};
|
|
5
5
|
styleInject(css_248z);
|
|
6
6
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import styleInject from '../../../node_modules/style-inject/dist/style-inject.es.js';
|
|
2
2
|
|
|
3
|
-
var css_248z = ".Chip_chip__DXD0C{align-items:center;background:var(--accent-color-alpha-100);cursor:pointer;display:inline-flex;gap:2px;transition:background .2s ease}.Chip_chip__DXD0C:hover{background:var(--accent-color-alpha-200)}.Chip_size_xs__IbN1f{border-radius:var(--p-1);font-size:14px;padding-left:var(--
|
|
4
|
-
var S = {"chip":"Chip_chip__DXD0C","size_xs":"Chip_size_xs__IbN1f","size_s":"Chip_size_s__ERE3z","size_m":"Chip_size_m__F2Bbw","size_l":"Chip_size_l__YgtcF","size_xl":"Chip_size_xl__-sKg7","selected":"Chip_selected__UcBat","content":"Chip_content__2xloA"
|
|
3
|
+
var css_248z = ".Chip_chip__DXD0C{align-items:center;background:var(--accent-color-alpha-100);cursor:pointer;display:inline-flex;gap:2px;transition:background .2s ease}.Chip_chip__DXD0C:hover{background:var(--accent-color-alpha-200)}.Chip_chip__DXD0C:not(:has(.Chip_remove__vqyOL)){padding-right:var(--chip-pad)}.Chip_size_xs__IbN1f{--chip-pad:var(--p-1);border-radius:var(--p-1);font-size:14px;padding-left:var(--chip-pad)}.Chip_size_s__ERE3z{--chip-pad:var(--p-3);border-radius:var(--p-3);font-size:18px;padding-left:var(--chip-pad)}.Chip_size_m__F2Bbw{--chip-pad:var(--p-5);border-radius:var(--p-5);font-size:22px;padding-left:var(--chip-pad)}.Chip_size_l__YgtcF{--chip-pad:var(--p-8);border-radius:var(--p-8)}.Chip_size_l__YgtcF,.Chip_size_xl__-sKg7{font-size:26px;padding-left:var(--chip-pad)}.Chip_size_xl__-sKg7{--chip-pad:var(--p-10);border-radius:var(--p-10)}.Chip_selected__UcBat,.Chip_selected__UcBat:hover{background:var(--accent-color-alpha-300)}.Chip_content__2xloA,.Chip_remove__vqyOL{align-items:center;display:flex}.Chip_remove__vqyOL{justify-content:center;opacity:.3;transform:scale(.6);transition:opacity .2s ease,transform .1s ease}.Chip_remove__vqyOL:hover{background-color:var(--danger-color-alpha-300);transform:scale(.8)}.Chip_remove__vqyOL svg{transform:scale(.8)}.Chip_chip__DXD0C:hover .Chip_remove__vqyOL{opacity:1}";
|
|
4
|
+
var S = {"chip":"Chip_chip__DXD0C","remove":"Chip_remove__vqyOL","size_xs":"Chip_size_xs__IbN1f","size_s":"Chip_size_s__ERE3z","size_m":"Chip_size_m__F2Bbw","size_l":"Chip_size_l__YgtcF","size_xl":"Chip_size_xl__-sKg7","selected":"Chip_selected__UcBat","content":"Chip_content__2xloA"};
|
|
5
5
|
styleInject(css_248z);
|
|
6
6
|
|
|
7
7
|
export { S as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import styleInject from '../../../node_modules/style-inject/dist/style-inject.es.js';
|
|
2
2
|
|
|
3
|
-
var css_248z = ".Dialogue_dialogOverlay__jjBIa{-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);background-color:var(--decent-color-alpha-900);inset:0;opacity:0;position:fixed;transition:opacity .2s ease-out;z-index:50}.Dialogue_dialogOverlay__jjBIa.Dialogue_isOpen__gISMb{animation-duration:.2s;animation-fill-mode:forwards;animation-name:Dialogue_fadeIn__RSEB2;animation-timing-function:ease-out;opacity:1}.Dialogue_dialogContent__-Lxde{border-radius:var(--border-radius-l);box-shadow:0 10px 20px rgba(0,0,0,.3),0 0 0 2px var(--decent-color-alpha-800);display:flex;flex-direction:column;left:50%;max-height:calc(100% - var(--p-5));opacity:0;position:fixed;top:50%;transform:translateX(-50%) translateY(-50%) scale(.95);transition:opacity .2s ease-out,transform .2s ease-out;width:-moz-fit-content;width:fit-content;z-index:50}.Dialogue_dialogContent__-Lxde.Dialogue_isOpen__gISMb{animation-duration:.2s;animation-fill-mode:forwards;animation-name:Dialogue_dialogueIn__M0tLL;animation-timing-function:ease-out;opacity:1;transform:translateX(-50%) translateY(-50%) scale(1)}.Dialogue_dialogContent__-Lxde.Dialogue_isClosed__lHYyZ{animation-duration:.2s;animation-fill-mode:forwards;animation-name:Dialogue_dialogueOut__6bLTY;animation-timing-function:ease-in;opacity:0;pointer-events:none;transform:translateX(-50%) translateY(-50%) scale(.95)}@media (max-width:700px){.Dialogue_dialogContent__-Lxde{max-width:calc(100% - var(--p-5));width:calc(100% - var(--p-5))}}.Dialogue_size-default__X1sdB{max-width:40rem}.Dialogue_size-login__GyixB{max-width:24rem}.Dialogue_size-wide__HQbiX{max-width:calc(100% - var(--p-5))}@media (min-width:700px){.Dialogue_size-wide__HQbiX{max-width:80rem}}.Dialogue_dialogClose__5q12n{align-items:center;background-color:transparent;border:none;border-radius:var(--border-radius-s);box-shadow:inset 0 0 0 2px none;color:var(--accent-color);cursor:pointer;display:flex;height:2rem;justify-content:center;opacity:.7;position:absolute;right:var(--p-3);top:var(--p-3);transform-origin:center;transition:opacity .2s ease,transform .2s ease;width:2rem;z-index:10}.Dialogue_dialogClose__5q12n:hover{opacity:1;transform:scale(1.1)}.Dialogue_dialogClose__5q12n:focus-visible{box-shadow:0 0 0 2px var(--active-color)}.Dialogue_dialogClose__5q12n:disabled{pointer-events:none}.Dialogue_footerAlignLeft__xQUD8{justify-content:flex-start}.Dialogue_footerAlignCenter__yq9Mu{justify-content:center}.Dialogue_footerAlignRight__Yo7hG{justify-content:flex-end}@keyframes Dialogue_fadeIn__RSEB2{0%{opacity:0}to{opacity:1}}@keyframes Dialogue_dialogueIn__M0tLL{0%{opacity:0;transform:translateX(-50%) translateY(-50%) scale(.95)}to{opacity:1;transform:translateX(-50%) translateY(-50%) scale(1)}}@keyframes Dialogue_dialogueOut__6bLTY{0%{opacity:1;transform:translateX(-50%) translateY(-50%) scale(1)}to{opacity:0;transform:translateX(-50%) translateY(-50%) scale(.95)}}";
|
|
4
|
-
var S = {"dialogOverlay":"Dialogue_dialogOverlay__jjBIa","isOpen":"Dialogue_isOpen__gISMb","fadeIn":"Dialogue_fadeIn__RSEB2","dialogContent":"Dialogue_dialogContent__-Lxde","dialogueIn":"Dialogue_dialogueIn__M0tLL","isClosed":"Dialogue_isClosed__lHYyZ","dialogueOut":"Dialogue_dialogueOut__6bLTY","size-default":"Dialogue_size-default__X1sdB","size-login":"Dialogue_size-login__GyixB","size-wide":"Dialogue_size-wide__HQbiX","
|
|
3
|
+
var css_248z = ".Dialogue_dialogOverlay__jjBIa{-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);background-color:var(--decent-color-alpha-900);inset:0;opacity:0;position:fixed;transition:opacity .2s ease-out;z-index:50}.Dialogue_dialogOverlay__jjBIa.Dialogue_isOpen__gISMb{animation-duration:.2s;animation-fill-mode:forwards;animation-name:Dialogue_fadeIn__RSEB2;animation-timing-function:ease-out;opacity:1}.Dialogue_dialogContent__-Lxde{border-radius:var(--border-radius-l);box-shadow:0 10px 20px rgba(0,0,0,.3),0 0 0 2px var(--decent-color-alpha-800);display:flex;flex-direction:column;left:50%;max-height:calc(100% - var(--p-5));opacity:0;position:fixed;top:50%;transform:translateX(-50%) translateY(-50%) scale(.95);transition:opacity .2s ease-out,transform .2s ease-out;width:-moz-fit-content;width:fit-content;z-index:50}.Dialogue_dialogContent__-Lxde.Dialogue_isOpen__gISMb{animation-duration:.2s;animation-fill-mode:forwards;animation-name:Dialogue_dialogueIn__M0tLL;animation-timing-function:ease-out;opacity:1;transform:translateX(-50%) translateY(-50%) scale(1)}.Dialogue_dialogContent__-Lxde.Dialogue_isClosed__lHYyZ{animation-duration:.2s;animation-fill-mode:forwards;animation-name:Dialogue_dialogueOut__6bLTY;animation-timing-function:ease-in;opacity:0;pointer-events:none;transform:translateX(-50%) translateY(-50%) scale(.95)}@media (max-width:700px){.Dialogue_dialogContent__-Lxde{max-width:calc(100% - var(--p-5));width:calc(100% - var(--p-5))}}.Dialogue_dialogContent__-Lxde:has(.Dialogue_dialogClose__5q12n) [data-slot=card-header]{padding-right:calc(2rem + var(--p-3))}.Dialogue_size-default__X1sdB{max-width:40rem}.Dialogue_size-login__GyixB{max-width:24rem}.Dialogue_size-wide__HQbiX{max-width:calc(100% - var(--p-5))}@media (min-width:700px){.Dialogue_size-wide__HQbiX{max-width:80rem}}.Dialogue_dialogClose__5q12n{align-items:center;background-color:transparent;border:none;border-radius:var(--border-radius-s);box-shadow:inset 0 0 0 2px none;color:var(--accent-color);cursor:pointer;display:flex;height:2rem;justify-content:center;opacity:.7;position:absolute;right:var(--p-3);top:var(--p-3);transform-origin:center;transition:opacity .2s ease,transform .2s ease;width:2rem;z-index:10}.Dialogue_dialogClose__5q12n:hover{opacity:1;transform:scale(1.1)}.Dialogue_dialogClose__5q12n:focus-visible{box-shadow:0 0 0 2px var(--active-color)}.Dialogue_dialogClose__5q12n:disabled{pointer-events:none}.Dialogue_footerAlignLeft__xQUD8{justify-content:flex-start}.Dialogue_footerAlignCenter__yq9Mu{justify-content:center}.Dialogue_footerAlignRight__Yo7hG{justify-content:flex-end}@keyframes Dialogue_fadeIn__RSEB2{0%{opacity:0}to{opacity:1}}@keyframes Dialogue_dialogueIn__M0tLL{0%{opacity:0;transform:translateX(-50%) translateY(-50%) scale(.95)}to{opacity:1;transform:translateX(-50%) translateY(-50%) scale(1)}}@keyframes Dialogue_dialogueOut__6bLTY{0%{opacity:1;transform:translateX(-50%) translateY(-50%) scale(1)}to{opacity:0;transform:translateX(-50%) translateY(-50%) scale(.95)}}";
|
|
4
|
+
var S = {"dialogOverlay":"Dialogue_dialogOverlay__jjBIa","isOpen":"Dialogue_isOpen__gISMb","fadeIn":"Dialogue_fadeIn__RSEB2","dialogContent":"Dialogue_dialogContent__-Lxde","dialogueIn":"Dialogue_dialogueIn__M0tLL","isClosed":"Dialogue_isClosed__lHYyZ","dialogueOut":"Dialogue_dialogueOut__6bLTY","dialogClose":"Dialogue_dialogClose__5q12n","size-default":"Dialogue_size-default__X1sdB","size-login":"Dialogue_size-login__GyixB","size-wide":"Dialogue_size-wide__HQbiX","footerAlignLeft":"Dialogue_footerAlignLeft__xQUD8","footerAlignCenter":"Dialogue_footerAlignCenter__yq9Mu","footerAlignRight":"Dialogue_footerAlignRight__Yo7hG"};
|
|
5
5
|
styleInject(css_248z);
|
|
6
6
|
|
|
7
7
|
export { S as default };
|
|
@@ -54,6 +54,7 @@ export { default as layers } from './layers.svg.js';
|
|
|
54
54
|
export { default as link } from './link.svg.js';
|
|
55
55
|
export { default as linkedin } from './linkedin.svg.js';
|
|
56
56
|
export { default as loader } from './loader.svg.js';
|
|
57
|
+
export { default as logout } from './logout.svg.js';
|
|
57
58
|
export { default as lock } from './lock.svg.js';
|
|
58
59
|
export { default as lockOpen } from './lockOpen.svg.js';
|
|
59
60
|
export { default as map } from './map.svg.js';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
var _path;
|
|
4
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
5
|
+
var SvgLogout = function SvgLogout(props) {
|
|
6
|
+
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
7
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
8
|
+
fill: "currentColor",
|
|
9
|
+
viewBox: "0 0 24 24"
|
|
10
|
+
}, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
|
|
11
|
+
d: "m17 7-1.41 1.41L18.17 11H8v2h10.17l-2.58 2.58L17 17l5-5zM4 5h8V3H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h8v-2H4V5z"
|
|
12
|
+
})));
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export { SvgLogout as default };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
2
|
import { useState, useEffect, useCallback, useImperativeHandle } from 'react';
|
|
3
|
+
import { Icon } from '../../components/Icon/Icon.js';
|
|
3
4
|
import { Menu } from '../../components/Menu/Menu.js';
|
|
4
5
|
import S from './SlashSuggestionList.styl.js';
|
|
5
6
|
import cn from 'classnames';
|
|
@@ -47,7 +48,7 @@ function SlashSuggestionListInner({ items, command, listHandleRef, }) {
|
|
|
47
48
|
useImperativeHandle(listHandleRef, () => ({ onKeyboardEvent }), [
|
|
48
49
|
onKeyboardEvent,
|
|
49
50
|
]);
|
|
50
|
-
return (jsx("div", { className: S.root, children: jsx(Menu, { className: S.menu, role: "listbox", "aria-label": "Slash commands", children: items.map((item, idx) => (jsxs(Menu.Item, { role: "option", "aria-selected": idx === safeSel, className: cn(S.item, idx === safeSel && S.itemHighlighted, item.className), onMouseDown: e => e.preventDefault(), onMouseEnter: () => setSelected(idx), onClick: () => onPick(idx), textOverflow: true, children: [jsx("span", { className: S.itemLabel, children: item.label }), item.description
|
|
51
|
+
return (jsx("div", { className: S.root, children: jsx(Menu, { className: S.menu, role: "listbox", "aria-label": "Slash commands", children: items.map((item, idx) => (jsxs(Menu.Item, { role: "option", "aria-selected": idx === safeSel, className: cn(S.item, idx === safeSel && S.itemHighlighted, item.className), onMouseDown: e => e.preventDefault(), onMouseEnter: () => setSelected(idx), onClick: () => onPick(idx), textOverflow: true, children: [item.icon && (jsx(Icon, { type: item.icon, size: "s", className: S.itemIcon })), jsxs("span", { className: S.itemText, children: [jsx("span", { className: S.itemLabel, children: item.label }), item.description && (jsx("span", { className: S.itemDesc, children: item.description }))] })] }, `${item.id}-${idx}`))) }) }));
|
|
51
52
|
}
|
|
52
53
|
function SlashSuggestionList(props) {
|
|
53
54
|
if (props.items.length === 0)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import styleInject from '../../../node_modules/style-inject/dist/style-inject.es.js';
|
|
2
2
|
|
|
3
|
-
var css_248z = ".SlashSuggestionList_root__9KCb1{-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);background-color:var(--decent-color-alpha-700);border-radius:8px;border-radius:var(--radius-lg,8px);box-shadow:inset 0 0 0 1px var(--accent-color-alpha-50),0 8px 24px rgba(0,0,0,.2);color:var(--foreground);max-width:90vw;min-width:220px;overflow:hidden;position:relative}.SlashSuggestionList_root__9KCb1:before{background-color:var(--accent-color-alpha-50);bottom:0;content:\"\";left:0;pointer-events:none;position:absolute;right:0;top:0}.dark .SlashSuggestionList_root__9KCb1{box-shadow:inset 0 0 0 1px var(--accent-color-alpha-50),0 8px 24px rgba(0,0,0,.5)}.SlashSuggestionList_menu__s-jK3{margin:0;max-height:40vh}.SlashSuggestionList_item__9JBeY{align-items:
|
|
4
|
-
var S = {"root":"SlashSuggestionList_root__9KCb1","menu":"SlashSuggestionList_menu__s-jK3","item":"SlashSuggestionList_item__9JBeY","itemHighlighted":"SlashSuggestionList_itemHighlighted__cStZr","itemLabel":"SlashSuggestionList_itemLabel__OMaov","itemDesc":"SlashSuggestionList_itemDesc__fAdcA","mention":"SlashSuggestionList_mention__aT45p"};
|
|
3
|
+
var css_248z = ".SlashSuggestionList_root__9KCb1{-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);background-color:var(--decent-color-alpha-700);border-radius:8px;border-radius:var(--radius-lg,8px);box-shadow:inset 0 0 0 1px var(--accent-color-alpha-50),0 8px 24px rgba(0,0,0,.2);color:var(--foreground);max-width:90vw;min-width:220px;overflow:hidden;position:relative}.SlashSuggestionList_root__9KCb1:before{background-color:var(--accent-color-alpha-50);bottom:0;content:\"\";left:0;pointer-events:none;position:absolute;right:0;top:0}.dark .SlashSuggestionList_root__9KCb1{box-shadow:inset 0 0 0 1px var(--accent-color-alpha-50),0 8px 24px rgba(0,0,0,.5)}.SlashSuggestionList_menu__s-jK3{margin:0;max-height:40vh}.SlashSuggestionList_item__9JBeY{align-items:center;border-radius:var(--p-2);display:flex;flex-direction:row;gap:var(--p-2);height:auto!important;justify-content:flex-start;min-height:0;overflow:visible!important;padding:var(--p-1) var(--p-2)!important;position:relative;text-overflow:clip!important;white-space:normal!important;width:100%}.SlashSuggestionList_item__9JBeY:hover{background-color:var(--accent-color-alpha-50)}.SlashSuggestionList_itemHighlighted__cStZr,.SlashSuggestionList_item__9JBeY:hover{box-shadow:inset 100vw 0 0 0 var(--accent-color-alpha-200)}.SlashSuggestionList_itemIcon__hTtxe{color:var(--accent-color-alpha-800);flex-shrink:0}.SlashSuggestionList_itemText__uwNbZ{align-items:flex-start;display:flex;flex-direction:column;min-width:0}.SlashSuggestionList_itemLabel__OMaov{font-weight:600}.SlashSuggestionList_itemDesc__fAdcA{color:var(--accent-color-alpha-600);font-size:80%;white-space:normal}.SlashSuggestionList_mention__aT45p{align-items:center;background:var(--muted);border-radius:var(--p-1);display:inline-flex;line-height:1.4;margin:0 var(--p-1);padding:0 var(--p-1);-webkit-user-select:none;-moz-user-select:none;user-select:none;vertical-align:baseline;white-space:nowrap}";
|
|
4
|
+
var S = {"root":"SlashSuggestionList_root__9KCb1","menu":"SlashSuggestionList_menu__s-jK3","item":"SlashSuggestionList_item__9JBeY","itemHighlighted":"SlashSuggestionList_itemHighlighted__cStZr","itemIcon":"SlashSuggestionList_itemIcon__hTtxe","itemText":"SlashSuggestionList_itemText__uwNbZ","itemLabel":"SlashSuggestionList_itemLabel__OMaov","itemDesc":"SlashSuggestionList_itemDesc__fAdcA","mention":"SlashSuggestionList_mention__aT45p"};
|
|
5
5
|
styleInject(css_248z);
|
|
6
6
|
|
|
7
7
|
export { S as default };
|
|
@@ -3,7 +3,7 @@ declare const Card: import("react").ForwardRefExoticComponent<Omit<import("react
|
|
|
3
3
|
paddingSize?: "s" | "xs" | "m" | "l" | "xl";
|
|
4
4
|
blur?: boolean;
|
|
5
5
|
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
6
|
-
declare function LinkCard({ className, ...props }: LinkCardProps): import("react").JSX.Element;
|
|
6
|
+
declare function LinkCard({ className, paddingSize, blur, ...props }: LinkCardProps): import("react").JSX.Element;
|
|
7
7
|
declare function CardHeader({ className, icon, iconWithBackground, textsClassName, title, titleClassName, titleId, description, descriptionClassName, descriptionId, children, ...props }: CardHeaderProps): import("react").JSX.Element;
|
|
8
8
|
declare function CardTitle({ className, ...props }: CardTitleProps): import("react").JSX.Element;
|
|
9
9
|
declare function CardDescription({ className, ...props }: CardDescriptionProps): import("react").JSX.Element;
|
|
@@ -54,6 +54,7 @@ export { default as layers } from './layers.svg';
|
|
|
54
54
|
export { default as link } from './link.svg';
|
|
55
55
|
export { default as linkedin } from './linkedin.svg';
|
|
56
56
|
export { default as loader } from './loader.svg';
|
|
57
|
+
export { default as logout } from './logout.svg';
|
|
57
58
|
export { default as lock } from './lock.svg';
|
|
58
59
|
export { default as lockOpen } from './lockOpen.svg';
|
|
59
60
|
export { default as map } from './map.svg';
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import type { Editor, Range } from '@tiptap/core';
|
|
2
|
+
import type { IconType } from '../../components/Icon/Icon.types';
|
|
2
3
|
export type SlashCommandItem = {
|
|
3
4
|
id: string;
|
|
4
5
|
label: string;
|
|
5
6
|
description?: string;
|
|
7
|
+
/** Left icon in the slash suggestion list (`<Icon type={icon} />`). */
|
|
8
|
+
icon?: IconType;
|
|
6
9
|
/** Extra class on inserted mention chip (merged with `slash-mention`). */
|
|
7
10
|
className?: string;
|
|
8
11
|
/** CSS color for chip text; background uses 30% color blend. */
|