@sellmate/design-system 0.0.35 → 0.0.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/sd-badge.cjs.entry.js +1 -1
- package/dist/cjs/sd-button_15.cjs.entry.js +13 -13
- package/dist/cjs/sd-card.cjs.entry.js +1 -1
- package/dist/cjs/sd-date-picker.cjs.entry.js +2 -2
- package/dist/cjs/sd-date-range-picker.cjs.entry.js +2 -2
- package/dist/cjs/sd-loading-spinner.cjs.entry.js +1 -1
- package/dist/cjs/sd-popover.cjs.entry.js +2 -2
- package/dist/cjs/sd-progress.cjs.entry.js +2 -2
- package/dist/cjs/sd-select-multiple.cjs.entry.js +2 -2
- package/dist/cjs/sd-select-option-group.cjs.entry.js +3 -3
- package/dist/cjs/sd-table-backup.cjs.entry.js +12 -6
- package/dist/cjs/sd-table-backup.entry.cjs.js.map +1 -1
- package/dist/cjs/sd-tag.cjs.entry.js +1 -1
- package/dist/cjs/sd-td.cjs.entry.js +2 -2
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/sd-badge/sd-badge.js +1 -1
- package/dist/collection/components/sd-card/sd-card.js +1 -1
- package/dist/collection/components/sd-date-picker/sd-date-picker.js +2 -2
- package/dist/collection/components/sd-date-range-picker/sd-date-range-picker.js +2 -2
- package/dist/collection/components/sd-guide/sd-guide.js +3 -3
- package/dist/collection/components/sd-icon/sd-icon.js +1 -1
- package/dist/collection/components/sd-input/sd-input.js +2 -2
- package/dist/collection/components/sd-loading-spinner/sd-loading-spinner.js +1 -1
- package/dist/collection/components/sd-pagination/sd-pagination.js +2 -2
- package/dist/collection/components/sd-popover/sd-popover.js +2 -2
- package/dist/collection/components/sd-portal/sd-portal.js +1 -1
- package/dist/collection/components/sd-progress/sd-progress.js +2 -2
- package/dist/collection/components/sd-select/sd-select-option/sd-select-option.js +1 -1
- package/dist/collection/components/sd-select-multiple/sd-select-multiple.js +2 -2
- package/dist/collection/components/sd-select-multiple-group/sd-select-option-group/sd-select-option-group.js +3 -3
- package/dist/collection/components/sd-table/sd-tbody/sd-tbody.js +1 -1
- package/dist/collection/components/sd-table/sd-td/sd-td.js +2 -2
- package/dist/collection/components/sd-table/sd-th/sd-th.js +1 -1
- package/dist/collection/components/sd-table/sd-tr/sd-tr.js +1 -1
- package/dist/collection/components/sd-table-backup/sd-table-backup.css +249 -0
- package/dist/collection/components/sd-table-backup/sd-table-backup.js +709 -0
- package/dist/collection/components/sd-table-backup/sd-table-backup.js.map +1 -0
- package/dist/collection/components/sd-tag/sd-tag.js +1 -1
- package/dist/components/{p-CSnKPDQz.js → p-0B7EuAJt.js} +5 -5
- package/dist/components/{p-CSnKPDQz.js.map → p-0B7EuAJt.js.map} +1 -1
- package/dist/components/{p-BeBw4eSm.js → p-18thvuHk.js} +3 -3
- package/dist/components/{p-BeBw4eSm.js.map → p-18thvuHk.js.map} +1 -1
- package/dist/components/{p-BEq3cGoC.js → p-C075_t2h.js} +3 -3
- package/dist/components/{p-BEq3cGoC.js.map → p-C075_t2h.js.map} +1 -1
- package/dist/components/{p-CrmdI2cD.js → p-C79lmNgp.js} +3 -3
- package/dist/components/{p-CrmdI2cD.js.map → p-C79lmNgp.js.map} +1 -1
- package/dist/components/{p-ybbnPl4X.js → p-Ce6LhsfH.js} +7 -7
- package/dist/components/{p-ybbnPl4X.js.map → p-Ce6LhsfH.js.map} +1 -1
- package/dist/components/{p-B8lMIjWB.js → p-CzYhjjIE.js} +7 -7
- package/dist/components/{p-B8lMIjWB.js.map → p-CzYhjjIE.js.map} +1 -1
- package/dist/components/{p-5yzkkdZ2.js → p-D2x4IHr5.js} +3 -3
- package/dist/components/{p-5yzkkdZ2.js.map → p-D2x4IHr5.js.map} +1 -1
- package/dist/components/{p-ntW8MKYi.js → p-D7IsBL9J.js} +5 -5
- package/dist/components/{p-ntW8MKYi.js.map → p-D7IsBL9J.js.map} +1 -1
- package/dist/components/{p-D-s8kK6P.js → p-DHI6oZcr.js} +3 -3
- package/dist/components/{p-D-s8kK6P.js.map → p-DHI6oZcr.js.map} +1 -1
- package/dist/components/{p-CqpahWAy.js → p-DNEKh1qk.js} +3 -3
- package/dist/components/{p-CqpahWAy.js.map → p-DNEKh1qk.js.map} +1 -1
- package/dist/components/{p-BEDQ2CIp.js → p-DTUSoHK4.js} +5 -5
- package/dist/components/{p-BEDQ2CIp.js.map → p-DTUSoHK4.js.map} +1 -1
- package/dist/components/{p-Du8-vyL0.js → p-DpcL5xdv.js} +3 -3
- package/dist/components/{p-Du8-vyL0.js.map → p-DpcL5xdv.js.map} +1 -1
- package/dist/components/{p-GNK9vrin.js → p-InrZhOLL.js} +3 -3
- package/dist/components/{p-GNK9vrin.js.map → p-InrZhOLL.js.map} +1 -1
- package/dist/components/{p-BzdIpn5T.js → p-kLlPK7H2.js} +4 -4
- package/dist/components/{p-BzdIpn5T.js.map → p-kLlPK7H2.js.map} +1 -1
- package/dist/components/sd-badge.js +1 -1
- package/dist/components/sd-button.js +1 -1
- package/dist/components/sd-card.js +1 -1
- package/dist/components/sd-checkbox.js +1 -1
- package/dist/components/sd-date-picker.js +5 -5
- package/dist/components/sd-date-range-picker.js +5 -5
- package/dist/components/sd-guide.js +6 -6
- package/dist/components/sd-icon.js +1 -1
- package/dist/components/sd-input.js +1 -1
- package/dist/components/sd-loading-spinner.js +1 -1
- package/dist/components/sd-pagination.js +1 -1
- package/dist/components/sd-popover.js +4 -4
- package/dist/components/sd-portal.js +1 -1
- package/dist/components/sd-progress.js +2 -2
- package/dist/components/sd-select-multiple-group.js +5 -5
- package/dist/components/sd-select-multiple.js +7 -7
- package/dist/components/sd-select-option-group.js +1 -1
- package/dist/components/sd-select-option.js +1 -1
- package/dist/components/sd-select.js +1 -1
- package/dist/components/sd-table-backup.js +22 -16
- package/dist/components/sd-table-backup.js.map +1 -1
- package/dist/components/sd-table.js +12 -12
- package/dist/components/sd-tag.js +1 -1
- package/dist/components/sd-tbody.js +1 -1
- package/dist/components/sd-td.js +2 -2
- package/dist/components/sd-th.js +1 -1
- package/dist/components/sd-tooltip.js +1 -1
- package/dist/components/sd-tr.js +1 -1
- package/dist/design-system/design-system.esm.js +1 -1
- package/dist/design-system/{p-8b60af66.entry.js → p-0e24195b.entry.js} +2 -2
- package/dist/design-system/{p-01f44c51.entry.js → p-360dd6ab.entry.js} +2 -2
- package/dist/design-system/{p-88745dfe.entry.js → p-3e46bf2b.entry.js} +2 -2
- package/dist/design-system/p-51c4ae08.entry.js +2 -0
- package/dist/design-system/{p-d74bfbe4.entry.js → p-531260cb.entry.js} +2 -2
- package/dist/design-system/{p-7e18d4cf.entry.js → p-675d1b1c.entry.js} +2 -2
- package/dist/design-system/{p-78f90517.entry.js → p-9099eb05.entry.js} +2 -2
- package/dist/design-system/{p-a72c4b0c.entry.js → p-a83759ba.entry.js} +2 -2
- package/dist/design-system/p-c0461df6.entry.js +2 -0
- package/dist/design-system/p-c0461df6.entry.js.map +1 -0
- package/dist/design-system/p-c9109ae0.entry.js +2 -0
- package/dist/design-system/p-d8c1ce0a.entry.js +2 -0
- package/dist/design-system/{p-985be35d.entry.js.map → p-d8c1ce0a.entry.js.map} +1 -1
- package/dist/design-system/p-f4a737de.entry.js +2 -0
- package/dist/design-system/{p-d003ee3d.entry.js → p-ff7b8ecf.entry.js} +2 -2
- package/dist/design-system/sd-table-backup.entry.esm.js.map +1 -1
- package/dist/esm/sd-badge.entry.js +1 -1
- package/dist/esm/sd-button_15.entry.js +13 -13
- package/dist/esm/sd-card.entry.js +1 -1
- package/dist/esm/sd-date-picker.entry.js +2 -2
- package/dist/esm/sd-date-range-picker.entry.js +2 -2
- package/dist/esm/sd-loading-spinner.entry.js +1 -1
- package/dist/esm/sd-popover.entry.js +2 -2
- package/dist/esm/sd-progress.entry.js +2 -2
- package/dist/esm/sd-select-multiple.entry.js +2 -2
- package/dist/esm/sd-select-option-group.entry.js +3 -3
- package/dist/esm/sd-table-backup.entry.js +12 -6
- package/dist/esm/sd-table-backup.entry.js.map +1 -1
- package/dist/esm/sd-tag.entry.js +1 -1
- package/dist/esm/sd-td.entry.js +2 -2
- package/dist/types/components.d.ts +2 -2
- package/hydrate/index.js +46 -40
- package/hydrate/index.mjs +46 -40
- package/package.json +5 -3
- package/dist/collection/components/sd-table/sd-table-backup.js +0 -2743
- package/dist/collection/components/sd-table/sd-table-backup.js.map +0 -1
- package/dist/design-system/p-49f98f09.entry.js +0 -2
- package/dist/design-system/p-671a08a6.entry.js +0 -2
- package/dist/design-system/p-671a08a6.entry.js.map +0 -1
- package/dist/design-system/p-6a624672.entry.js +0 -2
- package/dist/design-system/p-985be35d.entry.js +0 -2
- package/dist/design-system/p-ef5ffaa2.entry.js +0 -2
- /package/dist/design-system/{p-8b60af66.entry.js.map → p-0e24195b.entry.js.map} +0 -0
- /package/dist/design-system/{p-01f44c51.entry.js.map → p-360dd6ab.entry.js.map} +0 -0
- /package/dist/design-system/{p-88745dfe.entry.js.map → p-3e46bf2b.entry.js.map} +0 -0
- /package/dist/design-system/{p-ef5ffaa2.entry.js.map → p-51c4ae08.entry.js.map} +0 -0
- /package/dist/design-system/{p-d74bfbe4.entry.js.map → p-531260cb.entry.js.map} +0 -0
- /package/dist/design-system/{p-7e18d4cf.entry.js.map → p-675d1b1c.entry.js.map} +0 -0
- /package/dist/design-system/{p-78f90517.entry.js.map → p-9099eb05.entry.js.map} +0 -0
- /package/dist/design-system/{p-a72c4b0c.entry.js.map → p-a83759ba.entry.js.map} +0 -0
- /package/dist/design-system/{p-49f98f09.entry.js.map → p-c9109ae0.entry.js.map} +0 -0
- /package/dist/design-system/{p-6a624672.entry.js.map → p-f4a737de.entry.js.map} +0 -0
- /package/dist/design-system/{p-d003ee3d.entry.js.map → p-ff7b8ecf.entry.js.map} +0 -0
- /package/dist/types/components/{sd-table → sd-table-backup}/sd-table-backup.d.ts +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sd-table-backup.js","sourceRoot":"","sources":["../../../src/components/sd-table-backup/sd-table-backup.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CAAC;gCAClC,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;4BACnD,CAAC;wBACF,CAAC,GACW,CACb,CACI,CACN,CACI,CACA,CACP,CAAC;IACH,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["import {\n Component,\n Element,\n Prop,\n State,\n Event,\n Watch,\n h,\n EventEmitter,\n Host,\n} from '@stencil/core';\nimport { CheckedType } from '../sd-checkbox/sd-checkbox';\nimport { SelectOption } from '../sd-select/sd-select';\nimport { SdSelectCustomEvent } from '../../components';\n\nexport type SdTableSortDir = 'asc' | 'desc' | 'none';\n\nexport interface SdTableColumn {\n name: string;\n label: string;\n field: string | ((row: any) => any);\n align?: 'left' | 'center' | 'right';\n width?: string;\n format?: (value: any, row: any) => string;\n visible?: boolean;\n usePageMoveIcon?: boolean;\n tooltip?: string[];\n tooltipOptions?: Record<string, any>;\n tdClass?: string;\n thClass?: string;\n}\n\nexport interface Row {\n [key: string]: any;\n}\n\n@Component({\n tag: 'sd-table-backup',\n styleUrl: 'sd-table-backup.scss',\n})\nexport class SdTable {\n @Element() el!: HTMLElement;\n\n @Prop() columns!: SdTableColumn[];\n @Prop({ mutable: true }) rows!: Row[];\n @Prop({ mutable: true }) selected: Set<Row> = new Set();\n @Prop() rowKey: string = 'id';\n @Prop() selectable: boolean = false;\n @Prop() resizable: boolean = false;\n @Prop() width?: string;\n @Prop() height?: string;\n @Prop() stickyHeader: boolean = false;\n @Prop() stickyColumn: { left?: number; right?: number } = { left: 0, right: 0 };\n @Prop() noDataLabel: string = '데이터가 없습니다.';\n @Prop() isLoading: boolean = false;\n @Prop() pagination?: {\n page: number;\n rowsPerPage: number;\n lastPage?: number;\n };\n @Prop() bodyCellRenderer?: (\n column: SdTableColumn,\n row: Row,\n ) => HTMLElement | string | null | undefined;\n @Prop() useInternalPagination: boolean = false;\n @Prop() useRowsPerPageSelect: boolean = false;\n @Prop() rowsPerPageOption: SelectOption[] = [\n { label: '10개씩 보기', value: 10 },\n { label: '25개씩 보기', value: 25 },\n { label: '50개씩 보기', value: 50 },\n { label: '100개씩 보기', value: 100 },\n ];\n\n @Event() sdSelectChange!: EventEmitter<Row[]>;\n @Event() sdPageChange!: EventEmitter<number>;\n @Event() sdRowsPerPageChange!: EventEmitter<number>;\n\n @State() currentPage: number = this.pagination?.page || 1;\n @State() innerRows: Row[] = [];\n @State() innerSelected: Set<Row> = new Set();\n @State() columnWidths: number[] = [];\n @State() scrolledLeft: boolean = false;\n @State() scrolledRight: boolean = false;\n\n @Watch('columns')\n handleColumnsChange(newCols: SdTableColumn[]) {\n this.columnWidths = newCols.map(c => parseInt(c.width || '120', 10));\n }\n\n @Watch('rows')\n handleRowsChange(newRows: Row[]) {\n this.innerRows = [...newRows];\n }\n\n @Watch('selected')\n handleSelectedChange(newSelected: Set<Row>) {\n this.innerSelected = new Set(newSelected);\n }\n\n @Watch('pagination')\n handlePaginationChange(\n newVal?: { page: number; rowsPerPage: number; lastPage?: number } | undefined,\n ) {\n if (newVal?.page && newVal.page !== this.currentPage) this.currentPage = newVal.page;\n }\n\n componentWillLoad() {\n this.innerRows = [...(this.rows || [])];\n this.innerSelected = new Set(this.selected);\n this.columnWidths = (this.columns || []).map(c => parseInt(c.width || '120', 10));\n\n if (this.pagination?.page) {\n this.currentPage = this.pagination.page;\n }\n }\n\n componentDidLoad() {\n // SSR 환경 체크\n if (typeof window === 'undefined') return;\n\n const middle = this.el.querySelector('.sd-table__middle');\n if (!middle) return;\n\n const onScroll = () => {\n const { scrollLeft, scrollWidth, clientWidth } = middle as HTMLElement;\n this.scrolledLeft = scrollLeft > 0;\n this.scrolledRight = scrollLeft + clientWidth < scrollWidth;\n };\n middle.addEventListener('scroll', onScroll, { passive: true });\n onScroll();\n }\n\n // ----- Derived getters -----\n private get visibleColumns(): SdTableColumn[] {\n return this.columns.filter(col => col.visible !== false);\n }\n\n private get paginatedRows(): Row[] {\n if (!this.pagination || !this.useInternalPagination) return this.innerRows;\n\n const { rowsPerPage = this.rows.length } = this.pagination || {};\n\n const result = this.innerRows.slice(\n (this.currentPage - 1) * rowsPerPage,\n this.currentPage * rowsPerPage,\n );\n\n return result;\n }\n\n private get lastPageNumber(): number {\n const { lastPage, rowsPerPage = this.rows.length } = this.pagination || {};\n\n return lastPage ?? Math.max(1, Math.ceil(this.rows.length / rowsPerPage));\n }\n\n private get sdTableClasses() {\n return [\n 'sd-table',\n this.stickyHeader && 'sd-table--sticky-header',\n this.selectable && 'sd-table--selectable',\n this.resizable && 'sd-table--resizable',\n !this.innerRows.length && 'sd-table--no-data',\n ((this.stickyColumn?.left ?? 0) > 0 || (this.stickyColumn?.right ?? 0) > 0) &&\n 'sd-table--sticky-column',\n this.scrolledLeft && 'sd-table--scrolled-left',\n this.scrolledRight && 'sd-table--scrolled-right',\n ]\n .filter(Boolean)\n .join(' ');\n }\n\n // ----- Selection -----\n private isRowSelected(row: Row): boolean {\n return Array.from(this.innerSelected).some(r => r[this.rowKey] === row[this.rowKey]);\n }\n\n private updateRowSelect(row: Row) {\n const selectedArray = Array.from(this.innerSelected);\n const exists = this.isRowSelected(row);\n const newSelected = exists\n ? selectedArray.filter(r => r[this.rowKey] !== row[this.rowKey])\n : [...selectedArray, row];\n\n // 동일 상태면 set하지 않음 → 불필요 렌더 방지\n if (newSelected.length === selectedArray.length) return;\n\n this.innerSelected = new Set(newSelected);\n this.sdSelectChange.emit(Array.from(this.innerSelected));\n }\n\n private toggleSelectAll(checked: CheckedType) {\n if (checked) {\n const pageRows = new Set([...this.paginatedRows]);\n this.innerSelected = new Set([...this.innerSelected, ...pageRows]);\n } else {\n const currentPageKeys = this.paginatedRows.map(r => r[this.rowKey]);\n this.innerSelected = new Set(\n [...this.innerSelected].filter(r => !currentPageKeys.includes(r[this.rowKey])),\n );\n }\n\n this.sdSelectChange.emit(Array.from(this.innerSelected));\n }\n\n private get isAllChecked(): boolean | null {\n const total = this.paginatedRows.length;\n const selectedCount = this.paginatedRows.filter(row =>\n Array.from(this.innerSelected).some(\n selectedRow => selectedRow[this.rowKey] === row[this.rowKey],\n ),\n ).length;\n\n if (selectedCount === 0) return false; // 아무것도 안 선택됨\n if (selectedCount === total) return true; // 전부 선택됨\n return null; // 일부만 선택됨\n }\n\n // ----- Helpers -----\n private getStickyStyle(colIdx: number) {\n const leftOffset =\n this.columnWidths.slice(0, colIdx).reduce((a, b) => a + b, 0) + (this.selectable ? 52 : 0);\n const rightOffset = this.columnWidths\n .filter((_, i) => i >= this.visibleColumns.length - (this.stickyColumn.right || 0) && i > colIdx)\n .reduce((a, b) => a + b, 0);\n return {\n '--sticky-left-offset': `${leftOffset}px`,\n '--sticky-right-offset': `${rightOffset}px`,\n 'width': `${this.columnWidths[colIdx]}px`,\n 'minWidth': `${this.columnWidths[colIdx]}px`,\n 'maxWidth': `${this.columnWidths[colIdx]}px`,\n };\n }\n\n private handleResize(index: number, event: MouseEvent) {\n // SSR 환경 체크\n if (typeof document === 'undefined') return;\n\n const startX = event.clientX;\n const startWidth = this.columnWidths[index];\n\n const handleMouseMove = (moveEvent: MouseEvent) => {\n const newWidth = Math.max(startWidth + moveEvent.clientX - startX, 50);\n\n this.columnWidths = this.columnWidths.map((width, idx) => (idx === index ? newWidth : width));\n };\n\n const handleMouseUp = () => {\n document.removeEventListener('mousemove', handleMouseMove);\n document.removeEventListener('mouseup', handleMouseUp);\n };\n\n document.addEventListener('mousemove', handleMouseMove);\n document.addEventListener('mouseup', handleMouseUp);\n }\n\n private getCellValue(column: SdTableColumn, row: Row) {\n const { field, format, name } = column;\n const value = typeof field === 'function' ? field(row) : field ? row[field] : row[name];\n return format ? format(value, row) : value;\n }\n\n // ----- Render -----\n private renderHeader() {\n return (\n <thead>\n <tr>\n {this.selectable && (\n <th\n class={{\n 'sd-th': true,\n 'sd-th--selected': true,\n 'sticky-left': Boolean(this.stickyColumn.left && this.stickyColumn.left > 0),\n }}\n style={{\n '--sticky-left-offset': '0px',\n }}\n >\n <sd-checkbox\n checked={this.isAllChecked}\n disabled={!this.paginatedRows.length}\n onSdChange={(e: CustomEvent<CheckedType>) => this.toggleSelectAll(e.detail)}\n ></sd-checkbox>\n </th>\n )}\n {this.visibleColumns.map((col, colIdx) => (\n <th\n key={col.name}\n class={{\n 'sd-th': true,\n [`${col.thClass}`]: Boolean(col.thClass),\n 'sticky-left': Boolean(this.stickyColumn.left && colIdx < this.stickyColumn.left),\n 'sticky-right': Boolean(\n this.stickyColumn.right && colIdx >= this.visibleColumns.length - this.stickyColumn.right!,\n ),\n 'sticky-left-edge': Boolean(\n this.stickyColumn.left && colIdx === this.stickyColumn.left - 1,\n ),\n 'sticky-right-edge': Boolean(\n this.stickyColumn.right &&\n colIdx === this.visibleColumns.length - this.stickyColumn.right!,\n ),\n }}\n style={this.getStickyStyle(colIdx)}\n >\n <div class={`sd-th__content sd-th__content--${col.align || 'left'}`}>\n <slot name={`header-cell-${col.name}`}>\n <div class=\"sd-th__content--label\">{col.label}</div>\n </slot>\n\n {col.usePageMoveIcon && <sd-icon name=\"pageMove\" size=\"12\" color=\"#006AC1\" />}\n\n {col.tooltip && (\n <sd-tooltip {...col.tooltipOptions}>\n <div slot=\"content\">\n {col.tooltip.map(text => (\n <p>{text}</p>\n ))}\n </div>\n </sd-tooltip>\n )}\n </div>\n\n {this.resizable && typeof window !== 'undefined' && (\n <div\n class=\"sd-th__resizer\"\n onMouseDown={(evt: MouseEvent) => this.handleResize(colIdx, evt)}\n ></div>\n )}\n </th>\n ))}\n </tr>\n </thead>\n );\n }\n\n private renderBody() {\n return (\n <tbody {...(!this.paginatedRows.length && { part: 'tbody-empty' })}>\n {this.isLoading && (\n <div class=\"sd-table__loading\">\n <sd-loading-spinner />\n </div>\n )}\n\n {!this.paginatedRows.length ? (\n <tr class=\"sd-table__no-data-row\">\n <td colSpan={this.visibleColumns.length + (this.selectable ? 1 : 0)}>\n <slot name=\"no-data\">{this.noDataLabel}</slot>\n </td>\n </tr>\n ) : (\n this.paginatedRows.map((row, rowIdx) => (\n <tr key={row[this.rowKey]} class=\"hover:bg-Grey_Lighten-6\">\n {this.selectable && (\n <td\n class={{\n 'sd-td': true,\n 'sd-td--selected': true,\n 'sticky-left': Boolean(this.stickyColumn.left && this.stickyColumn.left > 0),\n }}\n style={{\n '--sticky-left-offset': '0px',\n }}\n >\n <sd-checkbox\n checked={this.isRowSelected(row)}\n disabled={!this.paginatedRows.length}\n onSdChange={() => this.updateRowSelect(row)}\n ></sd-checkbox>\n </td>\n )}\n {this.visibleColumns.map((column, colIdx) => {\n const rendered = this.bodyCellRenderer?.(column, row);\n\n return (\n <td\n key={column.name}\n part={`td-${column.name}`}\n class={{\n 'sd-td': true,\n [`sd-td--${column.align || 'left'}`]: true,\n 'sticky-left': Boolean(this.stickyColumn.left && colIdx < this.stickyColumn.left),\n 'sticky-right': Boolean(\n this.stickyColumn.right &&\n colIdx >= this.visibleColumns.length - this.stickyColumn.right!,\n ),\n 'sticky-left-edge': Boolean(\n this.stickyColumn.left && colIdx === this.stickyColumn.left - 1,\n ),\n 'sticky-right-edge': Boolean(\n this.stickyColumn.right &&\n colIdx === this.visibleColumns.length - this.stickyColumn.right!,\n ),\n [`${column.tdClass}`]: Boolean(column.tdClass),\n }}\n style={this.getStickyStyle(colIdx)}\n >\n {/* slot을 사용하려는 항목 name과 행 인덱스를 키값으로 사용 */}\n <slot name={`body-cell-${column.name}-${rowIdx}`}>\n {rendered ? (\n typeof rendered === 'string' ? (\n <span innerHTML={rendered}></span>\n ) : (\n rendered\n )\n ) : (\n this.getCellValue(column, row)\n )}\n </slot>\n </td>\n );\n })}\n </tr>\n ))\n )}\n </tbody>\n );\n }\n\n render() {\n return (\n <Host>\n <div\n class=\"sd-table__wrapper\"\n style={{\n '--table-width': this.width,\n '--table-height': this.height,\n }}\n >\n <div class=\"sd-table__container\">\n <div\n class={{\n 'sd-table__middle': true,\n 'sd-table__middle--loading': this.isLoading,\n }}\n >\n <table part=\"table\" class={this.sdTableClasses}>\n {this.renderHeader()}\n\n {this.renderBody()}\n </table>\n </div>\n\n <div class=\"sd-table__bottom\"></div>\n </div>\n {this.pagination && this.innerRows.length > 0 && (\n <div class=\"sd-table__pagination\">\n <sd-pagination\n currentPage={!this.useInternalPagination ? this.pagination.page : this.currentPage}\n lastPage={!this.useInternalPagination ? this.pagination.lastPage : this.lastPageNumber}\n onPageChange={(e: CustomEvent<number>) => {\n if (!this.useInternalPagination) {\n this.sdPageChange.emit(e.detail);\n } else {\n this.currentPage = e.detail;\n this.sdPageChange.emit(this.currentPage);\n }\n }}\n ></sd-pagination>\n\n {this.useRowsPerPageSelect && (\n <sd-select\n value={this.pagination.rowsPerPage}\n options={this.rowsPerPageOption}\n width=\"128px\"\n onSdChange={(e: SdSelectCustomEvent<{ value: string | number | null }>) => {\n const changedRowsPerPage = e.detail.value ? Number(e.detail.value) : 0;\n if (!this.useInternalPagination) {\n this.sdRowsPerPageChange.emit(changedRowsPerPage);\n } else {\n const newRowsPerPage = Number(e.detail.value || 0);\n let newLastPage = Math.max(1, Math.ceil(this.innerRows.length / newRowsPerPage));\n let newCurrentPage = this.currentPage;\n\n if (newCurrentPage > newLastPage) {\n newCurrentPage = newLastPage;\n }\n\n this.pagination = {\n page: newCurrentPage,\n rowsPerPage: newRowsPerPage,\n lastPage: newLastPage,\n };\n this.currentPage = newCurrentPage;\n this.sdRowsPerPageChange.emit(changedRowsPerPage);\n }\n }}\n ></sd-select>\n )}\n </div>\n )}\n </div>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -37,7 +37,7 @@ export class SdTag {
|
|
|
37
37
|
}
|
|
38
38
|
render() {
|
|
39
39
|
const tagClasses = this.getTagClasses();
|
|
40
|
-
return (h("span", { key: '
|
|
40
|
+
return (h("span", { key: 'cd470741451fde311fc3d22d21205ea7bc86295c', class: tagClasses, style: {
|
|
41
41
|
'--tag-bg-color': this.bgColor,
|
|
42
42
|
'--tag-text-color': this.textColor,
|
|
43
43
|
}, "aria-label": this.label || 'tag' }, this.renderContent()));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, d as createEvent, h, F as Fragment } from './p-CbnL1UUF.js';
|
|
2
|
-
import { d as defineCustomElement$1 } from './p-
|
|
2
|
+
import { d as defineCustomElement$1 } from './p-InrZhOLL.js';
|
|
3
3
|
|
|
4
4
|
const sdPaginationCss = ".sd-pagination{display:flex;flex-flow:row nowrap;align-items:center;justify-content:center;gap:8px;color:#555555;width:100%;font-size:12px}.sd-pagination .prepend-btns{display:flex;flex-flow:row nowrap;align-items:center;gap:8px;width:60px}.sd-pagination .prepend-btns button{width:26px;height:26px;border:0;background:none}.sd-pagination .prepend-btns button:hover{border:1px solid #006ac1;border-radius:14px}.sd-pagination .append-btns{display:flex;flex-flow:row nowrap;align-items:center;gap:8px;width:60px}.sd-pagination .append-btns button{width:26px;height:26px;border:0;background:none}.sd-pagination .append-btns button:hover{border:1px solid #006ac1;border-radius:14px}.sd-pagination .pagination-btn{display:flex;align-items:center;justify-content:center;border-radius:14px;outline:none;border:none;cursor:pointer;height:26px;color:#555555;width:var(--pagination-btn-width, 26px)}.sd-pagination .pagination-btn--selected{background-color:#006ac1;color:white}.sd-pagination .pagination-btn:hover{border:1px solid #006ac1}.sd-pagination--simple .pagination-info{line-height:26px;display:flex;flex-flow:row nowrap;align-items:center;gap:8px}.sd-pagination--simple .pagination-info .current-page,.sd-pagination--simple .pagination-info .last-page{padding:0 2px}";
|
|
5
5
|
|
|
@@ -84,12 +84,12 @@ const SdPagination = /*@__PURE__*/ proxyCustomElement(class SdPagination extends
|
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
86
|
render() {
|
|
87
|
-
return (h("div", { key: '
|
|
87
|
+
return (h("div", { key: 'ee07e420809eca9641ab325d38c48a054b9e04de', class: this.paginationClasses }, h("div", { key: 'a7b7f129832a465fd4426cf142385f37461a65b7', class: "prepend-btns" }, this.renderPrevButtons()), this.simple ? (h("div", { class: "pagination-info" }, h("span", { class: "current-page" }, this.currentPage), h("span", null, "/"), h("span", { class: "last-page" }, this.lastPage))) : (this.pageNumbers.map(n => (h("button", { type: "button", "aria-current": this.currentPage === n ? 'page' : undefined, class: {
|
|
88
88
|
'pagination-btn': true,
|
|
89
89
|
'pagination-btn--selected': this.currentPage === n,
|
|
90
90
|
}, disabled: this.currentPage === n, style: {
|
|
91
91
|
'--pagination-btn-width': `${this.buttonWidth}px`,
|
|
92
|
-
}, onClick: () => this.handlePageChange(n) }, n)))), h("div", { key: '
|
|
92
|
+
}, onClick: () => this.handlePageChange(n) }, n)))), h("div", { key: 'c1a8fd3d61d24652a17ec30ed436c90c77a19144', class: "append-btns" }, this.renderNextButtons())));
|
|
93
93
|
}
|
|
94
94
|
static get watchers() { return {
|
|
95
95
|
"currentPage": ["onPropChange"],
|
|
@@ -124,6 +124,6 @@ function defineCustomElement() {
|
|
|
124
124
|
}
|
|
125
125
|
|
|
126
126
|
export { SdPagination as S, defineCustomElement as d };
|
|
127
|
-
//# sourceMappingURL=p-
|
|
127
|
+
//# sourceMappingURL=p-0B7EuAJt.js.map
|
|
128
128
|
|
|
129
|
-
//# sourceMappingURL=p-
|
|
129
|
+
//# sourceMappingURL=p-0B7EuAJt.js.map
|
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AAE,CAAO,CACpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/sd-pagination/sd-pagination.scss?tag=sd-pagination","src/components/sd-pagination/sd-pagination.tsx"],"sourcesContent":["@import 'variables';\n\n.sd-pagination {\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n justify-content: center;\n gap: 8px;\n color: $grey_80;\n width: 100%;\n font-size: 12px;\n\n .prepend-btns {\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n gap: 8px;\n width: 60px;\n\n button {\n width: 26px;\n height: 26px;\n border: 0;\n background: none;\n\n &:hover {\n border: 1px solid $oceanblue_70;\n border-radius: 14px;\n }\n }\n }\n\n .append-btns {\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n gap: 8px;\n width: 60px;\n\n button {\n width: 26px;\n height: 26px;\n border: 0;\n background: none;\n\n &:hover {\n border: 1px solid $oceanblue_70;\n border-radius: 14px;\n }\n }\n }\n\n .pagination-btn {\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 14px;\n outline: none;\n border: none;\n cursor: pointer;\n height: 26px;\n color: $grey_80;\n width: var(--pagination-btn-width, 26px);\n\n &--selected {\n background-color: $oceanblue_70;\n color: white;\n }\n\n &:hover {\n border: 1px solid $oceanblue_70;\n }\n }\n\n &--simple {\n .pagination-info {\n line-height: 26px;\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n gap: 8px;\n .current-page,\n .last-page {\n padding: 0 2px;\n }\n }\n }\n}\n","import { Component, Prop, Event, EventEmitter, h, Watch, Fragment } from '@stencil/core';\n\nconst BUTTON_WIDTH: Record<number, number> = {\n 1: 26,\n 2: 36,\n 3: 42,\n 4: 50,\n 5: 58,\n};\n\nconst PER_PAGE = 10;\n\n@Component({\n tag: 'sd-pagination',\n styleUrl: 'sd-pagination.scss',\n})\nexport class SdPagination {\n @Prop() currentPage: number = 1;\n @Prop() lastPage: number = 1;\n @Prop() simple: boolean = false;\n\n @Event() pageChange!: EventEmitter<number>;\n\n @Watch('currentPage')\n @Watch('lastPage')\n onPropChange() {\n console.log('Pagination props changed', {\n currentPage: this.currentPage,\n lastPage: this.lastPage,\n });\n }\n\n private get paginationClasses() {\n const classes = ['sd-pagination'];\n\n if (this.simple) {\n classes.push('sd-pagination--simple');\n }\n return classes.join(' ');\n }\n\n private get pageNumbers() {\n const start = Math.floor((this.currentPage - 1) / PER_PAGE) * PER_PAGE + 1;\n const end = Math.min(start + PER_PAGE - 1, this.lastPage);\n return Array.from({ length: end - start + 1 }, (_, i) => start + i);\n }\n\n private get buttonWidth() {\n const lastPageNum = this.pageNumbers.at(-1) ?? 1;\n const maxPageLength: number = lastPageNum.toString().length;\n return BUTTON_WIDTH[maxPageLength] || BUTTON_WIDTH[1];\n }\n\n private handlePageChange(page: number) {\n if (page < 1 || page > this.lastPage) return;\n this.pageChange.emit(page);\n }\n\n private handleGroupChange(direction: 'forward' | 'backward') {\n const delta = direction === 'forward' ? PER_PAGE : -PER_PAGE;\n const newPage = Math.min(Math.max(this.currentPage + delta, 1), this.lastPage);\n this.handlePageChange(newPage);\n }\n\n private get isFirstGroup() {\n return this.currentPage <= PER_PAGE;\n }\n\n private get isLastGroup() {\n const startPageGroup = Math.floor((this.currentPage - 1) / PER_PAGE) * PER_PAGE + 1;\n return startPageGroup + PER_PAGE - 1 >= this.lastPage;\n }\n\n private renderPrevButtons() {\n if (this.simple) {\n if (this.currentPage <= 1) return null;\n\n return (\n <Fragment>\n <button aria-label=\"Go to first page\" onClick={() => this.handlePageChange(1)}>\n <sd-icon name=\"arrowLeftEnd\" size=\"12\" color=\"#222222\" />\n </button>\n <button\n aria-label=\"Go to previous page\"\n onClick={() => this.handlePageChange(this.currentPage - 1)}\n >\n <sd-icon name=\"arrowLeft\" size=\"12\" color=\"#222222\" />\n </button>\n </Fragment>\n );\n }\n\n if (!this.isFirstGroup) {\n return (\n <Fragment>\n <button aria-label=\"Go to first page\" onClick={() => this.handlePageChange(1)}>\n <sd-icon name=\"arrowLeftEnd\" size=\"12\" color=\"#222222\" />\n </button>\n <button\n aria-label=\"Go to previous page group\"\n onClick={() => this.handleGroupChange('backward')}\n >\n <sd-icon name=\"arrowLeft\" size=\"12\" color=\"#222222\" />\n </button>\n </Fragment>\n );\n }\n }\n\n private renderNextButtons() {\n if (this.simple) {\n if (this.currentPage >= this.lastPage) return null;\n\n return (\n <Fragment>\n <button\n aria-label=\"Go to next page\"\n onClick={() => this.handlePageChange(this.currentPage + 1)}\n >\n <sd-icon name=\"arrowRight\" size=\"12\" color=\"#222222\" />\n </button>\n <button aria-label=\"Go to last page\" onClick={() => this.handlePageChange(this.lastPage)}>\n <sd-icon name=\"arrowRightEnd\" size=\"12\" color=\"#222222\" />\n </button>\n </Fragment>\n );\n }\n\n if (!this.isLastGroup) {\n return (\n <Fragment>\n <button aria-label=\"Go to next page group\" onClick={() => this.handleGroupChange('forward')}>\n <sd-icon name=\"arrowRight\" size=\"12\" color=\"#222222\" />\n </button>\n <button aria-label=\"Go to last page\" onClick={() => this.handlePageChange(this.lastPage)}>\n <sd-icon name=\"arrowRightEnd\" size=\"12\" color=\"#222222\" />\n </button>\n </Fragment>\n );\n }\n }\n\n render() {\n return (\n <div class={this.paginationClasses}>\n <div class=\"prepend-btns\">{this.renderPrevButtons()}</div>\n\n {this.simple ? (\n <div class=\"pagination-info\">\n <span class=\"current-page\">{this.currentPage}</span>\n <span>/</span>\n <span class=\"last-page\">{this.lastPage}</span>\n </div>\n ) : (\n this.pageNumbers.map(n => (\n <button\n type=\"button\"\n aria-current={this.currentPage === n ? 'page' : undefined}\n class={{\n 'pagination-btn': true,\n 'pagination-btn--selected': this.currentPage === n,\n }}\n disabled={this.currentPage === n}\n style={{\n '--pagination-btn-width': `${this.buttonWidth}px`,\n }}\n onClick={() => this.handlePageChange(n)}\n >\n {n}\n </button>\n ))\n )}\n\n <div class=\"append-btns\">{this.renderNextButtons()}</div>\n </div>\n );\n }\n}\n"],"version":3}
|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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/sd-pagination/sd-pagination.scss?tag=sd-pagination","src/components/sd-pagination/sd-pagination.tsx"],"sourcesContent":["@import 'variables';\n\n.sd-pagination {\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n justify-content: center;\n gap: 8px;\n color: $grey_80;\n width: 100%;\n font-size: 12px;\n\n .prepend-btns {\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n gap: 8px;\n width: 60px;\n\n button {\n width: 26px;\n height: 26px;\n border: 0;\n background: none;\n\n &:hover {\n border: 1px solid $oceanblue_70;\n border-radius: 14px;\n }\n }\n }\n\n .append-btns {\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n gap: 8px;\n width: 60px;\n\n button {\n width: 26px;\n height: 26px;\n border: 0;\n background: none;\n\n &:hover {\n border: 1px solid $oceanblue_70;\n border-radius: 14px;\n }\n }\n }\n\n .pagination-btn {\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 14px;\n outline: none;\n border: none;\n cursor: pointer;\n height: 26px;\n color: $grey_80;\n width: var(--pagination-btn-width, 26px);\n\n &--selected {\n background-color: $oceanblue_70;\n color: white;\n }\n\n &:hover {\n border: 1px solid $oceanblue_70;\n }\n }\n\n &--simple {\n .pagination-info {\n line-height: 26px;\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n gap: 8px;\n .current-page,\n .last-page {\n padding: 0 2px;\n }\n }\n }\n}\n","import { Component, Prop, Event, EventEmitter, h, Watch, Fragment } from '@stencil/core';\n\nconst BUTTON_WIDTH: Record<number, number> = {\n 1: 26,\n 2: 36,\n 3: 42,\n 4: 50,\n 5: 58,\n};\n\nconst PER_PAGE = 10;\n\n@Component({\n tag: 'sd-pagination',\n styleUrl: 'sd-pagination.scss',\n})\nexport class SdPagination {\n @Prop() currentPage: number = 1;\n @Prop() lastPage: number = 1;\n @Prop() simple: boolean = false;\n\n @Event() pageChange!: EventEmitter<number>;\n\n @Watch('currentPage')\n @Watch('lastPage')\n onPropChange() {\n console.log('Pagination props changed', {\n currentPage: this.currentPage,\n lastPage: this.lastPage,\n });\n }\n\n private get paginationClasses() {\n const classes = ['sd-pagination'];\n\n if (this.simple) {\n classes.push('sd-pagination--simple');\n }\n return classes.join(' ');\n }\n\n private get pageNumbers() {\n const start = Math.floor((this.currentPage - 1) / PER_PAGE) * PER_PAGE + 1;\n const end = Math.min(start + PER_PAGE - 1, this.lastPage);\n return Array.from({ length: end - start + 1 }, (_, i) => start + i);\n }\n\n private get buttonWidth() {\n const lastPageNum = this.pageNumbers.at(-1) ?? 1;\n const maxPageLength: number = lastPageNum.toString().length;\n return BUTTON_WIDTH[maxPageLength] || BUTTON_WIDTH[1];\n }\n\n private handlePageChange(page: number) {\n if (page < 1 || page > this.lastPage) return;\n this.pageChange.emit(page);\n }\n\n private handleGroupChange(direction: 'forward' | 'backward') {\n const delta = direction === 'forward' ? PER_PAGE : -PER_PAGE;\n const newPage = Math.min(Math.max(this.currentPage + delta, 1), this.lastPage);\n this.handlePageChange(newPage);\n }\n\n private get isFirstGroup() {\n return this.currentPage <= PER_PAGE;\n }\n\n private get isLastGroup() {\n const startPageGroup = Math.floor((this.currentPage - 1) / PER_PAGE) * PER_PAGE + 1;\n return startPageGroup + PER_PAGE - 1 >= this.lastPage;\n }\n\n private renderPrevButtons() {\n if (this.simple) {\n if (this.currentPage <= 1) return null;\n\n return (\n <Fragment>\n <button aria-label=\"Go to first page\" onClick={() => this.handlePageChange(1)}>\n <sd-icon name=\"arrowLeftEnd\" size=\"12\" color=\"#222222\" />\n </button>\n <button\n aria-label=\"Go to previous page\"\n onClick={() => this.handlePageChange(this.currentPage - 1)}\n >\n <sd-icon name=\"arrowLeft\" size=\"12\" color=\"#222222\" />\n </button>\n </Fragment>\n );\n }\n\n if (!this.isFirstGroup) {\n return (\n <Fragment>\n <button aria-label=\"Go to first page\" onClick={() => this.handlePageChange(1)}>\n <sd-icon name=\"arrowLeftEnd\" size=\"12\" color=\"#222222\" />\n </button>\n <button\n aria-label=\"Go to previous page group\"\n onClick={() => this.handleGroupChange('backward')}\n >\n <sd-icon name=\"arrowLeft\" size=\"12\" color=\"#222222\" />\n </button>\n </Fragment>\n );\n }\n }\n\n private renderNextButtons() {\n if (this.simple) {\n if (this.currentPage >= this.lastPage) return null;\n\n return (\n <Fragment>\n <button\n aria-label=\"Go to next page\"\n onClick={() => this.handlePageChange(this.currentPage + 1)}\n >\n <sd-icon name=\"arrowRight\" size=\"12\" color=\"#222222\" />\n </button>\n <button aria-label=\"Go to last page\" onClick={() => this.handlePageChange(this.lastPage)}>\n <sd-icon name=\"arrowRightEnd\" size=\"12\" color=\"#222222\" />\n </button>\n </Fragment>\n );\n }\n\n if (!this.isLastGroup) {\n return (\n <Fragment>\n <button aria-label=\"Go to next page group\" onClick={() => this.handleGroupChange('forward')}>\n <sd-icon name=\"arrowRight\" size=\"12\" color=\"#222222\" />\n </button>\n <button aria-label=\"Go to last page\" onClick={() => this.handlePageChange(this.lastPage)}>\n <sd-icon name=\"arrowRightEnd\" size=\"12\" color=\"#222222\" />\n </button>\n </Fragment>\n );\n }\n }\n\n render() {\n return (\n <div class={this.paginationClasses}>\n <div class=\"prepend-btns\">{this.renderPrevButtons()}</div>\n\n {this.simple ? (\n <div class=\"pagination-info\">\n <span class=\"current-page\">{this.currentPage}</span>\n <span>/</span>\n <span class=\"last-page\">{this.lastPage}</span>\n </div>\n ) : (\n this.pageNumbers.map(n => (\n <button\n type=\"button\"\n aria-current={this.currentPage === n ? 'page' : undefined}\n class={{\n 'pagination-btn': true,\n 'pagination-btn--selected': this.currentPage === n,\n }}\n disabled={this.currentPage === n}\n style={{\n '--pagination-btn-width': `${this.buttonWidth}px`,\n }}\n onClick={() => this.handlePageChange(n)}\n >\n {n}\n </button>\n ))\n )}\n\n <div class=\"append-btns\">{this.renderNextButtons()}</div>\n </div>\n );\n }\n}\n"],"version":3}
|
|
@@ -10,7 +10,7 @@ const SdTh = /*@__PURE__*/ proxyCustomElement(class SdTh extends H {
|
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
12
|
render() {
|
|
13
|
-
return (h(Host, { key: '
|
|
13
|
+
return (h(Host, { key: '98d5096b0d03db947da3ea0129b43a5d291d0ddd', role: "columnheader" }, h("slot", { key: '4ccaa018abd5915d2069adc01b802bb9392cc186' })));
|
|
14
14
|
}
|
|
15
15
|
static get style() { return sdThCss; }
|
|
16
16
|
}, [260, "sd-th"]);
|
|
@@ -29,6 +29,6 @@ function defineCustomElement() {
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
export { SdTh as S, defineCustomElement as d };
|
|
32
|
-
//# sourceMappingURL=p-
|
|
32
|
+
//# sourceMappingURL=p-18thvuHk.js.map
|
|
33
33
|
|
|
34
|
-
//# sourceMappingURL=p-
|
|
34
|
+
//# sourceMappingURL=p-18thvuHk.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-
|
|
1
|
+
{"file":"p-18thvuHk.js","mappings":";;AAAA,MAAM,OAAO,GAAG,+HAA+H;;MCMlI,IAAI,iBAAAA,kBAAA,CAAA,MAAA,IAAA,SAAAC,CAAA,CAAA;;;;;;;IAChB,MAAM,GAAA;QACL,QACC,CAAC,CAAA,IAAI,EAAC,EAAA,GAAA,EAAA,0CAAA,EAAA,IAAI,EAAC,cAAc,EAAA,EACxB,CAAa,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,CACP;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/sd-table/sd-th/sd-th.scss?tag=sd-th","src/components/sd-table/sd-th/sd-th.tsx"],"sourcesContent":["sd-th {\n display: table-cell;\n padding: 12px;\n font-weight: bold;\n text-align: left;\n border-bottom: 2px solid #ddd;\n background-color: #f1f1f1;\n}\n","import { Component, Host, h } from '@stencil/core';\n\n@Component({\n tag: 'sd-th',\n styleUrl: 'sd-th.scss',\n})\nexport class SdTh {\n render() {\n return (\n <Host role=\"columnheader\">\n <slot></slot>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -121,7 +121,7 @@ const SdPortal = /*@__PURE__*/ proxyCustomElement(class SdPortal extends H {
|
|
|
121
121
|
this.sdClose.emit();
|
|
122
122
|
}
|
|
123
123
|
render() {
|
|
124
|
-
return h("slot", { key: '
|
|
124
|
+
return h("slot", { key: 'f1445e7060928e48032fbed8f3b7604e626850c2' });
|
|
125
125
|
}
|
|
126
126
|
}, [772, "sd-portal", {
|
|
127
127
|
"to": [1],
|
|
@@ -145,6 +145,6 @@ function defineCustomElement() {
|
|
|
145
145
|
}
|
|
146
146
|
|
|
147
147
|
export { SdPortal as S, defineCustomElement as d };
|
|
148
|
-
//# sourceMappingURL=p-
|
|
148
|
+
//# sourceMappingURL=p-C075_t2h.js.map
|
|
149
149
|
|
|
150
|
-
//# sourceMappingURL=p-
|
|
150
|
+
//# sourceMappingURL=p-C075_t2h.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-
|
|
1
|
+
{"file":"p-C075_t2h.js","mappings":";;MAMa,QAAQ,iBAAAA,kBAAA,CAAA,MAAA,QAAA,SAAAC,CAAA,CAAA;;;;;;;;;IAEZ,EAAE,GAAyB,MAAM;IACjC,SAAS,GAAuB,IAAI;AACpC,IAAA,MAAM,GAAqB,CAAC,CAAC,EAAE,CAAC,CAAC;IACjC,MAAM,GAAW,IAAI;IACrB,IAAI,GAAY,KAAK;AAEpB,IAAA,OAAO;AAER,IAAA,SAAS;AACT,IAAA,OAAO;AACP,IAAA,KAAK;IACL,aAAa,GAAG,KAAK;AAErB,IAAA,cAAc;AACd,IAAA,gBAAgB;IAExB,gBAAgB,GAAA;AACf,QAAA,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,gBAAgB,EAAE;QACxC,IAAI,CAAC,aAAa,EAAE;QACpB,IAAI,CAAC,eAAe,EAAE;QACtB,IAAI,CAAC,cAAc,EAAE;QAC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AC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAc,CAAC,CAAC;;AAIjF,IAAA,iBAAiB,CAAC,CAAa,EAAA;AAC9B,QAAA,IAAI,IAAI,CAAC,aAAa,EAAE;AACvB,YAAA,IAAI,CAAC,aAAa,GAAG,KAAK;YAC1B;;QAED,IAAI,IAAI,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,MAAc,CAAC;YAAE;AAC9C,QAAA,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE;;IAGpB,MAAM,GAAA;QACL,OAAO,8DAAa;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/sd-portal/sd-portal.tsx"],"sourcesContent":["import { Component, Element, Event, EventEmitter, Listen, Prop, h } from '@stencil/core';\n\n@Component({\n tag: 'sd-portal',\n shadow: false,\n})\nexport class SdPortal {\n @Element() hostEl!: HTMLElement;\n @Prop() to: HTMLElement | string = 'body';\n @Prop() parentRef: HTMLElement | null = null;\n @Prop() offset: [number, number] = [0, 4];\n @Prop() zIndex: number = 9999;\n @Prop() open: boolean = false;\n\n @Event() sdClose!: EventEmitter<void>;\n\n private container?: HTMLElement;\n private wrapper?: HTMLElement;\n private rafId?: number;\n private isInsideClick = false;\n\n private resizeObserver?: ResizeObserver;\n private mutationObserver?: MutationObserver;\n\n componentDidLoad() {\n this.container = this.resolveContainer();\n this.createWrapper();\n this.moveSlotContent();\n this.updatePosition();\n this.observeParent();\n }\n\n componentDidRender() {\n if (!this.wrapper) return;\n this.wrapper.style.display = this.open ? 'block' : 'none';\n if (this.open) this.updatePosition();\n }\n\n disconnectedCallback() {\n this.unobserveParent();\n this.wrapper?.remove();\n }\n\n private resolveContainer(): HTMLElement {\n const el = typeof this.to === 'string' ? document.querySelector(this.to) : this.to;\n return el instanceof HTMLElement ? el : document.body;\n }\n\n private createWrapper() {\n this.wrapper = document.createElement('div');\n Object.assign(this.wrapper.style, {\n position: 'absolute',\n zIndex: this.zIndex.toString(),\n transition: 'opacity 0.4s',\n });\n this.container!.appendChild(this.wrapper);\n }\n\n private moveSlotContent() {\n if (!this.wrapper) return;\n const nodes = Array.from(this.hostEl.childNodes).filter(n => n.nodeType !== Node.COMMENT_NODE);\n nodes.forEach(n => this.wrapper!.appendChild(n));\n }\n\n // 위치 갱신 (scroll / resize)\n @Listen('scroll', { target: 'window' })\n @Listen('resize', { target: 'window' })\n updatePosition() {\n if (this.rafId) cancelAnimationFrame(this.rafId);\n this.rafId = requestAnimationFrame(() => {\n if (!this.parentRef || !this.wrapper) return;\n\n const parentRect = this.parentRef.getBoundingClientRect();\n const wrapperRect = this.wrapper.getBoundingClientRect();\n const viewport = {\n width: window.innerWidth,\n height: window.innerHeight,\n };\n\n let top = parentRect.bottom + window.scrollY + this.offset[1];\n let left = parentRect.left + window.scrollX + this.offset[0];\n\n // 화면 상하단 넘어갈 시 반전\n if (parentRect.bottom + wrapperRect.height + this.offset[1] > viewport.height) {\n top = parentRect.top + window.scrollY - wrapperRect.height - this.offset[1];\n }\n if (top < window.scrollY) {\n top = parentRect.bottom + window.scrollY + this.offset[1];\n }\n\n // 화면 좌우측 넘어갈 시 반전\n if (parentRect.left + wrapperRect.width + this.offset[0] > viewport.width) {\n left = parentRect.right + window.scrollX - wrapperRect.width - this.offset[0];\n }\n if (left < 0) {\n left = this.offset[0];\n }\n\n this.wrapper.style.top = `${top}px`;\n this.wrapper.style.left = `${left}px`;\n });\n }\n\n // parentRef의 이동 / 크기변경 감지\n private observeParent() {\n if (!this.parentRef) return;\n\n this.resizeObserver = new ResizeObserver(() => this.updatePosition());\n this.resizeObserver.observe(this.parentRef);\n\n this.mutationObserver = new MutationObserver(() => this.updatePosition());\n this.mutationObserver.observe(document.body, {\n childList: true,\n subtree: true,\n });\n }\n\n private unobserveParent() {\n this.resizeObserver?.disconnect();\n this.mutationObserver?.disconnect();\n }\n\n // 외부 클릭 감지\n @Listen('mousedown', { target: 'window' })\n handleMouseDown(e: MouseEvent) {\n this.isInsideClick = !!(this.wrapper && this.wrapper.contains(e.target as Node));\n }\n\n @Listen('click', { target: 'window' })\n handleWindowClick(e: MouseEvent) {\n if (this.isInsideClick) {\n this.isInsideClick = false;\n return;\n }\n if (this.wrapper?.contains(e.target as Node)) return;\n this.sdClose.emit();\n }\n\n render() {\n return <slot></slot>;\n }\n}\n"],"version":3}
|
|
@@ -10,7 +10,7 @@ const SdTbody = /*@__PURE__*/ proxyCustomElement(class SdTbody extends H {
|
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
12
|
render() {
|
|
13
|
-
return (h(Host, { key: '
|
|
13
|
+
return (h(Host, { key: 'fb4f565321e2f5308bdb5c318e385c4704730d16' }, h("slot", { key: '3ba442c1026ebbce4960031ed3113ebd16d949ec' })));
|
|
14
14
|
}
|
|
15
15
|
static get style() { return sdTbodyCss; }
|
|
16
16
|
}, [260, "sd-tbody"]);
|
|
@@ -29,6 +29,6 @@ function defineCustomElement() {
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
export { SdTbody as S, defineCustomElement as d };
|
|
32
|
-
//# sourceMappingURL=p-
|
|
32
|
+
//# sourceMappingURL=p-C79lmNgp.js.map
|
|
33
33
|
|
|
34
|
-
//# sourceMappingURL=p-
|
|
34
|
+
//# sourceMappingURL=p-C79lmNgp.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-
|
|
1
|
+
{"file":"p-C79lmNgp.js","mappings":";;AAAA,MAAM,UAAU,GAAG,mCAAmC;;MCMzC,OAAO,iBAAAA,kBAAA,CAAA,MAAA,OAAA,SAAAC,CAAA,CAAA;;;;;;;IACnB,MAAM,GAAA;QACL,QACC,EAAC,IAAI,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EACJ,CAAa,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,CACP;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/sd-table/sd-tbody/sd-tbody.scss?tag=sd-tbody","src/components/sd-table/sd-tbody/sd-tbody.tsx"],"sourcesContent":["sd-tbody {\n display: table-row-group;\n}\n","import { Component, Host, h } from '@stencil/core';\n\n@Component({\n tag: 'sd-tbody',\n styleUrl: 'sd-tbody.scss',\n})\nexport class SdTbody {\n render() {\n return (\n <Host>\n <slot></slot>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { p as proxyCustomElement, d as createEvent, h, c as Host } from './p-CbnL1UUF.js';
|
|
2
2
|
import { B as BaseDropdownEvent, S as SelectKeyboardNavigation } from './p-BvuTaRpn.js';
|
|
3
|
-
import { d as defineCustomElement$5 } from './p-
|
|
4
|
-
import { d as defineCustomElement$4 } from './p-
|
|
5
|
-
import { d as defineCustomElement$3 } from './p-
|
|
6
|
-
import { d as defineCustomElement$2 } from './p-
|
|
7
|
-
import { d as defineCustomElement$1 } from './p-
|
|
3
|
+
import { d as defineCustomElement$5 } from './p-DpcL5xdv.js';
|
|
4
|
+
import { d as defineCustomElement$4 } from './p-InrZhOLL.js';
|
|
5
|
+
import { d as defineCustomElement$3 } from './p-D7IsBL9J.js';
|
|
6
|
+
import { d as defineCustomElement$2 } from './p-C075_t2h.js';
|
|
7
|
+
import { d as defineCustomElement$1 } from './p-DTUSoHK4.js';
|
|
8
8
|
|
|
9
9
|
const sdSelectCss = ".sd-select__dropdown{overflow-y:auto;overflow-x:hidden;scroll-behavior:smooth}.sd-select__dropdown::-webkit-scrollbar{opacity:0;background:#e5e5e5}.sd-select__dropdown::-webkit-scrollbar:horizontal{height:8px}.sd-select__dropdown::-webkit-scrollbar:vertical{width:8px}.sd-select__dropdown::-webkit-scrollbar-thumb{height:80px;background-color:#cccccc;border-radius:4px}.sd-select__dropdown::-webkit-scrollbar-track{background-color:transparent}.sd-select{display:flex;width:var(--select-width, 200px);height:28px;position:relative;color:#333333;cursor:pointer;user-select:none;border:1px solid #aaaaaa;border-radius:4px;background-color:white}.sd-select:hover:not(.sd-select--disabled){background:#f6f6f6}.sd-select.sd-select--disabled{cursor:not-allowed;background-color:#eeeeee;border-color:#cccccc}.sd-select.sd-select--disabled .sd-select__label{border-right:1px solid #cccccc}.sd-select.sd-select--disabled .sd-select__trigger{color:#888888}.sd-select.sd-select--disabled .sd-select__trigger:focus,.sd-select.sd-select--disabled .sd-select__trigger:focus-visible,.sd-select.sd-select--disabled .sd-select__trigger:focus-within{outline:none !important}.sd-select__label{font-size:12px;line-height:20px;font-weight:500;color:#333333;padding:4px 12px;border-right:1px solid #cccccc;border-radius:4px 0 0 4px;background-color:#f6f6f6;display:inline-block;white-space:nowrap}.sd-select__container{position:relative;width:100%;display:flex}.sd-select__container .sd-select__trigger{padding:4px 20px 4px 12px;display:flex;width:100%;align-items:center}.sd-select__container .sd-select__trigger .sd-select__value{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:20px;font-size:12px;font-weight:400;text-align:left}.sd-select__container .sd-select__trigger .sd-select__clear{margin:0 4px;width:8px;height:8px;background-color:transparent;outline:none;border:none}.sd-select__container .sd-select__arrow{position:absolute;top:8px;right:8px;width:12px;height:12px;color:#888888;transition:transform 0.3s ease}.sd-select__container .sd-select__arrow--open{transform:rotate(180deg)}.sd-select__dropdown{width:var(--select-dropdown-width, 200px);max-height:var(--select-dropdown-height, 260px);padding-bottom:2px;background-color:white;box-shadow:2px 2px 12px 2px rgba(0, 0, 0, 0.1);border-radius:4px;overflow-y:auto;color:#333333;display:flex;flex-direction:column}.sd-select__dropdown .sd-select__search-container{position:sticky;top:0;display:flex;width:100%;background-color:white;align-items:center;padding:4px 8px}.sd-select__dropdown .sd-select__search-container--scrolled{box-shadow:2px 2px 8px 2px rgba(0, 0, 0, 0.2)}.sd-select__dropdown .sd-select__option-placeholder{padding:4px 12px;font-size:12px;line-height:20px;text-align:left}";
|
|
10
10
|
|
|
@@ -318,6 +318,6 @@ function defineCustomElement() {
|
|
|
318
318
|
}
|
|
319
319
|
|
|
320
320
|
export { SdSelect as S, defineCustomElement as d };
|
|
321
|
-
//# sourceMappingURL=p-
|
|
321
|
+
//# sourceMappingURL=p-Ce6LhsfH.js.map
|
|
322
322
|
|
|
323
|
-
//# sourceMappingURL=p-
|
|
323
|
+
//# sourceMappingURL=p-Ce6LhsfH.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-ybbnPl4X.js","mappings":";;;;;;;;AAAA,MAAM,WAAW,GAAG,4sFAA4sF;;MCmDntF,QAAS,iBAAAA,kBAAA,CAAA,MAAA,QAAA,SAAQ,iBAAiB,CAAA;;;;;;;;;;;IAIrB,KAAK,GAA2B,IAAI;IACrD,KAAK,GAAW,EAAE;IACD,OAAO,GAAmB,EAAE;IAC7C,WAAW,GAAW,IAAI;IAC1B,iBAAiB,GAAW,WAAW;IACvC,KAAK,GAAW,OAAO;IACvB,cAAc,GAAW,OAAO;IAChC,QAAQ,GAAY,KAAK;IACzB,SAAS,GAAY,KAAK;IAC1B,UAAU,GAAY,KAAK;;AAG3B,IAAA,cAAc;;AAGb,IAAA,eAAe,GAAG,IAAI,CAAC,OAAO;IAC9B,MAAM,GAAY,KAAK;IACvB,UAAU,GAAkB,IAAI;IAChC,SAAS,GAAW,EAAE;IACtB,UAAU,GAAY,KAAK;;AAG3B,IAAA,QAAQ;AACR,IAAA,YAAY;AAEb,IAAA,SAAS;AACT,IAAA,SAAS;AACT,IAAA,SAAS;AACT,IAAA,WAAW;IAGnB,YAAY,GAAA;AACX,QAAA,MAAM,cAAc,GAAG,IAAI,CAAC,iBAAiB,EAAE;QAC/C,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,EAAE,KAAK,EAAE,cAAc,EAAE,KAAK,IAAI,IAAI,EAAE,MAAM,EAAE,cAAc,IAAI,IAAI,EAAE,CAAC;;IAI9F,cAAc,GAAA;AACb,QAAA,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,OAAO;QACnC,IAAI,CAAC,aAAa,EAAE;;IAIrB,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;AACxC,aAAC,EACD,SAAS,EAAE,MAAK;AACf,gBAAA,IAAI,CAAC,SAAS,GAAG,EAAE;AACpB,aAAC,EAAA,EAED,CACC,CAAA,SAAA,EAAA,EAAA,IAAI,EAAC,QAAQ,EACb,IAAI,EAAE,EAAE,EACR,KAAK,EAAC,SAAS,EACf,KAAK,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE,EAC7B,IAAI,EAAC,QAAQ,EAAA,CACH,CACD,CACN,CACN,EACA,IAAI,CAAC,eAAe,CAAC,MAAM,GAAG,CAAC,IAC/B,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,KAAK,MACtC,CAAM,CAAA,MAAA,EAAA,EAAA,IAAI,EAAE,CAAA,OAAA,EAAU,MAAM,CAAC,KAAK,CAAE,CAAA,EAAA,EACnC,CACC,CAAA,kBAAA,EAAA,EAAA,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,KAAK,EACZ,UAAU,EAAE,MAAM,CAAC,KAAK,KAAK,IAAI,CAAC,KAAK,EACvC,SAAS,EAAE,KAAK,KAAK,IAAI,CAAC,SAAS,EACnC,aAAa,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,EAC1C,CAAA,CACd,CACP,CAAC,KAEF,CAAA,CAAA,MAAA,EAAA,EAAM,IAAI,EAAC,oBAAoB,EAAA,EAC9B,CAAA,CAAA,KAAA,EAAA,EAAK,KAAK,EAAE,+BAA+B,EAAA,EAAG,IAAI,CAAC,iBAAiB,CAAO,CACrE,CACP,CACI,CACK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement"],"sources":["src/components/sd-select/sd-select.scss?tag=sd-select","src/components/sd-select/sd-select.tsx"],"sourcesContent":["@import 'variables';\n@import 'extend';\n\n.sd-select {\n display: flex;\n width: var(--select-width, 200px);\n height: 28px;\n position: relative;\n color: $grey_90;\n cursor: pointer;\n user-select: none;\n border: 1px solid $grey_55;\n border-radius: 4px;\n background-color: white;\n\n &:hover:not(.sd-select--disabled) {\n background: $grey_10;\n }\n\n &.sd-select--disabled {\n cursor: not-allowed;\n background-color: $grey_20;\n border-color: $grey_45;\n\n .sd-select__label {\n border-right: 1px solid $grey_45;\n }\n\n .sd-select__trigger {\n color: $grey_65;\n &:focus,\n &:focus-visible,\n &:focus-within {\n outline: none !important;\n }\n }\n }\n\n &__label {\n font-size: 12px;\n line-height: 20px;\n font-weight: 500;\n color: $grey_90;\n padding: 4px 12px;\n border-right: 1px solid $grey_45;\n border-radius: 4px 0 0 4px;\n background-color: $grey_10;\n display: inline-block;\n white-space: nowrap;\n }\n\n &__container {\n position: relative;\n width: 100%;\n display: flex;\n\n .sd-select__trigger {\n padding: 4px 20px 4px 12px;\n display: flex;\n width: 100%;\n align-items: center;\n\n .sd-select__value {\n flex: 1;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n line-height: 20px;\n font-size: 12px;\n font-weight: 400;\n text-align: left;\n }\n\n .sd-select__clear {\n margin: 0 4px;\n width: 8px;\n height: 8px;\n background-color: transparent;\n outline: none;\n border: none;\n }\n }\n\n .sd-select__arrow {\n position: absolute;\n top: 8px;\n right: 8px;\n width: 12px;\n height: 12px;\n color: $grey_65;\n transition: transform 0.3s ease;\n\n &--open {\n transform: rotate(180deg);\n }\n }\n }\n}\n\n.sd-select__dropdown {\n @extend %scrollBar;\n width: var(--select-dropdown-width, 200px);\n max-height: var(--select-dropdown-height, 260px);\n padding-bottom: 2px;\n background-color: white;\n box-shadow: 2px 2px 12px 2px rgba(0, 0, 0, 0.1);\n border-radius: 4px;\n overflow-y: auto;\n color: $grey_90;\n display: flex;\n flex-direction: column;\n\n .sd-select__search-container {\n position: sticky;\n top: 0;\n display: flex;\n width: 100%;\n background-color: white;\n align-items: center;\n padding: 4px 8px;\n\n &--scrolled {\n box-shadow: 2px 2px 8px 2px rgba(0, 0, 0, 0.2);\n }\n }\n\n .sd-select__option-placeholder {\n padding: 4px 12px;\n font-size: 12px;\n line-height: 20px;\n text-align: left;\n }\n}\n","import {\n Component,\n Event,\n EventEmitter,\n Host,\n Prop,\n State,\n h,\n Element,\n Watch,\n} from '@stencil/core';\nimport { BaseDropdownEvent } from '../../utils/base-dropdown-event';\nimport { SelectKeyboardNavigation } from '../../utils/select-keyboard-navigation';\n\nexport interface SelectOption {\n value: string | number;\n label: string;\n disabled?: boolean;\n}\n\nexport type SelectGroupOptionType = 'group' | 'subgroup' | 'item' | 'all';\n\nexport interface SelectOptionGroup extends SelectOption {\n type: SelectGroupOptionType;\n parent?: string;\n}\n\nexport interface SelectStyleProps {\n containerStyle?: { [key: string]: string };\n triggerStyle?: { [key: string]: string };\n dropdownStyle?: { [key: string]: string };\n optionStyle?: { [key: string]: string };\n labelStyle?: { [key: string]: string };\n}\n\nexport interface SelectEvents {\n sdChange: {\n value: string | number | null;\n option: SelectOption | null;\n };\n dropDownShow: { isOpen: boolean };\n}\n\nexport interface SelectMultipleEvents extends Pick<SelectEvents, 'dropDownShow' | 'dropDownShow'> {\n sdChange: SelectOption[] | null;\n}\n\n@Component({\n tag: 'sd-select',\n styleUrl: 'sd-select.scss',\n})\nexport class SdSelect extends BaseDropdownEvent {\n @Element() el!: HTMLElement;\n\n // props\n @Prop({ mutable: true }) value: string | number | null = null;\n @Prop() label: string = '';\n @Prop({ mutable: true }) options: SelectOption[] = [];\n @Prop() placeholder: string = '선택';\n @Prop() optionPlaceholder: string = '옵션이 없습니다.';\n @Prop() width: string = '200px';\n @Prop() dropdownHeight: string = '260px';\n @Prop() disabled: boolean = false;\n @Prop() clearable: boolean = false;\n @Prop() searchable: boolean = false;\n\n // props - custom slots\n @Prop() optionRenderer?: (option: SelectOption, index: number, isSelected: boolean) => any;\n\n // states\n @State() filteredOptions = this.options;\n @State() isOpen: boolean = false;\n @State() searchText: string | null = null;\n @State() itemIndex: number = -1;\n @State() isScrolled: boolean = false;\n\n // events\n @Event() sdChange?: EventEmitter<SelectEvents['sdChange']>;\n @Event() dropDownShow?: EventEmitter<SelectEvents['dropDownShow']>;\n\n private selectRef?: HTMLElement;\n private searchRef?: HTMLSdInputElement;\n private optionRef?: HTMLSdSelectOptionElement;\n private dropdownRef?: HTMLElement;\n\n @Watch('value')\n valueChanged() {\n const selectedOption = this.getSelectedOption();\n this.sdChange?.emit({ value: selectedOption?.value || null, option: selectedOption || null });\n }\n\n @Watch('options')\n optionsChanged() {\n this.filteredOptions = this.options;\n this.filterOptions();\n }\n\n @Watch('searchText')\n searchTextChanged() {\n this.filterOptions();\n }\n\n @Watch('itemIndex')\n async itemIndexChanged(newIndex: number, oldIndex: number) {\n if (this.searchable) {\n const searchInput = await this.getNativeInputElement();\n if (this.itemIndex === -1) {\n searchInput?.focus();\n return;\n } else if (searchInput?.matches(':focus')) {\n searchInput?.blur();\n }\n }\n\n const optionElements =\n this.dropdownRef?.querySelectorAll('.sd-select__dropdown sd-select-option') || [];\n const currentItem = optionElements?.[this.itemIndex];\n\n if (!currentItem || !this.isOpen) return;\n\n this.optionRef = currentItem as HTMLSdSelectOptionElement;\n const isOptionDisabled = await this.optionRef.isDisabled();\n\n if (isOptionDisabled) {\n newIndex > oldIndex ? this.itemIndex++ : this.itemIndex--;\n return;\n }\n\n this.scrollToOption(currentItem as HTMLElement);\n }\n\n componentWillLoad() {\n // props가 모두 설정된 후에 실행되므로 올바른 options 값을 가져올 수 있음\n this.filteredOptions = this.options;\n this.initializeEvent(); // global dropdown Manager에 등록 + 이벤트 핸들러 초기화\n }\n\n disconnectedCallback() {\n this.cleanupEvent(); // global dropdown Manager에서 제거 + 이벤트 정리\n }\n\n @Watch('isOpen')\n async isOpenChanged() {\n // Base class의 이벤트 관리 호출 - 다른 select와의 이벤트 충돌 방지\n this.onDropdownToggle(this.isOpen);\n\n const selectedOption = this.getSelectedOption();\n if (!selectedOption) {\n this.itemIndex = /* this.searchable ? */ -1 /* : 0 */;\n } else {\n this.itemIndex = this.options.indexOf(selectedOption);\n }\n\n this.dropDownShow?.emit({ isOpen: this.isOpen });\n\n if (this.isOpen === false) return;\n\n await new Promise(resolve => setTimeout(resolve, 10));\n\n const optionElements =\n this.dropdownRef?.querySelectorAll('.sd-select__dropdown sd-select-option') || [];\n\n const currentItem = optionElements?.[this.itemIndex];\n\n if (this.searchable) {\n const searchInput = await this.getNativeInputElement();\n searchInput?.focus();\n }\n\n if (!currentItem) return;\n\n await new Promise(resolve => setTimeout(resolve, 10));\n this.scrollToOption(currentItem as HTMLElement);\n }\n\n protected handleDocumentClick(event: Event): void {\n if (!this.selectRef?.contains(event.target as Node)) {\n this.isOpen = false;\n }\n }\n\n protected handleDocumentKeydown(keyboardEvent: KeyboardEvent): void {\n keyboardEvent.stopPropagation();\n const targetKey = ['ArrowDown', 'ArrowUp', 'Enter', 'Escape'];\n if (!targetKey.includes(keyboardEvent.key)) return;\n\n keyboardEvent.preventDefault();\n switch (keyboardEvent.key) {\n case 'ArrowDown':\n case 'ArrowUp':\n const keyboardNavigation = new SelectKeyboardNavigation(this.searchable, this.filteredOptions);\n const nextIndex = keyboardNavigation.getNextIndex(this.itemIndex, keyboardEvent.key);\n this.itemIndex = nextIndex;\n break;\n case 'Enter':\n const selectedOption = this.filteredOptions[this.itemIndex];\n if (selectedOption && !selectedOption.disabled) {\n this.value = selectedOption.value;\n this.searchText = null;\n this.isOpen = false;\n }\n break;\n case 'Escape':\n this.isOpen = false;\n break;\n }\n }\n\n // closeDropdown 메서드 구현 (Manager에서 호출됨)\n closeDropdown() {\n this.isOpen = false;\n }\n\n // event handlers\n handleTriggerClick = (event: Event) => {\n event.stopPropagation();\n\n if (!this.disabled) {\n this.isOpen = !this.isOpen;\n this.dropDownShow?.emit({ isOpen: this.isOpen });\n }\n };\n\n handleOptionClick = (detail: { option: SelectOption; event: Event }) => {\n const { option, event } = detail;\n event.stopPropagation();\n\n if (!option.disabled) {\n this.value = option.value;\n this.isOpen = false;\n }\n };\n\n private filterOptions() {\n if (!this.searchText || this.searchText.trim() === '') {\n // 검색어가 없으면 전체 옵션 표시\n this.filteredOptions = this.options;\n } else {\n // 검색어가 있으면 필터링\n this.filteredOptions = this.options.filter(option =>\n option.label.toLowerCase().includes(this.searchText!.toLowerCase()),\n );\n }\n }\n\n private getSelectedOption(): SelectOption | undefined {\n return this.options.find(option => option.value === this.value);\n }\n\n private handleDropdownScroll = (event: Event) => {\n const target = event.target as HTMLElement;\n const scrollTop = target.scrollTop;\n\n // 스크롤이 조금이라도 되면 그림자 표시\n this.isScrolled = scrollTop > 0;\n };\n\n private async getNativeInputElement(): Promise<HTMLInputElement | null> {\n if (this.searchRef) {\n return this.searchRef.getNativeElement();\n }\n return null;\n }\n\n private scrollToOption(optionElement: HTMLElement) {\n if (!this.dropdownRef || !optionElement) return;\n\n const dropdown = this.dropdownRef;\n const optionTop = optionElement.offsetTop;\n const optionHeight = optionElement.offsetHeight;\n const dropdownScrollTop = dropdown.scrollTop;\n const dropdownHeight = dropdown.clientHeight;\n\n const searchContainer = dropdown.querySelector('.sd-select__search-container');\n const searchOffset = searchContainer ? (searchContainer as HTMLElement).offsetHeight : 0;\n\n const visibleTop = dropdownScrollTop + searchOffset;\n const visibleBottom = dropdownScrollTop + dropdownHeight;\n\n if (optionTop < visibleTop) {\n dropdown.scrollTop = optionTop - searchOffset;\n } else if (optionTop + optionHeight > visibleBottom) {\n dropdown.scrollTop = optionTop + optionHeight - dropdownHeight + searchOffset;\n }\n }\n\n // render method\n render() {\n const style = {\n '--select-width': this.width || '200px',\n '--select-dropdown-height': this.dropdownHeight || '260px',\n };\n\n return (\n <Host style={style}>\n <div\n class={{\n 'sd-select': true,\n 'sd-select--open': this.isOpen,\n 'sd-select--disabled': this.disabled,\n }}\n ref={el => (this.selectRef = el)}\n >\n {this.renderLabel(this.label)}\n <div class=\"sd-select__container\">\n {this.renderTrigger()}\n {this.renderDropdown()}\n </div>\n </div>\n </Host>\n );\n }\n\n private renderLabel(label?: string) {\n if (!label) return null;\n\n return <label class=\"sd-select__label\">{label}</label>;\n }\n\n private renderTrigger() {\n const selectedOption = this.getSelectedOption();\n return (\n <div\n class=\"sd-select__trigger\"\n tabindex={this.disabled ? -1 : 0}\n onClick={this.handleTriggerClick}\n >\n <span class=\"sd-select__value\">{selectedOption ? selectedOption.label : this.placeholder}</span>\n {this.clearable && selectedOption && !this.disabled && (\n <sd-icon\n key=\"clear-icon\"\n name=\"close\"\n size={10}\n color=\"#888\"\n class=\"sd-select__clear\"\n onClick={event => {\n event.stopPropagation();\n this.value = null;\n }}\n ></sd-icon>\n )}\n\n <sd-icon\n key=\"arrow-icon\"\n name=\"arrowDown\"\n color=\"#888\"\n class={{ 'sd-select__arrow': true, 'sd-select__arrow--open': this.isOpen }}\n ></sd-icon>\n </div>\n );\n }\n\n private renderDropdown() {\n const style = {\n '--select-dropdown-width': this.width || '200px',\n '--select-dropdown-height': this.dropdownHeight || '260px',\n };\n if (this.isOpen === false) return null;\n\n return (\n <sd-portal open={this.isOpen} parentRef={this.selectRef} onSdClose={this.closeDropdown}>\n <div\n class=\"sd-select__dropdown\"\n style={style}\n onScroll={this.handleDropdownScroll}\n ref={el => (this.dropdownRef = el)}\n >\n {this.searchable && (\n <div\n class={{\n 'sd-select__search-container': true,\n 'sd-select__search-container--scrolled': this.isScrolled,\n }}\n onClick={event => event.stopPropagation()}\n >\n <sd-input\n ref={el => (this.searchRef = el)}\n value={this.searchText}\n placeholder=\"검색\"\n clearable\n inputStyle={{ 'padding-left': '8px' }}\n autofocus\n onSdInput={event => {\n this.searchText = String(event?.detail);\n }}\n onSdFocus={() => {\n this.itemIndex = -1;\n }}\n >\n <sd-icon\n name=\"search\"\n size={16}\n color=\"#737373\"\n style={{ marginRight: '4px' }}\n slot=\"prefix\"\n ></sd-icon>\n </sd-input>\n </div>\n )}\n {this.filteredOptions.length > 0 ? (\n this.filteredOptions.map((option, index) => (\n <slot name={`option-${option.value}`}>\n <sd-select-option\n option={option}\n index={index}\n isSelected={option.value === this.value}\n isFocused={index === this.itemIndex}\n onOptionClick={({ detail }) => this.handleOptionClick(detail)}\n ></sd-select-option>\n </slot>\n ))\n ) : (\n <slot name=\"option-placeholder\">\n <div class={'sd-select__option-placeholder'}>{this.optionPlaceholder}</div>\n </slot>\n )}\n </div>\n </sd-portal>\n );\n }\n}\n\n{\n /*\n <sd-select id=\"select-1\">\n <!-- <div slot=\"option-placeholder\">옵션이 없습니다.</div> -->\n </sd-select>\n <sd-select id=\"select-2\"> </sd-select>\n <sd-select id=\"select-3\" searchable clearable>\n <div slot=\"option-3\">test</div>\n </sd-select>\n\n <script>\n document.addEventListener('DOMContentLoaded', () => {\n const select1 = document.getElementById('select-1');\n const select2 = document.getElementById('select-2');\n const select3 = document.getElementById('select-3');\n const select = document.querySelector('sd-select slot[name=\"option-3\"]');\n select1.optionPlaceholder = 'No options available';\n\n const options = [\n { label: 'Option 1', value: '1' },\n { label: 'Option 2', value: '2' },\n { label: 'Option 3', value: '3', disabled: true },\n { label: 'Option 4', value: '4' },\n { label: 'Option 5', value: '5' },\n { label: 'Option 6', value: '6' },\n { label: 'Option 7', value: '7', disabled: true },\n { label: 'Option 8', value: '8' },\n { label: 'Option 9', value: '9' },\n { label: 'Option 10', value: '10' },\n { label: 'Option 11', value: '11', disabled: true },\n { label: 'Option 12', value: '12' },\n { label: 'Option 13', value: '13' },\n { label: 'Option 14', value: '14' },\n { label: 'Option 15', value: '15', disabled: true },\n { label: 'Option 16', value: '16' },\n { label: 'Option 17', value: '17' },\n { label: 'Option 18', value: '18' },\n { label: 'Option 19', value: '19', disabled: true },\n { label: 'Option 20', value: '20' },\n { label: 'Option 21', value: '21' },\n { label: 'Option 22', value: '22' },\n { label: 'Option 23', value: '23', disabled: true },\n { label: 'Option 24', value: '24' },\n ];\n\n select2.options = options;\n select3.options = options;\n });\n </script>\n\n */\n}\n"],"version":3}
|
|
1
|
+
{"file":"p-Ce6LhsfH.js","mappings":";;;;;;;;AAAA,MAA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H,CACD,CACN,CACN,EACA,IAAI,CAAC,eAAe,CAAC,MAAM,GAAG,CAAC,IAC/B,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,KAAK,MACtC,CAAM,CAAA,MAAA,EAAA,EAAA,IAAI,EAAE,CAAA,OAAA,EAAU,MAAM,CAAC,KAAK,CAAE,CAAA,EAAA,EACnC,CACC,CAAA,kBAAA,EAAA,EAAA,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,KAAK,EACZ,UAAU,EAAE,MAAM,CAAC,KAAK,KAAK,IAAI,CAAC,KAAK,EACvC,SAAS,EAAE,KAAK,KAAK,IAAI,CAAC,SAAS,EACnC,aAAa,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,EAC1C,CAAA,CACd,CACP,CAAC,KAEF,CAAA,CAAA,MAAA,EAAA,EAAM,IAAI,EAAC,oBAAoB,EAAA,EAC9B,CAAA,CAAA,KAAA,EAAA,EAAK,KAAK,EAAE,+BAA+B,EAAA,EAAG,IAAI,CAAC,iBAAiB,CAAO,CACrE,CACP,CACI,CACK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement"],"sources":["src/components/sd-select/sd-select.scss?tag=sd-select","src/components/sd-select/sd-select.tsx"],"sourcesContent":["@import 'variables';\n@import 'extend';\n\n.sd-select {\n display: flex;\n width: var(--select-width, 200px);\n height: 28px;\n position: relative;\n color: $grey_90;\n cursor: pointer;\n user-select: none;\n border: 1px solid $grey_55;\n border-radius: 4px;\n background-color: white;\n\n &:hover:not(.sd-select--disabled) {\n background: $grey_10;\n }\n\n &.sd-select--disabled {\n cursor: not-allowed;\n background-color: $grey_20;\n border-color: $grey_45;\n\n .sd-select__label {\n border-right: 1px solid $grey_45;\n }\n\n .sd-select__trigger {\n color: $grey_65;\n &:focus,\n &:focus-visible,\n &:focus-within {\n outline: none !important;\n }\n }\n }\n\n &__label {\n font-size: 12px;\n line-height: 20px;\n font-weight: 500;\n color: $grey_90;\n padding: 4px 12px;\n border-right: 1px solid $grey_45;\n border-radius: 4px 0 0 4px;\n background-color: $grey_10;\n display: inline-block;\n white-space: nowrap;\n }\n\n &__container {\n position: relative;\n width: 100%;\n display: flex;\n\n .sd-select__trigger {\n padding: 4px 20px 4px 12px;\n display: flex;\n width: 100%;\n align-items: center;\n\n .sd-select__value {\n flex: 1;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n line-height: 20px;\n font-size: 12px;\n font-weight: 400;\n text-align: left;\n }\n\n .sd-select__clear {\n margin: 0 4px;\n width: 8px;\n height: 8px;\n background-color: transparent;\n outline: none;\n border: none;\n }\n }\n\n .sd-select__arrow {\n position: absolute;\n top: 8px;\n right: 8px;\n width: 12px;\n height: 12px;\n color: $grey_65;\n transition: transform 0.3s ease;\n\n &--open {\n transform: rotate(180deg);\n }\n }\n }\n}\n\n.sd-select__dropdown {\n @extend %scrollBar;\n width: var(--select-dropdown-width, 200px);\n max-height: var(--select-dropdown-height, 260px);\n padding-bottom: 2px;\n background-color: white;\n box-shadow: 2px 2px 12px 2px rgba(0, 0, 0, 0.1);\n border-radius: 4px;\n overflow-y: auto;\n color: $grey_90;\n display: flex;\n flex-direction: column;\n\n .sd-select__search-container {\n position: sticky;\n top: 0;\n display: flex;\n width: 100%;\n background-color: white;\n align-items: center;\n padding: 4px 8px;\n\n &--scrolled {\n box-shadow: 2px 2px 8px 2px rgba(0, 0, 0, 0.2);\n }\n }\n\n .sd-select__option-placeholder {\n padding: 4px 12px;\n font-size: 12px;\n line-height: 20px;\n text-align: left;\n }\n}\n","import {\n Component,\n Event,\n EventEmitter,\n Host,\n Prop,\n State,\n h,\n Element,\n Watch,\n} from '@stencil/core';\nimport { BaseDropdownEvent } from '../../utils/base-dropdown-event';\nimport { SelectKeyboardNavigation } from '../../utils/select-keyboard-navigation';\n\nexport interface SelectOption {\n value: string | number;\n label: string;\n disabled?: boolean;\n}\n\nexport type SelectGroupOptionType = 'group' | 'subgroup' | 'item' | 'all';\n\nexport interface SelectOptionGroup extends SelectOption {\n type: SelectGroupOptionType;\n parent?: string;\n}\n\nexport interface SelectStyleProps {\n containerStyle?: { [key: string]: string };\n triggerStyle?: { [key: string]: string };\n dropdownStyle?: { [key: string]: string };\n optionStyle?: { [key: string]: string };\n labelStyle?: { [key: string]: string };\n}\n\nexport interface SelectEvents {\n sdChange: {\n value: string | number | null;\n option: SelectOption | null;\n };\n dropDownShow: { isOpen: boolean };\n}\n\nexport interface SelectMultipleEvents extends Pick<SelectEvents, 'dropDownShow' | 'dropDownShow'> {\n sdChange: SelectOption[] | null;\n}\n\n@Component({\n tag: 'sd-select',\n styleUrl: 'sd-select.scss',\n})\nexport class SdSelect extends BaseDropdownEvent {\n @Element() el!: HTMLElement;\n\n // props\n @Prop({ mutable: true }) value: string | number | null = null;\n @Prop() label: string = '';\n @Prop({ mutable: true }) options: SelectOption[] = [];\n @Prop() placeholder: string = '선택';\n @Prop() optionPlaceholder: string = '옵션이 없습니다.';\n @Prop() width: string = '200px';\n @Prop() dropdownHeight: string = '260px';\n @Prop() disabled: boolean = false;\n @Prop() clearable: boolean = false;\n @Prop() searchable: boolean = false;\n\n // props - custom slots\n @Prop() optionRenderer?: (option: SelectOption, index: number, isSelected: boolean) => any;\n\n // states\n @State() filteredOptions = this.options;\n @State() isOpen: boolean = false;\n @State() searchText: string | null = null;\n @State() itemIndex: number = -1;\n @State() isScrolled: boolean = false;\n\n // events\n @Event() sdChange?: EventEmitter<SelectEvents['sdChange']>;\n @Event() dropDownShow?: EventEmitter<SelectEvents['dropDownShow']>;\n\n private selectRef?: HTMLElement;\n private searchRef?: HTMLSdInputElement;\n private optionRef?: HTMLSdSelectOptionElement;\n private dropdownRef?: HTMLElement;\n\n @Watch('value')\n valueChanged() {\n const selectedOption = this.getSelectedOption();\n this.sdChange?.emit({ value: selectedOption?.value || null, option: selectedOption || null });\n }\n\n @Watch('options')\n optionsChanged() {\n this.filteredOptions = this.options;\n this.filterOptions();\n }\n\n @Watch('searchText')\n searchTextChanged() {\n this.filterOptions();\n }\n\n @Watch('itemIndex')\n async itemIndexChanged(newIndex: number, oldIndex: number) {\n if (this.searchable) {\n const searchInput = await this.getNativeInputElement();\n if (this.itemIndex === -1) {\n searchInput?.focus();\n return;\n } else if (searchInput?.matches(':focus')) {\n searchInput?.blur();\n }\n }\n\n const optionElements =\n this.dropdownRef?.querySelectorAll('.sd-select__dropdown sd-select-option') || [];\n const currentItem = optionElements?.[this.itemIndex];\n\n if (!currentItem || !this.isOpen) return;\n\n this.optionRef = currentItem as HTMLSdSelectOptionElement;\n const isOptionDisabled = await this.optionRef.isDisabled();\n\n if (isOptionDisabled) {\n newIndex > oldIndex ? this.itemIndex++ : this.itemIndex--;\n return;\n }\n\n this.scrollToOption(currentItem as HTMLElement);\n }\n\n componentWillLoad() {\n // props가 모두 설정된 후에 실행되므로 올바른 options 값을 가져올 수 있음\n this.filteredOptions = this.options;\n this.initializeEvent(); // global dropdown Manager에 등록 + 이벤트 핸들러 초기화\n }\n\n disconnectedCallback() {\n this.cleanupEvent(); // global dropdown Manager에서 제거 + 이벤트 정리\n }\n\n @Watch('isOpen')\n async isOpenChanged() {\n // Base class의 이벤트 관리 호출 - 다른 select와의 이벤트 충돌 방지\n this.onDropdownToggle(this.isOpen);\n\n const selectedOption = this.getSelectedOption();\n if (!selectedOption) {\n this.itemIndex = /* this.searchable ? */ -1 /* : 0 */;\n } else {\n this.itemIndex = this.options.indexOf(selectedOption);\n }\n\n this.dropDownShow?.emit({ isOpen: this.isOpen });\n\n if (this.isOpen === false) return;\n\n await new Promise(resolve => setTimeout(resolve, 10));\n\n const optionElements =\n this.dropdownRef?.querySelectorAll('.sd-select__dropdown sd-select-option') || [];\n\n const currentItem = optionElements?.[this.itemIndex];\n\n if (this.searchable) {\n const searchInput = await this.getNativeInputElement();\n searchInput?.focus();\n }\n\n if (!currentItem) return;\n\n await new Promise(resolve => setTimeout(resolve, 10));\n this.scrollToOption(currentItem as HTMLElement);\n }\n\n protected handleDocumentClick(event: Event): void {\n if (!this.selectRef?.contains(event.target as Node)) {\n this.isOpen = false;\n }\n }\n\n protected handleDocumentKeydown(keyboardEvent: KeyboardEvent): void {\n keyboardEvent.stopPropagation();\n const targetKey = ['ArrowDown', 'ArrowUp', 'Enter', 'Escape'];\n if (!targetKey.includes(keyboardEvent.key)) return;\n\n keyboardEvent.preventDefault();\n switch (keyboardEvent.key) {\n case 'ArrowDown':\n case 'ArrowUp':\n const keyboardNavigation = new SelectKeyboardNavigation(this.searchable, this.filteredOptions);\n const nextIndex = keyboardNavigation.getNextIndex(this.itemIndex, keyboardEvent.key);\n this.itemIndex = nextIndex;\n break;\n case 'Enter':\n const selectedOption = this.filteredOptions[this.itemIndex];\n if (selectedOption && !selectedOption.disabled) {\n this.value = selectedOption.value;\n this.searchText = null;\n this.isOpen = false;\n }\n break;\n case 'Escape':\n this.isOpen = false;\n break;\n }\n }\n\n // closeDropdown 메서드 구현 (Manager에서 호출됨)\n closeDropdown() {\n this.isOpen = false;\n }\n\n // event handlers\n handleTriggerClick = (event: Event) => {\n event.stopPropagation();\n\n if (!this.disabled) {\n this.isOpen = !this.isOpen;\n this.dropDownShow?.emit({ isOpen: this.isOpen });\n }\n };\n\n handleOptionClick = (detail: { option: SelectOption; event: Event }) => {\n const { option, event } = detail;\n event.stopPropagation();\n\n if (!option.disabled) {\n this.value = option.value;\n this.isOpen = false;\n }\n };\n\n private filterOptions() {\n if (!this.searchText || this.searchText.trim() === '') {\n // 검색어가 없으면 전체 옵션 표시\n this.filteredOptions = this.options;\n } else {\n // 검색어가 있으면 필터링\n this.filteredOptions = this.options.filter(option =>\n option.label.toLowerCase().includes(this.searchText!.toLowerCase()),\n );\n }\n }\n\n private getSelectedOption(): SelectOption | undefined {\n return this.options.find(option => option.value === this.value);\n }\n\n private handleDropdownScroll = (event: Event) => {\n const target = event.target as HTMLElement;\n const scrollTop = target.scrollTop;\n\n // 스크롤이 조금이라도 되면 그림자 표시\n this.isScrolled = scrollTop > 0;\n };\n\n private async getNativeInputElement(): Promise<HTMLInputElement | null> {\n if (this.searchRef) {\n return this.searchRef.getNativeElement();\n }\n return null;\n }\n\n private scrollToOption(optionElement: HTMLElement) {\n if (!this.dropdownRef || !optionElement) return;\n\n const dropdown = this.dropdownRef;\n const optionTop = optionElement.offsetTop;\n const optionHeight = optionElement.offsetHeight;\n const dropdownScrollTop = dropdown.scrollTop;\n const dropdownHeight = dropdown.clientHeight;\n\n const searchContainer = dropdown.querySelector('.sd-select__search-container');\n const searchOffset = searchContainer ? (searchContainer as HTMLElement).offsetHeight : 0;\n\n const visibleTop = dropdownScrollTop + searchOffset;\n const visibleBottom = dropdownScrollTop + dropdownHeight;\n\n if (optionTop < visibleTop) {\n dropdown.scrollTop = optionTop - searchOffset;\n } else if (optionTop + optionHeight > visibleBottom) {\n dropdown.scrollTop = optionTop + optionHeight - dropdownHeight + searchOffset;\n }\n }\n\n // render method\n render() {\n const style = {\n '--select-width': this.width || '200px',\n '--select-dropdown-height': this.dropdownHeight || '260px',\n };\n\n return (\n <Host style={style}>\n <div\n class={{\n 'sd-select': true,\n 'sd-select--open': this.isOpen,\n 'sd-select--disabled': this.disabled,\n }}\n ref={el => (this.selectRef = el)}\n >\n {this.renderLabel(this.label)}\n <div class=\"sd-select__container\">\n {this.renderTrigger()}\n {this.renderDropdown()}\n </div>\n </div>\n </Host>\n );\n }\n\n private renderLabel(label?: string) {\n if (!label) return null;\n\n return <label class=\"sd-select__label\">{label}</label>;\n }\n\n private renderTrigger() {\n const selectedOption = this.getSelectedOption();\n return (\n <div\n class=\"sd-select__trigger\"\n tabindex={this.disabled ? -1 : 0}\n onClick={this.handleTriggerClick}\n >\n <span class=\"sd-select__value\">{selectedOption ? selectedOption.label : this.placeholder}</span>\n {this.clearable && selectedOption && !this.disabled && (\n <sd-icon\n key=\"clear-icon\"\n name=\"close\"\n size={10}\n color=\"#888\"\n class=\"sd-select__clear\"\n onClick={event => {\n event.stopPropagation();\n this.value = null;\n }}\n ></sd-icon>\n )}\n\n <sd-icon\n key=\"arrow-icon\"\n name=\"arrowDown\"\n color=\"#888\"\n class={{ 'sd-select__arrow': true, 'sd-select__arrow--open': this.isOpen }}\n ></sd-icon>\n </div>\n );\n }\n\n private renderDropdown() {\n const style = {\n '--select-dropdown-width': this.width || '200px',\n '--select-dropdown-height': this.dropdownHeight || '260px',\n };\n if (this.isOpen === false) return null;\n\n return (\n <sd-portal open={this.isOpen} parentRef={this.selectRef} onSdClose={this.closeDropdown}>\n <div\n class=\"sd-select__dropdown\"\n style={style}\n onScroll={this.handleDropdownScroll}\n ref={el => (this.dropdownRef = el)}\n >\n {this.searchable && (\n <div\n class={{\n 'sd-select__search-container': true,\n 'sd-select__search-container--scrolled': this.isScrolled,\n }}\n onClick={event => event.stopPropagation()}\n >\n <sd-input\n ref={el => (this.searchRef = el)}\n value={this.searchText}\n placeholder=\"검색\"\n clearable\n inputStyle={{ 'padding-left': '8px' }}\n autofocus\n onSdInput={event => {\n this.searchText = String(event?.detail);\n }}\n onSdFocus={() => {\n this.itemIndex = -1;\n }}\n >\n <sd-icon\n name=\"search\"\n size={16}\n color=\"#737373\"\n style={{ marginRight: '4px' }}\n slot=\"prefix\"\n ></sd-icon>\n </sd-input>\n </div>\n )}\n {this.filteredOptions.length > 0 ? (\n this.filteredOptions.map((option, index) => (\n <slot name={`option-${option.value}`}>\n <sd-select-option\n option={option}\n index={index}\n isSelected={option.value === this.value}\n isFocused={index === this.itemIndex}\n onOptionClick={({ detail }) => this.handleOptionClick(detail)}\n ></sd-select-option>\n </slot>\n ))\n ) : (\n <slot name=\"option-placeholder\">\n <div class={'sd-select__option-placeholder'}>{this.optionPlaceholder}</div>\n </slot>\n )}\n </div>\n </sd-portal>\n );\n }\n}\n\n{\n /*\n <sd-select id=\"select-1\">\n <!-- <div slot=\"option-placeholder\">옵션이 없습니다.</div> -->\n </sd-select>\n <sd-select id=\"select-2\"> </sd-select>\n <sd-select id=\"select-3\" searchable clearable>\n <div slot=\"option-3\">test</div>\n </sd-select>\n\n <script>\n document.addEventListener('DOMContentLoaded', () => {\n const select1 = document.getElementById('select-1');\n const select2 = document.getElementById('select-2');\n const select3 = document.getElementById('select-3');\n const select = document.querySelector('sd-select slot[name=\"option-3\"]');\n select1.optionPlaceholder = 'No options available';\n\n const options = [\n { label: 'Option 1', value: '1' },\n { label: 'Option 2', value: '2' },\n { label: 'Option 3', value: '3', disabled: true },\n { label: 'Option 4', value: '4' },\n { label: 'Option 5', value: '5' },\n { label: 'Option 6', value: '6' },\n { label: 'Option 7', value: '7', disabled: true },\n { label: 'Option 8', value: '8' },\n { label: 'Option 9', value: '9' },\n { label: 'Option 10', value: '10' },\n { label: 'Option 11', value: '11', disabled: true },\n { label: 'Option 12', value: '12' },\n { label: 'Option 13', value: '13' },\n { label: 'Option 14', value: '14' },\n { label: 'Option 15', value: '15', disabled: true },\n { label: 'Option 16', value: '16' },\n { label: 'Option 17', value: '17' },\n { label: 'Option 18', value: '18' },\n { label: 'Option 19', value: '19', disabled: true },\n { label: 'Option 20', value: '20' },\n { label: 'Option 21', value: '21' },\n { label: 'Option 22', value: '22' },\n { label: 'Option 23', value: '23', disabled: true },\n { label: 'Option 24', value: '24' },\n ];\n\n select2.options = options;\n select3.options = options;\n });\n </script>\n\n */\n}\n"],"version":3}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, d as createEvent, h } from './p-CbnL1UUF.js';
|
|
2
|
-
import { d as defineCustomElement$2 } from './p-
|
|
3
|
-
import { d as defineCustomElement$1 } from './p-
|
|
2
|
+
import { d as defineCustomElement$2 } from './p-DpcL5xdv.js';
|
|
3
|
+
import { d as defineCustomElement$1 } from './p-InrZhOLL.js';
|
|
4
4
|
|
|
5
5
|
const sdSelectOptionGroupCss = "sd-select-option-group{display:block;height:fit-content}sd-select-option-group .sd-select__option-group{display:flex;padding:4px 12px;padding-left:12px;font-size:12px;line-height:20px;cursor:pointer}sd-select-option-group .sd-select__option-group.sd-select__option-group--group:not(.sd-select__option-group--use-checkbox),sd-select-option-group .sd-select__option-group.sd-select__option-group--subgroup:not(.sd-select__option-group--use-checkbox){cursor:default !important}sd-select-option-group .sd-select__option-group.sd-select__option-group--group{background-color:#f5faff !important;color:#333333 !important;font-weight:700}sd-select-option-group .sd-select__option-group.sd-select__option-group--subgroup{padding-left:20px;background-color:#f9f9f9 !important;color:#333333 !important;font-weight:500}sd-select-option-group .sd-select__option-group.sd-select__option-group--item{padding-left:28px}sd-select-option-group .sd-select__option-group sd-checkbox__bg{border-color:#888888}sd-select-option-group .sd-select__option-group__label-wrapper{display:flex;width:100%;column-gap:8px;align-items:center;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}sd-select-option-group .sd-select__option-group__label-wrapper sd-checkbox{flex-shrink:0}sd-select-option-group .sd-select__option-group__label-wrapper .sd-select__option-group-label{flex:0 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}sd-select-option-group .sd-select__option-group__label-wrapper .sd-select__option-group__count-indicator{width:fit-content;flex-shrink:0;font-size:12px;font-weight:500;color:#888888}sd-select-option-group .sd-select__option-group--focused{background-color:#e6f1ff}sd-select-option-group .sd-select__option-group--selected.sd-select__option-group--item:not(:hover):not(.sd-select__option-group--use-checkbox),sd-select-option-group .sd-select__option-group--focused.sd-select__option-group--item:not(:hover):not(.sd-select__option-group--use-checkbox){color:#0075ff;font-weight:700}sd-select-option-group .sd-select__option-group--disabled{color:#aaaaaa;cursor:not-allowed}sd-select-option-group .sd-select__option-group:hover:not(.sd-select__option-group--disabled){background-color:#0075ff;color:white}sd-select-option-group .sd-select__option-group:hover.sd-select__option-group--selected:not(.sd-select__option-group--group):not(.sd-select__option-group--subgroup) sd-checkbox .sd-checkbox__bg{border-color:white !important}";
|
|
6
6
|
|
|
@@ -51,7 +51,7 @@ const SdSelectOptionGroup = /*@__PURE__*/ proxyCustomElement(class SdSelectOptio
|
|
|
51
51
|
}
|
|
52
52
|
};
|
|
53
53
|
render() {
|
|
54
|
-
return (h("div", { key: '
|
|
54
|
+
return (h("div", { key: 'e873486c47436a1cb2e3797dfe06b89874429e18', class: {
|
|
55
55
|
'sd-select__option-group': true,
|
|
56
56
|
'sd-select__option-group--selected': !!this.isSelected,
|
|
57
57
|
'sd-select__option-group--disabled': !!this.option.disabled,
|
|
@@ -60,10 +60,10 @@ const SdSelectOptionGroup = /*@__PURE__*/ proxyCustomElement(class SdSelectOptio
|
|
|
60
60
|
'sd-select__option-group--group': this.option.type === 'group',
|
|
61
61
|
'sd-select__option-group--subgroup': this.option.type === 'subgroup',
|
|
62
62
|
'sd-select__option-group--item': this.option.type === 'item',
|
|
63
|
-
}, onMouseEnter: () => (this.isHovered = true), onMouseLeave: () => (this.isHovered = false), style: this.optionStyle, "data-index": this.index, onClick: event => this.handleClick(this.option, this.isSelected, event) }, h("div", { key: '
|
|
63
|
+
}, onMouseEnter: () => (this.isHovered = true), onMouseLeave: () => (this.isHovered = false), style: this.optionStyle, "data-index": this.index, onClick: event => this.handleClick(this.option, this.isSelected, event) }, h("div", { key: '7a54f43c2f654f26ff44cb039136488b17492336', class: "sd-select__option-group__label-wrapper" }, this.useCheckbox && (h("sd-checkbox", { key: 'ffe73a278e2e4869b3389b15268ab3c6d1117d47', checked: this.isSelected, disabled: this.option.disabled, onClick: e => {
|
|
64
64
|
e.preventDefault();
|
|
65
65
|
this.handleClick(this.option, this.isSelected, e);
|
|
66
|
-
} })), h("span", { key: '
|
|
66
|
+
} })), h("span", { key: '7c05471592fd30b12b94d158b11c76e98f4634ef', class: "sd-select__option-group-label" }, this.option.label), this.useIndicator && this.option.type !== 'item' && (h("span", { key: 'd395b359af93878867f61990741d174bb81cd959', class: "sd-select__option-group__count-indicator" }, `(${this.countInfo?.selectedCount}/${this.countInfo?.totalCount})`)))));
|
|
67
67
|
}
|
|
68
68
|
static get style() { return sdSelectOptionGroupCss; }
|
|
69
69
|
}, [768, "sd-select-option-group", {
|
|
@@ -104,6 +104,6 @@ function defineCustomElement() {
|
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
export { SdSelectOptionGroup as S, defineCustomElement as d };
|
|
107
|
-
//# sourceMappingURL=p-
|
|
107
|
+
//# sourceMappingURL=p-CzYhjjIE.js.map
|
|
108
108
|
|
|
109
|
-
//# sourceMappingURL=p-
|
|
109
|
+
//# sourceMappingURL=p-CzYhjjIE.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-
|
|
1
|
+
{"file":"p-CzYhjjIE.js","mappings":";;;;AAAA,MAAM,sBAAsB,GAAG,m5EAAm5E;;MCOr6E,mBAAmB,iBAAAA,kBAAA,CAAA,MAAA,mBAAA,SAAAC,CAAA,CAAA;;;;;;;;;AAGvB,IAAA,MAAM;AACN,IAAA,KAAK;IACL,UAAU,GAAmB,KAAK;IAClC,SAAS,GAAY,KAAK;AAC1B,IAAA,WAAW;IACX,QAAQ,GAAY,KAAK;IACzB,WAAW,GAAY,KAAK;IAC5B,YAAY,GAAa,IAAI;AAC7B,IAAA,SAAS,GAAmD;AACnE,QAAA,aAAa,EAAE,CAAC;AAChB,QAAA,UAAU,EAAE,CAAC;KACb;IAEQ,SAAS,GAAY,KAAK;AAGnC,IAAA,MAAM,UAAU,GAAA;QACf,OAAO,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,OAAO,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,UAAU;;AAGxF,IAAA,WAAW;IAOZ,WAAW,GAAG,CACrB,MAAyB,EACzB,UAA0B,EAC1B,KAAiB,KACd;QACH,KAAK,CAAC,eAAe,EAAE;AAEvB,QAAA,IAAI,MAAM,CAAC,IAAI,KAAK,OAAO,IAAI,MAAM,CAAC,IAAI,KAAK,UAAU,EAAE;AAC1D,YAAA,IAAI,CAAC,WAAW,C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AAE,IAAI,CAAC,UAAU,EAAE,KAAK,CAAC,EAAA,EAEvE,CAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,wCAAwC,EAAA,EACjD,IAAI,CAAC,WAAW,KAChB,oEACC,OAAO,EAAE,IAAI,CAAC,UAAU,EACxB,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,QAAQ,EAC9B,OAAO,EAAE,CAAC,IAAG;gBACZ,CAAC,CAAC,cAAc,EAAE;AAClB,gBAAA,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC;AAClD,aAAC,GACa,CACf,EACD,CAAM,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,+BAA+B,EAAA,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAQ,EACrE,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,MAAM,KAChD,CAAM,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,0CAA0C,EAAA,EAAE,CAAA,CAAA,EAAI,IAAI,CAAC,SAAS,EAAE,aAAa,CAAA,CAAA,EAAI,IAAI,CAAC,SAAS,EAAE,UAAU,GAAG,CAAQ,CAClI,CACI,CACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/sd-select-multiple-group/sd-select-option-group/sd-select-option-group.scss?tag=sd-select-option-group","src/components/sd-select-multiple-group/sd-select-option-group/sd-select-option-group.tsx"],"sourcesContent":["@import 'variables';\n\nsd-select-option-group {\n display: block;\n height: fit-content;\n .sd-select__option-group {\n display: flex;\n padding: 4px 12px;\n padding-left: 12px;\n font-size: 12px;\n line-height: 20px;\n cursor: pointer;\n\n &.sd-select__option-group--group,\n &.sd-select__option-group--subgroup {\n &:not(.sd-select__option-group--use-checkbox) {\n cursor: default !important;\n }\n }\n\n &.sd-select__option-group--group {\n background-color: $brilliantblue_05 !important;\n color: $grey_90 !important;\n font-weight: 700;\n }\n\n &.sd-select__option-group--subgroup {\n padding-left: 20px;\n background-color: $grey_05 !important;\n color: $grey_90 !important;\n font-weight: 500;\n }\n\n &.sd-select__option-group--item {\n padding-left: 28px;\n }\n\n sd-checkbox {\n &__bg {\n border-color: $grey_65;\n }\n }\n\n &__label-wrapper {\n display: flex;\n width: 100%;\n column-gap: 8px;\n align-items: center;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n\n sd-checkbox {\n flex-shrink: 0;\n }\n\n .sd-select__option-group-label {\n flex: 0 1 auto;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .sd-select__option-group__count-indicator {\n width: fit-content;\n flex-shrink: 0;\n font-size: 12px;\n font-weight: 500;\n color: $grey_65;\n }\n }\n\n &--focused {\n background-color: $brilliantblue_20;\n }\n\n &--selected,\n &--focused {\n &.sd-select__option-group--item:not(:hover):not(.sd-select__option-group--use-checkbox) {\n color: $brilliantblue_75;\n font-weight: 700;\n }\n }\n\n &--disabled {\n color: $grey_55;\n cursor: not-allowed;\n }\n\n &:hover {\n &:not(.sd-select__option-group--disabled) {\n background-color: $brilliantblue_75;\n color: white;\n }\n\n &.sd-select__option-group--selected {\n &:not(.sd-select__option-group--group):not(.sd-select__option-group--subgroup) {\n sd-checkbox {\n .sd-checkbox__bg {\n border-color: white !important;\n }\n }\n }\n }\n }\n }\n}\n","import { Component, Element, Event, EventEmitter, h, Method, Prop, State } from '@stencil/core';\nimport { SelectOptionGroup } from '../../sd-select/sd-select';\n\n@Component({\n tag: 'sd-select-option-group',\n styleUrl: 'sd-select-option-group.scss',\n})\nexport class SdSelectOptionGroup {\n @Element() el!: HTMLElement;\n\n @Prop() option!: SelectOptionGroup;\n @Prop() index!: number;\n @Prop() isSelected: boolean | null = false;\n @Prop() isFocused: boolean = false;\n @Prop() optionStyle?: { [key: string]: string };\n @Prop() disabled: boolean = false;\n @Prop() useCheckbox: boolean = false;\n @Prop() useIndicator?: boolean = true;\n @Prop() countInfo?: { selectedCount: number; totalCount: number } = {\n selectedCount: 0,\n totalCount: 0,\n };\n\n @State() isHovered: boolean = false;\n\n @Method()\n async isDisabled(): Promise<boolean> {\n return !!this.option.disabled || this.option.type === 'group' || this.option.type === 'subgroup';\n }\n\n @Event() optionClick!: EventEmitter<{\n option: SelectOptionGroup;\n isSelected: boolean | null;\n index: number;\n event: MouseEvent;\n }>;\n\n private handleClick = (\n option: SelectOptionGroup,\n isSelected: boolean | null,\n event: MouseEvent,\n ) => {\n event.stopPropagation();\n\n if (option.type === 'group' || option.type === 'subgroup') {\n this.optionClick.emit({\n option: this.option,\n isSelected,\n index: this.index,\n event,\n });\n return;\n }\n\n if (!this.option.disabled && !this.disabled) {\n this.optionClick.emit({\n option: this.option,\n isSelected,\n index: this.index,\n event,\n });\n }\n };\n\n render() {\n return (\n <div\n class={{\n 'sd-select__option-group': true,\n 'sd-select__option-group--selected': !!this.isSelected,\n 'sd-select__option-group--disabled': !!this.option.disabled,\n 'sd-select__option-group--focused': this.isFocused,\n 'sd-select__option-group--use-checkbox': this.useCheckbox,\n 'sd-select__option-group--group': this.option.type === 'group',\n 'sd-select__option-group--subgroup': this.option.type === 'subgroup',\n 'sd-select__option-group--item': this.option.type === 'item',\n }}\n onMouseEnter={() => (this.isHovered = true)}\n onMouseLeave={() => (this.isHovered = false)}\n style={this.optionStyle}\n data-index={this.index}\n onClick={event => this.handleClick(this.option, this.isSelected, event)}\n >\n <div class=\"sd-select__option-group__label-wrapper\">\n {this.useCheckbox && (\n <sd-checkbox\n checked={this.isSelected}\n disabled={this.option.disabled}\n onClick={e => {\n e.preventDefault();\n this.handleClick(this.option, this.isSelected, e);\n }}\n ></sd-checkbox>\n )}\n <span class=\"sd-select__option-group-label\">{this.option.label}</span>\n {this.useIndicator && this.option.type !== 'item' && (\n <span class=\"sd-select__option-group__count-indicator\">{`(${this.countInfo?.selectedCount}/${this.countInfo?.totalCount})`}</span>\n )}\n </div>\n </div>\n );\n }\n}\n"],"version":3}
|
|
@@ -10,7 +10,7 @@ const SdLoadingSpinner = /*@__PURE__*/ proxyCustomElement(class SdLoadingSpinner
|
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
12
|
render() {
|
|
13
|
-
return (h(Host, { key: '
|
|
13
|
+
return (h(Host, { key: '8ab87f8cf1e002856b6721de5ca5313ccafb3265' }, h("svg", { key: 'da44064be6ab5c19d8517eb4da37c4849997715b', class: "sd-loading-spinner text-positive", width: "72px", height: "72px", viewBox: "25 25 50 50" }, h("circle", { key: 'f446e24aabaf694e4158ec7e91ad4c39e33b4f91', class: "path", cx: "50", cy: "50", r: "20", fill: "none", stroke: "currentColor", "stroke-width": "5", "stroke-miterlimit": "10" }))));
|
|
14
14
|
}
|
|
15
15
|
static get style() { return sdLoadingSpinnerCss; }
|
|
16
16
|
}, [256, "sd-loading-spinner"]);
|
|
@@ -29,6 +29,6 @@ function defineCustomElement() {
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
export { SdLoadingSpinner as S, defineCustomElement as d };
|
|
32
|
-
//# sourceMappingURL=p-
|
|
32
|
+
//# sourceMappingURL=p-D2x4IHr5.js.map
|
|
33
33
|
|
|
34
|
-
//# sourceMappingURL=p-
|
|
34
|
+
//# sourceMappingURL=p-D2x4IHr5.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-
|
|
1
|
+
{"file":"p-D2x4IHr5.js","mappings":";;AAAA,MAAM,mBAAmB,GAAG,ypBAAypB;;MCMxqB,gBAAgB,iBAAAA,kBAAA,CAAA,MAAA,gBAAA,SAAAC,CAAA,CAAA;;;;;;;IAC5B,MAAM,GAAA;AACL,QAAA,QACC,EAAC,IAAI,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EACJ,CAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAK,KAAK,EAAC,kCAAkC,EAAC,KAAK,EAAC,MAAM,EAAC,MAAM,EAAC,MAAM,EAAC,OAAO,EAAC,aAAa,EAAA,EAC7F,CAAA,CAAA,QAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACC,KAAK,EAAC,MAAM,EACZ,EAAE,EAAC,IAAI,EACP,EAAE,EAAC,IAAI,EACP,CAAC,EAAC,IAAI,EACN,IAAI,EAAC,MAAM,EACX,MAAM,EAAC,cAAc,EAAA,cAAA,EACR,GAAG,EAAA,mBAAA,EACE,IAAI,EAAA,CACb,CACL,CACA;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/sd-loading-spinner/sd-loading-spinner.scss?tag=sd-loading-spinner","src/components/sd-loading-spinner/sd-loading-spinner.tsx"],"sourcesContent":["sd-loading-spinner {\n display: block;\n\n .sd-loading-spinner {\n animation: sd-loading-spin 2s linear infinite;\n transform-origin: center center;\n .path {\n animation: sd-loading-spin-path 1.5s ease-in-out infinite;\n }\n\n @keyframes sd-loading-spin {\n 0% {\n transform: rotate3d(0, 0, 1, 0deg);\n }\n 25% {\n transform: rotate3d(0, 0, 1, 90deg);\n }\n 50% {\n transform: rotate3d(0, 0, 1, 180deg);\n }\n 75% {\n transform: rotate3d(0, 0, 1, 270deg);\n }\n 100% {\n transform: rotate3d(0, 0, 1, 359deg);\n }\n }\n\n @keyframes sd-loading-spin-path {\n 0% {\n stroke-dasharray: 1, 200;\n stroke-dashoffset: 0;\n }\n 50% {\n stroke-dasharray: 89, 200;\n stroke-dashoffset: -35px;\n }\n\n 100% {\n stroke-dasharray: 89, 200;\n stroke-dashoffset: -124px;\n }\n }\n }\n}\n","import { Component, Host, h } from '@stencil/core';\n\n@Component({\n tag: 'sd-loading-spinner',\n styleUrl: 'sd-loading-spinner.scss',\n})\nexport class SdLoadingSpinner {\n render() {\n return (\n <Host>\n <svg class=\"sd-loading-spinner text-positive\" width=\"72px\" height=\"72px\" viewBox=\"25 25 50 50\">\n <circle\n class=\"path\"\n cx=\"50\"\n cy=\"50\"\n r=\"20\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"5\"\n stroke-miterlimit=\"10\"\n ></circle>\n </svg>\n </Host>\n );\n }\n}\n"],"version":3}
|