@sellmate/design-system 1.13.0 → 1.14.0
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 +2 -2
- package/dist/cjs/{index-erbAlKp-.js → index-Dq1M20nt.js} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- 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 +1 -1
- package/dist/cjs/sd-button_2.cjs.entry.js +1 -1
- package/dist/cjs/sd-calendar_2.cjs.entry.js +1 -1
- package/dist/cjs/sd-callout.cjs.entry.js +1 -1
- package/dist/cjs/sd-card.cjs.entry.js +1 -1
- package/dist/cjs/sd-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/sd-chip-input.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 +1 -1
- package/dist/cjs/sd-date-box.cjs.entry.js +1 -1
- package/dist/cjs/sd-date-picker_7.cjs.entry.js +1 -1
- package/dist/cjs/sd-date-range-picker-calendar.cjs.entry.js +1 -1
- package/dist/cjs/sd-divider.cjs.entry.js +1 -1
- package/dist/cjs/sd-dropdown-button.cjs.entry.js +1 -1
- package/dist/cjs/sd-field_3.cjs.entry.js +20 -21
- package/dist/cjs/sd-form.cjs.entry.js +1 -1
- package/dist/cjs/sd-ghost-button_2.cjs.entry.js +1 -1
- package/dist/cjs/sd-guide.cjs.entry.js +1 -1
- package/dist/cjs/sd-key-value-table.cjs.entry.js +1 -1
- package/dist/cjs/sd-linear-progress.cjs.entry.js +1 -1
- package/dist/cjs/sd-loading-container.cjs.entry.js +1 -1
- package/dist/cjs/sd-modal-container.cjs.entry.js +1 -1
- package/dist/cjs/sd-pagination_4.cjs.entry.js +1 -1
- package/dist/cjs/sd-popover.cjs.entry.js +2 -2
- package/dist/cjs/sd-popup.cjs.entry.js +1 -1
- 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.cjs.entry.js +1 -1
- package/dist/cjs/sd-select-list-item_2.cjs.entry.js +1 -1
- package/dist/cjs/sd-select_3.cjs.entry.js +1 -1
- package/dist/cjs/sd-switch.cjs.entry.js +9 -6
- package/dist/cjs/sd-table.cjs.entry.js +1 -1
- package/dist/cjs/sd-tabs.cjs.entry.js +1 -1
- package/dist/cjs/sd-td.cjs.entry.js +1 -1
- package/dist/cjs/sd-text-link.cjs.entry.js +90 -19
- package/dist/cjs/sd-toast-container.cjs.entry.js +1 -1
- package/dist/cjs/sd-toast.cjs.entry.js +1 -1
- package/dist/cjs/sd-toggle.cjs.entry.js +3 -3
- package/dist/cjs/{tooltipArrow-CYf_WBPN.js → tooltipArrow-CyyaX9aS.js} +1 -1
- package/dist/collection/components/sd-floating-portal/sd-floating-portal.js +14 -21
- package/dist/collection/components/sd-switch/sd-switch.config.js +2 -1
- package/dist/collection/components/sd-switch/sd-switch.css +4 -1
- package/dist/collection/components/sd-switch/sd-switch.js +3 -2
- package/dist/collection/components/sd-text-link/sd-text-link.config.js +27 -7
- package/dist/collection/components/sd-text-link/sd-text-link.css +1 -0
- package/dist/collection/components/sd-text-link/sd-text-link.js +39 -9
- package/dist/collection/components/sd-tooltip/sd-tooltip.js +4 -4
- package/dist/components/index.js +1 -1
- package/dist/components/p--bh6IQPe.js +1 -0
- package/dist/components/{p-BUidFkYd.js → p-0l2gvHgO.js} +1 -1
- package/dist/components/{p-DRoYx4ox.js → p-B7XLde30.js} +1 -1
- package/dist/components/{p-CoX_ozJQ.js → p-BAog7La9.js} +1 -1
- package/dist/components/{p-BoXTUvyq.js → p-BQbRKyE8.js} +1 -1
- package/dist/components/{p-MMl4IPkT.js → p-BZpxlRPV.js} +1 -1
- package/dist/components/{p-zKW4Sw2l.js → p-C4G3m6i5.js} +1 -1
- package/dist/components/{p-DACweegE.js → p-C4GyQnYy.js} +1 -1
- package/dist/components/{p-TD8DiYYC.js → p-C9GSsqUl.js} +1 -1
- package/dist/components/{p-vS--1dHy.js → p-C9wBnyAK.js} +1 -1
- package/dist/components/{p-BklUnzX5.js → p-CPhGwtJN.js} +1 -1
- package/dist/components/{p-DG5mmAZR.js → p-CWRzU_jD.js} +1 -1
- package/dist/components/{p-CMVIH_LA.js → p-CZCejvvs.js} +1 -1
- package/dist/components/p-CbLmNzyI.js +1 -0
- package/dist/components/{p-C_3H0ef6.js → p-CbOjEMF1.js} +1 -1
- package/dist/components/{p-DUaqwhdO.js → p-ChzjfCHr.js} +1 -1
- package/dist/components/{p--ZDL0WyX.js → p-ClFi24KR.js} +1 -1
- package/dist/components/{p-Dt8isS3r.js → p-Cps2roN-.js} +1 -1
- package/dist/components/{p-CSRU_6IG.js → p-D-MF-Gqr.js} +1 -1
- package/dist/components/{p-BdmCYhiG.js → p-D7c1Foln.js} +1 -1
- package/dist/components/{p-D9fTZjTl.js → p-DCcIwD65.js} +1 -1
- package/dist/components/{p-CcyPWdvG.js → p-DOnvzHnl.js} +1 -1
- package/dist/components/{p-Bc81OXqj.js → p-DPJTWFX1.js} +1 -1
- package/dist/components/p-DQaizq5F.js +1 -0
- package/dist/components/{p-CZP1wFmE.js → p-DU-bmyYI.js} +1 -1
- package/dist/components/{p-KENiwV56.js → p-DiYM7tLY.js} +1 -1
- package/dist/components/p-DmqY8RSd.js +1 -0
- package/dist/components/{p-BzMV13Xr.js → p-Dn3GoMRV.js} +1 -1
- package/dist/components/{p-8XgM7UEL.js → p-DoPR7KRG.js} +1 -1
- package/dist/components/{p-DetgSxJr.js → p-Dp51AYN2.js} +1 -1
- package/dist/components/{p-CV1k__LR.js → p-DsUXQTxl.js} +1 -1
- package/dist/components/p-DwkU96A1.js +1 -0
- package/dist/components/{p-C-0-0BCQ.js → p-Jp2HXSTL.js} +1 -1
- package/dist/components/{p-CuuPUA52.js → p-bFbGmGpk.js} +1 -1
- package/dist/components/{p-9SZAF9qv.js → p-bHTV5pau.js} +1 -1
- package/dist/components/{p-C9pDOVrU.js → p-jGNVdj6x.js} +1 -1
- package/dist/components/{p-CYJoJT1r.js → p-kZQacVZK.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.js +1 -1
- package/dist/components/sd-calendar.js +1 -1
- package/dist/components/sd-callout.js +1 -1
- package/dist/components/sd-card.js +1 -1
- package/dist/components/sd-checkbox.js +1 -1
- package/dist/components/sd-chip-input.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-box.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-divider.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-form.js +1 -1
- package/dist/components/sd-ghost-button.js +1 -1
- package/dist/components/sd-guide.js +1 -1
- package/dist/components/sd-icon.js +1 -1
- package/dist/components/sd-input.js +1 -1
- package/dist/components/sd-key-value-table.js +1 -1
- package/dist/components/sd-linear-progress.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-popup.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-list-item-search.js +1 -1
- package/dist/components/sd-select-list-item.js +1 -1
- package/dist/components/sd-select-listbox.js +1 -1
- package/dist/components/sd-select-trigger.js +1 -1
- package/dist/components/sd-select.js +1 -1
- package/dist/components/sd-switch.js +1 -1
- package/dist/components/sd-table.js +1 -1
- package/dist/components/sd-tabs.js +1 -1
- package/dist/components/sd-tag.js +1 -1
- package/dist/components/sd-tbody.js +1 -1
- package/dist/components/sd-td.js +1 -1
- package/dist/components/sd-text-link.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-toggle.js +1 -1
- package/dist/components/sd-tooltip.js +1 -1
- package/dist/components/sd-tr.js +1 -1
- package/dist/design-system/design-system.css +1 -1
- package/dist/design-system/design-system.esm.js +1 -1
- package/dist/design-system/p-02a61803.entry.js +1 -0
- package/dist/design-system/{p-acf7099e.entry.js → p-0ba848cc.entry.js} +1 -1
- package/dist/design-system/{p-973eed65.entry.js → p-0c8410c0.entry.js} +1 -1
- package/dist/design-system/{p-cf301438.entry.js → p-0d23059e.entry.js} +1 -1
- package/dist/design-system/{p-9470e031.entry.js → p-0e5f3458.entry.js} +1 -1
- package/dist/design-system/{p-099b1fa6.entry.js → p-0efea9e0.entry.js} +1 -1
- package/dist/design-system/{p-308abc0e.entry.js → p-15f27fc6.entry.js} +1 -1
- package/dist/design-system/{p-e53d6089.entry.js → p-17c360bf.entry.js} +1 -1
- package/dist/design-system/{p-f66f4eee.entry.js → p-21201d3b.entry.js} +1 -1
- package/dist/design-system/{p-f46d4199.entry.js → p-3087b3ee.entry.js} +1 -1
- package/dist/design-system/{p-43d36198.entry.js → p-33f7d238.entry.js} +1 -1
- package/dist/design-system/{p-f22590e4.entry.js → p-348af170.entry.js} +1 -1
- package/dist/design-system/{p-9c658fdd.entry.js → p-3e196f92.entry.js} +1 -1
- package/dist/design-system/{p-90997ca5.entry.js → p-3f2b2799.entry.js} +1 -1
- package/dist/design-system/{p-3148fdbb.entry.js → p-453efe4b.entry.js} +1 -1
- package/dist/design-system/{p-6785b122.entry.js → p-45c9950f.entry.js} +1 -1
- package/dist/design-system/{p-63d49ccb.entry.js → p-4794ec4d.entry.js} +1 -1
- package/dist/design-system/{p-01ee066e.entry.js → p-584295c2.entry.js} +1 -1
- package/dist/design-system/{p-845b95cc.entry.js → p-63dd2424.entry.js} +1 -1
- package/dist/design-system/{p-7b3fec0d.entry.js → p-74b6e8e2.entry.js} +1 -1
- package/dist/design-system/{p-c148947c.entry.js → p-79ebd90b.entry.js} +1 -1
- package/dist/design-system/{p-88f8fa16.entry.js → p-7b37f397.entry.js} +1 -1
- package/dist/design-system/{p-b33b18c7.entry.js → p-89031ce0.entry.js} +1 -1
- package/dist/design-system/p-9aafb387.entry.js +1 -0
- package/dist/design-system/{p-DDgZHadT.js → p-DBOI5K7c.js} +1 -1
- package/dist/design-system/p-JGOJoT-i.js +2 -0
- package/dist/design-system/{p-29d72776.entry.js → p-a2c3041a.entry.js} +1 -1
- package/dist/design-system/{p-56c6c243.entry.js → p-aa583377.entry.js} +1 -1
- package/dist/design-system/p-ab3656cb.entry.js +1 -0
- package/dist/design-system/{p-7ae98de4.entry.js → p-b86b8a69.entry.js} +1 -1
- package/dist/design-system/{p-929ba1b6.entry.js → p-bc1a812b.entry.js} +1 -1
- package/dist/design-system/{p-3c4396bf.entry.js → p-bfd4216b.entry.js} +1 -1
- package/dist/design-system/{p-c068f61a.entry.js → p-c8f1e14e.entry.js} +1 -1
- package/dist/design-system/{p-c4ebb7d1.entry.js → p-d58ec388.entry.js} +1 -1
- package/dist/design-system/{p-548b799f.entry.js → p-d6672552.entry.js} +1 -1
- package/dist/design-system/{p-67a3f9ca.entry.js → p-d704ff76.entry.js} +1 -1
- package/dist/design-system/{p-e0ea08ba.entry.js → p-de9f768b.entry.js} +1 -1
- package/dist/design-system/{p-d3fc5510.entry.js → p-e67214be.entry.js} +1 -1
- package/dist/design-system/{p-b06e4b77.entry.js → p-eb4c9901.entry.js} +1 -1
- package/dist/design-system/{p-5ea98503.entry.js → p-eb83aa2f.entry.js} +1 -1
- package/dist/design-system/{p-b5252a07.entry.js → p-ef191467.entry.js} +1 -1
- package/dist/design-system/{p-1a06b680.entry.js → p-f0c85e94.entry.js} +1 -1
- package/dist/design-system/{p-69c41f34.entry.js → p-fbcf3beb.entry.js} +1 -1
- package/dist/esm/design-system.js +3 -3
- package/dist/esm/{index-D3yCWQNg.js → index-JGOJoT-i.js} +1 -1
- package/dist/esm/loader.js +3 -3
- 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 +1 -1
- package/dist/esm/sd-button_2.entry.js +1 -1
- package/dist/esm/sd-calendar_2.entry.js +1 -1
- package/dist/esm/sd-callout.entry.js +1 -1
- package/dist/esm/sd-card.entry.js +1 -1
- package/dist/esm/sd-checkbox.entry.js +1 -1
- package/dist/esm/sd-chip-input.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 +1 -1
- package/dist/esm/sd-date-box.entry.js +1 -1
- package/dist/esm/sd-date-picker_7.entry.js +1 -1
- package/dist/esm/sd-date-range-picker-calendar.entry.js +1 -1
- package/dist/esm/sd-divider.entry.js +1 -1
- package/dist/esm/sd-dropdown-button.entry.js +1 -1
- package/dist/esm/sd-field_3.entry.js +20 -21
- package/dist/esm/sd-form.entry.js +1 -1
- package/dist/esm/sd-ghost-button_2.entry.js +1 -1
- package/dist/esm/sd-guide.entry.js +1 -1
- package/dist/esm/sd-key-value-table.entry.js +1 -1
- package/dist/esm/sd-linear-progress.entry.js +1 -1
- package/dist/esm/sd-loading-container.entry.js +1 -1
- package/dist/esm/sd-modal-container.entry.js +1 -1
- package/dist/esm/sd-pagination_4.entry.js +1 -1
- package/dist/esm/sd-popover.entry.js +2 -2
- package/dist/esm/sd-popup.entry.js +1 -1
- package/dist/esm/sd-portal.entry.js +1 -1
- package/dist/esm/sd-radio-button.entry.js +1 -1
- package/dist/esm/sd-radio.entry.js +1 -1
- package/dist/esm/sd-select-list-item_2.entry.js +1 -1
- package/dist/esm/sd-select_3.entry.js +1 -1
- package/dist/esm/sd-switch.entry.js +9 -6
- package/dist/esm/sd-table.entry.js +1 -1
- package/dist/esm/sd-tabs.entry.js +1 -1
- package/dist/esm/sd-td.entry.js +1 -1
- package/dist/esm/sd-text-link.entry.js +90 -19
- package/dist/esm/sd-toast-container.entry.js +1 -1
- package/dist/esm/sd-toast.entry.js +1 -1
- package/dist/esm/sd-toggle.entry.js +3 -3
- package/dist/esm/{tooltipArrow-CUCfrch1.js → tooltipArrow-jis_5jgG.js} +1 -1
- package/dist/types/components/sd-floating-portal/sd-floating-portal.d.ts +1 -0
- package/dist/types/components/sd-switch/sd-switch.config.d.ts +2 -1
- package/dist/types/components/sd-text-link/sd-text-link.config.d.ts +10 -18
- package/dist/types/components/sd-text-link/sd-text-link.d.ts +2 -0
- package/dist/types/components.d.ts +11 -0
- package/hydrate/index.js +122 -48
- package/hydrate/index.mjs +122 -48
- package/package.json +1 -1
- package/dist/components/p-B0Aqa3rl.js +0 -1
- package/dist/components/p-BFjxNqDj.js +0 -1
- package/dist/components/p-BygVDx5A.js +0 -1
- package/dist/components/p-DK5GPWo_.js +0 -1
- package/dist/components/p-DRFcrZ_2.js +0 -1
- package/dist/design-system/p-7f0e8752.entry.js +0 -1
- package/dist/design-system/p-D3yCWQNg.js +0 -2
- package/dist/design-system/p-d604da14.entry.js +0 -1
- package/dist/design-system/p-febd7c47.entry.js +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-Dq1M20nt.js');
|
|
4
4
|
|
|
5
5
|
var switchTokens = {
|
|
6
6
|
"switch": {
|
|
@@ -10,7 +10,8 @@ var switchTokens = {
|
|
|
10
10
|
radius: "9999",
|
|
11
11
|
knob: {
|
|
12
12
|
size: "16",
|
|
13
|
-
|
|
13
|
+
"default": "#FFFFFF",
|
|
14
|
+
disabled: "#EEEEEE"
|
|
14
15
|
},
|
|
15
16
|
bg: {
|
|
16
17
|
on: "#0075FF",
|
|
@@ -42,7 +43,8 @@ const SWITCH_LAYOUT = {
|
|
|
42
43
|
gap: Number(switchTokens.switch.gap),
|
|
43
44
|
};
|
|
44
45
|
const SWITCH_COLORS = {
|
|
45
|
-
|
|
46
|
+
knobDefault: switchTokens.switch.knob.default,
|
|
47
|
+
knobDisabled: switchTokens.switch.knob.disabled,
|
|
46
48
|
bgOn: switchTokens.switch.bg.on,
|
|
47
49
|
bgOff: switchTokens.switch.bg.off,
|
|
48
50
|
bgDisabledOn: switchTokens.switch.bg.disabled.on,
|
|
@@ -56,7 +58,7 @@ const SWITCH_TYPOGRAPHY = {
|
|
|
56
58
|
textDecoration: switchTokens.switch.label.typography.textDecoration,
|
|
57
59
|
};
|
|
58
60
|
|
|
59
|
-
const sdSwitchCss = () => `sd-switch{display:inline-block;line-height:0}sd-switch .sd-switch{cursor:pointer;display:inline-flex;align-items:center;gap:var(--sd-switch-gap)}sd-switch .sd-switch>input{display:none}sd-switch .sd-switch__track{position:relative;width:var(--sd-switch-track-width);height:var(--sd-switch-track-height);border-radius:var(--sd-switch-track-radius);background:var(--sd-switch-bg-off);transition:background-color 0.2s ease}sd-switch .sd-switch__knob{position:absolute;top:var(--sd-switch-track-padding);left:var(--sd-switch-track-padding);width:var(--sd-switch-knob-size);height:var(--sd-switch-knob-size);border-radius:50%;background:var(--sd-switch-knob-
|
|
61
|
+
const sdSwitchCss = () => `sd-switch{display:inline-block;line-height:0}sd-switch .sd-switch{cursor:pointer;display:inline-flex;align-items:center;gap:var(--sd-switch-gap)}sd-switch .sd-switch>input{display:none}sd-switch .sd-switch__track{position:relative;width:var(--sd-switch-track-width);height:var(--sd-switch-track-height);border-radius:var(--sd-switch-track-radius);background:var(--sd-switch-bg-off);transition:background-color 0.2s ease}sd-switch .sd-switch__knob{position:absolute;top:var(--sd-switch-track-padding);left:var(--sd-switch-track-padding);width:var(--sd-switch-knob-size);height:var(--sd-switch-knob-size);border-radius:50%;background:var(--sd-switch-knob-default);box-shadow:0 2px 4px rgba(0, 0, 0, 0.16);transition:transform 0.2s ease}sd-switch .sd-switch__label{font-family:var(--sd-switch-font-family);font-weight:var(--sd-switch-font-weight);font-size:var(--sd-switch-font-size);line-height:var(--sd-switch-line-height);text-decoration:var(--sd-switch-text-decoration)}sd-switch .sd-switch--on .sd-switch__track{background:var(--sd-switch-bg-on)}sd-switch .sd-switch--on .sd-switch__knob{transform:translateX(var(--sd-switch-knob-offset))}sd-switch .sd-switch--disabled{cursor:not-allowed}sd-switch .sd-switch--disabled .sd-switch__knob{background:var(--sd-switch-knob-disabled)}sd-switch .sd-switch--disabled.sd-switch--on .sd-switch__track{background:var(--sd-switch-bg-disabled-on)}sd-switch .sd-switch--disabled.sd-switch--off .sd-switch__track{background:var(--sd-switch-bg-disabled-off)}`;
|
|
60
62
|
|
|
61
63
|
const SdSwitch = class {
|
|
62
64
|
constructor(hostRef) {
|
|
@@ -90,7 +92,8 @@ const SdSwitch = class {
|
|
|
90
92
|
'--sd-switch-track-radius': `${SWITCH_LAYOUT.radius}px`,
|
|
91
93
|
'--sd-switch-knob-size': `${SWITCH_LAYOUT.knobSize}px`,
|
|
92
94
|
'--sd-switch-knob-offset': `${knobOffset}px`,
|
|
93
|
-
'--sd-switch-knob-
|
|
95
|
+
'--sd-switch-knob-default': SWITCH_COLORS.knobDefault,
|
|
96
|
+
'--sd-switch-knob-disabled': SWITCH_COLORS.knobDisabled,
|
|
94
97
|
'--sd-switch-bg-on': SWITCH_COLORS.bgOn,
|
|
95
98
|
'--sd-switch-bg-off': SWITCH_COLORS.bgOff,
|
|
96
99
|
'--sd-switch-bg-disabled-on': SWITCH_COLORS.bgDisabledOn,
|
|
@@ -102,7 +105,7 @@ const SdSwitch = class {
|
|
|
102
105
|
'--sd-switch-line-height': `${SWITCH_TYPOGRAPHY.lineHeight}px`,
|
|
103
106
|
'--sd-switch-text-decoration': SWITCH_TYPOGRAPHY.textDecoration,
|
|
104
107
|
};
|
|
105
|
-
return (index.h("label", { key: '
|
|
108
|
+
return (index.h("label", { key: '70b779b6d8fc42e94110d7fb9d88aba22290af3a', "aria-label": this.label || 'switch', class: this.switchClasses, style: cssVars }, index.h("input", { key: '41281a03161608ce507dd14c8a2a5a47063556ca', type: "checkbox", checked: this.value, disabled: this.disabled, onInput: this.handleChange }), index.h("div", { key: '0c712f35c9594380b666a03387f0563cfcb1257d', class: "sd-switch__track" }, index.h("div", { key: 'a96915c01e3a33017d9024e1aea9cd8f50fdd933', class: "sd-switch__knob" })), this.label && index.h("span", { key: '51d9d2f4a7072cb288ce4257df825ad2d9053f35', class: "sd-switch__label" }, this.label)));
|
|
106
109
|
}
|
|
107
110
|
};
|
|
108
111
|
SdSwitch.style = sdSwitchCss();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-Dq1M20nt.js');
|
|
4
4
|
var constants = require('./constants-DJRV1upE.js');
|
|
5
5
|
var sdTable_config = require('./sd-table.config-BjJW74Zx.js');
|
|
6
6
|
require('./component.table-DIxmbGBT.js');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-Dq1M20nt.js');
|
|
4
4
|
var constants = require('./constants-DJRV1upE.js');
|
|
5
5
|
|
|
6
6
|
const sdTdCss = () => `sd-td *{box-sizing:border-box}sd-td{display:contents}sd-td.align-left{text-align:left}sd-td.align-center{text-align:center}sd-td.align-right{text-align:right}`;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-Dq1M20nt.js');
|
|
4
4
|
|
|
5
5
|
const textLink = {
|
|
6
6
|
sm: {
|
|
@@ -8,11 +8,39 @@ const textLink = {
|
|
|
8
8
|
icon: "16",
|
|
9
9
|
typography: {
|
|
10
10
|
"default": {
|
|
11
|
+
fontFamily: "Pretendard Variable, Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Segoe UI, Apple SD Gothic Neo, Noto Sans KR, Malgun Gothic, Apple Color Emoji, Segoe UI Emoji, sans-serif",
|
|
11
12
|
fontSize: "12",
|
|
12
|
-
|
|
13
|
+
fontWeight: "500",
|
|
14
|
+
textDecoration: "none",
|
|
15
|
+
lineHeight: "20"
|
|
16
|
+
},
|
|
13
17
|
underline: {
|
|
18
|
+
fontFamily: "Pretendard Variable, Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Segoe UI, Apple SD Gothic Neo, Noto Sans KR, Malgun Gothic, Apple Color Emoji, Segoe UI Emoji, sans-serif",
|
|
14
19
|
fontSize: "12",
|
|
15
|
-
|
|
20
|
+
fontWeight: "500",
|
|
21
|
+
textDecoration: "underline",
|
|
22
|
+
lineHeight: "20"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
md: {
|
|
27
|
+
gap: "8",
|
|
28
|
+
icon: "16",
|
|
29
|
+
typography: {
|
|
30
|
+
"default": {
|
|
31
|
+
fontFamily: "Pretendard Variable, Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Segoe UI, Apple SD Gothic Neo, Noto Sans KR, Malgun Gothic, Apple Color Emoji, Segoe UI Emoji, sans-serif",
|
|
32
|
+
fontSize: "14",
|
|
33
|
+
fontWeight: "500",
|
|
34
|
+
textDecoration: "none",
|
|
35
|
+
lineHeight: "24"
|
|
36
|
+
},
|
|
37
|
+
underline: {
|
|
38
|
+
fontFamily: "Pretendard Variable, Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Segoe UI, Apple SD Gothic Neo, Noto Sans KR, Malgun Gothic, Apple Color Emoji, Segoe UI Emoji, sans-serif",
|
|
39
|
+
fontSize: "14",
|
|
40
|
+
fontWeight: "500",
|
|
41
|
+
textDecoration: "underline",
|
|
42
|
+
lineHeight: "24"
|
|
43
|
+
}
|
|
16
44
|
}
|
|
17
45
|
},
|
|
18
46
|
content: {
|
|
@@ -21,29 +49,69 @@ const textLink = {
|
|
|
21
49
|
icon: {
|
|
22
50
|
"default": "#006AC1",
|
|
23
51
|
disabled: "#BBBBBB"
|
|
52
|
+
},
|
|
53
|
+
lg: {
|
|
54
|
+
typography: {
|
|
55
|
+
"default": {
|
|
56
|
+
fontFamily: "Pretendard Variable, Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Segoe UI, Apple SD Gothic Neo, Noto Sans KR, Malgun Gothic, Apple Color Emoji, Segoe UI Emoji, sans-serif",
|
|
57
|
+
fontSize: "16",
|
|
58
|
+
fontWeight: "500",
|
|
59
|
+
textDecoration: "none",
|
|
60
|
+
lineHeight: "26"
|
|
61
|
+
},
|
|
62
|
+
underline: {
|
|
63
|
+
fontFamily: "Pretendard Variable, Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Segoe UI, Apple SD Gothic Neo, Noto Sans KR, Malgun Gothic, Apple Color Emoji, Segoe UI Emoji, sans-serif",
|
|
64
|
+
fontSize: "16",
|
|
65
|
+
fontWeight: "500",
|
|
66
|
+
textDecoration: "underline",
|
|
67
|
+
lineHeight: "26"
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
gap: "8",
|
|
71
|
+
icon: "20"
|
|
24
72
|
}
|
|
25
73
|
};
|
|
26
74
|
var textLinkTokens = {
|
|
27
75
|
textLink: textLink
|
|
28
76
|
};
|
|
29
77
|
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
|
|
78
|
+
const TEXT_LINK_SIZE_CONFIG = {
|
|
79
|
+
sm: {
|
|
80
|
+
gap: Number(textLinkTokens.textLink.sm.gap),
|
|
81
|
+
iconSize: Number(textLinkTokens.textLink.sm.icon),
|
|
82
|
+
typography: {
|
|
83
|
+
default: textLinkTokens.textLink.sm.typography.default,
|
|
84
|
+
underline: textLinkTokens.textLink.sm.typography.underline,
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
md: {
|
|
88
|
+
gap: Number(textLinkTokens.textLink.md.gap),
|
|
89
|
+
iconSize: Number(textLinkTokens.textLink.md.icon),
|
|
90
|
+
typography: {
|
|
91
|
+
default: textLinkTokens.textLink.md.typography.default,
|
|
92
|
+
underline: textLinkTokens.textLink.md.typography.underline,
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
lg: {
|
|
96
|
+
gap: Number(textLinkTokens.textLink.lg.gap),
|
|
97
|
+
iconSize: Number(textLinkTokens.textLink.lg.icon),
|
|
98
|
+
typography: {
|
|
99
|
+
default: textLinkTokens.textLink.lg.typography.default,
|
|
100
|
+
underline: textLinkTokens.textLink.lg.typography.underline,
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
};
|
|
104
|
+
const TEXT_LINK_ARROW = {
|
|
33
105
|
arrowFrame: 16, // TODO: 토큰 반영 후 교체
|
|
34
106
|
arrowIconSize: 12, // TODO: 토큰 반영 후 교체
|
|
35
107
|
arrowColor: '#888888', // TODO: 토큰 반영 후 교체 (grey_65)
|
|
36
108
|
};
|
|
37
|
-
const TEXT_LINK_TYPOGRAPHY = {
|
|
38
|
-
default: textLinkTokens.textLink.sm.typography.default,
|
|
39
|
-
underline: textLinkTokens.textLink.sm.typography.underline,
|
|
40
|
-
};
|
|
41
109
|
const TEXT_LINK_COLORS = {
|
|
42
110
|
content: textLinkTokens.textLink.content,
|
|
43
111
|
icon: textLinkTokens.textLink.icon,
|
|
44
112
|
};
|
|
45
113
|
|
|
46
|
-
const sdTextLinkCss = () => `sd-text-link{display:inline-flex}sd-text-link .sd-text-link{display:inline-flex;align-items:center;gap:var(--sd-text-link-gap);cursor:pointer;user-select:none}sd-text-link .sd-text-link__label{font-size:var(--sd-text-link-font-size, 12px);text-decoration:var(--sd-text-link-text-decoration);color:var(--sd-text-link-color, inherit)}sd-text-link .sd-text-link:not(.sd-text-link--disabled):hover .sd-text-link__label{text-decoration:underline}sd-text-link .sd-text-link--disabled{cursor:not-allowed}`;
|
|
114
|
+
const sdTextLinkCss = () => `sd-text-link{display:inline-flex}sd-text-link .sd-text-link{display:inline-flex;align-items:center;gap:var(--sd-text-link-gap);cursor:pointer;user-select:none}sd-text-link .sd-text-link__label{font-size:var(--sd-text-link-font-size, 12px);line-height:var(--sd-text-link-line-height, 20px);text-decoration:var(--sd-text-link-text-decoration);color:var(--sd-text-link-color, inherit)}sd-text-link .sd-text-link:not(.sd-text-link--disabled):hover .sd-text-link__label{text-decoration:underline}sd-text-link .sd-text-link--disabled{cursor:not-allowed}`;
|
|
47
115
|
|
|
48
116
|
const SdTextLink = class {
|
|
49
117
|
constructor(hostRef) {
|
|
@@ -57,6 +125,7 @@ const SdTextLink = class {
|
|
|
57
125
|
rightArrow = 'none';
|
|
58
126
|
underline = false;
|
|
59
127
|
disabled = false;
|
|
128
|
+
size = 'sm';
|
|
60
129
|
click;
|
|
61
130
|
handleClick = () => {
|
|
62
131
|
if (this.disabled)
|
|
@@ -64,19 +133,21 @@ const SdTextLink = class {
|
|
|
64
133
|
this.click.emit();
|
|
65
134
|
};
|
|
66
135
|
render() {
|
|
67
|
-
const
|
|
136
|
+
const sizeConfig = TEXT_LINK_SIZE_CONFIG[this.size];
|
|
137
|
+
const typo = this.underline ? sizeConfig.typography.underline : sizeConfig.typography.default;
|
|
68
138
|
const labelClassName = ['sd-text-link__label', this.labelClass].filter(Boolean).join(' ');
|
|
69
139
|
const iconColor = this.disabled
|
|
70
140
|
? TEXT_LINK_COLORS.icon.disabled
|
|
71
141
|
: this.iconColor || TEXT_LINK_COLORS.icon.default;
|
|
72
|
-
const arrowColor = this.disabled ? TEXT_LINK_COLORS.icon.disabled :
|
|
142
|
+
const arrowColor = this.disabled ? TEXT_LINK_COLORS.icon.disabled : TEXT_LINK_ARROW.arrowColor;
|
|
73
143
|
const cssVars = {
|
|
74
|
-
'--sd-text-link-gap': `${
|
|
144
|
+
'--sd-text-link-gap': `${sizeConfig.gap}px`,
|
|
75
145
|
'--sd-text-link-font-size': `${typo.fontSize}px`,
|
|
146
|
+
'--sd-text-link-line-height': `${typo.lineHeight}px`,
|
|
76
147
|
'--sd-text-link-text-decoration': typo.textDecoration,
|
|
77
148
|
...(this.disabled ? { '--sd-text-link-color': TEXT_LINK_COLORS.content.disabled } : {}),
|
|
78
149
|
};
|
|
79
|
-
return (index.h("span", { key: '
|
|
150
|
+
return (index.h("span", { key: '89b8117d19d149faf70d026ef560acdfa0096daa', role: "button", tabindex: this.disabled ? -1 : 0, class: {
|
|
80
151
|
'sd-text-link': true,
|
|
81
152
|
'sd-text-link--disabled': this.disabled,
|
|
82
153
|
}, style: cssVars, onClick: this.handleClick, onKeyDown: e => {
|
|
@@ -84,13 +155,13 @@ const SdTextLink = class {
|
|
|
84
155
|
e.preventDefault();
|
|
85
156
|
this.handleClick();
|
|
86
157
|
}
|
|
87
|
-
} }, this.icon && (index.h("sd-icon", { key: '
|
|
88
|
-
width: `${
|
|
89
|
-
height: `${
|
|
158
|
+
} }, this.icon && (index.h("sd-icon", { key: '684c7b31abc6cb806944c03a016c4520c4721a7c', name: this.icon, size: sizeConfig.iconSize, color: iconColor, class: "sd-text-link__icon" })), index.h("span", { key: '272f5b4c889b099ede7b5146ea4828648d89ad69', class: labelClassName }, this.label), this.rightArrow && this.rightArrow !== 'none' && (index.h("span", { key: '142d37f856df2e5858df5d976e4d8ac4ee2f2607', class: "sd-text-link__arrow", style: {
|
|
159
|
+
width: `${TEXT_LINK_ARROW.arrowFrame}px`,
|
|
160
|
+
height: `${TEXT_LINK_ARROW.arrowFrame}px`,
|
|
90
161
|
display: 'inline-flex',
|
|
91
162
|
alignItems: 'center',
|
|
92
163
|
justifyContent: 'center',
|
|
93
|
-
} }, index.h("sd-icon", { key: '
|
|
164
|
+
} }, index.h("sd-icon", { key: '5da12b6077fb33912260b353cb6fe7d533eab937', name: this.rightArrow === 'chevron' ? 'chevronRight' : 'caretRight', size: TEXT_LINK_ARROW.arrowIconSize, color: arrowColor })))));
|
|
94
165
|
}
|
|
95
166
|
};
|
|
96
167
|
SdTextLink.style = sdTextLinkCss();
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-Dq1M20nt.js');
|
|
4
4
|
|
|
5
5
|
const toggle = {
|
|
6
6
|
height: "28",
|
|
7
7
|
paddingX: "12",
|
|
8
8
|
typography: {
|
|
9
9
|
fontFamily: "Pretendard Variable, Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Segoe UI, Apple SD Gothic Neo, Noto Sans KR, Malgun Gothic, Apple Color Emoji, Segoe UI Emoji, sans-serif",
|
|
10
|
-
fontSize: "
|
|
10
|
+
fontSize: "14",
|
|
11
11
|
fontWeight: "500",
|
|
12
12
|
textDecoration: "none",
|
|
13
|
-
lineHeight: "
|
|
13
|
+
lineHeight: "24"
|
|
14
14
|
},
|
|
15
15
|
radius: "9999",
|
|
16
16
|
border: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-Dq1M20nt.js');
|
|
4
4
|
|
|
5
5
|
const TooltipArrow = (props) => (index.h("svg", { width: "16", height: "12", viewBox: "0 0 16 12", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props }, index.h("path", { d: "M8.83205 10.7519C8.43623 11.3457 7.56377 11.3457 7.16795 10.7519L1.04907e-06 -1.39876e-06L16 0L8.83205 10.7519Z", fill: "currentColor" })));
|
|
6
6
|
|
|
@@ -14,6 +14,7 @@ export class SdFloatingPopover {
|
|
|
14
14
|
isInsideClick = false;
|
|
15
15
|
resizeObserver;
|
|
16
16
|
mutationObserver;
|
|
17
|
+
scrollHandler = () => this.updatePosition();
|
|
17
18
|
static ARROW_SIZE = 11.2;
|
|
18
19
|
componentDidLoad() {
|
|
19
20
|
this.container = this.resolveContainer();
|
|
@@ -27,6 +28,7 @@ export class SdFloatingPopover {
|
|
|
27
28
|
}
|
|
28
29
|
});
|
|
29
30
|
this.observeParent();
|
|
31
|
+
window.addEventListener('scroll', this.scrollHandler, true);
|
|
30
32
|
}
|
|
31
33
|
componentDidRender() {
|
|
32
34
|
if (!this.wrapper)
|
|
@@ -51,6 +53,7 @@ export class SdFloatingPopover {
|
|
|
51
53
|
disconnectedCallback() {
|
|
52
54
|
if (this.rafId !== undefined)
|
|
53
55
|
cancelAnimationFrame(this.rafId);
|
|
56
|
+
window.removeEventListener('scroll', this.scrollHandler, true);
|
|
54
57
|
this.unobserveParent();
|
|
55
58
|
this.wrapper?.remove();
|
|
56
59
|
}
|
|
@@ -61,7 +64,7 @@ export class SdFloatingPopover {
|
|
|
61
64
|
createWrapper() {
|
|
62
65
|
this.wrapper = document.createElement('div');
|
|
63
66
|
Object.assign(this.wrapper.style, {
|
|
64
|
-
position: '
|
|
67
|
+
position: 'fixed',
|
|
65
68
|
zIndex: (this.zIndex ?? 998).toString(),
|
|
66
69
|
transition: 'opacity 0.4s',
|
|
67
70
|
top: '-9999px',
|
|
@@ -75,7 +78,7 @@ export class SdFloatingPopover {
|
|
|
75
78
|
const nodes = Array.from(this.el.childNodes).filter(n => n.nodeType !== Node.COMMENT_NODE);
|
|
76
79
|
nodes.forEach(n => this.wrapper.appendChild(n));
|
|
77
80
|
}
|
|
78
|
-
// 위치 갱신 (
|
|
81
|
+
// 위치 갱신 (resize)
|
|
79
82
|
updatePosition() {
|
|
80
83
|
if (this.rafId !== undefined)
|
|
81
84
|
cancelAnimationFrame(this.rafId);
|
|
@@ -91,24 +94,20 @@ export class SdFloatingPopover {
|
|
|
91
94
|
let left = 0;
|
|
92
95
|
switch (this.placement ?? 'bottom') {
|
|
93
96
|
case 'top':
|
|
94
|
-
top = rect.top
|
|
95
|
-
left =
|
|
96
|
-
rect.left + window.scrollX + rect.width / 2 - this.wrapper.offsetWidth / 2 + offsetX;
|
|
97
|
+
top = rect.top - this.wrapper.offsetHeight + offsetY - ARROW_SIZE;
|
|
98
|
+
left = rect.left + rect.width / 2 - this.wrapper.offsetWidth / 2 + offsetX;
|
|
97
99
|
break;
|
|
98
100
|
case 'bottom':
|
|
99
|
-
top = rect.bottom +
|
|
100
|
-
left =
|
|
101
|
-
rect.left + window.scrollX + rect.width / 2 - this.wrapper.offsetWidth / 2 + offsetX;
|
|
101
|
+
top = rect.bottom + offsetY + ARROW_SIZE;
|
|
102
|
+
left = rect.left + rect.width / 2 - this.wrapper.offsetWidth / 2 + offsetX;
|
|
102
103
|
break;
|
|
103
104
|
case 'left':
|
|
104
|
-
top =
|
|
105
|
-
|
|
106
|
-
left = rect.left + window.scrollX - this.wrapper.offsetWidth - offsetX - ARROW_SIZE;
|
|
105
|
+
top = rect.top + rect.height / 2 - this.wrapper.offsetHeight / 2 + offsetY;
|
|
106
|
+
left = rect.left - this.wrapper.offsetWidth - offsetX - ARROW_SIZE;
|
|
107
107
|
break;
|
|
108
108
|
case 'right':
|
|
109
|
-
top =
|
|
110
|
-
|
|
111
|
-
left = rect.right + window.scrollX + offsetX + ARROW_SIZE;
|
|
109
|
+
top = rect.top + rect.height / 2 - this.wrapper.offsetHeight / 2 + offsetY;
|
|
110
|
+
left = rect.right + offsetX + ARROW_SIZE;
|
|
112
111
|
break;
|
|
113
112
|
}
|
|
114
113
|
Object.assign(this.wrapper.style, {
|
|
@@ -153,7 +152,7 @@ export class SdFloatingPopover {
|
|
|
153
152
|
}
|
|
154
153
|
}
|
|
155
154
|
render() {
|
|
156
|
-
return h("slot", { key: '
|
|
155
|
+
return h("slot", { key: '7931b1b9ee17e2de64a7fa87658ec7d4501f7ecd' });
|
|
157
156
|
}
|
|
158
157
|
static get is() { return "sd-floating-portal"; }
|
|
159
158
|
static get originalStyleUrls() {
|
|
@@ -317,12 +316,6 @@ export class SdFloatingPopover {
|
|
|
317
316
|
static get elementRef() { return "el"; }
|
|
318
317
|
static get listeners() {
|
|
319
318
|
return [{
|
|
320
|
-
"name": "scroll",
|
|
321
|
-
"method": "updatePosition",
|
|
322
|
-
"target": "window",
|
|
323
|
-
"capture": false,
|
|
324
|
-
"passive": true
|
|
325
|
-
}, {
|
|
326
319
|
"name": "resize",
|
|
327
320
|
"method": "updatePosition",
|
|
328
321
|
"target": "window",
|
|
@@ -8,7 +8,8 @@ export const SWITCH_LAYOUT = {
|
|
|
8
8
|
gap: Number(switchTokens.switch.gap),
|
|
9
9
|
};
|
|
10
10
|
export const SWITCH_COLORS = {
|
|
11
|
-
|
|
11
|
+
knobDefault: switchTokens.switch.knob.default,
|
|
12
|
+
knobDisabled: switchTokens.switch.knob.disabled,
|
|
12
13
|
bgOn: switchTokens.switch.bg.on,
|
|
13
14
|
bgOff: switchTokens.switch.bg.off,
|
|
14
15
|
bgDisabledOn: switchTokens.switch.bg.disabled.on,
|
|
@@ -26,7 +26,7 @@ sd-switch .sd-switch__knob {
|
|
|
26
26
|
width: var(--sd-switch-knob-size);
|
|
27
27
|
height: var(--sd-switch-knob-size);
|
|
28
28
|
border-radius: 50%;
|
|
29
|
-
background: var(--sd-switch-knob-
|
|
29
|
+
background: var(--sd-switch-knob-default);
|
|
30
30
|
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.16);
|
|
31
31
|
transition: transform 0.2s ease;
|
|
32
32
|
}
|
|
@@ -46,6 +46,9 @@ sd-switch .sd-switch--on .sd-switch__knob {
|
|
|
46
46
|
sd-switch .sd-switch--disabled {
|
|
47
47
|
cursor: not-allowed;
|
|
48
48
|
}
|
|
49
|
+
sd-switch .sd-switch--disabled .sd-switch__knob {
|
|
50
|
+
background: var(--sd-switch-knob-disabled);
|
|
51
|
+
}
|
|
49
52
|
sd-switch .sd-switch--disabled.sd-switch--on .sd-switch__track {
|
|
50
53
|
background: var(--sd-switch-bg-disabled-on);
|
|
51
54
|
}
|
|
@@ -28,7 +28,8 @@ export class SdSwitch {
|
|
|
28
28
|
'--sd-switch-track-radius': `${SWITCH_LAYOUT.radius}px`,
|
|
29
29
|
'--sd-switch-knob-size': `${SWITCH_LAYOUT.knobSize}px`,
|
|
30
30
|
'--sd-switch-knob-offset': `${knobOffset}px`,
|
|
31
|
-
'--sd-switch-knob-
|
|
31
|
+
'--sd-switch-knob-default': SWITCH_COLORS.knobDefault,
|
|
32
|
+
'--sd-switch-knob-disabled': SWITCH_COLORS.knobDisabled,
|
|
32
33
|
'--sd-switch-bg-on': SWITCH_COLORS.bgOn,
|
|
33
34
|
'--sd-switch-bg-off': SWITCH_COLORS.bgOff,
|
|
34
35
|
'--sd-switch-bg-disabled-on': SWITCH_COLORS.bgDisabledOn,
|
|
@@ -40,7 +41,7 @@ export class SdSwitch {
|
|
|
40
41
|
'--sd-switch-line-height': `${SWITCH_TYPOGRAPHY.lineHeight}px`,
|
|
41
42
|
'--sd-switch-text-decoration': SWITCH_TYPOGRAPHY.textDecoration,
|
|
42
43
|
};
|
|
43
|
-
return (h("label", { key: '
|
|
44
|
+
return (h("label", { key: '70b779b6d8fc42e94110d7fb9d88aba22290af3a', "aria-label": this.label || 'switch', class: this.switchClasses, style: cssVars }, h("input", { key: '41281a03161608ce507dd14c8a2a5a47063556ca', type: "checkbox", checked: this.value, disabled: this.disabled, onInput: this.handleChange }), h("div", { key: '0c712f35c9594380b666a03387f0563cfcb1257d', class: "sd-switch__track" }, h("div", { key: 'a96915c01e3a33017d9024e1aea9cd8f50fdd933', class: "sd-switch__knob" })), this.label && h("span", { key: '51d9d2f4a7072cb288ce4257df825ad2d9053f35', class: "sd-switch__label" }, this.label)));
|
|
44
45
|
}
|
|
45
46
|
static get is() { return "sd-switch"; }
|
|
46
47
|
static get originalStyleUrls() {
|
|
@@ -1,15 +1,35 @@
|
|
|
1
1
|
import textLinkTokens from "../../tokens/generated/component.textLink.json";
|
|
2
|
-
export const
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
export const TEXT_LINK_SIZE_CONFIG = {
|
|
3
|
+
sm: {
|
|
4
|
+
gap: Number(textLinkTokens.textLink.sm.gap),
|
|
5
|
+
iconSize: Number(textLinkTokens.textLink.sm.icon),
|
|
6
|
+
typography: {
|
|
7
|
+
default: textLinkTokens.textLink.sm.typography.default,
|
|
8
|
+
underline: textLinkTokens.textLink.sm.typography.underline,
|
|
9
|
+
},
|
|
10
|
+
},
|
|
11
|
+
md: {
|
|
12
|
+
gap: Number(textLinkTokens.textLink.md.gap),
|
|
13
|
+
iconSize: Number(textLinkTokens.textLink.md.icon),
|
|
14
|
+
typography: {
|
|
15
|
+
default: textLinkTokens.textLink.md.typography.default,
|
|
16
|
+
underline: textLinkTokens.textLink.md.typography.underline,
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
lg: {
|
|
20
|
+
gap: Number(textLinkTokens.textLink.lg.gap),
|
|
21
|
+
iconSize: Number(textLinkTokens.textLink.lg.icon),
|
|
22
|
+
typography: {
|
|
23
|
+
default: textLinkTokens.textLink.lg.typography.default,
|
|
24
|
+
underline: textLinkTokens.textLink.lg.typography.underline,
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
export const TEXT_LINK_ARROW = {
|
|
5
29
|
arrowFrame: 16, // TODO: 토큰 반영 후 교체
|
|
6
30
|
arrowIconSize: 12, // TODO: 토큰 반영 후 교체
|
|
7
31
|
arrowColor: '#888888', // TODO: 토큰 반영 후 교체 (grey_65)
|
|
8
32
|
};
|
|
9
|
-
export const TEXT_LINK_TYPOGRAPHY = {
|
|
10
|
-
default: textLinkTokens.textLink.sm.typography.default,
|
|
11
|
-
underline: textLinkTokens.textLink.sm.typography.underline,
|
|
12
|
-
};
|
|
13
33
|
export const TEXT_LINK_COLORS = {
|
|
14
34
|
content: textLinkTokens.textLink.content,
|
|
15
35
|
icon: textLinkTokens.textLink.icon,
|
|
@@ -10,6 +10,7 @@ sd-text-link .sd-text-link {
|
|
|
10
10
|
}
|
|
11
11
|
sd-text-link .sd-text-link__label {
|
|
12
12
|
font-size: var(--sd-text-link-font-size, 12px);
|
|
13
|
+
line-height: var(--sd-text-link-line-height, 20px);
|
|
13
14
|
text-decoration: var(--sd-text-link-text-decoration);
|
|
14
15
|
color: var(--sd-text-link-color, inherit);
|
|
15
16
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
|
-
import { TEXT_LINK_COLORS,
|
|
2
|
+
import { TEXT_LINK_ARROW, TEXT_LINK_COLORS, TEXT_LINK_SIZE_CONFIG, } from "./sd-text-link.config";
|
|
3
3
|
export class SdTextLink {
|
|
4
4
|
label = '';
|
|
5
5
|
icon = '';
|
|
@@ -8,6 +8,7 @@ export class SdTextLink {
|
|
|
8
8
|
rightArrow = 'none';
|
|
9
9
|
underline = false;
|
|
10
10
|
disabled = false;
|
|
11
|
+
size = 'sm';
|
|
11
12
|
click;
|
|
12
13
|
handleClick = () => {
|
|
13
14
|
if (this.disabled)
|
|
@@ -15,19 +16,21 @@ export class SdTextLink {
|
|
|
15
16
|
this.click.emit();
|
|
16
17
|
};
|
|
17
18
|
render() {
|
|
18
|
-
const
|
|
19
|
+
const sizeConfig = TEXT_LINK_SIZE_CONFIG[this.size];
|
|
20
|
+
const typo = this.underline ? sizeConfig.typography.underline : sizeConfig.typography.default;
|
|
19
21
|
const labelClassName = ['sd-text-link__label', this.labelClass].filter(Boolean).join(' ');
|
|
20
22
|
const iconColor = this.disabled
|
|
21
23
|
? TEXT_LINK_COLORS.icon.disabled
|
|
22
24
|
: this.iconColor || TEXT_LINK_COLORS.icon.default;
|
|
23
|
-
const arrowColor = this.disabled ? TEXT_LINK_COLORS.icon.disabled :
|
|
25
|
+
const arrowColor = this.disabled ? TEXT_LINK_COLORS.icon.disabled : TEXT_LINK_ARROW.arrowColor;
|
|
24
26
|
const cssVars = {
|
|
25
|
-
'--sd-text-link-gap': `${
|
|
27
|
+
'--sd-text-link-gap': `${sizeConfig.gap}px`,
|
|
26
28
|
'--sd-text-link-font-size': `${typo.fontSize}px`,
|
|
29
|
+
'--sd-text-link-line-height': `${typo.lineHeight}px`,
|
|
27
30
|
'--sd-text-link-text-decoration': typo.textDecoration,
|
|
28
31
|
...(this.disabled ? { '--sd-text-link-color': TEXT_LINK_COLORS.content.disabled } : {}),
|
|
29
32
|
};
|
|
30
|
-
return (h("span", { key: '
|
|
33
|
+
return (h("span", { key: '89b8117d19d149faf70d026ef560acdfa0096daa', role: "button", tabindex: this.disabled ? -1 : 0, class: {
|
|
31
34
|
'sd-text-link': true,
|
|
32
35
|
'sd-text-link--disabled': this.disabled,
|
|
33
36
|
}, style: cssVars, onClick: this.handleClick, onKeyDown: e => {
|
|
@@ -35,13 +38,13 @@ export class SdTextLink {
|
|
|
35
38
|
e.preventDefault();
|
|
36
39
|
this.handleClick();
|
|
37
40
|
}
|
|
38
|
-
} }, this.icon && (h("sd-icon", { key: '
|
|
39
|
-
width: `${
|
|
40
|
-
height: `${
|
|
41
|
+
} }, this.icon && (h("sd-icon", { key: '684c7b31abc6cb806944c03a016c4520c4721a7c', name: this.icon, size: sizeConfig.iconSize, color: iconColor, class: "sd-text-link__icon" })), h("span", { key: '272f5b4c889b099ede7b5146ea4828648d89ad69', class: labelClassName }, this.label), this.rightArrow && this.rightArrow !== 'none' && (h("span", { key: '142d37f856df2e5858df5d976e4d8ac4ee2f2607', class: "sd-text-link__arrow", style: {
|
|
42
|
+
width: `${TEXT_LINK_ARROW.arrowFrame}px`,
|
|
43
|
+
height: `${TEXT_LINK_ARROW.arrowFrame}px`,
|
|
41
44
|
display: 'inline-flex',
|
|
42
45
|
alignItems: 'center',
|
|
43
46
|
justifyContent: 'center',
|
|
44
|
-
} }, h("sd-icon", { key: '
|
|
47
|
+
} }, h("sd-icon", { key: '5da12b6077fb33912260b353cb6fe7d533eab937', name: this.rightArrow === 'chevron' ? 'chevronRight' : 'caretRight', size: TEXT_LINK_ARROW.arrowIconSize, color: arrowColor })))));
|
|
45
48
|
}
|
|
46
49
|
static get is() { return "sd-text-link"; }
|
|
47
50
|
static get originalStyleUrls() {
|
|
@@ -195,6 +198,33 @@ export class SdTextLink {
|
|
|
195
198
|
"reflect": true,
|
|
196
199
|
"attribute": "disabled",
|
|
197
200
|
"defaultValue": "false"
|
|
201
|
+
},
|
|
202
|
+
"size": {
|
|
203
|
+
"type": "string",
|
|
204
|
+
"mutable": false,
|
|
205
|
+
"complexType": {
|
|
206
|
+
"original": "TextLinkSize",
|
|
207
|
+
"resolved": "\"lg\" | \"md\" | \"sm\"",
|
|
208
|
+
"references": {
|
|
209
|
+
"TextLinkSize": {
|
|
210
|
+
"location": "import",
|
|
211
|
+
"path": "./sd-text-link.config",
|
|
212
|
+
"id": "src/components/sd-text-link/sd-text-link.config.ts::TextLinkSize",
|
|
213
|
+
"referenceLocation": "TextLinkSize"
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
},
|
|
217
|
+
"required": false,
|
|
218
|
+
"optional": false,
|
|
219
|
+
"docs": {
|
|
220
|
+
"tags": [],
|
|
221
|
+
"text": ""
|
|
222
|
+
},
|
|
223
|
+
"getter": false,
|
|
224
|
+
"setter": false,
|
|
225
|
+
"reflect": true,
|
|
226
|
+
"attribute": "size",
|
|
227
|
+
"defaultValue": "'sm'"
|
|
198
228
|
}
|
|
199
229
|
};
|
|
200
230
|
}
|