diff --git a/components.js b/components.js
index ef67c2e..51e041c 100644
--- a/components.js
+++ b/components.js
@@ -1,3767 +1,15 @@
-const smButton = document.createElement('template')
-smButton.innerHTML = `
-
-
-
-
`;
-customElements.define('sm-button',
- class extends HTMLElement {
- constructor() {
- super()
- this.attachShadow({
- mode: 'open'
- }).append(smButton.content.cloneNode(true))
- }
- static get observedAttributes() {
- return ['disabled'];
- }
-
- get disabled() {
- return this.hasAttribute('disabled')
- }
-
- set disabled(value) {
- if (value) {
- this.setAttribute('disabled', '')
- }else {
- this.removeAttribute('disabled')
- }
- }
-
- handleKeyDown(e) {
- if (!this.hasAttribute('disabled') && (e.key === 'Enter' || e.code === 'Space')) {
- e.preventDefault()
- this.click()
- }
- }
-
- connectedCallback() {
- if (!this.hasAttribute('disabled')) {
- this.setAttribute('tabindex', '0')
- }
- this.setAttribute('role', 'button')
- this.addEventListener('keydown', this.handleKeyDown)
- }
- attributeChangedCallback(name, oldVal, newVal) {
- if (name === 'disabled') {
- this.removeAttribute('tabindex')
- this.setAttribute('aria-disabled', 'true')
- }
- else {
- this.setAttribute('tabindex', '0')
- this.setAttribute('aria-disabled', 'false')
- }
- }
- })
-const smCheckbox = document.createElement('template')
-smCheckbox.innerHTML = `
-
-`
-customElements.define('sm-checkbox', class extends HTMLElement {
- constructor() {
- super()
- this.attachShadow({
- mode: 'open'
- }).append(smCheckbox.content.cloneNode(true))
-
- this.checkbox = this.shadowRoot.querySelector('.checkbox');
-
- this.reset = this.reset.bind(this)
- this.dispatch = this.dispatch.bind(this)
- this.handleKeyDown = this.handleKeyDown.bind(this)
- this.handleClick = this.handleClick.bind(this)
- }
-
- static get observedAttributes() {
- return ['value', 'disabled', 'checked']
- }
-
- get disabled() {
- return this.hasAttribute('disabled')
- }
-
- set disabled(val) {
- if (val) {
- this.setAttribute('disabled', '')
- } else {
- this.removeAttribute('disabled')
- }
- }
-
- get checked() {
- return this.hasAttribute('checked')
- }
-
- set checked(value) {
- if (value) {
- this.setAttribute('checked', '')
- }
- else {
- this.removeAttribute('checked')
- }
- }
-
- set value(val) {
- this.setAttribute('value', val)
- }
-
- get value() {
- return this.getAttribute('value')
- }
-
- reset() {
- this.removeAttribute('checked')
- }
-
- dispatch(){
- this.dispatchEvent(new CustomEvent('change', {
- bubbles: true,
- composed: true
- }))
- }
- handleKeyDown(e){
- if (e.code === "Space") {
- e.preventDefault()
- this.click()
- }
- }
- handleClick(e){
- this.toggleAttribute('checked')
- }
-
- connectedCallback() {
- if (!this.hasAttribute('disabled')) {
- this.setAttribute('tabindex', '0')
- }
- this.setAttribute('role', 'checkbox')
- if (!this.hasAttribute('checked')) {
- this.setAttribute('aria-checked', 'false')
- }
- this.addEventListener('keydown', this.handleKeyDown)
- this.addEventListener('click', this.handleClick)
- }
- attributeChangedCallback(name, oldValue, newValue) {
- if (oldValue !== newValue) {
- if (name === 'checked') {
- this.setAttribute('aria-checked', this.hasAttribute('checked'))
- this.dispatch()
- }
- else if (name === 'disabled') {
- if (this.hasAttribute('disabled')) {
- this.removeAttribute('tabindex')
- }
- else {
- this.setAttribute('tabindex', '0')
- }
- }
- }
- }
- disconnectedCallback() {
- this.removeEventListener('keydown', this.handleKeyDown)
- this.removeEventListener('change', this.handleClick)
- }
-})
-const smCopy = document.createElement('template')
-smCopy.innerHTML = `
-
-
-
-`;
-customElements.define('sm-copy',
- class extends HTMLElement {
- constructor() {
- super()
- this.attachShadow({
- mode: 'open'
- }).append(smCopy.content.cloneNode(true))
-
- this.copyContent = this.shadowRoot.querySelector('.copy-content')
- this.copyButton = this.shadowRoot.querySelector('.copy-button')
-
- this.copy = this.copy.bind(this)
- }
- static get observedAttributes() {
- return ['value']
- }
- set value(val) {
- this.setAttribute('value', val)
- }
- get value() {
- return this.getAttribute('value')
- }
- fireEvent() {
- this.dispatchEvent(
- new CustomEvent('copy', {
- composed: true,
- bubbles: true,
- cancelable: true,
- })
- )
- }
- copy() {
- navigator.clipboard.writeText(this.copyContent.textContent)
- .then(res => this.fireEvent())
- .catch(err => console.error(err))
- }
- connectedCallback() {
- this.copyButton.addEventListener('click', this.copy)
- }
- attributeChangedCallback(name, oldValue, newValue) {
- if (name === 'value') {
- this.copyContent.textContent = newValue
- }
- }
- disconnectedCallback() {
- this.copyButton.removeEventListener('click', this.copy)
- }
- })
-const smForm = document.createElement('template')
-smForm.innerHTML = `
-
-
-`
-
-customElements.define('sm-form', class extends HTMLElement {
- constructor() {
- super()
- this.attachShadow({
- mode: 'open'
- }).append(smForm.content.cloneNode(true))
-
- this.form = this.shadowRoot.querySelector('form')
- this.formElements
- this.requiredElements
- this.submitButton
- this.resetButton
- this.allRequiredValid = false
-
- this.debounce = this.debounce.bind(this)
- this.handleInput = this.handleInput.bind(this)
- this.handleKeydown = this.handleKeydown.bind(this)
- this.reset = this.reset.bind(this)
- }
- debounce(callback, wait) {
- let timeoutId = null;
- return (...args) => {
- window.clearTimeout(timeoutId);
- timeoutId = window.setTimeout(() => {
- callback.apply(null, args);
- }, wait);
- };
- }
- handleInput(e) {
- this.allRequiredValid = this.requiredElements.every(elem => elem.isValid)
- if (!this.submitButton) return;
- if (this.allRequiredValid) {
- this.submitButton.disabled = false;
- }
- else {
- this.submitButton.disabled = true;
- }
- }
- handleKeydown(e) {
- if (e.key === 'Enter' && e.target.tagName !== 'SM-TEXTAREA' ) {
- if (this.allRequiredValid) {
- this.submitButton.click()
- }
- else {
- this.requiredElements.find(elem => !elem.isValid).vibrate()
- }
- }
- }
- reset() {
- this.formElements.forEach(elem => elem.reset())
- }
- connectedCallback() {
- const slot = this.shadowRoot.querySelector('slot')
- slot.addEventListener('slotchange', e => {
- this.formElements = [...this.querySelectorAll('sm-input, sm-textarea, sm-checkbox, tags-input, file-input, sm-switch, sm-radio')]
- this.requiredElements = this.formElements.filter(elem => elem.hasAttribute('required'))
- this.submitButton = e.target.assignedElements().find(elem => elem.getAttribute('variant') === 'primary' || elem.getAttribute('type') === 'submit');
- this.resetButton = e.target.assignedElements().find(elem => elem.getAttribute('type') === 'reset');
- if (this.resetButton) {
- this.resetButton.addEventListener('click', this.reset)
- }
- })
- this.addEventListener('input', this.debounce(this.handleInput, 100))
- this.addEventListener('keydown', this.debounce(this.handleKeydown, 100))
- }
- disconnectedCallback() {
- this.removeEventListener('input', this.debounce(this.handleInput, 100))
- this.removeEventListener('keydown', this.debounce(this.handleKeydown, 100))
- }
-})
-
-const smInput = document.createElement('template')
-smInput.innerHTML = `
-
-
-`;
-customElements.define('sm-input',
- class extends HTMLElement {
-
- constructor() {
- super()
- this.attachShadow({
- mode: 'open'
- }).append(smInput.content.cloneNode(true))
-
- this.inputParent = this.shadowRoot.querySelector('.input')
- this.input = this.shadowRoot.querySelector('input')
- this.clearBtn = this.shadowRoot.querySelector('.clear')
- this.label = this.shadowRoot.querySelector('.label')
- this.feedbackText = this.shadowRoot.querySelector('.feedback-text')
- this.outerContainer = this.shadowRoot.querySelector('.outer-container')
- this._helperText
- this._errorText
- this.isRequired = false
- this.validationFunction
- this.reflectedAttributes = ['value', 'required', 'disabled', 'type', 'inputmode', 'readonly', 'min', 'max', 'pattern', 'minlength', 'maxlength', 'step']
-
- this.reset = this.reset.bind(this)
- this.focusIn = this.focusIn.bind(this)
- this.focusOut = this.focusOut.bind(this)
- this.fireEvent = this.fireEvent.bind(this)
- this.checkInput = this.checkInput.bind(this)
- this.vibrate = this.vibrate.bind(this)
- }
-
- static get observedAttributes() {
- return ['value', 'placeholder', 'required', 'disabled', 'type', 'inputmode', 'readonly', 'min', 'max', 'pattern', 'minlength', 'maxlength', 'step', 'helper-text', 'error-text']
- }
-
- get value() {
- return this.input.value
- }
-
- set value(val) {
- this.input.value = val;
- this.checkInput()
- this.fireEvent()
- }
-
- get placeholder() {
- return this.getAttribute('placeholder')
- }
-
- set placeholder(val) {
- this.setAttribute('placeholder', val)
- }
-
- get type() {
- return this.getAttribute('type')
- }
-
- set type(val) {
- this.setAttribute('type', val)
- }
-
- get validity() {
- return this.input.validity
- }
-
- set disabled(value) {
- if (value)
- this.inputParent.classList.add('disabled')
- else
- this.inputParent.classList.remove('disabled')
- }
- set readOnly(value) {
- if (value) {
- this.setAttribute('readonly', '')
- } else {
- this.removeAttribute('readonly')
- }
- }
- set customValidation(val) {
-
- this.validationFunction = val
- }
- set errorText(val) {
- this._errorText = val
- }
- set helperText(val) {
- this._helperText = val
- }
- get isValid() {
- if (this.input.value !== '') {
- const _isValid = this.input.checkValidity()
- let _customValid = true
- if (this.validationFunction) {
- _customValid = Boolean(this.validationFunction(this.input.value))
- }
- if (_isValid && _customValid) {
- this.feedbackText.classList.remove('error')
- this.feedbackText.classList.add('success')
- this.feedbackText.textContent = ''
- } else {
- if (this._errorText) {
- this.feedbackText.classList.add('error')
- this.feedbackText.classList.remove('success')
- this.feedbackText.innerHTML = `
-
- ${this._errorText}
- `
- }
- }
- return (_isValid && _customValid)
- }
- }
- reset(){
- this.value = ''
- }
-
- focusIn(){
- this.input.focus()
- }
-
- focusOut(){
- this.input.blur()
- }
-
- fireEvent(){
- let event = new Event('input', {
- bubbles: true,
- cancelable: true,
- composed: true
- });
- this.dispatchEvent(event);
- }
-
- checkInput(e){
- if (!this.hasAttribute('readonly')) {
- if (this.input.value.trim() !== '') {
- this.clearBtn.classList.remove('hide')
- } else {
- this.clearBtn.classList.add('hide')
- if (this.isRequired) {
- this.feedbackText.textContent = '* required'
- }
- }
- }
- if (!this.hasAttribute('placeholder') || this.getAttribute('placeholder').trim() === '') return;
- if (this.input.value !== '') {
- if (this.animate)
- this.inputParent.classList.add('animate-label')
- else
- this.label.classList.add('hide')
- } else {
- if (this.animate)
- this.inputParent.classList.remove('animate-label')
- else
- this.label.classList.remove('hide')
- }
- }
- vibrate() {
- this.outerContainer.animate([
- { transform: 'translateX(-1rem)' },
- { transform: 'translateX(1rem)' },
- { transform: 'translateX(-0.5rem)' },
- { transform: 'translateX(0.5rem)' },
- { transform: 'translateX(0)' },
- ], {
- duration: 300,
- easing: 'ease'
- })
- }
-
-
- connectedCallback() {
- this.animate = this.hasAttribute('animate')
- this.setAttribute('role', 'textbox')
- this.input.addEventListener('input', this.checkInput)
- this.clearBtn.addEventListener('click', this.reset)
- }
-
- attributeChangedCallback(name, oldValue, newValue) {
- if (oldValue !== newValue) {
- if (this.reflectedAttributes.includes(name)) {
- if (this.hasAttribute(name)) {
- this.input.setAttribute(name, this.getAttribute(name) ? this.getAttribute(name) : '')
- }
- else {
- this.input.removeAttribute(name)
- }
- }
- if (name === 'placeholder') {
- this.label.textContent = newValue;
- this.setAttribute('aria-label', newValue);
- }
- else if (this.hasAttribute('value')) {
- this.checkInput()
- }
- else if (name === 'type') {
- if (this.hasAttribute('type') && this.getAttribute('type') === 'number') {
- this.input.setAttribute('inputmode', 'numeric')
- }
- }
- else if (name === 'helper-text') {
- this._helperText = this.getAttribute('helper-text')
- }
- else if (name === 'error-text') {
- this._errorText = this.getAttribute('error-text')
- }
- else if (name === 'required') {
- this.isRequired = this.hasAttribute('required')
- if (this.isRequired) {
- this.feedbackText.textContent = '* required'
- this.setAttribute('aria-required', 'true')
- }
- else {
- this.feedbackText.textContent = ''
- this.setAttribute('aria-required', 'false')
- }
- }
- else if (name === 'readonly') {
- if (this.hasAttribute('readonly')) {
- this.inputParent.classList.add('readonly')
- } else {
- this.inputParent.classList.remove('readonly')
- }
- }
- else if (name === 'disabled') {
- if (this.hasAttribute('disabled')) {
- this.inputParent.classList.add('disabled')
- }
- else {
- this.inputParent.classList.remove('disabled')
- }
- }
- }
- }
- disconnectedCallback() {
- this.input.removeEventListener('input', this.checkInput)
- this.clearBtn.removeEventListener('click', this.reset)
- }
- })
-const smMenu = document.createElement('template')
-smMenu.innerHTML = `
-
-`;
-customElements.define('sm-menu', class extends HTMLElement {
- constructor() {
- super()
- this.attachShadow({
- mode: 'open'
- }).append(smMenu.content.cloneNode(true))
-
- this.isOpen = false;
- this.availableOptions
- this.containerDimensions
- this.animOptions = {
- duration: 200,
- easing: 'ease'
- }
-
- this.optionList = this.shadowRoot.querySelector('.options')
- this.menu = this.shadowRoot.querySelector('.menu')
- this.icon = this.shadowRoot.querySelector('.icon')
-
- this.expand = this.expand.bind(this)
- this.collapse = this.collapse.bind(this)
- this.toggle = this.toggle.bind(this)
- this.handleKeyDown = this.handleKeyDown.bind(this)
- this.handleClickoutSide = this.handleClickoutSide.bind(this)
-
- }
- static get observedAttributes() {
- return ['value']
- }
- get value() {
- return this.getAttribute('value')
- }
- set value(val) {
- this.setAttribute('value', val)
- }
- expand() {
- if (!this.isOpen) {
- this.optionList.classList.remove('hide')
- this.optionList.animate([
- {
- transform: window.innerWidth < 640 ? 'translateY(1.5rem)' : 'translateY(-1rem)',
- opacity: '0'
- },
- {
- transform: 'none',
- opacity: '1'
- },
- ], this.animOptions)
- .onfinish = () => {
- this.isOpen = true
- this.icon.classList.add('focused')
- }
- }
- }
- collapse() {
- if (this.isOpen) {
- this.optionList.animate([
- {
- transform: 'none',
- opacity: '1'
- },
- {
- transform: window.innerWidth < 640 ? 'translateY(1.5rem)' : 'translateY(-1rem)',
- opacity: '0'
- },
- ], this.animOptions)
- .onfinish = () => {
- this.isOpen = false
- this.icon.classList.remove('focused')
- this.optionList.classList.add('hide')
- }
- }
- }
- toggle() {
- if (!this.isOpen) {
- this.expand()
- } else {
- this.collapse()
- }
- }
- handleKeyDown(e) {
- // If key is pressed on menu button
- if (e.target === this) {
- if (e.code === 'ArrowDown') {
- e.preventDefault()
- this.availableOptions[0].focus()
- }
- else if (e.code === 'Enter' || e.code === 'Space') {
- e.preventDefault()
- this.toggle()
- }
- } else { // If mey is pressed over menu options
- if (e.code === 'ArrowUp') {
- e.preventDefault()
- if (document.activeElement.previousElementSibling) {
- document.activeElement.previousElementSibling.focus()
- } else {
- this.availableOptions[this.availableOptions.length - 1].focus()
- }
- }
- else if (e.code === 'ArrowDown') {
- e.preventDefault()
- if (document.activeElement.nextElementSibling) {
- document.activeElement.nextElementSibling.focus()
- } else {
- this.availableOptions[0].focus()
- }
- }
- else if (e.code === 'Enter' || e.code === 'Space') {
- e.preventDefault()
- e.target.click()
- }
- }
- }
- handleClickoutSide(e) {
- if (!this.contains(e.target) && e.button !== 2) {
- this.collapse()
- }
- }
- connectedCallback() {
- this.setAttribute('role', 'listbox')
- this.setAttribute('aria-label', 'dropdown menu')
- const slot = this.shadowRoot.querySelector('.options slot')
- slot.addEventListener('slotchange', e => {
- this.availableOptions = e.target.assignedElements()
- this.containerDimensions = this.optionList.getBoundingClientRect()
- });
- this.addEventListener('click', this.toggle)
- this.addEventListener('keydown', this.handleKeyDown)
- document.addEventListener('mousedown', this.handleClickoutSide)
- }
- disconnectedCallback() {
- this.removeEventListener('click', this.toggle)
- this.removeEventListener('keydown', this.handleKeyDown)
- document.removeEventListener('mousedown', this.handleClickoutSide)
- }
-})
-
-// option
-const menuOption = document.createElement('template')
-menuOption.innerHTML = `
-
-
-
-
`;
-customElements.define('menu-option', class extends HTMLElement {
- constructor() {
- super()
- this.attachShadow({
- mode: 'open'
- }).append(menuOption.content.cloneNode(true))
- }
-
- connectedCallback() {
- this.setAttribute('role', 'option')
- this.addEventListener('keyup', e => {
- if (e.code === 'Enter' || e.code === 'Space') {
- e.preventDefault()
- this.click()
- }
- })
- }
-})
-const smPopup = document.createElement('template')
-smPopup.innerHTML = `
-
-
-`;
-customElements.define('sm-popup', class extends HTMLElement {
- constructor() {
- super()
- this.attachShadow({
- mode: 'open'
- }).append(smPopup.content.cloneNode(true))
-
- this.allowClosing = false
- this.isOpen = false
- this.pinned = false
- this.popupStack
- this.offset
- this.touchStartY = 0
- this.touchEndY = 0
- this.touchStartTime = 0
- this.touchEndTime = 0
- this.touchEndAnimataion
-
- this.popupContainer = this.shadowRoot.querySelector('.popup-container')
- this.popup = this.shadowRoot.querySelector('.popup')
- this.popupBodySlot = this.shadowRoot.querySelector('.popup-body slot')
- this.popupHeader = this.shadowRoot.querySelector('.popup-top')
-
- this.resumeScrolling = this.resumeScrolling.bind(this)
- this.show = this.show.bind(this)
- this.hide = this.hide.bind(this)
- this.handleTouchStart = this.handleTouchStart.bind(this)
- this.handleTouchMove = this.handleTouchMove.bind(this)
- this.handleTouchEnd = this.handleTouchEnd.bind(this)
- this.movePopup = this.movePopup.bind(this)
- }
-
- static get observedAttributes() {
- return ['open'];
- }
-
- get open() {
- return this.isOpen
- }
-
- resumeScrolling() {
- const scrollY = document.body.style.top;
- window.scrollTo(0, parseInt(scrollY || '0') * -1);
- setTimeout(() => {
- document.body.style.overflow = 'auto';
- document.body.style.top = 'initial'
- }, 300);
- }
-
- show(options = {}) {
- const {pinned = false, popupStack = undefined} = options
- if (popupStack)
- this.popupStack = popupStack
- if (this.popupStack && !this.hasAttribute('open')) {
- this.popupStack.push({
- popup: this,
- permission: pinned
- })
- if (this.popupStack.items.length > 1) {
- this.popupStack.items[this.popupStack.items.length - 2].popup.classList.add('stacked')
- }
- this.dispatchEvent(
- new CustomEvent("popupopened", {
- bubbles: true,
- detail: {
- popup: this,
- popupStack: this.popupStack
- }
- })
- )
- this.setAttribute('open', '')
- this.pinned = pinned
- this.isOpen = true
- }
- this.popupContainer.classList.remove('hide')
- this.popup.style.transform = 'none';
- document.body.style.overflow = 'hidden';
- document.body.style.top = `-${window.scrollY}px`
- return this.popupStack
- }
- hide() {
- if (window.innerWidth < 640)
- this.popup.style.transform = 'translateY(100%)';
- else
- this.popup.style.transform = 'translateY(3rem)';
- this.popupContainer.classList.add('hide')
- this.removeAttribute('open')
- if (typeof this.popupStack !== 'undefined') {
- this.popupStack.pop()
- if (this.popupStack.items.length) {
- this.popupStack.items[this.popupStack.items.length - 1].popup.classList.remove('stacked')
- } else {
- this.resumeScrolling()
- }
- } else {
- this.resumeScrolling()
- }
-
- if (this.forms.length) {
- setTimeout(() => {
- this.forms.forEach(form => form.reset())
- }, 300);
- }
- setTimeout(() => {
- this.dispatchEvent(
- new CustomEvent("popupclosed", {
- bubbles: true,
- detail: {
- popup: this,
- popupStack: this.popupStack
- }
- })
- )
- this.isOpen = false
- }, 300);
- }
-
- handleTouchStart(e) {
- this.touchStartY = e.changedTouches[0].clientY
- this.popup.style.transition = 'transform 0.1s'
- this.touchStartTime = e.timeStamp
- }
-
- handleTouchMove(e) {
- if (this.touchStartY < e.changedTouches[0].clientY) {
- this.offset = e.changedTouches[0].clientY - this.touchStartY;
- this.touchEndAnimataion = window.requestAnimationFrame(() => this.movePopup())
- }
- }
-
- handleTouchEnd(e) {
- this.touchEndTime = e.timeStamp
- cancelAnimationFrame(this.touchEndAnimataion)
- this.touchEndY = e.changedTouches[0].clientY
- this.popup.style.transition = 'transform 0.3s'
- this.threshold = this.popup.getBoundingClientRect().height * 0.3
- if (this.touchEndTime - this.touchStartTime > 200) {
- if (this.touchEndY - this.touchStartY > this.threshold) {
- if (this.pinned) {
- this.show()
- return
- } else
- this.hide()
- } else {
- this.show()
- }
- } else {
- if (this.touchEndY > this.touchStartY)
- if (this.pinned) {
- this.show()
- return
- }
- else
- this.hide()
- }
- }
-
- movePopup() {
- this.popup.style.transform = `translateY(${this.offset}px)`
- }
-
- connectedCallback() {
- this.popupBodySlot.addEventListener('slotchange', () => {
- this.forms = this.querySelectorAll('sm-form')
- })
- this.popupContainer.addEventListener('mousedown', e => {
- if (e.target === this.popupContainer && !this.pinned) {
- if (this.pinned) {
- this.show()
- } else
- this.hide()
- }
- })
-
- const resizeObserver = new ResizeObserver(entries => {
- for (let entry of entries) {
- if (entry.contentBoxSize) {
- // Firefox implements `contentBoxSize` as a single content rect, rather than an array
- const contentBoxSize = Array.isArray(entry.contentBoxSize) ? entry.contentBoxSize[0] : entry.contentBoxSize;
- this.threshold = contentBoxSize.blockSize.height * 0.3
- } else {
- this.threshold = entry.contentRect.height * 0.3
- }
- }
- });
- resizeObserver.observe(this)
-
-
- this.popupHeader.addEventListener('touchstart', (e) => { this.handleTouchStart(e) }, { passive: true })
- this.popupHeader.addEventListener('touchmove', (e) => { this.handleTouchMove(e) }, { passive: true })
- this.popupHeader.addEventListener('touchend', (e) => { this.handleTouchEnd(e) }, { passive: true })
- }
- disconnectedCallback() {
- this.popupHeader.removeEventListener('touchstart', this.handleTouchStart, { passive: true })
- this.popupHeader.removeEventListener('touchmove', this.handleTouchMove, { passive: true })
- this.popupHeader.removeEventListener('touchend', this.handleTouchEnd, { passive: true })
- resizeObserver.unobserve()
- }
- attributeChangedCallback(name, oldVal, newVal) {
- if (name === 'open') {
- if (this.hasAttribute('open')) {
- this.show()
- }
- }
- }
-})
-
-const smSwitch = document.createElement('template')
-smSwitch.innerHTML = `
-
-`
-
-customElements.define('sm-switch', class extends HTMLElement {
- constructor() {
- super()
- this.attachShadow({
- mode: 'open'
- }).append(smSwitch.content.cloneNode(true))
- this.switch = this.shadowRoot.querySelector('.switch');
- this.input = this.shadowRoot.querySelector('input')
- this.isChecked = false
- this.isDisabled = false
-
- this.dispatch = this.dispatch.bind(this)
- }
-
- static get observedAttributes() {
- return ['disabled', 'checked']
- }
-
- get disabled() {
- return this.isDisabled
- }
-
- set disabled(val) {
- if (val) {
- this.setAttribute('disabled', '')
- } else {
- this.removeAttribute('disabled')
- }
- }
-
- get checked() {
- return this.isChecked
- }
-
- set checked(value) {
- if (value) {
- this.setAttribute('checked', '')
- } else {
- this.removeAttribute('checked')
- }
- }
-
- dispatch(){
- this.dispatchEvent(new CustomEvent('change', {
- bubbles: true,
- composed: true,
- detail: {
- value: this.isChecked
- }
- }))
- }
-
- connectedCallback() {
- this.addEventListener('keydown', e => {
- if (e.code === "Space" && !this.isDisabled) {
- e.preventDefault()
- this.input.click()
- }
- })
- this.input.addEventListener('click', e => {
- if (this.input.checked)
- this.checked = true
- else
- this.checked = false
- this.dispatch()
- })
- }
- attributeChangedCallback(name, oldValue, newValue) {
- if (oldValue !== newValue) {
- if (name === 'disabled') {
- if (this.hasAttribute('disabled')) {
- this.disabled = true
- }
- else {
- this.disabled = false
- }
- }
- else if (name === 'checked') {
- if (this.hasAttribute('checked')) {
- this.isChecked = true
- this.input.checked = true
- }
- else {
- this.isChecked = false
- this.input.checked = false
- }
- }
- }
- }
-
-})
-const spinner = document.createElement('template')
-spinner.innerHTML = `
-
-
-
-`
-class SquareLoader extends HTMLElement {
- constructor() {
- super();
- this.attachShadow({
- mode: 'open'
- }).append(spinner.content.cloneNode(true))
- }
-}
-
-window.customElements.define('sm-spinner', SquareLoader);
-const smTabHeader = document.createElement('template')
-smTabHeader.innerHTML = `
-
-
-
-
-`;
-
-customElements.define('sm-tab-header', class extends HTMLElement {
- constructor() {
- super()
- this.attachShadow({
- mode: 'open'
- }).append(smTabHeader.content.cloneNode(true))
-
- this.prevTab
- this.allTabs
- this.activeTab
-
- this.indicator = this.shadowRoot.querySelector('.indicator');
- this.tabSlot = this.shadowRoot.querySelector('slot');
- this.tabHeader = this.shadowRoot.querySelector('.tab-header');
-
- this.changeTab = this.changeTab.bind(this)
- this.handleClick = this.handleClick.bind(this)
- this.handlePanelChange = this.handlePanelChange.bind(this)
- this.moveIndiactor = this.moveIndiactor.bind(this)
- }
-
- fireEvent(index) {
- this.dispatchEvent(
- new CustomEvent(`switchedtab${this.target}`, {
- bubbles: true,
- detail: {
- index: parseInt(index)
- }
- })
- )
- }
-
- moveIndiactor(tabDimensions) {
- this.indicator.setAttribute('style', `width: ${tabDimensions.width}px; transform: translateX(${tabDimensions.left - this.tabHeader.getBoundingClientRect().left + this.tabHeader.scrollLeft}px)`)
- }
-
-
- changeTab(target) {
- if (target === this.prevTab || !target.closest('sm-tab'))
- return
- if (this.prevTab)
- this.prevTab.classList.remove('active')
- target.classList.add('active')
-
- this.tabHeader.scrollTo({
- behavior: 'smooth',
- left: target.getBoundingClientRect().left - this.tabHeader.getBoundingClientRect().left + this.tabHeader.scrollLeft
- })
- this.moveIndiactor(target.getBoundingClientRect())
- this.prevTab = target;
- this.activeTab = target;
- }
- handleClick(e) {
- if (e.target.closest('sm-tab')) {
- this.changeTab(e.target)
- this.fireEvent(e.target.dataset.index)
- }
- }
-
- handlePanelChange(e) {
- this.changeTab(this.allTabs[e.detail.index])
- }
-
- connectedCallback() {
- if (!this.hasAttribute('target') || this.getAttribute('target').value === '') return;
- this.target = this.getAttribute('target')
-
- this.tabSlot.addEventListener('slotchange', () => {
- this.allTabs = this.tabSlot.assignedElements();
- this.allTabs.forEach((tab, index) => {
- tab.dataset.index = index
- })
- })
-
- this.addEventListener('click', this.handleClick)
- document.addEventListener(`switchedpanel${this.target}`, this.handlePanelChange)
-
- let resizeObserver = new ResizeObserver(entries => {
- entries.forEach((entry) => {
- if (this.prevTab) {
- let tabDimensions = this.activeTab.getBoundingClientRect();
- this.moveIndiactor(tabDimensions)
- }
- })
- })
- resizeObserver.observe(this)
- let observer = new IntersectionObserver((entries) => {
- entries.forEach((entry) => {
- if (entry.isIntersecting) {
- this.indicator.style.transition = 'none'
- if (this.activeTab) {
- let tabDimensions = this.activeTab.getBoundingClientRect();
- this.moveIndiactor(tabDimensions)
- } else {
- this.allTabs[0].classList.add('active')
- let tabDimensions = this.allTabs[0].getBoundingClientRect();
- this.moveIndiactor(tabDimensions)
- this.fireEvent(0)
- this.prevTab = this.tabSlot.assignedElements()[0];
- this.activeTab = this.prevTab;
- }
- }
- })
- }, {
- threshold: 1.0
- })
- observer.observe(this)
- }
- disconnectedCallback() {
- this.removeEventListener('click', this.handleClick)
- document.removeEventListener(`switchedpanel${this.target}`, this.handlePanelChange)
- }
-})
-
-// tab
-const smTab = document.createElement('template')
-smTab.innerHTML = `
-
-
-
-
-`;
-
-customElements.define('sm-tab', class extends HTMLElement {
- constructor() {
- super()
- this.shadow = this.attachShadow({
- mode: 'open'
- }).append(smTab.content.cloneNode(true))
- }
-})
-
-// tab-panels
-
-const smTabPanels = document.createElement('template')
-smTabPanels.innerHTML = `
-
-
- Nothing to see here.
-
-`;
-
-customElements.define('sm-tab-panels', class extends HTMLElement {
- constructor() {
- super()
- this.attachShadow({
- mode: 'open'
- }).append(smTabPanels.content.cloneNode(true))
-
- this.isTransitioning = false
-
- this.panelContainer = this.shadowRoot.querySelector('.panel-container');
- this.handleTabChange = this.handleTabChange.bind(this)
- }
- handleTabChange(e) {
- this.isTransitioning = true
- this.panelContainer.scrollTo({
- left: this.allPanels[e.detail.index].getBoundingClientRect().left - this.panelContainer.getBoundingClientRect().left + this.panelContainer.scrollLeft,
- behavior: 'smooth'
- })
- setTimeout(() => {
- this.isTransitioning = false
- }, 300);
- }
- fireEvent(index) {
- this.dispatchEvent(
- new CustomEvent(`switchedpanel${this.id}`, {
- bubbles: true,
- detail: {
- index: parseInt(index)
- }
- })
- )
- }
- connectedCallback() {
- const slot = this.shadowRoot.querySelector('slot');
- slot.addEventListener('slotchange', (e) => {
- this.allPanels = e.target.assignedElements()
- this.allPanels.forEach((panel, index) => {
- panel.dataset.index = index
- intersectionObserver.observe(panel)
- })
- })
- document.addEventListener(`switchedtab${this.id}`, this.handleTabChange)
-
- const intersectionObserver = new IntersectionObserver(entries => {
-
- entries.forEach(entry => {
- if (!this.isTransitioning && entry.isIntersecting) {
- this.fireEvent(entry.target.dataset.index)
- }
- })
- }, {
- threshold: 0.6
- })
- }
- disconnectedCallback() {
- intersectionObserver.disconnect()
- document.removeEventListener(`switchedtab${this.id}`, this.handleTabChange)
- }
-})
-
-const themeToggle = document.createElement('template')
-themeToggle.innerHTML = `
-
-
-`
-
-class ThemeToggle extends HTMLElement {
- constructor() {
- super();
-
- this.attachShadow({
- mode: 'open'
- }).append(themeToggle.content.cloneNode(true))
-
- this.isChecked = false
- this.hasTheme = 'light'
-
- this.toggleState = this.toggleState.bind(this)
- this.fireEvent = this.fireEvent.bind(this)
- this.handleThemeChange = this.handleThemeChange.bind(this)
- }
- static get observedAttributes() {
- return ['checked'];
- }
-
- daylight() {
- this.hasTheme = 'light'
- document.body.dataset.theme = 'light'
- this.setAttribute('aria-checked', 'false')
- }
-
- nightlight() {
- this.hasTheme = 'dark'
- document.body.dataset.theme = 'dark'
- this.setAttribute('aria-checked', 'true')
- }
-
- toggleState() {
- this.toggleAttribute('checked')
- this.fireEvent()
- }
- handleKeyDown(e) {
- if (e.code === 'Space') {
- this.toggleState()
- }
- }
- handleThemeChange(e) {
- if (e.detail.theme !== this.hasTheme) {
- if (e.detail.theme === 'dark') {
- this.setAttribute('checked', '')
- }
- else {
- this.removeAttribute('checked')
- }
- }
- }
-
- fireEvent() {
- this.dispatchEvent(
- new CustomEvent('themechange', {
- bubbles: true,
- composed: true,
- detail: {
- theme: this.hasTheme
- }
- })
- )
- }
-
- connectedCallback() {
- this.setAttribute('role', 'switch')
- this.setAttribute('aria-label', 'theme toggle')
- if (localStorage.getItem(`${window.location.hostname}-theme`) === "dark") {
- this.nightlight();
- this.setAttribute('checked', '')
- } else if (localStorage.getItem(`${window.location.hostname}-theme`) === "light") {
- this.daylight();
- this.removeAttribute('checked')
- }
- else {
- if (window.matchMedia(`(prefers-color-scheme: dark)`).matches) {
- this.nightlight();
- this.setAttribute('checked', '')
- } else {
- this.daylight();
- this.removeAttribute('checked')
- }
- }
- this.addEventListener("click", this.toggleState);
- this.addEventListener("keydown", this.handleKeyDown);
- document.addEventListener('themechange', this.handleThemeChange)
- }
-
- disconnectedCallback() {
- this.removeEventListener("click", this.toggleState);
- this.removeEventListener("keydown", this.handleKeyDown);
- document.removeEventListener('themechange', this.handleThemeChange)
- }
-
- attributeChangedCallback(name, oldVal, newVal) {
- if (name === 'checked') {
- if (this.hasAttribute('checked')) {
- this.nightlight();
- localStorage.setItem(`${window.location.hostname}-theme`, "dark");
- } else {
- this.daylight();
- localStorage.setItem(`${window.location.hostname}-theme`, "light");
- }
- }
- }
-}
-
-window.customElements.define('theme-toggle', ThemeToggle);
-
-const smTextarea = document.createElement('template')
-smTextarea.innerHTML = `
-
-
-`;
-customElements.define('sm-textarea',
- class extends HTMLElement {
- constructor() {
- super()
- this.attachShadow({
- mode: 'open'
- }).append(smTextarea.content.cloneNode(true))
-
- this.textarea = this.shadowRoot.querySelector('textarea')
- this.textareaBox = this.shadowRoot.querySelector('.textarea')
- this.placeholder = this.shadowRoot.querySelector('.placeholder')
- this.reflectedAttributes = ['disabled', 'required', 'readonly', 'rows', 'minlength', 'maxlength']
-
- this.reset = this.reset.bind(this)
- this.focusIn = this.focusIn.bind(this)
- this.fireEvent = this.fireEvent.bind(this)
- this.checkInput = this.checkInput.bind(this)
- }
- static get observedAttributes() {
- return ['disabled', 'value', 'placeholder', 'required', 'readonly', 'rows', 'minlength', 'maxlength']
- }
- get value() {
- return this.textarea.value
- }
- set value(val) {
- this.setAttribute('value', val)
- this.fireEvent()
- }
- get disabled() {
- return this.hasAttribute('disabled')
- }
- set disabled(val) {
- if (val) {
- this.setAttribute('disabled', '')
- } else {
- this.removeAttribute('disabled')
- }
- }
- get isValid() {
- return this.textarea.checkValidity()
- }
- reset(){
- this.setAttribute('value', '')
- }
- focusIn(){
- this.textarea.focus()
- }
- fireEvent(){
- let event = new Event('input', {
- bubbles: true,
- cancelable: true,
- composed: true
- });
- this.dispatchEvent(event);
- }
- checkInput(){
- if (!this.hasAttribute('placeholder') || this.getAttribute('placeholder') === '')
- return;
- if (this.textarea.value !== '') {
- this.placeholder.classList.add('hide')
- } else {
- this.placeholder.classList.remove('hide')
- }
- }
- connectedCallback() {
- this.textarea.addEventListener('input', e => {
- this.textareaBox.dataset.value = this.textarea.value
- this.checkInput()
- })
- }
- attributeChangedCallback(name, oldValue, newValue) {
- if (this.reflectedAttributes.includes(name)) {
- if (this.hasAttribute(name)) {
- this.textarea.setAttribute(name, this.getAttribute(name) ? this.getAttribute(name) : '')
- }
- else {
- this.textContent.removeAttribute(name)
- }
- }
- else if (name === 'placeholder') {
- this.placeholder.textContent = this.getAttribute('placeholder')
- }
- else if (name === 'value') {
- this.textarea.value = newValue;
- this.textareaBox.dataset.value = newValue
- this.checkInput()
- }
- }
- })
- const smNotifications = document.createElement('template')
-smNotifications.innerHTML = `
-
-
-`
-
-customElements.define('sm-notifications', class extends HTMLElement {
- constructor() {
- super()
- this.shadow = this.attachShadow({
- mode: 'open'
- }).append(smNotifications.content.cloneNode(true))
-
- this.notificationPanel = this.shadowRoot.querySelector('.notification-panel')
- this.animationOptions = {
- duration: 300,
- fill: "forwards",
- easing: "cubic-bezier(0.175, 0.885, 0.32, 1.275)"
- }
-
- this.push = this.push.bind(this)
- this.createNotification = this.createNotification.bind(this)
- this.removeNotification = this.removeNotification.bind(this)
- this.clearAll = this.clearAll.bind(this)
-
- }
-
- randString(length) {
- let result = '';
- const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
- for (let i = 0; i < length; i++)
- result += characters.charAt(Math.floor(Math.random() * characters.length));
- return result;
- }
-
- createNotification(message, options) {
- const { pinned = false, icon = '' } = options
- const notification = document.createElement('div')
- notification.id = this.randString(8)
- notification.classList.add('notification')
- let composition = ``
- composition += `
- ${icon}
- ${message}
- `
- if (pinned) {
- notification.classList.add('pinned')
- composition += `
-
- `
- }
- notification.innerHTML = composition
- return notification
- }
-
- push(message, options = {}) {
- const notification = this.createNotification(message, options)
- this.notificationPanel.append(notification)
- notification.animate([
- {
- transform: `translateY(1rem)`,
- opacity: '0'
- },
- {
- transform: `none`,
- opacity: '1'
- },
- ], this.animationOptions)
- return notification.id
- }
-
- removeNotification(notification) {
- notification.animate([
- {
- transform: `none`,
- opacity: '1'
- },
- {
- transform: `translateY(0.5rem)`,
- opacity: '0'
- }
- ], this.animationOptions).onfinish = () => {
- notification.remove()
- }
- }
-
- clearAll() {
- Array.from(this.notificationPanel.children).forEach(child => {
- this.removeNotification(child)
- })
- }
-
- connectedCallback() {
- this.notificationPanel.addEventListener('click', e => {
- if (e.target.closest('.close')) (
- this.removeNotification(e.target.closest('.notification'))
- )
- })
-
- const observer = new MutationObserver(mutationList => {
- mutationList.forEach(mutation => {
- if (mutation.type === 'childList') {
- if (mutation.addedNodes.length && !mutation.addedNodes[0].classList.contains('pinned')) {
- setTimeout(() => {
- this.removeNotification(mutation.addedNodes[0])
- }, 5000);
- }
- }
- })
- })
- observer.observe(this.notificationPanel, {
- childList: true,
- })
- }
-})
-
-const stripSelect = document.createElement('template')
-stripSelect.innerHTML = `
-
-
-
-`
-customElements.define('strip-select', class extends HTMLElement{
- constructor() {
- super()
- this.attachShadow({
- mode: 'open'
- }).append(stripSelect.content.cloneNode(true))
- this.stripSelect = this.shadowRoot.querySelector('.strip-select')
- this.slottedOptions
- this._value
- this.scrollDistance
-
- this.scrollLeft = this.scrollLeft.bind(this)
- this.scrollRight = this.scrollRight.bind(this)
- this.fireEvent = this.fireEvent.bind(this)
- }
- get value() {
- return this._value
- }
- scrollLeft(){
- this.stripSelect.scrollBy({
- left: -this.scrollDistance,
- behavior: 'smooth'
- })
- }
-
- scrollRight(){
- this.stripSelect.scrollBy({
- left: this.scrollDistance,
- behavior: 'smooth'
- })
- }
- fireEvent(){
- this.dispatchEvent(
- new CustomEvent("change", {
- bubbles: true,
- composed: true,
- detail: {
- value: this._value
- }
- })
- )
- }
- connectedCallback() {
- this.setAttribute('role', 'listbox')
-
- const slot = this.shadowRoot.querySelector('slot')
- const coverLeft = this.shadowRoot.querySelector('.cover--left')
- const coverRight = this.shadowRoot.querySelector('.cover--right')
- const navButtonLeft = this.shadowRoot.querySelector('.nav-button--left')
- const navButtonRight = this.shadowRoot.querySelector('.nav-button--right')
- slot.addEventListener('slotchange', e => {
- const assignedElements = slot.assignedElements()
- assignedElements.forEach(elem => {
- if (elem.hasAttribute('selected')) {
- elem.setAttribute('active', '')
- this._value = elem.value
- }
- })
- if (!this.hasAttribute('multiline')) {
- if (assignedElements.length > 0) {
- firstOptionObserver.observe(slot.assignedElements()[0])
- lastOptionObserver.observe(slot.assignedElements()[slot.assignedElements().length - 1])
- }
- else {
- navButtonLeft.classList.add('hide')
- navButtonRight.classList.add('hide')
- coverLeft.classList.add('hide')
- coverRight.classList.add('hide')
- firstOptionObserver.disconnect()
- lastOptionObserver.disconnect()
- }
- }
- })
- const resObs = new ResizeObserver(entries => {
- entries.forEach(entry => {
- if(entry.contentBoxSize) {
- // Firefox implements `contentBoxSize` as a single content rect, rather than an array
- const contentBoxSize = Array.isArray(entry.contentBoxSize) ? entry.contentBoxSize[0] : entry.contentBoxSize;
-
- this.scrollDistance = contentBoxSize.inlineSize * 0.6
- } else {
- this.scrollDistance = entry.contentRect.width * 0.6
- }
- })
- })
- resObs.observe(this)
- this.stripSelect.addEventListener('option-clicked', e => {
- if (this._value !== e.target.value) {
- this._value = e.target.value
- slot.assignedElements().forEach(elem => elem.removeAttribute('active'))
- e.target.setAttribute('active', '')
- e.target.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "center" })
- this.fireEvent()
- }
- })
- const firstOptionObserver = new IntersectionObserver(entries => {
- entries.forEach(entry => {
- if (entry.isIntersecting) {
- navButtonLeft.classList.add('hide')
- coverLeft.classList.add('hide')
- }
- else {
- navButtonLeft.classList.remove('hide')
- coverLeft.classList.remove('hide')
- }
- })
- },
- {
- threshold: 0.9,
- root: this
- })
- const lastOptionObserver = new IntersectionObserver(entries => {
- entries.forEach(entry => {
- if (entry.isIntersecting) {
- navButtonRight.classList.add('hide')
- coverRight.classList.add('hide')
- }
- else {
- navButtonRight.classList.remove('hide')
- coverRight.classList.remove('hide')
- }
- })
- },
- {
- threshold: 0.9,
- root: this
- })
- navButtonLeft.addEventListener('click', this.scrollLeft)
- navButtonRight.addEventListener('click', this.scrollRight)
- }
- disconnectedCallback() {
- navButtonLeft.removeEventListener('click', this.scrollLeft)
- navButtonRight.removeEventListener('click', this.scrollRight)
- }
-})
-
-//Strip option
-const stripOption = document.createElement('template')
-stripOption.innerHTML = `
-
-
-`
-customElements.define('strip-option', class extends HTMLElement{
- constructor() {
- super()
- this.attachShadow({
- mode: 'open'
- }).append(stripOption.content.cloneNode(true))
- this._value
- this.radioButton = this.shadowRoot.querySelector('input')
-
- this.fireEvent = this.fireEvent.bind(this)
- this.handleKeyDown = this.handleKeyDown.bind(this)
- }
- get value() {
- return this._value
- }
- fireEvent(){
- this.dispatchEvent(
- new CustomEvent("option-clicked", {
- bubbles: true,
- composed: true,
- detail: {
- value: this._value
- }
- })
- )
- }
- handleKeyDown(e){
- if (e.key === 'Enter' || e.key === 'Space') {
- this.fireEvent()
- }
- }
- connectedCallback() {
- this.setAttribute('role', 'option')
- this.setAttribute('tabindex', '0')
- this._value = this.getAttribute('value')
- this.addEventListener('click', this.fireEvent)
- this.addEventListener('keydown', this.handleKeyDown)
- }
- disconnectedCallback() {
- this.removeEventListener('click', this.fireEvent)
- this.removeEventListener('keydown', this.handleKeyDown)
- }
-})
-
-const smSelect = document.createElement('template')
-smSelect.innerHTML = `
-
-`;
-customElements.define('sm-select', class extends HTMLElement {
- constructor() {
- super()
- this.attachShadow({
- mode: 'open'
- }).append(smSelect.content.cloneNode(true))
-
- this.reset = this.reset.bind(this)
- this.open = this.open.bind(this)
- this.collapse = this.collapse.bind(this)
- this.toggle = this.toggle.bind(this)
- this.handleOptionsNavigation = this.handleOptionsNavigation.bind(this)
- this.handleOptionSelection = this.handleOptionSelection.bind(this)
- this.handleKeydown = this.handleKeydown.bind(this)
- this.handleClickOutside = this.handleClickOutside.bind(this)
-
- this.availableOptions
- this.previousOption
- this.isOpen = false;
- this.slideDown = [{
- transform: `translateY(-0.5rem)`,
- opacity: 0
- },
- {
- transform: `translateY(0)`,
- opacity: 1
- }
- ]
- this.slideUp = [{
- transform: `translateY(0)`,
- opacity: 1
- },
- {
- transform: `translateY(-0.5rem)`,
- opacity: 0
- }
- ]
- this.animationOptions = {
- duration: 300,
- fill: "forwards",
- easing: 'ease'
- }
-
- this.optionList = this.shadowRoot.querySelector('.options')
- this.chevron = this.shadowRoot.querySelector('.toggle')
- this.selection = this.shadowRoot.querySelector('.selection')
- this.selectedOptionText = this.shadowRoot.querySelector('.selected-option-text')
- }
- static get observedAttributes() {
- return ['value', 'disabled']
- }
- get value() {
- return this.getAttribute('value')
- }
- set value(val) {
- this.setAttribute('value', val)
- }
-
- reset(fire = true) {
- if (this.availableOptions[0] && this.previousOption !== this.availableOptions[0]) {
- const firstElement = this.availableOptions[0];
- if (this.previousOption) {
- this.previousOption.classList.remove('check-selected')
- }
- firstElement.classList.add('check-selected')
- this.value = firstElement.getAttribute('value')
- this.selectedOptionText.textContent = firstElement.textContent
- this.previousOption = firstElement;
- if (fire) {
- this.fireEvent()
- }
- }
- }
-
- open() {
- this.optionList.classList.remove('hide')
- this.optionList.animate(this.slideDown, this.animationOptions)
- this.chevron.classList.add('rotate')
- this.isOpen = true
- }
- collapse() {
- this.chevron.classList.remove('rotate')
- this.optionList.animate(this.slideUp, this.animationOptions)
- .onfinish = () => {
- this.optionList.classList.add('hide')
- this.isOpen = false
- }
- }
- toggle() {
- if (!this.isOpen && !this.hasAttribute('disabled')) {
- this.open()
- } else {
- this.collapse()
- }
- }
-
- fireEvent() {
- this.dispatchEvent(new CustomEvent('change', {
- bubbles: true,
- composed: true,
- detail: {
- value: this.value
- }
- }))
- }
-
- handleOptionsNavigation(e) {
- if (e.code === 'ArrowUp') {
- e.preventDefault()
- if (document.activeElement.previousElementSibling) {
- document.activeElement.previousElementSibling.focus()
- } else {
- this.availableOptions[this.availableOptions.length - 1].focus()
- }
- }
- else if (e.code === 'ArrowDown') {
- e.preventDefault()
- if (document.activeElement.nextElementSibling) {
- document.activeElement.nextElementSibling.focus()
- } else {
- this.availableOptions[0].focus()
- }
- }
- }
- handleOptionSelection(e) {
- if (this.previousOption !== document.activeElement) {
- this.value = document.activeElement.getAttribute('value')
- this.selectedOptionText.textContent = document.activeElement.textContent;
- this.fireEvent()
- if (this.previousOption) {
- this.previousOption.classList.remove('check-selected')
- }
- document.activeElement.classList.add('check-selected')
- this.previousOption = document.activeElement
- }
- }
- handleClick(e) {
- if (e.target === this) {
- this.toggle()
- }
- else {
- this.handleOptionSelection()
- this.collapse()
- }
- }
- handleKeydown(e) {
- if (e.target === this) {
- if (this.isOpen && e.code === 'ArrowDown') {
- e.preventDefault()
- this.availableOptions[0].focus()
- this.handleOptionSelection(e)
- }
- else if (e.code === 'Enter' || e.code === 'Space') {
- e.preventDefault()
- this.toggle()
- }
- }
- else {
- this.handleOptionsNavigation(e)
- this.handleOptionSelection(e)
- if (e.code === 'Enter' || e.code === 'Space') {
- e.preventDefault()
- this.collapse()
- }
- }
- }
- handleClickOutside(e) {
- if (this.isOpen && !this.contains(e.target)) {
- this.collapse()
- }
- }
- connectedCallback() {
- this.setAttribute('role', 'listbox')
- if (!this.hasAttribute('disabled')) {
- this.selection.setAttribute('tabindex', '0')
- }
- let slot = this.shadowRoot.querySelector('slot')
- slot.addEventListener('slotchange', e => {
- this.availableOptions = slot.assignedElements()
- this.reset(false)
- });
- this.addEventListener('click', this.handleClick)
- this.addEventListener('keydown', this.handleKeydown)
- document.addEventListener('mousedown', this.handleClickOutside)
- }
- disconnectedCallback() {
- this.removeEventListener('click', this.toggle)
- this.removeEventListener('keydown', this.handleKeydown)
- document.removeEventListener('mousedown', this.handleClickOutside)
- }
- attributeChangedCallback(name) {
- if (name === "disabled") {
- if (this.hasAttribute('disabled')) {
- this.selection.removeAttribute('tabindex')
- } else {
- this.selection.setAttribute('tabindex', '0')
- }
- }
- }
-})
-
-// option
-const smOption = document.createElement('template')
-smOption.innerHTML = `
-
-`;
-customElements.define('sm-option', class extends HTMLElement {
- constructor() {
- super()
- this.attachShadow({
- mode: 'open'
- }).append(smOption.content.cloneNode(true))
- }
-
- connectedCallback() {
- this.setAttribute('role', 'option')
- this.setAttribute('tabindex', '0')
- }
-})
+const smButton = document.createElement("template"); smButton.innerHTML = "\n\n\n \n
", customElements.define("sm-button", class extends HTMLElement { constructor() { super(), this.attachShadow({ mode: "open" }).append(smButton.content.cloneNode(!0)) } static get observedAttributes() { return ["disabled"] } get disabled() { return this.hasAttribute("disabled") } set disabled(t) { t ? this.setAttribute("disabled", "") : this.removeAttribute("disabled") } focusIn() { this.focus() } handleKeyDown(t) { this.hasAttribute("disabled") || "Enter" !== t.key && " " !== t.key || (t.preventDefault(), this.click()) } connectedCallback() { this.hasAttribute("disabled") || this.setAttribute("tabindex", "0"), this.setAttribute("role", "button"), this.addEventListener("keydown", this.handleKeyDown) } attributeChangedCallback(t) { "disabled" === t && (this.hasAttribute("disabled") ? this.removeAttribute("tabindex") : this.setAttribute("tabindex", "0"), this.setAttribute("aria-disabled", this.hasAttribute("disabled"))) } });
+const smCheckbox = document.createElement("template"); smCheckbox.innerHTML = '\n\n', customElements.define("sm-checkbox", class extends HTMLElement { constructor() { super(), this.attachShadow({ mode: "open" }).append(smCheckbox.content.cloneNode(!0)), this.defaultState, this.checkbox = this.shadowRoot.querySelector(".checkbox"), this.reset = this.reset.bind(this), this.dispatch = this.dispatch.bind(this), this.handleKeyDown = this.handleKeyDown.bind(this), this.handleClick = this.handleClick.bind(this) } static get observedAttributes() { return ["value", "disabled", "checked"] } get disabled() { return this.hasAttribute("disabled") } set disabled(e) { e ? this.setAttribute("disabled", "") : this.removeAttribute("disabled") } get checked() { return this.hasAttribute("checked") } set checked(e) { e ? this.setAttribute("checked", "") : this.removeAttribute("checked") } set value(e) { this.setAttribute("value", e) } get value() { return this.getAttribute("value") } focusIn() { this.focus() } reset() { this.value = this.defaultState } dispatch() { this.dispatchEvent(new CustomEvent("change", { bubbles: !0, composed: !0 })) } handleKeyDown(e) { " " === e.key && (e.preventDefault(), this.click()) } handleClick(e) { this.toggleAttribute("checked") } connectedCallback() { this.hasAttribute("disabled") || this.setAttribute("tabindex", "0"), this.setAttribute("role", "checkbox"), this.defaultState = this.hasAttribute("checked"), this.hasAttribute("checked") || this.setAttribute("aria-checked", "false"), this.addEventListener("keydown", this.handleKeyDown), this.addEventListener("click", this.handleClick) } attributeChangedCallback(e, t, n) { t !== n && ("checked" === e ? (this.setAttribute("aria-checked", this.hasAttribute("checked")), this.dispatch()) : "disabled" === e && (this.hasAttribute("disabled") ? this.removeAttribute("tabindex") : this.setAttribute("tabindex", "0"))) } disconnectedCallback() { this.removeEventListener("keydown", this.handleKeyDown), this.removeEventListener("change", this.handleClick) } });
+const smCopy = document.createElement("template"); smCopy.innerHTML = '\n\n\n', customElements.define("sm-copy", class extends HTMLElement { constructor() { super(), this.attachShadow({ mode: "open" }).append(smCopy.content.cloneNode(!0)), this.copyContent = this.shadowRoot.querySelector(".copy-content"), this.copyButton = this.shadowRoot.querySelector(".copy-button"), this.copy = this.copy.bind(this) } static get observedAttributes() { return ["value"] } set value(n) { this.setAttribute("value", n) } get value() { return this.getAttribute("value") } fireEvent() { this.dispatchEvent(new CustomEvent("copy", { composed: !0, bubbles: !0, cancelable: !0 })) } copy() { navigator.clipboard.writeText(this.copyContent.textContent).then(n => this.fireEvent()).catch(n => console.error(n)) } connectedCallback() { this.copyButton.addEventListener("click", this.copy) } attributeChangedCallback(n, t, o) { "value" === n && (this.copyContent.textContent = o) } disconnectedCallback() { this.copyButton.removeEventListener("click", this.copy) } });
+const smForm = document.createElement("template"); smForm.innerHTML = '\n \n \n ', customElements.define("sm-form", class extends HTMLElement { constructor() { super(), this.attachShadow({ mode: "open" }).append(smForm.content.cloneNode(!0)), this.form = this.shadowRoot.querySelector("form"), this.formElements, this.requiredElements, this.submitButton, this.resetButton, this.invalidFields = !1, this.debounce = this.debounce.bind(this), this._checkValidity = this._checkValidity.bind(this), this.handleKeydown = this.handleKeydown.bind(this), this.reset = this.reset.bind(this), this.elementsChanged = this.elementsChanged.bind(this) } debounce(e, t) { let i = null; return (...s) => { window.clearTimeout(i), i = window.setTimeout(() => { e.apply(null, s) }, t) } } _checkValidity() { this.submitButton && (this.invalidFields = this.requiredElements.filter(e => !e.isValid), this.submitButton.disabled = this.invalidFields.length) } handleKeydown(e) { "Enter" === e.key && e.target.tagName.includes("SM-INPUT") && (this.invalidFields.length ? this.requiredElements.forEach(e => { e.isValid || e.vibrate() }) : (this.submitButton && this.submitButton.click(), this.dispatchEvent(new CustomEvent("submit", { bubbles: !0, composed: !0 })))) } reset() { this.formElements.forEach(e => e.reset()) } elementsChanged() { this.formElements = [...this.querySelectorAll("sm-input, sm-textarea, sm-checkbox, tags-input, file-input, sm-switch, sm-radio")], this.requiredElements = this.formElements.filter(e => e.hasAttribute("required")), this.submitButton = this.querySelector('[variant="primary"], [type="submit"]'), this.resetButton = this.querySelector('[type="reset"]'), this.resetButton && this.resetButton.addEventListener("click", this.reset), this._checkValidity() } connectedCallback() { this.shadowRoot.querySelector("slot").addEventListener("slotchange", this.elementsChanged), this.addEventListener("input", this.debounce(this._checkValidity, 100)), this.addEventListener("keydown", this.debounce(this.handleKeydown, 100)); const e = new MutationObserver(e => { e.forEach(e => { "childList" === e.type && this.elementsChanged() }) }); e.observe(this, { childList: !0, subtree: !0 }) } disconnectedCallback() { this.removeEventListener("input", this.debounce(this._checkValidity, 100)), this.removeEventListener("keydown", this.debounce(this.handleKeydown, 100)), mutationObserver.disconnect() } });
+const smInput = document.createElement("template"); smInput.innerHTML = '\n \n \n ', customElements.define("sm-input", class extends HTMLElement { constructor() { super(), this.attachShadow({ mode: "open" }).append(smInput.content.cloneNode(!0)), this.inputParent = this.shadowRoot.querySelector(".input"), this.input = this.shadowRoot.querySelector("input"), this.clearBtn = this.shadowRoot.querySelector(".clear"), this.label = this.shadowRoot.querySelector(".label"), this.feedbackText = this.shadowRoot.querySelector(".feedback-text"), this.outerContainer = this.shadowRoot.querySelector(".outer-container"), this._helperText = "", this._errorText = "", this.isRequired = !1, this.validationFunction = void 0, this.reflectedAttributes = ["value", "required", "disabled", "type", "inputmode", "readonly", "min", "max", "pattern", "minlength", "maxlength", "step"], this.reset = this.reset.bind(this), this.clear = this.clear.bind(this), this.focusIn = this.focusIn.bind(this), this.focusOut = this.focusOut.bind(this), this.fireEvent = this.fireEvent.bind(this), this.checkInput = this.checkInput.bind(this), this.handleKeydown = this.handleKeydown.bind(this), this.vibrate = this.vibrate.bind(this) } static get observedAttributes() { return ["value", "placeholder", "required", "disabled", "type", "inputmode", "readonly", "min", "max", "pattern", "minlength", "maxlength", "step", "helper-text", "error-text", "hiderequired"] } get value() { return this.input.value } set value(t) { t !== this.input.value && (this.input.value = t, this.checkInput()) } get placeholder() { return this.getAttribute("placeholder") } set placeholder(t) { this.setAttribute("placeholder", t) } get type() { return this.getAttribute("type") } set type(t) { this.setAttribute("type", t) } get validity() { return this.input.validity } get disabled() { return this.hasAttribute("disabled") } set disabled(t) { t ? this.inputParent.classList.add("disabled") : this.inputParent.classList.remove("disabled") } get readOnly() { return this.hasAttribute("readonly") } set readOnly(t) { t ? this.setAttribute("readonly", "") : this.removeAttribute("readonly") } set customValidation(t) { this.validationFunction = t } set errorText(t) { this._errorText = t } set helperText(t) { this._helperText = t } get isValid() { if ("" !== this.input.value) { const t = this.input.checkValidity(); let e = !0; return this.validationFunction && (e = Boolean(this.validationFunction(this.input.value))), t && e ? (this.feedbackText.classList.remove("error"), this.feedbackText.classList.add("success"), this.feedbackText.textContent = "") : this._errorText && (this.feedbackText.classList.add("error"), this.feedbackText.classList.remove("success"), this.feedbackText.innerHTML = `\n \n ${this._errorText}\n `), t && e } } reset() { this.value = "" } clear() { this.value = "", this.input.focus() } focusIn() { this.input.focus() } focusOut() { this.input.blur() } fireEvent() { let t = new Event("input", { bubbles: !0, cancelable: !0, composed: !0 }); this.dispatchEvent(t) } checkInput(t) { this.hasAttribute("readonly") || ("" !== this.input.value.trim() ? this.clearBtn.classList.remove("hide") : this.clearBtn.classList.add("hide")), this.hasAttribute("placeholder") && "" !== this.getAttribute("placeholder").trim() && ("" !== this.input.value ? this.animate ? this.inputParent.classList.add("animate-placeholder") : this.label.classList.add("hide") : (this.animate ? this.inputParent.classList.remove("animate-placeholder") : this.label.classList.remove("hide"), this.feedbackText.textContent = "")) } handleKeydown(t) { 1 === t.key.length && (["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "."].includes(t.key) ? "." === t.key && t.target.value.includes(".") && t.preventDefault() : t.preventDefault()) } vibrate() { this.outerContainer.animate([{ transform: "translateX(-1rem)" }, { transform: "translateX(1rem)" }, { transform: "translateX(-0.5rem)" }, { transform: "translateX(0.5rem)" }, { transform: "translateX(0)" }], { duration: 300, easing: "ease" }) } connectedCallback() { this.animate = this.hasAttribute("animate"), this.setAttribute("role", "textbox"), this.input.addEventListener("input", this.checkInput), this.clearBtn.addEventListener("click", this.clear) } attributeChangedCallback(t, e, n) { e !== n && (this.reflectedAttributes.includes(t) && (this.hasAttribute(t) ? this.input.setAttribute(t, this.getAttribute(t) ? this.getAttribute(t) : "") : this.input.removeAttribute(t)), "placeholder" === t ? (this.label.textContent = n, this.setAttribute("aria-label", n)) : this.hasAttribute("value") ? this.checkInput() : "type" === t ? this.hasAttribute("type") && "number" === this.getAttribute("type") ? (this.input.setAttribute("inputmode", "decimal"), this.input.addEventListener("keydown", this.handleKeydown)) : this.input.removeEventListener("keydown", this.handleKeydown) : "helper-text" === t ? this._helperText = this.getAttribute("helper-text") : "error-text" === t ? this._errorText = this.getAttribute("error-text") : "required" === t ? (this.isRequired = this.hasAttribute("required"), this.isRequired ? this.setAttribute("aria-required", "true") : this.setAttribute("aria-required", "false")) : "readonly" === t ? this.hasAttribute("readonly") ? this.inputParent.classList.add("readonly") : this.inputParent.classList.remove("readonly") : "disabled" === t && (this.hasAttribute("disabled") ? this.inputParent.classList.add("disabled") : this.inputParent.classList.remove("disabled"))) } disconnectedCallback() { this.input.removeEventListener("input", this.checkInput), this.clearBtn.removeEventListener("click", this.clear), this.input.removeEventListener("keydown", this.handleKeydown) } });
+const smMenu = document.createElement("template"); smMenu.innerHTML = '\n\n', customElements.define("sm-menu", class extends HTMLElement { constructor() { super(), this.attachShadow({ mode: "open" }).append(smMenu.content.cloneNode(!0)), this.isOpen = !1, this.availableOptions, this.containerDimensions, this.animOptions = { duration: 200, easing: "ease" }, this.optionList = this.shadowRoot.querySelector(".options"), this.menu = this.shadowRoot.querySelector(".menu"), this.icon = this.shadowRoot.querySelector(".icon"), this.expand = this.expand.bind(this), this.collapse = this.collapse.bind(this), this.toggle = this.toggle.bind(this), this.handleKeyDown = this.handleKeyDown.bind(this), this.handleClickOutside = this.handleClickOutside.bind(this) } static get observedAttributes() { return ["value"] } get value() { return this.getAttribute("value") } set value(n) { this.setAttribute("value", n) } expand() { this.isOpen || (this.optionList.classList.remove("hide"), this.optionList.animate([{ transform: window.innerWidth < 640 ? "translateY(1.5rem)" : "translateY(-1rem)", opacity: "0" }, { transform: "none", opacity: "1" }], this.animOptions).onfinish = (() => { this.isOpen = !0, this.icon.classList.add("focused") })) } collapse() { this.isOpen && (this.optionList.animate([{ transform: "none", opacity: "1" }, { transform: window.innerWidth < 640 ? "translateY(1.5rem)" : "translateY(-1rem)", opacity: "0" }], this.animOptions).onfinish = (() => { this.isOpen = !1, this.icon.classList.remove("focused"), this.optionList.classList.add("hide") })) } toggle() { this.isOpen ? this.collapse() : this.expand() } handleKeyDown(n) { n.target === this ? "ArrowDown" === n.key ? (n.preventDefault(), this.availableOptions[0].focus()) : "Enter" !== n.key && " " !== n.key || (n.preventDefault(), this.toggle()) : "ArrowUp" === n.key ? (n.preventDefault(), document.activeElement.previousElementSibling ? document.activeElement.previousElementSibling.focus() : this.availableOptions[this.availableOptions.length - 1].focus()) : "ArrowDown" === n.key ? (n.preventDefault(), document.activeElement.nextElementSibling ? document.activeElement.nextElementSibling.focus() : this.availableOptions[0].focus()) : "Enter" !== n.key && " " !== n.key || (n.preventDefault(), n.target.click()) } handleClickOutside(n) { this.contains(n.target) || 2 === n.button || this.collapse() } connectedCallback() { this.setAttribute("role", "listbox"), this.setAttribute("aria-label", "dropdown menu"); const n = this.shadowRoot.querySelector(".options slot"); n.addEventListener("slotchange", n => { this.availableOptions = n.target.assignedElements(), this.containerDimensions = this.optionList.getBoundingClientRect() }), this.addEventListener("click", this.toggle), this.addEventListener("keydown", this.handleKeyDown), document.addEventListener("mousedown", this.handleClickOutside) } disconnectedCallback() { this.removeEventListener("click", this.toggle), this.removeEventListener("keydown", this.handleKeyDown), document.removeEventListener("mousedown", this.handleClickOutside) } }); const menuOption = document.createElement("template"); menuOption.innerHTML = '\n\n\n \n
', customElements.define("menu-option", class extends HTMLElement { constructor() { super(), this.attachShadow({ mode: "open" }).append(menuOption.content.cloneNode(!0)) } connectedCallback() { this.setAttribute("role", "option"), this.setAttribute("tabindex", "0"), this.addEventListener("keyup", n => { "Enter" !== n.key && " " !== n.key || (n.preventDefault(), this.click()) }) } });
+const smNotifications = document.createElement("template"); smNotifications.innerHTML = '\n \n \n ', customElements.define("sm-notifications", class extends HTMLElement { constructor() { super(), this.shadow = this.attachShadow({ mode: "open" }).append(smNotifications.content.cloneNode(!0)), this.notificationPanel = this.shadowRoot.querySelector(".notification-panel"), this.animationOptions = { duration: 300, fill: "forwards", easing: "cubic-bezier(0.175, 0.885, 0.32, 1.275)" }, this.push = this.push.bind(this), this.createNotification = this.createNotification.bind(this), this.removeNotification = this.removeNotification.bind(this), this.clearAll = this.clearAll.bind(this), this.handlePointerMove = this.handlePointerMove.bind(this), this.startX = 0, this.currentX = 0, this.endX = 0, this.swipeDistance = 0, this.swipeDirection = "", this.swipeThreshold = 0, this.startTime = 0, this.swipeTime = 0, this.swipeTimeThreshold = 200, this.currentTarget = null, this.mediaQuery = window.matchMedia("(min-width: 640px)"), this.handleOrientationChange = this.handleOrientationChange.bind(this), this.isLandscape = !1 } randString(n) { let t = ""; const i = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; for (let e = 0; e < n; e++)t += i.charAt(Math.floor(Math.random() * i.length)); return t } createNotification(n, t = {}) { const { pinned: i = !1, icon: e = "", action: o } = t, a = document.createElement("div"); a.id = this.randString(8), a.classList.add("notification"); let r = ""; return r += `\n ${e}
\n \n `, o && (r += `\n \n `), i && (a.classList.add("pinned"), r += '\n \n '), a.innerHTML = r, a } push(n, t = {}) { const i = this.createNotification(n, t); return this.isLandscape ? this.notificationPanel.append(i) : this.notificationPanel.prepend(i), this.notificationPanel.animate([{ transform: `translateY(${this.isLandscape ? "" : "-"}${i.clientHeight}px)` }, { transform: "none" }], this.animationOptions), i.animate([{ transform: "translateY(-1rem)", opacity: "0" }, { transform: "none", opacity: "1" }], this.animationOptions).onfinish = (n => { n.target.commitStyles(), n.target.cancel() }), i.querySelector(".action") && i.querySelector(".action").addEventListener("click", t.action.callback), i.id } removeNotification(n, t = "left") { if (!n) return; const i = "left" === t ? "-" : "+"; n.animate([{ transform: this.currentX ? `translateX(${this.currentX}px)` : "none", opacity: "1" }, { transform: `translateX(calc(${i}${Math.abs(this.currentX)}px ${i} 1rem))`, opacity: "0" }], this.animationOptions).onfinish = (() => { n.remove() }) } clearAll() { Array.from(this.notificationPanel.children).forEach(n => { this.removeNotification(n) }) } handlePointerMove(n) { this.currentX = n.clientX - this.startX, this.currentTarget.style.transform = `translateX(${this.currentX}px)` } handleOrientationChange(n) { this.isLandscape = n.matches, n.matches } connectedCallback() { this.handleOrientationChange(this.mediaQuery), this.mediaQuery.addEventListener("change", this.handleOrientationChange), this.notificationPanel.addEventListener("pointerdown", n => { n.target.closest(".close") ? this.removeNotification(n.target.closest(".notification")) : n.target.closest(".notification") && (this.swipeThreshold = n.target.closest(".notification").getBoundingClientRect().width / 2, this.currentTarget = n.target.closest(".notification"), this.currentTarget.setPointerCapture(n.pointerId), this.startTime = Date.now(), this.startX = n.clientX, this.startY = n.clientY, this.notificationPanel.addEventListener("pointermove", this.handlePointerMove)) }), this.notificationPanel.addEventListener("pointerup", n => { this.endX = n.clientX, this.endY = n.clientY, this.swipeDistance = Math.abs(this.endX - this.startX), this.swipeTime = Date.now() - this.startTime, this.endX > this.startX ? this.swipeDirection = "right" : this.swipeDirection = "left", this.swipeTime < this.swipeTimeThreshold ? this.swipeDistance > 50 && this.removeNotification(this.currentTarget, this.swipeDirection) : this.swipeDistance > this.swipeThreshold ? this.removeNotification(this.currentTarget, this.swipeDirection) : this.currentTarget.animate([{ transform: `translateX(${this.currentX}px)` }, { transform: "none" }], this.animationOptions).onfinish = (n => { n.target.commitStyles(), n.target.cancel() }), this.notificationPanel.removeEventListener("pointermove", this.handlePointerMove), this.notificationPanel.releasePointerCapture(n.pointerId), this.currentX = 0 }); const n = new MutationObserver(n => { n.forEach(n => { "childList" === n.type && n.addedNodes.length && !n.addedNodes[0].classList.contains("pinned") && setTimeout(() => { this.removeNotification(n.addedNodes[0]) }, 5e3) }) }); n.observe(this.notificationPanel, { childList: !0 }) } disconnectedCallback() { mediaQueryList.removeEventListener("change", handleOrientationChange) } });
+class Stack { constructor() { this.items = [] } push(t) { this.items.push(t) } pop() { return 0 == this.items.length ? "Underflow" : this.items.pop() } peek() { return this.items[this.items.length - 1] } } const popupStack = new Stack, smPopup = document.createElement("template"); smPopup.innerHTML = '\n\n\n', customElements.define("sm-popup", class extends HTMLElement { constructor() { super(), this.attachShadow({ mode: "open" }).append(smPopup.content.cloneNode(!0)), this.allowClosing = !1, this.isOpen = !1, this.pinned = !1, this.offset = 0, this.touchStartY = 0, this.touchEndY = 0, this.touchStartTime = 0, this.touchEndTime = 0, this.touchEndAnimation = void 0, this.focusable, this.autoFocus, this.mutationObserver, this.popupContainer = this.shadowRoot.querySelector(".popup-container"), this.backdrop = this.shadowRoot.querySelector(".background"), this.dialogBox = this.shadowRoot.querySelector(".popup"), this.popupBodySlot = this.shadowRoot.querySelector(".popup-body slot"), this.popupHeader = this.shadowRoot.querySelector(".popup-top"), this.resumeScrolling = this.resumeScrolling.bind(this), this.setStateOpen = this.setStateOpen.bind(this), this.show = this.show.bind(this), this.hide = this.hide.bind(this), this.handleTouchStart = this.handleTouchStart.bind(this), this.handleTouchMove = this.handleTouchMove.bind(this), this.handleTouchEnd = this.handleTouchEnd.bind(this), this.detectFocus = this.detectFocus.bind(this) } static get observedAttributes() { return ["open"] } get open() { return this.isOpen } animateTo(t, e, n) { const i = t.animate(e, { ...n, fill: "both" }); return i.finished.then(() => { i.commitStyles(), i.cancel() }), i } resumeScrolling() { const t = document.body.style.top; window.scrollTo(0, -1 * parseInt(t || "0")), document.body.style.overflow = "", document.body.style.top = "initial" } setStateOpen() { if (!this.isOpen || this.offset) { const t = { duration: 300, easing: "ease" }, e = window.innerWidth > 640 ? "scale(1.1)" : `translateY(${this.offset ? `${this.offset}px` : "100%"})`; this.animateTo(this.dialogBox, [{ opacity: this.offset ? 1 : 0, transform: e }, { opacity: 1, transform: "none" }], t) } } show(t = {}) { const { pinned: e = !1 } = t; if (!this.isOpen) { const t = { duration: 300, easing: "ease" }; popupStack.push({ popup: this, permission: e }), popupStack.items.length > 1 && this.animateTo(popupStack.items[popupStack.items.length - 2].popup.shadowRoot.querySelector(".popup"), [{ transform: "none" }, { transform: window.innerWidth > 640 ? "scale(0.95)" : "translateY(-1.5rem)" }], t), this.popupContainer.classList.remove("hide"), this.offset || this.backdrop.animate([{ opacity: 0 }, { opacity: 1 }], t), this.setStateOpen(), this.dispatchEvent(new CustomEvent("popupopened", { bubbles: !0, detail: { popup: this } })), this.pinned = e, this.isOpen = !0, document.body.style.overflow = "hidden", document.body.style.top = `-${window.scrollY}px`; const n = this.autoFocus || this.focusable[0]; n.tagName.includes("SM-") ? n.focusIn() : n.focus(), this.hasAttribute("open") || this.setAttribute("open", "") } } hide() { const t = { duration: 150, easing: "ease" }; this.backdrop.animate([{ opacity: 1 }, { opacity: 0 }], t), this.animateTo(this.dialogBox, [{ opacity: 1, transform: window.innerWidth > 640 ? "none" : `translateY(${this.offset ? `${this.offset}px` : "0"})` }, { opacity: 0, transform: window.innerWidth > 640 ? "scale(1.1)" : "translateY(100%)" }], t).finished.finally(() => { this.popupContainer.classList.add("hide"), this.dialogBox.style = "", this.removeAttribute("open"), this.forms.length && this.forms.forEach(t => t.reset()), this.dispatchEvent(new CustomEvent("popupclosed", { bubbles: !0, detail: { popup: this } })), this.isOpen = !1 }), popupStack.pop(), popupStack.items.length ? this.animateTo(popupStack.items[popupStack.items.length - 1].popup.shadowRoot.querySelector(".popup"), [{ transform: window.innerWidth > 640 ? "scale(0.95)" : "translateY(-1.5rem)" }, { transform: "none" }], t) : this.resumeScrolling() } handleTouchStart(t) { this.offset = 0, this.popupHeader.addEventListener("touchmove", this.handleTouchMove, { passive: !0 }), this.popupHeader.addEventListener("touchend", this.handleTouchEnd, { passive: !0 }), this.touchStartY = t.changedTouches[0].clientY, this.touchStartTime = t.timeStamp } handleTouchMove(t) { this.touchStartY < t.changedTouches[0].clientY && (this.offset = t.changedTouches[0].clientY - this.touchStartY, this.touchEndAnimation = window.requestAnimationFrame(() => { this.dialogBox.style.transform = `translateY(${this.offset}px)` })) } handleTouchEnd(t) { if (this.touchEndTime = t.timeStamp, cancelAnimationFrame(this.touchEndAnimation), this.touchEndY = t.changedTouches[0].clientY, this.threshold = .3 * this.dialogBox.getBoundingClientRect().height, this.touchEndTime - this.touchStartTime > 200) if (this.touchEndY - this.touchStartY > this.threshold) { if (this.pinned) return void this.setStateOpen(); this.hide() } else this.setStateOpen(); else if (this.touchEndY > this.touchStartY) { if (this.pinned) return void this.setStateOpen(); this.hide() } this.popupHeader.removeEventListener("touchmove", this.handleTouchMove, { passive: !0 }), this.popupHeader.removeEventListener("touchend", this.handleTouchEnd, { passive: !0 }) } detectFocus(t) { if ("Tab" === t.key) { const e = this.focusable[this.focusable.length - 1], n = this.focusable[0]; t.shiftKey && document.activeElement === n ? (t.preventDefault(), e.tagName.includes("SM-") ? e.focusIn() : e.focus()) : t.shiftKey || document.activeElement !== e || (t.preventDefault(), n.tagName.includes("SM-") ? n.focusIn() : n.focus()) } } updateFocusableList() { this.focusable = this.querySelectorAll('sm-button:not([disabled]), button:not([disabled]), [href], sm-input, input:not([readonly]), sm-select, select, sm-checkbox, sm-textarea, textarea, [tabindex]:not([tabindex="-1"])'), this.autoFocus = this.querySelector("[autofocus]") } connectedCallback() { this.popupBodySlot.addEventListener("slotchange", () => { this.forms = this.querySelectorAll("sm-form"), this.updateFocusableList() }), this.popupContainer.addEventListener("mousedown", t => { t.target !== this.popupContainer || this.pinned || (this.pinned ? this.setStateOpen() : this.hide()) }); const t = new ResizeObserver(t => { for (let e of t) if (e.contentBoxSize) { const t = Array.isArray(e.contentBoxSize) ? e.contentBoxSize[0] : e.contentBoxSize; this.threshold = .3 * t.blockSize.height } else this.threshold = .3 * e.contentRect.height }); t.observe(this), this.mutationObserver = new MutationObserver(t => { this.updateFocusableList() }), this.mutationObserver.observe(this, { attributes: !0, childList: !0, subtree: !0 }), this.addEventListener("keydown", this.detectFocus), this.popupHeader.addEventListener("touchstart", this.handleTouchStart, { passive: !0 }) } disconnectedCallback() { this.removeEventListener("keydown", this.detectFocus), resizeObserver.unobserve(), this.mutationObserver.disconnect(), this.popupHeader.removeEventListener("touchstart", this.handleTouchStart, { passive: !0 }) } attributeChangedCallback(t) { "open" === t && this.hasAttribute("open") && this.show() } });
+const smSwitch = document.createElement("template"); smSwitch.innerHTML = '\t\n\n', customElements.define("sm-switch", class extends HTMLElement { constructor() { super(), this.attachShadow({ mode: "open" }).append(smSwitch.content.cloneNode(!0)), this.switch = this.shadowRoot.querySelector(".switch"), this.input = this.shadowRoot.querySelector("input"), this.isChecked = !1, this.isDisabled = !1, this.dispatch = this.dispatch.bind(this) } static get observedAttributes() { return ["disabled", "checked"] } get disabled() { return this.isDisabled } set disabled(n) { n ? this.setAttribute("disabled", "") : this.removeAttribute("disabled") } get checked() { return this.isChecked } set checked(n) { n ? this.setAttribute("checked", "") : this.removeAttribute("checked") } get value() { return this.isChecked } reset() { } dispatch() { this.dispatchEvent(new CustomEvent("change", { bubbles: !0, composed: !0, detail: { value: this.isChecked } })) } connectedCallback() { this.addEventListener("keydown", n => { " " !== n.key || this.isDisabled || (n.preventDefault(), this.input.click()) }), this.input.addEventListener("click", n => { this.input.checked ? this.checked = !0 : this.checked = !1, this.dispatch() }) } attributeChangedCallback(n, e, t) { e !== t && ("disabled" === n ? this.hasAttribute("disabled") ? this.disabled = !0 : this.disabled = !1 : "checked" === n && (this.hasAttribute("checked") ? (this.isChecked = !0, this.input.checked = !0) : (this.isChecked = !1, this.input.checked = !1))) } });
+const smSelect = document.createElement("template"); smSelect.innerHTML = '\n\n', customElements.define("sm-select", class extends HTMLElement { constructor() { super(), this.attachShadow({ mode: "open" }).append(smSelect.content.cloneNode(!0)), this.focusIn = this.focusIn.bind(this), this.reset = this.reset.bind(this), this.open = this.open.bind(this), this.collapse = this.collapse.bind(this), this.toggle = this.toggle.bind(this), this.handleOptionsNavigation = this.handleOptionsNavigation.bind(this), this.handleOptionSelection = this.handleOptionSelection.bind(this), this.handleKeydown = this.handleKeydown.bind(this), this.handleClickOutside = this.handleClickOutside.bind(this), this.selectOption = this.selectOption.bind(this), this.availableOptions, this.previousOption, this._value = void 0, this.isOpen = !1, this.label = "", this.slideDown = [{ transform: "translateY(-0.5rem)", opacity: 0 }, { transform: "translateY(0)", opacity: 1 }], this.slideUp = [{ transform: "translateY(0)", opacity: 1 }, { transform: "translateY(-0.5rem)", opacity: 0 }], this.animationOptions = { duration: 300, fill: "forwards", easing: "ease" }, this.optionList = this.shadowRoot.querySelector(".options"), this.selection = this.shadowRoot.querySelector(".selection"), this.selectedOptionText = this.shadowRoot.querySelector(".selected-option-text") } static get observedAttributes() { return ["disabled", "label"] } get value() { return this.getAttribute("value") } set value(t) { const e = this.availableOptions.find(e => e.getAttribute("value") === t); e ? (this.setAttribute("value", t), this.selectOption(e)) : console.warn(`There is no option with ${t} as value`) } reset(t = !0) { if (this.availableOptions[0] && this.previousOption !== this.availableOptions[0]) { const e = this.availableOptions.find(t => t.hasAttribute("selected")) || this.availableOptions[0]; this.value = e.getAttribute("value"), t && this.fireEvent() } } selectOption(t) { this.previousOption && (this.previousOption.classList.remove("check-selected"), this.previousOption.removeAttribute("selected")), this.previousOption !== t && (t.classList.add("check-selected"), t.setAttribute("selected", ""), this.selectedOptionText.textContent = `${this.label}${t.textContent}`, this.previousOption = t) } focusIn() { this.selection.focus() } open() { this.optionList.classList.remove("hide"), this.optionList.animate(this.slideDown, this.animationOptions), this.setAttribute("open", ""), this.isOpen = !0 } collapse() { this.removeAttribute("open"), this.optionList.animate(this.slideUp, this.animationOptions).onfinish = (() => { this.optionList.classList.add("hide"), this.isOpen = !1 }) } toggle() { this.isOpen || this.hasAttribute("disabled") ? this.collapse() : this.open() } fireEvent() { this.dispatchEvent(new CustomEvent("change", { bubbles: !0, composed: !0, detail: { value: this.value } })) } handleOptionsNavigation(t) { "ArrowUp" === t.key ? (t.preventDefault(), document.activeElement.previousElementSibling ? document.activeElement.previousElementSibling.focus() : this.availableOptions[this.availableOptions.length - 1].focus()) : "ArrowDown" === t.key && (t.preventDefault(), document.activeElement.nextElementSibling ? document.activeElement.nextElementSibling.focus() : this.availableOptions[0].focus()) } handleOptionSelection(t) { this.previousOption !== document.activeElement && (this.value = document.activeElement.getAttribute("value"), this.fireEvent()) } handleClick(t) { t.target === this ? this.toggle() : (this.handleOptionSelection(), this.collapse()) } handleKeydown(t) { t.target === this ? this.isOpen && "ArrowDown" === t.key ? (t.preventDefault(), this.availableOptions[0].focus(), this.handleOptionSelection(t)) : "Enter" !== t.key && " " !== t.key || (t.preventDefault(), this.toggle()) : (this.handleOptionsNavigation(t), this.handleOptionSelection(t), "Enter" !== t.key && " " !== t.key || (t.preventDefault(), this.collapse())) } handleClickOutside(t) { this.isOpen && !this.contains(t.target) && this.collapse() } connectedCallback() { this.setAttribute("role", "listbox"), this.hasAttribute("disabled") || this.selection.setAttribute("tabindex", "0"); let t = this.shadowRoot.querySelector("slot"); t.addEventListener("slotchange", e => { this.availableOptions = t.assignedElements(), this.availableOptions.forEach(t => { t.hasAttribute("selected") && (this._value = t.value) }), this.reset(!1) }), this.addEventListener("click", this.handleClick), this.addEventListener("keydown", this.handleKeydown), document.addEventListener("mousedown", this.handleClickOutside) } disconnectedCallback() { this.removeEventListener("click", this.toggle), this.removeEventListener("keydown", this.handleKeydown), document.removeEventListener("mousedown", this.handleClickOutside) } attributeChangedCallback(t) { "disabled" === t ? this.hasAttribute("disabled") ? this.selection.removeAttribute("tabindex") : this.selection.setAttribute("tabindex", "0") : "label" === t && (this.label = this.hasAttribute("label") ? `${this.getAttribute("label")} ` : "") } }); const smOption = document.createElement("template"); smOption.innerHTML = '\n\n', customElements.define("sm-option", class extends HTMLElement { constructor() { super(), this.attachShadow({ mode: "open" }).append(smOption.content.cloneNode(!0)) } connectedCallback() { this.setAttribute("role", "option"), this.setAttribute("tabindex", "0") } });
+const spinner = document.createElement("template"); spinner.innerHTML = '\n\n\n\n'; class SpinnerLoader extends HTMLElement { constructor() { super(), this.attachShadow({ mode: "open" }).append(spinner.content.cloneNode(!0)) } } window.customElements.define("sm-spinner", SpinnerLoader);
+const stripSelect = document.createElement("template"); stripSelect.innerHTML = '\n\n\n\n', customElements.define("strip-select", class extends HTMLElement { constructor() { super(), this.attachShadow({ mode: "open" }).append(stripSelect.content.cloneNode(!0)), this.stripSelect = this.shadowRoot.querySelector(".strip-select"), this.slottedOptions = void 0, this._value = void 0, this.scrollDistance = 0, this.assignedElements = [], this.scrollLeft = this.scrollLeft.bind(this), this.scrollRight = this.scrollRight.bind(this), this.fireEvent = this.fireEvent.bind(this), this.setSelectedOption = this.setSelectedOption.bind(this) } get value() { return this._value } set value(t) { this.setSelectedOption(t) } scrollLeft() { this.stripSelect.scrollBy({ left: -this.scrollDistance, behavior: "smooth" }) } scrollRight() { this.stripSelect.scrollBy({ left: this.scrollDistance, behavior: "smooth" }) } setSelectedOption(t) { this._value !== t && (this._value = t, this.assignedElements.forEach(e => { e.value === t ? (e.setAttribute("active", ""), e.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "center" })) : e.removeAttribute("active") })) } fireEvent() { this.dispatchEvent(new CustomEvent("change", { bubbles: !0, composed: !0, detail: { value: this._value } })) } connectedCallback() { this.setAttribute("role", "listbox"); const t = this.shadowRoot.querySelector("slot"), e = this.shadowRoot.querySelector(".cover--left"), n = this.shadowRoot.querySelector(".cover--right"), i = this.shadowRoot.querySelector(".nav-button--left"), s = this.shadowRoot.querySelector(".nav-button--right"); t.addEventListener("slotchange", o => { this.assignedElements = t.assignedElements(), this.assignedElements.forEach(t => { t.hasAttribute("selected") && (t.setAttribute("active", ""), this._value = t.value) }), this.hasAttribute("multiline") || (this.assignedElements.length > 0 ? (r.observe(this.assignedElements[0]), a.observe(this.assignedElements[this.assignedElements.length - 1])) : (i.classList.add("hide"), s.classList.add("hide"), e.classList.add("hide"), n.classList.add("hide"), r.disconnect(), a.disconnect())) }); const o = new ResizeObserver(t => { t.forEach(t => { if (t.contentBoxSize) { const e = Array.isArray(t.contentBoxSize) ? t.contentBoxSize[0] : t.contentBoxSize; this.scrollDistance = .6 * e.inlineSize } else this.scrollDistance = .6 * t.contentRect.width }) }); o.observe(this), this.stripSelect.addEventListener("option-clicked", t => { this._value !== t.target.value && (this.setSelectedOption(t.target.value), this.fireEvent()) }); const r = new IntersectionObserver(t => { t.forEach(t => { t.isIntersecting ? (i.classList.add("hide"), e.classList.add("hide")) : (i.classList.remove("hide"), e.classList.remove("hide")) }) }, { threshold: .9, root: this }), a = new IntersectionObserver(t => { t.forEach(t => { t.isIntersecting ? (s.classList.add("hide"), n.classList.add("hide")) : (s.classList.remove("hide"), n.classList.remove("hide")) }) }, { threshold: .9, root: this }); i.addEventListener("click", this.scrollLeft), s.addEventListener("click", this.scrollRight) } disconnectedCallback() { navButtonLeft.removeEventListener("click", this.scrollLeft), navButtonRight.removeEventListener("click", this.scrollRight) } }); const stripOption = document.createElement("template"); stripOption.innerHTML = '\n\n\n', customElements.define("strip-option", class extends HTMLElement { constructor() { super(), this.attachShadow({ mode: "open" }).append(stripOption.content.cloneNode(!0)), this._value = void 0, this.radioButton = this.shadowRoot.querySelector("input"), this.fireEvent = this.fireEvent.bind(this), this.handleKeyDown = this.handleKeyDown.bind(this) } get value() { return this._value } fireEvent() { this.dispatchEvent(new CustomEvent("option-clicked", { bubbles: !0, composed: !0, detail: { value: this._value } })) } handleKeyDown(t) { "Enter" !== t.key && "Space" !== t.key || this.fireEvent() } connectedCallback() { this.setAttribute("role", "option"), this.setAttribute("tabindex", "0"), this._value = this.getAttribute("value"), this.addEventListener("click", this.fireEvent), this.addEventListener("keydown", this.handleKeyDown) } disconnectedCallback() { this.removeEventListener("click", this.fireEvent), this.removeEventListener("keydown", this.handleKeyDown) } });
+const smTabHeader = document.createElement("template"); smTabHeader.innerHTML = '\n\n\n \n
\n', customElements.define("sm-tab-header", class extends HTMLElement { constructor() { super(), this.attachShadow({ mode: "open" }).append(smTabHeader.content.cloneNode(!0)), this.prevTab, this.allTabs, this.activeTab, this.indicator = this.shadowRoot.querySelector(".indicator"), this.tabSlot = this.shadowRoot.querySelector("slot"), this.tabHeader = this.shadowRoot.querySelector(".tab-header"), this.changeTab = this.changeTab.bind(this), this.handleClick = this.handleClick.bind(this), this.handlePanelChange = this.handlePanelChange.bind(this), this.moveIndiactor = this.moveIndiactor.bind(this) } fireEvent(t) { this.dispatchEvent(new CustomEvent(`switchedtab${this.target}`, { bubbles: !0, detail: { index: parseInt(t) } })) } moveIndiactor(t) { this.indicator.setAttribute("style", `width: ${t.width}px; transform: translateX(${t.left - this.tabHeader.getBoundingClientRect().left + this.tabHeader.scrollLeft}px)`) } changeTab(t) { t !== this.prevTab && t.closest("sm-tab") && (this.prevTab && this.prevTab.classList.remove("active"), t.classList.add("active"), this.tabHeader.scrollTo({ behavior: "smooth", left: t.getBoundingClientRect().left - this.tabHeader.getBoundingClientRect().left + this.tabHeader.scrollLeft }), this.moveIndiactor(t.getBoundingClientRect()), this.prevTab = t, this.activeTab = t) } handleClick(t) { t.target.closest("sm-tab") && (this.changeTab(t.target), this.fireEvent(t.target.dataset.index)) } handlePanelChange(t) { this.changeTab(this.allTabs[t.detail.index]) } connectedCallback() { if (!this.hasAttribute("target") || "" === this.getAttribute("target").value) return; this.target = this.getAttribute("target"), this.tabSlot.addEventListener("slotchange", () => { this.allTabs = this.tabSlot.assignedElements(), this.allTabs.forEach((t, e) => { t.dataset.index = e }) }), this.addEventListener("click", this.handleClick), document.addEventListener(`switchedpanel${this.target}`, this.handlePanelChange); let t = new ResizeObserver(t => { t.forEach(t => { if (this.prevTab) { let t = this.activeTab.getBoundingClientRect(); this.moveIndiactor(t) } }) }); t.observe(this); let e = new IntersectionObserver(t => { t.forEach(t => { if (t.isIntersecting) if (this.indicator.style.transition = "none", this.activeTab) { let t = this.activeTab.getBoundingClientRect(); this.moveIndiactor(t) } else { this.allTabs[0].classList.add("active"); let t = this.allTabs[0].getBoundingClientRect(); this.moveIndiactor(t), this.fireEvent(0), this.prevTab = this.tabSlot.assignedElements()[0], this.activeTab = this.prevTab } }) }, { threshold: 1 }); e.observe(this) } disconnectedCallback() { this.removeEventListener("click", this.handleClick), document.removeEventListener(`switchedpanel${this.target}`, this.handlePanelChange) } }); const smTab = document.createElement("template"); smTab.innerHTML = '\n\n\n\n
\n', customElements.define("sm-tab", class extends HTMLElement { constructor() { super(), this.shadow = this.attachShadow({ mode: "open" }).append(smTab.content.cloneNode(!0)) } }); const smTabPanels = document.createElement("template"); smTabPanels.innerHTML = '\n\n\n Nothing to see here.\n
\n', customElements.define("sm-tab-panels", class extends HTMLElement { constructor() { super(), this.attachShadow({ mode: "open" }).append(smTabPanels.content.cloneNode(!0)), this.isTransitioning = !1, this.panelContainer = this.shadowRoot.querySelector(".panel-container"), this.handleTabChange = this.handleTabChange.bind(this) } handleTabChange(t) { this.isTransitioning = !0, this.panelContainer.scrollTo({ left: this.allPanels[t.detail.index].getBoundingClientRect().left - this.panelContainer.getBoundingClientRect().left + this.panelContainer.scrollLeft, behavior: "smooth" }), setTimeout(() => { this.isTransitioning = !1 }, 300) } fireEvent(t) { this.dispatchEvent(new CustomEvent(`switchedpanel${this.id}`, { bubbles: !0, detail: { index: parseInt(t) } })) } connectedCallback() { const t = this.shadowRoot.querySelector("slot"); t.addEventListener("slotchange", t => { this.allPanels = t.target.assignedElements(), this.allPanels.forEach((t, n) => { t.dataset.index = n, e.observe(t) }) }), document.addEventListener(`switchedtab${this.id}`, this.handleTabChange); const e = new IntersectionObserver(t => { t.forEach(t => { !this.isTransitioning && t.isIntersecting && this.fireEvent(t.target.dataset.index) }) }, { threshold: .6 }) } disconnectedCallback() { intersectionObserver.disconnect(), document.removeEventListener(`switchedtab${this.id}`, this.handleTabChange) } });
+const smTextarea = document.createElement("template"); smTextarea.innerHTML = '\n \n \n ', customElements.define("sm-textarea", class extends HTMLElement { constructor() { super(), this.attachShadow({ mode: "open" }).append(smTextarea.content.cloneNode(!0)), this.textarea = this.shadowRoot.querySelector("textarea"), this.textareaBox = this.shadowRoot.querySelector(".textarea"), this.placeholder = this.shadowRoot.querySelector(".placeholder"), this.reflectedAttributes = ["disabled", "required", "readonly", "rows", "minlength", "maxlength"], this.reset = this.reset.bind(this), this.focusIn = this.focusIn.bind(this), this.fireEvent = this.fireEvent.bind(this), this.checkInput = this.checkInput.bind(this) } static get observedAttributes() { return ["disabled", "value", "placeholder", "required", "readonly", "rows", "minlength", "maxlength"] } get value() { return this.textarea.value } set value(e) { this.setAttribute("value", e), this.fireEvent() } get disabled() { return this.hasAttribute("disabled") } set disabled(e) { e ? this.setAttribute("disabled", "") : this.removeAttribute("disabled") } get isValid() { return this.textarea.checkValidity() } reset() { this.setAttribute("value", "") } focusIn() { this.textarea.focus() } fireEvent() { let e = new Event("input", { bubbles: !0, cancelable: !0, composed: !0 }); this.dispatchEvent(e) } checkInput() { this.hasAttribute("placeholder") && "" !== this.getAttribute("placeholder") && ("" !== this.textarea.value ? this.placeholder.classList.add("hide") : this.placeholder.classList.remove("hide")) } connectedCallback() { this.textarea.addEventListener("input", e => { this.textareaBox.dataset.value = this.textarea.value, this.checkInput() }) } attributeChangedCallback(e, t, n) { this.reflectedAttributes.includes(e) ? this.hasAttribute(e) ? this.textarea.setAttribute(e, this.getAttribute(e) ? this.getAttribute(e) : "") : this.textContent.removeAttribute(e) : "placeholder" === e ? this.placeholder.textContent = this.getAttribute("placeholder") : "value" === e && (this.textarea.value = n, this.textareaBox.dataset.value = n, this.checkInput()) } });
+const themeToggle = document.createElement("template"); themeToggle.innerHTML = '\n \n \n'; class ThemeToggle extends HTMLElement { constructor() { super(), this.attachShadow({ mode: "open" }).append(themeToggle.content.cloneNode(!0)), this.isChecked = !1, this.hasTheme = "light", this.toggleState = this.toggleState.bind(this), this.fireEvent = this.fireEvent.bind(this), this.handleThemeChange = this.handleThemeChange.bind(this) } static get observedAttributes() { return ["checked"] } daylight() { this.hasTheme = "light", document.body.dataset.theme = "light", this.setAttribute("aria-checked", "false") } nightlight() { this.hasTheme = "dark", document.body.dataset.theme = "dark", this.setAttribute("aria-checked", "true") } toggleState() { this.toggleAttribute("checked"), this.fireEvent() } handleKeyDown(e) { " " === e.key && this.toggleState() } handleThemeChange(e) { e.detail.theme !== this.hasTheme && ("dark" === e.detail.theme ? this.setAttribute("checked", "") : this.removeAttribute("checked")) } fireEvent() { this.dispatchEvent(new CustomEvent("themechange", { bubbles: !0, composed: !0, detail: { theme: this.hasTheme } })) } connectedCallback() { this.setAttribute("role", "switch"), this.setAttribute("aria-label", "theme toggle"), "dark" === localStorage.getItem(`${window.location.hostname}-theme`) ? (this.nightlight(), this.setAttribute("checked", "")) : "light" === localStorage.getItem(`${window.location.hostname}-theme`) ? (this.daylight(), this.removeAttribute("checked")) : window.matchMedia("(prefers-color-scheme: dark)").matches ? (this.nightlight(), this.setAttribute("checked", "")) : (this.daylight(), this.removeAttribute("checked")), this.addEventListener("click", this.toggleState), this.addEventListener("keydown", this.handleKeyDown), document.addEventListener("themechange", this.handleThemeChange) } disconnectedCallback() { this.removeEventListener("click", this.toggleState), this.removeEventListener("keydown", this.handleKeyDown), document.removeEventListener("themechange", this.handleThemeChange) } attributeChangedCallback(e, t, n) { "checked" === e && (this.hasAttribute("checked") ? (this.nightlight(), localStorage.setItem(`${window.location.hostname}-theme`, "dark")) : (this.daylight(), localStorage.setItem(`${window.location.hostname}-theme`, "light"))) } } window.customElements.define("theme-toggle", ThemeToggle);
\ No newline at end of file
diff --git a/css/main.css b/css/main.css
index 0b56e6d..588c08c 100644
--- a/css/main.css
+++ b/css/main.css
@@ -6,37 +6,37 @@
}
:root {
- font-size: clamp(1rem, 1.2vmax, 3rem);
+ font-size: clamp(1rem, 1.2vmax, 1.2rem);
}
html,
body {
height: 100%;
- scroll-behavior: smooth;
}
body {
+ --accent-color: #3d5afe;
+ --secondary-color: #ffac2e;
+ --text-color: 20, 20, 20;
+ --foreground-color: 252, 253, 255;
+ --background-color: 241, 243, 248;
+ --danger-color: rgb(255, 75, 75);
+ --green: #1cad59;
+ --yellow: rgb(220, 165, 0);
color: rgba(var(--text-color), 1);
- background: rgba(var(--background-color), 1);
-}
-body,
-body * {
- --accent-color: #5D54A4;
- --text-color: 17, 17, 17;
- --background-color: 240, 240, 255;
- --foreground-color: rgb(248, 248, 255);
- --danger-color: red;
- scrollbar-width: thin;
+ background-color: rgba(var(--background-color), 1);
+ overflow-y: hidden;
}
-body[data-theme=dark],
-body[data-theme=dark] * {
- --accent-color: #9D65C9;
- --text-color: 240, 240, 240;
- --text-color-light: 170, 170, 170;
- --background-color: 10, 10, 10;
- --foreground-color: rgb(20, 20, 20);
+body[data-theme=dark] {
+ --accent-color: #6d83ff;
+ --secondary-color: #d60739;
+ --text-color: 220, 220, 220;
+ --foreground-color: 27, 28, 29;
+ --background-color: 21, 22, 22;
--danger-color: rgb(255, 106, 106);
+ --green: #00e676;
+ --yellow: rgb(255, 213, 5);
}
body[data-theme=dark] ::-webkit-calendar-picker-indicator {
filter: invert(1);
@@ -52,7 +52,8 @@ p:not(:last-of-type) {
}
img {
- object-fit: cover;
+ -o-object-fit: cover;
+ object-fit: cover;
}
a:where([class]) {
@@ -67,31 +68,212 @@ a {
color: var(--accent-color);
}
+a:-webkit-any-link:focus-visible {
+ outline: rgba(var(--text-color), 1) 0.1rem solid;
+}
+
+a:-moz-any-link:focus-visible {
+ outline: rgba(var(--text-color), 1) 0.1rem solid;
+}
+
+a:any-link:focus-visible {
+ outline: rgba(var(--text-color), 1) 0.1rem solid;
+}
+
+a.button {
+ padding: 0.4rem 0.6rem;
+ border-radius: 0.3rem;
+ font-size: 0.9rem;
+ font-weight: 500;
+ color: inherit;
+}
+
button,
.button {
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ user-select: none;
position: relative;
display: inline-flex;
border: none;
background-color: transparent;
overflow: hidden;
color: inherit;
+ -webkit-tap-highlight-color: transparent;
+ align-items: center;
+ font-size: 0.9rem;
+ font-weight: 500;
+ white-space: nowrap;
+ padding: 0.8rem;
+ border-radius: 0.3rem;
+ justify-content: center;
+}
+button:focus-visible,
+.button:focus-visible {
+ outline: var(--accent-color) solid medium;
+}
+button:not(:disabled),
+.button:not(:disabled) {
cursor: pointer;
}
+.button {
+ background-color: rgba(var(--text-color), 0.1);
+}
+.button--primary, .button--danger {
+ color: rgba(var(--background-color), 1) !important;
+}
+.button--primary .icon, .button--danger .icon {
+ fill: rgba(var(--background-color), 1);
+}
+.button--primary {
+ background-color: var(--accent-color);
+}
+.button--danger {
+ background-color: var(--danger-color);
+}
+.button--small {
+ padding: 0.4rem 0.6rem;
+}
+.button--outlined {
+ border: solid rgba(var(--text-color), 0.5) 0.1rem;
+ background-color: rgba(var(--foreground-color), 1);
+}
+
+.cta {
+ text-transform: uppercase;
+ font-size: 0.8rem;
+ font-weight: 700;
+ letter-spacing: 0.05em;
+ padding: 0.8rem 1rem;
+}
+
+.icon {
+ width: 1.2rem;
+ height: 1.2rem;
+ fill: rgba(var(--text-color), 0.8);
+ flex-shrink: 0;
+}
+
+.icon-only {
+ padding: 0.5rem;
+ border-radius: 0.3rem;
+ aspect-ratio: 1/1;
+}
+
button:disabled {
opacity: 0.5;
}
-a.button {
- padding: 0.6rem 1.2rem;
- border-radius: 0.3rem;
- background-color: rgba(var(--text-color), 0.06);
+a:-webkit-any-link:focus-visible {
+ outline: rgba(var(--text-color), 1) 0.1rem solid;
+}
+
+a:-moz-any-link:focus-visible {
+ outline: rgba(var(--text-color), 1) 0.1rem solid;
}
a:any-link:focus-visible {
outline: rgba(var(--text-color), 1) 0.1rem solid;
}
+details summary {
+ display: flex;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ user-select: none;
+ cursor: pointer;
+ align-items: center;
+ justify-content: space-between;
+ color: var(--accent-color);
+}
+
+details[open] summary {
+ margin-bottom: 1rem;
+}
+details[open] > summary .down-arrow {
+ transform: rotate(180deg);
+}
+
+fieldset {
+ border: none;
+}
+
+input {
+ accent-color: var(--accent-color);
+}
+input[type=range]:active {
+ cursor: -webkit-grab;
+ cursor: grab;
+}
+
+sm-copy {
+ font-size: 0.9rem;
+}
+
+sm-input,
+sm-textarea {
+ font-size: 0.9rem;
+ --border-radius: 0.5rem;
+ --background-color: rgba(var(--foreground-color), 1);
+}
+sm-input button .icon,
+sm-textarea button .icon {
+ fill: var(--accent-color);
+}
+
+sm-textarea {
+ --max-height: 32ch;
+}
+
+sm-button {
+ --padding: 0.8rem;
+}
+sm-button[variant=primary] .icon {
+ fill: rgba(var(--background-color), 1);
+}
+sm-button[disabled] .icon {
+ fill: rgba(var(--text-color), 0.6);
+}
+sm-button.danger {
+ --background: var(--danger-color);
+ color: rgba(var(--background-color), 1);
+}
+
+sm-spinner {
+ --size: 1rem;
+ --stroke-width: 0.1rem;
+}
+
+sm-form {
+ --gap: 1rem;
+}
+
+sm-select {
+ --padding: 0.8rem;
+ font-size: 0.9rem;
+}
+
+sm-option {
+ font-size: 0.9rem;
+}
+
+strip-select {
+ --gap: 0;
+ background-color: rgba(var(--text-color), 0.06);
+ border-radius: 0.3rem;
+ padding: 0.3rem;
+}
+
+strip-option {
+ position: relative;
+ font-size: 0.8rem;
+ --border-radius: 0.2rem;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ user-select: none;
+}
+
sm-button {
--border-radius: 0.3rem;
}
@@ -102,31 +284,14 @@ sm-button[disabled] .icon {
fill: rgba(var(--text-color), 0.6);
}
+sm-select[open] {
+ z-index: 10;
+}
+
ul {
list-style: none;
}
-.flex {
- display: flex;
-}
-
-.grid {
- display: grid;
-}
-
-.hide {
- opacity: 0;
- pointer-events: none;
-}
-
-.hide-completely {
- display: none !important;
-}
-
-.no-transformations {
- transform: none !important;
-}
-
.overflow-ellipsis {
width: 100%;
overflow: hidden;
@@ -134,39 +299,16 @@ ul {
text-overflow: ellipsis;
}
-.breakable {
+.wrap-around {
overflow-wrap: break-word;
word-wrap: break-word;
- -ms-word-break: break-all;
word-break: break-word;
- -ms-hyphens: auto;
- -moz-hyphens: auto;
-webkit-hyphens: auto;
- hyphens: auto;
+ hyphens: auto;
}
.full-bleed {
- grid-column: 1/4;
-}
-
-.h1 {
- font-size: 2.5rem;
-}
-
-.h2 {
- font-size: 2rem;
-}
-
-.h3 {
- font-size: 1.4rem;
-}
-
-.h4 {
- font-size: 1rem;
-}
-
-.h5 {
- font-size: 0.8rem;
+ grid-column: 1/-1;
}
.uppercase {
@@ -177,22 +319,39 @@ ul {
text-transform: capitalize;
}
+.sticky {
+ position: -webkit-sticky;
+ position: sticky;
+}
+
+.top-0 {
+ top: 0;
+}
+
.flex {
display: flex;
}
+.flex-wrap {
+ flex-wrap: wrap;
+}
+
+.flex-1 {
+ flex: 1;
+}
+
.grid {
display: grid;
}
-.grid-3 {
- grid-template-columns: 1fr auto auto;
-}
-
.flow-column {
grid-auto-flow: column;
}
+.gap-0-3 {
+ gap: 0.3rem;
+}
+
.gap-0-5 {
gap: 0.5rem;
}
@@ -217,20 +376,28 @@ ul {
text-align: right;
}
-.align-start {
+.align-items-start {
align-items: flex-start;
}
+.align-start {
+ align-content: flex-start;
+}
+
.align-center {
align-items: center;
}
+.align-end {
+ align-items: flex-end;
+}
+
.text-center {
text-align: center;
}
.justify-start {
- justify-content: start;
+ justify-items: start;
}
.justify-center {
@@ -245,6 +412,10 @@ ul {
align-self: center;
}
+.align-self-end {
+ align-self: end;
+}
+
.justify-self-center {
justify-self: center;
}
@@ -257,7 +428,7 @@ ul {
justify-self: end;
}
-.direction-column {
+.flex-direction-column {
flex-direction: column;
}
@@ -269,6 +440,102 @@ ul {
width: 100%;
}
+.h-100 {
+ height: 100%;
+}
+
+.margin-right-0-3 {
+ margin-right: 0.3rem;
+}
+
+.margin-right-0-5 {
+ margin-right: 0.5rem;
+}
+
+.margin-left-0-5 {
+ margin-left: 0.5rem;
+}
+
+.margin-left-auto {
+ margin-left: auto;
+}
+
+.margin-right-auto {
+ margin-right: auto;
+}
+
+.margin-bottom-0-5 {
+ margin-bottom: 0.5rem;
+}
+
+.margin-bottom-1 {
+ margin-bottom: 1rem;
+}
+
+.margin-bottom-2 {
+ margin-bottom: 2rem;
+}
+
+.margin-block-1 {
+ margin-block: 1rem;
+}
+
+.margin-block-1-5 {
+ margin-block: 1.5rem;
+}
+
+.margin-inline-1 {
+ margin-inline: 1rem;
+}
+
+.margin-inline-1-5 {
+ margin-inline: 1.5rem;
+}
+
+.hidden {
+ display: none !important;
+}
+
+.no-transformations {
+ transform: none !important;
+}
+
+.full-bleed {
+ grid-column: 1/4;
+}
+
+.h1 {
+ font-size: 2.5rem;
+}
+
+.h2 {
+ font-size: 2rem;
+}
+
+.h3 {
+ font-size: 1.4rem;
+}
+
+.h4 {
+ font-size: 1rem;
+}
+
+.h5 {
+ font-size: 0.8rem;
+}
+
+.grid-3 {
+ grid-template-columns: 1fr auto auto;
+}
+
+.flow-column {
+ grid-auto-flow: column;
+}
+
+.w-100 {
+ width: 100%;
+}
+
.color-0-8 {
color: rgba(var(--text-color), 0.8);
}
@@ -282,10 +549,12 @@ ul {
}
.ripple {
+ height: 8rem;
+ width: 8rem;
position: absolute;
border-radius: 50%;
transform: scale(0);
- background: rgba(var(--text-color), 0.16);
+ background: radial-gradient(circle, rgba(var(--text-color), 0.3) 0%, rgba(0, 0, 0, 0) 50%);
pointer-events: none;
}
@@ -304,12 +573,6 @@ ul {
display: none;
}
-.icon {
- width: 1.5rem;
- height: 1.5rem;
- fill: rgba(var(--text-color), 0.9);
-}
-
.button__icon {
height: 1.2rem;
width: 1.2rem;
@@ -321,6 +584,17 @@ ul {
margin-left: 0.5rem;
}
+[data-editable] {
+ transition: padding 0.2s;
+}
+[data-editable]:focus-within {
+ padding: 0.5em;
+ border-radius: 0.3rem;
+ outline: none;
+ background-color: rgba(var(--text-color), 0.06);
+ box-shadow: 0 0 0 0.1rem var(--accent-color) inset;
+}
+
#confirmation_popup,
#prompt_popup {
flex-direction: column;
@@ -370,9 +644,10 @@ ul {
display: flex;
gap: 1rem;
align-items: center;
+ position: -webkit-sticky;
position: sticky;
padding: 0.5rem 1rem;
- background: var(--foreground-color);
+ background: rgba(var(--foreground-color), 1);
z-index: 1;
}
@@ -381,7 +656,7 @@ ul {
position: relative;
display: flex;
align-items: center;
- background-color: var(--foreground-color);
+ background-color: rgba(var(--foreground-color), 1);
}
.nav-list__item {
@@ -425,7 +700,7 @@ ul {
.container-card {
position: relative;
- background: var(--foreground-color);
+ background: rgba(var(--foreground-color), 1);
border-radius: 0.5rem;
}
@@ -442,7 +717,7 @@ ul {
left: 0;
right: 0;
place-content: center;
- background-color: var(--foreground-color);
+ background-color: rgba(var(--foreground-color), 1);
gap: 1rem;
}
@@ -477,7 +752,7 @@ ul {
height: 1rem;
width: 1rem;
border-radius: 50%;
- background: var(--foreground-color);
+ background: rgba(var(--foreground-color), 1);
border: solid 2px rgba(var(--text-color), 0.4);
z-index: 1;
}
@@ -505,8 +780,6 @@ ul {
}
.task .right .apply-cont h4 {
- -webkit-box-flex: 1;
- -ms-flex: 1;
flex: 1;
}
@@ -524,12 +797,12 @@ ul {
}
.completed-task .left .circle {
- border: solid 2px #00C853 !important;
- background: #00C853 !important;
+ border: solid 2px #00c853 !important;
+ background: #00c853 !important;
}
.completed-task .left .line {
- background-color: #00C853 !important;
+ background-color: #00c853 !important;
}
.page {
@@ -537,10 +810,20 @@ ul {
display: grid;
position: relative;
padding: 1rem;
- animation: fadein 0.3s;
+ -webkit-animation: fadein 0.3s;
+ animation: fadein 0.3s;
grid-template-columns: minmax(0, 1fr);
}
+@-webkit-keyframes fadein {
+ 0% {
+ opacity: 0;
+ }
+ 100% {
+ opacity: 1;
+ }
+}
+
@keyframes fadein {
0% {
opacity: 0;
@@ -593,7 +876,9 @@ ul {
}
.intern-card {
- user-select: none;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ user-select: none;
padding: 0.8rem 1rem;
gap: 0.8rem;
grid-template-columns: auto 1fr auto;
@@ -619,7 +904,7 @@ ul {
}
.intern-card .icon {
- fill: #FF5722 !important;
+ fill: #ff5722 !important;
height: 1rem !important;
width: 1rem !important;
margin-left: 0.2rem;
@@ -662,7 +947,7 @@ ul {
gap: 0.5rem;
padding: 1rem;
border-radius: 0.5rem;
- background-color: var(--foreground-color);
+ background-color: rgba(var(--foreground-color), 1);
}
.update__topic {
@@ -732,7 +1017,7 @@ ul {
}
.gold-fill {
- fill: #FF5722;
+ fill: #ff5722;
}
#intern_info__score {
@@ -752,14 +1037,12 @@ ul {
text-transform: capitalize;
justify-self: start;
align-items: center;
- user-select: none;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ user-select: none;
font-size: 0.85rem;
font-weight: 500;
}
-.branch-button .icon {
- height: 1.2rem;
- width: 1.2rem;
-}
.active-branch {
opacity: 1;
@@ -827,7 +1110,7 @@ ul {
border-radius: 0 0 0 0.2rem;
}
.task__branch_container .branch-button + .branch-button::before {
- top: calc(-50% - 1.5rem );
+ top: calc(-50% - 1.5rem);
height: calc(100% + 1.5rem);
}
@@ -836,10 +1119,6 @@ ul {
transition: opacity 0.3s ease;
padding: 0.5rem;
}
-.task-option .icon {
- height: 1.2rem;
- width: 1.2rem;
-}
.task-description {
grid-area: description;
@@ -856,7 +1135,9 @@ ul {
}
.assigned-interns .assigned-intern {
- user-select: none;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ user-select: none;
display: flex;
font-size: 0.8rem;
margin: 0.2rem 0.5rem 0.2rem 0;
@@ -882,10 +1163,12 @@ ul {
margin: -1rem 1rem 0 1rem;
list-style: none;
padding: 0.5rem 0;
+ width: -webkit-max-content;
+ width: -moz-max-content;
width: max-content;
border-radius: 0.3rem;
transition: 0.3s opacity ease;
- background-color: var(--foreground-color);
+ background-color: rgba(var(--foreground-color), 1);
box-shadow: 0 0.5rem 1rem -0.3rem rgba(0, 0, 0, 0.3);
}
#task_context li {
@@ -895,8 +1178,6 @@ ul {
font-size: 0.9rem;
}
#task_context li .icon {
- height: 1.2rem;
- width: 1.2rem;
margin-right: 0.5rem;
}
@@ -904,10 +1185,6 @@ ul {
margin-right: 0.5rem;
}
-#editing_panel__description {
- margin-bottom: 2rem;
-}
-
#branch_container {
display: flex;
flex-flow: row wrap;
@@ -954,7 +1231,7 @@ ul {
text-align: center;
place-content: center;
justify-items: center;
- background-color: var(--foreground-color);
+ background-color: rgba(var(--foreground-color), 1);
}
.loading-message {
@@ -1013,10 +1290,6 @@ ul {
overflow-y: auto;
}
-#editing_panel__title {
- margin-bottom: 1rem;
-}
-
.fab-actions {
display: grid;
gap: 1rem;
@@ -1040,7 +1313,8 @@ ul {
}
.fab-actions[open] ~ #fab_backdrop {
opacity: 1;
- clip-path: circle(100%);
+ -webkit-clip-path: circle(100%);
+ clip-path: circle(100%);
}
.fab-actions__item {
@@ -1050,11 +1324,13 @@ ul {
padding: 0.6rem 1rem;
border-radius: 2rem;
transform: translateY(1.5rem);
- background-color: var(--foreground-color);
+ background-color: rgba(var(--foreground-color), 1);
opacity: 0;
transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s;
box-shadow: 0 0.2rem 0.5rem rgba(0, 0, 0, 0.2);
- user-select: none;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ user-select: none;
}
.fab-actions__item:hover, .fab-actions__item:active {
transform: scale(0.9);
@@ -1111,8 +1387,11 @@ ul {
left: 0;
right: 0;
opacity: 0;
- clip-path: circle(0% at 100% 100%);
+ -webkit-clip-path: circle(0% at 100% 100%);
+ clip-path: circle(0% at 100% 100%);
+ transition: opacity 0.5s, -webkit-clip-path 0.5s;
transition: clip-path 0.5s, opacity 0.5s;
+ transition: clip-path 0.5s, opacity 0.5s, -webkit-clip-path 0.5s;
background-color: rgba(0, 0, 0, 0.5);
}
@@ -1143,7 +1422,7 @@ ul {
padding: 1rem;
border-radius: 0.5rem;
grid-template-columns: minmax(0, 1fr);
- background-color: var(--foreground-color);
+ background-color: rgba(var(--foreground-color), 1);
}
.task__header {
@@ -1183,8 +1462,6 @@ ul {
color: var(--accent-color);
}
.send-update-button .icon {
- height: 1.2rem;
- width: 1.2rem;
fill: var(--accent-color);
}
@@ -1195,7 +1472,7 @@ ul {
#admin_page__left sm-tab-header {
--gap: 0;
--justify-content: stretch;
- background-color: var(--foreground-color);
+ background-color: rgba(var(--foreground-color), 1);
border-bottom: 1px solid rgba(var(--text-color), 0.2);
}
#admin_page__left sm-tab {
@@ -1310,11 +1587,9 @@ input[type=date]:focus {
.hide-page-on-mobile {
display: none;
}
-
#project_editing_panel {
padding: 1rem;
}
-
.list-container {
padding-bottom: 5rem;
}
@@ -1323,15 +1598,12 @@ input[type=date]:focus {
.hide-on-desktop {
display: none !important;
}
-
sm-popup {
--width: 26rem;
}
-
.popup__header {
padding: 1.5rem 1.5rem 0 0.75rem;
}
-
#main_nav {
padding: 0.5rem;
background-color: rgba(var(--background-color), 1);
@@ -1341,7 +1613,6 @@ input[type=date]:focus {
margin: 1rem;
margin-top: auto;
}
-
.nav-list__item {
flex-direction: row;
align-items: center;
@@ -1359,65 +1630,52 @@ input[type=date]:focus {
.nav-list__item_title {
display: none;
}
-
.project-card--active {
background-color: rgba(var(--text-color), 0.1);
}
-
.page {
- background-color: var(--foreground-color);
+ background-color: rgba(var(--foreground-color), 1);
}
-
#sign_in {
width: 24rem;
height: auto;
border-radius: 0.4rem;
}
-
#dashboard_page {
grid-template-columns: 3fr 18rem;
}
-
#dashboard_page #project_watching_section {
align-self: flex-start;
}
-
#all_interns_page__header {
grid-template-columns: 1fr auto;
}
-
#admin_page {
padding: 1rem 0;
gap: 1rem;
grid-template-columns: 18rem minmax(0, 1fr);
grid-template-rows: 1fr;
}
-
#admin_page__left {
- background-color: var(--foreground-color);
+ background-color: rgba(var(--foreground-color), 1);
}
-
#project_editing_panel {
padding-right: 1rem;
}
-
#admin_page__left,
#project_editing_panel {
border-radius: 0.5rem;
}
-
#edit_data_fig {
width: 16rem;
justify-self: center;
}
-
#project_explorer {
display: grid;
height: 100%;
grid-template-columns: 16rem 3fr;
grid-template-areas: "left right";
}
-
#project_explorer__left {
grid-area: left;
height: 100%;
@@ -1426,50 +1684,42 @@ input[type=date]:focus {
border-right: 1px solid rgba(var(--text-color), 0.06);
background-color: rgba(var(--background-color), 1);
}
-
#project_explorer__left h4 {
margin-top: 0;
margin-bottom: 0.5rem;
color: var(--accent-color);
font-size: 0.9rem;
}
-
#project_explorer__right {
grid-area: right;
height: 100%;
overflow-y: auto;
}
-
#main_page {
grid-template-columns: 4rem minmax(0, 1fr);
grid-template-areas: "main-header main-header" "main-nav sub-pages";
}
-
#post_update_popup {
--width: 28rem;
}
-
#updates_page {
height: 100%;
gap: 1rem;
grid-template-areas: "updates update-filters";
grid-template-columns: minmax(0, 1fr) 20rem;
}
-
#update_filters_wrapper {
padding: 1rem;
border-radius: 0.5rem;
align-content: flex-start;
grid-area: update-filters;
- background-color: var(--foreground-color);
+ background-color: rgba(var(--foreground-color), 1);
}
-
#updates_wrapper {
height: 100%;
overflow-y: auto;
grid-area: updates;
}
-
#all_interns_list {
gap: 1rem;
grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
@@ -1479,7 +1729,7 @@ input[type=date]:focus {
padding: 1.5rem;
grid-template-columns: 1fr;
border-radius: 0.5rem;
- background-color: var(--foreground-color);
+ background-color: rgba(var(--foreground-color), 1);
}
#all_interns_list .intern-card__initials {
position: relative;
@@ -1496,17 +1746,14 @@ input[type=date]:focus {
opacity: 0.3;
z-index: -1;
}
-
#intern_list_popup {
--height: 80vh;
}
-
#settings_page {
height: 100%;
align-items: flex-start;
padding: 2rem;
}
-
.watchlist_project_card {
padding: 1.5rem;
}
@@ -1516,11 +1763,9 @@ input[type=date]:focus {
grid-template-columns: 12rem minmax(0, 1fr);
grid-template-areas: "main-header main-header" "main-nav sub-pages";
}
-
#main_nav {
align-items: flex-start;
}
-
.nav-list__item .icon {
margin-right: 0.5rem;
}
@@ -1533,7 +1778,6 @@ input[type=date]:focus {
width: 0.5rem;
height: 0.5rem;
}
-
::-webkit-scrollbar-thumb {
background: rgba(var(--text-color), 0.3);
border-radius: 1rem;
@@ -1541,18 +1785,15 @@ input[type=date]:focus {
::-webkit-scrollbar-thumb:hover {
background: rgba(var(--text-color), 0.5);
}
-
.interact:hover {
- background: linear-gradient(rgba(var(--text-color), 0.06), rgba(var(--text-color), 0.06)), var(--foreground-color);
+ background: linear-gradient(rgba(var(--text-color), 0.06), rgba(var(--text-color), 0.06)), rgba(var(--foreground-color), 1);
}
-
.send-update-button,
.task-option,
.apply-button {
opacity: 0;
transition: opacity 0.3s;
}
-
.task-list-item:hover .task-option,
.task-option:focus-within,
.task:hover .apply-button,
diff --git a/css/main.min.css b/css/main.min.css
index 3a016e6..07f4325 100644
--- a/css/main.min.css
+++ b/css/main.min.css
@@ -1 +1 @@
-.hide,.ripple{pointer-events:none}.fab,.interact,.nav-list__item{-webkit-tap-highlight-color:transparent}#updates,.task-option{transition:opacity .3s ease}*{padding:0;margin:0;box-sizing:border-box;font-family:Roboto,sans-serif}:root{font-size:clamp(1rem,1.2vmax,3rem)}body,html{height:100%;scroll-behavior:smooth}body{color:rgba(var(--text-color),1);background:rgba(var(--background-color),1)}body,body *{--accent-color:#5D54A4;--text-color:17,17,17;--background-color:240,240,255;--foreground-color:rgb(248, 248, 255);--danger-color:red;scrollbar-width:thin}body[data-theme=dark],body[data-theme=dark] *{--accent-color:#9D65C9;--text-color:240,240,240;--text-color-light:170,170,170;--background-color:10,10,10;--foreground-color:rgb(20, 20, 20);--danger-color:rgb(255, 106, 106)}body[data-theme=dark] ::-webkit-calendar-picker-indicator{filter:invert(1)}p{max-width:70ch;line-height:1.7;color:rgba(var(--text-color),.8)}p:not(:last-of-type){margin-bottom:1.5rem}img{object-fit:cover}a:where([class]){color:inherit;text-decoration:none}a:where([class]):focus-visible{box-shadow:0 0 0 .1rem rgba(var(--text-color),1) inset}a{color:var(--accent-color)}.button,button{position:relative;display:inline-flex;border:none;background-color:transparent;overflow:hidden;color:inherit;cursor:pointer}.color-0-8,.nav-list__item{color:rgba(var(--text-color),.8)}button:disabled{opacity:.5}a.button{padding:.6rem 1.2rem;border-radius:.3rem;background-color:rgba(var(--text-color),.06)}a:any-link:focus-visible{outline:solid rgba(var(--text-color),1)}sm-button{--border-radius:0.3rem}sm-button[variant=primary] .icon{fill:rgba(var(--background-color),1)}#edit_data_fig,sm-button[disabled] .icon{fill:rgba(var(--text-color),.6)}.hide{opacity:0}.hide-completely{display:none!important}#main_header,#main_nav,.flex,.nav-list__item{display:flex}.no-transformations{transform:none!important}.overflow-ellipsis{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.breakable,.task-description,.task__description{word-wrap:break-word;overflow-wrap:break-word}.breakable{-ms-word-break:break-all;word-break:break-word;-ms-hyphens:auto;-moz-hyphens:auto;-webkit-hyphens:auto;hyphens:auto}.full-bleed{grid-column:1/4}.h1{font-size:2.5rem}.h2{font-size:2rem}.h3{font-size:1.4rem}.h4{font-size:1rem}.h5{font-size:.8rem}.uppercase{text-transform:uppercase}.capitalize,.project-card{text-transform:capitalize}.grid{display:grid}.grid-3{grid-template-columns:1fr auto auto}.flow-column{grid-auto-flow:column}.gap-0-5{gap:.5rem}.gap-1{gap:1rem}.gap-1-5{gap:1.5rem}.gap-2{gap:2rem}.gap-3{gap:3rem}.text-align-right{text-align:right}#loading_page,.text-center{text-align:center}.align-start{align-items:flex-start}.align-center,.popup__header{align-items:center}.justify-start{justify-content:start}.justify-center,.task .left{justify-content:center}.justify-right{margin-left:auto}.align-self-center{align-self:center}.justify-self-center{justify-self:center}.justify-self-start{justify-self:start}.justify-self-end{justify-self:end}.direction-column{flex-direction:column}.space-between{justify-content:space-between}.w-100{width:100%}.weight-400{font-weight:400}.weight-500{font-weight:500}.ripple{position:absolute;border-radius:50%;transform:scale(0);background:rgba(var(--text-color),.16)}.interact{position:relative;overflow:hidden;cursor:pointer}.observe-empty-state:empty{display:none}.observe-empty-state:not(:empty)~.empty-state{display:none}.icon{width:1.5rem;height:1.5rem;fill:rgba(var(--text-color),.9)}.button__icon{height:1.2rem;width:1.2rem}.button__icon--left{margin-right:.5rem}.button__icon--right{margin-left:.5rem}#confirmation_popup,#prompt_popup{flex-direction:column}#confirmation_popup h4,#prompt_popup h4{font-weight:500;margin-bottom:.5rem}#confirmation_popup sm-button,#prompt_popup sm-button{margin:0}#confirmation_popup .flex,#prompt_popup .flex{padding:0;margin-top:1rem}#confirmation_popup .flex sm-button:first-of-type,#prompt_popup .flex sm-button:first-of-type{margin-right:.6rem;margin-left:auto}.popup__header{display:grid;gap:.5rem;width:100%;padding:0 1.5rem 0 .5rem;grid-template-columns:auto 1fr auto}.popup__header__close{padding:.5rem;cursor:pointer}#main_page{height:100%;grid-template-rows:auto 1fr auto;grid-template-areas:"main-header" "sub-pages" "main-nav"}#main_header{grid-area:main-header;gap:1rem;align-items:center;position:sticky;padding:.5rem 1rem;background:var(--foreground-color);z-index:1}#main_nav{grid-area:main-nav;position:relative;align-items:center;background-color:var(--foreground-color)}.nav-list__item{flex-direction:column;align-items:center;width:100%;padding:.5rem 0;font-size:.8rem;font-weight:500}.nav-list__item--active{color:var(--accent-color)}.nav-list__item--active .icon{fill:var(--accent-color)}.nav-list__item--active .icon--outlined{display:none}.nav-list__item--active .icon--filled{display:inline-block}.nav-list__item:not(.nav-list__item--active) .icon--outlined{display:inline-block}.nav-list__item:not(.nav-list__item--active) .icon--filled{display:none}.nav-list__item .icon{margin-bottom:.3rem}#sub_page_container{grid-area:sub-pages;height:100%;overflow-y:auto}.container-card{position:relative;background:var(--foreground-color);border-radius:.5rem}#loading_page,#sign_in_page{position:fixed;place-content:center;z-index:5;top:0;bottom:0;left:0;right:0}.medium-top-bottom-margin{margin:.5rem 0}#sign_in_page{display:grid;background-color:var(--foreground-color);gap:1rem}#sign_in_form{width:22rem}.task{display:grid;grid-template-columns:auto 1fr;margin:0 1rem}#assigned_task_list,.page,.task-card{grid-template-columns:minmax(0,1fr)}.task .task__branch_container{padding-bottom:2rem}.task:last-of-type .left .line{transform:scaleY(0)}.task .left{display:flex;position:relative;padding-top:.5rem}.task .left .circle{display:inline-flex;position:relative;align-self:flex-start;height:1rem;width:1rem;border-radius:50%;background:var(--foreground-color);border:2px solid;z-index:1}.task .left .line{position:absolute;left:50%;height:100%;width:2px;transform:translateX(-50%) scaleY(1);background-color:rgba(var(--text-color),.4)}.task .right{margin-left:1rem;display:flex;flex-direction:column;width:100%}.task .right .apply-cont{width:100%;display:flex;flex-direction:row}.task .right .apply-cont h4{-webkit-box-flex:1;-ms-flex:1;flex:1}.task h4{margin-top:.4rem;margin-bottom:1rem}.timeline-task__description{white-space:pre-line}.task .assigned-interns .assigned-intern{padding:.4rem}.padding,.page{padding:1rem}.completed-task .left .circle{border:2px solid #00C853!important;background:#00C853!important}.completed-task .left .line{background-color:#00C853!important}.page{gap:1rem;display:grid;position:relative;animation:fadein .3s}@keyframes fadein{0%{opacity:0}100%{opacity:1}}.task-title{font-weight:500}#dashboard_page{padding-bottom:5rem;grid-template-columns:auto}.intern-card,.task-list-item{grid-template-columns:auto 1fr auto}.logo{display:flex;align-items:center;font-size:1.2rem;width:100%}.logo .cls-2,.logo .cls-3{fill:rgba(var(--text-color),1);font-size:146.9px;font-family:ArialMT,Arial}.logo svg{height:2.5rem}.logo h4{margin:0}.project-card{padding:1rem;font-weight:500;line-height:1.5;color:rgba(var(--text-color),.8)}.intern-card{user-select:none;padding:.8rem 1rem;gap:.8rem}.intern-card__initials{display:flex;height:2.6rem;width:2.6rem;justify-content:center;align-items:center;border-radius:40%;color:#fff;font-weight:500;font-size:1rem;text-transform:uppercase;background-color:var(--accent-color)}.intern-card__score-wrapper{font-weight:500;font-size:1.2rem}.intern-card .icon{fill:#FF5722!important;height:1rem!important;width:1rem!important;margin-left:.2rem}.request-card{display:grid;position:relative;padding:1rem}.request-card sm-button{--padding:0.5rem 0.8rem}.request-card__description{width:100%;font-size:1rem;margin-bottom:1rem}.reject-app{margin-left:auto;margin-right:.5rem}#updates_page sm-select{--max-height:50vh}#updates_page__project_selector strip-option{font-size:.9rem}.intern-update{display:grid;gap:.5rem;padding:1rem;border-radius:.5rem;background-color:var(--foreground-color)}.update__topic{font-weight:500;font-size:1rem;margin-top:.5rem;text-transform:capitalize;max-width:65ch}.update__sender{color:var(--accent-color);font-size:.9rem;font-weight:500}#update_of_project,.task__description,.task__project-title,.update__time{color:rgba(var(--text-color),.8)}.update__time{font-size:.85rem}.update__message{white-space:pre-line}.container-header{display:flex;align-items:center;width:100%;padding:1rem}.container-header h4{flex:1;font-weight:500}#intern_info_popup .grid>*{justify-self:center}#intern_info_popup #update_intern_score{width:100%;margin-top:1rem}#intern_info__initials{margin-bottom:1rem;position:relative;height:3rem;width:3rem;font-size:1.3rem}#intern_info__initials::before{content:"";position:absolute;background-color:inherit;border-radius:inherit;height:calc(100% + 1.5rem);width:calc(100% + 1.5rem);opacity:.3;z-index:-1}#intern_info__name{font-size:1.5rem;margin-bottom:.5rem}.gold-fill{fill:#FF5722}#intern_info__score{font-size:1.5rem}#project_info{flex-direction:column}#user_role,.branch-button{justify-self:start;font-weight:500}.branch-button{margin-bottom:.5rem;display:flex;padding:.5rem;border-radius:.2rem;text-transform:capitalize;align-items:center;user-select:none;font-size:.85rem}.branch-button .icon{height:1.2rem;width:1.2rem}.active-branch{opacity:1;color:#fff;background:var(--accent-color)}#task_list{padding:1rem 0 1.5rem}.task-list-item{display:grid;grid-template-areas:"status title options" "status interns interns" "status description description" "status . .";align-content:flex-start;padding:1rem;gap:.5rem;border-radius:.5rem;background:rgba(var(--text-color),.02)}.task-list-item sm-checkbox{grid-area:status;align-self:flex-start;padding:.2rem .5rem .5rem 0}.task-list-item h4{font-weight:500;margin:0}.task-list-item .task-title{grid-area:title;line-height:1.6}.task-list-item .assigned-interns{grid-area:interns}.task__branch_container:not(:empty){display:grid;gap:.5rem;padding:.5rem 0}.task__branch_container .branch-button{position:relative;background-color:transparent;padding:0;padding-left:2rem;margin:.5rem 0}#loading_page,#task_context,.fab-actions__item{background-color:var(--foreground-color)}.task__branch_container .branch-button::before{position:absolute;content:"";top:-50%;left:0;display:inline-flex;width:1rem;height:100%;align-self:flex-start;margin-right:.8rem;border-left:solid;border-bottom:solid;border-width:.15rem;border-color:rgba(var(--text-color),.6);border-radius:0 0 0 .2rem}.task__branch_container .branch-button+.branch-button::before{top:calc(-50% - 1.5rem);height:calc(100% + 1.5rem)}.task-option{grid-area:options;padding:.5rem}.task-option .icon{height:1.2rem;width:1.2rem}.task-description{grid-area:description;margin:0;white-space:pre-line}.assigned-interns{display:flex;flex-wrap:wrap;margin-bottom:1rem}.assigned-interns .assigned-intern{user-select:none;display:flex;font-size:.8rem;margin:.2rem .5rem .2rem 0;padding:.2rem 0 .2rem .4rem;border-radius:.2rem;border:1px solid;align-items:center;white-space:nowrap;text-transform:capitalize}.assigned-interns .assigned-intern button{padding:.2rem}.assigned-interns .assigned-intern button .icon{height:1rem;width:1rem}#task_context{position:absolute;top:0;right:0;margin:-1rem 1rem 0;list-style:none;padding:.5rem 0;width:max-content;border-radius:.3rem;transition:.3s opacity ease;box-shadow:0 .5rem 1rem -.3rem rgba(0,0,0,.3)}#task_context li{padding:.8rem 1.5rem;display:flex;align-items:center;font-size:.9rem}#task_context li .icon{height:1.2rem;width:1.2rem;margin-right:.5rem}.temp-task .cancel-task-button{margin-right:.5rem}#editing_panel__description{margin-bottom:2rem}#branch_container{display:flex;flex-flow:row wrap;margin:.5rem 0 1rem}#intern_list_popup{flex-direction:column}#best_interns_container,#intern_search_field,#project_list_container{margin-bottom:1rem}#intern_list_container{height:100%;overflow-y:auto}#best_interns_container .container-header .icon,#project_list_container .container-header .icon{margin-right:.5rem}#edit_data_fig{width:60vw;margin:2rem 0}#loading_page{display:grid;justify-items:center}.loading-message{font-size:1.3rem;margin:1.5rem 0 .5rem}#loading_page__footer{position:absolute;bottom:0;width:100%;padding:1.5rem}#loading_page__footer .icon{height:4rem;width:4rem}#project_watching_section{position:relative;overflow:hidden}#project_explorer{padding:0}#project_explorer__right{gap:1rem;align-items:flex-start;align-content:flex-start;padding:1rem}#explorer_branch_container{margin-top:1.5rem}#watch_project_button{margin-left:1rem;text-transform:capitalize}#admin_page{position:relative;display:grid;gap:0;padding:0;height:100%}#project_editing_panel{position:relative;padding:1rem 0;height:100%;overflow-y:auto}#editing_panel__title{margin-bottom:1rem}.fab-actions{display:grid;gap:1rem;position:absolute;bottom:0;right:0;margin:1rem;justify-items:end;text-align:end;z-index:5}#logout,#username{margin-top:1.5rem}.fab-actions[open] .fab-actions__item{transform:translateY(0);opacity:1}.fab-actions[open] .fab .icon:nth-of-type(1){transform:scale(0) rotate(180deg)}.fab-actions[open] .fab .icon:nth-of-type(2){transform:scale(1) rotate(0)}.fab-actions[open]~#fab_backdrop{opacity:1;clip-path:circle(100%)}.fab-actions__item{display:flex;align-items:center;justify-self:end;padding:.6rem 1rem;border-radius:2rem;transform:translateY(1.5rem);opacity:0;transition:transform .3s cubic-bezier(.175,.885,.32,1.275),opacity .3s;box-shadow:0 .2rem .5rem rgba(0,0,0,.2);user-select:none}.fab-actions__item:active,.fab-actions__item:hover,.fab:active{transform:scale(.9)}.fab-actions__item:nth-of-type(1){transition-delay:.2s}.fab-actions__item:nth-of-type(2){transition-delay:.1s}.fab,.fab .icon{transition:transform .3s}.fab-actions__item .icon{fill:var(--accent-color);margin-left:.5rem}.fab-actions__item-name{font-size:.9rem}.fab{position:relative;display:flex;justify-content:center;align-items:center;padding:1rem;height:3.2rem;width:3.2rem;border-radius:50%;background-color:var(--accent-color);box-shadow:0 .5rem .8rem rgba(0,0,0,.3)}.fab .icon{position:absolute;height:100%;fill:#fff}.fab .icon:nth-of-type(1){transform:scale(1) rotate(0)}.fab .icon:nth-of-type(2){transform:scale(0) rotate(-180deg)}#fab_backdrop{position:fixed;z-index:3;top:0;bottom:0;left:0;right:0;opacity:0;clip-path:circle(0 at 100% 100%);transition:clip-path .5s,opacity .5s;background-color:rgba(0,0,0,.5)}#update_of_task{font-size:1.3rem;margin:.4rem 0 1.8rem}ul{padding:0;list-style:none}#assigned_task_list{display:grid;gap:1rem;margin-top:1rem;align-content:flex-start}.task-card{display:grid;padding:1rem;border-radius:.5rem;background-color:var(--foreground-color)}.task__project-title,input[type=date]{background-color:rgba(var(--text-color),.06)}.task__header{display:grid;gap:0 .5rem;align-items:flex-start;grid-template-columns:1fr auto;grid-template-areas:". send-button" ". send-button"}.task__project-title{font-size:.9rem;font-weight:500;border-radius:.3rem;padding:.3rem .5rem;justify-self:flex-start;margin-bottom:.5rem!important}.task__title{font-size:1.3rem;margin-bottom:1rem!important}.task__description{white-space:pre-line}.send-update-button{grid-area:send-button;--padding:0.6rem 0.8rem;color:var(--accent-color)}.send-update-button .icon{height:1.2rem;width:1.2rem;fill:var(--accent-color)}#admin_page__left{height:100%;overflow-y:hidden}#admin_page__left sm-tab-header{--gap:0;--justify-content:stretch;background-color:var(--foreground-color);border-bottom:1px solid rgba(var(--text-color),.2)}#admin_page__left sm-tab{justify-content:center}#admin_page__left sm-tab-panels,#admin_page__left sm-tab-panels>*{height:100%;flex-direction:column}#admin_page__left sm-tab-panels{overflow-y:hidden}#admin_page__left sm-tab-panels>*{display:flex}#admin_page__left .list-container{height:100%;overflow-y:auto;padding-bottom:2rem}#admin_page__left .empty-state{padding:1rem;text-align:center}#update_filters_wrapper{gap:1.5rem}input[type=date]{display:flex;width:100%;padding:.5rem;border:rgba(var(--text-color),.2) solid thin;border-radius:.3rem;font-family:inherit;font-size:inherit;color:inherit}#project_watching_section,#project_watchlist,.watchlist_project_card{display:grid;gap:1rem}input[type=date]:focus{outline:0;box-shadow:0 0 0 .1rem var(--accent-color)}.search__icon{height:1.2rem;width:1.2rem}#user_role{font-size:.7rem;text-transform:uppercase;letter-spacing:.05em;padding:.4rem .8rem;border-radius:.3rem;border:var(--accent-color) solid thin}#project_watchlist{grid-template-columns:repeat(auto-fill,minmax(15rem,1fr))}.watchlist_project_card{color:inherit;border-radius:.5rem;grid-template-rows:auto 1fr;padding:1rem;background-color:rgba(var(--text-color),.04)}.watchlist_project_card .project__title{font-size:1.1rem;line-height:1.5}.progress-bar{display:flex;height:.5rem;background-color:rgba(var(--text-color),.2);border-radius:1rem;overflow:hidden;align-self:flex-end}.progress-bar .progress-value{background-color:var(--accent-color);transition:width .3s}#username{margin-bottom:.5rem}@media only screen and (max-width:640px){.hide-on-mobile,.hide-page-on-mobile{display:none}#project_editing_panel{padding:1rem}.list-container{padding-bottom:5rem}}@media only screen and (min-width:640px){#admin_page__left,#project_editing_panel,.nav-list__item{border-radius:.5rem}.hide-on-desktop{display:none!important}sm-popup{--width:26rem}.popup__header{padding:1.5rem 1.5rem 0 .75rem}#main_nav{padding:.5rem;background-color:rgba(var(--background-color),1);flex-direction:column}#main_nav theme-toggle{margin:1rem;margin-top:auto}.nav-list__item{flex-direction:row;align-items:center;padding:.8rem;margin-bottom:.25rem;font-size:1rem}.nav-list__item--active{background-color:rgba(var(--text-color),.06)}.nav-list__item .icon{margin-bottom:0}.nav-list__item_title{display:none}.project-card--active{background-color:rgba(var(--text-color),.1)}#admin_page__left,.page{background-color:var(--foreground-color)}#sign_in{width:24rem;height:auto;border-radius:.4rem}#dashboard_page{grid-template-columns:3fr 18rem}#dashboard_page #project_watching_section{align-self:flex-start}#all_interns_page__header{grid-template-columns:1fr auto}#admin_page{padding:1rem 0;gap:1rem;grid-template-columns:18rem minmax(0,1fr);grid-template-rows:1fr}#project_editing_panel{padding-right:1rem}#edit_data_fig{width:16rem;justify-self:center}#project_explorer{display:grid;height:100%;grid-template-columns:16rem 3fr;grid-template-areas:"left right"}#project_explorer__left{grid-area:left;height:100%;overflow-y:auto;padding-bottom:1.5rem;border-right:1px solid rgba(var(--text-color),.06);background-color:rgba(var(--background-color),1)}#all_interns_list .intern-card,#update_filters_wrapper{border-radius:.5rem;background-color:var(--foreground-color)}#project_explorer__left h4{margin-top:0;margin-bottom:.5rem;color:var(--accent-color);font-size:.9rem}#project_explorer__right{grid-area:right;height:100%;overflow-y:auto}#main_page{grid-template-columns:4rem minmax(0,1fr);grid-template-areas:"main-header main-header" "main-nav sub-pages"}#post_update_popup{--width:28rem}#updates_page{height:100%;gap:1rem;grid-template-areas:"updates update-filters";grid-template-columns:minmax(0,1fr) 20rem}#update_filters_wrapper{padding:1rem;align-content:flex-start;grid-area:update-filters}#updates_wrapper{height:100%;overflow-y:auto;grid-area:updates}#all_interns_list{gap:1rem;grid-template-columns:repeat(auto-fill,minmax(14rem,1fr))}#all_interns_list .intern-card{gap:1.5rem .5rem;padding:1.5rem;grid-template-columns:1fr}#all_interns_list .intern-card__initials{position:relative;grid-column:1/3;z-index:1}#all_interns_list .intern-card__initials::after{content:"";position:absolute;background-color:inherit;border-radius:inherit;height:calc(100% + 1rem);width:calc(100% + 1rem);opacity:.3;z-index:-1}#intern_list_popup{--height:80vh}#settings_page{height:100%;align-items:flex-start;padding:2rem}.watchlist_project_card{padding:1.5rem}}@media only screen and (min-width:1280px){#main_page{grid-template-columns:12rem minmax(0,1fr);grid-template-areas:"main-header main-header" "main-nav sub-pages"}#main_nav{align-items:flex-start}.nav-list__item .icon{margin-right:.5rem}.nav-list__item_title{display:inline-block}}@media (any-hover:hover){::-webkit-scrollbar{width:.5rem;height:.5rem}::-webkit-scrollbar-thumb{background:rgba(var(--text-color),.3);border-radius:1rem}::-webkit-scrollbar-thumb:hover{background:rgba(var(--text-color),.5)}.interact:hover{background:linear-gradient(rgba(var(--text-color),.06),rgba(var(--text-color),.06)),var(--foreground-color)}.apply-button,.send-update-button,.task-option{opacity:0;transition:opacity .3s}.task-card:hover .send-update-button,.task-list-item:hover .task-option,.task-option:focus-within,.task:hover .apply-button{opacity:1}}
\ No newline at end of file
+*{padding:0;margin:0;box-sizing:border-box;font-family:"Roboto",sans-serif}:root{font-size:clamp(1rem,1.2vmax,1.2rem)}html,body{height:100%}body{--accent-color: #3d5afe;--secondary-color: #ffac2e;--text-color: 20, 20, 20;--foreground-color: 252, 253, 255;--background-color: 241, 243, 248;--danger-color: rgb(255, 75, 75);--green: #1cad59;--yellow: rgb(220, 165, 0);color:rgba(var(--text-color), 1);background-color:rgba(var(--background-color), 1);overflow-y:hidden}body[data-theme=dark]{--accent-color: #6d83ff;--secondary-color: #d60739;--text-color: 220, 220, 220;--foreground-color: 27, 28, 29;--background-color: 21, 22, 22;--danger-color: rgb(255, 106, 106);--green: #00e676;--yellow: rgb(255, 213, 5)}body[data-theme=dark] ::-webkit-calendar-picker-indicator{filter:invert(1)}p{max-width:70ch;line-height:1.7;color:rgba(var(--text-color), 0.8)}p:not(:last-of-type){margin-bottom:1.5rem}img{-o-object-fit:cover;object-fit:cover}a:where([class]){color:inherit;text-decoration:none}a:where([class]):focus-visible{box-shadow:0 0 0 .1rem rgba(var(--text-color), 1) inset}a{color:var(--accent-color)}a:-webkit-any-link:focus-visible{outline:rgba(var(--text-color), 1) .1rem solid}a:-moz-any-link:focus-visible{outline:rgba(var(--text-color), 1) .1rem solid}a:any-link:focus-visible{outline:rgba(var(--text-color), 1) .1rem solid}a.button{padding:.4rem .6rem;border-radius:.3rem;font-size:.9rem;font-weight:500;color:inherit}button,.button{-webkit-user-select:none;-moz-user-select:none;user-select:none;position:relative;display:inline-flex;border:none;background-color:rgba(0,0,0,0);overflow:hidden;color:inherit;-webkit-tap-highlight-color:rgba(0,0,0,0);align-items:center;font-size:.9rem;font-weight:500;white-space:nowrap;padding:.8rem;border-radius:.3rem;justify-content:center}button:focus-visible,.button:focus-visible{outline:var(--accent-color) solid medium}button:not(:disabled),.button:not(:disabled){cursor:pointer}.button{background-color:rgba(var(--text-color), 0.1)}.button--primary,.button--danger{color:rgba(var(--background-color), 1) !important}.button--primary .icon,.button--danger .icon{fill:rgba(var(--background-color), 1)}.button--primary{background-color:var(--accent-color)}.button--danger{background-color:var(--danger-color)}.button--small{padding:.4rem .6rem}.button--outlined{border:solid rgba(var(--text-color), 0.5) .1rem;background-color:rgba(var(--foreground-color), 1)}.cta{text-transform:uppercase;font-size:.8rem;font-weight:700;letter-spacing:.05em;padding:.8rem 1rem}.icon{width:1.2rem;height:1.2rem;fill:rgba(var(--text-color), 0.8);flex-shrink:0}.icon-only{padding:.5rem;border-radius:.3rem;aspect-ratio:1/1}button:disabled{opacity:.5}a:-webkit-any-link:focus-visible{outline:rgba(var(--text-color), 1) .1rem solid}a:-moz-any-link:focus-visible{outline:rgba(var(--text-color), 1) .1rem solid}a:any-link:focus-visible{outline:rgba(var(--text-color), 1) .1rem solid}details summary{display:flex;-webkit-user-select:none;-moz-user-select:none;user-select:none;cursor:pointer;align-items:center;justify-content:space-between;color:var(--accent-color)}details[open] summary{margin-bottom:1rem}details[open]>summary .down-arrow{transform:rotate(180deg)}fieldset{border:none}input{accent-color:var(--accent-color)}input[type=range]:active{cursor:-webkit-grab;cursor:grab}sm-copy{font-size:.9rem}sm-input,sm-textarea{font-size:.9rem;--border-radius: 0.5rem;--background-color: rgba(var(--foreground-color), 1)}sm-input button .icon,sm-textarea button .icon{fill:var(--accent-color)}sm-textarea{--max-height: 32ch}sm-button{--padding: 0.8rem}sm-button[variant=primary] .icon{fill:rgba(var(--background-color), 1)}sm-button[disabled] .icon{fill:rgba(var(--text-color), 0.6)}sm-button.danger{--background: var(--danger-color);color:rgba(var(--background-color), 1)}sm-spinner{--size: 1rem;--stroke-width: 0.1rem}sm-form{--gap: 1rem}sm-select{--padding: 0.8rem;font-size:.9rem}sm-option{font-size:.9rem}strip-select{--gap: 0;background-color:rgba(var(--text-color), 0.06);border-radius:.3rem;padding:.3rem}strip-option{position:relative;font-size:.8rem;--border-radius: 0.2rem;-webkit-user-select:none;-moz-user-select:none;user-select:none}sm-button{--border-radius: 0.3rem}sm-button[variant=primary] .icon{fill:rgba(var(--background-color), 1)}sm-button[disabled] .icon{fill:rgba(var(--text-color), 0.6)}sm-select[open]{z-index:10}ul{list-style:none}.overflow-ellipsis{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.wrap-around{overflow-wrap:break-word;word-wrap:break-word;word-break:break-word;-webkit-hyphens:auto;hyphens:auto}.full-bleed{grid-column:1/-1}.uppercase{text-transform:uppercase}.capitalize{text-transform:capitalize}.sticky{position:-webkit-sticky;position:sticky}.top-0{top:0}.flex{display:flex}.flex-wrap{flex-wrap:wrap}.flex-1{flex:1}.grid{display:grid}.flow-column{grid-auto-flow:column}.gap-0-3{gap:.3rem}.gap-0-5{gap:.5rem}.gap-1{gap:1rem}.gap-1-5{gap:1.5rem}.gap-2{gap:2rem}.gap-3{gap:3rem}.text-align-right{text-align:right}.align-items-start{align-items:flex-start}.align-start{align-content:flex-start}.align-center{align-items:center}.align-end{align-items:flex-end}.text-center{text-align:center}.justify-start{justify-items:start}.justify-center{justify-content:center}.justify-right{margin-left:auto}.align-self-center{align-self:center}.align-self-end{align-self:end}.justify-self-center{justify-self:center}.justify-self-start{justify-self:start}.justify-self-end{justify-self:end}.flex-direction-column{flex-direction:column}.space-between{justify-content:space-between}.w-100{width:100%}.h-100{height:100%}.margin-right-0-3{margin-right:.3rem}.margin-right-0-5{margin-right:.5rem}.margin-left-0-5{margin-left:.5rem}.margin-left-auto{margin-left:auto}.margin-right-auto{margin-right:auto}.margin-bottom-0-5{margin-bottom:.5rem}.margin-bottom-1{margin-bottom:1rem}.margin-bottom-2{margin-bottom:2rem}.margin-block-1{margin-block:1rem}.margin-block-1-5{margin-block:1.5rem}.margin-inline-1{margin-inline:1rem}.margin-inline-1-5{margin-inline:1.5rem}.hidden{display:none !important}.no-transformations{transform:none !important}.full-bleed{grid-column:1/4}.h1{font-size:2.5rem}.h2{font-size:2rem}.h3{font-size:1.4rem}.h4{font-size:1rem}.h5{font-size:.8rem}.grid-3{grid-template-columns:1fr auto auto}.flow-column{grid-auto-flow:column}.w-100{width:100%}.color-0-8{color:rgba(var(--text-color), 0.8)}.weight-400{font-weight:400}.weight-500{font-weight:500}.ripple{height:8rem;width:8rem;position:absolute;border-radius:50%;transform:scale(0);background:radial-gradient(circle, rgba(var(--text-color), 0.3) 0%, rgba(0, 0, 0, 0) 50%);pointer-events:none}.interact{position:relative;overflow:hidden;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0)}.observe-empty-state:empty{display:none}.observe-empty-state:not(:empty)~.empty-state{display:none}.button__icon{height:1.2rem;width:1.2rem}.button__icon--left{margin-right:.5rem}.button__icon--right{margin-left:.5rem}[data-editable]{transition:padding .2s}[data-editable]:focus-within{padding:.5em;border-radius:.3rem;outline:none;background-color:rgba(var(--text-color), 0.06);box-shadow:0 0 0 .1rem var(--accent-color) inset}#confirmation_popup,#prompt_popup{flex-direction:column}#confirmation_popup h4,#prompt_popup h4{font-weight:500;margin-bottom:.5rem}#confirmation_popup sm-button,#prompt_popup sm-button{margin:0}#confirmation_popup .flex,#prompt_popup .flex{padding:0;margin-top:1rem}#confirmation_popup .flex sm-button:first-of-type,#prompt_popup .flex sm-button:first-of-type{margin-right:.6rem;margin-left:auto}.popup__header{display:grid;gap:.5rem;width:100%;padding:0 1.5rem 0 .5rem;align-items:center;grid-template-columns:auto 1fr auto}.popup__header__close{padding:.5rem;cursor:pointer}#main_page{height:100%;grid-template-rows:auto 1fr auto;grid-template-areas:"main-header" "sub-pages" "main-nav"}#main_header{grid-area:main-header;display:flex;gap:1rem;align-items:center;position:-webkit-sticky;position:sticky;padding:.5rem 1rem;background:rgba(var(--foreground-color), 1);z-index:1}#main_nav{grid-area:main-nav;position:relative;display:flex;align-items:center;background-color:rgba(var(--foreground-color), 1)}.nav-list__item{display:flex;flex-direction:column;align-items:center;width:100%;padding:.5rem 0;-webkit-tap-highlight-color:rgba(0,0,0,0);font-size:.8rem;font-weight:500;color:rgba(var(--text-color), 0.8)}.nav-list__item--active{color:var(--accent-color)}.nav-list__item--active .icon{fill:var(--accent-color)}.nav-list__item--active .icon--outlined{display:none}.nav-list__item--active .icon--filled{display:inline-block}.nav-list__item:not(.nav-list__item--active) .icon--outlined{display:inline-block}.nav-list__item:not(.nav-list__item--active) .icon--filled{display:none}.nav-list__item .icon{margin-bottom:.3rem}#sub_page_container{grid-area:sub-pages;height:100%;overflow-y:auto}.container-card{position:relative;background:rgba(var(--foreground-color), 1);border-radius:.5rem}.medium-top-bottom-margin{margin:.5rem 0}#sign_in_page{display:grid;position:fixed;z-index:5;top:0;bottom:0;left:0;right:0;place-content:center;background-color:rgba(var(--foreground-color), 1);gap:1rem}#sign_in_form{width:22rem}.task{display:grid;grid-template-columns:auto 1fr;margin:0 1rem}.task .task__branch_container{padding-bottom:2rem}.task:last-of-type .left .line{transform:scaleY(0)}.task .left{display:flex;position:relative;justify-content:center;padding-top:.5rem}.task .left .circle{display:inline-flex;position:relative;align-self:flex-start;height:1rem;width:1rem;border-radius:50%;background:rgba(var(--foreground-color), 1);border:solid 2px rgba(var(--text-color), 0.4);z-index:1}.task .left .line{position:absolute;left:50%;height:100%;width:2px;transform:translateX(-50%) scaleY(1);background-color:rgba(var(--text-color), 0.4)}.task .right{margin-left:1rem;display:flex;flex-direction:column;width:100%}.task .right .apply-cont{width:100%;display:flex;flex-direction:row}.task .right .apply-cont h4{flex:1}.task h4{margin-top:.4rem;margin-bottom:1rem}.timeline-task__description{white-space:pre-line}.task .assigned-interns .assigned-intern{padding:.4rem}.completed-task .left .circle{border:solid 2px #00c853 !important;background:#00c853 !important}.completed-task .left .line{background-color:#00c853 !important}.page{gap:1rem;display:grid;position:relative;padding:1rem;-webkit-animation:fadein .3s;animation:fadein .3s;grid-template-columns:minmax(0, 1fr)}@-webkit-keyframes fadein{0%{opacity:0}100%{opacity:1}}@keyframes fadein{0%{opacity:0}100%{opacity:1}}.task-title{font-weight:500}.padding{padding:1rem}#dashboard_page{padding-bottom:5rem;grid-template-columns:auto}.logo{display:flex;align-items:center;font-size:1.2rem;width:100%}.logo .cls-2,.logo .cls-3{fill:rgba(var(--text-color), 1);font-size:146.9px;font-family:ArialMT,Arial}.logo svg{height:2.5rem}.logo h4{margin:0}.project-card{padding:1rem;font-weight:500;line-height:1.5;text-transform:capitalize;color:rgba(var(--text-color), 0.8)}.intern-card{-webkit-user-select:none;-moz-user-select:none;user-select:none;padding:.8rem 1rem;gap:.8rem;grid-template-columns:auto 1fr auto}.intern-card__initials{display:flex;height:2.6rem;width:2.6rem;justify-content:center;align-items:center;border-radius:40%;color:#fff;font-weight:500;font-size:1rem;text-transform:uppercase;background-color:var(--accent-color)}.intern-card__score-wrapper{font-weight:500;font-size:1.2rem}.intern-card .icon{fill:#ff5722 !important;height:1rem !important;width:1rem !important;margin-left:.2rem}.request-card{display:grid;position:relative;padding:1rem}.request-card sm-button{--padding: 0.5rem 0.8rem}.request-card__description{width:100%;font-size:1rem;margin-bottom:1rem}.reject-app{margin-left:auto;margin-right:.5rem}#updates_page sm-select{--max-height: 50vh}#updates{transition:opacity .3s ease}#updates_page__project_selector strip-option{font-size:.9rem}.intern-update{display:grid;gap:.5rem;padding:1rem;border-radius:.5rem;background-color:rgba(var(--foreground-color), 1)}.update__topic{font-weight:500;font-size:1rem;margin-top:.5rem;text-transform:capitalize;max-width:65ch}.update__sender{color:var(--accent-color);font-size:.9rem;font-weight:500}.update__time{font-size:.85rem;color:rgba(var(--text-color), 0.8)}.update__message{white-space:pre-line}.container-header{display:flex;align-items:center;width:100%;padding:1rem}.container-header h4{flex:1;font-weight:500}#intern_info_popup .grid>*{justify-self:center}#intern_info_popup #update_intern_score{width:100%;margin-top:1rem}#intern_info__initials{margin-bottom:1rem;position:relative;height:3rem;width:3rem;font-size:1.3rem}#intern_info__initials::before{content:"";position:absolute;background-color:inherit;border-radius:inherit;height:calc(100% + 1.5rem);width:calc(100% + 1.5rem);opacity:.3;z-index:-1}#intern_info__name{font-size:1.5rem;margin-bottom:.5rem}.gold-fill{fill:#ff5722}#intern_info__score{font-size:1.5rem}#project_info{flex-direction:column}.branch-button{margin-bottom:.5rem;display:flex;border-radius:0;padding:.5rem;border-radius:.2rem;text-transform:capitalize;justify-self:start;align-items:center;-webkit-user-select:none;-moz-user-select:none;user-select:none;font-size:.85rem;font-weight:500}.active-branch{opacity:1;color:#fff;background:var(--accent-color)}#task_list{padding:1rem 0 1.5rem 0}.task-list-item{display:grid;grid-template-columns:auto 1fr auto;grid-template-areas:"status title options" "status interns interns" "status description description" "status . .";align-content:flex-start;padding:1rem;gap:.5rem;border-radius:.5rem;background:rgba(var(--text-color), 0.02)}.task-list-item sm-checkbox{grid-area:status;align-self:flex-start;padding:.2rem .5rem .5rem 0}.task-list-item h4{font-weight:500;margin:0}.task-list-item .task-title{grid-area:title;line-height:1.6}.task-list-item .assigned-interns{grid-area:interns}.task__branch_container:not(:empty){display:grid;gap:.5rem;padding:.5rem 0}.task__branch_container .branch-button{position:relative;background-color:rgba(0,0,0,0);padding:0;padding-left:2rem;margin:.5rem 0}.task__branch_container .branch-button::before{position:absolute;content:"";top:-50%;left:0;display:inline-flex;width:1rem;height:100%;align-self:flex-start;margin-right:.8rem;border-left:solid;border-bottom:solid;border-width:.15rem;border-color:rgba(var(--text-color), 0.6);border-radius:0 0 0 .2rem}.task__branch_container .branch-button+.branch-button::before{top:calc(-50% - 1.5rem);height:calc(100% + 1.5rem)}.task-option{grid-area:options;transition:opacity .3s ease;padding:.5rem}.task-description{grid-area:description;margin:0;overflow-wrap:break-word;word-wrap:break-word;white-space:pre-line}.assigned-interns{display:flex;flex-wrap:wrap;margin-bottom:1rem}.assigned-interns .assigned-intern{-webkit-user-select:none;-moz-user-select:none;user-select:none;display:flex;font-size:.8rem;margin:.2rem .5rem .2rem 0;padding:.2rem 0 .2rem .4rem;border-radius:.2rem;border:1px solid rgba(var(--text-color), 0.24);align-items:center;white-space:nowrap;text-transform:capitalize}.assigned-interns .assigned-intern button{padding:.2rem}.assigned-interns .assigned-intern button .icon{height:1rem;width:1rem}#task_context{position:absolute;top:0;right:0;margin:-1rem 1rem 0 1rem;list-style:none;padding:.5rem 0;width:-webkit-max-content;width:-moz-max-content;width:max-content;border-radius:.3rem;transition:.3s opacity ease;background-color:rgba(var(--foreground-color), 1);box-shadow:0 .5rem 1rem -0.3rem rgba(0,0,0,.3)}#task_context li{padding:.8rem 1.5rem;display:flex;align-items:center;font-size:.9rem}#task_context li .icon{margin-right:.5rem}.temp-task .cancel-task-button{margin-right:.5rem}#branch_container{display:flex;flex-flow:row wrap;margin:.5rem 0 1rem 0}#intern_list_popup{flex-direction:column}#intern_search_field{margin-bottom:1rem}#intern_list_container{height:100%;overflow-y:auto}#best_interns_container,#project_list_container{margin-bottom:1rem}#best_interns_container .container-header .icon,#project_list_container .container-header .icon{margin-right:.5rem}#edit_data_fig{fill:rgba(var(--text-color), 0.6);width:60vw;margin:2rem 0}#loading_page{display:grid;position:fixed;top:0;bottom:0;left:0;right:0;z-index:5;text-align:center;place-content:center;justify-items:center;background-color:rgba(var(--foreground-color), 1)}.loading-message{font-size:1.3rem;margin:1.5rem 0 .5rem 0}#loading_page__footer{position:absolute;bottom:0;width:100%;padding:1.5rem}#loading_page__footer .icon{height:4rem;width:4rem}#project_watching_section{position:relative;overflow:hidden}#project_explorer{padding:0}#project_explorer__right{gap:1rem;align-items:flex-start;align-content:flex-start;padding:1rem}#explorer_branch_container{margin-top:1.5rem}#watch_project_button{margin-left:1rem;text-transform:capitalize}#admin_page{position:relative;display:grid;gap:0;padding:0;height:100%}#project_editing_panel{position:relative;padding:1rem 0;height:100%;overflow-y:auto}.fab-actions{display:grid;gap:1rem;position:absolute;bottom:0;right:0;margin:1rem;justify-items:end;text-align:end;z-index:5}.fab-actions[open] .fab-actions__item{transform:translateY(0);opacity:1}.fab-actions[open] .fab .icon:nth-of-type(1){transform:scale(0) rotate(180deg)}.fab-actions[open] .fab .icon:nth-of-type(2){transform:scale(1) rotate(0)}.fab-actions[open]~#fab_backdrop{opacity:1;-webkit-clip-path:circle(100%);clip-path:circle(100%)}.fab-actions__item{display:flex;align-items:center;justify-self:end;padding:.6rem 1rem;border-radius:2rem;transform:translateY(1.5rem);background-color:rgba(var(--foreground-color), 1);opacity:0;transition:transform .3s cubic-bezier(0.175, 0.885, 0.32, 1.275),opacity .3s;box-shadow:0 .2rem .5rem rgba(0,0,0,.2);-webkit-user-select:none;-moz-user-select:none;user-select:none}.fab-actions__item:hover,.fab-actions__item:active{transform:scale(0.9)}.fab-actions__item:nth-of-type(1){transition-delay:.2s}.fab-actions__item:nth-of-type(2){transition-delay:.1s}.fab-actions__item .icon{fill:var(--accent-color);margin-left:.5rem}.fab-actions__item-name{font-size:.9rem}.fab{position:relative;display:flex;justify-content:center;align-items:center;padding:1rem;height:3.2rem;width:3.2rem;border-radius:50%;background-color:var(--accent-color);box-shadow:0 .5rem .8rem rgba(0,0,0,.3);transition:transform .3s;-webkit-tap-highlight-color:rgba(0,0,0,0)}.fab:active{transform:scale(0.9)}.fab .icon{position:absolute;height:100%;fill:#fff;transition:transform .3s}.fab .icon:nth-of-type(1){transform:scale(1) rotate(0)}.fab .icon:nth-of-type(2){transform:scale(0) rotate(-180deg)}#fab_backdrop{position:fixed;z-index:3;top:0;bottom:0;left:0;right:0;opacity:0;-webkit-clip-path:circle(0% at 100% 100%);clip-path:circle(0% at 100% 100%);transition:opacity .5s,-webkit-clip-path .5s;transition:clip-path .5s,opacity .5s;transition:clip-path .5s,opacity .5s,-webkit-clip-path .5s;background-color:rgba(0,0,0,.5)}#update_of_project{color:rgba(var(--text-color), 0.8)}#update_of_task{font-size:1.3rem;margin:.4rem 0 1.8rem 0}ul{padding:0;list-style:none}#assigned_task_list{display:grid;gap:1rem;margin-top:1rem;align-content:flex-start;grid-template-columns:minmax(0, 1fr)}.task-card{display:grid;padding:1rem;border-radius:.5rem;grid-template-columns:minmax(0, 1fr);background-color:rgba(var(--foreground-color), 1)}.task__header{display:grid;gap:0 .5rem;align-items:flex-start;grid-template-columns:1fr auto;grid-template-areas:". send-button" ". send-button"}.task__project-title{font-size:.9rem;font-weight:500;border-radius:.3rem;padding:.3rem .5rem;justify-self:flex-start;margin-bottom:.5rem !important;color:rgba(var(--text-color), 0.8);background-color:rgba(var(--text-color), 0.06)}.task__title{font-size:1.3rem;margin-bottom:1rem !important}.task__description{word-wrap:break-word;overflow-wrap:break-word;white-space:pre-line;color:rgba(var(--text-color), 0.8)}.send-update-button{grid-area:send-button;--padding: 0.6rem 0.8rem;color:var(--accent-color)}.send-update-button .icon{fill:var(--accent-color)}#admin_page__left{height:100%;overflow-y:hidden}#admin_page__left sm-tab-header{--gap: 0;--justify-content: stretch;background-color:rgba(var(--foreground-color), 1);border-bottom:1px solid rgba(var(--text-color), 0.2)}#admin_page__left sm-tab{justify-content:center}#admin_page__left sm-tab-panels,#admin_page__left sm-tab-panels>*{height:100%;flex-direction:column}#admin_page__left sm-tab-panels{overflow-y:hidden}#admin_page__left sm-tab-panels>*{display:flex}#admin_page__left .list-container{height:100%;overflow-y:auto;padding-bottom:2rem}#admin_page__left .empty-state{padding:1rem;text-align:center}#update_filters_wrapper{gap:1.5rem}input[type=date]{display:flex;width:100%;padding:.5rem;border:rgba(var(--text-color), 0.2) solid thin;border-radius:.3rem;font-family:inherit;font-size:inherit;color:inherit;background-color:rgba(var(--text-color), 0.06)}input[type=date]:focus{outline:none;box-shadow:0 0 0 .1rem var(--accent-color)}.search__icon{height:1.2rem;width:1.2rem}#user_role{justify-self:start;font-size:.7rem;font-weight:500;text-transform:uppercase;letter-spacing:.05em;padding:.4rem .8rem;border-radius:.3rem;border:solid var(--accent-color) thin}#project_watching_section{display:grid;gap:1rem}#project_watchlist{display:grid;gap:1rem;grid-template-columns:repeat(auto-fill, minmax(15rem, 1fr))}.watchlist_project_card{color:inherit;display:grid;border-radius:.5rem;grid-template-rows:auto 1fr;gap:1rem;padding:1rem;background-color:rgba(var(--text-color), 0.04)}.watchlist_project_card .project__title{font-size:1.1rem;line-height:1.5}.progress-bar{display:flex;height:.5rem;background-color:rgba(var(--text-color), 0.2);border-radius:1rem;overflow:hidden;align-self:flex-end}.progress-bar .progress-value{background-color:var(--accent-color);transition:width .3s}#username{margin-top:1.5rem;margin-bottom:.5rem}#logout{margin-top:1.5rem}@media only screen and (max-width: 640px){.hide-on-mobile,.hide-page-on-mobile{display:none}#project_editing_panel{padding:1rem}.list-container{padding-bottom:5rem}}@media only screen and (min-width: 640px){.hide-on-desktop{display:none !important}sm-popup{--width: 26rem}.popup__header{padding:1.5rem 1.5rem 0 .75rem}#main_nav{padding:.5rem;background-color:rgba(var(--background-color), 1);flex-direction:column}#main_nav theme-toggle{margin:1rem;margin-top:auto}.nav-list__item{flex-direction:row;align-items:center;border-radius:.5rem;padding:.8rem;margin-bottom:.25rem;font-size:1rem}.nav-list__item--active{background-color:rgba(var(--text-color), 0.06)}.nav-list__item .icon{margin-bottom:0}.nav-list__item_title{display:none}.project-card--active{background-color:rgba(var(--text-color), 0.1)}.page{background-color:rgba(var(--foreground-color), 1)}#sign_in{width:24rem;height:auto;border-radius:.4rem}#dashboard_page{grid-template-columns:3fr 18rem}#dashboard_page #project_watching_section{align-self:flex-start}#all_interns_page__header{grid-template-columns:1fr auto}#admin_page{padding:1rem 0;gap:1rem;grid-template-columns:18rem minmax(0, 1fr);grid-template-rows:1fr}#admin_page__left{background-color:rgba(var(--foreground-color), 1)}#project_editing_panel{padding-right:1rem}#admin_page__left,#project_editing_panel{border-radius:.5rem}#edit_data_fig{width:16rem;justify-self:center}#project_explorer{display:grid;height:100%;grid-template-columns:16rem 3fr;grid-template-areas:"left right"}#project_explorer__left{grid-area:left;height:100%;overflow-y:auto;padding-bottom:1.5rem;border-right:1px solid rgba(var(--text-color), 0.06);background-color:rgba(var(--background-color), 1)}#project_explorer__left h4{margin-top:0;margin-bottom:.5rem;color:var(--accent-color);font-size:.9rem}#project_explorer__right{grid-area:right;height:100%;overflow-y:auto}#main_page{grid-template-columns:4rem minmax(0, 1fr);grid-template-areas:"main-header main-header" "main-nav sub-pages"}#post_update_popup{--width: 28rem}#updates_page{height:100%;gap:1rem;grid-template-areas:"updates update-filters";grid-template-columns:minmax(0, 1fr) 20rem}#update_filters_wrapper{padding:1rem;border-radius:.5rem;align-content:flex-start;grid-area:update-filters;background-color:rgba(var(--foreground-color), 1)}#updates_wrapper{height:100%;overflow-y:auto;grid-area:updates}#all_interns_list{gap:1rem;grid-template-columns:repeat(auto-fill, minmax(14rem, 1fr))}#all_interns_list .intern-card{gap:1.5rem .5rem;padding:1.5rem;grid-template-columns:1fr;border-radius:.5rem;background-color:rgba(var(--foreground-color), 1)}#all_interns_list .intern-card__initials{position:relative;grid-column:1/3;z-index:1}#all_interns_list .intern-card__initials::after{content:"";position:absolute;background-color:inherit;border-radius:inherit;height:calc(100% + 1rem);width:calc(100% + 1rem);opacity:.3;z-index:-1}#intern_list_popup{--height: 80vh}#settings_page{height:100%;align-items:flex-start;padding:2rem}.watchlist_project_card{padding:1.5rem}}@media only screen and (min-width: 1280px){#main_page{grid-template-columns:12rem minmax(0, 1fr);grid-template-areas:"main-header main-header" "main-nav sub-pages"}#main_nav{align-items:flex-start}.nav-list__item .icon{margin-right:.5rem}.nav-list__item_title{display:inline-block}}@media(any-hover: hover){::-webkit-scrollbar{width:.5rem;height:.5rem}::-webkit-scrollbar-thumb{background:rgba(var(--text-color), 0.3);border-radius:1rem}::-webkit-scrollbar-thumb:hover{background:rgba(var(--text-color), 0.5)}.interact:hover{background:linear-gradient(rgba(var(--text-color), 0.06), rgba(var(--text-color), 0.06)),rgba(var(--foreground-color), 1)}.send-update-button,.task-option,.apply-button{opacity:0;transition:opacity .3s}.task-list-item:hover .task-option,.task-option:focus-within,.task:hover .apply-button,.task-card:hover .send-update-button{opacity:1}}
\ No newline at end of file
diff --git a/css/main.scss b/css/main.scss
index ddd2ea4..b6a7cc4 100644
--- a/css/main.scss
+++ b/css/main.scss
@@ -1,1582 +1,1828 @@
* {
- padding: 0;
- margin: 0;
- box-sizing: border-box;
- font-family: 'Roboto', sans-serif;
+ padding: 0;
+ margin: 0;
+ box-sizing: border-box;
+ font-family: "Roboto", sans-serif;
}
:root {
- font-size: clamp(1rem, 1.2vmax, 3rem);
+ font-size: clamp(1rem, 1.2vmax, 1.2rem);
}
html,
body {
- height: 100%;
- scroll-behavior: smooth;
+ height: 100%;
}
body {
-
- &,
- * {
- --accent-color: #5D54A4;
- --text-color: 17, 17, 17;
- --background-color: 240, 240, 255;
- --foreground-color: rgb(248, 248, 255);
- --danger-color: red;
- scrollbar-width: thin;
- }
-
- color: rgba(var(--text-color), 1);
- background: rgba(var(--background-color), 1);
+ --accent-color: #3d5afe;
+ --secondary-color: #ffac2e;
+ --text-color: 20, 20, 20;
+ --foreground-color: 252, 253, 255;
+ --background-color: 241, 243, 248;
+ --danger-color: rgb(255, 75, 75);
+ --green: #1cad59;
+ --yellow: rgb(220, 165, 0);
+ color: rgba(var(--text-color), 1);
+ background-color: rgba(var(--background-color), 1);
+ overflow-y: hidden;
}
-body[data-theme='dark'] {
-
- &,
- * {
- --accent-color: #9D65C9;
- --text-color: 240, 240, 240;
- --text-color-light: 170, 170, 170;
- --background-color: 10, 10, 10;
- --foreground-color: rgb(20, 20, 20);
- --danger-color: rgb(255, 106, 106);
- }
- ::-webkit-calendar-picker-indicator {
- filter: invert(1);
- }
+body[data-theme="dark"] {
+ --accent-color: #6d83ff;
+ --secondary-color: #d60739;
+ --text-color: 220, 220, 220;
+ --foreground-color: 27, 28, 29;
+ --background-color: 21, 22, 22;
+ --danger-color: rgb(255, 106, 106);
+ --green: #00e676;
+ --yellow: rgb(255, 213, 5);
+ ::-webkit-calendar-picker-indicator {
+ filter: invert(1);
+ }
}
p {
- max-width: 70ch;
- line-height: 1.7;
- color: rgba(var(--text-color), 0.8);
+ max-width: 70ch;
+ line-height: 1.7;
+ color: rgba(var(--text-color), 0.8);
- &:not(:last-of-type) {
- margin-bottom: 1.5rem;
- }
+ &:not(:last-of-type) {
+ margin-bottom: 1.5rem;
+ }
}
img {
- object-fit: cover;
+ object-fit: cover;
}
a:where([class]) {
- color: inherit;
- text-decoration: none;
+ color: inherit;
+ text-decoration: none;
- &:focus-visible {
- box-shadow: 0 0 0 0.1rem rgba(var(--text-color), 1) inset;
- }
+ &:focus-visible {
+ box-shadow: 0 0 0 0.1rem rgba(var(--text-color), 1) inset;
+ }
}
-a{
- color: var(--accent-color);
+a {
+ color: var(--accent-color);
+}
+
+a:any-link:focus-visible {
+ outline: rgba(var(--text-color), 1) 0.1rem solid;
+}
+a.button {
+ padding: 0.4rem 0.6rem;
+ border-radius: 0.3rem;
+ font-size: 0.9rem;
+ font-weight: 500;
+ color: inherit;
}
button,
.button {
- position: relative;
- display: inline-flex;
- border: none;
- background-color: transparent;
- overflow: hidden;
- color: inherit;
+ user-select: none;
+ position: relative;
+ display: inline-flex;
+ border: none;
+ background-color: transparent;
+ overflow: hidden;
+ color: inherit;
+ -webkit-tap-highlight-color: transparent;
+ align-items: center;
+ font-size: 0.9rem;
+ font-weight: 500;
+ white-space: nowrap;
+ padding: 0.8rem;
+ border-radius: 0.3rem;
+ justify-content: center;
+
+ &:focus-visible {
+ outline: var(--accent-color) solid medium;
+ }
+
+ &:not(:disabled) {
cursor: pointer;
-}
-button:disabled{
- opacity: 0.5;
+ }
}
-a.button{
- padding: 0.6rem 1.2rem;
- border-radius: 0.3rem;
- background-color: rgba(var(--text-color), 0.06);
-}
+.button {
+ background-color: rgba(var(--text-color), 0.1);
-a:any-link:focus-visible {
- outline: rgba(var(--text-color), 1) 0.1rem solid;
-}
+ &--primary,
+ &--danger {
+ color: rgba(var(--background-color), 1) !important;
-sm-button {
- --border-radius: 0.3rem;
-
- &[variant="primary"] {
- .icon {
- fill: rgba(var(--background-color), 1);
- }
+ .icon {
+ fill: rgba(var(--background-color), 1);
}
+ }
- &[disabled] {
- .icon {
- fill: rgba(var(--text-color), 0.6);
- }
- }
+ &--primary {
+ background-color: var(--accent-color);
+ }
+
+ &--danger {
+ background-color: var(--danger-color);
+ }
+
+ &--small {
+ padding: 0.4rem 0.6rem;
+ }
+
+ &--outlined {
+ border: solid rgba(var(--text-color), 0.5) 0.1rem;
+ background-color: rgba(var(--foreground-color), 1);
+ }
}
-ul {
- list-style: none;
-}
-
-.flex {
- display: flex;
-}
-
-.grid {
- display: grid;
-}
-
-.hide {
- opacity: 0;
- pointer-events: none;
-}
-
-.hide-completely {
- display: none !important;
-}
-
-.no-transformations {
- transform: none !important;
-}
-
-.overflow-ellipsis {
- width: 100%;
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
-}
-
-.breakable {
- overflow-wrap: break-word;
- word-wrap: break-word;
- -ms-word-break: break-all;
- word-break: break-word;
- -ms-hyphens: auto;
- -moz-hyphens: auto;
- -webkit-hyphens: auto;
- hyphens: auto;
-}
-
-.full-bleed {
- grid-column: 1/4;
-}
-
-.h1 {
- font-size: 2.5rem;
-}
-
-.h2 {
- font-size: 2rem;
-}
-
-.h3 {
- font-size: 1.4rem;
-}
-
-.h4 {
- font-size: 1rem;
-}
-
-.h5 {
- font-size: 0.8rem;
-}
-
-.uppercase {
- text-transform: uppercase;
-}
-
-.capitalize {
- text-transform: capitalize;
-}
-
-.flex {
- display: flex;
-}
-
-.grid {
- display: grid;
-}
-
-.grid-3 {
- grid-template-columns: 1fr auto auto;
-}
-
-.flow-column {
- grid-auto-flow: column;
-}
-
-.gap-0-5 {
- gap: 0.5rem;
-}
-
-.gap-1 {
- gap: 1rem;
-}
-
-.gap-1-5 {
- gap: 1.5rem;
-}
-
-.gap-2 {
- gap: 2rem;
-}
-
-.gap-3 {
- gap: 3rem;
-}
-
-.text-align-right {
- text-align: right;
-}
-
-.align-start {
- align-items: flex-start;
-}
-
-.align-center {
- align-items: center;
-}
-
-.text-center {
- text-align: center;
-}
-
-.justify-start {
- justify-content: start;
-}
-
-.justify-center {
- justify-content: center;
-}
-
-.justify-right {
- margin-left: auto;
-}
-
-.align-self-center {
- align-self: center;
-}
-
-.justify-self-center {
- justify-self: center;
-}
-
-.justify-self-start {
- justify-self: start;
-}
-
-.justify-self-end {
- justify-self: end;
-}
-
-.direction-column {
- flex-direction: column;
-}
-
-.space-between {
- justify-content: space-between;
-}
-
-.w-100 {
- width: 100%;
-}
-
-.color-0-8 {
- color: rgba(var(--text-color), 0.8);
-}
-
-.weight-400 {
- font-weight: 400;
-}
-
-.weight-500 {
- font-weight: 500;
-}
-
-.ripple {
- position: absolute;
- border-radius: 50%;
- transform: scale(0);
- background: rgba(var(--text-color), 0.16);
- pointer-events: none;
-}
-
-.interact {
- position: relative;
- overflow: hidden;
- cursor: pointer;
- -webkit-tap-highlight-color: transparent;
-}
-
-.observe-empty-state:empty {
- display: none;
-}
-
-.observe-empty-state:not(:empty)~.empty-state {
- display: none;
+.cta {
+ text-transform: uppercase;
+ font-size: 0.8rem;
+ font-weight: 700;
+ letter-spacing: 0.05em;
+ padding: 0.8rem 1rem;
}
.icon {
- width: 1.5rem;
- height: 1.5rem;
- fill: rgba(var(--text-color), 0.9);
+ width: 1.2rem;
+ height: 1.2rem;
+ fill: rgba(var(--text-color), 0.8);
+ flex-shrink: 0;
+}
+
+.icon-only {
+ padding: 0.5rem;
+ border-radius: 0.3rem;
+ aspect-ratio: 1/1;
+}
+
+button:disabled {
+ opacity: 0.5;
+}
+
+a:any-link:focus-visible {
+ outline: rgba(var(--text-color), 1) 0.1rem solid;
+}
+
+details summary {
+ display: flex;
+ user-select: none;
+ cursor: pointer;
+ align-items: center;
+ justify-content: space-between;
+ color: var(--accent-color);
+}
+
+details[open] {
+ & summary {
+ margin-bottom: 1rem;
+ }
+
+ & > summary .down-arrow {
+ transform: rotate(180deg);
+ }
+}
+
+fieldset {
+ border: none;
+}
+
+input {
+ accent-color: var(--accent-color);
+
+ &[type="range"] {
+ &:active {
+ cursor: grab;
+ }
+ }
+}
+
+sm-copy {
+ font-size: 0.9rem;
+}
+
+sm-input,
+sm-textarea {
+ font-size: 0.9rem;
+ --border-radius: 0.5rem;
+ --background-color: rgba(var(--foreground-color), 1);
+
+ button {
+ .icon {
+ fill: var(--accent-color);
+ }
+ }
+}
+
+sm-textarea {
+ --max-height: 32ch;
+}
+
+sm-button {
+ --padding: 0.8rem;
+
+ &[variant="primary"] {
+ .icon {
+ fill: rgba(var(--background-color), 1);
+ }
+ }
+
+ &[disabled] {
+ .icon {
+ fill: rgba(var(--text-color), 0.6);
+ }
+ }
+
+ &.danger {
+ --background: var(--danger-color);
+ color: rgba(var(--background-color), 1);
+ }
+}
+
+sm-spinner {
+ --size: 1rem;
+ --stroke-width: 0.1rem;
+}
+
+sm-form {
+ --gap: 1rem;
+}
+
+sm-select {
+ --padding: 0.8rem;
+ font-size: 0.9rem;
+}
+
+sm-option {
+ font-size: 0.9rem;
+}
+
+strip-select {
+ --gap: 0;
+ background-color: rgba(var(--text-color), 0.06);
+ border-radius: 0.3rem;
+ padding: 0.3rem;
+}
+
+strip-option {
+ position: relative;
+ font-size: 0.8rem;
+ --border-radius: 0.2rem;
+ user-select: none;
+}
+
+sm-button {
+ --border-radius: 0.3rem;
+
+ &[variant="primary"] {
+ .icon {
+ fill: rgba(var(--background-color), 1);
+ }
+ }
+
+ &[disabled] {
+ .icon {
+ fill: rgba(var(--text-color), 0.6);
+ }
+ }
+}
+sm-select {
+ &[open] {
+ z-index: 10;
+ }
+}
+
+ul {
+ list-style: none;
+}
+
+.overflow-ellipsis {
+ width: 100%;
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+}
+
+.wrap-around {
+ overflow-wrap: break-word;
+ word-wrap: break-word;
+ word-break: break-word;
+ hyphens: auto;
+}
+
+.full-bleed {
+ grid-column: 1/-1;
+}
+
+.uppercase {
+ text-transform: uppercase;
+}
+
+.capitalize {
+ text-transform: capitalize;
+}
+
+.sticky {
+ position: sticky;
+}
+
+.top-0 {
+ top: 0;
+}
+
+.flex {
+ display: flex;
+}
+
+.flex-wrap {
+ flex-wrap: wrap;
+}
+
+.flex-1 {
+ flex: 1;
+}
+
+.grid {
+ display: grid;
+}
+
+.flow-column {
+ grid-auto-flow: column;
+}
+
+.gap-0-3 {
+ gap: 0.3rem;
+}
+
+.gap-0-5 {
+ gap: 0.5rem;
+}
+
+.gap-1 {
+ gap: 1rem;
+}
+
+.gap-1-5 {
+ gap: 1.5rem;
+}
+
+.gap-2 {
+ gap: 2rem;
+}
+
+.gap-3 {
+ gap: 3rem;
+}
+
+.text-align-right {
+ text-align: right;
+}
+
+.align-items-start {
+ align-items: flex-start;
+}
+
+.align-start {
+ align-content: flex-start;
+}
+
+.align-center {
+ align-items: center;
+}
+
+.align-end {
+ align-items: flex-end;
+}
+
+.text-center {
+ text-align: center;
+}
+
+.justify-start {
+ justify-items: start;
+}
+
+.justify-center {
+ justify-content: center;
+}
+
+.justify-right {
+ margin-left: auto;
+}
+
+.align-self-center {
+ align-self: center;
+}
+
+.align-self-end {
+ align-self: end;
+}
+
+.justify-self-center {
+ justify-self: center;
+}
+
+.justify-self-start {
+ justify-self: start;
+}
+
+.justify-self-end {
+ justify-self: end;
+}
+
+.flex-direction-column {
+ flex-direction: column;
+}
+
+.space-between {
+ justify-content: space-between;
+}
+
+.w-100 {
+ width: 100%;
+}
+
+.h-100 {
+ height: 100%;
+}
+
+.margin-right-0-3 {
+ margin-right: 0.3rem;
+}
+.margin-right-0-5 {
+ margin-right: 0.5rem;
+}
+
+.margin-left-0-5 {
+ margin-left: 0.5rem;
+}
+
+.margin-left-auto {
+ margin-left: auto;
+}
+.margin-right-auto {
+ margin-right: auto;
+}
+
+.margin-bottom-0-5 {
+ margin-bottom: 0.5rem;
+}
+.margin-bottom-1 {
+ margin-bottom: 1rem;
+}
+.margin-bottom-2 {
+ margin-bottom: 2rem;
+}
+
+.margin-block-1 {
+ margin-block: 1rem;
+}
+
+.margin-block-1-5 {
+ margin-block: 1.5rem;
+}
+
+.margin-inline-1 {
+ margin-inline: 1rem;
+}
+
+.margin-inline-1-5 {
+ margin-inline: 1.5rem;
+}
+
+.hidden {
+ display: none !important;
+}
+
+.no-transformations {
+ transform: none !important;
+}
+
+.full-bleed {
+ grid-column: 1/4;
+}
+
+.h1 {
+ font-size: 2.5rem;
+}
+
+.h2 {
+ font-size: 2rem;
+}
+
+.h3 {
+ font-size: 1.4rem;
+}
+
+.h4 {
+ font-size: 1rem;
+}
+
+.h5 {
+ font-size: 0.8rem;
+}
+
+.grid-3 {
+ grid-template-columns: 1fr auto auto;
+}
+
+.flow-column {
+ grid-auto-flow: column;
+}
+.w-100 {
+ width: 100%;
+}
+
+.color-0-8 {
+ color: rgba(var(--text-color), 0.8);
+}
+
+.weight-400 {
+ font-weight: 400;
+}
+
+.weight-500 {
+ font-weight: 500;
+}
+
+.ripple {
+ height: 8rem;
+ width: 8rem;
+ position: absolute;
+ border-radius: 50%;
+ transform: scale(0);
+ background: radial-gradient(
+ circle,
+ rgba(var(--text-color), 0.3) 0%,
+ rgba(0, 0, 0, 0) 50%
+ );
+ pointer-events: none;
+}
+.interact {
+ position: relative;
+ overflow: hidden;
+ cursor: pointer;
+ -webkit-tap-highlight-color: transparent;
+}
+
+.observe-empty-state:empty {
+ display: none;
+}
+
+.observe-empty-state:not(:empty) ~ .empty-state {
+ display: none;
}
.button__icon {
- height: 1.2rem;
- width: 1.2rem;
+ height: 1.2rem;
+ width: 1.2rem;
- &--left {
- margin-right: 0.5rem;
- }
+ &--left {
+ margin-right: 0.5rem;
+ }
- &--right {
- margin-left: 0.5rem;
- }
+ &--right {
+ margin-left: 0.5rem;
+ }
+}
+
+[data-editable] {
+ transition: padding 0.2s;
+ &:focus-within {
+ padding: 0.5em;
+ border-radius: 0.3rem;
+ outline: none;
+ background-color: rgba(var(--text-color), 0.06);
+ box-shadow: 0 0 0 0.1rem var(--accent-color) inset;
+ }
}
#confirmation_popup,
#prompt_popup {
- flex-direction: column;
+ flex-direction: column;
- h4 {
- font-weight: 500;
- margin-bottom: 0.5rem;
- }
-
- sm-button {
- margin: 0;
- }
-
- .flex {
- padding: 0;
- margin-top: 1rem;
-
- sm-button:first-of-type {
- margin-right: 0.6rem;
- margin-left: auto;
- }
+ h4 {
+ font-weight: 500;
+ margin-bottom: 0.5rem;
+ }
+
+ sm-button {
+ margin: 0;
+ }
+
+ .flex {
+ padding: 0;
+ margin-top: 1rem;
+
+ sm-button:first-of-type {
+ margin-right: 0.6rem;
+ margin-left: auto;
}
+ }
}
.popup__header {
- display: grid;
- gap: 0.5rem;
- width: 100%;
- padding: 0 1.5rem 0 0.5rem;
- align-items: center;
- grid-template-columns: auto 1fr auto;
+ display: grid;
+ gap: 0.5rem;
+ width: 100%;
+ padding: 0 1.5rem 0 0.5rem;
+ align-items: center;
+ grid-template-columns: auto 1fr auto;
}
.popup__header__close {
- padding: 0.5rem;
- cursor: pointer;
+ padding: 0.5rem;
+ cursor: pointer;
}
#main_page {
- height: 100%;
- grid-template-rows: auto 1fr auto;
- grid-template-areas: 'main-header''sub-pages''main-nav';
+ height: 100%;
+ grid-template-rows: auto 1fr auto;
+ grid-template-areas: "main-header" "sub-pages" "main-nav";
}
#main_header {
- grid-area: main-header;
- display: flex;
- gap: 1rem;
- align-items: center;
- position: sticky;
- padding: 0.5rem 1rem;
- background: var(--foreground-color);
- z-index: 1;
+ grid-area: main-header;
+ display: flex;
+ gap: 1rem;
+ align-items: center;
+ position: sticky;
+ padding: 0.5rem 1rem;
+ background: rgba(var(--foreground-color), 1);
+ z-index: 1;
}
#main_nav {
- grid-area: main-nav;
- position: relative;
- display: flex;
- align-items: center;
- background-color: var(--foreground-color);
+ grid-area: main-nav;
+ position: relative;
+ display: flex;
+ align-items: center;
+ background-color: rgba(var(--foreground-color), 1);
}
.nav-list__item {
- display: flex;
- flex-direction: column;
- align-items: center;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
- width: 100%;
- padding: 0.5rem 0;
- -webkit-tap-highlight-color: transparent;
+ width: 100%;
+ padding: 0.5rem 0;
+ -webkit-tap-highlight-color: transparent;
- font-size: 0.8rem;
- font-weight: 500;
- color: rgba(var(--text-color), 0.8);
+ font-size: 0.8rem;
+ font-weight: 500;
+ color: rgba(var(--text-color), 0.8);
- &--active {
- color: var(--accent-color);
-
- .icon {
- fill: var(--accent-color);
- }
- .icon--outlined{
- display: none;
- }
- .icon--filled{
- display: inline-block;
- }
- }
- &:not(.nav-list__item--active) {
- .icon--outlined{
- display: inline-block;
- }
- .icon--filled{
- display: none;
- }
- }
+ &--active {
+ color: var(--accent-color);
.icon {
- margin-bottom: 0.3rem;
+ fill: var(--accent-color);
}
+ .icon--outlined {
+ display: none;
+ }
+ .icon--filled {
+ display: inline-block;
+ }
+ }
+ &:not(.nav-list__item--active) {
+ .icon--outlined {
+ display: inline-block;
+ }
+ .icon--filled {
+ display: none;
+ }
+ }
+
+ .icon {
+ margin-bottom: 0.3rem;
+ }
}
#sub_page_container {
- grid-area: sub-pages;
- height: 100%;
- overflow-y: auto;
+ grid-area: sub-pages;
+ height: 100%;
+ overflow-y: auto;
}
.container-card {
- position: relative;
- background: var(--foreground-color);
- border-radius: 0.5rem;
+ position: relative;
+ background: rgba(var(--foreground-color), 1);
+ border-radius: 0.5rem;
}
.medium-top-bottom-margin {
- margin: 0.5rem 0;
+ margin: 0.5rem 0;
}
#sign_in_page {
- display: grid;
- position: fixed;
- z-index: 5;
- top: 0;
- bottom: 0;
- left: 0;
- right: 0;
- place-content: center;
- background-color: var(--foreground-color);
- gap: 1rem;
+ display: grid;
+ position: fixed;
+ z-index: 5;
+ top: 0;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ place-content: center;
+ background-color: rgba(var(--foreground-color), 1);
+ gap: 1rem;
}
#sign_in_form {
- width: 22rem;
+ width: 22rem;
}
-
.task {
- display: grid;
- grid-template-columns: auto 1fr;
- margin: 0 1rem;
- .task__branch_container{
- padding-bottom: 2rem;
- }
+ display: grid;
+ grid-template-columns: auto 1fr;
+ margin: 0 1rem;
+ .task__branch_container {
+ padding-bottom: 2rem;
+ }
}
.task:last-of-type .left .line {
- transform: scaleY(0);
+ transform: scaleY(0);
}
.task .left {
- display: flex;
- position: relative;
- justify-content: center;
- padding-top: 0.5rem;
+ display: flex;
+ position: relative;
+ justify-content: center;
+ padding-top: 0.5rem;
}
.task .left .circle {
- display: inline-flex;
- position: relative;
- align-self: flex-start;
- height: 1rem;
- width: 1rem;
- border-radius: 50%;
- background: var(--foreground-color);
- border: solid 2px rgba(var(--text-color), 0.4);
- z-index: 1;
+ display: inline-flex;
+ position: relative;
+ align-self: flex-start;
+ height: 1rem;
+ width: 1rem;
+ border-radius: 50%;
+ background: rgba(var(--foreground-color), 1);
+ border: solid 2px rgba(var(--text-color), 0.4);
+ z-index: 1;
}
.task .left .line {
- position: absolute;
- left: 50%;
- height: 100%;
- width: 2px;
- transform: translateX(-50%) scaleY(1);
- background-color: rgba(var(--text-color), 0.4);
+ position: absolute;
+ left: 50%;
+ height: 100%;
+ width: 2px;
+ transform: translateX(-50%) scaleY(1);
+ background-color: rgba(var(--text-color), 0.4);
}
.task .right {
- margin-left: 1rem;
- display: flex;
- flex-direction: column;
- width: 100%;
+ margin-left: 1rem;
+ display: flex;
+ flex-direction: column;
+ width: 100%;
}
.task .right .apply-cont {
- width: 100%;
- display: flex;
- flex-direction: row;
+ width: 100%;
+ display: flex;
+ flex-direction: row;
}
.task .right .apply-cont h4 {
- -webkit-box-flex: 1;
- -ms-flex: 1;
- flex: 1;
+ -webkit-box-flex: 1;
+ -ms-flex: 1;
+ flex: 1;
}
.task h4 {
- margin-top: 0.4rem;
- margin-bottom: 1rem;
+ margin-top: 0.4rem;
+ margin-bottom: 1rem;
}
-.timeline-task__description{
- white-space: pre-line;
+.timeline-task__description {
+ white-space: pre-line;
}
-
.task .assigned-interns .assigned-intern {
- padding: 0.4rem;
+ padding: 0.4rem;
}
.completed-task .left .circle {
- border: solid 2px #00C853 !important;
- background: #00C853 !important;
+ border: solid 2px #00c853 !important;
+ background: #00c853 !important;
}
.completed-task .left .line {
- background-color: #00C853 !important;
+ background-color: #00c853 !important;
}
.page {
- gap: 1rem;
- display: grid;
- position: relative;
- padding: 1rem;
- animation: fadein 0.3s;
- grid-template-columns: minmax(0, 1fr);
+ gap: 1rem;
+ display: grid;
+ position: relative;
+ padding: 1rem;
+ animation: fadein 0.3s;
+ grid-template-columns: minmax(0, 1fr);
}
@keyframes fadein {
- 0% {
- opacity: 0;
- }
+ 0% {
+ opacity: 0;
+ }
- 100% {
- opacity: 1;
- }
+ 100% {
+ opacity: 1;
+ }
}
.task-title {
- font-weight: 500;
+ font-weight: 500;
}
.padding {
- padding: 1rem;
+ padding: 1rem;
}
#dashboard_page {
- padding-bottom: 5rem;
- grid-template-columns: auto;
+ padding-bottom: 5rem;
+ grid-template-columns: auto;
}
.logo {
- display: flex;
- align-items: center;
- font-size: 1.2rem;
- width: 100%;
+ display: flex;
+ align-items: center;
+ font-size: 1.2rem;
+ width: 100%;
}
.logo .cls-2,
.logo .cls-3 {
- fill: rgba(var(--text-color), 1);
- font-size: 146.9px;
- font-family: ArialMT, Arial;
+ fill: rgba(var(--text-color), 1);
+ font-size: 146.9px;
+ font-family: ArialMT, Arial;
}
.logo svg {
- height: 2.5rem;
+ height: 2.5rem;
}
.logo h4 {
- margin: 0;
+ margin: 0;
}
.project-card {
- padding: 1rem;
- font-weight: 500;
- line-height: 1.5;
- text-transform: capitalize;
- color: rgba(var(--text-color), 0.8);
+ padding: 1rem;
+ font-weight: 500;
+ line-height: 1.5;
+ text-transform: capitalize;
+ color: rgba(var(--text-color), 0.8);
}
.intern-card {
- user-select: none;
- padding: 0.8rem 1rem;
- gap: 0.8rem;
- grid-template-columns: auto 1fr auto;
+ user-select: none;
+ padding: 0.8rem 1rem;
+ gap: 0.8rem;
+ grid-template-columns: auto 1fr auto;
}
-.intern-card__initials{
- display: flex;
- height: 2.6rem;
- width: 2.6rem;
- justify-content: center;
- align-items: center;
- border-radius: 40%;
- color: white;
- font-weight: 500;
- font-size: 1rem;
- text-transform: uppercase;
- background-color: var(--accent-color);
+.intern-card__initials {
+ display: flex;
+ height: 2.6rem;
+ width: 2.6rem;
+ justify-content: center;
+ align-items: center;
+ border-radius: 40%;
+ color: white;
+ font-weight: 500;
+ font-size: 1rem;
+ text-transform: uppercase;
+ background-color: var(--accent-color);
}
.intern-card__score-wrapper {
- font-weight: 500;
- font-size: 1.2rem;
+ font-weight: 500;
+ font-size: 1.2rem;
}
.intern-card .icon {
- fill: #FF5722 !important;
- height: 1rem !important;
- width: 1rem !important;
- margin-left: 0.2rem;
+ fill: #ff5722 !important;
+ height: 1rem !important;
+ width: 1rem !important;
+ margin-left: 0.2rem;
}
.request-card {
- display: grid;
- position: relative;
- padding: 1rem;
- sm-button{
- --padding: 0.5rem 0.8rem;
- }
+ display: grid;
+ position: relative;
+ padding: 1rem;
+ sm-button {
+ --padding: 0.5rem 0.8rem;
+ }
}
-.request-card__description{
- width: 100%;
- font-size: 1rem;
- margin-bottom: 1rem;
+.request-card__description {
+ width: 100%;
+ font-size: 1rem;
+ margin-bottom: 1rem;
}
-.reject-app{
- margin-left: auto;
- margin-right: 0.5rem;
+.reject-app {
+ margin-left: auto;
+ margin-right: 0.5rem;
}
-#updates_page{
- sm-select{
- --max-height: 50vh;
- }
+#updates_page {
+ sm-select {
+ --max-height: 50vh;
+ }
}
#updates {
- transition: opacity 0.3s ease;
+ transition: opacity 0.3s ease;
}
-#updates_page__project_selector{
- strip-option{
- font-size: 0.9rem;
- }
+#updates_page__project_selector {
+ strip-option {
+ font-size: 0.9rem;
+ }
}
-#all_updates_list{
+#all_updates_list {
}
.intern-update {
- display: grid;
- gap: 0.5rem;
- padding: 1rem;
- border-radius: 0.5rem;
- background-color: var(--foreground-color);
+ display: grid;
+ gap: 0.5rem;
+ padding: 1rem;
+ border-radius: 0.5rem;
+ background-color: rgba(var(--foreground-color), 1);
}
.update__topic {
- font-weight: 500;
- font-size: 1rem;
- margin-top: 0.5rem;
- text-transform: capitalize;
- max-width: 65ch;
+ font-weight: 500;
+ font-size: 1rem;
+ margin-top: 0.5rem;
+ text-transform: capitalize;
+ max-width: 65ch;
}
.update__sender {
- color: var(--accent-color);
- font-size: 0.9rem;
- font-weight: 500;
+ color: var(--accent-color);
+ font-size: 0.9rem;
+ font-weight: 500;
}
.update__time {
- font-size: 0.85rem;
- color: rgba(var(--text-color), 0.8);
+ font-size: 0.85rem;
+ color: rgba(var(--text-color), 0.8);
}
.update__message {
- white-space: pre-line;
+ white-space: pre-line;
}
.container-header {
- display: flex;
- align-items: center;
- width: 100%;
- padding: 1rem;
+ display: flex;
+ align-items: center;
+ width: 100%;
+ padding: 1rem;
}
.container-header h4 {
- flex: 1;
- font-weight: 500;
+ flex: 1;
+ font-weight: 500;
}
#intern_info_popup {
- .grid{
- & > *{
- justify-self: center;
- }
- }
- #update_intern_score{
- width: 100%;
- margin-top: 1rem;
+ .grid {
+ & > * {
+ justify-self: center;
}
+ }
+ #update_intern_score {
+ width: 100%;
+ margin-top: 1rem;
+ }
}
-#intern_info__initials{
- margin-bottom: 1rem;
- position: relative;
- height: 3rem;
- width: 3rem;
- font-size: 1.3rem;
- &::before{
- content: '';
- position: absolute;
- background-color: inherit;
- border-radius: inherit;
- height: calc(100% + 1.5rem);
- width: calc(100% + 1.5rem);
- opacity: 0.3;
- z-index: -1;
- }
+#intern_info__initials {
+ margin-bottom: 1rem;
+ position: relative;
+ height: 3rem;
+ width: 3rem;
+ font-size: 1.3rem;
+ &::before {
+ content: "";
+ position: absolute;
+ background-color: inherit;
+ border-radius: inherit;
+ height: calc(100% + 1.5rem);
+ width: calc(100% + 1.5rem);
+ opacity: 0.3;
+ z-index: -1;
+ }
}
-#intern_info__name{
- font-size: 1.5rem;
- margin-bottom: 0.5rem;
+#intern_info__name {
+ font-size: 1.5rem;
+ margin-bottom: 0.5rem;
}
.gold-fill {
- fill: #FF5722;
+ fill: #ff5722;
}
-#intern_info__score{
- font-size: 1.5rem;
+#intern_info__score {
+ font-size: 1.5rem;
}
#project_info {
- flex-direction: column;
+ flex-direction: column;
}
.branch-button {
- margin-bottom: 0.5rem;
- display: flex;
- border-radius: 0;
- padding: 0.5rem;
- border-radius: 0.2rem;
- text-transform: capitalize;
- justify-self: start;
- align-items: center;
- user-select: none;
- font-size: 0.85rem;
- font-weight: 500;
- .icon{
- height: 1.2rem;
- width: 1.2rem;
- }
+ margin-bottom: 0.5rem;
+ display: flex;
+ border-radius: 0;
+ padding: 0.5rem;
+ border-radius: 0.2rem;
+ text-transform: capitalize;
+ justify-self: start;
+ align-items: center;
+ user-select: none;
+ font-size: 0.85rem;
+ font-weight: 500;
}
.active-branch {
- opacity: 1;
- color: white;
- background: var(--accent-color);
+ opacity: 1;
+ color: white;
+ background: var(--accent-color);
}
-#task_list{
- padding: 1rem 0 1.5rem 0;
+#task_list {
+ padding: 1rem 0 1.5rem 0;
}
.task-list-item {
- display: grid;
- grid-template-columns: auto 1fr auto;
- grid-template-areas: 'status title options'
- 'status interns interns'
- 'status description description'
- 'status . .';
- align-content: flex-start;
- padding: 1rem;
- gap: 0.5rem;
- border-radius: 0.5rem;
- background: rgba(var(--text-color), 0.02);
- sm-checkbox {
- grid-area: status;
- align-self: flex-start;
- padding: 0.2rem 0.5rem 0.5rem 0;
- }
- h4 {
- font-weight: 500;
- margin: 0;
- }
-
- .task-title {
- grid-area: title;
- line-height: 1.6;
- }
- .assigned-interns {
- grid-area: interns;
- }
+ display: grid;
+ grid-template-columns: auto 1fr auto;
+ grid-template-areas:
+ "status title options"
+ "status interns interns"
+ "status description description"
+ "status . .";
+ align-content: flex-start;
+ padding: 1rem;
+ gap: 0.5rem;
+ border-radius: 0.5rem;
+ background: rgba(var(--text-color), 0.02);
+ sm-checkbox {
+ grid-area: status;
+ align-self: flex-start;
+ padding: 0.2rem 0.5rem 0.5rem 0;
+ }
+ h4 {
+ font-weight: 500;
+ margin: 0;
+ }
+
+ .task-title {
+ grid-area: title;
+ line-height: 1.6;
+ }
+ .assigned-interns {
+ grid-area: interns;
+ }
}
-.task__branch_container{
- &:not(:empty){
- display: grid;
- gap: 0.5rem;
- padding: 0.5rem 0;
+.task__branch_container {
+ &:not(:empty) {
+ display: grid;
+ gap: 0.5rem;
+ padding: 0.5rem 0;
+ }
+ .branch-button {
+ position: relative;
+ background-color: transparent;
+ padding: 0;
+ padding-left: 2rem;
+ margin: 0.5rem 0;
+ &::before {
+ position: absolute;
+ content: "";
+ top: -50%;
+ left: 0;
+ display: inline-flex;
+ width: 1rem;
+ height: 100%;
+ align-self: flex-start;
+ margin-right: 0.8rem;
+ border-left: solid;
+ border-bottom: solid;
+ border-width: 0.15rem;
+ border-color: rgba(var(--text-color), 0.6);
+ border-radius: 0 0 0 0.2rem;
}
- .branch-button{
- position: relative;
- background-color: transparent;
- padding: 0;
- padding-left: 2rem;
- margin: 0.5rem 0;
- &::before{
- position: absolute;
- content: '';
- top: -50%;
- left: 0;
- display: inline-flex;
- width: 1rem;
- height: 100%;
- align-self: flex-start;
- margin-right: 0.8rem;
- border-left: solid;
- border-bottom: solid;
- border-width: 0.15rem;
- border-color: rgba(var(--text-color), 0.6);
- border-radius: 0 0 0 0.2rem;
- }
- }
- .branch-button + .branch-button{
- &::before{
- top: calc(-50% - 1.5rem );
- height: calc(100% + 1.5rem);
- }
+ }
+ .branch-button + .branch-button {
+ &::before {
+ top: calc(-50% - 1.5rem);
+ height: calc(100% + 1.5rem);
}
+ }
}
.task-option {
- grid-area: options;
- transition: opacity 0.3s ease;
- padding: 0.5rem;
- .icon{
- height: 1.2rem;
- width: 1.2rem;
- }
+ grid-area: options;
+ transition: opacity 0.3s ease;
+ padding: 0.5rem;
}
-.task-description{
- grid-area: description;
- margin: 0;
- overflow-wrap: break-word;
- word-wrap: break-word;
- white-space: pre-line;
+.task-description {
+ grid-area: description;
+ margin: 0;
+ overflow-wrap: break-word;
+ word-wrap: break-word;
+ white-space: pre-line;
}
.assigned-interns {
- display: flex;
- flex-wrap: wrap;
- margin-bottom: 1rem;
+ display: flex;
+ flex-wrap: wrap;
+ margin-bottom: 1rem;
}
.assigned-interns .assigned-intern {
- user-select: none;
- display: flex;
- font-size: 0.8rem;
- margin: 0.2rem 0.5rem 0.2rem 0;
- padding: 0.2rem 0 0.2rem 0.4rem;
- border-radius: 0.2rem;
- border: 1px solid rgba(var(--text-color), 0.24);
- align-items: center;
- white-space: nowrap;
- text-transform: capitalize;
- button {
- padding: 0.2rem;
- .icon {
- height: 1rem;
- width: 1rem;
- }
+ user-select: none;
+ display: flex;
+ font-size: 0.8rem;
+ margin: 0.2rem 0.5rem 0.2rem 0;
+ padding: 0.2rem 0 0.2rem 0.4rem;
+ border-radius: 0.2rem;
+ border: 1px solid rgba(var(--text-color), 0.24);
+ align-items: center;
+ white-space: nowrap;
+ text-transform: capitalize;
+ button {
+ padding: 0.2rem;
+ .icon {
+ height: 1rem;
+ width: 1rem;
}
+ }
}
#task_context {
- position: absolute;
- top: 0;
- right: 0;
- margin: -1rem 1rem 0 1rem;
- list-style: none;
- padding: 0.5rem 0;
- width: max-content;
- border-radius: 0.3rem;
- transition: 0.3s opacity ease;
- background-color: var(--foreground-color);
- box-shadow: 0 0.5rem 1rem -0.3rem rgba(0, 0, 0, 0.3);
+ position: absolute;
+ top: 0;
+ right: 0;
+ margin: -1rem 1rem 0 1rem;
+ list-style: none;
+ padding: 0.5rem 0;
+ width: max-content;
+ border-radius: 0.3rem;
+ transition: 0.3s opacity ease;
+ background-color: rgba(var(--foreground-color), 1);
+ box-shadow: 0 0.5rem 1rem -0.3rem rgba(0, 0, 0, 0.3);
- li {
- padding: 0.8rem 1.5rem;
- display: flex;
- align-items: center;
- font-size: 0.9rem;
- .icon {
- height: 1.2rem;
- width: 1.2rem;
- margin-right: 0.5rem;
- }
+ li {
+ padding: 0.8rem 1.5rem;
+ display: flex;
+ align-items: center;
+ font-size: 0.9rem;
+ .icon {
+ margin-right: 0.5rem;
}
+ }
}
.temp-task {
- .cancel-task-button{
- margin-right: 0.5rem;
- }
-}
-#editing_panel__description{
- margin-bottom: 2rem;
+ .cancel-task-button {
+ margin-right: 0.5rem;
+ }
}
#branch_container {
- display: flex;
- flex-flow: row wrap;
- margin: 0.5rem 0 1rem 0;
+ display: flex;
+ flex-flow: row wrap;
+ margin: 0.5rem 0 1rem 0;
}
#intern_list_popup {
- flex-direction: column;
+ flex-direction: column;
}
-#intern_search_field{
- margin-bottom: 1rem;
+#intern_search_field {
+ margin-bottom: 1rem;
}
#intern_list_container {
- height: 100%;
- overflow-y: auto;
+ height: 100%;
+ overflow-y: auto;
}
#best_interns_container,
#project_list_container {
- margin-bottom: 1rem;
+ margin-bottom: 1rem;
}
#best_interns_container .container-header .icon,
#project_list_container .container-header .icon {
- margin-right: 0.5rem;
+ margin-right: 0.5rem;
}
#edit_data_fig {
- fill: rgba(var(--text-color), 0.6);
- width: 60vw;
- margin: 2rem 0;
+ fill: rgba(var(--text-color), 0.6);
+ width: 60vw;
+ margin: 2rem 0;
}
#loading_page {
- display: grid;
- position: fixed;
- top: 0;
- bottom: 0;
- left: 0;
- right: 0;
- z-index: 5;
- text-align: center;
- place-content: center;
- justify-items: center;
- background-color: var(--foreground-color);
+ display: grid;
+ position: fixed;
+ top: 0;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ z-index: 5;
+ text-align: center;
+ place-content: center;
+ justify-items: center;
+ background-color: rgba(var(--foreground-color), 1);
}
.loading-message {
- font-size: 1.3rem;
- margin: 1.5rem 0 0.5rem 0;
+ font-size: 1.3rem;
+ margin: 1.5rem 0 0.5rem 0;
}
#loading_page__footer {
- position: absolute;
- bottom: 0;
- width: 100%;
- padding: 1.5rem;
+ position: absolute;
+ bottom: 0;
+ width: 100%;
+ padding: 1.5rem;
- .icon {
- height: 4rem;
- width: 4rem;
- }
+ .icon {
+ height: 4rem;
+ width: 4rem;
+ }
}
#project_watching_section {
- position: relative;
- overflow: hidden;
+ position: relative;
+ overflow: hidden;
}
#project_explorer {
- padding: 0;
+ padding: 0;
}
#project_explorer__right {
- gap: 1rem;
- align-items: flex-start;
- align-content: flex-start;
- padding: 1rem;
+ gap: 1rem;
+ align-items: flex-start;
+ align-content: flex-start;
+ padding: 1rem;
}
-#explorer_branch_container{
- margin-top: 1.5rem;
+#explorer_branch_container {
+ margin-top: 1.5rem;
}
-#watch_project_button{
- margin-left: 1rem;
- text-transform: capitalize;
+#watch_project_button {
+ margin-left: 1rem;
+ text-transform: capitalize;
}
-
#admin_page {
- position: relative;
- display: grid;
- gap: 0;
- padding: 0;
- height: 100%;
+ position: relative;
+ display: grid;
+ gap: 0;
+ padding: 0;
+ height: 100%;
}
#project_editing_panel {
- position: relative;
- padding: 1rem 0;
- height: 100%;
- overflow-y: auto;
-}
-#editing_panel__title{
- margin-bottom: 1rem;
+ position: relative;
+ padding: 1rem 0;
+ height: 100%;
+ overflow-y: auto;
}
-.fab-actions{
- display: grid;
- gap: 1rem;
+.fab-actions {
+ display: grid;
+ gap: 1rem;
+ position: absolute;
+ bottom: 0;
+ right: 0;
+ margin: 1rem;
+ justify-items: end;
+ text-align: end;
+ z-index: 5;
+ &[open] {
+ .fab-actions__item {
+ transform: translateY(0);
+ opacity: 1;
+ }
+ .fab {
+ .icon {
+ &:nth-of-type(1) {
+ transform: scale(0) rotate(180deg);
+ }
+ &:nth-of-type(2) {
+ transform: scale(1) rotate(0);
+ }
+ }
+ }
+ & ~ #fab_backdrop {
+ opacity: 1;
+ clip-path: circle(100%);
+ }
+ }
+}
+.fab-actions__item {
+ display: flex;
+ align-items: center;
+ justify-self: end;
+ padding: 0.6rem 1rem;
+ border-radius: 2rem;
+ transform: translateY(1.5rem);
+ background-color: rgba(var(--foreground-color), 1);
+ opacity: 0;
+ transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275),
+ opacity 0.3s;
+ box-shadow: 0 0.2rem 0.5rem rgba(0, 0, 0, 0.2);
+ user-select: none;
+ &:hover,
+ &:active {
+ transform: scale(0.9);
+ }
+ &:nth-of-type(1) {
+ transition-delay: 0.2s;
+ }
+ &:nth-of-type(2) {
+ transition-delay: 0.1s;
+ }
+ .icon {
+ fill: var(--accent-color);
+ margin-left: 0.5rem;
+ }
+ &-name {
+ font-size: 0.9rem;
+ }
+}
+.fab {
+ position: relative;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ padding: 1rem;
+ height: 3.2rem;
+ width: 3.2rem;
+ border-radius: 50%;
+ background-color: var(--accent-color);
+ box-shadow: 0 0.5rem 0.8rem rgba(0, 0, 0, 0.3);
+ transition: transform 0.3s;
+ -webkit-tap-highlight-color: transparent;
+ &:active {
+ transform: scale(0.9);
+ }
+ .icon {
position: absolute;
- bottom: 0;
- right: 0;
- margin: 1rem;
- justify-items: end;
- text-align: end;
- z-index: 5;
- &[open]{
- .fab-actions__item{
- transform: translateY(0);
- opacity: 1;
- }
- .fab{
- .icon{
- &:nth-of-type(1){
- transform: scale(0) rotate(180deg);
- }
- &:nth-of-type(2){
- transform: scale(1) rotate(0);
- }
- }
- }
- & ~ #fab_backdrop{
- opacity: 1;
- clip-path: circle(100%);
- }
- }
-}
-.fab-actions__item{
- display: flex;
- align-items: center;
- justify-self: end;
- padding: 0.6rem 1rem;
- border-radius: 2rem;
- transform: translateY(1.5rem);
- background-color: var(--foreground-color);
- opacity: 0;
- transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s;
- box-shadow: 0 0.2rem 0.5rem rgba(0, 0, 0, 0.2);
- user-select: none;
- &:hover,
- &:active{
- transform: scale(0.9);
- }
- &:nth-of-type(1){
- transition-delay: 0.2s;
- }
- &:nth-of-type(2){
- transition-delay: 0.1s;
- }
- .icon{
- fill: var(--accent-color);
- margin-left: 0.5rem;
- }
- &-name{
- font-size: 0.9rem;
- }
-}
-.fab{
- position: relative;
- display: flex;
- justify-content: center;
- align-items: center;
- padding: 1rem;
- height: 3.2rem;
- width: 3.2rem;
- border-radius: 50%;
- background-color: var(--accent-color);
- box-shadow: 0 0.5rem 0.8rem rgba(0, 0, 0, 0.3);
+ height: 100%;
+ fill: white;
transition: transform 0.3s;
- -webkit-tap-highlight-color: transparent;
- &:active{
- transform: scale(0.9);
+ &:nth-of-type(1) {
+ transform: scale(1) rotate(0);
}
- .icon{
- position: absolute;
- height: 100%;
- fill: white;
- transition: transform 0.3s;
- &:nth-of-type(1){
- transform: scale(1) rotate(0);
- }
- &:nth-of-type(2){
- transform: scale(0) rotate(-180deg);
- }
+ &:nth-of-type(2) {
+ transform: scale(0) rotate(-180deg);
}
+ }
}
-#fab_backdrop{
- position: fixed;
- z-index: 3;
- top: 0;
- bottom: 0;
- left: 0;
- right: 0;
- opacity: 0;
- clip-path: circle(0% at 100% 100%);
- transition: clip-path 0.5s, opacity 0.5s;
- background-color: rgba(0, 0, 0, 0.5);
+#fab_backdrop {
+ position: fixed;
+ z-index: 3;
+ top: 0;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ opacity: 0;
+ clip-path: circle(0% at 100% 100%);
+ transition: clip-path 0.5s, opacity 0.5s;
+ background-color: rgba(0, 0, 0, 0.5);
}
#update_of_project {
- color: rgba(var(--text-color), 0.8);
+ color: rgba(var(--text-color), 0.8);
}
#update_of_task {
- font-size: 1.3rem;
- margin: 0.4rem 0 1.8rem 0;
+ font-size: 1.3rem;
+ margin: 0.4rem 0 1.8rem 0;
}
ul {
- padding: 0;
- list-style: none;
+ padding: 0;
+ list-style: none;
}
-#intern_view{
+#intern_view {
}
#assigned_task_list {
- display: grid;
- gap: 1rem;
- margin-top: 1rem;
- align-content: flex-start;
- grid-template-columns: minmax(0, 1fr);
+ display: grid;
+ gap: 1rem;
+ margin-top: 1rem;
+ align-content: flex-start;
+ grid-template-columns: minmax(0, 1fr);
}
.task-card {
- display: grid;
- padding: 1rem;
- border-radius: 0.5rem;
- grid-template-columns: minmax(0, 1fr);
- background-color: var(--foreground-color);
+ display: grid;
+ padding: 1rem;
+ border-radius: 0.5rem;
+ grid-template-columns: minmax(0, 1fr);
+ background-color: rgba(var(--foreground-color), 1);
}
.task__header {
- display: grid;
- gap: 0 0.5rem;
- align-items: flex-start;
- grid-template-columns: 1fr auto;
- grid-template-areas: '. send-button''. send-button';
+ display: grid;
+ gap: 0 0.5rem;
+ align-items: flex-start;
+ grid-template-columns: 1fr auto;
+ grid-template-areas: ". send-button" ". send-button";
}
.task__project-title {
- font-size: 0.9rem;
- font-weight: 500;
- border-radius: 0.3rem;
- padding: 0.3rem 0.5rem;
- justify-self: flex-start;
- margin-bottom: 0.5rem !important;
- color: rgba(var(--text-color), 0.8);
- background-color: rgba(var(--text-color), 0.06);
+ font-size: 0.9rem;
+ font-weight: 500;
+ border-radius: 0.3rem;
+ padding: 0.3rem 0.5rem;
+ justify-self: flex-start;
+ margin-bottom: 0.5rem !important;
+ color: rgba(var(--text-color), 0.8);
+ background-color: rgba(var(--text-color), 0.06);
}
.task__title {
- font-size: 1.3rem;
- margin-bottom: 1rem !important;
+ font-size: 1.3rem;
+ margin-bottom: 1rem !important;
}
.task__description {
- word-wrap: break-word;
- overflow-wrap: break-word;
- white-space: pre-line;
- color: rgba(var(--text-color), 0.8);
+ word-wrap: break-word;
+ overflow-wrap: break-word;
+ white-space: pre-line;
+ color: rgba(var(--text-color), 0.8);
}
.send-update-button {
- grid-area: send-button;
- --padding: 0.6rem 0.8rem;
- color: var(--accent-color);
+ grid-area: send-button;
+ --padding: 0.6rem 0.8rem;
+ color: var(--accent-color);
- .icon {
- height: 1.2rem;
- width: 1.2rem;
- fill: var(--accent-color);
- }
+ .icon {
+ fill: var(--accent-color);
+ }
}
-#admin_page__left{
+#admin_page__left {
+ height: 100%;
+ overflow-y: hidden;
+ sm-tab-header {
+ --gap: 0;
+ --justify-content: stretch;
+ background-color: rgba(var(--foreground-color), 1);
+ border-bottom: 1px solid rgba(var(--text-color), 0.2);
+ }
+ sm-tab {
+ justify-content: center;
+ }
+ sm-tab-panels,
+ sm-tab-panels > * {
height: 100%;
+ flex-direction: column;
+ }
+ sm-tab-panels {
overflow-y: hidden;
- sm-tab-header{
- --gap: 0;
- --justify-content: stretch;
- background-color: var(--foreground-color);
- border-bottom: 1px solid rgba(var(--text-color), 0.2);
- }
- sm-tab{
- justify-content: center;
- }
- sm-tab-panels,
- sm-tab-panels > *{
- height: 100%;
- flex-direction: column;
- }
- sm-tab-panels{
- overflow-y: hidden;
- }
- sm-tab-panels > *{
- display: flex;
- }
- .list-container{
- height: 100%;
- overflow-y: auto;
- padding-bottom: 2rem;
- }
- .empty-state{
- padding: 1rem;
- text-align: center;
- }
-}
-#update_filters_wrapper{
- gap: 1.5rem;
-}
-input[type="date"]{
+ }
+ sm-tab-panels > * {
display: flex;
- width: 100%;
- padding: 0.5rem;
- border: rgba(var(--text-color), 0.2) solid thin;
- border-radius: 0.3rem;
- font-family: inherit;
- font-size: inherit;
- color: inherit;
- background-color: rgba(var(--text-color), 0.06);
- &:focus{
- outline: none;
- box-shadow: 0 0 0 0.1rem var(--accent-color);
- }
-}
-.search__icon{
- height: 1.2rem;
- width: 1.2rem;
-}
-#user_role{
- justify-self: start;
- font-size: 0.7rem;
- font-weight: 500;
- text-transform: uppercase;
- letter-spacing: 0.05em;
- padding: 0.4rem 0.8rem;
- border-radius: 0.3rem;
- border: solid var(--accent-color) thin;
-}
-#project_watching_section{
- display: grid;
- gap: 1rem;
-}
-#project_watchlist{
- display: grid;
- gap: 1rem;
- grid-template-columns: repeat(auto-fill, minmax(15rem ,1fr));
-
-}
-.watchlist_project_card{
- color: inherit;
- display: grid;
- border-radius: 0.5rem;
- grid-template-rows: auto 1fr;
- gap: 1rem;
+ }
+ .list-container {
+ height: 100%;
+ overflow-y: auto;
+ padding-bottom: 2rem;
+ }
+ .empty-state {
padding: 1rem;
- background-color: rgba(var(--text-color), 0.04);
- .project__title{
- font-size: 1.1rem;
- line-height: 1.5;
- }
+ text-align: center;
+ }
}
-.progress-bar{
- display: flex;
- height: 0.5rem;
- background-color: rgba(var(--text-color), 0.2);
- border-radius: 1rem;
- overflow: hidden;
- align-self: flex-end;
- .progress-value{
- background-color: var(--accent-color);
- transition: width 0.3s;
- }
+#update_filters_wrapper {
+ gap: 1.5rem;
}
-#username{
- margin-top: 1.5rem;
- margin-bottom: 0.5rem;
+input[type="date"] {
+ display: flex;
+ width: 100%;
+ padding: 0.5rem;
+ border: rgba(var(--text-color), 0.2) solid thin;
+ border-radius: 0.3rem;
+ font-family: inherit;
+ font-size: inherit;
+ color: inherit;
+ background-color: rgba(var(--text-color), 0.06);
+ &:focus {
+ outline: none;
+ box-shadow: 0 0 0 0.1rem var(--accent-color);
+ }
}
-#logout{
- margin-top: 1.5rem;
+.search__icon {
+ height: 1.2rem;
+ width: 1.2rem;
+}
+#user_role {
+ justify-self: start;
+ font-size: 0.7rem;
+ font-weight: 500;
+ text-transform: uppercase;
+ letter-spacing: 0.05em;
+ padding: 0.4rem 0.8rem;
+ border-radius: 0.3rem;
+ border: solid var(--accent-color) thin;
+}
+#project_watching_section {
+ display: grid;
+ gap: 1rem;
+}
+#project_watchlist {
+ display: grid;
+ gap: 1rem;
+ grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
+}
+.watchlist_project_card {
+ color: inherit;
+ display: grid;
+ border-radius: 0.5rem;
+ grid-template-rows: auto 1fr;
+ gap: 1rem;
+ padding: 1rem;
+ background-color: rgba(var(--text-color), 0.04);
+ .project__title {
+ font-size: 1.1rem;
+ line-height: 1.5;
+ }
+}
+.progress-bar {
+ display: flex;
+ height: 0.5rem;
+ background-color: rgba(var(--text-color), 0.2);
+ border-radius: 1rem;
+ overflow: hidden;
+ align-self: flex-end;
+ .progress-value {
+ background-color: var(--accent-color);
+ transition: width 0.3s;
+ }
+}
+#username {
+ margin-top: 1.5rem;
+ margin-bottom: 0.5rem;
+}
+#logout {
+ margin-top: 1.5rem;
}
@media only screen and (max-width: 640px) {
- .hide-on-mobile,
- .hide-page-on-mobile {
- display: none;
- }
- #project_editing_panel{
- padding: 1rem;
- }
- .list-container{
- padding-bottom: 5rem;
- }
+ .hide-on-mobile,
+ .hide-page-on-mobile {
+ display: none;
+ }
+ #project_editing_panel {
+ padding: 1rem;
+ }
+ .list-container {
+ padding-bottom: 5rem;
+ }
}
@media only screen and (min-width: 640px) {
- .hide-on-desktop {
- display: none !important;
+ .hide-on-desktop {
+ display: none !important;
+ }
+
+ sm-popup {
+ --width: 26rem;
+ }
+
+ .popup__header {
+ padding: 1.5rem 1.5rem 0 0.75rem;
+ }
+
+ #main_nav {
+ padding: 0.5rem;
+ background-color: rgba(var(--background-color), 1);
+ flex-direction: column;
+ theme-toggle {
+ margin: 1rem;
+ margin-top: auto;
+ }
+ }
+
+ .nav-list__item {
+ flex-direction: row;
+ align-items: center;
+
+ border-radius: 0.5rem;
+ padding: 0.8rem;
+ margin-bottom: 0.25rem;
+
+ font-size: 1rem;
+
+ &--active {
+ background-color: rgba(var(--text-color), 0.06);
}
- sm-popup {
- --width: 26rem;
+ .icon {
+ margin-bottom: 0;
}
+ &_title {
+ display: none;
+ }
+ }
+ .project-card {
+ &--active {
+ background-color: rgba(var(--text-color), 0.1);
+ }
+ }
+ .page {
+ background-color: rgba(var(--foreground-color), 1);
+ }
- .popup__header {
- padding: 1.5rem 1.5rem 0 0.75rem;
- }
+ #sign_in {
+ width: 24rem;
+ height: auto;
+ border-radius: 0.4rem;
+ }
- #main_nav {
- padding: 0.5rem;
- background-color: rgba(var(--background-color), 1);
- flex-direction: column;
- theme-toggle{
- margin: 1rem;
- margin-top: auto;
- }
- }
+ #dashboard_page {
+ grid-template-columns: 3fr 18rem;
+ }
- .nav-list__item {
- flex-direction: row;
- align-items: center;
+ #dashboard_page #project_watching_section {
+ align-self: flex-start;
+ }
+ #all_interns_page__header {
+ grid-template-columns: 1fr auto;
+ }
- border-radius: 0.5rem;
- padding: 0.8rem;
- margin-bottom: 0.25rem;
+ #admin_page {
+ padding: 1rem 0;
+ gap: 1rem;
+ grid-template-columns: 18rem minmax(0, 1fr);
+ grid-template-rows: 1fr;
+ }
+ #admin_page__left {
+ background-color: rgba(var(--foreground-color), 1);
+ }
+ #project_editing_panel {
+ padding-right: 1rem;
+ }
+ #admin_page__left,
+ #project_editing_panel {
+ border-radius: 0.5rem;
+ }
- font-size: 1rem;
+ #edit_data_fig {
+ width: 16rem;
+ justify-self: center;
+ }
- &--active {
- background-color: rgba(var(--text-color), 0.06);
- }
+ #project_explorer {
+ display: grid;
+ height: 100%;
+ grid-template-columns: 16rem 3fr;
+ grid-template-areas: "left right";
+ }
+ #project_explorer__left {
+ grid-area: left;
+ height: 100%;
+ overflow-y: auto;
+ padding-bottom: 1.5rem;
+ border-right: 1px solid rgba(var(--text-color), 0.06);
+ background-color: rgba(var(--background-color), 1);
+ }
- .icon {
- margin-bottom: 0;
- }
- &_title{
- display: none;
- }
- }
- .project-card {
- &--active{
- background-color: rgba(var(--text-color), 0.1);
- }
- }
- .page{
- background-color: var(--foreground-color);
- }
-
- #sign_in {
- width: 24rem;
- height: auto;
- border-radius: 0.4rem;
- }
+ #project_explorer__left h4 {
+ margin-top: 0;
+ margin-bottom: 0.5rem;
+ color: var(--accent-color);
+ font-size: 0.9rem;
+ }
- #dashboard_page {
- grid-template-columns: 3fr 18rem;
- }
+ #project_explorer__right {
+ grid-area: right;
+ height: 100%;
+ overflow-y: auto;
+ }
+ #main_page {
+ grid-template-columns: 4rem minmax(0, 1fr);
+ grid-template-areas: "main-header main-header" "main-nav sub-pages";
+ }
- #dashboard_page #project_watching_section {
- align-self: flex-start;
- }
- #all_interns_page__header{
- grid-template-columns: 1fr auto;
- }
-
- #admin_page {
- padding: 1rem 0;
- gap: 1rem;
- grid-template-columns: 18rem minmax(0, 1fr);
- grid-template-rows: 1fr;
- }
- #admin_page__left{
- background-color: var(--foreground-color);
- }
- #project_editing_panel{
- padding-right: 1rem;
- }
- #admin_page__left,
- #project_editing_panel{
- border-radius: 0.5rem;
- }
-
- #edit_data_fig {
- width: 16rem;
- justify-self: center;
- }
-
- #project_explorer {
- display: grid;
- height: 100%;
- grid-template-columns: 16rem 3fr;
- grid-template-areas: 'left right';
- }
- #project_explorer__left {
- grid-area: left;
- height: 100%;
- overflow-y: auto;
- padding-bottom: 1.5rem;
- border-right: 1px solid rgba(var(--text-color), 0.06);
- background-color: rgba(var(--background-color), 1);
- }
-
- #project_explorer__left h4 {
- margin-top: 0;
- margin-bottom: 0.5rem;
- color: var(--accent-color);
- font-size: 0.9rem;
- }
-
- #project_explorer__right {
- grid-area: right;
- height: 100%;
- overflow-y: auto;
- }
- #main_page {
- grid-template-columns: 4rem minmax(0, 1fr);
- grid-template-areas: 'main-header main-header''main-nav sub-pages';
- }
-
- #post_update_popup{
- --width: 28rem;
- }
- #updates_page{
- height: 100%;
- gap: 1rem;
- grid-template-areas: 'updates update-filters';
- grid-template-columns: minmax(0, 1fr) 20rem;
- }
- #update_filters_wrapper{
- padding: 1rem;
- border-radius: 0.5rem;
- align-content: flex-start;
- grid-area: update-filters;
- background-color: var(--foreground-color);
- }
- #updates_wrapper{
- height: 100%;
- overflow-y: auto;
- grid-area: updates;
- }
- #all_interns_list{
- gap: 1rem;
- grid-template-columns: repeat(auto-fill, minmax(14rem ,1fr));
- .intern-card{
- gap: 1.5rem 0.5rem;
- padding: 1.5rem;
- grid-template-columns: 1fr;
- border-radius: 0.5rem;
- background-color: var(--foreground-color);
- &__initials{
- position: relative;
- grid-column: 1/3;
- z-index: 1;
- }
- &__initials::after{
- content: '';
- position: absolute;
- background-color: inherit;
- border-radius: inherit;
- height: calc(100% + 1rem);
- width: calc(100% + 1rem);
- opacity: 0.3;
- z-index: -1;
- }
- }
- }
- #intern_list_popup {
- --height: 80vh;
- }
- #settings_page {
- height: 100%;
- align-items: flex-start;
- padding: 2rem;
- }
- .watchlist_project_card{
- padding: 1.5rem;
+ #post_update_popup {
+ --width: 28rem;
+ }
+ #updates_page {
+ height: 100%;
+ gap: 1rem;
+ grid-template-areas: "updates update-filters";
+ grid-template-columns: minmax(0, 1fr) 20rem;
+ }
+ #update_filters_wrapper {
+ padding: 1rem;
+ border-radius: 0.5rem;
+ align-content: flex-start;
+ grid-area: update-filters;
+ background-color: rgba(var(--foreground-color), 1);
+ }
+ #updates_wrapper {
+ height: 100%;
+ overflow-y: auto;
+ grid-area: updates;
+ }
+ #all_interns_list {
+ gap: 1rem;
+ grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
+ .intern-card {
+ gap: 1.5rem 0.5rem;
+ padding: 1.5rem;
+ grid-template-columns: 1fr;
+ border-radius: 0.5rem;
+ background-color: rgba(var(--foreground-color), 1);
+ &__initials {
+ position: relative;
+ grid-column: 1/3;
+ z-index: 1;
+ }
+ &__initials::after {
+ content: "";
+ position: absolute;
+ background-color: inherit;
+ border-radius: inherit;
+ height: calc(100% + 1rem);
+ width: calc(100% + 1rem);
+ opacity: 0.3;
+ z-index: -1;
+ }
}
+ }
+ #intern_list_popup {
+ --height: 80vh;
+ }
+ #settings_page {
+ height: 100%;
+ align-items: flex-start;
+ padding: 2rem;
+ }
+ .watchlist_project_card {
+ padding: 1.5rem;
+ }
}
@media only screen and (min-width: 1280px) {
- #main_page {
- // gap: 0 1.5rem;
- grid-template-columns: 12rem minmax(0, 1fr);
- grid-template-areas: 'main-header main-header''main-nav sub-pages';
+ #main_page {
+ // gap: 0 1.5rem;
+ grid-template-columns: 12rem minmax(0, 1fr);
+ grid-template-areas: "main-header main-header" "main-nav sub-pages";
+ }
+ #main_nav {
+ align-items: flex-start;
+ }
+ .nav-list__item {
+ .icon {
+ margin-right: 0.5rem;
}
- #main_nav{
- align-items: flex-start;
- }
- .nav-list__item {
-
- .icon {
- margin-right: 0.5rem;
- }
- &_title{
- display: inline-block;
- }
+ &_title {
+ display: inline-block;
}
+ }
}
@media (any-hover: hover) {
- ::-webkit-scrollbar {
- width: 0.5rem;
- height: 0.5rem;
- }
+ ::-webkit-scrollbar {
+ width: 0.5rem;
+ height: 0.5rem;
+ }
- ::-webkit-scrollbar-thumb {
- background: rgba(var(--text-color), 0.3);
- border-radius: 1rem;
+ ::-webkit-scrollbar-thumb {
+ background: rgba(var(--text-color), 0.3);
+ border-radius: 1rem;
- &:hover {
- background: rgba(var(--text-color), 0.5);
- }
+ &:hover {
+ background: rgba(var(--text-color), 0.5);
}
+ }
- .interact:hover {
- background: linear-gradient(rgba(var(--text-color), 0.06), rgba(var(--text-color), 0.06)), var(--foreground-color);
- }
+ .interact:hover {
+ background: linear-gradient(
+ rgba(var(--text-color), 0.06),
+ rgba(var(--text-color), 0.06)
+ ),
+ rgba(var(--foreground-color), 1);
+ }
- .send-update-button,
- .task-option,
- .apply-button {
- opacity: 0;
- transition: opacity 0.3s;
- }
+ .send-update-button,
+ .task-option,
+ .apply-button {
+ opacity: 0;
+ transition: opacity 0.3s;
+ }
-
- .task-list-item:hover .task-option,
- .task-option:focus-within,
- .task:hover .apply-button,
- .task-card:hover .send-update-button {
- opacity: 1;
- }
+ .task-list-item:hover .task-option,
+ .task-option:focus-within,
+ .task:hover .apply-button,
+ .task-card:hover .send-update-button {
+ opacity: 1;
+ }
}
@media (any-hover: none) {
-}
\ No newline at end of file
+}
diff --git a/index.html b/index.html
index a7da440..5678019 100644
--- a/index.html
+++ b/index.html
@@ -25,12 +25,13 @@
-
+
+