UNPKG

@zohodesk/docs-builder

Version:

docs-builder is used to build your own docs

400 lines (351 loc) 6.94 kB
/* Main container */ .previewContainer { display: flex; flex-direction: column; height: 100%; width: 100%; background-color: #f8f9fc; color: #323848; font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; overflow: hidden; } /* Header styling */ .header { background: linear-gradient(to right, #081224, #0b1a35, #123456); border-bottom: 1px solid rgba(255, 255, 255, 0.1); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); padding: 0; position: relative; z-index: 10; } .headerContent { display: flex; flex-direction: column; padding: 16px 24px 0; border-left: 0.5px solid; } .titleArea { display: flex; align-items: center; margin-bottom: 12px; } .componentTitle { color: white; font-size: 24px; font-weight: 600; margin: 0; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); } /* Tabs styling */ .tabsContainer { margin-bottom: -1px; overflow-x: auto; } .tabs { display: flex; gap: 2px; } .tab { background: transparent; border: none; border-radius: 8px 8px 0 0; color: rgba(255, 255, 255, 0.7); cursor: pointer; font-size: 14px; font-weight: 500; padding: 12px 20px; position: relative; transition: all 0.2s ease; display: flex; align-items: center; gap: 8px; } .tab:hover { background-color: rgba(255, 255, 255, 0.1); color: white; } .activeTab { background-color: #f8f9fc; color: #2c3e50; } .activeTab:hover { background-color: #f8f9fc; color: #2c3e50; } .disabledTab { opacity: 0.5; cursor: not-allowed; } .tabIcon { font-size: 14px; display: flex; align-items: center; } /* Content area */ .contentArea { flex: 1; overflow: hidden; position: relative; display: flex; flex-direction: column; padding: 0; } /* Component View */ .componentView { display: flex; flex-direction: column; height: 100%; width: 100%; position: relative; overflow: auto; } .iframeContainer { flex: 1; background-color: white; position: relative; height: calc(100% - 60px); overflow: auto; margin: 0 auto; display: flex; justify-content: center; border-radius: 0; box-shadow: none; } .iframe { border: none; height: 100%; width: 100%; max-width: 100%; } /* Loading spinner */ .loadingOverlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background-color: rgba(255, 255, 255, 0.8); display: flex; align-items: center; justify-content: center; z-index: 10; } .loadingSpinner { display: inline-block; position: relative; width: 64px; height: 64px; } .loadingSpinner div { position: absolute; border: 4px solid #3498db; opacity: 1; border-radius: 50%; animation: loadingSpinner 1.5s cubic-bezier(0, 0.2, 0.8, 1) infinite; } .loadingSpinner div:nth-child(2) { animation-delay: -0.5s; } @keyframes loadingSpinner { 0% { top: 28px; left: 28px; width: 0; height: 0; opacity: 1; } 100% { top: -2px; left: -2px; width: 60px; height: 60px; opacity: 0; } } /* Toolbar */ .toolbar { display: flex; align-items: center; justify-content: space-between; background-color: white; border-radius: 0; box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.08); padding: 8px 16px; height: 60px; overflow: visible; border-top: 1px solid #e2e8f0; } .toolbarActions { display: flex; gap: 8px; flex-shrink: 0; } .toolbarButton { background-color: #f1f5f9; border: none; border-radius: 4px; color: #475569; cursor: pointer; font-size: 14px; height: 32px; padding: 0; transition: all 0.2s ease; width: 32px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; } .toolbarButton:hover { background-color: #e2e8f0; color: #334155; } .resizeOverlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: transparent; z-index: 5; cursor: ew-resize; } .resizeHandle { position: absolute; top: 0; right: 0px; width: 16px; height: 100%; cursor: ew-resize; display: flex; align-items: center; justify-content: center; z-index: 10; user-select: none; } /* If you need specific styles for text buttons */ .resetButton { border: 1px solid #2d8cff; color: #2d8cff; padding: 4px 7px; font-size: 10px; border-radius: 4px; cursor: pointer; background: #fff; transition: all 0.2s ease-in-out; } .resetButton:hover { background-color: #f0f7ff; } .resetButton:disabled { border-color: #ccc; color: #aaa; background-color: #f9f9f9; cursor: not-allowed; } .resizeHandleBar { width: 4px; height: 40px; border-radius: 2px; background-color: #dadada; transition: background-color 0.2s ease; user-select: none; } .resizeHandle:hover .resizeHandleBar { background-color: #007bff; } .toolbarButton.active { background-color: #3498db; color: white; } .resizeControls { display: flex; align-items: center; gap: 16px; flex-shrink: 0; min-width: 0; flex-wrap: nowrap; } .rangeSlider { appearance: none; width: 150px; height: 4px; background: #e2e8f0; border-radius: 4px; outline: none; flex-shrink: 1; min-width: 100px; } .rangeSlider::-webkit-slider-thumb { appearance: none; width: 16px; height: 16px; border-radius: 50%; background: #3498db; cursor: pointer; transition: all 0.15s ease; } .rangeSlider::-webkit-slider-thumb:hover { background: #2980b9; transform: scale(1.2); } .deviceInfo { display: flex; flex-direction: column; font-size: 12px; line-height: 1.5; min-width: 120px; flex-shrink: 0; white-space: nowrap; } .deviceType { color: #475569; font-weight: 600; } .dimensions { color: #64748b; } /* Empty states */ .noPlayground { display: flex; align-items: center; justify-content: center; height: 100%; min-height: 300px; } .emptyState { display: flex; flex-direction: column; align-items: center; text-align: center; color: #94a3b8; } .emptyState i { font-size: 48px; margin-bottom: 16px; opacity: 0.5; } .emptyState h2 { font-size: 20px; font-weight: 600; margin-bottom: 8px; color: #64748b; } .emptyState p { font-size: 14px; max-width: 300px; } /* PropTypes, Code and Playground views */ .propTypesView, .codeView, .playgroundView { background-color: white; border-radius: 0; box-shadow: none; height: 100%; overflow: auto; margin: 0; } .propTypesView { padding: 10px; }