This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "diffEditor.renderSideBySide": false, // Git の差分を行内に表示 | |
| "editor.colorDecorators": false, // カラーデコレーターを非表示 | |
| "editor.formatOnPaste": false, // ペースト時に自動でフォーマット | |
| "editor.formatOnSave": false, // ファイル保存時に自動でフォーマット | |
| "editor.formatOnType": false, // 入力した行を自動でフォーマット | |
| "editor.minimap.renderCharacters": false, // ミニマップの表示文字をブロックに変更 | |
| "editor.minimap.showSlider": "always", // 表示領域をミニマップで常にハイライト | |
| "editor.multiCursorModifier": "ctrlCmd", // マウスでの複数選択時の修飾キーを変更 | |
| "editor.renderControlCharacters": true, // 制御文字を表示 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| declare const AjaxZip3: any | |
| const initializeForm = (form: HTMLFormElement): void => { | |
| if (!form) throw new Error('form要素が提供されていません') | |
| const inputElements: NodeListOf<HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement> = | |
| form.querySelectorAll('input, select, textarea') | |
| const inputFileComponents: NodeListOf<HTMLElement> = form.querySelectorAll('.js-input-file') | |
| const zipButton: HTMLElement | null = form.querySelector('#js-zip-button') | |
| const inputDates: NodeListOf<HTMLInputElement> = form.querySelectorAll('[type="date"]') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export type TabsOptions = { | |
| tablistSelector: string | undefined | |
| tabSelector: string | undefined | |
| tabpanelSelector: string | undefined | |
| firstView?: number | |
| } | |
| const defaultOptions: TabsOptions = { | |
| tablistSelector: undefined, | |
| tabSelector: undefined, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const initializeSmoothScroll = (): void => { | |
| // クリックイベントのリスナーを追加 | |
| document.addEventListener('click', handleClick, { capture: true }) | |
| } | |
| // 固定配置のヘッダーのブロックサイズを取得 | |
| const getHeaderBlockSize = (): string => { | |
| const header = document.querySelector('[data-fixed-header]') as HTMLElement | |
| if (!header) return '0' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export type ObserverOptions = { | |
| root?: HTMLElement | null; | |
| rootMargin?: string; | |
| threshold?: number | number[]; | |
| }; | |
| const defaultOptions: ObserverOptions = { | |
| root: null, | |
| rootMargin: "0px", | |
| threshold: 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| type AccordionOptions = { | |
| duration?: number | |
| easing?: string | |
| } | |
| const defaultOptions: AccordionOptions = { | |
| duration: 300, | |
| easing: 'ease-in-out', | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const initializeAnchorPositioning = (): void => { | |
| const anchorElements = document.querySelectorAll('[data-anchor]') as NodeListOf<HTMLElement> | |
| anchorElements.forEach((anchorElement) => { | |
| const targetId = anchorElement.getAttribute('data-anchor') | |
| if (!targetId) return | |
| const anchorTarget = document.getElementById(targetId) as HTMLElement | |
| if (!anchorTarget) return |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export type AccordionOptions = { | |
| duration?: number | |
| easing?: string | |
| printAll?: boolean | |
| } | |
| const defaultOptions: AccordionOptions = { | |
| duration: 300, | |
| easing: 'ease-in-out', | |
| printAll: false, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export type AccordionOptions = { | |
| buttonSelector: string | undefined | |
| panelSelector: string | undefined | |
| duration?: number | |
| easing?: string | |
| printAll?: boolean | |
| } | |
| const defaultOptions: AccordionOptions = { | |
| buttonSelector: undefined, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const backfaceFixed = (fixed: boolean): void => { | |
| const scrollBarWidth = getScrollBarSize() | |
| const scrollPosition = getScrollPosition(fixed) | |
| document.body.style.borderInlineEnd = fixed ? `${scrollBarWidth}px solid transparent` : '' | |
| applyStyles(scrollPosition, fixed) | |
| if (!fixed) restorePosition(scrollPosition) | |
| } | |
| const isWritingModeVertical = (): boolean => { |