- Add object-fit: contain + black background for video in DTMediaFrame - Style .dt-card-badge with mode-colored background, padding, and bevel-aware positioning (negative right offset for clean diagonal clip) - Restore DTStaggerContainer in react-native (was incorrectly deleted) - Update DTGallery, DTModal, DTMobileFilterOverlay, DTMediaFrame components - Refresh showcase pages for desktop and mobile Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
461 lines
12 KiB
CSS
461 lines
12 KiB
CSS
/* dt-web-theme: DT Form Component Styles */
|
|
/* Source: react-native-dt-theme/src/components/DT*.tsx */
|
|
/* These styles exist in the RN DT theme but NOT the Shopify storefront */
|
|
|
|
/* ============================================================================
|
|
Text Input — Sharp corners + focus glow bar
|
|
Source: DTTextInput.tsx
|
|
============================================================================ */
|
|
[data-brand="dt"] input[type="text"],
|
|
[data-brand="dt"] input[type="password"],
|
|
[data-brand="dt"] input[type="email"],
|
|
[data-brand="dt"] input[type="number"],
|
|
[data-brand="dt"] input[type="search"],
|
|
[data-brand="dt"] input[type="url"],
|
|
[data-brand="dt"] input[type="tel"],
|
|
[data-brand="dt"] textarea,
|
|
[data-brand="dt"] select,
|
|
[data-brand="dt"] .input {
|
|
border: 2px solid var(--color-primary);
|
|
border-radius: 0;
|
|
padding: 8px 12px;
|
|
background: var(--color-bg);
|
|
color: var(--color-text-primary);
|
|
transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
|
|
}
|
|
|
|
[data-brand="dt"] input:focus,
|
|
[data-brand="dt"] textarea:focus,
|
|
[data-brand="dt"] select:focus,
|
|
[data-brand="dt"] .input:focus {
|
|
outline: none;
|
|
border-color: var(--color-primary);
|
|
box-shadow: 0 4px 0 1px var(--color-primary);
|
|
}
|
|
|
|
[data-brand="dt"] input.error,
|
|
[data-brand="dt"] .input.error {
|
|
border-color: var(--color-error);
|
|
}
|
|
|
|
[data-brand="dt"] input.error:focus,
|
|
[data-brand="dt"] .input.error:focus {
|
|
box-shadow: 0 4px 0 1px var(--color-error);
|
|
}
|
|
|
|
/* ============================================================================
|
|
Checkbox — Beveled opposing corners (top-left + bottom-right)
|
|
Source: DTCheckbox.tsx — bevel at 30% of size
|
|
Uses drop-shadow instead of border (clip-path clips CSS borders)
|
|
============================================================================ */
|
|
[data-brand="dt"] input[type="checkbox"] {
|
|
appearance: none;
|
|
-webkit-appearance: none;
|
|
width: 24px;
|
|
height: 24px;
|
|
border: none;
|
|
background: rgba(var(--color-primary-rgb), 0.1);
|
|
cursor: pointer;
|
|
position: relative;
|
|
clip-path: polygon(
|
|
30% 0%, 100% 0%, 100% 70%, 70% 100%, 0% 100%, 0% 30%
|
|
);
|
|
filter: drop-shadow(0 0 1px var(--color-primary));
|
|
transition: background var(--transition-fast), filter var(--transition-fast);
|
|
}
|
|
|
|
[data-brand="dt"] input[type="checkbox"]:checked {
|
|
background: var(--color-primary);
|
|
filter: drop-shadow(0 0 2px var(--color-primary));
|
|
}
|
|
|
|
[data-brand="dt"] input[type="checkbox"]:checked::after {
|
|
content: '';
|
|
position: absolute;
|
|
left: 6px;
|
|
top: 8px;
|
|
width: 10px;
|
|
height: 6px;
|
|
border: 2px solid var(--color-bg);
|
|
border-top: none;
|
|
border-right: none;
|
|
transform: rotate(-45deg);
|
|
}
|
|
|
|
[data-brand="dt"] input[type="checkbox"]:disabled {
|
|
opacity: 0.5;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
/* ============================================================================
|
|
Switch / Toggle — Angular track + sliding square thumb
|
|
Source: DTSwitch.tsx — 48x26 track, 20x20 thumb, 150ms
|
|
============================================================================ */
|
|
.dt-switch {
|
|
position: relative;
|
|
display: inline-block;
|
|
width: 48px;
|
|
height: 26px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.dt-switch input {
|
|
opacity: 0;
|
|
width: 0;
|
|
height: 0;
|
|
position: absolute;
|
|
}
|
|
|
|
.dt-switch-track {
|
|
position: absolute;
|
|
inset: 0;
|
|
border: 2px solid var(--color-primary);
|
|
border-radius: 0;
|
|
background: rgba(var(--color-primary-rgb), 0.1);
|
|
transition: background var(--transition-fast);
|
|
}
|
|
|
|
.dt-switch input:checked + .dt-switch-track {
|
|
background: var(--color-primary);
|
|
}
|
|
|
|
.dt-switch-thumb {
|
|
position: absolute;
|
|
top: 3px;
|
|
left: 3px;
|
|
width: 20px;
|
|
height: 20px;
|
|
background: var(--color-text-primary);
|
|
transition: left var(--transition-fast);
|
|
}
|
|
|
|
.dt-switch input:checked ~ .dt-switch-thumb,
|
|
.dt-switch input:checked + .dt-switch-track + .dt-switch-thumb {
|
|
left: 25px;
|
|
background: var(--color-bg);
|
|
}
|
|
|
|
.dt-switch input:disabled + .dt-switch-track {
|
|
opacity: 0.5;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
/* ============================================================================
|
|
Radio Button — Hexagonal indicator
|
|
Matches RN DTRadioGroup: outlined hexagon with inner filled dot on check.
|
|
Uses a custom span (.dt-radio-hex) since ::before on <input> is unreliable.
|
|
============================================================================ */
|
|
[data-brand="dt"] .dt-radio-hex {
|
|
position: relative;
|
|
display: inline-block;
|
|
width: 22px;
|
|
height: 22px;
|
|
flex-shrink: 0;
|
|
background: var(--color-primary);
|
|
clip-path: polygon(
|
|
50% 0%, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%
|
|
);
|
|
transition: background var(--transition-fast);
|
|
}
|
|
|
|
/* Inner surface — outlined hexagon look (accent border + dark center) */
|
|
[data-brand="dt"] .dt-radio-hex-inner {
|
|
position: absolute;
|
|
inset: 2px;
|
|
background: var(--color-bg);
|
|
clip-path: polygon(
|
|
50% 0%, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%
|
|
);
|
|
transition: all var(--transition-fast);
|
|
}
|
|
|
|
/* Checked: inner dot fills with accent color (smaller inset) */
|
|
[data-brand="dt"] .dt-radio-hex.checked .dt-radio-hex-inner {
|
|
inset: 5px;
|
|
background: var(--color-primary);
|
|
}
|
|
|
|
/* Radio group option container */
|
|
.dt-radio-option {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
padding: 12px;
|
|
border: 2px solid rgba(var(--color-primary-rgb), 0.3);
|
|
cursor: pointer;
|
|
transition: all var(--transition-fast);
|
|
}
|
|
|
|
.dt-radio-option.selected {
|
|
background: rgba(var(--color-primary-rgb), 0.7);
|
|
border-color: var(--color-primary);
|
|
color: var(--color-bg);
|
|
}
|
|
|
|
/* ============================================================================
|
|
Progress Bar — Angular, no radius
|
|
Source: DTProgressBar.tsx — 4px height, no border-radius
|
|
============================================================================ */
|
|
.dt-progress {
|
|
width: 100%;
|
|
height: 4px;
|
|
background: rgba(var(--color-primary-rgb), 0.1);
|
|
border-radius: 0;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.dt-progress-fill {
|
|
height: 100%;
|
|
background: var(--color-primary);
|
|
transition: width 300ms ease-out;
|
|
}
|
|
|
|
.dt-progress-label {
|
|
font-size: 11px;
|
|
font-weight: 600;
|
|
color: var(--color-primary);
|
|
margin-top: 4px;
|
|
font-family: var(--font-mono);
|
|
}
|
|
|
|
/* Vertical variant */
|
|
.dt-progress.vertical {
|
|
width: 8px;
|
|
height: 200px;
|
|
display: flex;
|
|
flex-direction: column-reverse;
|
|
}
|
|
|
|
.dt-progress.vertical .dt-progress-fill {
|
|
width: 100%;
|
|
height: 0%;
|
|
transition: height 300ms ease-out;
|
|
}
|
|
|
|
/* ============================================================================
|
|
Accordion — 5px top border, chevron rotation
|
|
Source: DTAccordion.tsx — 250ms animation
|
|
============================================================================ */
|
|
.dt-accordion {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 4px;
|
|
}
|
|
|
|
.dt-accordion-header {
|
|
background: var(--color-bg);
|
|
border: 1px solid var(--color-primary);
|
|
border-top: 5px solid var(--color-primary);
|
|
padding: 12px 16px;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
cursor: pointer;
|
|
font-weight: 600;
|
|
font-size: 0.875rem;
|
|
letter-spacing: 0.05em;
|
|
color: var(--color-text-primary);
|
|
transition: opacity var(--transition-fast);
|
|
}
|
|
|
|
.dt-accordion-header:hover {
|
|
background: var(--color-surface-hover);
|
|
}
|
|
|
|
.dt-accordion-header[aria-expanded="true"] {
|
|
color: var(--color-secondary);
|
|
border-top-color: var(--color-secondary);
|
|
}
|
|
|
|
.dt-accordion-chevron {
|
|
display: inline-block;
|
|
transition: transform 250ms ease-in-out;
|
|
width: 0;
|
|
height: 0;
|
|
border-left: 5px solid transparent;
|
|
border-right: 5px solid transparent;
|
|
border-top: 7px solid currentColor;
|
|
}
|
|
|
|
.dt-accordion-header[aria-expanded="true"] .dt-accordion-chevron {
|
|
transform: rotate(180deg);
|
|
}
|
|
|
|
.dt-accordion-content {
|
|
max-height: 0;
|
|
overflow: hidden;
|
|
transition: max-height 250ms ease-in-out;
|
|
}
|
|
|
|
.dt-accordion-content[data-open="true"] {
|
|
max-height: 2000px;
|
|
}
|
|
|
|
/* ============================================================================
|
|
Quantity Stepper — Beveled +/- buttons
|
|
Source: DTQuantityStepper.tsx — bottom-right bevel
|
|
============================================================================ */
|
|
.dt-stepper {
|
|
display: inline-flex;
|
|
gap: 4px;
|
|
align-items: center;
|
|
}
|
|
|
|
.dt-stepper-btn {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
width: 36px;
|
|
height: 36px;
|
|
border: 2px solid var(--color-primary);
|
|
background: transparent;
|
|
color: var(--color-primary);
|
|
font-size: 1.25rem;
|
|
font-weight: bold;
|
|
cursor: pointer;
|
|
border-radius: 0;
|
|
transition: opacity var(--transition-fast);
|
|
}
|
|
|
|
.dt-stepper-btn:hover {
|
|
background: rgba(var(--color-primary-rgb), 0.1);
|
|
}
|
|
|
|
.dt-stepper-btn:disabled {
|
|
opacity: 0.3;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
.dt-stepper-value {
|
|
min-width: 36px;
|
|
text-align: center;
|
|
color: var(--color-primary);
|
|
font-weight: 700;
|
|
font-family: var(--font-mono);
|
|
}
|
|
|
|
/* ============================================================================
|
|
Menu Item — beveled clipped style with thick top border
|
|
Source: dt-shopify-storefront .menu-item-clipped pattern
|
|
============================================================================ */
|
|
[data-brand="dt"] .dt-menu-item {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 0.5rem 0.75rem;
|
|
border: 1px solid var(--dt-card-color, var(--color-primary));
|
|
border-top: 5px solid var(--dt-card-color, var(--color-primary));
|
|
background: var(--color-bg);
|
|
color: var(--accent-mode, var(--color-primary));
|
|
font-weight: 600;
|
|
font-size: 0.875rem;
|
|
letter-spacing: 0.05em;
|
|
cursor: pointer;
|
|
transition: all var(--transition-fast);
|
|
}
|
|
|
|
[data-brand="dt"] .dt-menu-item:hover {
|
|
clip-path: polygon(
|
|
0% 0%,
|
|
100% 0%,
|
|
100% calc(100% - var(--menu-item-corner)),
|
|
calc(100% - var(--menu-item-corner)) 100%,
|
|
0% 100%
|
|
);
|
|
background-color: var(--dt-card-color, var(--color-primary));
|
|
color: var(--color-bg);
|
|
animation: dt-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
|
|
}
|
|
|
|
[data-brand="dt"] .dt-menu-item.active,
|
|
[data-brand="dt"] .dt-menu-item[aria-expanded="true"] {
|
|
color: var(--color-secondary);
|
|
border-color: var(--color-secondary);
|
|
}
|
|
|
|
[data-brand="dt"] .dt-menu-item.selected {
|
|
clip-path: polygon(
|
|
0% 0%,
|
|
100% 0%,
|
|
100% calc(100% - var(--menu-item-corner)),
|
|
calc(100% - var(--menu-item-corner)) 100%,
|
|
0% 100%
|
|
);
|
|
background-color: var(--dt-card-color-selected, rgba(var(--color-primary-rgb), 0.7));
|
|
color: var(--color-bg);
|
|
animation: none;
|
|
}
|
|
|
|
[data-brand="dt"] .dt-menu-item.selected:hover {
|
|
animation: dt-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
|
|
}
|
|
|
|
/* Classic brand: rounded, thinner borders */
|
|
[data-brand="classic"] .dt-menu-item {
|
|
border-top-width: 2px;
|
|
border-radius: var(--radius-sm);
|
|
}
|
|
|
|
[data-brand="classic"] .dt-menu-item:hover {
|
|
clip-path: none;
|
|
border-radius: var(--radius-sm);
|
|
}
|
|
|
|
[data-brand="classic"] .dt-menu-item.selected {
|
|
clip-path: none;
|
|
border-radius: var(--radius-sm);
|
|
}
|
|
|
|
/* ============================================================================
|
|
Filter Header — thick border accent bar
|
|
Source: dt-shopify-storefront FilterAccordion header
|
|
============================================================================ */
|
|
[data-brand="dt"] .dt-filter-header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 12px 16px;
|
|
border-top: 5px solid var(--color-primary);
|
|
border-bottom: 1px solid rgba(var(--color-primary-rgb), 0.2);
|
|
font-weight: 600;
|
|
letter-spacing: 0.05em;
|
|
cursor: pointer;
|
|
}
|
|
|
|
[data-brand="dt"] .dt-filter-header.active {
|
|
color: var(--color-secondary);
|
|
border-top-color: var(--color-secondary);
|
|
}
|
|
|
|
[data-brand="classic"] .dt-filter-header {
|
|
border-top-width: 1px;
|
|
}
|
|
|
|
/* ============================================================================
|
|
Mobile Filter Overlay
|
|
Source: dt-shopify-storefront MobileFilterMenu
|
|
============================================================================ */
|
|
.dt-filter-overlay {
|
|
position: fixed;
|
|
inset: 0;
|
|
z-index: 1000;
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
.dt-filter-overlay-backdrop {
|
|
position: absolute;
|
|
inset: 0;
|
|
background: rgba(0, 0, 0, 0.5);
|
|
backdrop-filter: blur(4px);
|
|
}
|
|
|
|
.dt-filter-overlay-content {
|
|
position: relative;
|
|
margin-top: auto;
|
|
max-height: 85vh;
|
|
background: var(--color-bg);
|
|
overflow-y: auto;
|
|
animation: dt-slide-up 0.3s ease-in-out both;
|
|
}
|