duoyun-ui 2.2.2 → 2.2.8
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/elements/badge.d.ts +2 -16
- package/elements/badge.d.ts.map +1 -1
- package/elements/badge.js +4 -158
- package/elements/badge.js.map +1 -1
- package/elements/banner.d.ts +2 -17
- package/elements/banner.d.ts.map +1 -1
- package/elements/banner.js +4 -127
- package/elements/banner.js.map +1 -1
- package/elements/base/chart.d.ts +2 -2
- package/elements/base/resize.d.ts +1 -22
- package/elements/base/resize.d.ts.map +1 -1
- package/elements/base/resize.js +1 -95
- package/elements/base/resize.js.map +1 -1
- package/elements/base/scroll.d.ts +1 -8
- package/elements/base/scroll.d.ts.map +1 -1
- package/elements/base/scroll.js +1 -158
- package/elements/base/scroll.js.map +1 -1
- package/elements/base/visible.d.ts +1 -18
- package/elements/base/visible.d.ts.map +1 -1
- package/elements/base/visible.js +1 -112
- package/elements/base/visible.js.map +1 -1
- package/elements/button.d.ts +2 -24
- package/elements/button.d.ts.map +1 -1
- package/elements/button.js +7 -287
- package/elements/button.js.map +1 -1
- package/elements/checkbox.d.ts +3 -21
- package/elements/checkbox.d.ts.map +1 -1
- package/elements/checkbox.js +6 -180
- package/elements/checkbox.js.map +1 -1
- package/elements/code-block.d.ts +2 -7
- package/elements/code-block.d.ts.map +1 -1
- package/elements/code-block.js +4 -432
- package/elements/code-block.js.map +1 -1
- package/elements/collapse.d.ts +3 -29
- package/elements/collapse.d.ts.map +1 -1
- package/elements/collapse.js +6 -197
- package/elements/collapse.js.map +1 -1
- package/elements/compartment.d.ts +2 -5
- package/elements/compartment.d.ts.map +1 -1
- package/elements/compartment.js +4 -23
- package/elements/compartment.js.map +1 -1
- package/elements/contextmenu.d.ts +5 -42
- package/elements/contextmenu.d.ts.map +1 -1
- package/elements/contextmenu.js +8 -285
- package/elements/contextmenu.js.map +1 -1
- package/elements/countdown.d.ts +2 -12
- package/elements/countdown.d.ts.map +1 -1
- package/elements/countdown.js +4 -94
- package/elements/countdown.js.map +1 -1
- package/elements/divider.d.ts +2 -8
- package/elements/divider.d.ts.map +1 -1
- package/elements/divider.js +4 -129
- package/elements/divider.js.map +1 -1
- package/elements/empty.d.ts +2 -8
- package/elements/empty.d.ts.map +1 -1
- package/elements/empty.js +4 -59
- package/elements/empty.js.map +1 -1
- package/elements/grouped-picker.d.ts +29 -0
- package/elements/grouped-picker.d.ts.map +1 -0
- package/elements/grouped-picker.js +199 -0
- package/elements/grouped-picker.js.map +1 -0
- package/elements/input.d.ts +4 -36
- package/elements/input.d.ts.map +1 -1
- package/elements/input.js +6 -489
- package/elements/input.js.map +1 -1
- package/elements/letters.d.ts +4 -0
- package/elements/letters.d.ts.map +1 -0
- package/elements/letters.js +56 -0
- package/elements/letters.js.map +1 -0
- package/elements/link.d.ts +3 -5
- package/elements/link.d.ts.map +1 -1
- package/elements/link.js +6 -38
- package/elements/link.js.map +1 -1
- package/elements/list.d.ts +5 -58
- package/elements/list.d.ts.map +1 -1
- package/elements/list.js +19 -664
- package/elements/list.js.map +1 -1
- package/elements/modal.d.ts +5 -63
- package/elements/modal.d.ts.map +1 -1
- package/elements/modal.js +13 -411
- package/elements/modal.js.map +1 -1
- package/elements/options.d.ts +4 -32
- package/elements/options.d.ts.map +1 -1
- package/elements/options.js +5 -254
- package/elements/options.js.map +1 -1
- package/elements/page-loadbar.js +1 -1
- package/elements/paragraph.d.ts +2 -2
- package/elements/paragraph.d.ts.map +1 -1
- package/elements/paragraph.js +4 -45
- package/elements/paragraph.js.map +1 -1
- package/elements/placeholder.d.ts +2 -14
- package/elements/placeholder.d.ts.map +1 -1
- package/elements/placeholder.js +4 -114
- package/elements/placeholder.js.map +1 -1
- package/elements/radio.d.ts +5 -24
- package/elements/radio.d.ts.map +1 -1
- package/elements/radio.js +7 -165
- package/elements/radio.js.map +1 -1
- package/elements/rate.d.ts +2 -12
- package/elements/rate.d.ts.map +1 -1
- package/elements/rate.js +4 -142
- package/elements/rate.js.map +1 -1
- package/elements/rolling-number.d.ts +4 -0
- package/elements/rolling-number.d.ts.map +1 -0
- package/elements/rolling-number.js +56 -0
- package/elements/rolling-number.js.map +1 -0
- package/elements/scroll-box.d.ts +2 -2
- package/elements/scroll-box.d.ts.map +1 -1
- package/elements/scroll-box.js +4 -5
- package/elements/scroll-box.js.map +1 -1
- package/elements/segmented.d.ts +3 -20
- package/elements/segmented.d.ts.map +1 -1
- package/elements/segmented.js +4 -191
- package/elements/segmented.js.map +1 -1
- package/elements/slider.d.ts +2 -20
- package/elements/slider.d.ts.map +1 -1
- package/elements/slider.js +4 -261
- package/elements/slider.js.map +1 -1
- package/elements/sort-box.d.ts +1 -2
- package/elements/sort-box.d.ts.map +1 -1
- package/elements/sort-box.js +4 -15
- package/elements/sort-box.js.map +1 -1
- package/elements/space.d.ts +2 -4
- package/elements/space.d.ts.map +1 -1
- package/elements/space.js +4 -37
- package/elements/space.js.map +1 -1
- package/elements/switch.d.ts +2 -11
- package/elements/switch.d.ts.map +1 -1
- package/elements/switch.js +5 -134
- package/elements/switch.js.map +1 -1
- package/elements/tag.d.ts +3 -16
- package/elements/tag.d.ts.map +1 -1
- package/elements/tag.js +4 -133
- package/elements/tag.js.map +1 -1
- package/elements/timeline.d.ts.map +1 -1
- package/elements/timeline.js +0 -1
- package/elements/timeline.js.map +1 -1
- package/elements/toast.js +1 -1
- package/elements/wait.js +1 -1
- package/helper/error.js +2 -39
- package/helper/error.js.map +1 -1
- package/helper/webapp.d.ts +4 -5
- package/helper/webapp.d.ts.map +1 -1
- package/helper/webapp.js +5 -11
- package/helper/webapp.js.map +1 -1
- package/lib/animations.d.ts +1 -10
- package/lib/animations.d.ts.map +1 -1
- package/lib/animations.js +1 -29
- package/lib/animations.js.map +1 -1
- package/lib/cache.d.ts +1 -18
- package/lib/cache.d.ts.map +1 -1
- package/lib/cache.js +1 -62
- package/lib/cache.js.map +1 -1
- package/lib/color.d.ts +1 -37
- package/lib/color.d.ts.map +1 -1
- package/lib/color.js +1 -98
- package/lib/color.js.map +1 -1
- package/lib/decorators.d.ts +2 -0
- package/lib/decorators.d.ts.map +1 -0
- package/lib/decorators.js +2 -0
- package/lib/decorators.js.map +1 -0
- package/lib/easing.d.ts +2 -0
- package/lib/easing.d.ts.map +1 -0
- package/lib/easing.js +2 -0
- package/lib/easing.js.map +1 -0
- package/lib/element.d.ts +1 -18
- package/lib/element.d.ts.map +1 -1
- package/lib/element.js +1 -131
- package/lib/element.js.map +1 -1
- package/lib/encode.d.ts +1 -10
- package/lib/encode.d.ts.map +1 -1
- package/lib/encode.js +1 -48
- package/lib/encode.js.map +1 -1
- package/lib/hotkeys.d.ts +1 -43
- package/lib/hotkeys.d.ts.map +1 -1
- package/lib/hotkeys.js +1 -247
- package/lib/hotkeys.js.map +1 -1
- package/lib/icons.d.ts +1 -114
- package/lib/icons.d.ts.map +1 -1
- package/lib/icons.js +1 -90
- package/lib/icons.js.map +1 -1
- package/lib/image.d.ts +1 -39
- package/lib/image.d.ts.map +1 -1
- package/lib/image.js +1 -140
- package/lib/image.js.map +1 -1
- package/lib/locale.d.ts +1 -87
- package/lib/locale.d.ts.map +1 -1
- package/lib/locale.js +1 -8
- package/lib/locale.js.map +1 -1
- package/lib/map.d.ts +1 -8
- package/lib/map.d.ts.map +1 -1
- package/lib/map.js +1 -31
- package/lib/map.js.map +1 -1
- package/lib/number.d.ts +1 -94
- package/lib/number.d.ts.map +1 -1
- package/lib/number.js +1 -169
- package/lib/number.js.map +1 -1
- package/lib/patterns.d.ts +1 -9
- package/lib/patterns.d.ts.map +1 -1
- package/lib/patterns.js +1 -11
- package/lib/patterns.js.map +1 -1
- package/lib/styles.d.ts +1 -4
- package/lib/styles.d.ts.map +1 -1
- package/lib/styles.js +1 -28
- package/lib/styles.js.map +1 -1
- package/lib/theme.d.ts +1 -85
- package/lib/theme.d.ts.map +1 -1
- package/lib/theme.js +6 -70
- package/lib/theme.js.map +1 -1
- package/lib/time.d.ts +1 -81
- package/lib/time.d.ts.map +1 -1
- package/lib/time.js +1 -255
- package/lib/time.js.map +1 -1
- package/lib/timer.d.ts +1 -25
- package/lib/timer.d.ts.map +1 -1
- package/lib/timer.js +1 -106
- package/lib/timer.js.map +1 -1
- package/lib/types.d.ts +1 -13
- package/lib/types.d.ts.map +1 -1
- package/lib/types.js +1 -16
- package/lib/types.js.map +1 -1
- package/lib/utils.d.ts +1 -79
- package/lib/utils.d.ts.map +1 -1
- package/lib/utils.js +1 -240
- package/lib/utils.js.map +1 -1
- package/locales/en.d.ts +1 -37
- package/locales/en.d.ts.map +1 -1
- package/locales/en.js +1 -36
- package/locales/en.js.map +1 -1
- package/locales/zh.d.ts +1 -3
- package/locales/zh.d.ts.map +1 -1
- package/locales/zh.js +1 -37
- package/locales/zh.js.map +1 -1
- package/package.json +4 -6
- package/patterns/console.d.ts +1 -1
- package/patterns/form.d.ts +5 -3
- package/patterns/form.d.ts.map +1 -1
- package/patterns/form.js +18 -5
- package/patterns/form.js.map +1 -1
- package/react/DyBadge.d.ts +1 -9
- package/react/DyBadge.js +1 -1
- package/react/DyBanner.d.ts +1 -6
- package/react/DyBanner.js +1 -1
- package/react/DyButton.d.ts +1 -15
- package/react/DyButton.js +1 -1
- package/react/DyCheckbox.d.ts +1 -7
- package/react/DyCheckbox.js +1 -1
- package/react/DyCheckboxGroup.d.ts +1 -7
- package/react/DyCheckboxGroup.js +1 -1
- package/react/DyCoachMark.d.ts +0 -5
- package/react/DyCoachMark.js +1 -1
- package/react/DyCodeBlock.d.ts +1 -5
- package/react/DyCodeBlock.js +1 -1
- package/react/DyCollapse.d.ts +1 -5
- package/react/DyCollapse.js +1 -1
- package/react/DyCollapsePanel.d.ts +1 -6
- package/react/DyCollapsePanel.js +1 -1
- package/react/DyCompartment.d.ts +1 -3
- package/react/DyCompartment.js +1 -1
- package/react/DyCountdown.d.ts +1 -5
- package/react/DyCountdown.js +1 -1
- package/react/DyDivider.d.ts +1 -6
- package/react/DyDivider.js +1 -1
- package/react/DyDrawer.d.ts +1 -21
- package/react/DyDrawer.js +1 -1
- package/react/DyEmpty.d.ts +1 -5
- package/react/DyEmpty.js +1 -1
- package/react/DyGroupedPicker.d.ts +27 -0
- package/react/DyGroupedPicker.js +22 -0
- package/react/DyInput.d.ts +1 -22
- package/react/DyInput.js +1 -1
- package/react/DyLegend.d.ts +0 -4
- package/react/DyLegend.js +1 -1
- package/react/DyLetters.d.ts +15 -0
- package/react/{DyListOutside.js → DyLetters.js} +4 -4
- package/react/DyList.d.ts +0 -13
- package/react/DyList.js +1 -1
- package/react/DyOptions.d.ts +1 -5
- package/react/DyOptions.js +1 -1
- package/react/DyPatForm.d.ts +1 -0
- package/react/DyPlaceholder.d.ts +1 -10
- package/react/DyPlaceholder.js +1 -1
- package/react/DyRadio.d.ts +1 -6
- package/react/DyRadio.js +1 -1
- package/react/DyRadioGroup.d.ts +1 -7
- package/react/DyRadioGroup.js +1 -1
- package/react/DyRate.d.ts +1 -7
- package/react/DyRate.js +1 -1
- package/react/DyRollingNumber.d.ts +15 -0
- package/react/{DyListItem.js → DyRollingNumber.js} +5 -5
- package/react/DySegmented.d.ts +1 -8
- package/react/DySegmented.js +1 -1
- package/react/DySlider.d.ts +1 -12
- package/react/DySlider.js +1 -1
- package/react/DySortItem.d.ts +1 -3
- package/react/DySortItem.js +1 -1
- package/react/DySpace.d.ts +1 -4
- package/react/DySpace.js +1 -1
- package/react/DySwitch.d.ts +1 -7
- package/react/DySwitch.js +1 -1
- package/react/DyTag.d.ts +1 -9
- package/react/DyTag.js +1 -1
- package/svelte/badge.d.ts +0 -8
- package/svelte/banner.d.ts +0 -5
- package/svelte/button.d.ts +0 -14
- package/svelte/checkbox.d.ts +0 -6
- package/svelte/coach-mark.d.ts +0 -5
- package/svelte/code-block.d.ts +0 -4
- package/svelte/collapse.d.ts +0 -4
- package/svelte/compartment.d.ts +0 -2
- package/svelte/countdown.d.ts +0 -4
- package/svelte/divider.d.ts +0 -5
- package/svelte/drawer.d.ts +0 -20
- package/svelte/empty.d.ts +0 -4
- package/svelte/grouped-picker.d.ts +19 -0
- package/svelte/grouped-picker.js +2 -0
- package/svelte/legend.d.ts +0 -4
- package/svelte/letters.d.ts +9 -0
- package/svelte/letters.js +2 -0
- package/svelte/list.d.ts +4 -11
- package/svelte/options.d.ts +0 -4
- package/svelte/pat-form.d.ts +1 -0
- package/svelte/placeholder.d.ts +0 -9
- package/svelte/radio.d.ts +0 -6
- package/svelte/rate.d.ts +0 -6
- package/svelte/rolling-number.d.ts +9 -0
- package/svelte/rolling-number.js +2 -0
- package/svelte/segmented.d.ts +0 -7
- package/svelte/slider.d.ts +0 -11
- package/svelte/space.d.ts +0 -3
- package/svelte/switch.d.ts +0 -6
- package/svelte/tag.d.ts +0 -8
- package/vue/DyBadge.vue +2 -8
- package/vue/DyBanner.vue +4 -6
- package/vue/DyButton.vue +2 -14
- package/vue/DyCheckbox.vue +4 -7
- package/vue/DyCheckboxGroup.vue +4 -7
- package/vue/DyCoachMark.vue +4 -8
- package/vue/DyCodeBlock.vue +2 -4
- package/vue/DyCollapse.vue +2 -4
- package/vue/DyCollapsePanel.vue +4 -6
- package/vue/DyCompartment.vue +2 -2
- package/vue/DyCountdown.vue +4 -5
- package/vue/DyDivider.vue +2 -5
- package/vue/DyDrawer.vue +4 -21
- package/vue/DyEmpty.vue +2 -4
- package/vue/DyGroupedPicker.vue +53 -0
- package/vue/DyInput.vue +4 -22
- package/vue/DyLegend.vue +2 -6
- package/vue/{DyListOutside.vue → DyLetters.vue} +8 -8
- package/vue/DyList.vue +4 -16
- package/vue/DyOptions.vue +2 -4
- package/vue/DyPatForm.vue +2 -2
- package/vue/DyPlaceholder.vue +2 -9
- package/vue/DyRadio.vue +4 -6
- package/vue/DyRadioGroup.vue +4 -7
- package/vue/DyRate.vue +4 -7
- package/vue/DyRollingNumber.vue +42 -0
- package/vue/DySegmented.vue +4 -8
- package/vue/DySlider.vue +4 -12
- package/vue/DySortItem.vue +2 -2
- package/vue/DySpace.vue +2 -3
- package/vue/DySwitch.vue +4 -7
- package/vue/DyTag.vue +4 -9
- package/elements/flow.d.ts +0 -52
- package/elements/flow.d.ts.map +0 -1
- package/elements/flow.js +0 -703
- package/elements/flow.js.map +0 -1
- package/elements/map.d.ts +0 -48
- package/elements/map.d.ts.map +0 -1
- package/elements/map.js +0 -396
- package/elements/map.js.map +0 -1
- package/react/DyFlow.d.ts +0 -24
- package/react/DyFlow.js +0 -18
- package/react/DyFlowCanvas.d.ts +0 -29
- package/react/DyFlowCanvas.js +0 -18
- package/react/DyListItem.d.ts +0 -24
- package/react/DyListOutside.d.ts +0 -15
- package/react/DyMap.d.ts +0 -32
- package/react/DyMap.js +0 -18
- package/svelte/flow.d.ts +0 -18
- package/svelte/flow.js +0 -2
- package/svelte/map.d.ts +0 -26
- package/svelte/map.js +0 -2
- package/vue/DyFlow.vue +0 -49
- package/vue/DyFlowCanvas.vue +0 -53
- package/vue/DyListItem.vue +0 -48
- package/vue/DyMap.vue +0 -56
package/elements/radio.js
CHANGED
|
@@ -32,201 +32,43 @@ var __runInitializers = (this && this.__runInitializers) || function (thisArg, i
|
|
|
32
32
|
}
|
|
33
33
|
return useValue ? value : void 0;
|
|
34
34
|
};
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
|
|
38
|
-
import { commonHandle } from '../lib/hotkeys';
|
|
39
|
-
import { focusStyle } from '../lib/styles';
|
|
40
|
-
import { theme } from '../lib/theme';
|
|
41
|
-
const style = css `
|
|
42
|
-
:host(:where(:not([hidden]))) {
|
|
43
|
-
cursor: default;
|
|
44
|
-
display: inline-flex;
|
|
45
|
-
align-items: center;
|
|
46
|
-
gap: 0.5em;
|
|
47
|
-
line-height: 2;
|
|
48
|
-
}
|
|
49
|
-
:host([disabled]) {
|
|
50
|
-
cursor: not-allowed;
|
|
51
|
-
opacity: 0.3;
|
|
52
|
-
}
|
|
53
|
-
.radio {
|
|
54
|
-
box-sizing: border-box;
|
|
55
|
-
width: 1em;
|
|
56
|
-
aspect-ratio: 1;
|
|
57
|
-
border: 2px solid currentColor;
|
|
58
|
-
color: ${theme.borderColor};
|
|
59
|
-
background-clip: content-box;
|
|
60
|
-
padding: 2px;
|
|
61
|
-
border-radius: 10em;
|
|
62
|
-
transform: scale(1.001);
|
|
63
|
-
transition: background 0.1s;
|
|
64
|
-
}
|
|
65
|
-
:host(:not([disabled])) .radio {
|
|
66
|
-
box-shadow: ${theme.controlShadow};
|
|
67
|
-
}
|
|
68
|
-
:host(:where(:hover, [checked])) .radio {
|
|
69
|
-
color: ${theme.primaryColor};
|
|
70
|
-
}
|
|
71
|
-
:host([checked]) .radio {
|
|
72
|
-
background-color: currentColor;
|
|
73
|
-
}
|
|
74
|
-
`;
|
|
35
|
+
import { customElement } from '@mantou/gem/lib/decorators';
|
|
36
|
+
import { TapRadioElement, TapRadioGroupElement } from '@mantou/tap-ui/elements/radio';
|
|
37
|
+
export { groupStyle } from '@mantou/tap-ui/elements/radio';
|
|
75
38
|
let DuoyunRadioElement = (() => {
|
|
76
|
-
let _classDecorators = [customElement('dy-radio')
|
|
39
|
+
let _classDecorators = [customElement('dy-radio')];
|
|
77
40
|
let _classDescriptor;
|
|
78
41
|
let _classExtraInitializers = [];
|
|
79
42
|
let _classThis;
|
|
80
|
-
let _classSuper =
|
|
81
|
-
let _static_unnamed_decorators;
|
|
82
|
-
let _static_unnamed_initializers = [];
|
|
83
|
-
let _static_unnamed_extraInitializers = [];
|
|
84
|
-
let _checked_decorators;
|
|
85
|
-
let _checked_initializers = [];
|
|
86
|
-
let _checked_extraInitializers = [];
|
|
87
|
-
let _disabled_decorators;
|
|
88
|
-
let _disabled_initializers = [];
|
|
89
|
-
let _disabled_extraInitializers = [];
|
|
90
|
-
let _change_decorators;
|
|
91
|
-
let _change_initializers = [];
|
|
92
|
-
let _change_extraInitializers = [];
|
|
93
|
-
let _value_decorators;
|
|
94
|
-
let _value_initializers = [];
|
|
95
|
-
let _value_extraInitializers = [];
|
|
96
|
-
let _private_init_decorators;
|
|
97
|
-
let _private_init_initializers = [];
|
|
98
|
-
let _private_init_extraInitializers = [];
|
|
43
|
+
let _classSuper = TapRadioElement;
|
|
99
44
|
var DuoyunRadioElement = class extends _classSuper {
|
|
100
45
|
static { _classThis = this; }
|
|
101
46
|
static {
|
|
102
47
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
103
|
-
_static_unnamed_decorators = [slot];
|
|
104
|
-
_checked_decorators = [boolattribute];
|
|
105
|
-
_disabled_decorators = [boolattribute];
|
|
106
|
-
_change_decorators = [globalemitter];
|
|
107
|
-
_value_decorators = [attribute];
|
|
108
|
-
_private_init_decorators = [mounted()];
|
|
109
|
-
__esDecorate(null, null, _static_unnamed_decorators, { kind: "field", name: "unnamed", static: true, private: false, access: { has: obj => "unnamed" in obj, get: obj => obj.unnamed, set: (obj, value) => { obj.unnamed = value; } }, metadata: _metadata }, _static_unnamed_initializers, _static_unnamed_extraInitializers);
|
|
110
|
-
__esDecorate(null, null, _checked_decorators, { kind: "field", name: "checked", static: false, private: false, access: { has: obj => "checked" in obj, get: obj => obj.checked, set: (obj, value) => { obj.checked = value; } }, metadata: _metadata }, _checked_initializers, _checked_extraInitializers);
|
|
111
|
-
__esDecorate(null, null, _disabled_decorators, { kind: "field", name: "disabled", static: false, private: false, access: { has: obj => "disabled" in obj, get: obj => obj.disabled, set: (obj, value) => { obj.disabled = value; } }, metadata: _metadata }, _disabled_initializers, _disabled_extraInitializers);
|
|
112
|
-
__esDecorate(null, null, _change_decorators, { kind: "field", name: "change", static: false, private: false, access: { has: obj => "change" in obj, get: obj => obj.change, set: (obj, value) => { obj.change = value; } }, metadata: _metadata }, _change_initializers, _change_extraInitializers);
|
|
113
|
-
__esDecorate(null, null, _value_decorators, { kind: "field", name: "value", static: false, private: false, access: { has: obj => "value" in obj, get: obj => obj.value, set: (obj, value) => { obj.value = value; } }, metadata: _metadata }, _value_initializers, _value_extraInitializers);
|
|
114
|
-
__esDecorate(null, null, _private_init_decorators, { kind: "field", name: "#init", static: false, private: true, access: { has: obj => #init in obj, get: obj => obj.#init, set: (obj, value) => { obj.#init = value; } }, metadata: _metadata }, _private_init_initializers, _private_init_extraInitializers);
|
|
115
48
|
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
116
49
|
DuoyunRadioElement = _classThis = _classDescriptor.value;
|
|
117
50
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
118
|
-
}
|
|
119
|
-
static unnamed = __runInitializers(_classThis, _static_unnamed_initializers, void 0);
|
|
120
|
-
checked = __runInitializers(this, _checked_initializers, void 0);
|
|
121
|
-
disabled = (__runInitializers(this, _checked_extraInitializers), __runInitializers(this, _disabled_initializers, void 0));
|
|
122
|
-
change = (__runInitializers(this, _disabled_extraInitializers), __runInitializers(this, _change_initializers, void 0));
|
|
123
|
-
value = (__runInitializers(this, _change_extraInitializers), __runInitializers(this, _value_initializers, void 0));
|
|
124
|
-
#onClick = (__runInitializers(this, _value_extraInitializers), () => {
|
|
125
|
-
if (this.disabled)
|
|
126
|
-
return;
|
|
127
|
-
if (!this.checked)
|
|
128
|
-
this.change(this.value);
|
|
129
|
-
});
|
|
130
|
-
#init = __runInitializers(this, _private_init_initializers, () => addListener(this, 'click', this.#onClick));
|
|
131
|
-
render = (__runInitializers(this, _private_init_extraInitializers), () => {
|
|
132
|
-
return html `
|
|
133
|
-
<div
|
|
134
|
-
role="radio"
|
|
135
|
-
@keydown=${commonHandle}
|
|
136
|
-
tabindex=${-Number(this.disabled)}
|
|
137
|
-
aria-disabled=${this.disabled}
|
|
138
|
-
aria-checked=${this.checked}
|
|
139
|
-
aria-labelledby="label"
|
|
140
|
-
class="radio"
|
|
141
|
-
></div>
|
|
142
|
-
<slot id="label"></slot>
|
|
143
|
-
`;
|
|
144
|
-
});
|
|
145
|
-
static {
|
|
146
|
-
__runInitializers(_classThis, _static_unnamed_extraInitializers);
|
|
147
51
|
__runInitializers(_classThis, _classExtraInitializers);
|
|
148
52
|
}
|
|
149
53
|
};
|
|
150
54
|
return DuoyunRadioElement = _classThis;
|
|
151
55
|
})();
|
|
152
56
|
export { DuoyunRadioElement };
|
|
153
|
-
export const groupStyle = css `
|
|
154
|
-
:scope:where(:not([hidden])) {
|
|
155
|
-
display: flex;
|
|
156
|
-
align-items: center;
|
|
157
|
-
flex-wrap: wrap;
|
|
158
|
-
}
|
|
159
|
-
:scope:not([orientation='vertical']) {
|
|
160
|
-
gap: 1em;
|
|
161
|
-
}
|
|
162
|
-
:scope[orientation='vertical'] {
|
|
163
|
-
flex-direction: column;
|
|
164
|
-
align-items: flex-start;
|
|
165
|
-
}
|
|
166
|
-
`;
|
|
167
57
|
let DuoyunRadioGroupElement = (() => {
|
|
168
|
-
let _classDecorators = [customElement('dy-radio-group')
|
|
58
|
+
let _classDecorators = [customElement('dy-radio-group')];
|
|
169
59
|
let _classDescriptor;
|
|
170
60
|
let _classExtraInitializers = [];
|
|
171
61
|
let _classThis;
|
|
172
|
-
let _classSuper =
|
|
173
|
-
let _orientation_decorators;
|
|
174
|
-
let _orientation_initializers = [];
|
|
175
|
-
let _orientation_extraInitializers = [];
|
|
176
|
-
let _disabled_decorators;
|
|
177
|
-
let _disabled_initializers = [];
|
|
178
|
-
let _disabled_extraInitializers = [];
|
|
179
|
-
let _change_decorators;
|
|
180
|
-
let _change_initializers = [];
|
|
181
|
-
let _change_extraInitializers = [];
|
|
182
|
-
let _value_decorators;
|
|
183
|
-
let _value_initializers = [];
|
|
184
|
-
let _value_extraInitializers = [];
|
|
185
|
-
let _options_decorators;
|
|
186
|
-
let _options_initializers = [];
|
|
187
|
-
let _options_extraInitializers = [];
|
|
62
|
+
let _classSuper = TapRadioGroupElement;
|
|
188
63
|
var DuoyunRadioGroupElement = class extends _classSuper {
|
|
189
64
|
static { _classThis = this; }
|
|
190
65
|
static {
|
|
191
66
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
192
|
-
_orientation_decorators = [attribute];
|
|
193
|
-
_disabled_decorators = [boolattribute];
|
|
194
|
-
_change_decorators = [globalemitter];
|
|
195
|
-
_value_decorators = [property];
|
|
196
|
-
_options_decorators = [property];
|
|
197
|
-
__esDecorate(null, null, _orientation_decorators, { kind: "field", name: "orientation", static: false, private: false, access: { has: obj => "orientation" in obj, get: obj => obj.orientation, set: (obj, value) => { obj.orientation = value; } }, metadata: _metadata }, _orientation_initializers, _orientation_extraInitializers);
|
|
198
|
-
__esDecorate(null, null, _disabled_decorators, { kind: "field", name: "disabled", static: false, private: false, access: { has: obj => "disabled" in obj, get: obj => obj.disabled, set: (obj, value) => { obj.disabled = value; } }, metadata: _metadata }, _disabled_initializers, _disabled_extraInitializers);
|
|
199
|
-
__esDecorate(null, null, _change_decorators, { kind: "field", name: "change", static: false, private: false, access: { has: obj => "change" in obj, get: obj => obj.change, set: (obj, value) => { obj.change = value; } }, metadata: _metadata }, _change_initializers, _change_extraInitializers);
|
|
200
|
-
__esDecorate(null, null, _value_decorators, { kind: "field", name: "value", static: false, private: false, access: { has: obj => "value" in obj, get: obj => obj.value, set: (obj, value) => { obj.value = value; } }, metadata: _metadata }, _value_initializers, _value_extraInitializers);
|
|
201
|
-
__esDecorate(null, null, _options_decorators, { kind: "field", name: "options", static: false, private: false, access: { has: obj => "options" in obj, get: obj => obj.options, set: (obj, value) => { obj.options = value; } }, metadata: _metadata }, _options_initializers, _options_extraInitializers);
|
|
202
67
|
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
203
68
|
DuoyunRadioGroupElement = _classThis = _classDescriptor.value;
|
|
204
69
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
205
70
|
__runInitializers(_classThis, _classExtraInitializers);
|
|
206
71
|
}
|
|
207
|
-
orientation = __runInitializers(this, _orientation_initializers, void 0);
|
|
208
|
-
disabled = (__runInitializers(this, _orientation_extraInitializers), __runInitializers(this, _disabled_initializers, void 0));
|
|
209
|
-
change = (__runInitializers(this, _disabled_extraInitializers), __runInitializers(this, _change_initializers, void 0));
|
|
210
|
-
value = (__runInitializers(this, _change_extraInitializers), __runInitializers(this, _value_initializers, void 0));
|
|
211
|
-
options = (__runInitializers(this, _value_extraInitializers), __runInitializers(this, _options_initializers, void 0));
|
|
212
|
-
#onChange = (__runInitializers(this, _options_extraInitializers), (evt) => {
|
|
213
|
-
evt.stopPropagation();
|
|
214
|
-
this.change(evt.detail);
|
|
215
|
-
});
|
|
216
|
-
render = () => {
|
|
217
|
-
if (!this.options)
|
|
218
|
-
return null;
|
|
219
|
-
return html `${this.options.map(({ label, value }) => html `
|
|
220
|
-
<dy-radio
|
|
221
|
-
?disabled=${this.disabled}
|
|
222
|
-
.value=${value ?? label}
|
|
223
|
-
?checked=${(value ?? label) === this.value}
|
|
224
|
-
@change=${this.#onChange}
|
|
225
|
-
>
|
|
226
|
-
${label}
|
|
227
|
-
</dy-radio>
|
|
228
|
-
`)}`;
|
|
229
|
-
};
|
|
230
72
|
};
|
|
231
73
|
return DuoyunRadioGroupElement = _classThis;
|
|
232
74
|
})();
|
package/elements/radio.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio.js","sourceRoot":"","sources":["../src/elements/radio.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"radio.js","sourceRoot":"","sources":["../src/elements/radio.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAGtF,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;IAG9C,kBAAkB;4BAD9B,aAAa,CAAC,UAAU,CAAC;;;;sBACc,eAAe;kCAAvB,SAAQ,WAAe;;;;YAAvD,6KAA0D;;;YAA7C,uDAAkB;;;;;SAAlB,kBAAkB;IAGlB,uBAAuB;4BADnC,aAAa,CAAC,gBAAgB,CAAC;;;;sBACa,oBAAoB;uCAA5B,SAAQ,WAAoB;;;;YAAjE,6KAAoE;;;YAAvD,uDAAuB;;;;;SAAvB,uBAAuB"}
|
package/elements/rate.d.ts
CHANGED
|
@@ -1,14 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import './use';
|
|
4
|
-
export declare class DuoyunRateElement extends GemElement {
|
|
5
|
-
#private;
|
|
6
|
-
static star: string;
|
|
7
|
-
value: number;
|
|
8
|
-
total: number;
|
|
9
|
-
disabled: boolean;
|
|
10
|
-
readonly: boolean;
|
|
11
|
-
change: Emitter<number>;
|
|
12
|
-
render: () => import("@mantou/gem/lib/lit-html").TemplateResult;
|
|
1
|
+
import { TapRateElement } from '@mantou/tap-ui/elements/rate';
|
|
2
|
+
export declare class DuoyunRateElement extends TapRateElement {
|
|
13
3
|
}
|
|
14
4
|
//# sourceMappingURL=rate.d.ts.map
|
package/elements/rate.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rate.d.ts","sourceRoot":"","sources":["../src/elements/rate.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"rate.d.ts","sourceRoot":"","sources":["../src/elements/rate.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE9D,qBACa,iBAAkB,SAAQ,cAAc;CAAG"}
|
package/elements/rate.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
// https://spectrum.adobe.com/page/rating/
|
|
2
1
|
var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
3
2
|
function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
|
|
4
3
|
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
@@ -33,158 +32,21 @@ var __runInitializers = (this && this.__runInitializers) || function (thisArg, i
|
|
|
33
32
|
}
|
|
34
33
|
return useValue ? value : void 0;
|
|
35
34
|
};
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import { css, GemElement, html } from '@mantou/gem/lib/element';
|
|
39
|
-
import { classMap } from '@mantou/gem/lib/utils';
|
|
40
|
-
import { commonHandle } from '../lib/hotkeys';
|
|
41
|
-
import { icons } from '../lib/icons';
|
|
42
|
-
import { createDataURLFromSVG } from '../lib/image';
|
|
43
|
-
import { focusStyle } from '../lib/styles';
|
|
44
|
-
import { theme } from '../lib/theme';
|
|
45
|
-
import './use';
|
|
46
|
-
const starUrl = createDataURLFromSVG(icons.star);
|
|
47
|
-
const elementTheme = createDecoratorTheme({ color: '' });
|
|
48
|
-
const style = css `
|
|
49
|
-
:host(:where(:not([hidden]))) {
|
|
50
|
-
display: inline-flex;
|
|
51
|
-
flex-direction: row-reverse;
|
|
52
|
-
align-items: center;
|
|
53
|
-
color: ${theme.noticeColor};
|
|
54
|
-
}
|
|
55
|
-
:host([disabled]) {
|
|
56
|
-
color: ${theme.disabledColor};
|
|
57
|
-
pointer-events: none;
|
|
58
|
-
}
|
|
59
|
-
.icon {
|
|
60
|
-
width: 1.5em;
|
|
61
|
-
}
|
|
62
|
-
.icon:not(:last-child) {
|
|
63
|
-
padding-inline-start: 0.1em;
|
|
64
|
-
}
|
|
65
|
-
.icon + .icon {
|
|
66
|
-
padding-inline-end: 0.1em;
|
|
67
|
-
}
|
|
68
|
-
.icon::part(icon) {
|
|
69
|
-
fill: none;
|
|
70
|
-
stroke: currentColor;
|
|
71
|
-
stroke-width: 2px;
|
|
72
|
-
mask: url(${starUrl}) center / 100%;
|
|
73
|
-
transition: transform 0.1s ${theme.timingFunction};
|
|
74
|
-
}
|
|
75
|
-
.icon:active::part(icon) {
|
|
76
|
-
transform: scale(1.2);
|
|
77
|
-
}
|
|
78
|
-
:host(:where(:not(:hover), [readonly])) .fill::part(icon),
|
|
79
|
-
:host(:not([readonly])) .icon:hover::part(icon),
|
|
80
|
-
:host(:not([readonly])) .icon:hover ~ .icon::part(icon) {
|
|
81
|
-
fill: currentColor;
|
|
82
|
-
}
|
|
83
|
-
:host(:where(:not(:hover), [readonly])) .mask::part(icon) {
|
|
84
|
-
background-image: linear-gradient(to right, currentColor ${elementTheme.color}, transparent ${elementTheme.color});
|
|
85
|
-
}
|
|
86
|
-
`;
|
|
35
|
+
import { customElement } from '@mantou/gem/lib/decorators';
|
|
36
|
+
import { TapRateElement } from '@mantou/tap-ui/elements/rate';
|
|
87
37
|
let DuoyunRateElement = (() => {
|
|
88
|
-
let _classDecorators = [customElement('dy-rate')
|
|
38
|
+
let _classDecorators = [customElement('dy-rate')];
|
|
89
39
|
let _classDescriptor;
|
|
90
40
|
let _classExtraInitializers = [];
|
|
91
41
|
let _classThis;
|
|
92
|
-
let _classSuper =
|
|
93
|
-
let _static_star_decorators;
|
|
94
|
-
let _static_star_initializers = [];
|
|
95
|
-
let _static_star_extraInitializers = [];
|
|
96
|
-
let _value_decorators;
|
|
97
|
-
let _value_initializers = [];
|
|
98
|
-
let _value_extraInitializers = [];
|
|
99
|
-
let _total_decorators;
|
|
100
|
-
let _total_initializers = [];
|
|
101
|
-
let _total_extraInitializers = [];
|
|
102
|
-
let _disabled_decorators;
|
|
103
|
-
let _disabled_initializers = [];
|
|
104
|
-
let _disabled_extraInitializers = [];
|
|
105
|
-
let _readonly_decorators;
|
|
106
|
-
let _readonly_initializers = [];
|
|
107
|
-
let _readonly_extraInitializers = [];
|
|
108
|
-
let _change_decorators;
|
|
109
|
-
let _change_initializers = [];
|
|
110
|
-
let _change_extraInitializers = [];
|
|
111
|
-
let _private_updateAria_decorators;
|
|
112
|
-
let _private_updateAria_initializers = [];
|
|
113
|
-
let _private_updateAria_extraInitializers = [];
|
|
114
|
-
let _private_theme_decorators;
|
|
115
|
-
let _private_theme_initializers = [];
|
|
116
|
-
let _private_theme_extraInitializers = [];
|
|
42
|
+
let _classSuper = TapRateElement;
|
|
117
43
|
var DuoyunRateElement = class extends _classSuper {
|
|
118
44
|
static { _classThis = this; }
|
|
119
45
|
static {
|
|
120
46
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
121
|
-
_static_star_decorators = [part];
|
|
122
|
-
_value_decorators = [numattribute];
|
|
123
|
-
_total_decorators = [numattribute];
|
|
124
|
-
_disabled_decorators = [boolattribute];
|
|
125
|
-
_readonly_decorators = [boolattribute];
|
|
126
|
-
_change_decorators = [globalemitter];
|
|
127
|
-
_private_updateAria_decorators = [effect()];
|
|
128
|
-
_private_theme_decorators = [elementTheme()];
|
|
129
|
-
__esDecorate(null, null, _static_star_decorators, { kind: "field", name: "star", static: true, private: false, access: { has: obj => "star" in obj, get: obj => obj.star, set: (obj, value) => { obj.star = value; } }, metadata: _metadata }, _static_star_initializers, _static_star_extraInitializers);
|
|
130
|
-
__esDecorate(null, null, _value_decorators, { kind: "field", name: "value", static: false, private: false, access: { has: obj => "value" in obj, get: obj => obj.value, set: (obj, value) => { obj.value = value; } }, metadata: _metadata }, _value_initializers, _value_extraInitializers);
|
|
131
|
-
__esDecorate(null, null, _total_decorators, { kind: "field", name: "total", static: false, private: false, access: { has: obj => "total" in obj, get: obj => obj.total, set: (obj, value) => { obj.total = value; } }, metadata: _metadata }, _total_initializers, _total_extraInitializers);
|
|
132
|
-
__esDecorate(null, null, _disabled_decorators, { kind: "field", name: "disabled", static: false, private: false, access: { has: obj => "disabled" in obj, get: obj => obj.disabled, set: (obj, value) => { obj.disabled = value; } }, metadata: _metadata }, _disabled_initializers, _disabled_extraInitializers);
|
|
133
|
-
__esDecorate(null, null, _readonly_decorators, { kind: "field", name: "readonly", static: false, private: false, access: { has: obj => "readonly" in obj, get: obj => obj.readonly, set: (obj, value) => { obj.readonly = value; } }, metadata: _metadata }, _readonly_initializers, _readonly_extraInitializers);
|
|
134
|
-
__esDecorate(null, null, _change_decorators, { kind: "field", name: "change", static: false, private: false, access: { has: obj => "change" in obj, get: obj => obj.change, set: (obj, value) => { obj.change = value; } }, metadata: _metadata }, _change_initializers, _change_extraInitializers);
|
|
135
|
-
__esDecorate(null, null, _private_updateAria_decorators, { kind: "field", name: "#updateAria", static: false, private: true, access: { has: obj => #updateAria in obj, get: obj => obj.#updateAria, set: (obj, value) => { obj.#updateAria = value; } }, metadata: _metadata }, _private_updateAria_initializers, _private_updateAria_extraInitializers);
|
|
136
|
-
__esDecorate(null, null, _private_theme_decorators, { kind: "field", name: "#theme", static: false, private: true, access: { has: obj => #theme in obj, get: obj => obj.#theme, set: (obj, value) => { obj.#theme = value; } }, metadata: _metadata }, _private_theme_initializers, _private_theme_extraInitializers);
|
|
137
47
|
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
138
48
|
DuoyunRateElement = _classThis = _classDescriptor.value;
|
|
139
49
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
140
|
-
}
|
|
141
|
-
static star = __runInitializers(_classThis, _static_star_initializers, void 0);
|
|
142
|
-
value = __runInitializers(this, _value_initializers, void 0);
|
|
143
|
-
total = (__runInitializers(this, _value_extraInitializers), __runInitializers(this, _total_initializers, void 0));
|
|
144
|
-
disabled = (__runInitializers(this, _total_extraInitializers), __runInitializers(this, _disabled_initializers, void 0));
|
|
145
|
-
readonly = (__runInitializers(this, _disabled_extraInitializers), __runInitializers(this, _readonly_initializers, void 0));
|
|
146
|
-
change = (__runInitializers(this, _readonly_extraInitializers), __runInitializers(this, _change_initializers, void 0));
|
|
147
|
-
get #total() {
|
|
148
|
-
return this.total || 5;
|
|
149
|
-
}
|
|
150
|
-
get #ratio() {
|
|
151
|
-
const origin = this.value % 1;
|
|
152
|
-
const offset = 0.2;
|
|
153
|
-
return offset + (1 - 2 * offset) * origin;
|
|
154
|
-
}
|
|
155
|
-
#onClick = (__runInitializers(this, _change_extraInitializers), (score) => {
|
|
156
|
-
if (this.readonly)
|
|
157
|
-
return;
|
|
158
|
-
this.change(score);
|
|
159
|
-
});
|
|
160
|
-
#updateAria = __runInitializers(this, _private_updateAria_initializers, () => {
|
|
161
|
-
this.internals.ariaDisabled = String(this.disabled);
|
|
162
|
-
this.internals.ariaLabel = `${this.value}/${this.total}`;
|
|
163
|
-
this.internals.ariaValueMax = String(this.#total);
|
|
164
|
-
this.internals.ariaValueNow = String(this.value);
|
|
165
|
-
});
|
|
166
|
-
#theme = (__runInitializers(this, _private_updateAria_extraInitializers), __runInitializers(this, _private_theme_initializers, () => ({ color: `${this.#ratio * 100}%` })));
|
|
167
|
-
render = (__runInitializers(this, _private_theme_extraInitializers), () => {
|
|
168
|
-
return html `
|
|
169
|
-
${Array.from({ length: this.#total }, (_, index) => html `
|
|
170
|
-
<dy-use
|
|
171
|
-
part=${DuoyunRateElement.star}
|
|
172
|
-
class=${classMap({
|
|
173
|
-
icon: true,
|
|
174
|
-
fill: this.value >= this.#total - index,
|
|
175
|
-
mask: this.value < this.#total - index && this.value > this.#total - 1 - index,
|
|
176
|
-
})}
|
|
177
|
-
tabindex=${-Number(this.disabled)}
|
|
178
|
-
aria-disabled=${this.disabled}
|
|
179
|
-
@keydown=${commonHandle}
|
|
180
|
-
@click=${() => this.#onClick(this.#total - index)}
|
|
181
|
-
.element=${icons.star}
|
|
182
|
-
></dy-use>
|
|
183
|
-
`)}
|
|
184
|
-
`;
|
|
185
|
-
});
|
|
186
|
-
static {
|
|
187
|
-
__runInitializers(_classThis, _static_star_extraInitializers);
|
|
188
50
|
__runInitializers(_classThis, _classExtraInitializers);
|
|
189
51
|
}
|
|
190
52
|
};
|
package/elements/rate.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rate.js","sourceRoot":"","sources":["../src/elements/rate.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"rate.js","sourceRoot":"","sources":["../src/elements/rate.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;IAGjD,iBAAiB;4BAD7B,aAAa,CAAC,SAAS,CAAC;;;;sBACc,cAAc;iCAAtB,SAAQ,WAAc;;;;YAArD,6KAAwD;;;YAA3C,uDAAiB;;;;;SAAjB,iBAAiB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rolling-number.d.ts","sourceRoot":"","sources":["../src/elements/rolling-number.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AAEjF,qBACa,0BAA2B,SAAQ,uBAAuB;CAAG"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
2
|
+
function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
|
|
3
|
+
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
4
|
+
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
5
|
+
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
6
|
+
var _, done = false;
|
|
7
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
8
|
+
var context = {};
|
|
9
|
+
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
10
|
+
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
11
|
+
context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
|
|
12
|
+
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
13
|
+
if (kind === "accessor") {
|
|
14
|
+
if (result === void 0) continue;
|
|
15
|
+
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
16
|
+
if (_ = accept(result.get)) descriptor.get = _;
|
|
17
|
+
if (_ = accept(result.set)) descriptor.set = _;
|
|
18
|
+
if (_ = accept(result.init)) initializers.unshift(_);
|
|
19
|
+
}
|
|
20
|
+
else if (_ = accept(result)) {
|
|
21
|
+
if (kind === "field") initializers.unshift(_);
|
|
22
|
+
else descriptor[key] = _;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
26
|
+
done = true;
|
|
27
|
+
};
|
|
28
|
+
var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
|
|
29
|
+
var useValue = arguments.length > 2;
|
|
30
|
+
for (var i = 0; i < initializers.length; i++) {
|
|
31
|
+
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
32
|
+
}
|
|
33
|
+
return useValue ? value : void 0;
|
|
34
|
+
};
|
|
35
|
+
import { customElement } from '@mantou/gem/lib/decorators';
|
|
36
|
+
import { TapRollingNumberElement } from '@mantou/tap-ui/elements/rolling-number';
|
|
37
|
+
let DuoyunRollingNumberElement = (() => {
|
|
38
|
+
let _classDecorators = [customElement('dy-rolling-number')];
|
|
39
|
+
let _classDescriptor;
|
|
40
|
+
let _classExtraInitializers = [];
|
|
41
|
+
let _classThis;
|
|
42
|
+
let _classSuper = TapRollingNumberElement;
|
|
43
|
+
var DuoyunRollingNumberElement = class extends _classSuper {
|
|
44
|
+
static { _classThis = this; }
|
|
45
|
+
static {
|
|
46
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
47
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
48
|
+
DuoyunRollingNumberElement = _classThis = _classDescriptor.value;
|
|
49
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
50
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
return DuoyunRollingNumberElement = _classThis;
|
|
54
|
+
})();
|
|
55
|
+
export { DuoyunRollingNumberElement };
|
|
56
|
+
//# sourceMappingURL=rolling-number.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rolling-number.js","sourceRoot":"","sources":["../src/elements/rolling-number.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;IAGpE,0BAA0B;4BADtC,aAAa,CAAC,mBAAmB,CAAC;;;;sBACa,uBAAuB;0CAA/B,SAAQ,WAAuB;;;;YAAvE,6KAA0E;;;YAA7D,uDAA0B;;;;;SAA1B,0BAA0B"}
|
package/elements/scroll-box.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare class DuoyunScrollBoxElement extends
|
|
1
|
+
import { TapScrollBoxElement } from '@mantou/tap-ui/elements/scroll-box';
|
|
2
|
+
export declare class DuoyunScrollBoxElement extends TapScrollBoxElement {
|
|
3
3
|
}
|
|
4
4
|
//# sourceMappingURL=scroll-box.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scroll-box.d.ts","sourceRoot":"","sources":["../src/elements/scroll-box.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"scroll-box.d.ts","sourceRoot":"","sources":["../src/elements/scroll-box.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AAEzE,qBACa,sBAAuB,SAAQ,mBAAmB;CAAG"}
|
package/elements/scroll-box.js
CHANGED
|
@@ -32,15 +32,14 @@ var __runInitializers = (this && this.__runInitializers) || function (thisArg, i
|
|
|
32
32
|
}
|
|
33
33
|
return useValue ? value : void 0;
|
|
34
34
|
};
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import { DuoyunScrollBaseElement } from './base/scroll';
|
|
35
|
+
import { customElement } from '@mantou/gem/lib/decorators';
|
|
36
|
+
import { TapScrollBoxElement } from '@mantou/tap-ui/elements/scroll-box';
|
|
38
37
|
let DuoyunScrollBoxElement = (() => {
|
|
39
|
-
let _classDecorators = [customElement('dy-scroll-box')
|
|
38
|
+
let _classDecorators = [customElement('dy-scroll-box')];
|
|
40
39
|
let _classDescriptor;
|
|
41
40
|
let _classExtraInitializers = [];
|
|
42
41
|
let _classThis;
|
|
43
|
-
let _classSuper =
|
|
42
|
+
let _classSuper = TapScrollBoxElement;
|
|
44
43
|
var DuoyunScrollBoxElement = class extends _classSuper {
|
|
45
44
|
static { _classThis = this; }
|
|
46
45
|
static {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scroll-box.js","sourceRoot":"","sources":["../src/elements/scroll-box.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"scroll-box.js","sourceRoot":"","sources":["../src/elements/scroll-box.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;IAG5D,sBAAsB;4BADlC,aAAa,CAAC,eAAe,CAAC;;;;sBACa,mBAAmB;sCAA3B,SAAQ,WAAmB;;;;YAA/D,6KAAkE;;;YAArD,uDAAsB;;;;;SAAtB,sBAAsB"}
|
package/elements/segmented.d.ts
CHANGED
|
@@ -1,22 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import './use';
|
|
5
|
-
export interface SegmentedOption<T = any> extends Option<T> {
|
|
6
|
-
icon?: string | Element | DocumentFragment;
|
|
7
|
-
}
|
|
8
|
-
export declare class DuoyunSegmentedElement extends GemElement {
|
|
9
|
-
#private;
|
|
10
|
-
static segment: string;
|
|
11
|
-
static icon: string;
|
|
12
|
-
static marker: string;
|
|
13
|
-
static current: string;
|
|
14
|
-
disabled: boolean;
|
|
15
|
-
small: boolean;
|
|
16
|
-
animating: boolean;
|
|
17
|
-
options?: SegmentedOption[];
|
|
18
|
-
value?: any;
|
|
19
|
-
change: Emitter<any>;
|
|
20
|
-
render: () => import("@mantou/gem/lib/lit-html").TemplateResult;
|
|
1
|
+
import { TapSegmentedElement } from '@mantou/tap-ui/elements/segmented';
|
|
2
|
+
export type { SegmentedOption } from '@mantou/tap-ui/elements/segmented';
|
|
3
|
+
export declare class DuoyunSegmentedElement extends TapSegmentedElement {
|
|
21
4
|
}
|
|
22
5
|
//# sourceMappingURL=segmented.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"segmented.d.ts","sourceRoot":"","sources":["../src/elements/segmented.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"segmented.d.ts","sourceRoot":"","sources":["../src/elements/segmented.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AAExE,YAAY,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AAEzE,qBACa,sBAAuB,SAAQ,mBAAmB;CAAG"}
|