@kubed/components 0.2.31 → 0.2.32
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/cjs/Select/Select.js +1 -1
- package/cjs/Select/Select.js.map +1 -1
- package/cjs/Select/Select.styles.js +50 -9
- package/cjs/Select/Select.styles.js.map +1 -1
- package/cjs/Select/iconUtil.js +1 -1
- package/cjs/Select/iconUtil.js.map +1 -1
- package/esm/Select/Select.js +1 -1
- package/esm/Select/Select.js.map +1 -1
- package/esm/Select/Select.styles.js +46 -5
- package/esm/Select/Select.styles.js.map +1 -1
- package/esm/Select/iconUtil.js +1 -1
- package/esm/Select/iconUtil.js.map +1 -1
- package/lib/src/Select/Select.styles.d.ts +8 -2
- package/lib/src/Select/Select.styles.d.ts.map +1 -1
- package/lib/src/Select/iconUtil.d.ts +2 -1
- package/lib/src/Select/iconUtil.d.ts.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -5
package/cjs/Select/Select.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var x=require("react"),f=require("rc-select"),D=require("../utils/forwardRef.js"),H=require("./iconUtil.js"),u=require("./Select.styles.js");function q(e){return e&&typeof e=="object"&&"default"in e?e.default:e}var l=q(x),B=Object.defineProperty,N=Object.defineProperties,R=Object.getOwnPropertyDescriptors,d=Object.getOwnPropertySymbols,m=Object.prototype.hasOwnProperty,O=Object.prototype.propertyIsEnumerable,v=(e,t,r)=>t in e?B(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,b=(e,t)=>{for(var r in t||(t={}))m.call(t,r)&&v(e,r,t[r]);if(d)for(var r of d(t))O.call(t,r)&&v(e,r,t[r]);return e},y=(e,t)=>N(e,R(t)),T=(e,t)=>{var r={};for(var o in e)m.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&d)for(var o of d(e))t.indexOf(o)<0&&O.call(e,o)&&(r[o]=e[o]);return r};const S="SECRET_COMBOBOX_MODE_DO_NOT_USE",F=D.default((e,t)=>{var r=e,{bordered:o=!0,getPopupContainer:E,listHeight:g=256,listItemHeight:_=24,notFoundContent:p,virtual:I,dropdownMatchSelectWidth:h}=r,a=T(r,["bordered","getPopupContainer","listHeight","listItemHeight","notFoundContent","virtual","dropdownMatchSelectWidth"]);const c=l.useMemo(()=>{const{mode:s}=a;if(s!=="combobox")return s===S?"combobox":s},[a.mode]),C=c==="multiple"||c==="tags";let i;p!==void 0?i=l.createElement(u.Empty,null,p):c==="combobox"?i=null:i=l.createElement(u.Empty,null,"No Data");const{suffixIcon:j,itemIcon:M,removeIcon:w,clearIcon:P}=H.default(y(b({},a),{multiple:C}));return l.createElement(l.Fragment,null,l.createElement(u.SelectStyles,null),l.createElement(u.StyledSelect,y(b({ref:t,virtual:I,dropdownMatchSelectWidth:h},a),{listHeight:g,listItemHeight:_,mode:c,suffixIcon:j,menuItemSelectedIcon:M,removeIcon:w,clearIcon:P,notFoundContent:i,getPopupContainer:E,prefixCls:"kubed-select",$bordered:o})))}),n=F;n.SECRET_COMBOBOX_MODE_DO_NOT_USE=S,n.Option=f.Option,n.OptGroup=f.OptGroup,n.displayName="@kubed/components/Select",exports.Select=n;
|
|
2
2
|
//# sourceMappingURL=Select.js.map
|
package/cjs/Select/Select.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.js","sources":["../../src/Select/Select.tsx"],"sourcesContent":["// https://github.dev/ant-design/ant-design/blob/756dc8f130547277a28548c5b46658ff46f131f9/components/select/index.tsx\nimport React from 'react';\nimport { Option, OptGroup } from 'rc-select';\nimport forwardRef from '../utils/forwardRef';\nimport getIcons from './iconUtil';\nimport {\n StyledSelect,\n SelectStyles,\n Empty,\n InternalSelectProps,\n SelectProps,\n} from './Select.styles';\n\ntype RawValue = string | number;\n\nexport type OptionType = typeof Option;\n\nexport interface LabeledValue {\n key?: string;\n value: RawValue;\n label: React.ReactNode;\n}\n\nexport type SelectValue = RawValue | RawValue[] | LabeledValue | LabeledValue[] | undefined;\n\nexport interface RefSelectProps {\n focus: () => void;\n blur: () => void;\n}\n\nconst SECRET_COMBOBOX_MODE_DO_NOT_USE = 'SECRET_COMBOBOX_MODE_DO_NOT_USE';\n\nconst InternalSelect = forwardRef<SelectProps<any>, 'div'>(\n (\n {\n bordered = true,\n getPopupContainer,\n listHeight = 256,\n listItemHeight = 24,\n notFoundContent,\n virtual,\n dropdownMatchSelectWidth,\n ...rest\n },\n ref\n ) => {\n const mode = React.useMemo(() => {\n const { mode: m } = rest as InternalSelectProps<any>;\n\n if ((m as any) === 'combobox') {\n return undefined;\n }\n\n if (m === SECRET_COMBOBOX_MODE_DO_NOT_USE) {\n return 'combobox';\n }\n\n return m;\n }, [rest.mode]);\n\n const isMultiple = mode === 'multiple' || mode === 'tags';\n\n // ===================== Empty =====================\n let mergedNotFound: React.ReactNode;\n if (notFoundContent !== undefined) {\n mergedNotFound = <Empty>{notFoundContent}</Empty>;\n } else if (mode === 'combobox') {\n mergedNotFound = null;\n } else {\n mergedNotFound = <Empty>No Data</Empty>;\n }\n\n const { suffixIcon, itemIcon, removeIcon, clearIcon } = getIcons({\n ...rest,\n multiple: isMultiple,\n } /** // FIXME: remove any */ as any);\n\n return (\n <>\n <SelectStyles />\n <StyledSelect\n ref={ref}\n virtual={virtual}\n dropdownMatchSelectWidth={dropdownMatchSelectWidth}\n {...rest}\n listHeight={listHeight}\n listItemHeight={listItemHeight}\n mode={mode}\n
|
|
1
|
+
{"version":3,"file":"Select.js","sources":["../../src/Select/Select.tsx"],"sourcesContent":["// https://github.dev/ant-design/ant-design/blob/756dc8f130547277a28548c5b46658ff46f131f9/components/select/index.tsx\nimport React from 'react';\nimport { Option, OptGroup } from 'rc-select';\nimport forwardRef from '../utils/forwardRef';\nimport getIcons from './iconUtil';\nimport {\n StyledSelect,\n SelectStyles,\n Empty,\n InternalSelectProps,\n SelectProps,\n} from './Select.styles';\n\ntype RawValue = string | number;\n\nexport type OptionType = typeof Option;\n\nexport interface LabeledValue {\n key?: string;\n value: RawValue;\n label: React.ReactNode;\n}\n\nexport type SelectValue = RawValue | RawValue[] | LabeledValue | LabeledValue[] | undefined;\n\nexport interface RefSelectProps {\n focus: () => void;\n blur: () => void;\n}\n\nconst SECRET_COMBOBOX_MODE_DO_NOT_USE = 'SECRET_COMBOBOX_MODE_DO_NOT_USE';\n\nconst InternalSelect = forwardRef<SelectProps<any>, 'div'>(\n (\n {\n bordered = true,\n getPopupContainer,\n listHeight = 256,\n listItemHeight = 24,\n notFoundContent,\n virtual,\n dropdownMatchSelectWidth,\n ...rest\n },\n ref\n ) => {\n const mode = React.useMemo(() => {\n const { mode: m } = rest as InternalSelectProps<any>;\n\n if ((m as any) === 'combobox') {\n return undefined;\n }\n\n if (m === SECRET_COMBOBOX_MODE_DO_NOT_USE) {\n return 'combobox';\n }\n\n return m;\n }, [rest.mode]);\n\n const isMultiple = mode === 'multiple' || mode === 'tags';\n\n // ===================== Empty =====================\n let mergedNotFound: React.ReactNode;\n if (notFoundContent !== undefined) {\n mergedNotFound = <Empty>{notFoundContent}</Empty>;\n } else if (mode === 'combobox') {\n mergedNotFound = null;\n } else {\n mergedNotFound = <Empty>No Data</Empty>;\n }\n\n const { suffixIcon, itemIcon, removeIcon, clearIcon } = getIcons({\n ...rest,\n multiple: isMultiple,\n } /** // FIXME: remove any */ as any);\n\n return (\n <>\n <SelectStyles />\n <StyledSelect\n ref={ref}\n virtual={virtual}\n dropdownMatchSelectWidth={dropdownMatchSelectWidth}\n {...rest}\n listHeight={listHeight}\n listItemHeight={listItemHeight}\n mode={mode}\n suffixIcon={suffixIcon}\n menuItemSelectedIcon={itemIcon}\n removeIcon={removeIcon}\n clearIcon={clearIcon}\n notFoundContent={mergedNotFound}\n getPopupContainer={getPopupContainer}\n prefixCls=\"kubed-select\"\n $bordered={bordered}\n />\n </>\n );\n }\n);\n\ntype InternalSelectType = typeof InternalSelect;\n\ninterface SelectInterface extends InternalSelectType {\n SECRET_COMBOBOX_MODE_DO_NOT_USE: string;\n Option: typeof Option;\n OptGroup: typeof OptGroup;\n}\n\nexport const Select = InternalSelect as SelectInterface;\n\nSelect.SECRET_COMBOBOX_MODE_DO_NOT_USE = SECRET_COMBOBOX_MODE_DO_NOT_USE;\nSelect.Option = Option;\nSelect.OptGroup = OptGroup;\n\nSelect.displayName = '@kubed/components/Select';\n"],"names":["w","l","_","P","h","U","V","v"],"mappings":";;;;;;;;;;;;;;AAAA,IAAI,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,yBAAyB,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC,IA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AC,CAAC,UAAU,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,SAAS,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAa,MAAC,MAAM,CAAC,EAAE,MAAM,CAAC,+BAA+B,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAACC,UAAC,CAAC,MAAM,CAAC,QAAQ,CAACC,YAAC,CAAC,MAAM,CAAC,WAAW,CAAC,0BAA0B;;;;"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("styled-components"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("styled-components"),o=require("rc-select"),n=require("../utils/color.js");function i(e){return e&&typeof e=="object"&&"default"in e?e.default:e}var l=i(t),r=i(o);const s=t.createGlobalStyle`
|
|
2
2
|
.kubed-select-dropdown-hidden {
|
|
3
3
|
display: none;
|
|
4
4
|
}
|
|
5
5
|
.kubed-select-dropdown {
|
|
6
|
+
position: absolute;
|
|
6
7
|
z-index: 1000;
|
|
7
8
|
padding: 4px 0;
|
|
8
9
|
border-radius: 4px;
|
|
@@ -30,8 +31,13 @@
|
|
|
30
31
|
display: flex;
|
|
31
32
|
}
|
|
32
33
|
|
|
34
|
+
.kubed-select-selection-wrap {
|
|
35
|
+
min-height: 30px;
|
|
36
|
+
}
|
|
37
|
+
|
|
33
38
|
.kubed-select-item-option-content {
|
|
34
39
|
flex-grow: 1;
|
|
40
|
+
word-break: break-all;
|
|
35
41
|
}
|
|
36
42
|
|
|
37
43
|
.kubed-select-item-option-state {
|
|
@@ -42,11 +48,11 @@
|
|
|
42
48
|
color: ${({theme:e})=>e.palette.colors.green[2]};
|
|
43
49
|
}
|
|
44
50
|
}
|
|
45
|
-
`,
|
|
51
|
+
`,a=l.div`
|
|
46
52
|
color: ${({theme:e})=>e.palette.background};
|
|
47
53
|
padding: 20px 0;
|
|
48
54
|
text-align: center;
|
|
49
|
-
`,
|
|
55
|
+
`,c=l(r)`
|
|
50
56
|
display: inline-block;
|
|
51
57
|
line-height: 1.67;
|
|
52
58
|
position: relative;
|
|
@@ -65,6 +71,11 @@
|
|
|
65
71
|
}
|
|
66
72
|
}
|
|
67
73
|
|
|
74
|
+
.kubed-select-selection-overflow {
|
|
75
|
+
overflow-x: hidden;
|
|
76
|
+
max-width: 100%;
|
|
77
|
+
}
|
|
78
|
+
|
|
68
79
|
&:hover {
|
|
69
80
|
.kubed-select-clear {
|
|
70
81
|
opacity: 1;
|
|
@@ -73,6 +84,8 @@
|
|
|
73
84
|
|
|
74
85
|
.kubed-select-selector {
|
|
75
86
|
display: flex;
|
|
87
|
+
align-items: center;
|
|
88
|
+
gap: 4px;
|
|
76
89
|
position: relative;
|
|
77
90
|
width: 100%;
|
|
78
91
|
padding: 0 11px;
|
|
@@ -172,6 +185,16 @@
|
|
|
172
185
|
}
|
|
173
186
|
}
|
|
174
187
|
|
|
188
|
+
.kubed-select-selection-wrap {
|
|
189
|
+
position: relative;
|
|
190
|
+
flex: 1;
|
|
191
|
+
display: flex;
|
|
192
|
+
width: 100%;
|
|
193
|
+
position: relative;
|
|
194
|
+
min-width: 0;
|
|
195
|
+
max-width: 100%;
|
|
196
|
+
}
|
|
197
|
+
|
|
175
198
|
.kubed-select-selector {
|
|
176
199
|
height: 32px; // to
|
|
177
200
|
|
|
@@ -185,16 +208,18 @@
|
|
|
185
208
|
}
|
|
186
209
|
|
|
187
210
|
.kubed-select-selection-search {
|
|
211
|
+
width: 100%;
|
|
188
212
|
position: absolute;
|
|
189
213
|
top: 0;
|
|
190
214
|
right: 11px;
|
|
191
215
|
bottom: 0;
|
|
192
|
-
left:
|
|
216
|
+
left: 0;
|
|
193
217
|
}
|
|
194
218
|
|
|
195
219
|
.kubed-select-selection-search-input {
|
|
196
|
-
width: 100
|
|
220
|
+
width: calc(100% - 18px);
|
|
197
221
|
height: 30px;
|
|
222
|
+
line-height: 30px;
|
|
198
223
|
}
|
|
199
224
|
|
|
200
225
|
.kubed-select-selection-placeholder {
|
|
@@ -206,6 +231,11 @@
|
|
|
206
231
|
}
|
|
207
232
|
|
|
208
233
|
&.kubed-select-multiple {
|
|
234
|
+
&.kubed-select-show-arrow {
|
|
235
|
+
.kubed-select-selection-wrap {
|
|
236
|
+
max-width: calc(100% - 24px);
|
|
237
|
+
}
|
|
238
|
+
}
|
|
209
239
|
&.kubed-select-allow-clear {
|
|
210
240
|
.kubed-select-selector {
|
|
211
241
|
padding-right: 24px;
|
|
@@ -218,15 +248,21 @@
|
|
|
218
248
|
width: 100%;
|
|
219
249
|
padding: 1px 4px;
|
|
220
250
|
}
|
|
251
|
+
.kubed-select-selection-wrap {
|
|
252
|
+
display: grid;
|
|
253
|
+
grid-template-columns: auto 1fr;
|
|
254
|
+
align-items: center;
|
|
255
|
+
}
|
|
221
256
|
|
|
222
257
|
.kubed-select-selection-placeholder {
|
|
223
|
-
|
|
258
|
+
position: relative;
|
|
259
|
+
/* line-height: 30px;
|
|
224
260
|
position: absolute;
|
|
225
261
|
top: 50%;
|
|
226
262
|
right: 11px;
|
|
227
263
|
left: 11px;
|
|
228
|
-
transform: translateY(-50%);
|
|
229
|
-
transition: all 0.3s;
|
|
264
|
+
transform: translateY(-50%); */
|
|
265
|
+
/* transition: all 0.3s; */
|
|
230
266
|
}
|
|
231
267
|
|
|
232
268
|
.kubed-select-selection-item {
|
|
@@ -264,6 +300,11 @@
|
|
|
264
300
|
.kubed-select-selection-search-input {
|
|
265
301
|
height: 20px;
|
|
266
302
|
line-height: 20px;
|
|
303
|
+
min-width: 100%;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
.kubed-select-selection-overflow-item-suffix {
|
|
307
|
+
overflow-x: hidden;
|
|
267
308
|
}
|
|
268
309
|
|
|
269
310
|
.kubed-select-selection-search-mirror {
|
|
@@ -277,5 +318,5 @@
|
|
|
277
318
|
line-height: 20px;
|
|
278
319
|
}
|
|
279
320
|
}
|
|
280
|
-
`;exports.Empty=
|
|
321
|
+
`;exports.Empty=a,exports.SelectStyles=s,exports.StyledSelect=c;
|
|
281
322
|
//# sourceMappingURL=Select.styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.styles.js","sources":["../../src/Select/Select.styles.ts"],"sourcesContent":["import styled, { createGlobalStyle } from 'styled-components';\nimport RcSelect, { SelectProps as RcSelectProps } from 'rc-select';\nimport React from 'react';\nimport { KubedSizes } from '../theme';\nimport { addColorAlpha } from '../utils/color';\n\nexport interface InternalSelectProps<VT> extends Omit<RcSelectProps<VT>, 'mode'> {\n suffixIcon?: React.ReactNode;\n size?: KubedSizes;\n mode?: 'multiple' | 'tags' | 'SECRET_COMBOBOX_MODE_DO_NOT_USE';\n bordered?: boolean;\n}\n\nexport interface SelectProps<VT>\n extends Omit<\n InternalSelectProps<VT>,\n 'inputIcon' | 'mode' | 'getInputElement' | 'getRawInputElement' | 'backfill'\n > {\n mode?: 'multiple' | 'tags';\n}\n\nexport const SelectStyles = createGlobalStyle`\n .kubed-select-dropdown-hidden {\n display: none;\n }\n .kubed-select-dropdown {\n z-index: 1000;\n padding: 4px 0;\n border-radius: 4px;\n background-color: ${({ theme }) => theme.palette.accents_8};\n box-shadow: 0 4px 8px 0 ${({ theme }) => addColorAlpha(theme.palette.accents_8, 0.16)};\n }\n\n .kubed-select-item {\n position: relative;\n padding: 6px 12px;\n color: ${({ theme }) => theme.palette.background};\n line-height: 1.67;\n cursor: pointer;\n font-family: Roboto,PingFang SC,Lantinghei SC,Helvetica Neue,Helvetica,Arial,Microsoft YaHei,微软雅黑,STHeitiSC-Light,simsun,宋体,WenQuanYi Zen Hei,WenQuanYi Micro Hei,sans-serif;\n user-select: none;\n\n &.kubed-select-item-option-selected,\n &:hover {\n background-color: ${({ theme }) => theme.palette.accents_7};\n font-weight: 600;\n }\n }\n\n .kubed-select-item-option {\n display: flex;\n }\n\n .kubed-select-item-option-content {\n flex-grow: 1;\n }\n\n .kubed-select-item-option-state {\n display: inline-flex;\n align-items: center;\n\n .kubed-icon {\n color: ${({ theme }) => theme.palette.colors.green[2]};\n }\n }\n`;\n\nexport const Empty = styled.div`\n color: ${({ theme }) => theme.palette.background};\n padding: 20px 0;\n text-align: center;\n`;\n\nexport const StyledSelect = styled(RcSelect)<SelectProps<any>>`\n display: inline-block;\n line-height: 1.67;\n position: relative;\n cursor: pointer;\n min-width: 100px;\n\n &.kubed-select-open {\n .kubed-select-selector {\n border-color: ${({ theme }) => theme.palette.colors.green[2]} !important;\n }\n }\n\n &.kubed-select-show-search {\n input {\n cursor: auto !important;\n }\n }\n\n &:hover {\n .kubed-select-clear {\n opacity: 1;\n }\n }\n\n .kubed-select-selector {\n display: flex;\n position: relative;\n width: 100%;\n padding: 0 11px;\n background-color: ${({ theme }) => theme.palette.background};\n border: 1px solid ${({ theme }) => theme.palette.accents_4};\n border-radius: 4px;\n transition: border-color 0.3s ease-in-out;\n font-weight: 600;\n color: ${({ theme }) => theme.palette.accents_7};\n\n &:hover {\n border-color: ${({ theme }) => theme.palette.accents_5};\n }\n\n .kubed-select-selection-search-input {\n margin: 0;\n padding: 0;\n background: 0 0;\n outline: none;\n border: none;\n appearance: none;\n }\n }\n\n .kubed-select-selection-item {\n flex: 1;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n line-height: 30px;\n }\n\n .kubed-select-arrow {\n display: inline-block;\n position: absolute;\n top: 50%;\n right: 11px;\n width: 16px;\n height: 16px;\n pointer-events: none;\n text-align: center;\n transform: translateY(-50%);\n }\n\n .kubed-select-clear {\n position: absolute;\n top: 50%;\n right: 11px;\n z-index: 1;\n display: inline-block;\n width: 16px;\n height: 16px;\n transform: translateY(-50%);\n text-align: center;\n cursor: pointer;\n background-color: ${({ theme }) => theme.palette.background};\n opacity: 0;\n transition: all 0.1s ease; // todo\n\n &:hover {\n background-color: ${({ theme }) => theme.palette.accents_1};\n }\n }\n\n .kubed-select-selection-placeholder {\n flex: 1;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n }\n\n .kubed-select-selection-overflow {\n position: relative;\n display: flex;\n flex: auto;\n flex-wrap: wrap;\n max-width: 100%;\n cursor: text;\n line-height: 24px;\n }\n\n .kubed-select-selection-overflow-item {\n flex: none;\n align-self: center;\n max-width: 100%;\n }\n\n &.kubed-select-single {\n &.kubed-select-show-arrow {\n .kubed-select-selection-item,\n .kubed-select-selection-placeholder {\n padding-right: 18px;\n }\n\n .kubed-select-selection-search {\n right: 25px !important;\n }\n }\n\n .kubed-select-selector {\n height: 32px; // to\n\n input {\n cursor: pointer;\n }\n\n .kubed-select-selection-item {\n position: relative;\n user-select: none;\n }\n\n .kubed-select-selection-search {\n position: absolute;\n top: 0;\n right: 11px;\n bottom: 0;\n left: 11px;\n }\n\n .kubed-select-selection-search-input {\n width: 100%;\n height: 30px;\n }\n\n .kubed-select-selection-placeholder {\n padding: 0;\n line-height: 30px;\n transition: all 0.3s;\n }\n }\n }\n\n &.kubed-select-multiple {\n &.kubed-select-allow-clear {\n .kubed-select-selector {\n padding-right: 24px;\n }\n }\n\n .kubed-select-selector {\n flex-wrap: wrap;\n align-items: center;\n width: 100%;\n padding: 1px 4px;\n }\n\n .kubed-select-selection-placeholder {\n line-height: 30px;\n position: absolute;\n top: 50%;\n right: 11px;\n left: 11px;\n transform: translateY(-50%);\n transition: all 0.3s;\n }\n\n .kubed-select-selection-item {\n position: relative;\n color: ${({ theme }) => theme.palette.background};\n background-color: ${({ theme }) => theme.palette.accents_8};\n font-weight: 600;\n border-radius: 2px;\n display: inline-flex;\n height: 20px;\n line-height: 20px;\n padding: 0 4px;\n align-items: center;\n margin-right: 5px;\n }\n\n .kubed-select-selection-item-remove {\n cursor: pointer;\n display: inline-flex;\n margin-left: 8px;\n .kubed-icon {\n color: #fff;\n fill: #fff;\n }\n }\n\n .kubed-select-selection-search {\n position: relative;\n max-width: 100%;\n margin-top: 2px;\n margin-bottom: 2px;\n margin-inline-start: 7px;\n }\n\n .kubed-select-selection-search-input {\n height: 20px;\n line-height: 20px;\n }\n\n .kubed-select-selection-search-mirror {\n position: absolute;\n top: 0;\n left: 0;\n z-index: 999;\n white-space: pre;\n visibility: hidden;\n height: 20px;\n line-height: 20px;\n }\n }\n`;\n"],"names":["o","l","t","i"],"mappings":";;;;;;;;;;;;;AAA6I,MAAC,YAAY,CAACA,mBAAC,CAAC;AAC7J;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;AACzD,4BAA4B,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAGC,mBAAC,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;AACtE;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AACtD;AACA;AACA,CAAC,CAAC,KAAK,CAACC,UAAC,CAAC,GAAG,CAAC;AACd,SAAS,EAAE,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,OAAO,CAAC,SAAS,CAAC;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC;AACjD,wBAAwB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;"}
|
|
1
|
+
{"version":3,"file":"Select.styles.js","sources":["../../src/Select/Select.styles.ts"],"sourcesContent":["import styled, { createGlobalStyle } from 'styled-components';\nimport RcSelect, { SelectProps as RcSelectProps } from 'rc-select';\nimport React from 'react';\nimport { KubedSizes } from '../theme';\nimport { addColorAlpha } from '../utils/color';\n\nexport interface InternalSelectProps<VT> extends Omit<RcSelectProps<VT>, 'mode'> {\n suffixIcon?: React.ReactNode;\n size?: KubedSizes;\n mode?: 'multiple' | 'tags' | 'SECRET_COMBOBOX_MODE_DO_NOT_USE';\n bordered?: boolean;\n}\n\nexport interface SelectProps<VT>\n extends Omit<\n InternalSelectProps<VT>,\n 'inputIcon' | 'mode' | 'getInputElement' | 'getRawInputElement' | 'backfill'\n > {\n mode?: 'multiple' | 'tags';\n showArrow?: boolean;\n}\n\nexport const SelectStyles = createGlobalStyle`\n .kubed-select-dropdown-hidden {\n display: none;\n }\n .kubed-select-dropdown {\n position: absolute;\n z-index: 1000;\n padding: 4px 0;\n border-radius: 4px;\n background-color: ${({ theme }) => theme.palette.accents_8};\n box-shadow: 0 4px 8px 0 ${({ theme }) => addColorAlpha(theme.palette.accents_8, 0.16)};\n }\n\n .kubed-select-item {\n position: relative;\n padding: 6px 12px;\n color: ${({ theme }) => theme.palette.background};\n line-height: 1.67;\n cursor: pointer;\n font-family: Roboto,PingFang SC,Lantinghei SC,Helvetica Neue,Helvetica,Arial,Microsoft YaHei,微软雅黑,STHeitiSC-Light,simsun,宋体,WenQuanYi Zen Hei,WenQuanYi Micro Hei,sans-serif;\n user-select: none;\n\n &.kubed-select-item-option-selected,\n &:hover {\n background-color: ${({ theme }) => theme.palette.accents_7};\n font-weight: 600;\n }\n }\n\n .kubed-select-item-option {\n display: flex;\n }\n\n .kubed-select-selection-wrap {\n min-height: 30px;\n }\n \n .kubed-select-item-option-content {\n flex-grow: 1;\n word-break: break-all;\n }\n\n .kubed-select-item-option-state {\n display: inline-flex;\n align-items: center;\n\n .kubed-icon {\n color: ${({ theme }) => theme.palette.colors.green[2]};\n }\n }\n`;\n\nexport const Empty = styled.div`\n color: ${({ theme }) => theme.palette.background};\n padding: 20px 0;\n text-align: center;\n`;\n\nexport const StyledSelect = styled(RcSelect)<SelectProps<any>>`\n display: inline-block;\n line-height: 1.67;\n position: relative;\n cursor: pointer;\n min-width: 100px;\n\n &.kubed-select-open {\n .kubed-select-selector {\n border-color: ${({ theme }) => theme.palette.colors.green[2]} !important;\n }\n }\n\n &.kubed-select-show-search {\n input {\n cursor: auto !important;\n }\n }\n\n .kubed-select-selection-overflow {\n overflow-x: hidden;\n max-width: 100%;\n }\n\n &:hover {\n .kubed-select-clear {\n opacity: 1;\n }\n }\n\n .kubed-select-selector {\n display: flex;\n align-items: center;\n gap: 4px;\n position: relative;\n width: 100%;\n padding: 0 11px;\n background-color: ${({ theme }) => theme.palette.background};\n border: 1px solid ${({ theme }) => theme.palette.accents_4};\n border-radius: 4px;\n transition: border-color 0.3s ease-in-out;\n font-weight: 600;\n color: ${({ theme }) => theme.palette.accents_7};\n\n &:hover {\n border-color: ${({ theme }) => theme.palette.accents_5};\n }\n\n .kubed-select-selection-search-input {\n margin: 0;\n padding: 0;\n background: 0 0;\n outline: none;\n border: none;\n appearance: none;\n }\n }\n\n .kubed-select-selection-item {\n flex: 1;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n line-height: 30px;\n }\n\n .kubed-select-arrow {\n display: inline-block;\n position: absolute;\n top: 50%;\n right: 11px;\n width: 16px;\n height: 16px;\n pointer-events: none;\n text-align: center;\n transform: translateY(-50%);\n }\n\n .kubed-select-clear {\n position: absolute;\n top: 50%;\n right: 11px;\n z-index: 1;\n display: inline-block;\n width: 16px;\n height: 16px;\n transform: translateY(-50%);\n text-align: center;\n cursor: pointer;\n background-color: ${({ theme }) => theme.palette.background};\n opacity: 0;\n transition: all 0.1s ease; // todo\n\n &:hover {\n background-color: ${({ theme }) => theme.palette.accents_1};\n }\n }\n\n .kubed-select-selection-placeholder {\n flex: 1;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n }\n\n .kubed-select-selection-overflow {\n position: relative;\n display: flex;\n flex: auto;\n flex-wrap: wrap;\n max-width: 100%;\n cursor: text;\n line-height: 24px;\n }\n\n .kubed-select-selection-overflow-item {\n flex: none;\n align-self: center;\n max-width: 100%;\n }\n\n &.kubed-select-single {\n &.kubed-select-show-arrow {\n .kubed-select-selection-item,\n .kubed-select-selection-placeholder {\n padding-right: 18px;\n }\n\n .kubed-select-selection-search {\n right: 25px !important;\n }\n }\n\n .kubed-select-selection-wrap {\n position: relative;\n flex: 1;\n display: flex;\n width: 100%;\n position: relative;\n min-width: 0;\n max-width: 100%;\n }\n\n .kubed-select-selector {\n height: 32px; // to\n\n input {\n cursor: pointer;\n }\n\n .kubed-select-selection-item {\n position: relative;\n user-select: none;\n }\n\n .kubed-select-selection-search {\n width: 100%;\n position: absolute;\n top: 0;\n right: 11px;\n bottom: 0;\n left: 0;\n }\n\n .kubed-select-selection-search-input {\n width: calc(100% - 18px);\n height: 30px;\n line-height: 30px;\n }\n\n .kubed-select-selection-placeholder {\n padding: 0;\n line-height: 30px;\n transition: all 0.3s;\n }\n }\n }\n\n &.kubed-select-multiple {\n &.kubed-select-show-arrow {\n .kubed-select-selection-wrap {\n max-width: calc(100% - 24px);\n }\n }\n &.kubed-select-allow-clear {\n .kubed-select-selector {\n padding-right: 24px;\n }\n }\n\n .kubed-select-selector {\n flex-wrap: wrap;\n align-items: center;\n width: 100%;\n padding: 1px 4px;\n }\n .kubed-select-selection-wrap {\n display: grid;\n grid-template-columns: auto 1fr;\n align-items: center;\n }\n\n .kubed-select-selection-placeholder {\n position: relative;\n /* line-height: 30px;\n position: absolute;\n top: 50%;\n right: 11px;\n left: 11px;\n transform: translateY(-50%); */\n /* transition: all 0.3s; */\n }\n\n .kubed-select-selection-item {\n position: relative;\n color: ${({ theme }) => theme.palette.background};\n background-color: ${({ theme }) => theme.palette.accents_8};\n font-weight: 600;\n border-radius: 2px;\n display: inline-flex;\n height: 20px;\n line-height: 20px;\n padding: 0 4px;\n align-items: center;\n margin-right: 5px;\n }\n\n .kubed-select-selection-item-remove {\n cursor: pointer;\n display: inline-flex;\n margin-left: 8px;\n .kubed-icon {\n color: #fff;\n fill: #fff;\n }\n }\n\n .kubed-select-selection-search {\n position: relative;\n max-width: 100%;\n margin-top: 2px;\n margin-bottom: 2px;\n margin-inline-start: 7px;\n }\n\n .kubed-select-selection-search-input {\n height: 20px;\n line-height: 20px;\n min-width: 100%;\n }\n\n .kubed-select-selection-overflow-item-suffix {\n overflow-x: hidden;\n }\n\n .kubed-select-selection-search-mirror {\n position: absolute;\n top: 0;\n left: 0;\n z-index: 999;\n white-space: pre;\n visibility: hidden;\n height: 20px;\n line-height: 20px;\n }\n }\n`;\n"],"names":["i","l","t","o"],"mappings":";;;;;;;;;;;;;AAA6I,MAAC,YAAY,CAACA,mBAAC,CAAC;AAC7J;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;AACzD,4BAA4B,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAGC,mBAAC,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;AACtE;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AACtD;AACA;AACA,CAAC,CAAC,KAAK,CAACC,UAAC,CAAC,GAAG,CAAC;AACd,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC;AAC7C;AACA;AACA,CAAC,CAAC,YAAY,CAACA,UAAC,CAACC,UAAC,CAAC,CAAC;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC;AAC1D,sBAAsB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;AACzD;AACA;AACA;AACA,WAAW,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;AAC9C;AACA;AACA,oBAAoB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC;AAC1D;AACA;AACA;AACA;AACA,wBAAwB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC;AACjD,wBAAwB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;"}
|
package/cjs/Select/iconUtil.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var I=require("react"),t=require("@kubed/icons"),z=require("../Loading/Loading.js");function E(e){return e&&typeof e=="object"&&"default"in e?e.default:e}var n=E(I);function g({suffixIcon:e,clearIcon:u,menuItemSelectedIcon:l,removeIcon:c,loading:s,multiple:d,showArrow:m=!1}){const f=u||n.createElement(t.Close,{size:16});let o=null;e!==void 0?o=e:s?o=n.createElement(z.Loading,{size:16}):o=({open:a,showSearch:v})=>a&&v?n.createElement(t.Magnifier,{size:16}):m?a?n.createElement(t.ChevronUp,{size:16}):n.createElement(t.ChevronDown,{size:16}):null;let r=null;l!==void 0?r=l:d?r=n.createElement(t.Check,{size:16}):r=n.createElement(t.Check,{size:16});let i=null;return c!==void 0?i=c:i=n.createElement(t.Close,{size:16}),{clearIcon:f,suffixIcon:o,itemIcon:r,removeIcon:i}}exports.default=g;
|
|
2
2
|
//# sourceMappingURL=iconUtil.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"iconUtil.js","sources":["../../src/Select/iconUtil.tsx"],"sourcesContent":["import React from 'react';\nimport { Close, Magnifier, ChevronDown, ChevronUp, Check } from '@kubed/icons';\nimport { Loading } from '../Loading/Loading';\n\ninterface IconProps {\n suffixIcon?: React.ReactNode;\n clearIcon?: React.ReactNode;\n menuItemSelectedIcon?: React.ReactNode;\n removeIcon?: React.ReactNode;\n loading?: boolean;\n multiple?: boolean;\n}\nexport default function getIcons({\n suffixIcon,\n clearIcon,\n menuItemSelectedIcon,\n removeIcon,\n loading,\n multiple,\n}: IconProps) {\n const mergedClearIcon = clearIcon || <Close size={16} />;\n
|
|
1
|
+
{"version":3,"file":"iconUtil.js","sources":["../../src/Select/iconUtil.tsx"],"sourcesContent":["import React from 'react';\nimport { Close, Magnifier, ChevronDown, ChevronUp, Check } from '@kubed/icons';\nimport { Loading } from '../Loading/Loading';\n\ninterface IconProps {\n suffixIcon?: React.ReactNode;\n clearIcon?: React.ReactNode;\n menuItemSelectedIcon?: React.ReactNode;\n removeIcon?: React.ReactNode;\n loading?: boolean;\n multiple?: boolean;\n showArrow?: boolean;\n}\nexport default function getIcons({\n suffixIcon,\n clearIcon,\n menuItemSelectedIcon,\n removeIcon,\n loading,\n multiple,\n showArrow = false,\n}: IconProps) {\n const mergedClearIcon = clearIcon || <Close size={16} />;\n // Arrow item icon\n let mergedSuffixIcon = null;\n if (suffixIcon !== undefined) {\n mergedSuffixIcon = suffixIcon;\n } else if (loading) {\n mergedSuffixIcon = <Loading size={16} />;\n } else {\n mergedSuffixIcon = ({ open, showSearch }: { open: boolean; showSearch: boolean }) => {\n if (open && showSearch) {\n return <Magnifier size={16} />;\n }\n if (showArrow) {\n if (open) {\n return <ChevronUp size={16} />;\n }\n return <ChevronDown size={16} />;\n }\n return null;\n };\n }\n\n // Checked item icon\n let mergedItemIcon = null;\n if (menuItemSelectedIcon !== undefined) {\n mergedItemIcon = menuItemSelectedIcon;\n } else if (multiple) {\n mergedItemIcon = <Check size={16} />;\n } else {\n mergedItemIcon = <Check size={16} />;\n }\n\n let mergedRemoveIcon = null;\n if (removeIcon !== undefined) {\n mergedRemoveIcon = removeIcon;\n } else {\n mergedRemoveIcon = <Close size={16} />;\n }\n\n return {\n clearIcon: mergedClearIcon,\n suffixIcon: mergedSuffixIcon,\n itemIcon: mergedItemIcon,\n removeIcon: mergedRemoveIcon,\n };\n}\n"],"names":["e","c","h","p","b","z","t"],"mappings":";;;;;;;;;;;;AAAgL,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAEA,UAAC,CAAC,aAAa,CAACC,WAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAACD,UAAC,CAAC,aAAa,CAACE,eAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAACF,UAAC,CAAC,aAAa,CAACG,eAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAACH,UAAC,CAAC,aAAa,CAACI,eAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAACJ,UAAC,CAAC,aAAa,CAACK,iBAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAACL,UAAC,CAAC,aAAa,CAACM,WAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAACN,UAAC,CAAC,aAAa,CAACM,WAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAACN,UAAC,CAAC,aAAa,CAACC,WAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC;;;;"}
|
package/esm/Select/Select.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import n from"react";import{Option as
|
|
1
|
+
import n from"react";import{Option as w,OptGroup as P}from"rc-select";import D from"../utils/forwardRef.js";import H from"./iconUtil.js";import{Empty as d,SelectStyles as B,StyledSelect as N}from"./Select.styles.js";var T=Object.defineProperty,F=Object.defineProperties,R=Object.getOwnPropertyDescriptors,m=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable,O=(e,t,o)=>t in e?T(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,b=(e,t)=>{for(var o in t||(t={}))s.call(t,o)&&O(e,o,t[o]);if(m)for(var o of m(t))f.call(t,o)&&O(e,o,t[o]);return e},v=(e,t)=>F(e,R(t)),G=(e,t)=>{var o={};for(var r in e)s.call(e,r)&&t.indexOf(r)<0&&(o[r]=e[r]);if(e!=null&&m)for(var r of m(e))t.indexOf(r)<0&&f.call(e,r)&&(o[r]=e[r]);return o};const S="SECRET_COMBOBOX_MODE_DO_NOT_USE",U=D((e,t)=>{var o=e,{bordered:r=!0,getPopupContainer:E,listHeight:g=256,listItemHeight:y=24,notFoundContent:u,virtual:I,dropdownMatchSelectWidth:h}=o,c=G(o,["bordered","getPopupContainer","listHeight","listItemHeight","notFoundContent","virtual","dropdownMatchSelectWidth"]);const i=n.useMemo(()=>{const{mode:p}=c;if(p!=="combobox")return p===S?"combobox":p},[c.mode]),C=i==="multiple"||i==="tags";let a;u!==void 0?a=n.createElement(d,null,u):i==="combobox"?a=null:a=n.createElement(d,null,"No Data");const{suffixIcon:_,itemIcon:j,removeIcon:x,clearIcon:M}=H(v(b({},c),{multiple:C}));return n.createElement(n.Fragment,null,n.createElement(B,null),n.createElement(N,v(b({ref:t,virtual:I,dropdownMatchSelectWidth:h},c),{listHeight:g,listItemHeight:y,mode:i,suffixIcon:_,menuItemSelectedIcon:j,removeIcon:x,clearIcon:M,notFoundContent:a,getPopupContainer:E,prefixCls:"kubed-select",$bordered:r})))}),l=U;l.SECRET_COMBOBOX_MODE_DO_NOT_USE=S,l.Option=w,l.OptGroup=P,l.displayName="@kubed/components/Select";export{l as Select};
|
|
2
2
|
//# sourceMappingURL=Select.js.map
|
package/esm/Select/Select.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.js","sources":["../../src/Select/Select.tsx"],"sourcesContent":["// https://github.dev/ant-design/ant-design/blob/756dc8f130547277a28548c5b46658ff46f131f9/components/select/index.tsx\nimport React from 'react';\nimport { Option, OptGroup } from 'rc-select';\nimport forwardRef from '../utils/forwardRef';\nimport getIcons from './iconUtil';\nimport {\n StyledSelect,\n SelectStyles,\n Empty,\n InternalSelectProps,\n SelectProps,\n} from './Select.styles';\n\ntype RawValue = string | number;\n\nexport type OptionType = typeof Option;\n\nexport interface LabeledValue {\n key?: string;\n value: RawValue;\n label: React.ReactNode;\n}\n\nexport type SelectValue = RawValue | RawValue[] | LabeledValue | LabeledValue[] | undefined;\n\nexport interface RefSelectProps {\n focus: () => void;\n blur: () => void;\n}\n\nconst SECRET_COMBOBOX_MODE_DO_NOT_USE = 'SECRET_COMBOBOX_MODE_DO_NOT_USE';\n\nconst InternalSelect = forwardRef<SelectProps<any>, 'div'>(\n (\n {\n bordered = true,\n getPopupContainer,\n listHeight = 256,\n listItemHeight = 24,\n notFoundContent,\n virtual,\n dropdownMatchSelectWidth,\n ...rest\n },\n ref\n ) => {\n const mode = React.useMemo(() => {\n const { mode: m } = rest as InternalSelectProps<any>;\n\n if ((m as any) === 'combobox') {\n return undefined;\n }\n\n if (m === SECRET_COMBOBOX_MODE_DO_NOT_USE) {\n return 'combobox';\n }\n\n return m;\n }, [rest.mode]);\n\n const isMultiple = mode === 'multiple' || mode === 'tags';\n\n // ===================== Empty =====================\n let mergedNotFound: React.ReactNode;\n if (notFoundContent !== undefined) {\n mergedNotFound = <Empty>{notFoundContent}</Empty>;\n } else if (mode === 'combobox') {\n mergedNotFound = null;\n } else {\n mergedNotFound = <Empty>No Data</Empty>;\n }\n\n const { suffixIcon, itemIcon, removeIcon, clearIcon } = getIcons({\n ...rest,\n multiple: isMultiple,\n } /** // FIXME: remove any */ as any);\n\n return (\n <>\n <SelectStyles />\n <StyledSelect\n ref={ref}\n virtual={virtual}\n dropdownMatchSelectWidth={dropdownMatchSelectWidth}\n {...rest}\n listHeight={listHeight}\n listItemHeight={listItemHeight}\n mode={mode}\n
|
|
1
|
+
{"version":3,"file":"Select.js","sources":["../../src/Select/Select.tsx"],"sourcesContent":["// https://github.dev/ant-design/ant-design/blob/756dc8f130547277a28548c5b46658ff46f131f9/components/select/index.tsx\nimport React from 'react';\nimport { Option, OptGroup } from 'rc-select';\nimport forwardRef from '../utils/forwardRef';\nimport getIcons from './iconUtil';\nimport {\n StyledSelect,\n SelectStyles,\n Empty,\n InternalSelectProps,\n SelectProps,\n} from './Select.styles';\n\ntype RawValue = string | number;\n\nexport type OptionType = typeof Option;\n\nexport interface LabeledValue {\n key?: string;\n value: RawValue;\n label: React.ReactNode;\n}\n\nexport type SelectValue = RawValue | RawValue[] | LabeledValue | LabeledValue[] | undefined;\n\nexport interface RefSelectProps {\n focus: () => void;\n blur: () => void;\n}\n\nconst SECRET_COMBOBOX_MODE_DO_NOT_USE = 'SECRET_COMBOBOX_MODE_DO_NOT_USE';\n\nconst InternalSelect = forwardRef<SelectProps<any>, 'div'>(\n (\n {\n bordered = true,\n getPopupContainer,\n listHeight = 256,\n listItemHeight = 24,\n notFoundContent,\n virtual,\n dropdownMatchSelectWidth,\n ...rest\n },\n ref\n ) => {\n const mode = React.useMemo(() => {\n const { mode: m } = rest as InternalSelectProps<any>;\n\n if ((m as any) === 'combobox') {\n return undefined;\n }\n\n if (m === SECRET_COMBOBOX_MODE_DO_NOT_USE) {\n return 'combobox';\n }\n\n return m;\n }, [rest.mode]);\n\n const isMultiple = mode === 'multiple' || mode === 'tags';\n\n // ===================== Empty =====================\n let mergedNotFound: React.ReactNode;\n if (notFoundContent !== undefined) {\n mergedNotFound = <Empty>{notFoundContent}</Empty>;\n } else if (mode === 'combobox') {\n mergedNotFound = null;\n } else {\n mergedNotFound = <Empty>No Data</Empty>;\n }\n\n const { suffixIcon, itemIcon, removeIcon, clearIcon } = getIcons({\n ...rest,\n multiple: isMultiple,\n } /** // FIXME: remove any */ as any);\n\n return (\n <>\n <SelectStyles />\n <StyledSelect\n ref={ref}\n virtual={virtual}\n dropdownMatchSelectWidth={dropdownMatchSelectWidth}\n {...rest}\n listHeight={listHeight}\n listItemHeight={listItemHeight}\n mode={mode}\n suffixIcon={suffixIcon}\n menuItemSelectedIcon={itemIcon}\n removeIcon={removeIcon}\n clearIcon={clearIcon}\n notFoundContent={mergedNotFound}\n getPopupContainer={getPopupContainer}\n prefixCls=\"kubed-select\"\n $bordered={bordered}\n />\n </>\n );\n }\n);\n\ntype InternalSelectType = typeof InternalSelect;\n\ninterface SelectInterface extends InternalSelectType {\n SECRET_COMBOBOX_MODE_DO_NOT_USE: string;\n Option: typeof Option;\n OptGroup: typeof OptGroup;\n}\n\nexport const Select = InternalSelect as SelectInterface;\n\nSelect.SECRET_COMBOBOX_MODE_DO_NOT_USE = SECRET_COMBOBOX_MODE_DO_NOT_USE;\nSelect.Option = Option;\nSelect.OptGroup = OptGroup;\n\nSelect.displayName = '@kubed/components/Select';\n"],"names":["w","l","_","C","P","h","U","V","v"],"mappings":";;;;;;AAAA,IAAI,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,yBAAyB,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,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,CAAC,IAAI,CAACA,UAAC,CAAC,aAAa,CAACI,YAAC,CAAC,IAAI,CAAC,CAACJ,UAAC,CAAC,aAAa,CAACK,YAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,wBAAwB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,oBAAoB,CAACH,GAAC,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,SAAS,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAa,MAAC,MAAM,CAAC,EAAE,MAAM,CAAC,+BAA+B,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAACI,MAAC,CAAC,MAAM,CAAC,QAAQ,CAACC,QAAC,CAAC,MAAM,CAAC,WAAW,CAAC,0BAA0B;;;;"}
|
|
@@ -3,6 +3,7 @@ import t,{createGlobalStyle as i}from"styled-components";import o from"rc-select
|
|
|
3
3
|
display: none;
|
|
4
4
|
}
|
|
5
5
|
.kubed-select-dropdown {
|
|
6
|
+
position: absolute;
|
|
6
7
|
z-index: 1000;
|
|
7
8
|
padding: 4px 0;
|
|
8
9
|
border-radius: 4px;
|
|
@@ -30,8 +31,13 @@ import t,{createGlobalStyle as i}from"styled-components";import o from"rc-select
|
|
|
30
31
|
display: flex;
|
|
31
32
|
}
|
|
32
33
|
|
|
34
|
+
.kubed-select-selection-wrap {
|
|
35
|
+
min-height: 30px;
|
|
36
|
+
}
|
|
37
|
+
|
|
33
38
|
.kubed-select-item-option-content {
|
|
34
39
|
flex-grow: 1;
|
|
40
|
+
word-break: break-all;
|
|
35
41
|
}
|
|
36
42
|
|
|
37
43
|
.kubed-select-item-option-state {
|
|
@@ -65,6 +71,11 @@ import t,{createGlobalStyle as i}from"styled-components";import o from"rc-select
|
|
|
65
71
|
}
|
|
66
72
|
}
|
|
67
73
|
|
|
74
|
+
.kubed-select-selection-overflow {
|
|
75
|
+
overflow-x: hidden;
|
|
76
|
+
max-width: 100%;
|
|
77
|
+
}
|
|
78
|
+
|
|
68
79
|
&:hover {
|
|
69
80
|
.kubed-select-clear {
|
|
70
81
|
opacity: 1;
|
|
@@ -73,6 +84,8 @@ import t,{createGlobalStyle as i}from"styled-components";import o from"rc-select
|
|
|
73
84
|
|
|
74
85
|
.kubed-select-selector {
|
|
75
86
|
display: flex;
|
|
87
|
+
align-items: center;
|
|
88
|
+
gap: 4px;
|
|
76
89
|
position: relative;
|
|
77
90
|
width: 100%;
|
|
78
91
|
padding: 0 11px;
|
|
@@ -172,6 +185,16 @@ import t,{createGlobalStyle as i}from"styled-components";import o from"rc-select
|
|
|
172
185
|
}
|
|
173
186
|
}
|
|
174
187
|
|
|
188
|
+
.kubed-select-selection-wrap {
|
|
189
|
+
position: relative;
|
|
190
|
+
flex: 1;
|
|
191
|
+
display: flex;
|
|
192
|
+
width: 100%;
|
|
193
|
+
position: relative;
|
|
194
|
+
min-width: 0;
|
|
195
|
+
max-width: 100%;
|
|
196
|
+
}
|
|
197
|
+
|
|
175
198
|
.kubed-select-selector {
|
|
176
199
|
height: 32px; // to
|
|
177
200
|
|
|
@@ -185,16 +208,18 @@ import t,{createGlobalStyle as i}from"styled-components";import o from"rc-select
|
|
|
185
208
|
}
|
|
186
209
|
|
|
187
210
|
.kubed-select-selection-search {
|
|
211
|
+
width: 100%;
|
|
188
212
|
position: absolute;
|
|
189
213
|
top: 0;
|
|
190
214
|
right: 11px;
|
|
191
215
|
bottom: 0;
|
|
192
|
-
left:
|
|
216
|
+
left: 0;
|
|
193
217
|
}
|
|
194
218
|
|
|
195
219
|
.kubed-select-selection-search-input {
|
|
196
|
-
width: 100
|
|
220
|
+
width: calc(100% - 18px);
|
|
197
221
|
height: 30px;
|
|
222
|
+
line-height: 30px;
|
|
198
223
|
}
|
|
199
224
|
|
|
200
225
|
.kubed-select-selection-placeholder {
|
|
@@ -206,6 +231,11 @@ import t,{createGlobalStyle as i}from"styled-components";import o from"rc-select
|
|
|
206
231
|
}
|
|
207
232
|
|
|
208
233
|
&.kubed-select-multiple {
|
|
234
|
+
&.kubed-select-show-arrow {
|
|
235
|
+
.kubed-select-selection-wrap {
|
|
236
|
+
max-width: calc(100% - 24px);
|
|
237
|
+
}
|
|
238
|
+
}
|
|
209
239
|
&.kubed-select-allow-clear {
|
|
210
240
|
.kubed-select-selector {
|
|
211
241
|
padding-right: 24px;
|
|
@@ -218,15 +248,21 @@ import t,{createGlobalStyle as i}from"styled-components";import o from"rc-select
|
|
|
218
248
|
width: 100%;
|
|
219
249
|
padding: 1px 4px;
|
|
220
250
|
}
|
|
251
|
+
.kubed-select-selection-wrap {
|
|
252
|
+
display: grid;
|
|
253
|
+
grid-template-columns: auto 1fr;
|
|
254
|
+
align-items: center;
|
|
255
|
+
}
|
|
221
256
|
|
|
222
257
|
.kubed-select-selection-placeholder {
|
|
223
|
-
|
|
258
|
+
position: relative;
|
|
259
|
+
/* line-height: 30px;
|
|
224
260
|
position: absolute;
|
|
225
261
|
top: 50%;
|
|
226
262
|
right: 11px;
|
|
227
263
|
left: 11px;
|
|
228
|
-
transform: translateY(-50%);
|
|
229
|
-
transition: all 0.3s;
|
|
264
|
+
transform: translateY(-50%); */
|
|
265
|
+
/* transition: all 0.3s; */
|
|
230
266
|
}
|
|
231
267
|
|
|
232
268
|
.kubed-select-selection-item {
|
|
@@ -264,6 +300,11 @@ import t,{createGlobalStyle as i}from"styled-components";import o from"rc-select
|
|
|
264
300
|
.kubed-select-selection-search-input {
|
|
265
301
|
height: 20px;
|
|
266
302
|
line-height: 20px;
|
|
303
|
+
min-width: 100%;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
.kubed-select-selection-overflow-item-suffix {
|
|
307
|
+
overflow-x: hidden;
|
|
267
308
|
}
|
|
268
309
|
|
|
269
310
|
.kubed-select-selection-search-mirror {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.styles.js","sources":["../../src/Select/Select.styles.ts"],"sourcesContent":["import styled, { createGlobalStyle } from 'styled-components';\nimport RcSelect, { SelectProps as RcSelectProps } from 'rc-select';\nimport React from 'react';\nimport { KubedSizes } from '../theme';\nimport { addColorAlpha } from '../utils/color';\n\nexport interface InternalSelectProps<VT> extends Omit<RcSelectProps<VT>, 'mode'> {\n suffixIcon?: React.ReactNode;\n size?: KubedSizes;\n mode?: 'multiple' | 'tags' | 'SECRET_COMBOBOX_MODE_DO_NOT_USE';\n bordered?: boolean;\n}\n\nexport interface SelectProps<VT>\n extends Omit<\n InternalSelectProps<VT>,\n 'inputIcon' | 'mode' | 'getInputElement' | 'getRawInputElement' | 'backfill'\n > {\n mode?: 'multiple' | 'tags';\n}\n\nexport const SelectStyles = createGlobalStyle`\n .kubed-select-dropdown-hidden {\n display: none;\n }\n .kubed-select-dropdown {\n z-index: 1000;\n padding: 4px 0;\n border-radius: 4px;\n background-color: ${({ theme }) => theme.palette.accents_8};\n box-shadow: 0 4px 8px 0 ${({ theme }) => addColorAlpha(theme.palette.accents_8, 0.16)};\n }\n\n .kubed-select-item {\n position: relative;\n padding: 6px 12px;\n color: ${({ theme }) => theme.palette.background};\n line-height: 1.67;\n cursor: pointer;\n font-family: Roboto,PingFang SC,Lantinghei SC,Helvetica Neue,Helvetica,Arial,Microsoft YaHei,微软雅黑,STHeitiSC-Light,simsun,宋体,WenQuanYi Zen Hei,WenQuanYi Micro Hei,sans-serif;\n user-select: none;\n\n &.kubed-select-item-option-selected,\n &:hover {\n background-color: ${({ theme }) => theme.palette.accents_7};\n font-weight: 600;\n }\n }\n\n .kubed-select-item-option {\n display: flex;\n }\n\n .kubed-select-item-option-content {\n flex-grow: 1;\n }\n\n .kubed-select-item-option-state {\n display: inline-flex;\n align-items: center;\n\n .kubed-icon {\n color: ${({ theme }) => theme.palette.colors.green[2]};\n }\n }\n`;\n\nexport const Empty = styled.div`\n color: ${({ theme }) => theme.palette.background};\n padding: 20px 0;\n text-align: center;\n`;\n\nexport const StyledSelect = styled(RcSelect)<SelectProps<any>>`\n display: inline-block;\n line-height: 1.67;\n position: relative;\n cursor: pointer;\n min-width: 100px;\n\n &.kubed-select-open {\n .kubed-select-selector {\n border-color: ${({ theme }) => theme.palette.colors.green[2]} !important;\n }\n }\n\n &.kubed-select-show-search {\n input {\n cursor: auto !important;\n }\n }\n\n &:hover {\n .kubed-select-clear {\n opacity: 1;\n }\n }\n\n .kubed-select-selector {\n display: flex;\n position: relative;\n width: 100%;\n padding: 0 11px;\n background-color: ${({ theme }) => theme.palette.background};\n border: 1px solid ${({ theme }) => theme.palette.accents_4};\n border-radius: 4px;\n transition: border-color 0.3s ease-in-out;\n font-weight: 600;\n color: ${({ theme }) => theme.palette.accents_7};\n\n &:hover {\n border-color: ${({ theme }) => theme.palette.accents_5};\n }\n\n .kubed-select-selection-search-input {\n margin: 0;\n padding: 0;\n background: 0 0;\n outline: none;\n border: none;\n appearance: none;\n }\n }\n\n .kubed-select-selection-item {\n flex: 1;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n line-height: 30px;\n }\n\n .kubed-select-arrow {\n display: inline-block;\n position: absolute;\n top: 50%;\n right: 11px;\n width: 16px;\n height: 16px;\n pointer-events: none;\n text-align: center;\n transform: translateY(-50%);\n }\n\n .kubed-select-clear {\n position: absolute;\n top: 50%;\n right: 11px;\n z-index: 1;\n display: inline-block;\n width: 16px;\n height: 16px;\n transform: translateY(-50%);\n text-align: center;\n cursor: pointer;\n background-color: ${({ theme }) => theme.palette.background};\n opacity: 0;\n transition: all 0.1s ease; // todo\n\n &:hover {\n background-color: ${({ theme }) => theme.palette.accents_1};\n }\n }\n\n .kubed-select-selection-placeholder {\n flex: 1;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n }\n\n .kubed-select-selection-overflow {\n position: relative;\n display: flex;\n flex: auto;\n flex-wrap: wrap;\n max-width: 100%;\n cursor: text;\n line-height: 24px;\n }\n\n .kubed-select-selection-overflow-item {\n flex: none;\n align-self: center;\n max-width: 100%;\n }\n\n &.kubed-select-single {\n &.kubed-select-show-arrow {\n .kubed-select-selection-item,\n .kubed-select-selection-placeholder {\n padding-right: 18px;\n }\n\n .kubed-select-selection-search {\n right: 25px !important;\n }\n }\n\n .kubed-select-selector {\n height: 32px; // to\n\n input {\n cursor: pointer;\n }\n\n .kubed-select-selection-item {\n position: relative;\n user-select: none;\n }\n\n .kubed-select-selection-search {\n position: absolute;\n top: 0;\n right: 11px;\n bottom: 0;\n left: 11px;\n }\n\n .kubed-select-selection-search-input {\n width: 100%;\n height: 30px;\n }\n\n .kubed-select-selection-placeholder {\n padding: 0;\n line-height: 30px;\n transition: all 0.3s;\n }\n }\n }\n\n &.kubed-select-multiple {\n &.kubed-select-allow-clear {\n .kubed-select-selector {\n padding-right: 24px;\n }\n }\n\n .kubed-select-selector {\n flex-wrap: wrap;\n align-items: center;\n width: 100%;\n padding: 1px 4px;\n }\n\n .kubed-select-selection-placeholder {\n line-height: 30px;\n position: absolute;\n top: 50%;\n right: 11px;\n left: 11px;\n transform: translateY(-50%);\n transition: all 0.3s;\n }\n\n .kubed-select-selection-item {\n position: relative;\n color: ${({ theme }) => theme.palette.background};\n background-color: ${({ theme }) => theme.palette.accents_8};\n font-weight: 600;\n border-radius: 2px;\n display: inline-flex;\n height: 20px;\n line-height: 20px;\n padding: 0 4px;\n align-items: center;\n margin-right: 5px;\n }\n\n .kubed-select-selection-item-remove {\n cursor: pointer;\n display: inline-flex;\n margin-left: 8px;\n .kubed-icon {\n color: #fff;\n fill: #fff;\n }\n }\n\n .kubed-select-selection-search {\n position: relative;\n max-width: 100%;\n margin-top: 2px;\n margin-bottom: 2px;\n margin-inline-start: 7px;\n }\n\n .kubed-select-selection-search-input {\n height: 20px;\n line-height: 20px;\n }\n\n .kubed-select-selection-search-mirror {\n position: absolute;\n top: 0;\n left: 0;\n z-index: 999;\n white-space: pre;\n visibility: hidden;\n height: 20px;\n line-height: 20px;\n }\n }\n`;\n"],"names":["o","l","t"],"mappings":";;;;AAA6I,MAAC,YAAY,CAACA,iBAAC,CAAC;AAC7J;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;AACzD,4BAA4B,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAGC,aAAC,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;AACtE;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AACtD;AACA;AACA,CAAC,CAAC,KAAK,CAACC,CAAC,CAAC,GAAG,CAAC;AACd,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC;AAC7C;AACA;AACA,CAAC,CAAC,YAAY,CAACA,CAAC,CAAC,CAAC,CAAC,CAAC;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC;AAC1D,sBAAsB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;AACzD;AACA;AACA;AACA,WAAW,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;AAC9C;AACA;AACA,oBAAoB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC;AAC1D;AACA;AACA;AACA;AACA,wBAAwB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC;AACjD,wBAAwB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;"}
|
|
1
|
+
{"version":3,"file":"Select.styles.js","sources":["../../src/Select/Select.styles.ts"],"sourcesContent":["import styled, { createGlobalStyle } from 'styled-components';\nimport RcSelect, { SelectProps as RcSelectProps } from 'rc-select';\nimport React from 'react';\nimport { KubedSizes } from '../theme';\nimport { addColorAlpha } from '../utils/color';\n\nexport interface InternalSelectProps<VT> extends Omit<RcSelectProps<VT>, 'mode'> {\n suffixIcon?: React.ReactNode;\n size?: KubedSizes;\n mode?: 'multiple' | 'tags' | 'SECRET_COMBOBOX_MODE_DO_NOT_USE';\n bordered?: boolean;\n}\n\nexport interface SelectProps<VT>\n extends Omit<\n InternalSelectProps<VT>,\n 'inputIcon' | 'mode' | 'getInputElement' | 'getRawInputElement' | 'backfill'\n > {\n mode?: 'multiple' | 'tags';\n showArrow?: boolean;\n}\n\nexport const SelectStyles = createGlobalStyle`\n .kubed-select-dropdown-hidden {\n display: none;\n }\n .kubed-select-dropdown {\n position: absolute;\n z-index: 1000;\n padding: 4px 0;\n border-radius: 4px;\n background-color: ${({ theme }) => theme.palette.accents_8};\n box-shadow: 0 4px 8px 0 ${({ theme }) => addColorAlpha(theme.palette.accents_8, 0.16)};\n }\n\n .kubed-select-item {\n position: relative;\n padding: 6px 12px;\n color: ${({ theme }) => theme.palette.background};\n line-height: 1.67;\n cursor: pointer;\n font-family: Roboto,PingFang SC,Lantinghei SC,Helvetica Neue,Helvetica,Arial,Microsoft YaHei,微软雅黑,STHeitiSC-Light,simsun,宋体,WenQuanYi Zen Hei,WenQuanYi Micro Hei,sans-serif;\n user-select: none;\n\n &.kubed-select-item-option-selected,\n &:hover {\n background-color: ${({ theme }) => theme.palette.accents_7};\n font-weight: 600;\n }\n }\n\n .kubed-select-item-option {\n display: flex;\n }\n\n .kubed-select-selection-wrap {\n min-height: 30px;\n }\n \n .kubed-select-item-option-content {\n flex-grow: 1;\n word-break: break-all;\n }\n\n .kubed-select-item-option-state {\n display: inline-flex;\n align-items: center;\n\n .kubed-icon {\n color: ${({ theme }) => theme.palette.colors.green[2]};\n }\n }\n`;\n\nexport const Empty = styled.div`\n color: ${({ theme }) => theme.palette.background};\n padding: 20px 0;\n text-align: center;\n`;\n\nexport const StyledSelect = styled(RcSelect)<SelectProps<any>>`\n display: inline-block;\n line-height: 1.67;\n position: relative;\n cursor: pointer;\n min-width: 100px;\n\n &.kubed-select-open {\n .kubed-select-selector {\n border-color: ${({ theme }) => theme.palette.colors.green[2]} !important;\n }\n }\n\n &.kubed-select-show-search {\n input {\n cursor: auto !important;\n }\n }\n\n .kubed-select-selection-overflow {\n overflow-x: hidden;\n max-width: 100%;\n }\n\n &:hover {\n .kubed-select-clear {\n opacity: 1;\n }\n }\n\n .kubed-select-selector {\n display: flex;\n align-items: center;\n gap: 4px;\n position: relative;\n width: 100%;\n padding: 0 11px;\n background-color: ${({ theme }) => theme.palette.background};\n border: 1px solid ${({ theme }) => theme.palette.accents_4};\n border-radius: 4px;\n transition: border-color 0.3s ease-in-out;\n font-weight: 600;\n color: ${({ theme }) => theme.palette.accents_7};\n\n &:hover {\n border-color: ${({ theme }) => theme.palette.accents_5};\n }\n\n .kubed-select-selection-search-input {\n margin: 0;\n padding: 0;\n background: 0 0;\n outline: none;\n border: none;\n appearance: none;\n }\n }\n\n .kubed-select-selection-item {\n flex: 1;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n line-height: 30px;\n }\n\n .kubed-select-arrow {\n display: inline-block;\n position: absolute;\n top: 50%;\n right: 11px;\n width: 16px;\n height: 16px;\n pointer-events: none;\n text-align: center;\n transform: translateY(-50%);\n }\n\n .kubed-select-clear {\n position: absolute;\n top: 50%;\n right: 11px;\n z-index: 1;\n display: inline-block;\n width: 16px;\n height: 16px;\n transform: translateY(-50%);\n text-align: center;\n cursor: pointer;\n background-color: ${({ theme }) => theme.palette.background};\n opacity: 0;\n transition: all 0.1s ease; // todo\n\n &:hover {\n background-color: ${({ theme }) => theme.palette.accents_1};\n }\n }\n\n .kubed-select-selection-placeholder {\n flex: 1;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n }\n\n .kubed-select-selection-overflow {\n position: relative;\n display: flex;\n flex: auto;\n flex-wrap: wrap;\n max-width: 100%;\n cursor: text;\n line-height: 24px;\n }\n\n .kubed-select-selection-overflow-item {\n flex: none;\n align-self: center;\n max-width: 100%;\n }\n\n &.kubed-select-single {\n &.kubed-select-show-arrow {\n .kubed-select-selection-item,\n .kubed-select-selection-placeholder {\n padding-right: 18px;\n }\n\n .kubed-select-selection-search {\n right: 25px !important;\n }\n }\n\n .kubed-select-selection-wrap {\n position: relative;\n flex: 1;\n display: flex;\n width: 100%;\n position: relative;\n min-width: 0;\n max-width: 100%;\n }\n\n .kubed-select-selector {\n height: 32px; // to\n\n input {\n cursor: pointer;\n }\n\n .kubed-select-selection-item {\n position: relative;\n user-select: none;\n }\n\n .kubed-select-selection-search {\n width: 100%;\n position: absolute;\n top: 0;\n right: 11px;\n bottom: 0;\n left: 0;\n }\n\n .kubed-select-selection-search-input {\n width: calc(100% - 18px);\n height: 30px;\n line-height: 30px;\n }\n\n .kubed-select-selection-placeholder {\n padding: 0;\n line-height: 30px;\n transition: all 0.3s;\n }\n }\n }\n\n &.kubed-select-multiple {\n &.kubed-select-show-arrow {\n .kubed-select-selection-wrap {\n max-width: calc(100% - 24px);\n }\n }\n &.kubed-select-allow-clear {\n .kubed-select-selector {\n padding-right: 24px;\n }\n }\n\n .kubed-select-selector {\n flex-wrap: wrap;\n align-items: center;\n width: 100%;\n padding: 1px 4px;\n }\n .kubed-select-selection-wrap {\n display: grid;\n grid-template-columns: auto 1fr;\n align-items: center;\n }\n\n .kubed-select-selection-placeholder {\n position: relative;\n /* line-height: 30px;\n position: absolute;\n top: 50%;\n right: 11px;\n left: 11px;\n transform: translateY(-50%); */\n /* transition: all 0.3s; */\n }\n\n .kubed-select-selection-item {\n position: relative;\n color: ${({ theme }) => theme.palette.background};\n background-color: ${({ theme }) => theme.palette.accents_8};\n font-weight: 600;\n border-radius: 2px;\n display: inline-flex;\n height: 20px;\n line-height: 20px;\n padding: 0 4px;\n align-items: center;\n margin-right: 5px;\n }\n\n .kubed-select-selection-item-remove {\n cursor: pointer;\n display: inline-flex;\n margin-left: 8px;\n .kubed-icon {\n color: #fff;\n fill: #fff;\n }\n }\n\n .kubed-select-selection-search {\n position: relative;\n max-width: 100%;\n margin-top: 2px;\n margin-bottom: 2px;\n margin-inline-start: 7px;\n }\n\n .kubed-select-selection-search-input {\n height: 20px;\n line-height: 20px;\n min-width: 100%;\n }\n\n .kubed-select-selection-overflow-item-suffix {\n overflow-x: hidden;\n }\n\n .kubed-select-selection-search-mirror {\n position: absolute;\n top: 0;\n left: 0;\n z-index: 999;\n white-space: pre;\n visibility: hidden;\n height: 20px;\n line-height: 20px;\n }\n }\n`;\n"],"names":["i","l","t"],"mappings":";;;;AAA6I,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A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC;AAC1D,sBAAsB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;AACzD;AACA;AACA;AACA,WAAW,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;AAC9C;AACA;AACA,oBAAoB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC;AAC1D;AACA;AACA;AACA;AACA,wBAAwB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC;AACjD,wBAAwB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;"}
|
package/esm/Select/iconUtil.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import e from"react";import{Close as
|
|
1
|
+
import e from"react";import{Close as a,Magnifier as E,ChevronUp as p,ChevronDown as v,Check as m}from"@kubed/icons";import{Loading as h}from"../Loading/Loading.js";function g({suffixIcon:i,clearIcon:s,menuItemSelectedIcon:l,removeIcon:r,loading:u,multiple:d,showArrow:f=!1}){const I=s||e.createElement(a,{size:16});let o=null;i!==void 0?o=i:u?o=e.createElement(h,{size:16}):o=({open:c,showSearch:z})=>c&&z?e.createElement(E,{size:16}):f?c?e.createElement(p,{size:16}):e.createElement(v,{size:16}):null;let n=null;l!==void 0?n=l:d?n=e.createElement(m,{size:16}):n=e.createElement(m,{size:16});let t=null;return r!==void 0?t=r:t=e.createElement(a,{size:16}),{clearIcon:I,suffixIcon:o,itemIcon:n,removeIcon:t}}export{g as default};
|
|
2
2
|
//# sourceMappingURL=iconUtil.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"iconUtil.js","sources":["../../src/Select/iconUtil.tsx"],"sourcesContent":["import React from 'react';\nimport { Close, Magnifier, ChevronDown, ChevronUp, Check } from '@kubed/icons';\nimport { Loading } from '../Loading/Loading';\n\ninterface IconProps {\n suffixIcon?: React.ReactNode;\n clearIcon?: React.ReactNode;\n menuItemSelectedIcon?: React.ReactNode;\n removeIcon?: React.ReactNode;\n loading?: boolean;\n multiple?: boolean;\n}\nexport default function getIcons({\n suffixIcon,\n clearIcon,\n menuItemSelectedIcon,\n removeIcon,\n loading,\n multiple,\n}: IconProps) {\n const mergedClearIcon = clearIcon || <Close size={16} />;\n
|
|
1
|
+
{"version":3,"file":"iconUtil.js","sources":["../../src/Select/iconUtil.tsx"],"sourcesContent":["import React from 'react';\nimport { Close, Magnifier, ChevronDown, ChevronUp, Check } from '@kubed/icons';\nimport { Loading } from '../Loading/Loading';\n\ninterface IconProps {\n suffixIcon?: React.ReactNode;\n clearIcon?: React.ReactNode;\n menuItemSelectedIcon?: React.ReactNode;\n removeIcon?: React.ReactNode;\n loading?: boolean;\n multiple?: boolean;\n showArrow?: boolean;\n}\nexport default function getIcons({\n suffixIcon,\n clearIcon,\n menuItemSelectedIcon,\n removeIcon,\n loading,\n multiple,\n showArrow = false,\n}: IconProps) {\n const mergedClearIcon = clearIcon || <Close size={16} />;\n // Arrow item icon\n let mergedSuffixIcon = null;\n if (suffixIcon !== undefined) {\n mergedSuffixIcon = suffixIcon;\n } else if (loading) {\n mergedSuffixIcon = <Loading size={16} />;\n } else {\n mergedSuffixIcon = ({ open, showSearch }: { open: boolean; showSearch: boolean }) => {\n if (open && showSearch) {\n return <Magnifier size={16} />;\n }\n if (showArrow) {\n if (open) {\n return <ChevronUp size={16} />;\n }\n return <ChevronDown size={16} />;\n }\n return null;\n };\n }\n\n // Checked item icon\n let mergedItemIcon = null;\n if (menuItemSelectedIcon !== undefined) {\n mergedItemIcon = menuItemSelectedIcon;\n } else if (multiple) {\n mergedItemIcon = <Check size={16} />;\n } else {\n mergedItemIcon = <Check size={16} />;\n }\n\n let mergedRemoveIcon = null;\n if (removeIcon !== undefined) {\n mergedRemoveIcon = removeIcon;\n } else {\n mergedRemoveIcon = <Close size={16} />;\n }\n\n return {\n clearIcon: mergedClearIcon,\n suffixIcon: mergedSuffixIcon,\n itemIcon: mergedItemIcon,\n removeIcon: mergedRemoveIcon,\n };\n}\n"],"names":["e","c","h","p","b","z","t"],"mappings":";;;;AAAgL,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAEA,UAAC,CAAC,aAAa,CAACC,KAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAACD,UAAC,CAAC,aAAa,CAACE,OAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAACF,UAAC,CAAC,aAAa,CAACG,SAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAACH,UAAC,CAAC,aAAa,CAACI,SAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAACJ,UAAC,CAAC,aAAa,CAACK,WAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAACL,UAAC,CAAC,aAAa,CAACM,KAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAACN,UAAC,CAAC,aAAa,CAACM,KAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAACN,UAAC,CAAC,aAAa,CAACC,KAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { SelectProps as RcSelectProps } from 'rc-select';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { KubedSizes } from '../theme';
|
|
4
4
|
export interface InternalSelectProps<VT> extends Omit<RcSelectProps<VT>, 'mode'> {
|
|
@@ -9,8 +9,14 @@ export interface InternalSelectProps<VT> extends Omit<RcSelectProps<VT>, 'mode'>
|
|
|
9
9
|
}
|
|
10
10
|
export interface SelectProps<VT> extends Omit<InternalSelectProps<VT>, 'inputIcon' | 'mode' | 'getInputElement' | 'getRawInputElement' | 'backfill'> {
|
|
11
11
|
mode?: 'multiple' | 'tags';
|
|
12
|
+
showArrow?: boolean;
|
|
12
13
|
}
|
|
13
14
|
export declare const SelectStyles: import("styled-components").GlobalStyleComponent<{}, import("styled-components").DefaultTheme>;
|
|
14
15
|
export declare const Empty: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
15
|
-
export declare const StyledSelect: import("styled-components").StyledComponent<
|
|
16
|
+
export declare const StyledSelect: import("styled-components").StyledComponent<(<ValueType = any, OptionType extends import("rc-select/lib/Select").DefaultOptionType | import("rc-select/lib/Select").BaseOptionType = import("rc-select/lib/Select").DefaultOptionType>(props: RcSelectProps<ValueType, OptionType> & {
|
|
17
|
+
children?: React.ReactNode;
|
|
18
|
+
} & React.RefAttributes<import("rc-select").BaseSelectRef>) => React.ReactElement<any, string | React.JSXElementConstructor<any>>) & {
|
|
19
|
+
Option: import("rc-select/lib/Option").OptionFC;
|
|
20
|
+
OptGroup: import("rc-select/lib/OptGroup").OptionGroupFC;
|
|
21
|
+
}, import("styled-components").DefaultTheme, SelectProps<any>, never>;
|
|
16
22
|
//# sourceMappingURL=Select.styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.styles.d.ts","sourceRoot":"","sources":["../../../src/Select/Select.styles.ts"],"names":[],"mappings":"AACA,
|
|
1
|
+
{"version":3,"file":"Select.styles.d.ts","sourceRoot":"","sources":["../../../src/Select/Select.styles.ts"],"names":[],"mappings":"AACA,OAAiB,EAAE,WAAW,IAAI,aAAa,EAAE,MAAM,WAAW,CAAC;AACnE,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAGtC,MAAM,WAAW,mBAAmB,CAAC,EAAE,CAAE,SAAQ,IAAI,CAAC,aAAa,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC;IAC9E,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC7B,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,IAAI,CAAC,EAAE,UAAU,GAAG,MAAM,GAAG,iCAAiC,CAAC;IAC/D,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,WAAW,CAAC,EAAE,CAC7B,SAAQ,IAAI,CACV,mBAAmB,CAAC,EAAE,CAAC,EACvB,WAAW,GAAG,MAAM,GAAG,iBAAiB,GAAG,oBAAoB,GAAG,UAAU,CAC7E;IACD,IAAI,CAAC,EAAE,UAAU,GAAG,MAAM,CAAC;IAC3B,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,YAAY,gGAkDxB,CAAC;AAEF,eAAO,MAAM,KAAK,yGAIjB,CAAC;AAEF,eAAO,MAAM,YAAY;;;;;qEA0QxB,CAAC"}
|
|
@@ -6,8 +6,9 @@ interface IconProps {
|
|
|
6
6
|
removeIcon?: React.ReactNode;
|
|
7
7
|
loading?: boolean;
|
|
8
8
|
multiple?: boolean;
|
|
9
|
+
showArrow?: boolean;
|
|
9
10
|
}
|
|
10
|
-
export default function getIcons({ suffixIcon, clearIcon, menuItemSelectedIcon, removeIcon, loading, multiple, }: IconProps): {
|
|
11
|
+
export default function getIcons({ suffixIcon, clearIcon, menuItemSelectedIcon, removeIcon, loading, multiple, showArrow, }: IconProps): {
|
|
11
12
|
clearIcon: string | number | true | Iterable<React.ReactNode> | React.JSX.Element;
|
|
12
13
|
suffixIcon: any;
|
|
13
14
|
itemIcon: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"iconUtil.d.ts","sourceRoot":"","sources":["../../../src/Select/iconUtil.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,UAAU,SAAS;IACjB,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC7B,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC5B,oBAAoB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvC,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC7B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"iconUtil.d.ts","sourceRoot":"","sources":["../../../src/Select/iconUtil.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,UAAU,SAAS;IACjB,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC7B,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC5B,oBAAoB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvC,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC7B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AACD,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,EAC/B,UAAU,EACV,SAAS,EACT,oBAAoB,EACpB,UAAU,EACV,OAAO,EACP,QAAQ,EACR,SAAiB,GAClB,EAAE,SAAS;;;;;EA8CX"}
|