uni-select-field 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +268 -0
- package/index.html +382 -0
- package/mjs/common-css.js +171 -0
- package/mjs/common-lib.js +1158 -0
- package/mjs/uni-css.js +586 -0
- package/mjs/wc-uni-select-field.js +496 -0
- package/mjs/wc-uni-select-field.min.js +258 -0
- package/package.json +23 -0
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
export const _wccss = `
|
|
2
|
+
/* reset */
|
|
3
|
+
div,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,legend,input,textarea,p,article,aside,figcaption,figure,nav,section,mark,audio,video,main{margin:0;padding:0}
|
|
4
|
+
article,aside,figcaption,figure,nav,section,main{display:block}
|
|
5
|
+
fieldset,img{border:0}
|
|
6
|
+
address,caption,cite,em,strong{font-style:normal;font-weight:400}
|
|
7
|
+
ol,ul{list-style:none}
|
|
8
|
+
caption{text-align:left}
|
|
9
|
+
h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:400}
|
|
10
|
+
abbr{border:0;font-variant:normal}
|
|
11
|
+
input,textarea,select{font-family:inherit;font-size:inherit;font-weight:inherit;}
|
|
12
|
+
body{-webkit-text-size-adjust:none}
|
|
13
|
+
select,input,button,textarea{font:100% arial,helvetica,clean,sans-serif;}
|
|
14
|
+
del{font-style:normal;text-decoration:none}
|
|
15
|
+
pre{font-family:monospace;line-height:100%}
|
|
16
|
+
progress{-webkit-appearance:none;appearance:none;overflow:hidden;border:0 none;}
|
|
17
|
+
|
|
18
|
+
/* component style */
|
|
19
|
+
a{cursor:pointer;text-decoration:none;}
|
|
20
|
+
.stuff{text-indent:100%;white-space:nowrap;overflow:hidden;}
|
|
21
|
+
.aspect-ratio{position:relative;width:100%;--w:4;--h:3;}
|
|
22
|
+
.aspect-ratio:before{content:'';width:100%;padding-top:calc(var(--h) * 100% / var(--w));display:block;}
|
|
23
|
+
.aspect-ratio .content{position:absolute;top:0;left:0;right:0;bottom:0;}
|
|
24
|
+
.text-overflow{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
|
|
25
|
+
.line-clampin{display:-webkit-box;-webkit-line-clamp:var(--line-clamp, 2);-webkit-box-orient:vertical;text-overflow:ellipsis;overflow:hidden;}
|
|
26
|
+
.overscrolling{-webkit-overflow-scrolling:touch;overflow:hidden;overflow-y:scroll;overscroll-behavior:contain;}
|
|
27
|
+
.overscrolling-x{-webkit-overflow-scrolling:touch;overflow:hidden;overflow-x:scroll;overscroll-behavior:contain;}
|
|
28
|
+
.absolute-center{position:absolute;top:0;left:0;bottom:0;right:0;margin:auto;}
|
|
29
|
+
.flex-center{display:flex;justify-content:center;align-items:center;}
|
|
30
|
+
.force-radius{overflow:hidden;transform:translate3d(0, 0, 0);border-radius:var(--r, 8px);}
|
|
31
|
+
.pretty-paragraph{word-break:break-word;hyphens:auto;text-wrap:pretty;white-space:pre-wrap;}
|
|
32
|
+
.fade-in-out {
|
|
33
|
+
--min-block-size: var(--fade-in-out-min-block-size, 100px);
|
|
34
|
+
--max-block-size: var(--fade-in-out-max-block-size, 500px);
|
|
35
|
+
--gap: var(--fade-in-out-gap, 16px);
|
|
36
|
+
|
|
37
|
+
--mask-vertical-size: var(--gap);
|
|
38
|
+
--mask-vertical: linear-gradient(
|
|
39
|
+
to bottom,
|
|
40
|
+
transparent 0%,
|
|
41
|
+
black calc(0% + var(--mask-vertical-size)),
|
|
42
|
+
black calc(100% - var(--mask-vertical-size)),
|
|
43
|
+
transparent 100%
|
|
44
|
+
);
|
|
45
|
+
|
|
46
|
+
/* scroll */
|
|
47
|
+
--scrollbar-inline-size: 2px;
|
|
48
|
+
--scrollbar-block-size: 2px;
|
|
49
|
+
--scrollbar-background: transparent;
|
|
50
|
+
--scrollbar-thumb: var(--fade-in-out-scrollbar-thumb-color, rgba(0 0 0/.2));
|
|
51
|
+
|
|
52
|
+
inline-size: 100%;
|
|
53
|
+
min-block-size: var(--min-block-size);
|
|
54
|
+
max-block-size: var(--max-block-size);
|
|
55
|
+
overflow: hidden;
|
|
56
|
+
overflow-y: auto;
|
|
57
|
+
-webkit-overflow-scrolling: touch;
|
|
58
|
+
overscroll-behavior: contain;
|
|
59
|
+
box-sizing: border-box;
|
|
60
|
+
mask-image: var(--mask-vertical);
|
|
61
|
+
-webkit-mask-image: var(--mask-vertical);
|
|
62
|
+
padding-block: var(--gap);
|
|
63
|
+
|
|
64
|
+
&::-webkit-scrollbar {
|
|
65
|
+
inline-size: var(--scrollbar-inline-size);
|
|
66
|
+
block-size: var(--scrollbar-block-size);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
&::-webkit-scrollbar-track {
|
|
70
|
+
background: var(--scrollbar-background);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
&::-webkit-scrollbar-thumb {
|
|
74
|
+
border-radius: var(--scrollbar-block-size);
|
|
75
|
+
background: var(--scrollbar-thumb);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
.button-two-face {
|
|
79
|
+
--button-size: 40;
|
|
80
|
+
--button-size-with-unit: calc(var(--button-size) * 1px);
|
|
81
|
+
--button-icon-scale-rate: .75;
|
|
82
|
+
|
|
83
|
+
--button-background: rgba(202 230 252);
|
|
84
|
+
--button-icon: rgba(8 28 53);
|
|
85
|
+
--button-box-shadow: none;
|
|
86
|
+
--button-active-scale: .8;
|
|
87
|
+
|
|
88
|
+
--button-icon-scale-basis: calc((var(--button-size) * var(--button-icon-scale-rate)) / 24);
|
|
89
|
+
--before-icon: none;
|
|
90
|
+
--before-scale: var(--button-icon-scale-basis);
|
|
91
|
+
--after-icon: none;
|
|
92
|
+
--after-scale: 0;
|
|
93
|
+
|
|
94
|
+
flex-shrink: 0;
|
|
95
|
+
font-size: 0;
|
|
96
|
+
appearance: none;
|
|
97
|
+
box-shadow: unset;
|
|
98
|
+
border: unset;
|
|
99
|
+
background: transparent;
|
|
100
|
+
-webkit-user-select: none;
|
|
101
|
+
user-select: none;
|
|
102
|
+
pointer-events: auto;
|
|
103
|
+
margin: 0;
|
|
104
|
+
padding: 0;
|
|
105
|
+
outline: 0 none;
|
|
106
|
+
|
|
107
|
+
position: relative;
|
|
108
|
+
inline-size: var(--button-size-with-unit);
|
|
109
|
+
aspect-ratio: 1/1;
|
|
110
|
+
border-radius: var(--button-size-with-unit);
|
|
111
|
+
background: var(--button-background);
|
|
112
|
+
box-shadow: var(--button-box-shadow);
|
|
113
|
+
|
|
114
|
+
transition: background .2s ease;
|
|
115
|
+
will-change: background;
|
|
116
|
+
|
|
117
|
+
&:active {
|
|
118
|
+
scale: var(--button-active-scale);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
&::before,
|
|
122
|
+
&::after {
|
|
123
|
+
position: absolute;
|
|
124
|
+
inset-inline-start: 50%;
|
|
125
|
+
inset-block-start: 50%;
|
|
126
|
+
content: '';
|
|
127
|
+
inline-size: 24px;
|
|
128
|
+
aspect-ratio: 1/1;
|
|
129
|
+
background: var(--button-icon);
|
|
130
|
+
margin-inline-start: -12px;
|
|
131
|
+
margin-block-start: -12px;
|
|
132
|
+
transition: scale 250ms ease;
|
|
133
|
+
will-change: scale;
|
|
134
|
+
pointer-events: none;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
&::before {
|
|
138
|
+
scale: var(--before-scale);
|
|
139
|
+
clip-path: var(--before-icon);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
&::after {
|
|
143
|
+
scale: var(--after-scale);
|
|
144
|
+
clip-path: var(--after-icon);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
&[data-reverse] {
|
|
148
|
+
--before-scale: 0;
|
|
149
|
+
--after-scale: var(--button-icon-scale-basis);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
:host{all:initial;font-family:system-ui,sans-serif;text-size-adjust:100%;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;font-size:16px;-webkit-tap-highlight-color:transparent;-webkit-print-color-adjust:exact;print-color-adjust:exact;}
|
|
154
|
+
:host {
|
|
155
|
+
/**
|
|
156
|
+
* safe area variables for iX design
|
|
157
|
+
*/
|
|
158
|
+
--safe-area-left: 0px;
|
|
159
|
+
--safe-area-right: 0px;
|
|
160
|
+
--safe-area-top: 0px;
|
|
161
|
+
--safe-area-bottom: 0px;
|
|
162
|
+
}
|
|
163
|
+
@supports (bottom: env(safe-area-inset-top)) {
|
|
164
|
+
:host {
|
|
165
|
+
--safe-area-left: env(safe-area-inset-left);
|
|
166
|
+
--safe-area-right: env(safe-area-inset-right);
|
|
167
|
+
--safe-area-top: env(safe-area-inset-top);
|
|
168
|
+
--safe-area-bottom: env(safe-area-inset-bottom);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
`;
|