@sellmate/design-system 1.0.68 → 1.0.70
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-action-modal.cjs.entry.js +1 -1
- package/dist/cjs/sd-badge.cjs.entry.js +1 -1
- package/dist/cjs/sd-barcode-input.cjs.entry.js +2 -1
- package/dist/cjs/sd-button-v2_2.cjs.entry.js +3 -3
- package/dist/cjs/sd-button_4.cjs.entry.js +23 -6
- package/dist/cjs/sd-card.cjs.entry.js +1 -1
- package/dist/cjs/sd-chip.cjs.entry.js +1 -1
- package/dist/cjs/sd-circle-progress.cjs.entry.js +1 -1
- package/dist/cjs/sd-confirm-modal_2.cjs.entry.js +3 -3
- package/dist/cjs/sd-date-picker-calendar.cjs.entry.js +1 -1
- package/dist/cjs/sd-date-picker-trigger.cjs.entry.js +2 -2
- package/dist/cjs/sd-date-picker.cjs.entry.js +3 -2
- package/dist/cjs/sd-date-range-picker-calendar.cjs.entry.js +1 -1
- package/dist/cjs/sd-date-range-picker.cjs.entry.js +3 -2
- package/dist/cjs/sd-dropdown-button.cjs.entry.js +3 -3
- package/dist/cjs/sd-file-picker.cjs.entry.js +2 -1
- package/dist/cjs/sd-ghost-button.cjs.entry.js +2 -2
- package/dist/cjs/sd-input_2.cjs.entry.js +3 -2
- package/dist/cjs/sd-loading-container.cjs.entry.js +2 -2
- package/dist/cjs/sd-number-input.cjs.entry.js +4 -3
- package/dist/cjs/sd-pagination_2.cjs.entry.js +61 -29
- package/dist/cjs/sd-popover.cjs.entry.js +23 -23
- package/dist/cjs/sd-portal.cjs.entry.js +1 -1
- package/dist/cjs/sd-radio-button.cjs.entry.js +1 -1
- package/dist/cjs/sd-radio-group.cjs.entry.js +1 -1
- package/dist/cjs/sd-radio.cjs.entry.js +1 -1
- package/dist/cjs/sd-select-group.cjs.entry.js +2 -1
- package/dist/cjs/sd-select-multiple-group.cjs.entry.js +1 -1
- package/dist/cjs/sd-select-v2-list-item_4.cjs.entry.js +28 -4
- package/dist/cjs/sd-select.cjs.entry.js +2 -1
- package/dist/cjs/sd-tabs.cjs.entry.js +1 -1
- package/dist/cjs/sd-textarea.cjs.entry.js +2 -1
- package/dist/cjs/table-test.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/sd-action-modal/sd-action-modal.js +1 -1
- package/dist/collection/components/sd-badge/sd-badge.js +1 -1
- package/dist/collection/components/sd-barcode-input/sd-barcode-input.js +29 -1
- package/dist/collection/components/sd-button-v2/sd-button-v2.js +3 -3
- package/dist/collection/components/sd-card/sd-card.js +1 -1
- package/dist/collection/components/sd-chip/sd-chip.js +1 -1
- package/dist/collection/components/sd-circle-progress/sd-circle-progress.js +1 -1
- package/dist/collection/components/sd-confirm-modal/sd-confirm-modal.js +2 -2
- package/dist/collection/components/sd-date-picker/sd-date-picker-calendar/sd-date-picker-calendar.js +1 -1
- package/dist/collection/components/sd-date-picker/sd-date-picker-trigger/sd-date-picker-trigger.js +2 -2
- package/dist/collection/components/sd-date-picker/sd-date-picker.js +30 -2
- package/dist/collection/components/sd-date-range-picker/sd-date-range-picker-calendar/sd-date-range-picker-calendar.js +1 -1
- package/dist/collection/components/sd-date-range-picker/sd-date-range-picker.js +30 -2
- package/dist/collection/components/sd-dropdown-button/sd-dropdown-button.js +3 -3
- package/dist/collection/components/sd-field/sd-field.config.js +5 -0
- package/dist/collection/components/sd-field/sd-field.css +4 -0
- package/dist/collection/components/sd-field/sd-field.js +39 -5
- package/dist/collection/components/sd-file-picker/sd-file-picker.js +29 -1
- package/dist/collection/components/sd-floating-portal/sd-floating-portal.js +12 -1
- package/dist/collection/components/sd-ghost-button/sd-ghost-button.js +2 -2
- package/dist/collection/components/sd-input/sd-input.js +30 -2
- package/dist/collection/components/sd-loading-container/sd-loading-container.js +2 -2
- package/dist/collection/components/sd-loading-modal/sd-loading-modal.js +1 -1
- package/dist/collection/components/sd-number-input/sd-number-input.js +31 -3
- package/dist/collection/components/sd-pagination/sd-pagination.js +3 -3
- package/dist/collection/components/sd-popover/sd-popover.js +49 -53
- package/dist/collection/components/sd-portal/sd-portal.js +1 -1
- package/dist/collection/components/sd-radio/sd-radio.js +1 -1
- package/dist/collection/components/sd-radio-button/sd-radio-button.js +1 -1
- package/dist/collection/components/sd-radio-group/sd-radio-group.js +1 -1
- package/dist/collection/components/sd-select/sd-select.js +29 -1
- package/dist/collection/components/sd-select-group/sd-select-group.js +29 -1
- package/dist/collection/components/sd-select-multiple-group/sd-select-multiple-group.js +1 -1
- package/dist/collection/components/sd-select-v2/sd-select-v2-listbox/sd-select-v2-listbox.js +8 -2
- package/dist/collection/components/sd-select-v2/sd-select-v2-trigger/sd-select-v2-trigger.js +69 -2
- package/dist/collection/components/sd-select-v2/sd-select-v2.js +124 -27
- package/dist/collection/components/sd-tabs/sd-tabs.js +1 -1
- package/dist/collection/components/sd-textarea/sd-textarea.js +29 -1
- package/dist/collection/components/table-test/table-test.js +1 -1
- package/dist/components/{p-z9MoRjYX.js → p-9HhG23Vy.js} +1 -1
- package/dist/components/p-B8XV0vD8.js +1 -0
- package/dist/components/{p-DlkxQ9Jn.js → p-BLxwBD2G.js} +1 -1
- package/dist/components/{p-B1j9ZWLJ.js → p-BM9Fr6OX.js} +1 -1
- package/dist/components/{p-CEeNVTzW.js → p-BfG60atH.js} +1 -1
- package/dist/components/p-CU7IOtCw.js +1 -0
- package/dist/components/{p-DPCj-bFr.js → p-Cc3bTBBn.js} +1 -1
- package/dist/components/{p-CS62OEXf.js → p-CeHRQb7A.js} +1 -1
- package/dist/components/{p-D21iKAp7.js → p-CoOl8zeX.js} +1 -1
- package/dist/components/p-CscUxW9p.js +1 -0
- package/dist/components/p-CuiFB2yQ.js +1 -0
- package/dist/components/p-D1SaZEYh.js +1 -0
- package/dist/components/{p-BPXQ6DXz.js → p-DM5vbfxB.js} +1 -1
- package/dist/components/{p-T5BGXHZg.js → p-DWJ3CIKO.js} +1 -1
- package/dist/components/{p-BFd54Imz.js → p-D_XZAh9v.js} +1 -1
- package/dist/components/{p-CtrDZYN5.js → p-DboqT9Do.js} +1 -1
- package/dist/components/p-DkHyt3Dz.js +1 -0
- package/dist/components/{p-DIro-Wat.js → p-Dmk-f7qn.js} +1 -1
- package/dist/components/p-DpBU4AWy.js +1 -0
- package/dist/components/p-r8kAA1Su.js +1 -0
- package/dist/components/{p-BaHpEtbz.js → p-raiEivQ1.js} +1 -1
- package/dist/components/sd-action-modal.js +1 -1
- package/dist/components/sd-badge.js +1 -1
- package/dist/components/sd-barcode-input.js +1 -1
- package/dist/components/sd-button-v2.js +1 -1
- package/dist/components/sd-card.js +1 -1
- package/dist/components/sd-chip.js +1 -1
- package/dist/components/sd-circle-progress.js +1 -1
- package/dist/components/sd-confirm-modal.js +1 -1
- package/dist/components/sd-date-picker-calendar.js +1 -1
- package/dist/components/sd-date-picker-trigger.js +1 -1
- package/dist/components/sd-date-picker.js +1 -1
- package/dist/components/sd-date-range-picker-calendar.js +1 -1
- package/dist/components/sd-date-range-picker.js +1 -1
- package/dist/components/sd-dropdown-button.js +1 -1
- package/dist/components/sd-field.js +1 -1
- package/dist/components/sd-file-picker.js +1 -1
- package/dist/components/sd-floating-portal.js +1 -1
- package/dist/components/sd-ghost-button.js +1 -1
- package/dist/components/sd-guide.js +1 -1
- package/dist/components/sd-input.js +1 -1
- package/dist/components/sd-loading-container.js +1 -1
- package/dist/components/sd-loading-modal.js +1 -1
- package/dist/components/sd-modal-container.js +1 -1
- package/dist/components/sd-number-input.js +1 -1
- package/dist/components/sd-pagination.js +1 -1
- package/dist/components/sd-popover.js +1 -1
- package/dist/components/sd-portal.js +1 -1
- package/dist/components/sd-radio-button.js +1 -1
- package/dist/components/sd-radio-group.js +1 -1
- package/dist/components/sd-radio.js +1 -1
- package/dist/components/sd-select-dropdown.js +1 -1
- package/dist/components/sd-select-group.js +1 -1
- package/dist/components/sd-select-multiple-group.js +1 -1
- package/dist/components/sd-select-multiple.js +1 -1
- package/dist/components/sd-select-search-input.js +1 -1
- package/dist/components/sd-select-v2-listbox.js +1 -1
- package/dist/components/sd-select-v2-trigger.js +1 -1
- package/dist/components/sd-select-v2.js +1 -1
- package/dist/components/sd-select.js +1 -1
- package/dist/components/sd-table.js +1 -1
- package/dist/components/sd-tabs.js +1 -1
- package/dist/components/sd-textarea.js +1 -1
- package/dist/components/sd-thead.js +1 -1
- package/dist/components/sd-toast-container.js +1 -1
- package/dist/components/sd-toast.js +1 -1
- package/dist/components/sd-tooltip.js +1 -1
- package/dist/components/table-test.js +1 -1
- package/dist/design-system/design-system.esm.js +1 -1
- package/dist/design-system/p-06080355.entry.js +1 -0
- package/dist/design-system/{p-1b8e63a6.entry.js → p-0967ef4b.entry.js} +1 -1
- package/dist/design-system/{p-449e58ee.entry.js → p-12f13678.entry.js} +1 -1
- package/dist/design-system/{p-23c31074.entry.js → p-132721ad.entry.js} +1 -1
- package/dist/design-system/{p-8cd1b533.entry.js → p-1af3c5c5.entry.js} +1 -1
- package/dist/design-system/p-2196f439.entry.js +1 -0
- package/dist/design-system/{p-01ac7743.entry.js → p-2319b722.entry.js} +1 -1
- package/dist/design-system/{p-0d485537.entry.js → p-27165b31.entry.js} +1 -1
- package/dist/design-system/{p-4d434794.entry.js → p-3677b3ce.entry.js} +1 -1
- package/dist/design-system/{p-60ece09d.entry.js → p-3c64616c.entry.js} +1 -1
- package/dist/design-system/p-4ba03850.entry.js +1 -0
- package/dist/design-system/p-639d237f.entry.js +1 -0
- package/dist/design-system/{p-35b29182.entry.js → p-7232731b.entry.js} +1 -1
- package/dist/design-system/p-7dc33db0.entry.js +1 -0
- package/dist/design-system/{p-002e10ac.entry.js → p-8cb8444e.entry.js} +1 -1
- package/dist/design-system/p-8d65090b.entry.js +1 -0
- package/dist/design-system/{p-9f0fe1f6.entry.js → p-9960d880.entry.js} +1 -1
- package/dist/design-system/p-9dd7befe.entry.js +1 -0
- package/dist/design-system/{p-92a52f89.entry.js → p-a4e85dba.entry.js} +1 -1
- package/dist/design-system/p-a70ca82b.entry.js +1 -0
- package/dist/design-system/{p-48f1f9ff.entry.js → p-a8e7406e.entry.js} +1 -1
- package/dist/design-system/{p-1a455448.entry.js → p-ac441e78.entry.js} +1 -1
- package/dist/design-system/p-ac9f7551.entry.js +1 -0
- package/dist/design-system/p-b3b1f25d.entry.js +1 -0
- package/dist/design-system/p-beb8d3de.entry.js +1 -0
- package/dist/design-system/{p-4f9f25a1.entry.js → p-c290c0e0.entry.js} +1 -1
- package/dist/design-system/p-c62ad2f4.entry.js +1 -0
- package/dist/design-system/{p-4de3b6b1.entry.js → p-c67ff78d.entry.js} +1 -1
- package/dist/design-system/{p-7dd8beba.entry.js → p-c68e37f2.entry.js} +1 -1
- package/dist/design-system/p-d668fd71.entry.js +1 -0
- package/dist/design-system/{p-6ef2d08f.entry.js → p-d8a48add.entry.js} +1 -1
- package/dist/design-system/{p-cdedac3c.entry.js → p-dc43ebf9.entry.js} +1 -1
- package/dist/design-system/{p-6b478f5c.entry.js → p-f6869087.entry.js} +1 -1
- package/dist/esm/design-system.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/sd-action-modal.entry.js +1 -1
- package/dist/esm/sd-badge.entry.js +1 -1
- package/dist/esm/sd-barcode-input.entry.js +2 -1
- package/dist/esm/sd-button-v2_2.entry.js +3 -3
- package/dist/esm/sd-button_4.entry.js +23 -6
- package/dist/esm/sd-card.entry.js +1 -1
- package/dist/esm/sd-chip.entry.js +1 -1
- package/dist/esm/sd-circle-progress.entry.js +1 -1
- package/dist/esm/sd-confirm-modal_2.entry.js +3 -3
- package/dist/esm/sd-date-picker-calendar.entry.js +1 -1
- package/dist/esm/sd-date-picker-trigger.entry.js +2 -2
- package/dist/esm/sd-date-picker.entry.js +3 -2
- package/dist/esm/sd-date-range-picker-calendar.entry.js +1 -1
- package/dist/esm/sd-date-range-picker.entry.js +3 -2
- package/dist/esm/sd-dropdown-button.entry.js +3 -3
- package/dist/esm/sd-file-picker.entry.js +2 -1
- package/dist/esm/sd-ghost-button.entry.js +2 -2
- package/dist/esm/sd-input_2.entry.js +3 -2
- package/dist/esm/sd-loading-container.entry.js +2 -2
- package/dist/esm/sd-number-input.entry.js +4 -3
- package/dist/esm/sd-pagination_2.entry.js +61 -29
- package/dist/esm/sd-popover.entry.js +24 -24
- package/dist/esm/sd-portal.entry.js +1 -1
- package/dist/esm/sd-radio-button.entry.js +1 -1
- package/dist/esm/sd-radio-group.entry.js +1 -1
- package/dist/esm/sd-radio.entry.js +1 -1
- package/dist/esm/sd-select-group.entry.js +2 -1
- package/dist/esm/sd-select-multiple-group.entry.js +1 -1
- package/dist/esm/sd-select-v2-list-item_4.entry.js +28 -4
- package/dist/esm/sd-select.entry.js +2 -1
- package/dist/esm/sd-tabs.entry.js +1 -1
- package/dist/esm/sd-textarea.entry.js +2 -1
- package/dist/esm/table-test.entry.js +1 -1
- package/dist/types/components/sd-barcode-input/sd-barcode-input.d.ts +2 -0
- package/dist/types/components/sd-date-picker/sd-date-picker.d.ts +2 -0
- package/dist/types/components/sd-date-range-picker/sd-date-range-picker.d.ts +2 -0
- package/dist/types/components/sd-field/sd-field.config.d.ts +2 -0
- package/dist/types/components/sd-field/sd-field.d.ts +2 -1
- package/dist/types/components/sd-file-picker/sd-file-picker.d.ts +2 -0
- package/dist/types/components/sd-floating-portal/sd-floating-portal.d.ts +1 -0
- package/dist/types/components/sd-input/sd-input.d.ts +2 -0
- package/dist/types/components/sd-number-input/sd-number-input.d.ts +2 -0
- package/dist/types/components/sd-popover/sd-popover.d.ts +12 -8
- package/dist/types/components/sd-select/sd-select.d.ts +2 -0
- package/dist/types/components/sd-select-group/sd-select-group.d.ts +2 -0
- package/dist/types/components/sd-select-v2/sd-select-v2-listbox/sd-select-v2-listbox.d.ts +4 -0
- package/dist/types/components/sd-select-v2/sd-select-v2-trigger/sd-select-v2-trigger.d.ts +6 -0
- package/dist/types/components/sd-select-v2/sd-select-v2.d.ts +10 -0
- package/dist/types/components/sd-textarea/sd-textarea.d.ts +2 -0
- package/dist/types/components.d.ts +128 -17
- package/hydrate/index.js +207 -114
- package/hydrate/index.mjs +207 -114
- package/package.json +1 -1
- package/dist/components/p-Cb1M05mf.js +0 -1
- package/dist/components/p-CsPyZohK.js +0 -1
- package/dist/components/p-DGPGMB_Z.js +0 -1
- package/dist/components/p-DQLyH3dr.js +0 -1
- package/dist/components/p-DWW5xr6r.js +0 -1
- package/dist/components/p-D_lyw4rN.js +0 -1
- package/dist/components/p-Diis5oCN.js +0 -1
- package/dist/components/p-N_EbEY8s.js +0 -1
- package/dist/design-system/p-07736d67.entry.js +0 -1
- package/dist/design-system/p-0c98676e.entry.js +0 -1
- package/dist/design-system/p-16eae7ae.entry.js +0 -1
- package/dist/design-system/p-23ff6bee.entry.js +0 -1
- package/dist/design-system/p-2a663b3b.entry.js +0 -1
- package/dist/design-system/p-33713805.entry.js +0 -1
- package/dist/design-system/p-5a0b0a1b.entry.js +0 -1
- package/dist/design-system/p-6ca6dfaf.entry.js +0 -1
- package/dist/design-system/p-8281dc36.entry.js +0 -1
- package/dist/design-system/p-87222184.entry.js +0 -1
- package/dist/design-system/p-ca6b4d4a.entry.js +0 -1
- package/dist/design-system/p-e1b307ee.entry.js +0 -1
- package/dist/design-system/p-ebc72b3f.entry.js +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
2
|
import fieldTokens from "../../tokens/generated/component.field.json";
|
|
3
|
-
import { FIELD_LABEL_SIZE_MAP } from "./sd-field.config";
|
|
3
|
+
import { FIELD_ADDON_ALIGN_MAP, FIELD_LABEL_SIZE_MAP, } from "./sd-field.config";
|
|
4
4
|
const FORM_PARENT_TAGS = [
|
|
5
5
|
'sd-select',
|
|
6
6
|
'sd-select-multiple',
|
|
@@ -31,6 +31,7 @@ export class SdField {
|
|
|
31
31
|
label = '';
|
|
32
32
|
labelWidth = '';
|
|
33
33
|
addonLabel = '';
|
|
34
|
+
addonAlign = 'start';
|
|
34
35
|
icon = undefined;
|
|
35
36
|
labelTooltip = '';
|
|
36
37
|
labelTooltipProps = null;
|
|
@@ -161,22 +162,28 @@ export class SdField {
|
|
|
161
162
|
: addonTokens.border.default,
|
|
162
163
|
'--sd-field-addon-gap': `${addonTokens.gap}px`,
|
|
163
164
|
'--sd-field-addon-border-width': `${addonTokens.border.width}px`,
|
|
165
|
+
'--sd-field-addon-justify': FIELD_ADDON_ALIGN_MAP[this.addonAlign] ?? FIELD_ADDON_ALIGN_MAP.start,
|
|
166
|
+
...(this.labelWidth
|
|
167
|
+
? {
|
|
168
|
+
'--sd-field-addon-width': typeof this.labelWidth === 'number' ? `${this.labelWidth}px` : this.labelWidth,
|
|
169
|
+
}
|
|
170
|
+
: {}),
|
|
164
171
|
}
|
|
165
172
|
: {};
|
|
166
|
-
return (h("div", { key: '
|
|
173
|
+
return (h("div", { key: '1968d09203629bca596f6569720d532cae387654', class: {
|
|
167
174
|
'sd-field': true,
|
|
168
175
|
'sd-field--has-label': !!this.label,
|
|
169
176
|
'sd-field--has-addon': !!addon,
|
|
170
177
|
[this.fieldStatus]: !!this.fieldStatus,
|
|
171
|
-
}, style: { ...sizeCssVars, ...labelCssVars, ...addonCssVars } }, h("div", { key: '
|
|
178
|
+
}, style: { ...sizeCssVars, ...labelCssVars, ...addonCssVars } }, h("div", { key: 'c373b7878033026747c8c4fa5d984d036d391cd8', class: "sd-field__wrapper" }, this.renderLabel(this.label), h("div", { key: 'd6a379920eded2abb88b9f9260108a32c80ca888', class: "sd-field__main", style: this.width
|
|
172
179
|
? {
|
|
173
180
|
width: typeof this.width === 'number' ? `${this.width}px` : this.width,
|
|
174
181
|
flex: 'none',
|
|
175
182
|
}
|
|
176
|
-
: {} }, h("div", { key: '
|
|
183
|
+
: {} }, h("div", { key: '25aa5a21fed7d1482629e1f0c07fc2e3b5440c3e', class: {
|
|
177
184
|
'sd-field__control': true,
|
|
178
185
|
'sd-field__control--has-addon': !!addon,
|
|
179
|
-
} }, addon && h("div", { key: '
|
|
186
|
+
} }, addon && h("div", { key: 'e6b9edaaef227f202b8cd1b0f921dd3a07cbd296', class: "sd-field__addon" }, addon), h("slot", { key: 'ecee94ec7996f99738508165c58afd07eced9d24' })), this.errorMsg || this.errorMessage ? (h("div", { class: "sd-field__error-message" }, this.errorMsg || this.errorMessage)) : (this.hint && h("div", { class: "sd-field__hint" }, this.hint))))));
|
|
180
187
|
}
|
|
181
188
|
renderLabel(label) {
|
|
182
189
|
if (!label)
|
|
@@ -487,6 +494,33 @@ export class SdField {
|
|
|
487
494
|
"attribute": "addon-label",
|
|
488
495
|
"defaultValue": "''"
|
|
489
496
|
},
|
|
497
|
+
"addonAlign": {
|
|
498
|
+
"type": "string",
|
|
499
|
+
"mutable": false,
|
|
500
|
+
"complexType": {
|
|
501
|
+
"original": "FieldAddonAlign",
|
|
502
|
+
"resolved": "\"center\" | \"end\" | \"start\"",
|
|
503
|
+
"references": {
|
|
504
|
+
"FieldAddonAlign": {
|
|
505
|
+
"location": "import",
|
|
506
|
+
"path": "./sd-field.config",
|
|
507
|
+
"id": "src/components/sd-field/sd-field.config.ts::FieldAddonAlign",
|
|
508
|
+
"referenceLocation": "FieldAddonAlign"
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
},
|
|
512
|
+
"required": false,
|
|
513
|
+
"optional": false,
|
|
514
|
+
"docs": {
|
|
515
|
+
"tags": [],
|
|
516
|
+
"text": ""
|
|
517
|
+
},
|
|
518
|
+
"getter": false,
|
|
519
|
+
"setter": false,
|
|
520
|
+
"reflect": false,
|
|
521
|
+
"attribute": "addon-align",
|
|
522
|
+
"defaultValue": "'start'"
|
|
523
|
+
},
|
|
490
524
|
"icon": {
|
|
491
525
|
"type": "unknown",
|
|
492
526
|
"mutable": false,
|
|
@@ -16,6 +16,7 @@ export class SdFilePicker {
|
|
|
16
16
|
label = '';
|
|
17
17
|
labelWidth = '';
|
|
18
18
|
addonLabel = '';
|
|
19
|
+
addonAlign = 'start';
|
|
19
20
|
hint = '';
|
|
20
21
|
errorMessage = '';
|
|
21
22
|
width = '';
|
|
@@ -177,7 +178,7 @@ export class SdFilePicker {
|
|
|
177
178
|
'sd-file-picker--inline-disabled': this.disabled,
|
|
178
179
|
}, style: cssVars, onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false) }, content));
|
|
179
180
|
}
|
|
180
|
-
return (h("sd-field", { name: this.name, label: this.label, labelWidth: this.labelWidth, addonLabel: this.addonLabel, hint: this.hint, errorMessage: this.errorMessage, width: this.width, rules: this.rules, error: this.error, disabled: this.disabled, focused: this.focused, hovered: this.hovered, status: this.status, icon: this.icon, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, ref: el => (this.formField = el), onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false), style: cssVars }, content));
|
|
181
|
+
return (h("sd-field", { name: this.name, label: this.label, labelWidth: this.labelWidth, addonLabel: this.addonLabel, addonAlign: this.addonAlign, hint: this.hint, errorMessage: this.errorMessage, width: this.width, rules: this.rules, error: this.error, disabled: this.disabled, focused: this.focused, hovered: this.hovered, status: this.status, icon: this.icon, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, ref: el => (this.formField = el), onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false), style: cssVars }, content));
|
|
181
182
|
}
|
|
182
183
|
static get is() { return "sd-file-picker"; }
|
|
183
184
|
static get originalStyleUrls() {
|
|
@@ -451,6 +452,33 @@ export class SdFilePicker {
|
|
|
451
452
|
"attribute": "addon-label",
|
|
452
453
|
"defaultValue": "''"
|
|
453
454
|
},
|
|
455
|
+
"addonAlign": {
|
|
456
|
+
"type": "string",
|
|
457
|
+
"mutable": false,
|
|
458
|
+
"complexType": {
|
|
459
|
+
"original": "FieldAddonAlign",
|
|
460
|
+
"resolved": "\"center\" | \"end\" | \"start\"",
|
|
461
|
+
"references": {
|
|
462
|
+
"FieldAddonAlign": {
|
|
463
|
+
"location": "import",
|
|
464
|
+
"path": "../sd-field/sd-field.config",
|
|
465
|
+
"id": "src/components/sd-field/sd-field.config.ts::FieldAddonAlign",
|
|
466
|
+
"referenceLocation": "FieldAddonAlign"
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
},
|
|
470
|
+
"required": false,
|
|
471
|
+
"optional": false,
|
|
472
|
+
"docs": {
|
|
473
|
+
"tags": [],
|
|
474
|
+
"text": ""
|
|
475
|
+
},
|
|
476
|
+
"getter": false,
|
|
477
|
+
"setter": false,
|
|
478
|
+
"reflect": false,
|
|
479
|
+
"attribute": "addon-align",
|
|
480
|
+
"defaultValue": "'start'"
|
|
481
|
+
},
|
|
454
482
|
"hint": {
|
|
455
483
|
"type": "string",
|
|
456
484
|
"mutable": false,
|
|
@@ -147,8 +147,13 @@ export class SdFloatingPopover {
|
|
|
147
147
|
return;
|
|
148
148
|
this.close.emit();
|
|
149
149
|
}
|
|
150
|
+
handleKeydown(e) {
|
|
151
|
+
if (e.key === 'Escape') {
|
|
152
|
+
this.close.emit();
|
|
153
|
+
}
|
|
154
|
+
}
|
|
150
155
|
render() {
|
|
151
|
-
return h("slot", { key: '
|
|
156
|
+
return h("slot", { key: 'c10da1f592b785b1c7540ba76e9d1768abeb0c11' });
|
|
152
157
|
}
|
|
153
158
|
static get is() { return "sd-floating-portal"; }
|
|
154
159
|
static get originalStyleUrls() {
|
|
@@ -335,6 +340,12 @@ export class SdFloatingPopover {
|
|
|
335
340
|
"target": "window",
|
|
336
341
|
"capture": false,
|
|
337
342
|
"passive": false
|
|
343
|
+
}, {
|
|
344
|
+
"name": "keydown",
|
|
345
|
+
"method": "handleKeydown",
|
|
346
|
+
"target": "window",
|
|
347
|
+
"capture": false,
|
|
348
|
+
"passive": false
|
|
338
349
|
}];
|
|
339
350
|
}
|
|
340
351
|
}
|
|
@@ -35,7 +35,7 @@ export class SdGhostButton {
|
|
|
35
35
|
? GHOST_BUTTON_DISABLED_COLORS[this.intent ?? 'default']
|
|
36
36
|
: GHOST_BUTTON_CONTENT_COLORS[this.intent ?? 'default'];
|
|
37
37
|
const accessibleName = this.ariaLabel.trim() || undefined;
|
|
38
|
-
return (h("button", { key: '
|
|
38
|
+
return (h("button", { key: '4d5159cb897b6c468380f18eba1eca218d24920e', class: {
|
|
39
39
|
'sd-ghost-button': true,
|
|
40
40
|
'sd-ghost-button--disabled': this.disabled,
|
|
41
41
|
}, type: "button", disabled: this.disabled, "aria-label": accessibleName, style: {
|
|
@@ -44,7 +44,7 @@ export class SdGhostButton {
|
|
|
44
44
|
'--sd-ghost-button-hover-bg': GHOST_BUTTON_HOVER_BG_COLORS[this.intent ?? 'default'],
|
|
45
45
|
'--sd-ghost-button-hover-opacity': GHOST_BUTTON_HOVER_OPACITY,
|
|
46
46
|
'--sd-ghost-button-accent': GHOST_BUTTON_FOCUS_RING_COLOR,
|
|
47
|
-
}, onClick: this.handleClick }, h("sd-icon", { key: '
|
|
47
|
+
}, onClick: this.handleClick }, h("sd-icon", { key: '0461580c901aea244a3d0e693fb94fd6354873ab', name: this.icon, size: sizeConfig.icon, color: contentColor })));
|
|
48
48
|
}
|
|
49
49
|
static get is() { return "sd-ghost-button"; }
|
|
50
50
|
static get originalStyleUrls() {
|
|
@@ -7,6 +7,7 @@ export class SdInput {
|
|
|
7
7
|
type = 'text';
|
|
8
8
|
size = 'sm';
|
|
9
9
|
addonLabel = '';
|
|
10
|
+
addonAlign = 'start';
|
|
10
11
|
placeholder = '입력해 주세요.';
|
|
11
12
|
disabled = false;
|
|
12
13
|
clearable = false;
|
|
@@ -111,12 +112,12 @@ export class SdInput {
|
|
|
111
112
|
'--sd-system-size-field-sm-height': `${sizeTokens.height}px`,
|
|
112
113
|
'--sd-system-radius-field-sm': `${sizeTokens.radius}px`,
|
|
113
114
|
};
|
|
114
|
-
return (h("sd-field", { key: '
|
|
115
|
+
return (h("sd-field", { key: '6270fb99043a06aa9a4c2ead77007e6c03adafef', name: this.name, label: this.label, labelWidth: this.labelWidth, addonLabel: this.addonLabel, addonAlign: this.addonAlign, hint: this.hint, errorMessage: this.errorMessage, width: this.width, rules: this.rules, error: this.error, disabled: this.disabled, focused: this.focused, hovered: this.hovered, status: this.status, size: this.size, icon: this.icon, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, ref: el => (this.formField = el), onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false), style: cssVars }, h("label", { key: 'aaef18c323710235b41d76b26a21380cadcc6e0f', class: "sd-input__content" }, h("slot", { key: 'fd5d5845acf9d5351dec5af84e09d91246de8a68', name: "prefix" }), h("input", { key: '8b4dd1eab6488a29daec6e6dde5238b319001d5b', name: this.name, ref: el => (this.nativeEl = el), class: `sd-input__native ${this.inputClass}`, type: this.type === 'password' && this.passwordVisible ? 'text' : this.type, value: this.internalValue || '', placeholder: this.placeholder, disabled: this.disabled, readonly: this.readonly, autofocus: this.autoFocus, autocomplete: this.autocomplete || undefined, maxlength: this.maxlength, minlength: this.minlength, inputmode: this.inputmode, enterkeyhint: this.enterkeyhint, spellcheck: this.spellcheck, onInput: this.handleInput, onFocus: event => this.handleFocus('focus', event), onBlur: event => this.handleFocus('blur', event), style: this.inputStyle }), h("slot", { key: '79918e68de3045b509a27d8567e095665040689b', name: "suffix" }), this.clearable && this.internalValue && !this.disabled && (h("sd-ghost-button", { key: 'f5358346a20830c1fef955a2bb6783156b251178', icon: "close", ariaLabel: "clear", size: "xxs", disabled: this.disabled, class: "sd-input__clear-icon", onClick: async () => {
|
|
115
116
|
if (this.disabled)
|
|
116
117
|
return;
|
|
117
118
|
this.internalValue = '';
|
|
118
119
|
await this.formField?.sdValidate();
|
|
119
|
-
} })), this.type === 'password' && (h("sd-ghost-button", { key: '
|
|
120
|
+
} })), this.type === 'password' && (h("sd-ghost-button", { key: '77108ea21a4b9afc9e9051c98d4d49bcb571cffb', icon: this.passwordVisible ? 'visibilityOn' : 'visibilityOff', ariaLabel: "visibility", size: "xxs", disabled: this.disabled, class: "sd-input__password-icon", onClick: () => {
|
|
120
121
|
if (this.disabled)
|
|
121
122
|
return;
|
|
122
123
|
this.passwordVisible = !this.passwordVisible;
|
|
@@ -222,6 +223,33 @@ export class SdInput {
|
|
|
222
223
|
"attribute": "addon-label",
|
|
223
224
|
"defaultValue": "''"
|
|
224
225
|
},
|
|
226
|
+
"addonAlign": {
|
|
227
|
+
"type": "string",
|
|
228
|
+
"mutable": false,
|
|
229
|
+
"complexType": {
|
|
230
|
+
"original": "FieldAddonAlign",
|
|
231
|
+
"resolved": "\"center\" | \"end\" | \"start\"",
|
|
232
|
+
"references": {
|
|
233
|
+
"FieldAddonAlign": {
|
|
234
|
+
"location": "import",
|
|
235
|
+
"path": "../sd-field/sd-field.config",
|
|
236
|
+
"id": "src/components/sd-field/sd-field.config.ts::FieldAddonAlign",
|
|
237
|
+
"referenceLocation": "FieldAddonAlign"
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
},
|
|
241
|
+
"required": false,
|
|
242
|
+
"optional": false,
|
|
243
|
+
"docs": {
|
|
244
|
+
"tags": [],
|
|
245
|
+
"text": ""
|
|
246
|
+
},
|
|
247
|
+
"getter": false,
|
|
248
|
+
"setter": false,
|
|
249
|
+
"reflect": false,
|
|
250
|
+
"attribute": "addon-align",
|
|
251
|
+
"defaultValue": "'start'"
|
|
252
|
+
},
|
|
225
253
|
"placeholder": {
|
|
226
254
|
"type": "string",
|
|
227
255
|
"mutable": false,
|
|
@@ -10,10 +10,10 @@ export class SdLoadingContainer {
|
|
|
10
10
|
this.visible = false;
|
|
11
11
|
}
|
|
12
12
|
render() {
|
|
13
|
-
return (h("div", { key: '
|
|
13
|
+
return (h("div", { key: '7887102a2b03f911fad57784b3b45b12d2265ae2', class: {
|
|
14
14
|
'sd-loading-container': true,
|
|
15
15
|
'sd-loading-container--visible': this.visible,
|
|
16
|
-
}, "aria-hidden": this.visible ? 'false' : 'true' }, h("div", { key: '
|
|
16
|
+
}, "aria-hidden": this.visible ? 'false' : 'true' }, h("div", { key: '0f815029574907643be52b50a6c8be8e66ced072', class: "sd-loading-container__backdrop" }), h("div", { key: '9ea0faf8ed4094b3fd93a6e29c55130d58b245fe', class: "sd-loading-container__content" }, h("sd-circle-progress", { key: '6e89faad35f282d91098c213879c0ecf8d05a5ed', indeterminate: true, type: "inverse" }), this.message && (h("p", { key: '05d3128ecf91a372a426a2508535c7789aff9bc1', class: "sd-loading-container__message" }, this.message)))));
|
|
17
17
|
}
|
|
18
18
|
static get is() { return "sd-loading-container"; }
|
|
19
19
|
static get originalStyleUrls() {
|
|
@@ -42,7 +42,7 @@ export class SdLoadingModal {
|
|
|
42
42
|
'--sd-loading-modal-width': this.toCssSize(this.width) ?? `${LOADING_MODAL_LAYOUT.minWidth}px`,
|
|
43
43
|
'--sd-loading-modal-height': this.toCssSize(this.height) ?? `${LOADING_MODAL_LAYOUT.minHeight}px`,
|
|
44
44
|
};
|
|
45
|
-
return (h(Host, { key: '
|
|
45
|
+
return (h(Host, { key: 'd7e6e7d81ad63a6ddba6c4db9f49695be96b83f6', style: hostStyle }, h("div", { key: '96a50aa04c7cab1c8797b7a187504107e383182b', class: "sd-loading-modal" }, h("div", { key: '6741f7d180be2a7ffa4588aa73bf0b3831e3c869', class: "sd-loading-modal__content" }, this.state === 'loading' ? (h("sd-circle-progress", { indeterminate: true })) : (h("sd-icon", { class: "sd-loading-modal__icon", name: "warningOutline", size: LOADING_MODAL_LAYOUT.contentSize, color: LOADING_MODAL_COLORS.errorIcon }))), h("p", { key: 'cd7d922fc8c8cd51de0a49e106d78a5254c9c35e', class: "sd-loading-modal__message" }, this.resolvedMessage), this.useButton && (h("div", { key: '78a926af4940be80da984cf4e55e8dfee50d6c31', class: "sd-loading-modal__button" }, h("sd-button-v2", { key: 'a2e4ddf9b4b82fb6cecd9d859e6b95f8dd540137', name: LOADING_MODAL_BUTTON_PRESET, label: this.resolvedButtonLabel, onSdClick: this.handleClick }))))));
|
|
46
46
|
}
|
|
47
47
|
static get is() { return "sd-loading-modal"; }
|
|
48
48
|
static get originalStyleUrls() {
|
|
@@ -13,6 +13,7 @@ export class SdNumberInput {
|
|
|
13
13
|
label;
|
|
14
14
|
labelWidth = '';
|
|
15
15
|
addonLabel = '';
|
|
16
|
+
addonAlign = 'start';
|
|
16
17
|
placeholder = '입력해 주세요.';
|
|
17
18
|
disabled = false;
|
|
18
19
|
width;
|
|
@@ -271,12 +272,12 @@ export class SdNumberInput {
|
|
|
271
272
|
'--sd-textinput-input-hint-typography-line-height': `${NUMBER_INPUT_HINT.typography.lineHeight}px`,
|
|
272
273
|
'--sd-textinput-input-contents-gap': `${NUMBER_INPUT_CONTENTS_GAP}px`,
|
|
273
274
|
};
|
|
274
|
-
return (h("sd-field", { key: '
|
|
275
|
+
return (h("sd-field", { key: '85941d001afd73a10defb7f0728579ce0b8457b1', name: this.name, label: this.label, labelWidth: this.labelWidth, addonLabel: this.addonLabel, addonAlign: this.addonAlign, hint: this.hint, errorMessage: this.errorMessage, width: this.width, rules: this.rules, error: this.error, disabled: this.disabled, focused: this.focused, hovered: this.hovered, status: this.status, size: this.size, ref: el => (this.formField = el), onMouseEnter: () => (this.hovered = true), onMouseLeave: () => (this.hovered = false), style: cssVars }, h("div", { key: '565de4d4a79219bc8d6e9c8f4528ec93a655c376', class: "sd-number-input__content" }, this.useButton && (h("button", { key: 'fa27f209b09a03121eb89959164a4a349d525d9a', type: "button", class: "sd-number-input__stepper sd-number-input__stepper--decrement", disabled: this.isDecrementDisabled(), onClick: this.handleDecrement, tabindex: -1 }, h("sd-icon", { key: '7f4fe23f4b0eba4a06e0153338228710365ce57f', name: "minus", size: iconSize, color: this.isDecrementDisabled()
|
|
275
276
|
? NUMBER_INPUT_STEPPER.icon.disabled
|
|
276
|
-
: NUMBER_INPUT_STEPPER.icon.default }))), this.inputPrefix && (h("span", { key: '
|
|
277
|
+
: NUMBER_INPUT_STEPPER.icon.default }))), this.inputPrefix && (h("span", { key: '55a96b32e383cdf8d5b253336130460275373f41', class: "sd-number-input__prefix" }, this.inputPrefix)), h("input", { key: 'e25faa5af70d89ae0266bd9dbf35c72276885a9b', name: this.name, ref: el => (this.nativeEl = el), class: `sd-number-input__native ${this.inputClass}`, type: "text", inputMode: "numeric", value: this.displayValue, placeholder: this.placeholder, disabled: this.disabled, readonly: this.readonly, autofocus: this.autoFocus, onInput: this.handleInput, onKeyDown: this.handleKeyDown, onFocus: this.handleFocus, onBlur: this.handleBlur, style: {
|
|
277
278
|
textAlign: this.useButton ? 'center' : 'right',
|
|
278
279
|
...this.inputStyle,
|
|
279
|
-
} }), this.inputSuffix && (h("span", { key: '
|
|
280
|
+
} }), this.inputSuffix && (h("span", { key: '777730846e62dd03a9193cf582908a059789b329', class: "sd-number-input__suffix" }, this.inputSuffix)), this.useButton && (h("button", { key: 'ef8b471cb1d2cbd3a5b350ddbbf856e3bd104567', type: "button", class: "sd-number-input__stepper sd-number-input__stepper--increment", disabled: this.isIncrementDisabled(), onClick: this.handleIncrement, tabindex: -1 }, h("sd-icon", { key: 'e2440c5a4571b69dc0e91ab0b10dffdd8242b1d8', name: "add", size: iconSize, color: this.isIncrementDisabled()
|
|
280
281
|
? NUMBER_INPUT_STEPPER.icon.disabled
|
|
281
282
|
: NUMBER_INPUT_STEPPER.icon.default }))))));
|
|
282
283
|
}
|
|
@@ -499,6 +500,33 @@ export class SdNumberInput {
|
|
|
499
500
|
"attribute": "addon-label",
|
|
500
501
|
"defaultValue": "''"
|
|
501
502
|
},
|
|
503
|
+
"addonAlign": {
|
|
504
|
+
"type": "string",
|
|
505
|
+
"mutable": false,
|
|
506
|
+
"complexType": {
|
|
507
|
+
"original": "FieldAddonAlign",
|
|
508
|
+
"resolved": "\"center\" | \"end\" | \"start\"",
|
|
509
|
+
"references": {
|
|
510
|
+
"FieldAddonAlign": {
|
|
511
|
+
"location": "import",
|
|
512
|
+
"path": "../sd-field/sd-field.config",
|
|
513
|
+
"id": "src/components/sd-field/sd-field.config.ts::FieldAddonAlign",
|
|
514
|
+
"referenceLocation": "FieldAddonAlign"
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
},
|
|
518
|
+
"required": false,
|
|
519
|
+
"optional": false,
|
|
520
|
+
"docs": {
|
|
521
|
+
"tags": [],
|
|
522
|
+
"text": ""
|
|
523
|
+
},
|
|
524
|
+
"getter": false,
|
|
525
|
+
"setter": false,
|
|
526
|
+
"reflect": false,
|
|
527
|
+
"attribute": "addon-align",
|
|
528
|
+
"defaultValue": "'start'"
|
|
529
|
+
},
|
|
502
530
|
"placeholder": {
|
|
503
531
|
"type": "string",
|
|
504
532
|
"mutable": false,
|
|
@@ -83,13 +83,13 @@ export class SdPagination {
|
|
|
83
83
|
'--sd-pagination-bg-selected': PAGINATION_COLORS.bgSelected,
|
|
84
84
|
'--sd-pagination-item-width': `${this.buttonWidth}px`,
|
|
85
85
|
};
|
|
86
|
-
return (h("div", { key: '
|
|
86
|
+
return (h("div", { key: '2b9efc3a0340799a39e7bbfe6f3a270b7cc5f0c7', class: {
|
|
87
87
|
'sd-pagination': true,
|
|
88
88
|
'sd-pagination--simple': this.simple,
|
|
89
|
-
}, style: cssVars }, h("div", { key: '
|
|
89
|
+
}, style: cssVars }, h("div", { key: 'af585a4e9ad2fc25e47cb42fdcc66850d6210fd1', class: "sd-pagination__group sd-pagination__group--prev" }, this.renderPrevButtons()), this.simple ? (h("div", { class: "sd-pagination__info" }, h("span", { class: "sd-pagination__current" }, this.currentPage), h("span", { class: "sd-pagination__divider" }, "/"), h("span", { class: "sd-pagination__last" }, this.lastPage))) : (h("div", { class: "sd-pagination__numbers" }, this.pageNumbers.map(n => (h("button", { type: "button", "aria-current": this.currentPage === n ? 'page' : undefined, class: {
|
|
90
90
|
'sd-pagination__item': true,
|
|
91
91
|
'sd-pagination__item--selected': this.currentPage === n,
|
|
92
|
-
}, onClick: () => this.handlePageChange(n) }, n))))), h("div", { key: '
|
|
92
|
+
}, onClick: () => this.handlePageChange(n) }, n))))), h("div", { key: '3128e19dee5f2d00fcc5603f96f323afaf2750d4', class: "sd-pagination__group sd-pagination__group--next" }, this.renderNextButtons())));
|
|
93
93
|
}
|
|
94
94
|
static get is() { return "sd-pagination"; }
|
|
95
95
|
static get originalStyleUrls() {
|
|
@@ -15,20 +15,17 @@ export class SdPopover {
|
|
|
15
15
|
messages = [];
|
|
16
16
|
buttons = [];
|
|
17
17
|
menuClass = '';
|
|
18
|
-
noHover = true;
|
|
19
18
|
useClose = false;
|
|
20
|
-
|
|
21
|
-
slotContent = '';
|
|
22
|
-
watchShowHandler(newValue) {
|
|
23
|
-
this.showPopover = newValue;
|
|
24
|
-
}
|
|
25
|
-
componentWillLoad() {
|
|
26
|
-
this.showPopover = this.show;
|
|
27
|
-
this.slotContent = this.el.innerHTML;
|
|
28
|
-
}
|
|
19
|
+
showChange;
|
|
29
20
|
buttonEl;
|
|
21
|
+
setShow = (next) => {
|
|
22
|
+
if (this.show === next)
|
|
23
|
+
return;
|
|
24
|
+
this.show = next;
|
|
25
|
+
this.showChange.emit(next);
|
|
26
|
+
};
|
|
30
27
|
get popoverOffset() {
|
|
31
|
-
switch (this.placement) {
|
|
28
|
+
switch (this.placement ?? 'bottom') {
|
|
32
29
|
case 'top':
|
|
33
30
|
return [0, -4];
|
|
34
31
|
case 'bottom':
|
|
@@ -39,18 +36,25 @@ export class SdPopover {
|
|
|
39
36
|
return [4, 0];
|
|
40
37
|
}
|
|
41
38
|
}
|
|
42
|
-
handleClose = () =>
|
|
43
|
-
this.showPopover = false;
|
|
44
|
-
};
|
|
39
|
+
handleClose = () => this.setShow(false);
|
|
45
40
|
render() {
|
|
46
|
-
|
|
41
|
+
const placement = this.placement ?? 'bottom';
|
|
42
|
+
const color = this.color ?? '#01BB4B';
|
|
43
|
+
const icon = this.icon ?? 'helpOutline';
|
|
44
|
+
const iconSize = this.iconSize ?? 12;
|
|
45
|
+
const buttonSize = this.buttonSize ?? 'sm';
|
|
46
|
+
const buttonVariant = this.buttonVariant ?? 'primary';
|
|
47
|
+
const menuClass = this.menuClass ?? '';
|
|
48
|
+
const messages = Array.isArray(this.messages) ? this.messages : [];
|
|
49
|
+
const buttons = Array.isArray(this.buttons) ? this.buttons : [];
|
|
50
|
+
return (h(Fragment, { key: 'e576deaacba9395c5aeb76fd13baa0dc1e908d38' }, this.label ? (h("sd-button", { ref: el => (this.buttonEl = el), label: this.label, icon: icon, size: buttonSize, color: color, variant: buttonVariant, class: "sd-popover", onSdClick: () => this.setShow(!this.show) })) : (h("sd-icon", { ref: el => (this.buttonEl = el), name: icon, size: iconSize, color: color, class: "sd-popover", onClick: () => this.setShow(!this.show) })), this.show && (h("sd-floating-portal", { key: '7520067b46527c22108292a659dd7e8fba85397c', parentRef: this.buttonEl, onSdClose: this.handleClose, placement: placement, offset: this.popoverOffset }, h("div", { key: 'ba48632dd93359851bd87f4d55f2341653b0caab', class: {
|
|
47
51
|
'sd-floating-menu': true,
|
|
48
52
|
'sd-floating-menu--popover': true,
|
|
49
|
-
[`sd-floating-menu--${
|
|
50
|
-
[
|
|
53
|
+
[`sd-floating-menu--${placement}`]: true,
|
|
54
|
+
[menuClass]: !!menuClass,
|
|
51
55
|
}, style: {
|
|
52
56
|
'--sd-floating-bg': popoverTokens.popover.bg,
|
|
53
|
-
} }, h("i", { key: '
|
|
57
|
+
} }, h("i", { key: 'fce80e5bc6f49f5dbc1772f910eae0fb9bc09a6b', class: `sd-floating-menu__arrow sd-floating-menu__arrow--${placement}` }, h(TooltipArrow, { key: '32aaa3b00f7ac77d47fd2bc3c968a7a4c20102c6' })), h("div", { key: '29b3240126412070466acee7ee1d061d235ba51e', class: "sd-floating-menu__content" }, this.menuTitle && h("div", { key: '6cb5cf4531f573e93146a552b34831dc04851661', class: "sd-floating-menu__title" }, this.menuTitle), messages.length > 0 && (h("div", { key: 'ba15bb4efc4af37dd89b0da61539f516cc31a2f3', class: "sd-floating-menu__messages" }, messages.map((message, i) => (h("div", { key: `msg-${i}` }, message))))), buttons.length > 0 && (h("div", { key: '2656545909634d8c54e9d34155e699041b5512f5', class: `sd-floating-menu__buttons sd-floating-menu__buttons--${buttons.length}` }, buttons.map((button, i) => (h("sd-button", { key: `btn-${i}`, ...button })))))), this.useClose && (h("sd-ghost-button", { key: '315bf10dde1b7cde5727beb101a1a1ad07966138', class: "sd-floating-menu__close-button", icon: "close", ariaLabel: "close", size: "xs", onClick: this.handleClose })))))));
|
|
54
58
|
}
|
|
55
59
|
static get is() { return "sd-popover"; }
|
|
56
60
|
static get originalStyleUrls() {
|
|
@@ -260,8 +264,8 @@ export class SdPopover {
|
|
|
260
264
|
},
|
|
261
265
|
"getter": false,
|
|
262
266
|
"setter": false,
|
|
263
|
-
"reflect":
|
|
264
|
-
"attribute": "title"
|
|
267
|
+
"reflect": false,
|
|
268
|
+
"attribute": "menu-title"
|
|
265
269
|
},
|
|
266
270
|
"messages": {
|
|
267
271
|
"type": "unknown",
|
|
@@ -285,9 +289,15 @@ export class SdPopover {
|
|
|
285
289
|
"type": "unknown",
|
|
286
290
|
"mutable": false,
|
|
287
291
|
"complexType": {
|
|
288
|
-
"original": "
|
|
289
|
-
"resolved": "
|
|
290
|
-
"references": {
|
|
292
|
+
"original": "PopoverButton[]",
|
|
293
|
+
"resolved": "PopoverButton[]",
|
|
294
|
+
"references": {
|
|
295
|
+
"PopoverButton": {
|
|
296
|
+
"location": "local",
|
|
297
|
+
"path": "/Users/meijing/Documents/sellmate/frontend/design-system/packages/stencil/src/components/sd-popover/sd-popover.tsx",
|
|
298
|
+
"id": "src/components/sd-popover/sd-popover.tsx::PopoverButton"
|
|
299
|
+
}
|
|
300
|
+
}
|
|
291
301
|
},
|
|
292
302
|
"required": false,
|
|
293
303
|
"optional": false,
|
|
@@ -319,26 +329,6 @@ export class SdPopover {
|
|
|
319
329
|
"attribute": "menu-class",
|
|
320
330
|
"defaultValue": "''"
|
|
321
331
|
},
|
|
322
|
-
"noHover": {
|
|
323
|
-
"type": "boolean",
|
|
324
|
-
"mutable": false,
|
|
325
|
-
"complexType": {
|
|
326
|
-
"original": "boolean",
|
|
327
|
-
"resolved": "boolean",
|
|
328
|
-
"references": {}
|
|
329
|
-
},
|
|
330
|
-
"required": false,
|
|
331
|
-
"optional": false,
|
|
332
|
-
"docs": {
|
|
333
|
-
"tags": [],
|
|
334
|
-
"text": ""
|
|
335
|
-
},
|
|
336
|
-
"getter": false,
|
|
337
|
-
"setter": false,
|
|
338
|
-
"reflect": false,
|
|
339
|
-
"attribute": "no-hover",
|
|
340
|
-
"defaultValue": "true"
|
|
341
|
-
},
|
|
342
332
|
"useClose": {
|
|
343
333
|
"type": "boolean",
|
|
344
334
|
"mutable": false,
|
|
@@ -361,17 +351,23 @@ export class SdPopover {
|
|
|
361
351
|
}
|
|
362
352
|
};
|
|
363
353
|
}
|
|
364
|
-
static get
|
|
365
|
-
return {
|
|
366
|
-
"showPopover": {},
|
|
367
|
-
"slotContent": {}
|
|
368
|
-
};
|
|
369
|
-
}
|
|
370
|
-
static get elementRef() { return "el"; }
|
|
371
|
-
static get watchers() {
|
|
354
|
+
static get events() {
|
|
372
355
|
return [{
|
|
373
|
-
"
|
|
374
|
-
"
|
|
356
|
+
"method": "showChange",
|
|
357
|
+
"name": "sdShowChange",
|
|
358
|
+
"bubbles": true,
|
|
359
|
+
"cancelable": true,
|
|
360
|
+
"composed": true,
|
|
361
|
+
"docs": {
|
|
362
|
+
"tags": [],
|
|
363
|
+
"text": ""
|
|
364
|
+
},
|
|
365
|
+
"complexType": {
|
|
366
|
+
"original": "boolean",
|
|
367
|
+
"resolved": "boolean",
|
|
368
|
+
"references": {}
|
|
369
|
+
}
|
|
375
370
|
}];
|
|
376
371
|
}
|
|
372
|
+
static get elementRef() { return "el"; }
|
|
377
373
|
}
|
|
@@ -220,7 +220,7 @@ export class SdPortal {
|
|
|
220
220
|
this.close.emit();
|
|
221
221
|
}
|
|
222
222
|
render() {
|
|
223
|
-
return h("slot", { key: '
|
|
223
|
+
return h("slot", { key: 'fa3033a01d6c8f6878c91367b9670206ab5c71d7' });
|
|
224
224
|
}
|
|
225
225
|
static get is() { return "sd-portal"; }
|
|
226
226
|
static get properties() {
|
|
@@ -48,7 +48,7 @@ export class SdRadio {
|
|
|
48
48
|
'--sd-radio-disabled-dot': RADIO_COLORS.disabled.dot,
|
|
49
49
|
'--sd-radio-label-color': RADIO_COLORS.label,
|
|
50
50
|
};
|
|
51
|
-
return (h("label", { key: '
|
|
51
|
+
return (h("label", { key: '2b809f1f3ce39e6dd2429cf1c48a935500287614', class: this.radioClasses, style: cssVars, "aria-checked": this.isSelected ? 'true' : 'false', "aria-disabled": this.disabled ? 'true' : 'false' }, h("input", { key: '1f44ab44d741ef40152318ce6fd437bb091c3cfb', type: "radio", name: String(this.val), value: String(this.val), checked: this.isSelected, disabled: this.disabled, "aria-label": this.label || String(this.val), onInput: this.handleRadioChange }), h("span", { key: '941fddbb939a46afbe72c642d3b6f6f252f143f1', class: "sd-radio__circle" }), this.label && h("span", { key: 'e30139892e82b8da251525e3c717549a2b7522d0', class: "sd-radio__label" }, this.label)));
|
|
52
52
|
}
|
|
53
53
|
static get is() { return "sd-radio"; }
|
|
54
54
|
static get originalStyleUrls() {
|
|
@@ -67,7 +67,7 @@ export class SdRadioButton {
|
|
|
67
67
|
'--sd-radio-button-content-select': RADIO_BUTTON_COLORS.content.select,
|
|
68
68
|
'--sd-radio-button-content-disabled': RADIO_BUTTON_COLORS.content.disabled,
|
|
69
69
|
};
|
|
70
|
-
return (h("div", { key: '
|
|
70
|
+
return (h("div", { key: '67c8e7ad03fb6ee4cabd06591e3e11e5d38914f0', class: this.getGroupClasses(), style: cssVars, role: "radiogroup", "aria-disabled": this.disabled.toString() }, this.options.map(option => {
|
|
71
71
|
const isSelected = this.isOptionSelected(option);
|
|
72
72
|
const isDisabled = this.isOptionDisabled(option);
|
|
73
73
|
return (h("label", { key: `radio-${option.value}`, class: this.getButtonClasses(option), "aria-label": option.label || 'radio option', "data-label": option.label }, h("input", { type: "radio", name: this.groupName, value: option.value.toString(), checked: isSelected, disabled: isDisabled, onInput: () => this.handleRadioChange(option.value, option.disabled) }), option.label && h("span", { class: "sd-radio-button__label" }, option.label)));
|
|
@@ -22,7 +22,7 @@ export class SdRadioGroup {
|
|
|
22
22
|
return classes.join(' ');
|
|
23
23
|
}
|
|
24
24
|
render() {
|
|
25
|
-
return (h("div", { key: '
|
|
25
|
+
return (h("div", { key: '5f6559df018e48958103d0a84a0f074f81bd255a', class: this.getGroupClasses(), role: "radiogroup" }, this.options.map(option => {
|
|
26
26
|
return (h("sd-radio", { key: `radio-${option.value}`, val: String(option.value), value: String(this.value), label: option.label, disabled: this.disabled || !!option.disabled, onSdUpdate: ({ detail }) => this.handleRadioChange(detail) }));
|
|
27
27
|
})));
|
|
28
28
|
}
|
|
@@ -25,6 +25,7 @@ export class SdSelect extends BaseDropdownEvent {
|
|
|
25
25
|
label = '';
|
|
26
26
|
labelWidth = '';
|
|
27
27
|
addonLabel = '';
|
|
28
|
+
addonAlign = 'start';
|
|
28
29
|
icon = undefined;
|
|
29
30
|
labelTooltip = '';
|
|
30
31
|
labelTooltipProps = null;
|
|
@@ -142,7 +143,7 @@ export class SdSelect extends BaseDropdownEvent {
|
|
|
142
143
|
}
|
|
143
144
|
};
|
|
144
145
|
render() {
|
|
145
|
-
return (h("sd-field", { key: '
|
|
146
|
+
return (h("sd-field", { key: '6939161d0edb5eabca307b3883e02a53a29e66c4', label: this.label, labelWidth: this.labelWidth, name: this.name, rules: this.rules, error: this.error, disabled: this.disabled, icon: this.icon, addonLabel: this.addonLabel, addonAlign: this.addonAlign, labelTooltip: this.labelTooltip, labelTooltipProps: this.labelTooltipProps, ref: el => (this.formField = el) }, h("div", { key: 'a57d17cb3ff775c724f3a6c13025c04e031de45f', class: {
|
|
146
147
|
'sd-select': true,
|
|
147
148
|
'sd-select--disabled': this.disabled,
|
|
148
149
|
'sd-select--error': !!this.error,
|
|
@@ -441,6 +442,33 @@ export class SdSelect extends BaseDropdownEvent {
|
|
|
441
442
|
"attribute": "addon-label",
|
|
442
443
|
"defaultValue": "''"
|
|
443
444
|
},
|
|
445
|
+
"addonAlign": {
|
|
446
|
+
"type": "string",
|
|
447
|
+
"mutable": false,
|
|
448
|
+
"complexType": {
|
|
449
|
+
"original": "FieldAddonAlign",
|
|
450
|
+
"resolved": "\"center\" | \"end\" | \"start\"",
|
|
451
|
+
"references": {
|
|
452
|
+
"FieldAddonAlign": {
|
|
453
|
+
"location": "import",
|
|
454
|
+
"path": "../sd-field/sd-field.config",
|
|
455
|
+
"id": "src/components/sd-field/sd-field.config.ts::FieldAddonAlign",
|
|
456
|
+
"referenceLocation": "FieldAddonAlign"
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
},
|
|
460
|
+
"required": false,
|
|
461
|
+
"optional": false,
|
|
462
|
+
"docs": {
|
|
463
|
+
"tags": [],
|
|
464
|
+
"text": ""
|
|
465
|
+
},
|
|
466
|
+
"getter": false,
|
|
467
|
+
"setter": false,
|
|
468
|
+
"reflect": false,
|
|
469
|
+
"attribute": "addon-align",
|
|
470
|
+
"defaultValue": "'start'"
|
|
471
|
+
},
|
|
444
472
|
"icon": {
|
|
445
473
|
"type": "unknown",
|
|
446
474
|
"mutable": false,
|