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/options.d.ts
CHANGED
|
@@ -1,34 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export type Option = {
|
|
6
|
-
label: string | TemplateResult;
|
|
7
|
-
icon?: string | DocumentFragment | Element;
|
|
8
|
-
tag?: string | TemplateResult;
|
|
9
|
-
tagIcon?: string | DocumentFragment | Element;
|
|
10
|
-
description?: string | TemplateResult;
|
|
11
|
-
disabled?: boolean;
|
|
12
|
-
danger?: boolean;
|
|
13
|
-
highlight?: boolean;
|
|
14
|
-
onClick?: (evt: MouseEvent) => void;
|
|
15
|
-
onRemove?: (evt: MouseEvent) => void;
|
|
16
|
-
onPointerEnter?: (evt: PointerEvent) => void;
|
|
17
|
-
onPointerLeave?: (evt: PointerEvent) => void;
|
|
18
|
-
onPointerDown?: (evt: PointerEvent) => void;
|
|
19
|
-
onPointerUp?: (evt: PointerEvent) => void;
|
|
20
|
-
};
|
|
21
|
-
export type Adder = {
|
|
22
|
-
text?: string;
|
|
23
|
-
handle: (value: string) => any;
|
|
24
|
-
};
|
|
25
|
-
export declare const SEPARATOR = "---";
|
|
26
|
-
export declare class DuoyunOptionsElement extends GemElement {
|
|
27
|
-
#private;
|
|
28
|
-
static unnamed: string;
|
|
29
|
-
searchable: boolean;
|
|
30
|
-
options?: Option[];
|
|
31
|
-
adder?: Adder;
|
|
32
|
-
render: () => TemplateResult;
|
|
1
|
+
import { TapOptionsElement } from '@mantou/tap-ui/elements/options';
|
|
2
|
+
export type { Adder, Option } from '@mantou/tap-ui/elements/options';
|
|
3
|
+
export { SEPARATOR } from '@mantou/tap-ui/elements/options';
|
|
4
|
+
export declare class DuoyunOptionsElement extends TapOptionsElement {
|
|
33
5
|
}
|
|
34
6
|
//# sourceMappingURL=options.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../src/elements/options.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../src/elements/options.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAEpE,YAAY,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAE5D,qBACa,oBAAqB,SAAQ,iBAAiB;CAAG"}
|
package/elements/options.js
CHANGED
|
@@ -32,271 +32,22 @@ 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, hotkeys } from '../lib/hotkeys';
|
|
39
|
-
import { icons } from '../lib/icons';
|
|
40
|
-
import { locale } from '../lib/locale';
|
|
41
|
-
import { focusStyle } from '../lib/styles';
|
|
42
|
-
import { theme } from '../lib/theme';
|
|
43
|
-
import { isIncludesString } from '../lib/utils';
|
|
44
|
-
import './use';
|
|
45
|
-
import './input';
|
|
46
|
-
const style = css `
|
|
47
|
-
:host(:where(:not([hidden]))) {
|
|
48
|
-
cursor: default;
|
|
49
|
-
font-size: 0.875em;
|
|
50
|
-
display: flex;
|
|
51
|
-
flex-direction: column;
|
|
52
|
-
padding-block: 0.4em;
|
|
53
|
-
color: ${theme.textColor};
|
|
54
|
-
background: ${theme.backgroundColor};
|
|
55
|
-
border: 1px solid ${theme.borderColor};
|
|
56
|
-
box-sizing: border-box;
|
|
57
|
-
border-radius: ${theme.normalRound};
|
|
58
|
-
overflow: auto;
|
|
59
|
-
scrollbar-width: thin;
|
|
60
|
-
overscroll-behavior: contain;
|
|
61
|
-
}
|
|
62
|
-
.search {
|
|
63
|
-
padding: 0.4em 1em;
|
|
64
|
-
}
|
|
65
|
-
.input {
|
|
66
|
-
width: 100%;
|
|
67
|
-
}
|
|
68
|
-
.item {
|
|
69
|
-
line-height: 1.5;
|
|
70
|
-
padding: 0.4em 1em;
|
|
71
|
-
display: flex;
|
|
72
|
-
align-items: center;
|
|
73
|
-
gap: 0.5em;
|
|
74
|
-
}
|
|
75
|
-
.value {
|
|
76
|
-
flex-grow: 1;
|
|
77
|
-
flex-shrink: 1;
|
|
78
|
-
min-width: 0;
|
|
79
|
-
}
|
|
80
|
-
.tag {
|
|
81
|
-
flex-shrink: 0;
|
|
82
|
-
}
|
|
83
|
-
.tag > * {
|
|
84
|
-
margin: 0;
|
|
85
|
-
}
|
|
86
|
-
.label,
|
|
87
|
-
.description {
|
|
88
|
-
overflow: hidden;
|
|
89
|
-
white-space: nowrap;
|
|
90
|
-
text-overflow: ellipsis;
|
|
91
|
-
}
|
|
92
|
-
.description {
|
|
93
|
-
font-size: 0.875em;
|
|
94
|
-
opacity: 0.7;
|
|
95
|
-
}
|
|
96
|
-
.item:where(:hover),
|
|
97
|
-
.highlight {
|
|
98
|
-
color: ${theme.highlightColor};
|
|
99
|
-
}
|
|
100
|
-
.item:not(.add):hover,
|
|
101
|
-
.highlight {
|
|
102
|
-
background-color: ${theme.lightBackgroundColor};
|
|
103
|
-
}
|
|
104
|
-
.add {
|
|
105
|
-
padding-block: 0;
|
|
106
|
-
}
|
|
107
|
-
.delete:not(:hover) .icon.action {
|
|
108
|
-
display: none;
|
|
109
|
-
}
|
|
110
|
-
.add-input {
|
|
111
|
-
height: calc(1.5em + 2 * 0.4em);
|
|
112
|
-
font-size: 1em;
|
|
113
|
-
border: none;
|
|
114
|
-
padding: 0;
|
|
115
|
-
border-radius: 0;
|
|
116
|
-
width: 100%;
|
|
117
|
-
}
|
|
118
|
-
.add-input::part(input) {
|
|
119
|
-
padding: 0;
|
|
120
|
-
}
|
|
121
|
-
.danger {
|
|
122
|
-
color: ${theme.negativeColor};
|
|
123
|
-
}
|
|
124
|
-
.disabled {
|
|
125
|
-
opacity: 0.7;
|
|
126
|
-
color: ${theme.describeColor};
|
|
127
|
-
}
|
|
128
|
-
.icon {
|
|
129
|
-
flex-shrink: 0;
|
|
130
|
-
position: relative;
|
|
131
|
-
width: 1.2em;
|
|
132
|
-
padding: 0.3em;
|
|
133
|
-
margin: -0.3em;
|
|
134
|
-
border-radius: ${theme.normalRound};
|
|
135
|
-
}
|
|
136
|
-
.action:hover {
|
|
137
|
-
background: ${theme.hoverBackgroundColor};
|
|
138
|
-
}
|
|
139
|
-
.separator {
|
|
140
|
-
background: ${theme.borderColor};
|
|
141
|
-
flex-shrink: 0;
|
|
142
|
-
height: 1px;
|
|
143
|
-
margin: 1px 1em;
|
|
144
|
-
}
|
|
145
|
-
dy-tag {
|
|
146
|
-
padding-block: 0;
|
|
147
|
-
}
|
|
148
|
-
`;
|
|
149
|
-
export const SEPARATOR = '---';
|
|
35
|
+
import { customElement } from '@mantou/gem/lib/decorators';
|
|
36
|
+
import { TapOptionsElement } from '@mantou/tap-ui/elements/options';
|
|
37
|
+
export { SEPARATOR } from '@mantou/tap-ui/elements/options';
|
|
150
38
|
let DuoyunOptionsElement = (() => {
|
|
151
|
-
let _classDecorators = [customElement('dy-options')
|
|
39
|
+
let _classDecorators = [customElement('dy-options')];
|
|
152
40
|
let _classDescriptor;
|
|
153
41
|
let _classExtraInitializers = [];
|
|
154
42
|
let _classThis;
|
|
155
|
-
let _classSuper =
|
|
156
|
-
let _static_unnamed_decorators;
|
|
157
|
-
let _static_unnamed_initializers = [];
|
|
158
|
-
let _static_unnamed_extraInitializers = [];
|
|
159
|
-
let _searchable_decorators;
|
|
160
|
-
let _searchable_initializers = [];
|
|
161
|
-
let _searchable_extraInitializers = [];
|
|
162
|
-
let _options_decorators;
|
|
163
|
-
let _options_initializers = [];
|
|
164
|
-
let _options_extraInitializers = [];
|
|
165
|
-
let _adder_decorators;
|
|
166
|
-
let _adder_initializers = [];
|
|
167
|
-
let _adder_extraInitializers = [];
|
|
43
|
+
let _classSuper = TapOptionsElement;
|
|
168
44
|
var DuoyunOptionsElement = class extends _classSuper {
|
|
169
45
|
static { _classThis = this; }
|
|
170
46
|
static {
|
|
171
47
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
172
|
-
_static_unnamed_decorators = [slot];
|
|
173
|
-
_searchable_decorators = [boolattribute];
|
|
174
|
-
_options_decorators = [property];
|
|
175
|
-
_adder_decorators = [property];
|
|
176
|
-
__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);
|
|
177
|
-
__esDecorate(null, null, _searchable_decorators, { kind: "field", name: "searchable", static: false, private: false, access: { has: obj => "searchable" in obj, get: obj => obj.searchable, set: (obj, value) => { obj.searchable = value; } }, metadata: _metadata }, _searchable_initializers, _searchable_extraInitializers);
|
|
178
|
-
__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);
|
|
179
|
-
__esDecorate(null, null, _adder_decorators, { kind: "field", name: "adder", static: false, private: false, access: { has: obj => "adder" in obj, get: obj => obj.adder, set: (obj, value) => { obj.adder = value; } }, metadata: _metadata }, _adder_initializers, _adder_extraInitializers);
|
|
180
48
|
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
181
49
|
DuoyunOptionsElement = _classThis = _classDescriptor.value;
|
|
182
50
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
183
|
-
}
|
|
184
|
-
static unnamed = __runInitializers(_classThis, _static_unnamed_initializers, void 0);
|
|
185
|
-
searchable = __runInitializers(this, _searchable_initializers, void 0);
|
|
186
|
-
options = (__runInitializers(this, _searchable_extraInitializers), __runInitializers(this, _options_initializers, void 0));
|
|
187
|
-
adder = (__runInitializers(this, _options_extraInitializers), __runInitializers(this, _adder_initializers, void 0));
|
|
188
|
-
#state = (__runInitializers(this, _adder_extraInitializers), createState({
|
|
189
|
-
search: '',
|
|
190
|
-
addValue: '',
|
|
191
|
-
}));
|
|
192
|
-
#onSearch = ({ detail }) => {
|
|
193
|
-
this.#state({ search: detail });
|
|
194
|
-
};
|
|
195
|
-
#onAdd = async () => {
|
|
196
|
-
if (!this.#state.addValue)
|
|
197
|
-
return;
|
|
198
|
-
await this.adder.handle?.(this.#state.addValue);
|
|
199
|
-
this.#state({ addValue: '' });
|
|
200
|
-
};
|
|
201
|
-
#onRemove = (evt, onRemove) => {
|
|
202
|
-
evt.stopPropagation();
|
|
203
|
-
onRemove(evt);
|
|
204
|
-
};
|
|
205
|
-
#stopPropagation = (evt) => evt.stopPropagation();
|
|
206
|
-
#onAdderKeyDown = hotkeys({
|
|
207
|
-
enter: this.#onAdd,
|
|
208
|
-
esc: () => ({}),
|
|
209
|
-
onUncapture: this.#stopPropagation,
|
|
210
|
-
});
|
|
211
|
-
render = () => {
|
|
212
|
-
const { search } = this.#state;
|
|
213
|
-
const options = search
|
|
214
|
-
? this.options?.filter(({ label, description = '' }) => isIncludesString(html `${label}${description}`, search))
|
|
215
|
-
: this.options;
|
|
216
|
-
return html `
|
|
217
|
-
<slot></slot>
|
|
218
|
-
<div v-if=${this.searchable} class="search">
|
|
219
|
-
<dy-input
|
|
220
|
-
class="input"
|
|
221
|
-
type="search"
|
|
222
|
-
.icon=${icons.search}
|
|
223
|
-
.placeholder=${locale.search}
|
|
224
|
-
value=${search}
|
|
225
|
-
@change=${this.#onSearch}
|
|
226
|
-
></dy-input>
|
|
227
|
-
</div>
|
|
228
|
-
<div
|
|
229
|
-
v-if=${!!this.adder}
|
|
230
|
-
role="option"
|
|
231
|
-
tabindex="0"
|
|
232
|
-
class=${classMap({ item: true, add: true })}
|
|
233
|
-
@pointerup=${this.#stopPropagation}
|
|
234
|
-
@keydown=${commonHandle}
|
|
235
|
-
>
|
|
236
|
-
<div class="value">
|
|
237
|
-
<div class="label">
|
|
238
|
-
<dy-input
|
|
239
|
-
class="add-input"
|
|
240
|
-
.value=${this.#state.addValue}
|
|
241
|
-
.placeholder=${this.adder?.text || locale.add}
|
|
242
|
-
@change=${({ detail: addValue }) => this.#state({ addValue })}
|
|
243
|
-
@keydown=${this.#onAdderKeyDown}
|
|
244
|
-
></dy-input>
|
|
245
|
-
</div>
|
|
246
|
-
</div>
|
|
247
|
-
<dy-use
|
|
248
|
-
role="button"
|
|
249
|
-
tabindex="0"
|
|
250
|
-
class="icon action"
|
|
251
|
-
.element=${icons.add}
|
|
252
|
-
@click=${this.#onAdd}
|
|
253
|
-
@keydown=${commonHandle}
|
|
254
|
-
></dy-use>
|
|
255
|
-
</div>
|
|
256
|
-
${(search && options?.length === 0 ? [{ label: locale.noData, disabled: true }] : options)?.map(({ label, tag = '', tagIcon, description, disabled = false, danger, highlight = false, icon, onPointerEnter, onPointerLeave, onPointerDown, onPointerUp, onClick, onRemove, }) => {
|
|
257
|
-
return label === SEPARATOR
|
|
258
|
-
? html `<div class="separator"></div>`
|
|
259
|
-
: html `
|
|
260
|
-
<div
|
|
261
|
-
role="option"
|
|
262
|
-
tabindex="0"
|
|
263
|
-
aria-readonly=${disabled}
|
|
264
|
-
aria-selected=${highlight}
|
|
265
|
-
class=${classMap({
|
|
266
|
-
item: true,
|
|
267
|
-
disabled: !!disabled,
|
|
268
|
-
danger: !!danger,
|
|
269
|
-
highlight: !!highlight,
|
|
270
|
-
delete: !!onRemove,
|
|
271
|
-
})}
|
|
272
|
-
@pointerenter=${onPointerEnter}
|
|
273
|
-
@pointerleave=${onPointerLeave}
|
|
274
|
-
@pointerdown=${onPointerDown}
|
|
275
|
-
@pointerup=${onPointerUp}
|
|
276
|
-
@click=${onClick}
|
|
277
|
-
@keydown=${commonHandle}
|
|
278
|
-
>
|
|
279
|
-
<dy-use v-if=${!!icon} class="icon" .element=${icon}></dy-use>
|
|
280
|
-
<div class="value">
|
|
281
|
-
<div class="label">${label}</div>
|
|
282
|
-
<div class="description">${description}</div>
|
|
283
|
-
</div>
|
|
284
|
-
<div v-if=${!!tag} class="tag">${tag}</div>
|
|
285
|
-
<dy-use v-if=${!!tagIcon} class="icon" .element=${tagIcon}></dy-use>
|
|
286
|
-
<dy-use
|
|
287
|
-
v-if=${!!onRemove}
|
|
288
|
-
class="icon action"
|
|
289
|
-
.element=${icons.delete}
|
|
290
|
-
@pointerup=${this.#stopPropagation}
|
|
291
|
-
@click=${(evt) => onRemove && this.#onRemove(evt, onRemove)}
|
|
292
|
-
></dy-use>
|
|
293
|
-
</div>
|
|
294
|
-
`;
|
|
295
|
-
})}
|
|
296
|
-
`;
|
|
297
|
-
};
|
|
298
|
-
static {
|
|
299
|
-
__runInitializers(_classThis, _static_unnamed_extraInitializers);
|
|
300
51
|
__runInitializers(_classThis, _classExtraInitializers);
|
|
301
52
|
}
|
|
302
53
|
};
|
package/elements/options.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"options.js","sourceRoot":"","sources":["../src/elements/options.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"options.js","sourceRoot":"","sources":["../src/elements/options.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAGpE,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;IAG/C,oBAAoB;4BADhC,aAAa,CAAC,YAAY,CAAC;;;;sBACc,iBAAiB;oCAAzB,SAAQ,WAAiB;;;;YAA3D,6KAA8D;;;YAAjD,uDAAoB;;;;;SAApB,oBAAoB"}
|
package/elements/page-loadbar.js
CHANGED
|
@@ -46,7 +46,7 @@ const style = css `
|
|
|
46
46
|
display: flex;
|
|
47
47
|
justify-content: flex-end;
|
|
48
48
|
align-items: flex-end;
|
|
49
|
-
top:
|
|
49
|
+
top: var(--titlebar-area-height, env(titlebar-area-height, 0px));
|
|
50
50
|
left: 0;
|
|
51
51
|
height: 2px;
|
|
52
52
|
transition: width 0.3s;
|
package/elements/paragraph.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare class DuoyunParagraphElement extends
|
|
1
|
+
import { TapParagraphElement } from '@mantou/tap-ui/elements/paragraph';
|
|
2
|
+
export declare class DuoyunParagraphElement extends TapParagraphElement {
|
|
3
3
|
}
|
|
4
4
|
//# sourceMappingURL=paragraph.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paragraph.d.ts","sourceRoot":"","sources":["../src/elements/paragraph.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"paragraph.d.ts","sourceRoot":"","sources":["../src/elements/paragraph.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AAExE,qBACa,sBAAuB,SAAQ,mBAAmB;CAAG"}
|
package/elements/paragraph.js
CHANGED
|
@@ -32,55 +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 { theme } from '../lib/theme';
|
|
38
|
-
const style = css `
|
|
39
|
-
:where(:scope:not([hidden])) {
|
|
40
|
-
display: block;
|
|
41
|
-
margin-block-end: 0.75em;
|
|
42
|
-
line-height: 1.5;
|
|
43
|
-
|
|
44
|
-
&:where(:lang(zh), :lang(ja), :lang(kr)) {
|
|
45
|
-
line-height: 1.7;
|
|
46
|
-
|
|
47
|
-
:where(gem-link, dy-link, a[href]) {
|
|
48
|
-
text-underline-offset: 0.125em;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
:where(gem-link, dy-link, a[href]) {
|
|
53
|
-
color: ${theme.primaryColor};
|
|
54
|
-
text-decoration: underline;
|
|
55
|
-
|
|
56
|
-
&:where(:not([hidden])) {
|
|
57
|
-
display: inline-block;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
code,
|
|
61
|
-
kbd {
|
|
62
|
-
font-family: ${theme.codeFont};
|
|
63
|
-
margin-inline: 0.2em;
|
|
64
|
-
padding: 0.15em 0.4em 0.1em;
|
|
65
|
-
font-size: 0.9em;
|
|
66
|
-
border: 1px solid ${theme.borderColor};
|
|
67
|
-
border-radius: ${theme.smallRound};
|
|
68
|
-
}
|
|
69
|
-
code {
|
|
70
|
-
background: ${theme.hoverBackgroundColor};
|
|
71
|
-
}
|
|
72
|
-
kbd {
|
|
73
|
-
background: ${theme.lightBackgroundColor};
|
|
74
|
-
border-bottom-width: 2px;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
`;
|
|
35
|
+
import { customElement } from '@mantou/gem/lib/decorators';
|
|
36
|
+
import { TapParagraphElement } from '@mantou/tap-ui/elements/paragraph';
|
|
78
37
|
let DuoyunParagraphElement = (() => {
|
|
79
|
-
let _classDecorators = [customElement('dy-paragraph')
|
|
38
|
+
let _classDecorators = [customElement('dy-paragraph')];
|
|
80
39
|
let _classDescriptor;
|
|
81
40
|
let _classExtraInitializers = [];
|
|
82
41
|
let _classThis;
|
|
83
|
-
let _classSuper =
|
|
42
|
+
let _classSuper = TapParagraphElement;
|
|
84
43
|
var DuoyunParagraphElement = class extends _classSuper {
|
|
85
44
|
static { _classThis = this; }
|
|
86
45
|
static {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paragraph.js","sourceRoot":"","sources":["../src/elements/paragraph.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"paragraph.js","sourceRoot":"","sources":["../src/elements/paragraph.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;IAG3D,sBAAsB;4BADlC,aAAa,CAAC,cAAc,CAAC;;;;sBACc,mBAAmB;sCAA3B,SAAQ,WAAmB;;;;YAA/D,6KAAkE;;;YAArD,uDAAsB;;;;;SAAtB,sBAAsB"}
|
|
@@ -1,16 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare class DuoyunPlaceholderElement extends
|
|
3
|
-
#private;
|
|
4
|
-
static line: string;
|
|
5
|
-
/**@deprecated */
|
|
6
|
-
mode: 'single' | 'multi';
|
|
7
|
-
type: 'single' | 'multi';
|
|
8
|
-
center: boolean;
|
|
9
|
-
/**% */
|
|
10
|
-
width: string;
|
|
11
|
-
color: string;
|
|
12
|
-
maxLine: number;
|
|
13
|
-
minLine: number;
|
|
14
|
-
render: () => import("@mantou/gem/lib/lit-html").TemplateResult;
|
|
1
|
+
import { TapPlaceholderElement } from '@mantou/tap-ui/elements/placeholder';
|
|
2
|
+
export declare class DuoyunPlaceholderElement extends TapPlaceholderElement {
|
|
15
3
|
}
|
|
16
4
|
//# sourceMappingURL=placeholder.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"placeholder.d.ts","sourceRoot":"","sources":["../src/elements/placeholder.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"placeholder.d.ts","sourceRoot":"","sources":["../src/elements/placeholder.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAE5E,qBACa,wBAAyB,SAAQ,qBAAqB;CAAG"}
|
package/elements/placeholder.js
CHANGED
|
@@ -32,131 +32,21 @@ 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 { css, html } from '@mantou/gem/lib/element';
|
|
38
|
-
import { styleMap } from '@mantou/gem/lib/utils';
|
|
39
|
-
import { theme } from '../lib/theme';
|
|
40
|
-
import { DuoyunVisibleBaseElement } from './base/visible';
|
|
41
|
-
const elementTheme = createDecoratorTheme({ color: '' });
|
|
42
|
-
const style = css `
|
|
43
|
-
:host(:where(:not([hidden]))) {
|
|
44
|
-
display: block;
|
|
45
|
-
flex-grow: 1;
|
|
46
|
-
}
|
|
47
|
-
:host(:where(:not([hidden], [type='multi'], [mode='multi']))) {
|
|
48
|
-
display: flex;
|
|
49
|
-
align-content: center;
|
|
50
|
-
}
|
|
51
|
-
:host([center]) {
|
|
52
|
-
justify-content: center;
|
|
53
|
-
}
|
|
54
|
-
.content {
|
|
55
|
-
background-image: linear-gradient(${elementTheme.color}, ${elementTheme.color});
|
|
56
|
-
background-position-y: center;
|
|
57
|
-
background-size: 100% 1em;
|
|
58
|
-
background-repeat: no-repeat;
|
|
59
|
-
}
|
|
60
|
-
`;
|
|
35
|
+
import { customElement } from '@mantou/gem/lib/decorators';
|
|
36
|
+
import { TapPlaceholderElement } from '@mantou/tap-ui/elements/placeholder';
|
|
61
37
|
let DuoyunPlaceholderElement = (() => {
|
|
62
|
-
let _classDecorators = [customElement('dy-placeholder')
|
|
38
|
+
let _classDecorators = [customElement('dy-placeholder')];
|
|
63
39
|
let _classDescriptor;
|
|
64
40
|
let _classExtraInitializers = [];
|
|
65
41
|
let _classThis;
|
|
66
|
-
let _classSuper =
|
|
67
|
-
let _static_line_decorators;
|
|
68
|
-
let _static_line_initializers = [];
|
|
69
|
-
let _static_line_extraInitializers = [];
|
|
70
|
-
let _mode_decorators;
|
|
71
|
-
let _mode_initializers = [];
|
|
72
|
-
let _mode_extraInitializers = [];
|
|
73
|
-
let _type_decorators;
|
|
74
|
-
let _type_initializers = [];
|
|
75
|
-
let _type_extraInitializers = [];
|
|
76
|
-
let _center_decorators;
|
|
77
|
-
let _center_initializers = [];
|
|
78
|
-
let _center_extraInitializers = [];
|
|
79
|
-
let _width_decorators;
|
|
80
|
-
let _width_initializers = [];
|
|
81
|
-
let _width_extraInitializers = [];
|
|
82
|
-
let _color_decorators;
|
|
83
|
-
let _color_initializers = [];
|
|
84
|
-
let _color_extraInitializers = [];
|
|
85
|
-
let _maxLine_decorators;
|
|
86
|
-
let _maxLine_initializers = [];
|
|
87
|
-
let _maxLine_extraInitializers = [];
|
|
88
|
-
let _minLine_decorators;
|
|
89
|
-
let _minLine_initializers = [];
|
|
90
|
-
let _minLine_extraInitializers = [];
|
|
91
|
-
let _private_theme_decorators;
|
|
92
|
-
let _private_theme_initializers = [];
|
|
93
|
-
let _private_theme_extraInitializers = [];
|
|
42
|
+
let _classSuper = TapPlaceholderElement;
|
|
94
43
|
var DuoyunPlaceholderElement = class extends _classSuper {
|
|
95
44
|
static { _classThis = this; }
|
|
96
45
|
static {
|
|
97
46
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
98
|
-
_static_line_decorators = [part];
|
|
99
|
-
_mode_decorators = [attribute];
|
|
100
|
-
_type_decorators = [attribute];
|
|
101
|
-
_center_decorators = [boolattribute];
|
|
102
|
-
_width_decorators = [attribute];
|
|
103
|
-
_color_decorators = [attribute];
|
|
104
|
-
_maxLine_decorators = [numattribute];
|
|
105
|
-
_minLine_decorators = [numattribute];
|
|
106
|
-
_private_theme_decorators = [elementTheme()];
|
|
107
|
-
__esDecorate(null, null, _static_line_decorators, { kind: "field", name: "line", static: true, private: false, access: { has: obj => "line" in obj, get: obj => obj.line, set: (obj, value) => { obj.line = value; } }, metadata: _metadata }, _static_line_initializers, _static_line_extraInitializers);
|
|
108
|
-
__esDecorate(null, null, _mode_decorators, { kind: "field", name: "mode", static: false, private: false, access: { has: obj => "mode" in obj, get: obj => obj.mode, set: (obj, value) => { obj.mode = value; } }, metadata: _metadata }, _mode_initializers, _mode_extraInitializers);
|
|
109
|
-
__esDecorate(null, null, _type_decorators, { kind: "field", name: "type", static: false, private: false, access: { has: obj => "type" in obj, get: obj => obj.type, set: (obj, value) => { obj.type = value; } }, metadata: _metadata }, _type_initializers, _type_extraInitializers);
|
|
110
|
-
__esDecorate(null, null, _center_decorators, { kind: "field", name: "center", static: false, private: false, access: { has: obj => "center" in obj, get: obj => obj.center, set: (obj, value) => { obj.center = value; } }, metadata: _metadata }, _center_initializers, _center_extraInitializers);
|
|
111
|
-
__esDecorate(null, null, _width_decorators, { kind: "field", name: "width", static: false, private: false, access: { has: obj => "width" in obj, get: obj => obj.width, set: (obj, value) => { obj.width = value; } }, metadata: _metadata }, _width_initializers, _width_extraInitializers);
|
|
112
|
-
__esDecorate(null, null, _color_decorators, { kind: "field", name: "color", static: false, private: false, access: { has: obj => "color" in obj, get: obj => obj.color, set: (obj, value) => { obj.color = value; } }, metadata: _metadata }, _color_initializers, _color_extraInitializers);
|
|
113
|
-
__esDecorate(null, null, _maxLine_decorators, { kind: "field", name: "maxLine", static: false, private: false, access: { has: obj => "maxLine" in obj, get: obj => obj.maxLine, set: (obj, value) => { obj.maxLine = value; } }, metadata: _metadata }, _maxLine_initializers, _maxLine_extraInitializers);
|
|
114
|
-
__esDecorate(null, null, _minLine_decorators, { kind: "field", name: "minLine", static: false, private: false, access: { has: obj => "minLine" in obj, get: obj => obj.minLine, set: (obj, value) => { obj.minLine = value; } }, metadata: _metadata }, _minLine_initializers, _minLine_extraInitializers);
|
|
115
|
-
__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);
|
|
116
47
|
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
117
48
|
DuoyunPlaceholderElement = _classThis = _classDescriptor.value;
|
|
118
49
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
119
|
-
}
|
|
120
|
-
static line = __runInitializers(_classThis, _static_line_initializers, void 0);
|
|
121
|
-
/**@deprecated */
|
|
122
|
-
mode = __runInitializers(this, _mode_initializers, void 0);
|
|
123
|
-
type = (__runInitializers(this, _mode_extraInitializers), __runInitializers(this, _type_initializers, void 0));
|
|
124
|
-
center = (__runInitializers(this, _type_extraInitializers), __runInitializers(this, _center_initializers, void 0)); // only type 'single'
|
|
125
|
-
/**% */
|
|
126
|
-
width = (__runInitializers(this, _center_extraInitializers), __runInitializers(this, _width_initializers, void 0));
|
|
127
|
-
color = (__runInitializers(this, _width_extraInitializers), __runInitializers(this, _color_initializers, void 0));
|
|
128
|
-
maxLine = (__runInitializers(this, _color_extraInitializers), __runInitializers(this, _maxLine_initializers, void 0));
|
|
129
|
-
minLine = (__runInitializers(this, _maxLine_extraInitializers), __runInitializers(this, _minLine_initializers, void 0));
|
|
130
|
-
get #type() {
|
|
131
|
-
return this.type || this.mode || 'single';
|
|
132
|
-
}
|
|
133
|
-
get #maxLine() {
|
|
134
|
-
return this.maxLine || 3;
|
|
135
|
-
}
|
|
136
|
-
get #minLine() {
|
|
137
|
-
return this.minLine || 1;
|
|
138
|
-
}
|
|
139
|
-
#theme = (__runInitializers(this, _minLine_extraInitializers), __runInitializers(this, _private_theme_initializers, () => ({ color: this.color || theme.lightBackgroundColor })));
|
|
140
|
-
render = (__runInitializers(this, _private_theme_extraInitializers), () => {
|
|
141
|
-
const lineCount = this.#type === 'single' ? 1 : Math.round(this.#minLine + Math.random() * (this.#maxLine - this.#minLine));
|
|
142
|
-
return html `
|
|
143
|
-
${Array(lineCount)
|
|
144
|
-
.fill(null)
|
|
145
|
-
.map((_, index) => html `
|
|
146
|
-
<div
|
|
147
|
-
class="content"
|
|
148
|
-
part=${DuoyunPlaceholderElement.line}
|
|
149
|
-
style=${styleMap({
|
|
150
|
-
width: index === lineCount - 1 ? this.width || `${50 + Math.random() * 50}%` : 'auto',
|
|
151
|
-
})}
|
|
152
|
-
>
|
|
153
|
-
​
|
|
154
|
-
</div>
|
|
155
|
-
`)}
|
|
156
|
-
`;
|
|
157
|
-
});
|
|
158
|
-
static {
|
|
159
|
-
__runInitializers(_classThis, _static_line_extraInitializers);
|
|
160
50
|
__runInitializers(_classThis, _classExtraInitializers);
|
|
161
51
|
}
|
|
162
52
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"placeholder.js","sourceRoot":"","sources":["../src/elements/placeholder.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"placeholder.js","sourceRoot":"","sources":["../src/elements/placeholder.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;IAG/D,wBAAwB;4BADpC,aAAa,CAAC,gBAAgB,CAAC;;;;sBACc,qBAAqB;wCAA7B,SAAQ,WAAqB;;;;YAAnE,6KAAsE;;;YAAzD,uDAAwB;;;;;SAAxB,wBAAwB"}
|
package/elements/radio.d.ts
CHANGED
|
@@ -1,27 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export declare class DuoyunRadioElement extends
|
|
5
|
-
#private;
|
|
6
|
-
static unnamed: string;
|
|
7
|
-
checked: boolean;
|
|
8
|
-
disabled: boolean;
|
|
9
|
-
change: Emitter<string>;
|
|
10
|
-
value: string;
|
|
11
|
-
render: () => TemplateResult;
|
|
1
|
+
import { TapRadioElement, TapRadioGroupElement } from '@mantou/tap-ui/elements/radio';
|
|
2
|
+
export type { Option } from '@mantou/tap-ui/elements/radio';
|
|
3
|
+
export { groupStyle } from '@mantou/tap-ui/elements/radio';
|
|
4
|
+
export declare class DuoyunRadioElement extends TapRadioElement {
|
|
12
5
|
}
|
|
13
|
-
export declare
|
|
14
|
-
export interface Option<T = any> {
|
|
15
|
-
label: string | TemplateResult;
|
|
16
|
-
value?: T;
|
|
17
|
-
}
|
|
18
|
-
export declare class DuoyunRadioGroupElement extends GemElement {
|
|
19
|
-
#private;
|
|
20
|
-
orientation: 'horizontal' | 'vertical';
|
|
21
|
-
disabled: boolean;
|
|
22
|
-
change: Emitter<any>;
|
|
23
|
-
value?: any;
|
|
24
|
-
options?: Option[];
|
|
25
|
-
render: () => TemplateResult | null;
|
|
6
|
+
export declare class DuoyunRadioGroupElement extends TapRadioGroupElement {
|
|
26
7
|
}
|
|
27
8
|
//# sourceMappingURL=radio.d.ts.map
|
package/elements/radio.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio.d.ts","sourceRoot":"","sources":["../src/elements/radio.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"radio.d.ts","sourceRoot":"","sources":["../src/elements/radio.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAEtF,YAAY,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAE3D,qBACa,kBAAmB,SAAQ,eAAe;CAAG;AAE1D,qBACa,uBAAwB,SAAQ,oBAAoB;CAAG"}
|