@sellmate/design-system 0.0.34 → 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/design-system.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/sd-badge.cjs.entry.js +1 -1
- package/dist/cjs/sd-button.sd-checkbox.sd-guide.sd-icon.sd-input.sd-pagination.sd-portal.sd-select.sd-select-option.sd-table.sd-tbody.sd-th.sd-tooltip.sd-tooltip-portal.sd-tr.entry.cjs.js.map +1 -0
- package/dist/cjs/{sd-button_13.cjs.entry.js → sd-button_15.cjs.entry.js} +81 -78
- 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 +18 -0
- package/dist/cjs/sd-loading-spinner.entry.cjs.js.map +1 -0
- 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 +271 -0
- package/dist/cjs/sd-table-backup.entry.cjs.js.map +1 -0
- package/dist/cjs/sd-tag.cjs.entry.js +1 -1
- package/dist/cjs/sd-td.cjs.entry.js +26 -0
- package/dist/cjs/sd-td.entry.cjs.js.map +1 -0
- package/dist/collection/collection-manifest.json +5 -0
- 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-table.css +17 -15
- package/dist/collection/components/sd-table/sd-table.js +24 -2087
- package/dist/collection/components/sd-table/sd-table.js.map +1 -1
- package/dist/collection/components/sd-table/sd-tbody/sd-tbody.css +3 -0
- package/dist/collection/components/sd-table/sd-tbody/sd-tbody.js +18 -0
- package/dist/collection/components/sd-table/sd-tbody/sd-tbody.js.map +1 -0
- package/dist/collection/components/sd-table/sd-td/sd-td.css +9 -0
- package/dist/collection/components/sd-table/sd-td/sd-td.js +111 -0
- package/dist/collection/components/sd-table/sd-td/sd-td.js.map +1 -0
- package/dist/collection/components/sd-table/sd-th/sd-th.css +8 -0
- package/dist/collection/components/sd-table/sd-th/sd-th.js +18 -0
- package/dist/collection/components/sd-table/sd-th/sd-th.js.map +1 -0
- package/dist/collection/components/sd-table/sd-tr/sd-tr.css +3 -0
- package/dist/collection/components/sd-table/sd-tr/sd-tr.js +18 -0
- package/dist/collection/components/sd-table/sd-tr/sd-tr.js.map +1 -0
- 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/collection/components/sd-tooltip/sd-tooltip.js +4 -5
- package/dist/collection/components/sd-tooltip/sd-tooltip.js.map +1 -1
- package/dist/collection/components/sd-tooltip-portal/sd-tooltip-portal.js +1 -1
- package/dist/components/{p-cZZiWgpx.js → p-0B7EuAJt.js} +5 -5
- package/dist/components/{p-cZZiWgpx.js.map → p-0B7EuAJt.js.map} +1 -1
- package/dist/components/p-18thvuHk.js +34 -0
- package/dist/components/p-18thvuHk.js.map +1 -0
- package/dist/components/{p-BLVHOrsi.js → p-BG0UE2wL.js} +3 -3
- package/dist/components/{p-BLVHOrsi.js.map → p-BG0UE2wL.js.map} +1 -1
- package/dist/components/{p-DXyjyA0e.js → p-C075_t2h.js} +3 -3
- package/dist/components/{p-DXyjyA0e.js.map → p-C075_t2h.js.map} +1 -1
- package/dist/components/p-C79lmNgp.js +34 -0
- package/dist/components/p-C79lmNgp.js.map +1 -0
- package/dist/components/{p-CVmIv1LY.js → p-Ce6LhsfH.js} +7 -7
- package/dist/components/{p-CVmIv1LY.js.map → p-Ce6LhsfH.js.map} +1 -1
- package/dist/components/{p-B5jkeFCb.js → p-CzYhjjIE.js} +7 -7
- package/dist/components/{p-B5jkeFCb.js.map → p-CzYhjjIE.js.map} +1 -1
- package/dist/components/{p-Bry2vtXF.js → p-D2x4IHr5.js} +3 -3
- package/dist/components/{p-Bry2vtXF.js.map → p-D2x4IHr5.js.map} +1 -1
- package/dist/components/{p-D60I2CpC.js → p-D7IsBL9J.js} +5 -5
- package/dist/components/{p-D60I2CpC.js.map → p-D7IsBL9J.js.map} +1 -1
- package/dist/components/p-DHI6oZcr.js +34 -0
- package/dist/components/p-DHI6oZcr.js.map +1 -0
- package/dist/components/{p-CHw7bav7.js → p-DNEKh1qk.js} +3 -3
- package/dist/components/{p-CHw7bav7.js.map → p-DNEKh1qk.js.map} +1 -1
- package/dist/components/{p-BoIp700J.js → p-DTUSoHK4.js} +5 -5
- package/dist/components/{p-BoIp700J.js.map → p-DTUSoHK4.js.map} +1 -1
- package/dist/components/{p-DR6QXFmO.js → p-DpcL5xdv.js} +3 -3
- package/dist/components/{p-DR6QXFmO.js.map → p-DpcL5xdv.js.map} +1 -1
- package/dist/components/{p-CsP5aJ3N.js → p-InrZhOLL.js} +3 -3
- package/dist/components/{p-CsP5aJ3N.js.map → p-InrZhOLL.js.map} +1 -1
- package/dist/components/{p-DKW5kNQD.js → p-kLlPK7H2.js} +11 -11
- package/dist/components/p-kLlPK7H2.js.map +1 -0
- 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 +5 -5
- 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.d.ts +11 -0
- package/dist/components/sd-table-backup.js +385 -0
- package/dist/components/sd-table-backup.js.map +1 -0
- package/dist/components/sd-table.js +59 -70
- package/dist/components/sd-table.js.map +1 -1
- package/dist/components/sd-tag.js +1 -1
- package/dist/components/sd-tbody.d.ts +11 -0
- package/dist/components/sd-tbody.js +9 -0
- package/dist/components/sd-tbody.js.map +1 -0
- package/dist/components/sd-td.d.ts +11 -0
- package/dist/components/sd-td.js +50 -0
- package/dist/components/sd-td.js.map +1 -0
- package/dist/components/sd-th.d.ts +11 -0
- package/dist/components/sd-th.js +9 -0
- package/dist/components/sd-th.js.map +1 -0
- package/dist/components/sd-tooltip-portal.js +1 -1
- package/dist/components/sd-tooltip.js +1 -1
- package/dist/components/sd-tr.d.ts +11 -0
- package/dist/components/sd-tr.js +9 -0
- package/dist/components/sd-tr.js.map +1 -0
- package/dist/design-system/design-system.esm.js +1 -1
- package/dist/design-system/{p-eeed34eb.entry.js → p-0e24195b.entry.js} +2 -2
- package/dist/design-system/{p-ac7dbf3c.entry.js → p-360dd6ab.entry.js} +2 -2
- package/dist/design-system/{p-6d769a19.entry.js → p-3e46bf2b.entry.js} +2 -2
- package/dist/design-system/p-51c4ae08.entry.js +2 -0
- package/dist/design-system/p-51c4ae08.entry.js.map +1 -0
- package/dist/design-system/p-531260cb.entry.js +2 -0
- package/dist/design-system/p-531260cb.entry.js.map +1 -0
- package/dist/design-system/{p-048f83bb.entry.js → p-675d1b1c.entry.js} +2 -2
- package/dist/design-system/p-675d1b1c.entry.js.map +1 -0
- package/dist/design-system/{p-e9800353.entry.js → p-9099eb05.entry.js} +2 -2
- package/dist/design-system/{p-cdc6b2c8.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-d492a315.entry.js → p-d8c1ce0a.entry.js} +2 -2
- package/dist/design-system/p-f4a737de.entry.js +2 -0
- package/dist/design-system/{p-56b88d9b.entry.js → p-ff7b8ecf.entry.js} +2 -2
- package/dist/design-system/sd-button.sd-checkbox.sd-guide.sd-icon.sd-input.sd-pagination.sd-portal.sd-select.sd-select-option.sd-table.sd-tbody.sd-th.sd-tooltip.sd-tooltip-portal.sd-tr.entry.esm.js.map +1 -0
- package/dist/design-system/sd-loading-spinner.entry.esm.js.map +1 -0
- package/dist/design-system/sd-table-backup.entry.esm.js.map +1 -0
- package/dist/design-system/sd-td.entry.esm.js.map +1 -0
- package/dist/esm/design-system.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/sd-badge.entry.js +1 -1
- package/dist/esm/sd-button.sd-checkbox.sd-guide.sd-icon.sd-input.sd-pagination.sd-portal.sd-select.sd-select-option.sd-table.sd-tbody.sd-th.sd-tooltip.sd-tooltip-portal.sd-tr.entry.js.map +1 -0
- package/dist/esm/{sd-button_13.entry.js → sd-button_15.entry.js} +79 -78
- 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 +16 -0
- package/dist/esm/sd-loading-spinner.entry.js.map +1 -0
- 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 +269 -0
- package/dist/esm/sd-table-backup.entry.js.map +1 -0
- package/dist/esm/sd-tag.entry.js +1 -1
- package/dist/esm/sd-td.entry.js +24 -0
- package/dist/esm/sd-td.entry.js.map +1 -0
- package/dist/types/components/sd-table/sd-table.d.ts +0 -4
- package/dist/types/components/sd-table/sd-tbody/sd-tbody.d.ts +3 -0
- package/dist/types/components/sd-table/sd-td/sd-td.d.ts +7 -0
- package/dist/types/components/sd-table/sd-th/sd-th.d.ts +3 -0
- package/dist/types/components/sd-table/sd-tr/sd-tr.d.ts +3 -0
- package/dist/types/components/sd-table-backup/sd-table-backup.d.ts +80 -0
- package/dist/types/components.d.ts +221 -0
- package/hydrate/index.js +413 -41
- package/hydrate/index.mjs +413 -41
- package/package.json +5 -3
- package/dist/cjs/sd-button.sd-checkbox.sd-guide.sd-icon.sd-input.sd-loading-spinner.sd-pagination.sd-portal.sd-select.sd-select-option.sd-table.sd-tooltip.sd-tooltip-portal.entry.cjs.js.map +0 -1
- package/dist/components/p-DKW5kNQD.js.map +0 -1
- package/dist/design-system/p-048f83bb.entry.js.map +0 -1
- package/dist/design-system/p-c1e64ba9.entry.js +0 -2
- package/dist/design-system/p-ce01c171.entry.js +0 -2
- package/dist/design-system/sd-button.sd-checkbox.sd-guide.sd-icon.sd-input.sd-loading-spinner.sd-pagination.sd-portal.sd-select.sd-select-option.sd-table.sd-tooltip.sd-tooltip-portal.entry.esm.js.map +0 -1
- package/dist/esm/sd-button.sd-checkbox.sd-guide.sd-icon.sd-input.sd-loading-spinner.sd-pagination.sd-portal.sd-select.sd-select-option.sd-table.sd-tooltip.sd-tooltip-portal.entry.js.map +0 -1
- /package/dist/design-system/{p-eeed34eb.entry.js.map → p-0e24195b.entry.js.map} +0 -0
- /package/dist/design-system/{p-ac7dbf3c.entry.js.map → p-360dd6ab.entry.js.map} +0 -0
- /package/dist/design-system/{p-6d769a19.entry.js.map → p-3e46bf2b.entry.js.map} +0 -0
- /package/dist/design-system/{p-e9800353.entry.js.map → p-9099eb05.entry.js.map} +0 -0
- /package/dist/design-system/{p-cdc6b2c8.entry.js.map → p-a83759ba.entry.js.map} +0 -0
- /package/dist/design-system/{p-ce01c171.entry.js.map → p-c9109ae0.entry.js.map} +0 -0
- /package/dist/design-system/{p-d492a315.entry.js.map → p-d8c1ce0a.entry.js.map} +0 -0
- /package/dist/design-system/{p-c1e64ba9.entry.js.map → p-f4a737de.entry.js.map} +0 -0
- /package/dist/design-system/{p-56b88d9b.entry.js.map → p-ff7b8ecf.entry.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-CVmIv1LY.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;IA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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,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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P,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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K,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}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, d as createEvent, h, c as Host } 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 sdInputCss = "sd-icon{line-height:0}sd-icon .sd-icon{line-height:0;vertical-align:middle}sd-icon .sd-icon--rotate-90{transform:rotate(90deg)}sd-icon .sd-icon--rotate-180{transform:rotate(180deg)}sd-icon .sd-icon--rotate-270{transform:rotate(270deg)}.sd-input{display:flex;width:var(--input-width, 100%);align-items:center;height:28px;padding:4px 8px;border:1px solid #aaaaaa;border-radius:4px;color:#333333;font-size:12px;line-height:20px;background:white}.sd-input--hovered,.sd-input--focused{border-color:#0075ff;box-shadow:0 0 4px 0 rgba(0, 113, 255, 0.4)}.sd-input.sd-input--error{border-color:#fb4444}.sd-input.sd-input--pass{border-color:#2bce6c}.sd-input.sd-input--barcode:not(.sd-input--disabled){background-color:#fafaa1}.sd-input.sd-input--disabled{background-color:#eeeeee !important;border-color:#cccccc !important;cursor:not-allowed !important;box-shadow:none !important}.sd-input.sd-input--disabled .sd-input__native_element{color:#888888 !important}.sd-input .sd-input__native_element{display:block;width:100%;height:20px;line-height:20px;border:none;outline:none;background:transparent;font-size:inherit;color:#333333;margin-left:4px;margin-right:4px;padding-block:0;padding-inline:0}.sd-input .sd-input__native_element::placeholder{font-size:12px;height:20px;line-height:20px;color:#aaaaaa}.sd-input .sd-input__clear-icon{cursor:pointer;margin-left:8px}";
|
|
5
5
|
|
|
@@ -104,11 +104,11 @@ const SdInput = /*@__PURE__*/ proxyCustomElement(class SdInput extends H {
|
|
|
104
104
|
'--input-width': typeof this.width === 'number' ? `${this.width}px` : this.width,
|
|
105
105
|
}
|
|
106
106
|
: {};
|
|
107
|
-
return (h(Host, { key: '
|
|
107
|
+
return (h(Host, { key: 'bb677f1411303375222c7eadf7738d97de04c4ad', style: inputWidth }, this.label && h("div", { key: '0d05e92148e90645bf8c61d94693eb74d0e37154', class: "sd-input__label" }, this.label), h("label", { key: 'a6a9a4912b4e0e9fb44d9d273f73b88db804bd97', class: {
|
|
108
108
|
'sd-input': true,
|
|
109
109
|
[this.getInputStatus()]: true,
|
|
110
110
|
'sd-input--barcode': !!this.barcode,
|
|
111
|
-
}, onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false), style: this.inputStyle }, h("slot", { key: '
|
|
111
|
+
}, onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false), style: this.inputStyle }, h("slot", { key: 'df634eb250fc1dff27e1db4372b3c90c14f9cd79', name: "prefix" }), h("input", { key: '0d2e5619efef215cd7c9552a015422bf9c036d35', ref: el => (this.nativeEl = el), class: `sd-input__native_element ${this.inputClass}`, type: "text", value: this.internalValue || '', placeholder: this.placeholder, disabled: this.disabled, readonly: this.readonly, autofocus: this.autoFocus, onInput: this.handleInput, onChange: this.handleChange, onFocus: event => this.handleFocus('focus', event), onBlur: event => this.handleFocus('blur', event) }), h("slot", { key: 'c139e8cb7691263e1f4ab2e1e0eadc8284303a39', name: "suffix" }), this.clearable && this.internalValue && (h("sd-icon", { key: 'b4e2a13aabf0257ff72d982197b8eab99ad6d441', name: "close", color: "#888", class: "sd-input__clear-icon", onClick: () => {
|
|
112
112
|
this.internalValue = '';
|
|
113
113
|
this.sdChange?.emit(this.internalValue);
|
|
114
114
|
this.sdInput?.emit(this.internalValue);
|
|
@@ -162,6 +162,6 @@ function defineCustomElement() {
|
|
|
162
162
|
}
|
|
163
163
|
|
|
164
164
|
export { SdInput as S, defineCustomElement as d };
|
|
165
|
-
//# sourceMappingURL=p-
|
|
165
|
+
//# sourceMappingURL=p-D7IsBL9J.js.map
|
|
166
166
|
|
|
167
|
-
//# sourceMappingURL=p-
|
|
167
|
+
//# sourceMappingURL=p-D7IsBL9J.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-D60I2CpC.js","mappings":";;;AAAA,MAAM,UAAU,GAAG,80CAA80C;;MCiBp1C,OAAO,iBAAAA,kBAAA,CAAA,MAAA,OAAA,SAAAC,CAAA,CAAA;;;;;;;;;;;;;IAGM,KAAK,GAA4B,IAAI;AACtD,IAAA,KAAK;IACL,WAAW,GAAW,UAAU;IAChC,QAAQ,GAAY,KAAK;IACzB,SAAS,GAAY,KAAK;AAC1B,IAAA,KAAK;IACL,OAAO,GAAa,KAAK;AACzB,IAAA,KAAK;IACL,SAAS,GAAY,KAAK;AAC1B,IAAA,MAAM;IACN,UAAU,GAAW,EAAE;IACvB,QAAQ,GAAY,KAAK;;IAGzB,UAAU,GAA8B,EAAE;IAEjC,aAAa,GAA2B,IAAI;IAC5C,KAAK,GAAY,KAAK;IACtB,OAAO,GAAY,KAAK;IACxB,OAAO,GA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0CAAA,EAAA,IAAI,EAAC,QAAQ,EAAQ,CAAA,EAC1B,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,aAAa,KACpC,CACC,CAAA,SAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,IAAI,EAAC,OAAO,EACZ,KAAK,EAAC,MAAM,EACZ,KAAK,EAAC,sBAAsB,EAC5B,OAAO,EAAE,MAAK;AACb,gBAAA,IAAI,CAAC,aAAa,GAAG,EAAE;gBACvB,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC;gBACvC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC;AACvC,aAAC,EACA,CAAA,CACF,CACM,CACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/sd-input/sd-input.scss?tag=sd-input","src/components/sd-input/sd-input.tsx"],"sourcesContent":["@import 'variables';\n@import '../sd-icon/sd-icon.scss';\n\n.sd-input {\n display: flex;\n width: var(--input-width, 100%);\n align-items: center;\n height: 28px;\n padding: 4px 8px;\n border: 1px solid $grey_55;\n border-radius: 4px;\n color: $grey_90;\n font-size: 12px;\n line-height: 20px;\n background: white;\n\n &--hovered,\n &--focused {\n border-color: $brilliantblue_75;\n box-shadow: 0 0 4px 0 #0071ff66;\n }\n\n &.sd-input--error {\n border-color: $red_70;\n }\n\n &.sd-input--pass {\n border-color: $green_65;\n }\n\n &.sd-input--barcode:not(.sd-input--disabled) {\n background-color: $olive_15;\n }\n\n &.sd-input--disabled {\n background-color: $grey_20 !important;\n border-color: $grey_45 !important;\n cursor: not-allowed !important;\n box-shadow: none !important;\n .sd-input__native_element {\n color: $grey_65 !important;\n }\n }\n\n .sd-input__native_element {\n display: block;\n width: 100%;\n height: 20px;\n line-height: 20px;\n border: none;\n outline: none;\n background: transparent;\n font-size: inherit;\n color: $grey_90;\n margin-left: 4px;\n margin-right: 4px;\n padding-block: 0;\n padding-inline: 0;\n\n &::placeholder {\n font-size: 12px;\n height: 20px;\n line-height: 20px;\n color: $grey_55;\n }\n }\n\n .sd-input__clear-icon {\n cursor: pointer;\n margin-left: 8px;\n }\n}\n","import {\n Component,\n Element,\n Host,\n Prop,\n State,\n Watch,\n Event,\n EventEmitter,\n h,\n Method,\n} from '@stencil/core';\n\n@Component({\n tag: 'sd-input',\n styleUrl: 'sd-input.scss',\n})\nexport class SdInput {\n @Element() el!: HTMLElement;\n\n @Prop({ mutable: true }) value?: string | number | null = null;\n @Prop() label?: string;\n @Prop() placeholder: string = '입력해 주세요.';\n @Prop() disabled: boolean = false;\n @Prop() clearable: boolean = false;\n @Prop() width?: number | string;\n @Prop() barcode?: boolean = false;\n @Prop() rules?: Array<(value: string | number | null) => boolean | string>;\n @Prop() autoFocus: boolean = false;\n @Prop() status?: 'default' | 'pass' | 'error';\n @Prop() inputClass: string = '';\n @Prop() readonly: boolean = false;\n\n // props - custom styles\n @Prop() inputStyle: { [key: string]: string } = {};\n\n @State() private internalValue: string | number | null = null;\n @State() private error: boolean = false;\n @State() private focused: boolean = false;\n @State() private hovered: boolean = false;\n\n private nativeEl: HTMLInputElement | undefined = undefined;\n\n @Event() sdClick?: EventEmitter<string | number | null>;\n @Event() sdInput?: EventEmitter<string | number | null>;\n @Event() sdChange?: EventEmitter<string | number | null>;\n @Event() sdFocus?: EventEmitter<Event>;\n @Event() sdBlur?: EventEmitter<Event>;\n\n @Watch('value')\n valueChanged(newValue: string | number | null) {\n this.internalValue = newValue;\n }\n\n @Watch('internalValue')\n internalValueChanged(newValue: string | number | null) {\n if (newValue !== this.value) {\n this.value = newValue;\n this.sdInput?.emit(this.value);\n }\n\n if (!this.rules || this.rules.length === 0) return;\n this.error = false;\n for (const rule of this.rules) {\n const result = rule(newValue);\n if (result !== true) {\n this.error = true;\n break;\n }\n }\n }\n\n @Method()\n async getNativeElement(): Promise<HTMLInputElement | null> {\n return this.nativeEl || null;\n }\n\n componentWillLoad() {\n if (this.value) {\n this.internalValue = this.value;\n }\n }\n\n private handleInput = (event: Event) => {\n const target = event.target as HTMLInputElement;\n this.internalValue = target.value;\n this.sdInput?.emit(this.internalValue);\n };\n\n private handleChange = (event: Event) => {\n const target = event.target as HTMLInputElement;\n this.internalValue = target.value;\n this.sdChange?.emit(this.internalValue);\n };\n\n private handleFocus = (type: 'focus' | 'blur', event: Event) => {\n this.focused = type === 'focus';\n\n if (type === 'blur') this.sdBlur?.emit(event);\n else this.sdFocus?.emit(event);\n };\n\n getInputStatus() {\n // input 상태 우선순위: hovered > focused > status(상태 주입) > error(rules 검사)\n if (this.disabled) return 'sd-input--disabled';\n if (this.hovered) return 'sd-input--hovered';\n if (this.focused) return 'sd-input--focused';\n if (this.status) return `sd-input--${this.status}`;\n if (this.error) return 'sd-input--error';\n return '';\n }\n\n render() {\n const inputWidth = this.width\n ? {\n '--input-width': typeof this.width === 'number' ? `${this.width}px` : this.width,\n }\n : {};\n\n return (\n <Host style={inputWidth}>\n {this.label && <div class=\"sd-input__label\">{this.label}</div>}\n <label\n class={{\n 'sd-input': true,\n [this.getInputStatus()]: true,\n 'sd-input--barcode': !!this.barcode,\n }}\n onMouseEnter={() => (this.hovered = true)}\n onMouseLeave={() => (this.hovered = false)}\n style={this.inputStyle}\n >\n <slot name=\"prefix\"></slot>\n <input\n ref={el => (this.nativeEl = el)}\n class={`sd-input__native_element ${this.inputClass}`}\n type=\"text\"\n value={this.internalValue || ''}\n placeholder={this.placeholder}\n disabled={this.disabled}\n readonly={this.readonly}\n autofocus={this.autoFocus}\n onInput={this.handleInput}\n onChange={this.handleChange}\n onFocus={event => this.handleFocus('focus', event)}\n onBlur={event => this.handleFocus('blur', event)}\n />\n <slot name=\"suffix\"></slot>\n {this.clearable && this.internalValue && (\n <sd-icon\n name=\"close\"\n color=\"#888\"\n class=\"sd-input__clear-icon\"\n onClick={() => {\n this.internalValue = '';\n this.sdChange?.emit(this.internalValue);\n this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esContent":["@import 'variables';\n@import '../sd-icon/sd-icon.scss';\n\n.sd-input {\n display: flex;\n width: var(--input-width, 100%);\n align-items: center;\n height: 28px;\n padding: 4px 8px;\n border: 1px solid $grey_55;\n border-radius: 4px;\n color: $grey_90;\n font-size: 12px;\n line-height: 20px;\n background: white;\n\n &--hovered,\n &--focused {\n border-color: $brilliantblue_75;\n box-shadow: 0 0 4px 0 #0071ff66;\n }\n\n &.sd-input--error {\n border-color: $red_70;\n }\n\n &.sd-input--pass {\n border-color: $green_65;\n }\n\n &.sd-input--barcode:not(.sd-input--disabled) {\n background-color: $olive_15;\n }\n\n &.sd-input--disabled {\n background-color: $grey_20 !important;\n border-color: $grey_45 !important;\n cursor: not-allowed !important;\n box-shadow: none !important;\n .sd-input__native_element {\n color: $grey_65 !important;\n }\n }\n\n .sd-input__native_element {\n display: block;\n width: 100%;\n height: 20px;\n line-height: 20px;\n border: none;\n outline: none;\n background: transparent;\n font-size: inherit;\n color: $grey_90;\n margin-left: 4px;\n margin-right: 4px;\n padding-block: 0;\n padding-inline: 0;\n\n &::placeholder {\n font-size: 12px;\n height: 20px;\n line-height: 20px;\n color: $grey_55;\n }\n }\n\n .sd-input__clear-icon {\n cursor: pointer;\n margin-left: 8px;\n }\n}\n","import {\n Component,\n Element,\n Host,\n Prop,\n State,\n Watch,\n Event,\n EventEmitter,\n h,\n Method,\n} from '@stencil/core';\n\n@Component({\n tag: 'sd-input',\n styleUrl: 'sd-input.scss',\n})\nexport class SdInput {\n @Element() el!: HTMLElement;\n\n @Prop({ mutable: true }) value?: string | number | null = null;\n @Prop() label?: string;\n @Prop() placeholder: string = '입력해 주세요.';\n @Prop() disabled: boolean = false;\n @Prop() clearable: boolean = false;\n @Prop() width?: number | string;\n @Prop() barcode?: boolean = false;\n @Prop() rules?: Array<(value: string | number | null) => boolean | string>;\n @Prop() autoFocus: boolean = false;\n @Prop() status?: 'default' | 'pass' | 'error';\n @Prop() inputClass: string = '';\n @Prop() readonly: boolean = false;\n\n // props - custom styles\n @Prop() inputStyle: { [key: string]: string } = {};\n\n @State() private internalValue: string | number | null = null;\n @State() private error: boolean = false;\n @State() private focused: boolean = false;\n @State() private hovered: boolean = false;\n\n private nativeEl: HTMLInputElement | undefined = undefined;\n\n @Event() sdClick?: EventEmitter<string | number | null>;\n @Event() sdInput?: EventEmitter<string | number | null>;\n @Event() sdChange?: EventEmitter<string | number | null>;\n @Event() sdFocus?: EventEmitter<Event>;\n @Event() sdBlur?: EventEmitter<Event>;\n\n @Watch('value')\n valueChanged(newValue: string | number | null) {\n this.internalValue = newValue;\n }\n\n @Watch('internalValue')\n internalValueChanged(newValue: string | number | null) {\n if (newValue !== this.value) {\n this.value = newValue;\n this.sdInput?.emit(this.value);\n }\n\n if (!this.rules || this.rules.length === 0) return;\n this.error = false;\n for (const rule of this.rules) {\n const result = rule(newValue);\n if (result !== true) {\n this.error = true;\n break;\n }\n }\n }\n\n @Method()\n async getNativeElement(): Promise<HTMLInputElement | null> {\n return this.nativeEl || null;\n }\n\n componentWillLoad() {\n if (this.value) {\n this.internalValue = this.value;\n }\n }\n\n private handleInput = (event: Event) => {\n const target = event.target as HTMLInputElement;\n this.internalValue = target.value;\n this.sdInput?.emit(this.internalValue);\n };\n\n private handleChange = (event: Event) => {\n const target = event.target as HTMLInputElement;\n this.internalValue = target.value;\n this.sdChange?.emit(this.internalValue);\n };\n\n private handleFocus = (type: 'focus' | 'blur', event: Event) => {\n this.focused = type === 'focus';\n\n if (type === 'blur') this.sdBlur?.emit(event);\n else this.sdFocus?.emit(event);\n };\n\n getInputStatus() {\n // input 상태 우선순위: hovered > focused > status(상태 주입) > error(rules 검사)\n if (this.disabled) return 'sd-input--disabled';\n if (this.hovered) return 'sd-input--hovered';\n if (this.focused) return 'sd-input--focused';\n if (this.status) return `sd-input--${this.status}`;\n if (this.error) return 'sd-input--error';\n return '';\n }\n\n render() {\n const inputWidth = this.width\n ? {\n '--input-width': typeof this.width === 'number' ? `${this.width}px` : this.width,\n }\n : {};\n\n return (\n <Host style={inputWidth}>\n {this.label && <div class=\"sd-input__label\">{this.label}</div>}\n <label\n class={{\n 'sd-input': true,\n [this.getInputStatus()]: true,\n 'sd-input--barcode': !!this.barcode,\n }}\n onMouseEnter={() => (this.hovered = true)}\n onMouseLeave={() => (this.hovered = false)}\n style={this.inputStyle}\n >\n <slot name=\"prefix\"></slot>\n <input\n ref={el => (this.nativeEl = el)}\n class={`sd-input__native_element ${this.inputClass}`}\n type=\"text\"\n value={this.internalValue || ''}\n placeholder={this.placeholder}\n disabled={this.disabled}\n readonly={this.readonly}\n autofocus={this.autoFocus}\n onInput={this.handleInput}\n onChange={this.handleChange}\n onFocus={event => this.handleFocus('focus', event)}\n onBlur={event => this.handleFocus('blur', event)}\n />\n <slot name=\"suffix\"></slot>\n {this.clearable && this.internalValue && (\n <sd-icon\n name=\"close\"\n color=\"#888\"\n class=\"sd-input__clear-icon\"\n onClick={() => {\n this.internalValue = '';\n this.sdChange?.emit(this.internalValue);\n this.sdInput?.emit(this.internalValue);\n }}\n />\n )}\n </label>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { p as proxyCustomElement, H, h, c as Host } from './p-CbnL1UUF.js';
|
|
2
|
+
|
|
3
|
+
const sdTrCss = "sd-tr{display:table-row}";
|
|
4
|
+
|
|
5
|
+
const SdTr = /*@__PURE__*/ proxyCustomElement(class SdTr extends H {
|
|
6
|
+
constructor(registerHost) {
|
|
7
|
+
super();
|
|
8
|
+
if (registerHost !== false) {
|
|
9
|
+
this.__registerHost();
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
render() {
|
|
13
|
+
return (h(Host, { key: 'f20a0bbaf94ce37ef8cbf4d59c24159549294ff2', role: "row" }, h("slot", { key: '8b5d3685c916a4ad8422c03e35f9b699961a1415' })));
|
|
14
|
+
}
|
|
15
|
+
static get style() { return sdTrCss; }
|
|
16
|
+
}, [260, "sd-tr"]);
|
|
17
|
+
function defineCustomElement() {
|
|
18
|
+
if (typeof customElements === "undefined") {
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
const components = ["sd-tr"];
|
|
22
|
+
components.forEach(tagName => { switch (tagName) {
|
|
23
|
+
case "sd-tr":
|
|
24
|
+
if (!customElements.get(tagName)) {
|
|
25
|
+
customElements.define(tagName, SdTr);
|
|
26
|
+
}
|
|
27
|
+
break;
|
|
28
|
+
} });
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export { SdTr as S, defineCustomElement as d };
|
|
32
|
+
//# sourceMappingURL=p-DHI6oZcr.js.map
|
|
33
|
+
|
|
34
|
+
//# sourceMappingURL=p-DHI6oZcr.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"p-DHI6oZcr.js","mappings":";;AAAA,MAAM,OAAO,GAAG,0BAA0B;;MCM7B,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,KAAK,EAAA,EACf,CAAa,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,CACP;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/sd-table/sd-tr/sd-tr.scss?tag=sd-tr","src/components/sd-table/sd-tr/sd-tr.tsx"],"sourcesContent":["sd-tr {\n display: table-row;\n}\n","import { Component, Host, h } from '@stencil/core';\n\n@Component({\n tag: 'sd-tr',\n styleUrl: 'sd-tr.scss',\n})\nexport class SdTr {\n render() {\n return (\n <Host role=\"row\">\n <slot></slot>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, d as createEvent, h, c as Host } from './p-CbnL1UUF.js';
|
|
2
2
|
import { r as resolveColor } from './p-BYf-ybt2.js';
|
|
3
|
-
import { d as defineCustomElement$1 } from './p-
|
|
3
|
+
import { d as defineCustomElement$1 } from './p-InrZhOLL.js';
|
|
4
4
|
|
|
5
5
|
const sdButtonCss = ".sd-button{text-decoration:none;cursor:pointer;border-radius:4px;transition:all 0.2s ease-in-out;position:relative;overflow:hidden;white-space:nowrap;-webkit-user-select:none;user-select:none;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center}.sd-button--xs{padding:0 8px;font-size:12px;font-weight:500;line-height:20px;min-height:24px}.sd-button--sm{padding:0 12px;font-size:12px;font-weight:500;line-height:20px;min-height:28px}.sd-button--md{padding:0 20px;font-size:16px;font-weight:500;line-height:26px;min-height:34px}.sd-button--lg{padding:0 28px;font-size:18px;font-weight:500;line-height:30px;min-height:62px}.sd-button--primary{background-color:var(--button-color);color:white;transition:filter 0.2s ease}.sd-button--primary::before{content:\"\";position:absolute;inset:0;background:#000000;opacity:0;transition:opacity 0.2s ease;z-index:0}.sd-button--primary:hover:not(.sd-button--disabled):not(.sd-button--loading)::before{opacity:0.25}.sd-button--outline{background:white;border:1px solid var(--button-color);color:var(--button-color)}.sd-button--outline::before{content:\"\";position:absolute;inset:0;background:var(--button-color);opacity:0;transition:opacity 0.2s ease;z-index:0}.sd-button--outline:hover:not(.sd-button--disabled):not(.sd-button--loading)::before{opacity:0.15}.sd-button--outline .sd-button__content{position:relative;z-index:1}.sd-button--ghost{background-color:transparent;color:var(--button-color);border-color:transparent}.sd-button--ghost::before{content:\"\";position:absolute;inset:0;background:var(--button-color);opacity:0;transition:opacity 0.2s ease;z-index:0}.sd-button--ghost:hover:not(.sd-button--disabled):not(.sd-button--loading)::before{opacity:0.15}.sd-button--ghost .sd-button__content{position:relative;z-index:1}.sd-button--disabled{border:1px solid #cccccc;background:#e1e1e1;color:#888888;cursor:not-allowed !important}.sd-button--icon-only{padding:0;width:fit-content;height:fit-content;aspect-ratio:1/1}.sd-button--no-hover:hover::before{opacity:0 !important}.sd-button .sd-button__content{display:inline-flex;align-items:center;justify-content:center;gap:4px;z-index:1;font-weight:500}";
|
|
6
6
|
|
|
@@ -97,6 +97,6 @@ function defineCustomElement() {
|
|
|
97
97
|
}
|
|
98
98
|
|
|
99
99
|
export { SdButton as S, defineCustomElement as d };
|
|
100
|
-
//# sourceMappingURL=p-
|
|
100
|
+
//# sourceMappingURL=p-DNEKh1qk.js.map
|
|
101
101
|
|
|
102
|
-
//# sourceMappingURL=p-
|
|
102
|
+
//# sourceMappingURL=p-DNEKh1qk.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-
|
|
1
|
+
{"file":"p-DNEKh1qk.js","mappings":";;;;AAAA,MAAM,WAAW,GAAG,moEAAmoE;;ACMvpE,MAAM,UAAU,GAAoC;AACnD,IAAA,EAAE,EAAE,EAAE;AACN,IAAA,EAAE,EAAE,EAAE;AACN,IAAA,EAAE,EAAE,EAAE;AACN,IAAA,EAAE,EAAE,EAAE;CACN;MAMY,QAAQ,iBAAAA,kBAAA,CAAA,MAAA,QAAA,SAAAC,CAAA,CAAA;;;;;;;;;IAGZ,OAAO,GAAmB,SAAS;IACnC,IAAI,GAAe,IAAI;IACvB,KAAK,GAAW,SAAS;IACzB,KAAK,GAAW,EAAE;IAClB,QAAQ,GAAY,KAAK;IACzB,IAAI,GAAkC,QAAQ;AAC9C,IAAA,IAAI;AACJ,IAAA,SAAS;AACT,IAAA,QAAQ;AACR,IAAA,SAAS;IACT,OAAO,GAAY,KAAK;IACxB,KAAK,GAAW,EAAE;AACjB,IAAA,OAAO;AAER,IAAA,WAAW,GAAG,CAAC,KAAiB,KAAI;AAC3C,QAAA,IAAI,IAAI,CAAC,QAAQ,EAAE;YAClB,KAAK,CAAC,cAAc,EAAE;YACtB,KAAK,CAAC,eAAe,EAAE;YACvB;;AAED,QAAA,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC;AACzB,KAAC;IAEO,gBAAgB,GAAA;AACvB,QAAA,MAAM,OAAO,GAAG,CAAC,WAAW,CAA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AA,KAAK,EAAC,oBAAoB,EAAA,EAC7B,IAAI,CAAC,IAAI,KACT,CACC,CAAA,SAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,uCAAuC,EAC7C,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,IAAI,EAAE,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,GAAG,UAAU,CAAC,IAAI,CAAC,IAAK,CAAC,EAC5D,KAAK,EACJ,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,OAAO,KAAK,SAAS,GAAG,MAAM,GAAG,aAAa,GAE5E,CACX,EAEA,IAAI,CAAC,KAAK,IAAI,CAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,kBAAkB,EAAE,EAAA,IAAI,CAAC,KAAK,CAAO,EAE9D,IAAI,CAAC,SAAS,KACd,gEACC,KAAK,EAAC,wCAAwC,EAC9C,IAAI,EAAE,IAAI,CAAC,SAAS,EACpB,IAAI,EAAE,UAAU,CAAC,IAAI,CAAC,IAAK,CAAC,EAC5B,KAAK,EAAE,IAAI,CAAC,OAAO,KAAK,SAAS,GAAG,MAAM,GAAG,aAAa,EAAA,CAChD,CACX,CACI,CACE,CACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/sd-button/sd-button.scss?tag=sd-button","src/components/sd-button/sd-button.tsx"],"sourcesContent":["@import 'variables';\n\n.sd-button {\n text-decoration: none;\n cursor: pointer;\n border-radius: 4px;\n transition: all 0.2s ease-in-out;\n position: relative;\n overflow: hidden;\n white-space: nowrap;\n -webkit-user-select: none;\n user-select: none;\n box-sizing: border-box;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n &--xs {\n padding: 0 8px;\n font-size: 12px;\n font-weight: 500;\n line-height: 20px;\n min-height: 24px;\n }\n &--sm {\n padding: 0 12px;\n font-size: 12px;\n font-weight: 500;\n line-height: 20px;\n min-height: 28px;\n }\n &--md {\n padding: 0 20px;\n font-size: 16px;\n font-weight: 500;\n line-height: 26px;\n min-height: 34px;\n }\n &--lg {\n padding: 0 28px;\n font-size: 18px;\n font-weight: 500;\n line-height: 30px;\n min-height: 62px;\n }\n &--primary {\n background-color: var(--button-color);\n color: white;\n transition: filter 0.2s ease;\n\n &::before {\n content: '';\n position: absolute;\n inset: 0;\n background: #000000;\n opacity: 0;\n transition: opacity 0.2s ease;\n z-index: 0;\n }\n\n &:hover:not(.sd-button--disabled):not(.sd-button--loading)::before {\n opacity: 0.25;\n }\n }\n\n &--outline {\n background: white;\n border: 1px solid var(--button-color);\n color: var(--button-color);\n\n &::before {\n content: '';\n position: absolute;\n inset: 0;\n background: var(--button-color);\n opacity: 0;\n transition: opacity 0.2s ease;\n z-index: 0;\n }\n\n &:hover:not(.sd-button--disabled):not(.sd-button--loading)::before {\n opacity: 0.15;\n }\n\n .sd-button__content {\n position: relative;\n z-index: 1;\n }\n }\n &--ghost {\n background-color: transparent;\n color: var(--button-color);\n border-color: transparent;\n\n &::before {\n content: '';\n position: absolute;\n inset: 0;\n background: var(--button-color);\n opacity: 0;\n transition: opacity 0.2s ease;\n z-index: 0;\n }\n\n &:hover:not(.sd-button--disabled):not(.sd-button--loading)::before {\n opacity: 0.15;\n }\n\n .sd-button__content {\n position: relative;\n z-index: 1;\n }\n }\n &--disabled {\n border: 1px solid $grey_45;\n background: $grey_30;\n color: $grey_65;\n cursor: not-allowed !important;\n }\n &--icon-only {\n padding: 0;\n width: fit-content;\n height: fit-content;\n aspect-ratio: 1 / 1;\n }\n &--no-hover {\n &:hover::before {\n opacity: 0 !important;\n }\n }\n\n .sd-button__content {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 4px;\n\n z-index: 1;\n font-weight: 500;\n }\n}\n\n// /* Focus styles */\n// .sd-button:focus-visible {\n// outline: 2px solid $primary;\n// outline-offset: 2px;\n// }\n\n// /* High contrast mode support */\n// @media (prefers-contrast: high) {\n// .sd-button {\n// border-width: 2px;\n// }\n// }\n","import { Component, Prop, h, Element, Event, EventEmitter, Host } from '@stencil/core';\nimport { resolveColor } from '../../utils/color';\n\nexport type ButtonVariant = 'primary' | 'outline' | 'ghost';\nexport type ButtonSize = 'xs' | 'sm' | 'md' | 'lg';\n\nconst ICON_SIZES: { [key in ButtonSize]: number } = {\n xs: 12,\n sm: 16,\n md: 20,\n lg: 24,\n};\n\n@Component({\n tag: 'sd-button',\n styleUrl: 'sd-button.scss',\n})\nexport class SdButton {\n @Element() el!: HTMLElement;\n\n @Prop() variant?: ButtonVariant = 'primary';\n @Prop() size: ButtonSize = 'sm';\n @Prop() color: string = '#025497';\n @Prop() label: string = '';\n @Prop() disabled: boolean = false;\n @Prop() type: 'button' | 'submit' | 'reset' = 'button';\n @Prop() icon?: IconName;\n @Prop() iconColor?: string;\n @Prop() iconSize?: number;\n @Prop() iconRight?: IconName;\n @Prop() noHover: boolean = false;\n @Prop() class: string = '';\n @Event() sdClick!: EventEmitter<MouseEvent>;\n\n private handleClick = (event: MouseEvent) => {\n if (this.disabled) {\n event.preventDefault();\n event.stopPropagation();\n return;\n }\n this.sdClick.emit(event);\n };\n\n private getButtonClasses(): string {\n const classes = ['sd-button'];\n\n classes.push(`sd-button--${this.variant}`);\n classes.push(`sd-button--${this.size}`);\n classes.push(`sd-button--color-${this.color}`);\n\n if (this.disabled) {\n classes.push('sd-button--disabled');\n }\n\n if (!this.label && (this.icon || this.iconRight)) {\n classes.push('sd-button--icon-only');\n }\n\n if (this.noHover) {\n classes.push('sd-button--no-hover');\n }\n\n return classes.join(' ');\n }\n\n render() {\n const buttonClasses = this.getButtonClasses();\n // 유틸로 색상 키 -> HEX 매핑 (없으면 원본 그대로)\n const resolvedColor = resolveColor(this.color);\n\n return (\n <Host style={{ '--button-color': resolvedColor }}>\n <button\n class={`${buttonClasses} ${this.class}`}\n type={this.type}\n disabled={this.disabled}\n onClick={this.handleClick}\n >\n <div class=\"sd-button__content\">\n {this.icon && (\n <sd-icon\n class=\"sd-button__icon sd-button__icon--left\"\n name={this.icon}\n size={this.iconSize ? this.iconSize : ICON_SIZES[this.size!]}\n color={\n this.iconColor ? this.iconColor : this.variant === 'primary' ? '#fff' : resolvedColor\n }\n ></sd-icon>\n )}\n\n {this.label && <div class=\"sd-button__label\">{this.label}</div>}\n\n {this.iconRight && (\n <sd-icon\n class=\"sd-button__icon sd-button__icon--right\"\n name={this.iconRight}\n size={ICON_SIZES[this.size!]}\n color={this.variant === 'primary' ? '#fff' : resolvedColor}\n ></sd-icon>\n )}\n </div>\n </button>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, d as createEvent, h, c as Host } 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 sdSelectOptionCss = "sd-select-option{display:block;height:fit-content;line-height:0}sd-select-option .sd-select__option{display:flex;padding:4px 12px;font-size:12px;line-height:20px;cursor:pointer}sd-select-option .sd-select__option__checkbox-wrapper{display:flex;width:100%;column-gap:8px;align-items:center;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}sd-select-option .sd-select__option--focused{background-color:#e6f1ff}sd-select-option .sd-select__option--selected:not(:hover):not(.sd-select__option--use-checkbox),sd-select-option .sd-select__option--focused:not(:hover):not(.sd-select__option--use-checkbox){color:#0075ff;font-weight:700}sd-select-option .sd-select__option--disabled{color:#aaaaaa;cursor:not-allowed}sd-select-option .sd-select__option:hover:not(.sd-select__option--disabled){background-color:#0075ff;color:white}";
|
|
6
6
|
|
|
@@ -36,7 +36,7 @@ const SdSelectOption = /*@__PURE__*/ proxyCustomElement(class SdSelectOption ext
|
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
38
|
render() {
|
|
39
|
-
return (h(Host, { key: '
|
|
39
|
+
return (h(Host, { key: '56d2ed3525521a59eb3f0d8231a53259ebd22424' }, h("div", { key: '200849af32a94d4c9aeb35760ce3d8396da45836', class: {
|
|
40
40
|
'sd-select__option': true,
|
|
41
41
|
'sd-select__option--selected': this.isSelected,
|
|
42
42
|
'sd-select__option--disabled': !!this.option.disabled,
|
|
@@ -92,6 +92,6 @@ function defineCustomElement() {
|
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
export { SdSelectOption as S, defineCustomElement as d };
|
|
95
|
-
//# sourceMappingURL=p-
|
|
95
|
+
//# sourceMappingURL=p-DTUSoHK4.js.map
|
|
96
96
|
|
|
97
|
-
//# sourceMappingURL=p-
|
|
97
|
+
//# sourceMappingURL=p-DTUSoHK4.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-
|
|
1
|
+
{"file":"p-DTUSoHK4.js","mappings":";;;;AAAA,MAAM,iBAAiB,GAAG,g0BAAg0B;;MCiB70B,cAAc,iBAAAA,kBAAA,CAAA,MAAA,cAAA,SAAAC,CAAA,CAAA;;;;;;;;;AAGlB,IAAA,MAAM;AACN,IAAA,KAAK;IACL,UAAU,GAAY,KAAK;IAC3B,SAAS,GAAY,KAAK;AAC1B,IAAA,WAAW;IACX,QAAQ,GAAY,KAAK;IACzB,WAAW,GAAY,KAAK;IAE3B,SAAS,GAAY,KAAK;AAGnC,IAAA,MAAM,UAAU,GAAA;AACf,QAAA,OAAO,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ;;AAGrB,IAAA,WAAW;AAMZ,IAAA,WAAW,GAAG,CAAC,KAAiB,KAAI;QAC3C,KAAK,CAAC,eAAe,EAAE;AAEvB,QAAA,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;AAC5C,YAAA,IAAI,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N,IAAI,CAAC,MAAM,CAAC,KAAK,CACjB,CACI,CACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/sd-select/sd-select-option/sd-select-option.scss?tag=sd-select-option","src/components/sd-select/sd-select-option/sd-select-option.tsx"],"sourcesContent":["@import 'variables';\n\nsd-select-option {\n display: block;\n height: fit-content;\n line-height: 0;\n .sd-select__option {\n display: flex;\n padding: 4px 12px;\n font-size: 12px;\n line-height: 20px;\n cursor: pointer;\n\n &__checkbox-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\n &--focused {\n background-color: $brilliantblue_20;\n }\n\n &--selected,\n &--focused {\n &:not(:hover):not(.sd-select__option--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--disabled) {\n background-color: $brilliantblue_75;\n color: white;\n }\n }\n }\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Method,\n Prop,\n State,\n} from '@stencil/core';\nimport type { SelectOption } from '../../../types/select';\n\n@Component({\n tag: 'sd-select-option',\n styleUrl: 'sd-select-option.scss',\n})\nexport class SdSelectOption {\n @Element() el!: HTMLElement;\n\n @Prop() option!: SelectOption;\n @Prop() index!: number;\n @Prop() isSelected: boolean = false;\n @Prop() isFocused: boolean = false;\n @Prop() optionStyle?: { [key: string]: string };\n @Prop() disabled: boolean = false;\n @Prop() useCheckbox: boolean = false;\n\n @State() isHovered: boolean = false;\n\n @Method()\n async isDisabled(): Promise<boolean> {\n return !!this.option.disabled;\n }\n\n @Event() optionClick!: EventEmitter<{\n option: SelectOption;\n index: number;\n event: MouseEvent;\n }>;\n\n private handleClick = (event: MouseEvent) => {\n event.stopPropagation();\n\n if (!this.option.disabled && !this.disabled) {\n this.optionClick.emit({\n option: this.option,\n index: this.index,\n event,\n });\n }\n };\n\n render() {\n return (\n <Host>\n <div\n class={{\n 'sd-select__option': true,\n 'sd-select__option--selected': this.isSelected,\n 'sd-select__option--disabled': !!this.option.disabled,\n 'sd-select__option--focused': this.isFocused,\n 'sd-select__option--use-checkbox': this.useCheckbox,\n }}\n onMouseEnter={() => (this.isHovered = true)}\n onMouseLeave={() => (this.isHovered = false)}\n style={this.optionStyle}\n data-index={this.index}\n onClick={this.handleClick}\n >\n {this.useCheckbox ? (\n <div class=\"sd-select__option__checkbox-wrapper\">\n <sd-checkbox\n checked={this.isSelected}\n disabled={this.option.disabled}\n // checkboxStyle={\n // !this.isSelected\n // ? { borderColor: '#888' }\n // : this.isHovered\n // ? { borderColor: 'white' }\n // : { borderColor: '#0075ff' }\n // }\n onClick={e => {\n e.preventDefault();\n this.handleClick(e);\n }}\n ></sd-checkbox>\n <span class=\"sd-select__option-label\">{this.option.label}</span>\n </div>\n ) : (\n this.option.label\n )}\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, d as createEvent, h } 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 sdCheckboxCss = "sd-checkbox{display:inline-block;height:20px;line-height:0}sd-checkbox .sd-checkbox{cursor:pointer;display:inline-flex;align-items:center;gap:8px;height:20px;max-height:20px}sd-checkbox .sd-checkbox>input{display:none}sd-checkbox .sd-checkbox:hover.sd-checkbox--checked .sd-checkbox__bg,sd-checkbox .sd-checkbox:hover.sd-checkbox--indeterminate .sd-checkbox__bg{border-color:#005cc9;background:#005cc9}sd-checkbox .sd-checkbox:hover.sd-checkbox--unchecked .sd-checkbox__bg{border:1px solid #0075ff;background:#d9eaff}sd-checkbox .sd-checkbox:hover.sd-checkbox--disabled .sd-checkbox__bg{border:1px solid transparent;background:#eeeeee}sd-checkbox .sd-checkbox__bg{width:16px;height:16px;border-radius:2px;border:1px solid #888888;box-sizing:border-box;display:inline-flex;justify-content:center;align-items:center;overflow:hidden;line-height:0}sd-checkbox .sd-checkbox__label{font-size:12px;color:#333333;line-height:20px}sd-checkbox .sd-checkbox--checked.sd-checkbox--disabled .sd-checkbox__bg,sd-checkbox .sd-checkbox--indeterminate.sd-checkbox--disabled .sd-checkbox__bg{background:#eeeeee;border:1px solid #cccccc !important}sd-checkbox .sd-checkbox--checked .sd-checkbox__bg,sd-checkbox .sd-checkbox--indeterminate .sd-checkbox__bg{border:1px solid #0075ff;background:#0075ff}sd-checkbox .sd-checkbox--unchecked .sd-checkbox__bg{background:white}sd-checkbox .sd-checkbox--disabled{cursor:not-allowed}sd-checkbox .sd-checkbox--disabled .sd-checkbox__bg{background:#eeeeee;border:1px solid #cccccc !important}";
|
|
5
5
|
|
|
@@ -113,6 +113,6 @@ function defineCustomElement() {
|
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
export { SdCheckbox as S, defineCustomElement as d };
|
|
116
|
-
//# sourceMappingURL=p-
|
|
116
|
+
//# sourceMappingURL=p-DpcL5xdv.js.map
|
|
117
117
|
|
|
118
|
-
//# sourceMappingURL=p-
|
|
118
|
+
//# sourceMappingURL=p-DpcL5xdv.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-
|
|
1
|
+
{"file":"p-DpcL5xdv.js","mappings":";;;AAAA,MAAM,aAAa,GAAG,0+CAA0+C;;MCQn/C,UAAU,iBAAAA,kBAAA,CAAA,MAAA,UAAA,SAAAC,CAAA,CAAA;;;;;;;;;;AAId,IAAA,OAAO;;AAGP,IAAA,GAAG;;IAGH,QAAQ,GAAY,KAAK;;IAGzB,KAAK,GAAW,EAAE;;IAGT,SAAS,GAAmB,KAAK;;AAGzC,IAAA,QAAQ;IAEjB,iBAAiB,GAAA;AAChB,QAAA,IAAI,CAA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,IAAI,UAAU,EAC7B,CAAA,EACF,CAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,iBAAiB,EAC1B,EAAA,IAAI,CAAC,SAAS,KAAK,KAAK,IACxB,CACC,CAAA,SAAA,EAAA,EAAA,IAAI,EAAE,IAAI,CAAC,SAAS,KAAK,IAAI,GAAG,OAAO,GAAG,OAAO,EACjD,IAAI,EAAE,EAAE,EACR,KAAK,EAAE,IAAI,CAAC,QAAQ,GAAG,SAAS,GAAG,OAAO,EACzC,CAAA,IACC,IAAI,CACH,EACL,IAAI,CAAC,KAAK,IAAI,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,KAAK,EAAC,oBAAoB,EAAE,EAAA,IAAI,CAAC,KAAK,CAAQ,CAC5D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/sd-checkbox/sd-checkbox.scss?tag=sd-checkbox","src/components/sd-checkbox/sd-checkbox.tsx"],"sourcesContent":["@import 'variables';\n\nsd-checkbox {\n display: inline-block;\n height: 20px;\n line-height: 0;\n\n .sd-checkbox {\n cursor: pointer;\n display: inline-flex;\n align-items: center;\n gap: 8px;\n height: 20px;\n max-height: 20px;\n\n > input {\n display: none;\n }\n\n &:hover {\n &.sd-checkbox--checked,\n &.sd-checkbox--indeterminate {\n .sd-checkbox__bg {\n border-color: $brilliantblue_80;\n background: $brilliantblue_80;\n }\n }\n\n &.sd-checkbox--unchecked {\n .sd-checkbox__bg {\n border: 1px solid $brilliantblue_75;\n background: $brilliantblue_25;\n }\n }\n\n &.sd-checkbox--disabled {\n .sd-checkbox__bg {\n border: 1px solid transparent;\n background: $grey_20;\n }\n }\n }\n\n &__bg {\n width: 16px;\n height: 16px;\n border-radius: 2px;\n border: 1px solid $grey_65;\n box-sizing: border-box;\n display: inline-flex;\n justify-content: center;\n align-items: center;\n overflow: hidden;\n line-height: 0;\n }\n\n &__label {\n font-size: 12px;\n color: $grey_90;\n line-height: 20px;\n }\n\n &--checked,\n &--indeterminate {\n &.sd-checkbox--disabled {\n .sd-checkbox__bg {\n background: $grey_20;\n border: 1px solid $grey_45 !important;\n }\n }\n\n .sd-checkbox__bg {\n border: 1px solid $brilliantblue_75;\n background: $brilliantblue_75;\n }\n }\n\n &--unchecked {\n .sd-checkbox__bg {\n background: white;\n }\n }\n\n &--disabled {\n cursor: not-allowed;\n .sd-checkbox__bg {\n background: $grey_20;\n border: 1px solid $grey_45 !important;\n }\n }\n }\n}\n","import { Component, Prop, h, Element, Event, EventEmitter, State, Watch } from '@stencil/core';\n\nexport type CheckedType = boolean | any[] | null;\n\n@Component({\n tag: 'sd-checkbox',\n styleUrl: 'sd-checkbox.scss',\n})\nexport class SdCheckbox {\n @Element() el!: HTMLElement;\n\n /** 현재 선택 상태 또는 배열 형태의 값 */\n @Prop() checked!: CheckedType;\n\n /** 배열 모드에서의 개별 값 */\n @Prop() val?: any;\n\n /** 비활성화 여부 */\n @Prop() disabled: boolean = false;\n\n /** 표시할 라벨 텍스트 */\n @Prop() label: string = '';\n\n /** 내부 체크 상태 */\n @State() private isChecked: boolean | null = false;\n\n /** 값 변경 이벤트 */\n @Event() sdChange!: EventEmitter<CheckedType>;\n\n componentWillLoad() {\n this.updateCheckedState(this.checked);\n }\n\n componentWillRender() {\n this.updateCheckedState(this.checked);\n }\n\n @Watch('checked')\n watchValueHandler(newValue: CheckedType) {\n this.updateCheckedState(newValue);\n }\n\n private get checkboxClasses(): string {\n const classes = [\n 'sd-checkbox',\n `sd-checkbox--${this.isChecked ? 'checked' : this.isChecked === null ? 'indeterminate' : 'unchecked'}`,\n ];\n\n if (this.disabled) {\n classes.push('sd-checkbox--disabled');\n }\n\n return classes.join(' ');\n }\n\n private updateCheckedState(value: CheckedType) {\n if (value === null) {\n this.isChecked = null;\n } else if (typeof value === 'boolean') {\n this.isChecked = value;\n } else if (Array.isArray(value)) {\n this.isChecked = this.val !== undefined && value.includes(this.val);\n } else {\n this.isChecked = false;\n }\n }\n\n private handleChange = () => {\n if (this.disabled) return;\n\n let newValue: CheckedType;\n\n if (typeof this.checked === 'boolean') {\n newValue = !this.checked;\n } else if (Array.isArray(this.checked)) {\n if (this.val === undefined) {\n console.warn('A \"val\" property is required when using an array for the \"value\" property.');\n }\n\n const valueSet = new Set(this.checked);\n valueSet.has(this.val) ? valueSet.delete(this.val) : valueSet.add(this.val);\n newValue = Array.from(valueSet);\n } else {\n newValue = !this.isChecked;\n }\n\n this.sdChange.emit(newValue);\n };\n\n render() {\n return (\n <label\n aria-checked={this.isChecked === null ? 'mixed' : this.isChecked.toString()}\n aria-disabled={this.disabled.toString()}\n role=\"checkbox\"\n aria-label={this.label || 'checkbox'}\n class={this.checkboxClasses}\n >\n <input\n type=\"checkbox\"\n value={this.val}\n checked={!!this.isChecked}\n disabled={this.disabled}\n onChange={this.handleChange}\n name={this.label || 'checkbox'}\n />\n <div class=\"sd-checkbox__bg\">\n {this.isChecked !== false ? (\n <sd-icon\n name={this.isChecked === true ? 'check' : 'minus'}\n size={12}\n color={this.disabled ? '#888888' : 'white'}\n />\n ) : null}\n </div>\n {this.label && <span class=\"sd-checkbox__label\">{this.label}</span>}\n </label>\n );\n }\n}\n"],"version":3}
|
|
@@ -2013,7 +2013,7 @@ const SdIcon = /*@__PURE__*/ proxyCustomElement(class SdIcon extends H {
|
|
|
2013
2013
|
}
|
|
2014
2014
|
render() {
|
|
2015
2015
|
const IconComponent = Icons[this.name]?.[this.size];
|
|
2016
|
-
return (h("i", { key: '
|
|
2016
|
+
return (h("i", { key: '1b3f72da8307068cb0723bbc66723bfcf15a4644', class: this.getIconClasses(), style: this.iconStyle }, h(IconComponent, { key: 'a2526ffca360d28daf0f265822072e294ed27155', color: this.resolvedColor })));
|
|
2017
2017
|
}
|
|
2018
2018
|
static get style() { return sdIconCss; }
|
|
2019
2019
|
}, [768, "sd-icon", {
|
|
@@ -2039,6 +2039,6 @@ function defineCustomElement() {
|
|
|
2039
2039
|
}
|
|
2040
2040
|
|
|
2041
2041
|
export { SdIcon as S, defineCustomElement as d };
|
|
2042
|
-
//# sourceMappingURL=p-
|
|
2042
|
+
//# sourceMappingURL=p-InrZhOLL.js.map
|
|
2043
2043
|
|
|
2044
|
-
//# sourceMappingURL=p-
|
|
2044
|
+
//# sourceMappingURL=p-InrZhOLL.js.map
|