2025-03-13 13:30:31 +03:00
|
|
|
/**
|
|
|
|
* Module: Utility classes for specific react components.
|
|
|
|
*/
|
|
|
|
|
2025-03-19 23:28:32 +03:00
|
|
|
@utility cc-btn-nav {
|
2025-04-13 19:05:47 +03:00
|
|
|
color: color-mix(in oklab, var(--color-foreground) 50%, transparent);
|
2025-03-19 23:28:32 +03:00
|
|
|
border-radius: 0.75rem;
|
|
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
white-space: nowrap;
|
|
|
|
|
2025-04-16 15:22:04 +03:00
|
|
|
transition-property: background-color, color;
|
2025-03-19 23:28:32 +03:00
|
|
|
transition-timing-function: var(--ease-bezier);
|
|
|
|
transition-duration: 500ms;
|
|
|
|
|
|
|
|
&:hover {
|
2025-04-12 21:47:46 +03:00
|
|
|
background-color: var(--color-accent);
|
|
|
|
}
|
2025-04-16 15:22:04 +03:00
|
|
|
|
|
|
|
.dark & {
|
|
|
|
color: color-mix(in oklab, var(--color-foreground) 70%, transparent);
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
color: var(--color-foreground);
|
|
|
|
}
|
|
|
|
}
|
2025-04-12 21:47:46 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
@utility cc-btn-primary {
|
|
|
|
color: var(--color-foreground);
|
|
|
|
background-color: var(--color-selected);
|
2025-04-13 19:05:47 +03:00
|
|
|
border-color: var(--color-primary-border);
|
2025-04-12 21:47:46 +03:00
|
|
|
|
|
|
|
&:focus-visible,
|
|
|
|
&:hover:not(:disabled) {
|
|
|
|
color: var(--color-primary-foreground);
|
|
|
|
background-color: var(--color-primary);
|
2025-04-13 19:05:47 +03:00
|
|
|
border-color: var(--color-primary);
|
2025-03-19 23:28:32 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2025-03-20 18:24:07 +03:00
|
|
|
@utility cc-search-icon {
|
|
|
|
pointer-events: none;
|
2025-04-12 21:47:46 +03:00
|
|
|
color: var(--color-muted-foreground);
|
2025-03-20 18:24:07 +03:00
|
|
|
background-color: transparent;
|
|
|
|
|
|
|
|
:focus-within > & {
|
2025-04-17 14:37:47 +03:00
|
|
|
color: var(--color-primary);
|
2025-03-20 18:24:07 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2025-03-13 13:30:31 +03:00
|
|
|
@utility cc-tab-tools {
|
|
|
|
z-index: var(--z-index-pop);
|
|
|
|
position: absolute;
|
|
|
|
top: 1.7rem;
|
|
|
|
right: 50%;
|
|
|
|
padding-top: 0.4rem;
|
|
|
|
transform: translate(50%, 0%);
|
|
|
|
}
|
|
|
|
|
|
|
|
@utility cc-label {
|
|
|
|
font-size: 0.875rem;
|
|
|
|
line-height: 1.25rem;
|
|
|
|
font-weight: 500;
|
2025-03-19 23:28:32 +03:00
|
|
|
|
2025-03-13 13:30:31 +03:00
|
|
|
cursor: default;
|
|
|
|
user-select: text;
|
|
|
|
white-space: nowrap;
|
|
|
|
}
|
|
|
|
|
|
|
|
@utility cc-tree-item {
|
|
|
|
padding-left: 1.5rem;
|
|
|
|
padding-right: 0.75rem;
|
|
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
|
|
will-change: max-height, opacity, padding, border;
|
|
|
|
transition-property: max-height, opacity, padding, border, color, background-color;
|
|
|
|
transition-timing-function: var(--ease-bezier);
|
|
|
|
transition-duration: var(--duration-dropdown);
|
|
|
|
}
|
|
|
|
|
|
|
|
@utility cc-badge-constituenta {
|
|
|
|
width: 3rem;
|
|
|
|
padding-inline: 0.25rem;
|
|
|
|
|
|
|
|
border-width: 1px;
|
|
|
|
border-radius: 0.5rem;
|
|
|
|
|
|
|
|
text-align: center;
|
|
|
|
font-weight: 500;
|
|
|
|
white-space: nowrap;
|
|
|
|
}
|
|
|
|
|
|
|
|
@utility cc-table-header {
|
|
|
|
text-align: start;
|
|
|
|
padding: 0.5rem;
|
|
|
|
|
|
|
|
font-size: var(--text-xs);
|
2025-03-19 15:11:43 +03:00
|
|
|
|
|
|
|
/* stylelint-disable-next-line custom-property-pattern */
|
2025-03-13 13:30:31 +03:00
|
|
|
line-height: var(--tw-leading, var(--text-xs--line-height));
|
|
|
|
font-weight: 500;
|
|
|
|
white-space: nowrap;
|
|
|
|
|
|
|
|
user-select: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
@utility cc-modal-wrapper {
|
|
|
|
isolation: isolate;
|
|
|
|
z-index: var(--z-index-modal);
|
|
|
|
position: fixed;
|
|
|
|
inset: 0;
|
|
|
|
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
|
|
|
}
|
|
|
|
|
|
|
|
@utility cc-node-label {
|
|
|
|
font-weight: 600;
|
|
|
|
-webkit-text-stroke-width: 0.6px;
|
2025-04-12 21:47:46 +03:00
|
|
|
-webkit-text-stroke-color: var(--color-background);
|
2025-03-13 13:30:31 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
@utility cc-text-outline {
|
|
|
|
-webkit-text-stroke-width: 3px;
|
2025-04-12 21:47:46 +03:00
|
|
|
-webkit-text-stroke-color: var(--color-background);
|
2025-03-13 13:30:31 +03:00
|
|
|
}
|
|
|
|
|
2025-03-13 14:40:56 +03:00
|
|
|
@utility cc-ast-label-outline {
|
|
|
|
-webkit-text-stroke-width: 2px;
|
2025-04-12 21:47:46 +03:00
|
|
|
-webkit-text-stroke-color: var(--color-background);
|
2025-03-13 14:40:56 +03:00
|
|
|
}
|
2025-03-13 13:30:31 +03:00
|
|
|
|
2025-03-13 14:40:56 +03:00
|
|
|
@utility cc-dropdown {
|
2025-03-13 13:30:31 +03:00
|
|
|
transition-property: clip-path, transform;
|
|
|
|
transition-duration: var(--duration-dropdown);
|
|
|
|
transition-timing-function: var(--ease-in-out);
|
|
|
|
|
|
|
|
transform: translateY(-10%);
|
|
|
|
clip-path: inset(10% 0% 90% 0%);
|
|
|
|
|
|
|
|
&.open {
|
|
|
|
transform: translateY(0);
|
|
|
|
clip-path: inset(0% 0% 0% 0%);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2025-03-13 14:40:56 +03:00
|
|
|
@utility cc-side-location {
|
|
|
|
transition-property: width, min-width, opacity;
|
|
|
|
transition-duration: var(--duration-move);
|
|
|
|
transition-timing-function: var(--ease-bezier);
|
|
|
|
|
|
|
|
opacity: 0;
|
|
|
|
width: 0;
|
|
|
|
min-width: 0;
|
|
|
|
|
|
|
|
&.open {
|
|
|
|
opacity: 1;
|
|
|
|
width: 100%;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2025-03-13 13:30:31 +03:00
|
|
|
@utility cc-view-hidden-header {
|
|
|
|
transition-property: transform;
|
|
|
|
transition-duration: var(--duration-dropdown);
|
|
|
|
transition-timing-function: var(--ease-out);
|
|
|
|
|
|
|
|
transform: translateX(0.75rem);
|
|
|
|
|
|
|
|
&.open {
|
|
|
|
transform: translateX(calc(6.5rem - 50%));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@utility cc-view-hidden-list {
|
|
|
|
transition-property: clip-path;
|
|
|
|
transition-duration: var(--duration-dropdown);
|
|
|
|
transition-timing-function: var(--ease-out);
|
|
|
|
|
|
|
|
clip-path: inset(10% 0% 90% 0%);
|
|
|
|
pointer-events: none;
|
|
|
|
|
|
|
|
&.open {
|
|
|
|
clip-path: inset(0% 0% 0% 0%);
|
|
|
|
pointer-events: auto;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@utility cc-view-hidden-item {
|
2025-03-19 15:11:43 +03:00
|
|
|
outline-width: 0;
|
2025-03-13 13:30:31 +03:00
|
|
|
outline-color: transparent;
|
|
|
|
|
|
|
|
&.selected {
|
2025-04-17 14:37:47 +03:00
|
|
|
outline: 2px solid var(--color-foreground);
|
2025-03-13 13:30:31 +03:00
|
|
|
}
|
2025-03-19 15:11:43 +03:00
|
|
|
|
2025-03-13 13:30:31 +03:00
|
|
|
&.inherited {
|
|
|
|
outline-style: dashed;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@utility cc-rs-edit-controls {
|
|
|
|
transition-property: max-height;
|
|
|
|
transition-duration: var(--duration-move);
|
|
|
|
transition-timing-function: var(--ease-in-out);
|
|
|
|
|
|
|
|
clip-path: inset(0% 0% 100% 0%);
|
|
|
|
max-height: 0;
|
|
|
|
margin-top: 0;
|
|
|
|
|
|
|
|
&.open {
|
|
|
|
clip-path: inset(0% 0% 0% 0%);
|
|
|
|
max-height: 4.5rem;
|
|
|
|
margin-top: 0.25rem;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@utility cc-parsing-result {
|
|
|
|
transition-property: clip-path, padding, margin, border, height;
|
|
|
|
transition-duration: var(--duration-move);
|
|
|
|
transition-timing-function: var(--ease-in-out);
|
|
|
|
|
|
|
|
clip-path: inset(0% 0% 100% 0%);
|
|
|
|
height: 0;
|
|
|
|
margin-top: 0;
|
|
|
|
padding: 0;
|
|
|
|
border-width: 0;
|
|
|
|
|
|
|
|
&.open {
|
|
|
|
clip-path: inset(0% 0% 0% 0%);
|
|
|
|
height: 4.5rem;
|
|
|
|
margin-top: 0.75rem;
|
2025-03-19 15:11:43 +03:00
|
|
|
padding: 0.25rem 0.5rem;
|
2025-03-13 13:30:31 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@utility cc-topic-dropdown {
|
|
|
|
will-change: clip-path;
|
|
|
|
transition-property: clip-path;
|
|
|
|
transition-duration: var(--duration-move);
|
|
|
|
transition-timing-function: var(--ease-in-out);
|
|
|
|
|
|
|
|
clip-path: inset(0% 100% 0% 0%);
|
|
|
|
|
|
|
|
&.open {
|
|
|
|
clip-path: inset(0% 0% 0% 0%);
|
|
|
|
}
|
|
|
|
}
|
2025-04-10 11:03:55 +03:00
|
|
|
|
2025-04-10 17:52:36 +03:00
|
|
|
@utility cc-animate-popover {
|
2025-04-10 11:03:55 +03:00
|
|
|
transform-origin: var(--radix-select-content-transform-origin);
|
|
|
|
|
|
|
|
&[data-state='open'] {
|
|
|
|
--tw-enter-opacity: 0;
|
|
|
|
--tw-enter-scale: 0.95;
|
|
|
|
animation: enter var(--tw-duration, 0.15s) var(--tw-ease, ease);
|
|
|
|
}
|
|
|
|
|
|
|
|
&[data-state='closed'] {
|
|
|
|
--tw-exit-opacity: 0;
|
|
|
|
--tw-exit-scale: 0.95;
|
|
|
|
animation: exit var(--tw-duration, 0.15s) var(--tw-ease, ease);
|
|
|
|
}
|
|
|
|
|
|
|
|
&[data-side='bottom'] {
|
|
|
|
--tw-enter-translate-y: calc(-2 * var(--spacing));
|
|
|
|
}
|
|
|
|
|
|
|
|
&[data-side='left'] {
|
|
|
|
--tw-enter-translate-x: calc(2 * var(--spacing));
|
|
|
|
}
|
|
|
|
|
|
|
|
&[data-side='right'] {
|
|
|
|
--tw-enter-translate-x: calc(-2 * var(--spacing));
|
|
|
|
}
|
|
|
|
|
|
|
|
&[data-side='top'] {
|
|
|
|
--tw-enter-translate-y: calc(2 * var(--spacing));
|
|
|
|
}
|
|
|
|
}
|
2025-04-22 00:52:17 +03:00
|
|
|
|
|
|
|
@utility cc-node-operation {
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
|
|
border-radius: 5px;
|
|
|
|
border-color: var(--color-muted-foreground);
|
|
|
|
border-width: 1px;
|
|
|
|
|
|
|
|
color: var(--color-foreground);
|
|
|
|
background-color: var(--color-card);
|
|
|
|
|
|
|
|
outline-offset: -2px;
|
|
|
|
outline-style: solid;
|
|
|
|
outline-color: transparent;
|
|
|
|
|
|
|
|
transition-property: outline-offset;
|
|
|
|
transition-timing-function: var(--transition-bezier);
|
|
|
|
transition-duration: var(--duration-select);
|
|
|
|
|
|
|
|
.selected & {
|
|
|
|
outline-offset: 4px;
|
|
|
|
outline-color: var(--color-graph-selected);
|
|
|
|
border-color: var(--color-foreground);
|
|
|
|
}
|
2025-04-23 21:11:56 +03:00
|
|
|
|
|
|
|
.cursor-relocate .dragging & {
|
|
|
|
cursor: move;
|
|
|
|
}
|
2025-04-22 00:52:17 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
@utility cc-node-block {
|
|
|
|
cursor: default;
|
|
|
|
|
|
|
|
border-radius: 5px;
|
|
|
|
border-style: dashed;
|
|
|
|
border-width: 2px;
|
|
|
|
|
|
|
|
padding: 4px;
|
|
|
|
|
|
|
|
color: var(--color-muted-foreground);
|
|
|
|
background-color: transparent;
|
|
|
|
|
|
|
|
.selected & {
|
|
|
|
color: var(--color-foreground);
|
|
|
|
border-color: var(--color-graph-selected);
|
2025-04-24 13:15:57 +03:00
|
|
|
border-style: solid;
|
2025-04-22 00:52:17 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
color: var(--color-foreground);
|
|
|
|
}
|
2025-04-23 21:11:56 +03:00
|
|
|
|
|
|
|
.cursor-relocate .dragging & {
|
|
|
|
cursor: move;
|
|
|
|
}
|
2025-04-22 00:52:17 +03:00
|
|
|
}
|