@hi-ui/tree-select 4.0.0-alpha.10

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.
Files changed (52) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +11 -0
  3. package/lib/cjs/TreeSelect.js +280 -0
  4. package/lib/cjs/TreeSelect.js.map +1 -0
  5. package/lib/cjs/hooks/use-latest/lib/esm/index.js +65 -0
  6. package/lib/cjs/hooks/use-latest/lib/esm/index.js.map +1 -0
  7. package/lib/cjs/hooks/use-merge-refs/lib/esm/index.js +77 -0
  8. package/lib/cjs/hooks/use-merge-refs/lib/esm/index.js.map +1 -0
  9. package/lib/cjs/index.js +22 -0
  10. package/lib/cjs/index.js.map +1 -0
  11. package/lib/cjs/styles/index.scss.js +22 -0
  12. package/lib/cjs/styles/index.scss.js.map +1 -0
  13. package/lib/cjs/ui/input/lib/esm/Input.js +232 -0
  14. package/lib/cjs/ui/input/lib/esm/Input.js.map +1 -0
  15. package/lib/cjs/ui/input/lib/esm/MockInput.js +161 -0
  16. package/lib/cjs/ui/input/lib/esm/MockInput.js.map +1 -0
  17. package/lib/cjs/ui/input/lib/esm/TextArea.js +112 -0
  18. package/lib/cjs/ui/input/lib/esm/TextArea.js.map +1 -0
  19. package/lib/cjs/ui/input/lib/esm/styles/index.scss.js +32 -0
  20. package/lib/cjs/ui/input/lib/esm/styles/index.scss.js.map +1 -0
  21. package/lib/cjs/ui/input/lib/esm/use-input.js +108 -0
  22. package/lib/cjs/ui/input/lib/esm/use-input.js.map +1 -0
  23. package/lib/cjs/utils/dom-utils/lib/esm/index.js +34 -0
  24. package/lib/cjs/utils/dom-utils/lib/esm/index.js.map +1 -0
  25. package/lib/esm/TreeSelect.js +246 -0
  26. package/lib/esm/TreeSelect.js.map +1 -0
  27. package/lib/esm/hooks/use-latest/lib/esm/index.js +57 -0
  28. package/lib/esm/hooks/use-latest/lib/esm/index.js.map +1 -0
  29. package/lib/esm/hooks/use-merge-refs/lib/esm/index.js +69 -0
  30. package/lib/esm/hooks/use-merge-refs/lib/esm/index.js.map +1 -0
  31. package/lib/esm/index.js +12 -0
  32. package/lib/esm/index.js.map +1 -0
  33. package/lib/esm/styles/index.scss.js +17 -0
  34. package/lib/esm/styles/index.scss.js.map +1 -0
  35. package/lib/esm/ui/input/lib/esm/Input.js +208 -0
  36. package/lib/esm/ui/input/lib/esm/Input.js.map +1 -0
  37. package/lib/esm/ui/input/lib/esm/MockInput.js +139 -0
  38. package/lib/esm/ui/input/lib/esm/MockInput.js.map +1 -0
  39. package/lib/esm/ui/input/lib/esm/TextArea.js +90 -0
  40. package/lib/esm/ui/input/lib/esm/TextArea.js.map +1 -0
  41. package/lib/esm/ui/input/lib/esm/styles/index.scss.js +27 -0
  42. package/lib/esm/ui/input/lib/esm/styles/index.scss.js.map +1 -0
  43. package/lib/esm/ui/input/lib/esm/use-input.js +98 -0
  44. package/lib/esm/ui/input/lib/esm/use-input.js.map +1 -0
  45. package/lib/esm/utils/dom-utils/lib/esm/index.js +29 -0
  46. package/lib/esm/utils/dom-utils/lib/esm/index.js.map +1 -0
  47. package/lib/types/TreeSelect.d.ts +127 -0
  48. package/lib/types/context.d.ts +7 -0
  49. package/lib/types/index.d.ts +3 -0
  50. package/lib/types/types.d.ts +57 -0
  51. package/lib/types/use-tree-select.d.ts +8 -0
  52. package/package.json +73 -0
@@ -0,0 +1,27 @@
1
+ /** @LICENSE
2
+ * @hi-ui/tree-select
3
+ * https://github.com/XiaoMi/hiui/tree/master/packages/ui/tree-select#readme
4
+ *
5
+ * Copyright (c) HIUI <mi-hiui@xiaomi.com>.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */
10
+
11
+ /** @LICENSE
12
+ * @hi-ui/input
13
+ * https://github.com/XiaoMi/hiui/tree/master/packages/ui/input#readme
14
+ *
15
+ * Copyright (c) HIUI <mi-hiui@xiaomi.com>.
16
+ *
17
+ * This source code is licensed under the MIT license found in the
18
+ * LICENSE file in the root directory of this source tree.
19
+ */
20
+ var css_248z = "@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n.hi-v4-mock-input {\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n border: none;\n outline: none;\n -webkit-box-shadow: none;\n box-shadow: none;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n cursor: text;\n background-color: transparent;\n -webkit-tap-highlight-color: transparent;\n position: relative;\n overflow: hidden;\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: justify;\n -ms-flex-pack: justify;\n justify-content: space-between;\n -webkit-box-flex: 1;\n -ms-flex: 1 1;\n flex: 1 1;\n -webkit-transition-property: all;\n transition-property: all;\n -webkit-transition-duration: 200ms;\n transition-duration: 200ms;\n -webkit-transition-duration: var(--hi-v4-motion-duration-normal, 200ms);\n transition-duration: var(--hi-v4-motion-duration-normal, 200ms);\n -webkit-transition-timing-function: cubic-bezier(0.37, 0.02, 0.34, 1);\n transition-timing-function: cubic-bezier(0.37, 0.02, 0.34, 1);\n -webkit-transition-timing-function: var(--hi-v4-motion-bezier-normal, cubic-bezier(0.37, 0.02, 0.34, 1));\n transition-timing-function: var(--hi-v4-motion-bezier-normal, cubic-bezier(0.37, 0.02, 0.34, 1));\n width: 100%;\n height: auto;\n z-index: auto;\n font-size: inherit;\n line-height: inherit;\n color: #1f2733;\n color: var(--hi-v4-color-gray-700, #1f2733);\n border: 1px solid transparent;\n border: var(--hi-v4-border-size-normal, 1px solid) var(--hi-v4-color-static-transparent, transparent);\n background-color: #fff;\n background-color: var(--hi-v4-color-static-white, #fff); }\n.hi-v4-mock-input:not(.disabled):hover {\n z-index: calc(1 + 1);\n z-index: calc(var(--hi-v4-zindex-absolute, 1) + 1); }\n.hi-v4-mock-input:not(.disabled).focused {\n z-index: calc(1 + 1);\n z-index: calc(var(--hi-v4-zindex-absolute, 1) + 1); }\n.hi-v4-mock-input.disabled {\n cursor: not-allowed; }\n.hi-v4-mock-input__suffix, .hi-v4-mock-input__placeholder {\n color: #c9ced6;\n color: var(--hi-v4-color-gray-400, #c9ced6); }\n.hi-v4-mock-input__clear {\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n width: 16px;\n height: 16px;\n font-size: 0.875rem;\n font-size: var(--hi-v4-text-size-normal, 0.875rem);\n text-align: center;\n color: #929aa6;\n color: var(--hi-v4-color-gray-500, #929aa6);\n -ms-flex-negative: 0;\n flex-shrink: 0;\n cursor: pointer;\n visibility: hidden;\n opacity: 0;\n -webkit-transition-property: all;\n transition-property: all;\n -webkit-transition-duration: 200ms;\n transition-duration: 200ms;\n -webkit-transition-duration: var(--hi-v4-motion-duration-normal, 200ms);\n transition-duration: var(--hi-v4-motion-duration-normal, 200ms);\n -webkit-transition-timing-function: cubic-bezier(0.37, 0.02, 0.34, 1);\n transition-timing-function: cubic-bezier(0.37, 0.02, 0.34, 1);\n -webkit-transition-timing-function: var(--hi-v4-motion-bezier-normal, cubic-bezier(0.37, 0.02, 0.34, 1));\n transition-timing-function: var(--hi-v4-motion-bezier-normal, cubic-bezier(0.37, 0.02, 0.34, 1)); }\n.hi-v4-mock-input__clear:hover {\n color: #000;\n color: var(--hi-v4-color-static-black, #000); }\n.hi-v4-mock-input__clear.active {\n visibility: visible;\n opacity: 1; }\n.hi-v4-mock-input__suffix {\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-negative: 0;\n flex-shrink: 0;\n color: #c9ced6;\n color: var(--hi-v4-color-gray-400, #c9ced6);\n font-size: 1rem;\n font-size: var(--hi-v4-text-size-lg, 1rem);\n padding-left: 8px;\n padding-left: var(--hi-v4-spacing-4, 8px);\n text-align: center; }\n.hi-v4-mock-input__value {\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n display: inline-block;\n width: auto;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap; }\n.hi-v4-mock-input--size-sm {\n height: 24px;\n height: var(--hi-v4-height-xs, 24px);\n font-size: 0.75rem;\n font-size: var(--hi-v4-text-size-sm, 0.75rem);\n line-height: 1.25rem;\n border-radius: 4px;\n border-radius: var(--hi-v4-border-radius-normal, 4px);\n padding: 1px calc(12px - 1px);\n padding: 1px calc(var(--hi-v4-spacing-6, 12px) - 1px); }\n.hi-v4-mock-input--size-md {\n height: 32px;\n height: var(--hi-v4-height-normal, 32px);\n font-size: 0.875rem;\n font-size: var(--hi-v4-text-size-normal, 0.875rem);\n line-height: 1.375rem;\n border-radius: 4px;\n border-radius: var(--hi-v4-border-radius-normal, 4px);\n padding: 4px calc(12px - 1px);\n padding: 4px calc(var(--hi-v4-spacing-6, 12px) - 1px); }\n.hi-v4-mock-input--size-lg {\n height: 40px;\n height: var(--hi-v4-height-xl, 40px);\n font-size: 1rem;\n font-size: var(--hi-v4-text-size-lg, 1rem);\n line-height: 1.5rem;\n border-radius: 4px;\n border-radius: var(--hi-v4-border-radius-normal, 4px);\n padding: 7px calc(12px - 1px);\n padding: 7px calc(var(--hi-v4-spacing-6, 12px) - 1px); }\n.hi-v4-mock-input--appearance-outline {\n border-color: #dfe2e8;\n border-color: var(--hi-v4-color-gray-300, #dfe2e8); }\n.hi-v4-mock-input--appearance-outline:not(.disabled):hover {\n border-color: #237ffa;\n border-color: var(--hi-v4-color-brandblue-500, #237ffa); }\n.hi-v4-mock-input--appearance-outline:not(.disabled).focused {\n -webkit-box-shadow: 0 0 0 2px #bde2ff;\n box-shadow: 0 0 0 2px #bde2ff;\n -webkit-box-shadow: 0 0 0 2px var(--hi-v4-color-brandblue-100, #bde2ff);\n box-shadow: 0 0 0 2px var(--hi-v4-color-brandblue-100, #bde2ff);\n border-color: #237ffa;\n border-color: var(--hi-v4-color-brandblue-500, #237ffa); }\n.hi-v4-mock-input--appearance-outline:not(.disabled).invalid {\n border-color: #ff5959;\n border-color: var(--hi-v4-color-red-500, #ff5959); }\n.hi-v4-mock-input--appearance-outline:not(.disabled).invalid.hover {\n border-color: #ff5959;\n border-color: var(--hi-v4-color-red-500, #ff5959); }\n.hi-v4-mock-input--appearance-outline:not(.disabled).invalid.focused {\n -webkit-box-shadow: 0 0 0 2px #ffd1c9;\n box-shadow: 0 0 0 2px #ffd1c9;\n -webkit-box-shadow: 0 0 0 2px var(--hi-v4-color-red-100, #ffd1c9);\n box-shadow: 0 0 0 2px var(--hi-v4-color-red-100, #ffd1c9); }\n.hi-v4-mock-input--appearance-unset {\n width: auto;\n -webkit-box-pack: start;\n -ms-flex-pack: start;\n justify-content: flex-start;\n border-color: transparent; }\n.hi-v4-mock-input--appearance-unset:not(.disabled):hover {\n background-color: #f2f4f7;\n background-color: var(--hi-v4-color-gray-100, #f2f4f7); }\n.hi-v4-mock-input--appearance-unset:not(.disabled).focused {\n -webkit-box-shadow: 0 0 0 2px #bde2ff;\n box-shadow: 0 0 0 2px #bde2ff;\n -webkit-box-shadow: 0 0 0 2px var(--hi-v4-color-brandblue-100, #bde2ff);\n box-shadow: 0 0 0 2px var(--hi-v4-color-brandblue-100, #bde2ff);\n background-color: #fff;\n background-color: var(--hi-v4-color-static-white, #fff);\n border-color: #237ffa;\n border-color: var(--hi-v4-color-brandblue-500, #237ffa); }\n.hi-v4-mock-input--appearance-unset:not(.disabled).invalid {\n border-color: #ff5959;\n border-color: var(--hi-v4-color-red-500, #ff5959); }\n.hi-v4-mock-input--appearance-unset:not(.disabled).invalid.hover {\n border-color: #ff5959;\n border-color: var(--hi-v4-color-red-500, #ff5959); }\n.hi-v4-mock-input--appearance-unset:not(.disabled).invalid.focused {\n -webkit-box-shadow: 0 0 0 2px #ffd1c9;\n box-shadow: 0 0 0 2px #ffd1c9;\n -webkit-box-shadow: 0 0 0 2px var(--hi-v4-color-red-100, #ffd1c9);\n box-shadow: 0 0 0 2px var(--hi-v4-color-red-100, #ffd1c9); }\n.hi-v4-mock-input--appearance-filled {\n background-color: #f2f4f7;\n background-color: var(--hi-v4-color-gray-100, #f2f4f7); }\n.hi-v4-mock-input--appearance-filled:not(.disabled):hover {\n background-color: #fff;\n background-color: var(--hi-v4-color-static-white, #fff);\n border-color: #237ffa;\n border-color: var(--hi-v4-color-brandblue-500, #237ffa); }\n.hi-v4-mock-input--appearance-filled:not(.disabled).focused {\n -webkit-box-shadow: 0 0 0 2px #bde2ff;\n box-shadow: 0 0 0 2px #bde2ff;\n -webkit-box-shadow: 0 0 0 2px var(--hi-v4-color-brandblue-100, #bde2ff);\n box-shadow: 0 0 0 2px var(--hi-v4-color-brandblue-100, #bde2ff);\n border-color: #237ffa;\n border-color: var(--hi-v4-color-brandblue-500, #237ffa);\n background-color: #fff;\n background-color: var(--hi-v4-color-static-white, #fff); }\n.hi-v4-mock-input--appearance-filled:not(.disabled).invalid {\n border-color: #ff5959;\n border-color: var(--hi-v4-color-red-500, #ff5959); }\n.hi-v4-mock-input--appearance-filled:not(.disabled).invalid.hover {\n border-color: #ff5959;\n border-color: var(--hi-v4-color-red-500, #ff5959); }\n.hi-v4-mock-input--appearance-filled:not(.disabled).invalid.focused {\n -webkit-box-shadow: 0 0 0 2px #ffd1c9;\n box-shadow: 0 0 0 2px #ffd1c9;\n -webkit-box-shadow: 0 0 0 2px var(--hi-v4-color-red-100, #ffd1c9);\n box-shadow: 0 0 0 2px var(--hi-v4-color-red-100, #ffd1c9); }\n.hi-v4-mock-input--appearance-outline.disabled, .hi-v4-mock-input--appearance-unset.disabled, .hi-v4-mock-input--appearance-filled.disabled {\n color: #c9ced6;\n color: var(--hi-v4-color-gray-400, #c9ced6); }\n.hi-v4-mock-input--appearance-outline.disabled, .hi-v4-mock-input--appearance-filled.disabled {\n background-color: #ebedf0;\n background-color: var(--hi-v4-color-gray-200, #ebedf0); }\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n@use 'sass:map';\n.hi-v4-input {\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n border: none;\n outline: none;\n -webkit-box-shadow: none;\n box-shadow: none;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n cursor: text;\n background-color: transparent;\n -webkit-tap-highlight-color: transparent;\n -webkit-box-flex: 1;\n -ms-flex: 1 1;\n flex: 1 1;\n display: inline-block;\n box-sizing: border-box;\n -webkit-transition-property: all;\n transition-property: all;\n -webkit-transition-duration: 200ms;\n transition-duration: 200ms;\n -webkit-transition-duration: var(--hi-v4-motion-duration-normal, 200ms);\n transition-duration: var(--hi-v4-motion-duration-normal, 200ms);\n -webkit-transition-timing-function: cubic-bezier(0.37, 0.02, 0.34, 1);\n transition-timing-function: cubic-bezier(0.37, 0.02, 0.34, 1);\n -webkit-transition-timing-function: var(--hi-v4-motion-bezier-normal, cubic-bezier(0.37, 0.02, 0.34, 1));\n transition-timing-function: var(--hi-v4-motion-bezier-normal, cubic-bezier(0.37, 0.02, 0.34, 1));\n width: 100%;\n font-size: inherit;\n line-height: inherit;\n color: #1f2733;\n color: var(--hi-v4-color-gray-700, #1f2733); }\n.hi-v4-input::-webkit-input-placeholder {\n color: #c9ced6;\n color: var(--hi-v4-color-gray-400, #c9ced6); }\n.hi-v4-input::-moz-placeholder {\n color: #c9ced6;\n color: var(--hi-v4-color-gray-400, #c9ced6); }\n.hi-v4-input::-ms-input-placeholder {\n color: #c9ced6;\n color: var(--hi-v4-color-gray-400, #c9ced6); }\n.hi-v4-input:-ms-input-placeholder {\n color: #c9ced6;\n color: var(--hi-v4-color-gray-400, #c9ced6); }\n.hi-v4-input::placeholder {\n color: #c9ced6;\n color: var(--hi-v4-color-gray-400, #c9ced6); }\n.hi-v4-input:disabled {\n cursor: not-allowed; }\n.hi-v4-input__inner {\n position: relative;\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n height: auto;\n width: 100%;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n font-size: inherit;\n border: 1px solid transparent;\n border: var(--hi-v4-border-size-normal, 1px solid) var(--hi-v4-color-static-transparent, transparent);\n background-color: #fff;\n background-color: var(--hi-v4-color-static-white, #fff);\n -webkit-transition-property: all;\n transition-property: all;\n -webkit-transition-duration: 200ms;\n transition-duration: 200ms;\n -webkit-transition-duration: var(--hi-v4-motion-duration-normal, 200ms);\n transition-duration: var(--hi-v4-motion-duration-normal, 200ms);\n -webkit-transition-timing-function: cubic-bezier(0.37, 0.02, 0.34, 1);\n transition-timing-function: cubic-bezier(0.37, 0.02, 0.34, 1);\n -webkit-transition-timing-function: var(--hi-v4-motion-bezier-normal, cubic-bezier(0.37, 0.02, 0.34, 1));\n transition-timing-function: var(--hi-v4-motion-bezier-normal, cubic-bezier(0.37, 0.02, 0.34, 1));\n outline: none;\n z-index: auto; }\n.hi-v4-input__inner:not(.disabled):hover {\n z-index: calc(1 + 1);\n z-index: calc(var(--hi-v4-zindex-absolute, 1) + 1); }\n.hi-v4-input__inner:not(.disabled).focused {\n z-index: calc(1 + 1);\n z-index: calc(var(--hi-v4-zindex-absolute, 1) + 1); }\n.hi-v4-input__outer {\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n position: relative;\n margin: 0;\n padding: 0;\n -webkit-box-pack: justify;\n -ms-flex-pack: justify;\n justify-content: space-between;\n height: auto;\n width: 100%;\n vertical-align: middle; }\n.hi-v4-input__clear {\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n height: auto;\n text-align: center;\n font-size: 0.875rem;\n font-size: var(--hi-v4-text-size-normal, 0.875rem);\n color: #929aa6;\n color: var(--hi-v4-color-gray-500, #929aa6);\n -ms-flex-negative: 0;\n flex-shrink: 0;\n cursor: pointer;\n -webkit-transition-property: all;\n transition-property: all;\n -webkit-transition-duration: 200ms;\n transition-duration: 200ms;\n -webkit-transition-duration: var(--hi-v4-motion-duration-normal, 200ms);\n transition-duration: var(--hi-v4-motion-duration-normal, 200ms);\n -webkit-transition-timing-function: cubic-bezier(0.37, 0.02, 0.34, 1);\n transition-timing-function: cubic-bezier(0.37, 0.02, 0.34, 1);\n -webkit-transition-timing-function: var(--hi-v4-motion-bezier-normal, cubic-bezier(0.37, 0.02, 0.34, 1));\n transition-timing-function: var(--hi-v4-motion-bezier-normal, cubic-bezier(0.37, 0.02, 0.34, 1));\n visibility: hidden;\n opacity: 0; }\n.hi-v4-input__clear:hover {\n color: #1f2733;\n color: var(--hi-v4-color-gray-700, #1f2733); }\n.hi-v4-input__clear.active {\n visibility: visible;\n opacity: 1; }\n.hi-v4-input__inner--suffix .hi-v4-input__clear {\n -webkit-margin-end: 4px;\n margin-inline-end: 4px;\n -webkit-margin-end: var(--hi-v4-spacing-2, 4px);\n margin-inline-end: var(--hi-v4-spacing-2, 4px); }\n.hi-v4-input__prefix, .hi-v4-input__suffix {\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-negative: 0;\n flex-shrink: 0;\n color: #1f2733;\n color: var(--hi-v4-color-gray-700, #1f2733);\n font-size: inherit;\n text-align: center; }\n.hi-v4-input__prefix {\n padding-left: calc(12px - 1px);\n padding-left: calc(var(--hi-v4-spacing-6, 12px) - 1px); }\n.hi-v4-input__suffix {\n padding-right: calc(12px - 1px);\n padding-right: calc(var(--hi-v4-spacing-6, 12px) - 1px); }\n.hi-v4-input__prepend, .hi-v4-input__append {\n position: relative;\n color: #1f2733;\n color: var(--hi-v4-color-gray-700, #1f2733);\n background-color: #f5f7fa;\n background-color: var(--hi-v4-color-gray-50, #f5f7fa);\n -ms-flex-negative: 0;\n flex-shrink: 0;\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n font-size: inherit;\n text-align: center;\n padding: 0 calc(12px - 1px);\n padding: 0 calc(var(--hi-v4-spacing-6, 12px) - 1px);\n border: 1px solid transparent;\n border: var(--hi-v4-border-size-normal, 1px solid) var(--hi-v4-color-static-transparent, transparent);\n white-space: nowrap;\n -webkit-transition-property: all;\n transition-property: all;\n -webkit-transition-duration: 200ms;\n transition-duration: 200ms;\n -webkit-transition-duration: var(--hi-v4-motion-duration-normal, 200ms);\n transition-duration: var(--hi-v4-motion-duration-normal, 200ms);\n -webkit-transition-timing-function: cubic-bezier(0.37, 0.02, 0.34, 1);\n transition-timing-function: cubic-bezier(0.37, 0.02, 0.34, 1);\n -webkit-transition-timing-function: var(--hi-v4-motion-bezier-normal, cubic-bezier(0.37, 0.02, 0.34, 1));\n transition-timing-function: var(--hi-v4-motion-bezier-normal, cubic-bezier(0.37, 0.02, 0.34, 1));\n z-index: 1;\n z-index: var(--hi-v4-zindex-absolute, 1); }\n.hi-v4-input__prepend {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n margin-right: -1px; }\n.hi-v4-input__append {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n margin-left: -1px; }\n.hi-v4-input--size-sm {\n height: 24px;\n height: var(--hi-v4-height-xs, 24px);\n font-size: 0.75rem;\n font-size: var(--hi-v4-text-size-sm, 0.75rem);\n line-height: 1.25rem; }\n.hi-v4-input--size-sm .hi-v4-input {\n padding: 1px calc(12px - 1px);\n padding: 1px calc(var(--hi-v4-spacing-6, 12px) - 1px); }\n.hi-v4-input--size-sm .hi-v4-input__inner,\n .hi-v4-input--size-sm .hi-v4-input__prepend,\n .hi-v4-input--size-sm .hi-v4-input__append {\n border-radius: 4px;\n border-radius: var(--hi-v4-border-radius-normal, 4px); }\n.hi-v4-input--size-sm .hi-v4-input__prepend {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0; }\n.hi-v4-input--size-sm .hi-v4-input__append {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0; }\n.hi-v4-input--size-md {\n height: 32px;\n height: var(--hi-v4-height-normal, 32px);\n font-size: 0.875rem;\n font-size: var(--hi-v4-text-size-normal, 0.875rem);\n line-height: 1.375rem; }\n.hi-v4-input--size-md .hi-v4-input {\n padding: 4px calc(12px - 1px);\n padding: 4px calc(var(--hi-v4-spacing-6, 12px) - 1px); }\n.hi-v4-input--size-md .hi-v4-input__inner,\n .hi-v4-input--size-md .hi-v4-input__prepend,\n .hi-v4-input--size-md .hi-v4-input__append {\n border-radius: 4px;\n border-radius: var(--hi-v4-border-radius-normal, 4px); }\n.hi-v4-input--size-md .hi-v4-input__prepend {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0; }\n.hi-v4-input--size-md .hi-v4-input__append {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0; }\n.hi-v4-input--size-lg {\n height: 40px;\n height: var(--hi-v4-height-xl, 40px);\n font-size: 1rem;\n font-size: var(--hi-v4-text-size-lg, 1rem);\n line-height: 1.5rem; }\n.hi-v4-input--size-lg .hi-v4-input {\n padding: 7px calc(12px - 1px);\n padding: 7px calc(var(--hi-v4-spacing-6, 12px) - 1px); }\n.hi-v4-input--size-lg .hi-v4-input__inner,\n .hi-v4-input--size-lg .hi-v4-input__prepend,\n .hi-v4-input--size-lg .hi-v4-input__append {\n border-radius: 4px;\n border-radius: var(--hi-v4-border-radius-normal, 4px); }\n.hi-v4-input--size-lg .hi-v4-input__prepend {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0; }\n.hi-v4-input--size-lg .hi-v4-input__append {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0; }\n.hi-v4-input--appearance-outline .hi-v4-input__inner {\n border-color: #dfe2e8;\n border-color: var(--hi-v4-color-gray-300, #dfe2e8); }\n.hi-v4-input--appearance-outline .hi-v4-input__inner:not(.disabled):hover {\n border-color: #237ffa;\n border-color: var(--hi-v4-color-brandblue-500, #237ffa); }\n.hi-v4-input--appearance-outline .hi-v4-input__inner:not(.disabled).focused {\n -webkit-box-shadow: 0 0 0 2px #bde2ff;\n box-shadow: 0 0 0 2px #bde2ff;\n -webkit-box-shadow: 0 0 0 2px var(--hi-v4-color-brandblue-100, #bde2ff);\n box-shadow: 0 0 0 2px var(--hi-v4-color-brandblue-100, #bde2ff);\n border-color: #237ffa;\n border-color: var(--hi-v4-color-brandblue-500, #237ffa); }\n.hi-v4-input--appearance-outline .hi-v4-input__inner:not(.disabled).invalid {\n border-color: #ff5959;\n border-color: var(--hi-v4-color-red-500, #ff5959); }\n.hi-v4-input--appearance-outline .hi-v4-input__inner:not(.disabled).invalid.hover {\n border-color: #ff5959;\n border-color: var(--hi-v4-color-red-500, #ff5959); }\n.hi-v4-input--appearance-outline .hi-v4-input__inner:not(.disabled).invalid.focused {\n -webkit-box-shadow: 0 0 0 2px #ffd1c9;\n box-shadow: 0 0 0 2px #ffd1c9;\n -webkit-box-shadow: 0 0 0 2px var(--hi-v4-color-red-100, #ffd1c9);\n box-shadow: 0 0 0 2px var(--hi-v4-color-red-100, #ffd1c9); }\n.hi-v4-input--appearance-outline .hi-v4-input__prepend,\n .hi-v4-input--appearance-outline .hi-v4-input__append {\n border-color: #dfe2e8;\n border-color: var(--hi-v4-color-gray-300, #dfe2e8); }\n.hi-v4-input--appearance-unset .hi-v4-input {\n padding-left: 0;\n padding-right: 0; }\n.hi-v4-input--appearance-unset.hi-v4-input__outer--prepend .hi-v4-input,\n .hi-v4-input--appearance-unset .hi-v4-input__inner--prefix .hi-v4-input {\n padding-left: calc(12px - 1px);\n padding-left: calc(var(--hi-v4-spacing-6, 12px) - 1px); }\n.hi-v4-input--appearance-unset.hi-v4-input__outer--append .hi-v4-input,\n .hi-v4-input--appearance-unset .hi-v4-input__inner--suffix .hi-v4-input {\n padding-right: calc(12px - 1px);\n padding-right: calc(var(--hi-v4-spacing-6, 12px) - 1px); }\n.hi-v4-input--appearance-unset .hi-v4-input__inner {\n border-radius: 0; }\n.hi-v4-input--appearance-filled .hi-v4-input__inner {\n background-color: #f2f4f7;\n background-color: var(--hi-v4-color-gray-100, #f2f4f7); }\n.hi-v4-input--appearance-filled .hi-v4-input__inner:not(.disabled):hover {\n background-color: #fff;\n background-color: var(--hi-v4-color-static-white, #fff);\n border-color: #237ffa;\n border-color: var(--hi-v4-color-brandblue-500, #237ffa); }\n.hi-v4-input--appearance-filled .hi-v4-input__inner:not(.disabled).focused {\n -webkit-box-shadow: 0 0 0 2px #bde2ff;\n box-shadow: 0 0 0 2px #bde2ff;\n -webkit-box-shadow: 0 0 0 2px var(--hi-v4-color-brandblue-100, #bde2ff);\n box-shadow: 0 0 0 2px var(--hi-v4-color-brandblue-100, #bde2ff);\n border-color: #237ffa;\n border-color: var(--hi-v4-color-brandblue-500, #237ffa);\n background-color: #fff;\n background-color: var(--hi-v4-color-static-white, #fff); }\n.hi-v4-input--appearance-filled .hi-v4-input__inner:not(.disabled).invalid {\n border-color: #ff5959;\n border-color: var(--hi-v4-color-red-500, #ff5959); }\n.hi-v4-input--appearance-filled .hi-v4-input__inner:not(.disabled).invalid.hover {\n border-color: #ff5959;\n border-color: var(--hi-v4-color-red-500, #ff5959); }\n.hi-v4-input--appearance-filled .hi-v4-input__inner:not(.disabled).invalid.focused {\n -webkit-box-shadow: 0 0 0 2px #ffd1c9;\n box-shadow: 0 0 0 2px #ffd1c9;\n -webkit-box-shadow: 0 0 0 2px var(--hi-v4-color-red-100, #ffd1c9);\n box-shadow: 0 0 0 2px var(--hi-v4-color-red-100, #ffd1c9); }\n.hi-v4-input--appearance-underline .hi-v4-input {\n padding-left: 0;\n padding-right: 0; }\n.hi-v4-input--appearance-underline.hi-v4-input__outer--prepend .hi-v4-input,\n .hi-v4-input--appearance-underline .hi-v4-input__inner--prefix .hi-v4-input {\n padding-left: calc(12px - 1px);\n padding-left: calc(var(--hi-v4-spacing-6, 12px) - 1px); }\n.hi-v4-input--appearance-underline.hi-v4-input__outer--append .hi-v4-input,\n .hi-v4-input--appearance-underline .hi-v4-input__inner--suffix .hi-v4-input {\n padding-right: calc(12px - 1px);\n padding-right: calc(var(--hi-v4-spacing-6, 12px) - 1px); }\n.hi-v4-input--appearance-underline .hi-v4-input__inner {\n border-radius: 0; }\n.hi-v4-input--appearance-underline .hi-v4-input__inner::after {\n content: '';\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n display: block;\n position: absolute;\n bottom: 0;\n left: -1px;\n right: -1px;\n border-bottom: 1px solid #dfe2e8;\n border-bottom: 1px solid var(--hi-v4-color-gray-300, #dfe2e8);\n -webkit-transition: all 0.3s;\n transition: all 0.3s; }\n.hi-v4-input--appearance-underline .hi-v4-input__inner:not(.disabled):hover::after {\n border-bottom-color: #237ffa;\n border-bottom-color: var(--hi-v4-color-brandblue-500, #237ffa); }\n.hi-v4-input--appearance-underline .hi-v4-input__inner:not(.disabled).focused::after {\n border-bottom-color: #237ffa;\n border-bottom-color: var(--hi-v4-color-brandblue-500, #237ffa); }\n.hi-v4-input--appearance-underline .hi-v4-input__inner:not(.disabled).invalid::after {\n border-bottom-color: #ff5959;\n border-bottom-color: var(--hi-v4-color-red-500, #ff5959); }\n.hi-v4-input--appearance-underline .hi-v4-input__inner:not(.disabled).invalid.hover::after {\n border-bottom-color: #ff5959;\n border-bottom-color: var(--hi-v4-color-red-500, #ff5959); }\n.hi-v4-input--appearance-outline .hi-v4-input__inner.disabled, .hi-v4-input--appearance-unset .hi-v4-input__inner.disabled, .hi-v4-input--appearance-filled .hi-v4-input__inner.disabled, .hi-v4-input--appearance-underline .hi-v4-input__inner.disabled {\n color: #c9ced6;\n color: var(--hi-v4-color-gray-400, #c9ced6);\n background-color: #ebedf0;\n background-color: var(--hi-v4-color-gray-200, #ebedf0); }\n.hi-v4-input__outer--prepend .hi-v4-input__inner {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0; }\n.hi-v4-input__outer--prepend-unset .hi-v4-input__prepend {\n border: none;\n padding: 0; }\n.hi-v4-input__outer--prepend-unset .hi-v4-input__prepend .hi-v4-mock-input {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0; }\n.hi-v4-input__outer--prepend-unset .hi-v4-input__prepend .hi-v4-button {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0; }\n.hi-v4-input__outer--append .hi-v4-input__inner {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0; }\n.hi-v4-input__outer--append-unset .hi-v4-input__append {\n border: none;\n padding: 0; }\n.hi-v4-input__outer--append-unset .hi-v4-input__append .hi-v4-mock-input {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0; }\n.hi-v4-input__outer--append-unset .hi-v4-input__append .hi-v4-button {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0; }\ntextarea.hi-v4-input {\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n border: none;\n outline: none;\n -webkit-box-shadow: none;\n box-shadow: none;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n cursor: text;\n background-color: transparent;\n -webkit-tap-highlight-color: transparent;\n display: block;\n resize: vertical;\n overflow: auto;\n position: relative;\n width: 100%;\n z-index: auto;\n border: 1px solid transparent;\n border: var(--hi-v4-border-size-normal, 1px solid) var(--hi-v4-color-static-transparent, transparent);\n background-color: #fff;\n background-color: var(--hi-v4-color-static-white, #fff);\n -webkit-transition-property: all;\n transition-property: all;\n -webkit-transition-duration: 200ms;\n transition-duration: 200ms;\n -webkit-transition-duration: var(--hi-v4-motion-duration-normal, 200ms);\n transition-duration: var(--hi-v4-motion-duration-normal, 200ms);\n -webkit-transition-timing-function: cubic-bezier(0.37, 0.02, 0.34, 1);\n transition-timing-function: cubic-bezier(0.37, 0.02, 0.34, 1);\n -webkit-transition-timing-function: var(--hi-v4-motion-bezier-normal, cubic-bezier(0.37, 0.02, 0.34, 1));\n transition-timing-function: var(--hi-v4-motion-bezier-normal, cubic-bezier(0.37, 0.02, 0.34, 1));\n color: #1f2733;\n color: var(--hi-v4-color-gray-700, #1f2733); }\ntextarea.hi-v4-input::-webkit-input-placeholder {\n color: #c9ced6;\n color: var(--hi-v4-color-gray-400, #c9ced6); }\ntextarea.hi-v4-input::-moz-placeholder {\n color: #c9ced6;\n color: var(--hi-v4-color-gray-400, #c9ced6); }\ntextarea.hi-v4-input::-ms-input-placeholder {\n color: #c9ced6;\n color: var(--hi-v4-color-gray-400, #c9ced6); }\ntextarea.hi-v4-input:-ms-input-placeholder {\n color: #c9ced6;\n color: var(--hi-v4-color-gray-400, #c9ced6); }\ntextarea.hi-v4-input::placeholder {\n color: #c9ced6;\n color: var(--hi-v4-color-gray-400, #c9ced6); }\ntextarea.hi-v4-input:disabled {\n cursor: not-allowed; }\ntextarea.hi-v4-input:not(.disabled):hover {\n z-index: calc(1 + 1);\n z-index: calc(var(--hi-v4-zindex-absolute, 1) + 1); }\ntextarea.hi-v4-input:not(.disabled).focused {\n z-index: calc(1 + 1);\n z-index: calc(var(--hi-v4-zindex-absolute, 1) + 1); }\ntextarea.hi-v4-input--size-sm {\n height: auto;\n font-size: 0.75rem;\n font-size: var(--hi-v4-text-size-sm, 0.75rem);\n line-height: 1.25rem;\n padding: 1px calc(12px - 1px);\n padding: 1px calc(var(--hi-v4-spacing-6, 12px) - 1px);\n border-radius: 4px;\n border-radius: var(--hi-v4-border-radius-normal, 4px); }\ntextarea.hi-v4-input--size-md {\n height: auto;\n font-size: 0.875rem;\n font-size: var(--hi-v4-text-size-normal, 0.875rem);\n line-height: 1.375rem;\n padding: 4px calc(12px - 1px);\n padding: 4px calc(var(--hi-v4-spacing-6, 12px) - 1px);\n border-radius: 4px;\n border-radius: var(--hi-v4-border-radius-normal, 4px); }\ntextarea.hi-v4-input--size-lg {\n height: auto;\n font-size: 1rem;\n font-size: var(--hi-v4-text-size-lg, 1rem);\n line-height: 1.5rem;\n padding: 7px calc(12px - 1px);\n padding: 7px calc(var(--hi-v4-spacing-6, 12px) - 1px);\n border-radius: 4px;\n border-radius: var(--hi-v4-border-radius-normal, 4px); }\ntextarea.hi-v4-input--appearance-outline {\n border-color: #dfe2e8;\n border-color: var(--hi-v4-color-gray-300, #dfe2e8); }\ntextarea.hi-v4-input--appearance-outline:not(.disabled):hover {\n border-color: #237ffa;\n border-color: var(--hi-v4-color-brandblue-500, #237ffa); }\ntextarea.hi-v4-input--appearance-outline:not(.disabled).focused {\n -webkit-box-shadow: 0 0 0 2px #bde2ff;\n box-shadow: 0 0 0 2px #bde2ff;\n -webkit-box-shadow: 0 0 0 2px var(--hi-v4-color-brandblue-100, #bde2ff);\n box-shadow: 0 0 0 2px var(--hi-v4-color-brandblue-100, #bde2ff);\n border-color: #237ffa;\n border-color: var(--hi-v4-color-brandblue-500, #237ffa); }\ntextarea.hi-v4-input--appearance-outline:not(.disabled).invalid {\n border-color: #ff5959;\n border-color: var(--hi-v4-color-red-500, #ff5959); }\ntextarea.hi-v4-input--appearance-outline:not(.disabled).invalid.hover {\n border-color: #ff5959;\n border-color: var(--hi-v4-color-red-500, #ff5959); }\ntextarea.hi-v4-input--appearance-outline:not(.disabled).invalid.focused {\n -webkit-box-shadow: 0 0 0 2px #ffd1c9;\n box-shadow: 0 0 0 2px #ffd1c9;\n -webkit-box-shadow: 0 0 0 2px var(--hi-v4-color-red-100, #ffd1c9);\n box-shadow: 0 0 0 2px var(--hi-v4-color-red-100, #ffd1c9); }\ntextarea.hi-v4-input--appearance-unset {\n border-radius: 0; }\ntextarea.hi-v4-input--appearance-unset .hi-v4-input {\n padding-left: 0;\n padding-right: 0; }\ntextarea.hi-v4-input--appearance-filled {\n background-color: #f2f4f7;\n background-color: var(--hi-v4-color-gray-100, #f2f4f7); }\ntextarea.hi-v4-input--appearance-filled:not(.disabled):hover {\n background-color: #fff;\n background-color: var(--hi-v4-color-static-white, #fff);\n border-color: #237ffa;\n border-color: var(--hi-v4-color-brandblue-500, #237ffa); }\ntextarea.hi-v4-input--appearance-filled:not(.disabled).focused {\n -webkit-box-shadow: 0 0 0 2px #bde2ff;\n box-shadow: 0 0 0 2px #bde2ff;\n -webkit-box-shadow: 0 0 0 2px var(--hi-v4-color-brandblue-100, #bde2ff);\n box-shadow: 0 0 0 2px var(--hi-v4-color-brandblue-100, #bde2ff);\n border-color: #237ffa;\n border-color: var(--hi-v4-color-brandblue-500, #237ffa);\n background-color: #fff;\n background-color: var(--hi-v4-color-static-white, #fff); }\ntextarea.hi-v4-input--appearance-filled:not(.disabled).invalid {\n border-color: #ff5959;\n border-color: var(--hi-v4-color-red-500, #ff5959); }\ntextarea.hi-v4-input--appearance-filled:not(.disabled).invalid.hover {\n border-color: #ff5959;\n border-color: var(--hi-v4-color-red-500, #ff5959); }\ntextarea.hi-v4-input--appearance-filled:not(.disabled).invalid.focused {\n -webkit-box-shadow: 0 0 0 2px #ffd1c9;\n box-shadow: 0 0 0 2px #ffd1c9;\n -webkit-box-shadow: 0 0 0 2px var(--hi-v4-color-red-100, #ffd1c9);\n box-shadow: 0 0 0 2px var(--hi-v4-color-red-100, #ffd1c9); }\ntextarea.hi-v4-input--appearance-underline {\n padding-left: 0;\n padding-right: 0;\n border-radius: 0; }\ntextarea.hi-v4-input--appearance-underline::after {\n content: '';\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n display: block;\n position: absolute;\n bottom: 0;\n left: -1px;\n right: -1px;\n border-bottom: 1px solid #dfe2e8;\n border-bottom: 1px solid var(--hi-v4-color-gray-300, #dfe2e8);\n -webkit-transition: all 0.3s;\n transition: all 0.3s; }\ntextarea.hi-v4-input--appearance-underline:not(.disabled):hover::after {\n border-bottom-color: #237ffa;\n border-bottom-color: var(--hi-v4-color-brandblue-500, #237ffa); }\ntextarea.hi-v4-input--appearance-underline:not(.disabled).focused::after {\n border-bottom-color: #237ffa;\n border-bottom-color: var(--hi-v4-color-brandblue-500, #237ffa); }\ntextarea.hi-v4-input--appearance-underline:not(.disabled).invalid::after {\n border-bottom-color: #ff5959;\n border-bottom-color: var(--hi-v4-color-red-500, #ff5959); }\ntextarea.hi-v4-input--appearance-underline:not(.disabled).invalid.hover::after {\n border-bottom-color: #ff5959;\n border-bottom-color: var(--hi-v4-color-red-500, #ff5959); }\ntextarea.hi-v4-input--appearance-outline.disabled, textarea.hi-v4-input--appearance-unset.disabled, textarea.hi-v4-input--appearance-filled.disabled, textarea.hi-v4-input--appearance-underline.disabled {\n color: #c9ced6;\n color: var(--hi-v4-color-gray-400, #c9ced6);\n background-color: #ebedf0;\n background-color: var(--hi-v4-color-gray-200, #ebedf0); }\n";
21
+
22
+ var __styleInject__ = require('style-inject/dist/style-inject.es.js')["default"];
23
+
24
+ __styleInject__(css_248z);
25
+
26
+ export default css_248z;
27
+ //# sourceMappingURL=index.scss.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,98 @@
1
+ /** @LICENSE
2
+ * @hi-ui/tree-select
3
+ * https://github.com/XiaoMi/hiui/tree/master/packages/ui/tree-select#readme
4
+ *
5
+ * Copyright (c) HIUI <mi-hiui@xiaomi.com>.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */
10
+ import { useCallback, useState, useMemo } from 'react';
11
+ import { useUncontrolledState } from '@hi-ui/use-uncontrolled-state';
12
+ import { useLatestCallback } from '../../../../hooks/use-latest/lib/esm/index.js';
13
+ import { setAttrStatus } from '../../../../utils/dom-utils/lib/esm/index.js';
14
+ /** @LICENSE
15
+ * @hi-ui/input
16
+ * https://github.com/XiaoMi/hiui/tree/master/packages/ui/input#readme
17
+ *
18
+ * Copyright (c) HIUI <mi-hiui@xiaomi.com>.
19
+ *
20
+ * This source code is licensed under the MIT license found in the
21
+ * LICENSE file in the root directory of this source tree.
22
+ */
23
+
24
+ var useInput = function useInput(_ref) {
25
+ var name = _ref.name,
26
+ _ref$autoFocus = _ref.autoFocus,
27
+ autoFocus = _ref$autoFocus === void 0 ? false : _ref$autoFocus,
28
+ _ref$disabled = _ref.disabled,
29
+ disabled = _ref$disabled === void 0 ? false : _ref$disabled,
30
+ _ref$readOnly = _ref.readOnly,
31
+ readOnly = _ref$readOnly === void 0 ? false : _ref$readOnly,
32
+ maxLength = _ref.maxLength,
33
+ placeholder = _ref.placeholder,
34
+ _ref$defaultValue = _ref.defaultValue,
35
+ defaultValue = _ref$defaultValue === void 0 ? '' : _ref$defaultValue,
36
+ valueProp = _ref.value,
37
+ onChange = _ref.onChange,
38
+ onFocus = _ref.onFocus,
39
+ onBlur = _ref.onBlur,
40
+ _ref$trimValueOnBlur = _ref.trimValueOnBlur,
41
+ trimValueOnBlur = _ref$trimValueOnBlur === void 0 ? false : _ref$trimValueOnBlur;
42
+
43
+ var _useUncontrolledState = useUncontrolledState(defaultValue, valueProp, onChange),
44
+ value = _useUncontrolledState[0],
45
+ tryChangeValue = _useUncontrolledState[1];
46
+
47
+ var handleChange = useCallback(function (evt) {
48
+ var nextValue = evt.target.value;
49
+ tryChangeValue(nextValue, evt);
50
+ }, [tryChangeValue]);
51
+
52
+ var _useState = useState(autoFocus),
53
+ focused = _useState[0],
54
+ setFocused = _useState[1];
55
+
56
+ var handleFocus = useLatestCallback(function (evt) {
57
+ setFocused(true);
58
+ onFocus === null || onFocus === void 0 ? void 0 : onFocus(evt);
59
+ });
60
+ var handleBlur = useLatestCallback(function (event) {
61
+ setFocused(false);
62
+
63
+ if (trimValueOnBlur) {
64
+ var nextValue = event.target.value;
65
+ tryChangeValue(nextValue.trim(), event);
66
+ }
67
+
68
+ onBlur === null || onBlur === void 0 ? void 0 : onBlur(event);
69
+ });
70
+ var nativeInputProps = useMemo(function () {
71
+ return {
72
+ name: name,
73
+ disabled: disabled,
74
+ readOnly: readOnly,
75
+ autoFocus: autoFocus,
76
+ placeholder: placeholder,
77
+ maxLength: maxLength,
78
+ 'data-focused': setAttrStatus(focused)
79
+ };
80
+ }, [disabled, readOnly, autoFocus, placeholder, maxLength, name, focused]);
81
+ var getInputProps = useCallback(function () {
82
+ return Object.assign(Object.assign({}, nativeInputProps), {
83
+ value: value,
84
+ onChange: handleChange,
85
+ onFocus: handleFocus,
86
+ onBlur: handleBlur
87
+ });
88
+ }, [value, handleChange, handleFocus, handleBlur, nativeInputProps]);
89
+ return {
90
+ focused: focused,
91
+ value: value,
92
+ tryChangeValue: tryChangeValue,
93
+ getInputProps: getInputProps
94
+ };
95
+ };
96
+
97
+ export { useInput };
98
+ //# sourceMappingURL=use-input.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-input.js","sources":["../../../../../../../input/lib/esm/use-input.js"],"sourcesContent":["/** @LICENSE\n * @hi-ui/input\n * https://github.com/XiaoMi/hiui/tree/master/packages/ui/input#readme\n *\n * Copyright (c) HIUI <mi-hiui@xiaomi.com>.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { useCallback, useState, useMemo } from 'react';\nimport { useUncontrolledState } from '@hi-ui/use-uncontrolled-state';\nimport { useLatestCallback } from '@hi-ui/use-latest';\nimport { setAttrStatus } from '@hi-ui/dom-utils';\n\nvar useInput = function useInput(_ref) {\n var name = _ref.name,\n _ref$autoFocus = _ref.autoFocus,\n autoFocus = _ref$autoFocus === void 0 ? false : _ref$autoFocus,\n _ref$disabled = _ref.disabled,\n disabled = _ref$disabled === void 0 ? false : _ref$disabled,\n _ref$readOnly = _ref.readOnly,\n readOnly = _ref$readOnly === void 0 ? false : _ref$readOnly,\n maxLength = _ref.maxLength,\n placeholder = _ref.placeholder,\n _ref$defaultValue = _ref.defaultValue,\n defaultValue = _ref$defaultValue === void 0 ? '' : _ref$defaultValue,\n valueProp = _ref.value,\n onChange = _ref.onChange,\n onFocus = _ref.onFocus,\n onBlur = _ref.onBlur,\n _ref$trimValueOnBlur = _ref.trimValueOnBlur,\n trimValueOnBlur = _ref$trimValueOnBlur === void 0 ? false : _ref$trimValueOnBlur;\n\n var _useUncontrolledState = useUncontrolledState(defaultValue, valueProp, onChange),\n value = _useUncontrolledState[0],\n tryChangeValue = _useUncontrolledState[1];\n\n var handleChange = useCallback(function (evt) {\n var nextValue = evt.target.value;\n tryChangeValue(nextValue, evt);\n }, [tryChangeValue]);\n\n var _useState = useState(autoFocus),\n focused = _useState[0],\n setFocused = _useState[1];\n\n var handleFocus = useLatestCallback(function (evt) {\n setFocused(true);\n onFocus === null || onFocus === void 0 ? void 0 : onFocus(evt);\n });\n var handleBlur = useLatestCallback(function (event) {\n setFocused(false);\n\n if (trimValueOnBlur) {\n var nextValue = event.target.value;\n tryChangeValue(nextValue.trim(), event);\n }\n\n onBlur === null || onBlur === void 0 ? void 0 : onBlur(event);\n });\n var nativeInputProps = useMemo(function () {\n return {\n name: name,\n disabled: disabled,\n readOnly: readOnly,\n autoFocus: autoFocus,\n placeholder: placeholder,\n maxLength: maxLength,\n 'data-focused': setAttrStatus(focused)\n };\n }, [disabled, readOnly, autoFocus, placeholder, maxLength, name, focused]);\n var getInputProps = useCallback(function () {\n return Object.assign(Object.assign({}, nativeInputProps), {\n value: value,\n onChange: handleChange,\n onFocus: handleFocus,\n onBlur: handleBlur\n });\n }, [value, handleChange, handleFocus, handleBlur, nativeInputProps]);\n return {\n focused: focused,\n value: value,\n tryChangeValue: tryChangeValue,\n getInputProps: getInputProps\n };\n};\n\nexport { useInput };\n//# sourceMappingURL=use-input.js.map\n"],"names":["useInput","_ref","name","autoFocus","_ref$autoFocus","disabled","_ref$disabled","readOnly","_ref$readOnly","maxLength","placeholder","defaultValue","_ref$defaultValue","valueProp","value","onChange","onFocus","onBlur","trimValueOnBlur","_ref$trimValueOnBlur","useUncontrolledState","_useUncontrolledState","tryChangeValue","handleChange","useCallback","evt","nextValue","useState","focused","_useState","setFocused","handleFocus","useLatestCallback","handleBlur","event","trim","nativeInputProps","useMemo","setAttrStatus","getInputProps"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;IAKaA,QAAQ,GAAG,SAAXA,QAAW,CAAAC,IAAA,EAAA;MACtBC,IAAAA,GAAAA,IAAAA,CAAAA;4BACAC;MAAAA,SAAAA,GAAAA,cAAAA,KAAAA,KAAAA,CAAAA,GAAY,KAAZA,GAAYC;2BACZC;MAAAA,QAAAA,GAAAA,aAAAA,KAAAA,KAAAA,CAAAA,GAAW,KAAXA,GAAWC;2BACXC;MAAAA,QAAAA,GAAAA,aAAAA,KAAAA,KAAAA,CAAAA,GAAW,KAAXA,GAAWC;MACXC,SAAAA,GAAAA,IAAAA,CAAAA;MACAC,WAAAA,GAAAA,IAAAA,CAAAA;+BACAC;MAAAA,YAAAA,GAAAA,iBAAAA,KAAAA,KAAAA,CAAAA,GAAe,EAAfA,GAAeC;MACRC,SAAAA,GAAAA,IAAAA,CAAPC;MACAC,QAAAA,GAAAA,IAAAA,CAAAA;MACAC,OAAAA,GAAAA,IAAAA,CAAAA;MACAC,MAAAA,GAAAA,IAAAA,CAAAA;kCACAC;MAAAA,eAAAA,GAAAA,oBAAAA,KAAAA,KAAAA,CAAAA,GAAkB,KAAlBA,GAAkBC;;8BAEcC,oBAAoB,CAAAT,YAAA,EAAAE,SAAA,EAAAE,QAAA;MAA7CD,KAAP,GAAAO,qBAAA,CAAA,CAAA;MAAcC,cAAd,GAAAD,qBAAA,CAAA,CAAA;;MAEME,YAAY,GAAGC,WAAW,CAC9B,UAAAC,GAAA,EAAA;QACQC,SAAS,GAAGD,GAAG,CAAHA,MAAAA,CAAWX;AAC7BQ,IAAAA,cAAc,CAAAI,SAAA,EAAdJ,GAAc,CAAdA;AAH4B,GAAA,EAK9B,CAL8BA,cAK9B,CAL8B;;kBAQFK,QAAQ,CAAAxB,SAAA;MAA/ByB,OAAP,GAAAC,SAAA,CAAA,CAAA;MAAgBC,UAAhB,GAAAD,SAAA,CAAA,CAAA;;MAEME,WAAW,GAAGC,iBAAiB,CACnC,UAAAP,GAAA,EAAA;AACEK,IAAAA,UAAU,CAAVA,IAAU,CAAVA;AACAd,IAAAA,OAAO,KAAPA,IAAAA,IAAAA,OAAO,KAAA,KAAPA,CAAAA,GAAAA,KAAAA,CAAAA,GAAAA,OAAO,CAAPA,GAAO,CAAPA;AAHiC,GAAA;MAO/BiB,UAAU,GAAGD,iBAAiB,CAClC,UAAAE,KAAA,EAAA;AACEJ,IAAAA,UAAU,CAAVA,KAAU,CAAVA;;QAEIZ,iBAAiB;UACbQ,SAAS,GAAGQ,KAAK,CAALA,MAAAA,CAAapB;AAC/BQ,MAAAA,cAAc,CAACI,SAAS,CAAVS,IAACT,EAAD,EAAdJ,KAAc,CAAdA;;;AAGFL,IAAAA,MAAM,KAANA,IAAAA,IAAAA,MAAM,KAAA,KAANA,CAAAA,GAAAA,KAAAA,CAAAA,GAAAA,MAAM,CAANA,KAAM,CAANA;AATgC,GAAA;MAa9BmB,gBAAgB,GAAGC,OAAO,CAC9B,YAAA;WAAO;AACLnC,MAAAA,IAAI,EADCA,IAAA;AAELG,MAAAA,QAAQ,EAFHA,QAAA;AAGLE,MAAAA,QAAQ,EAHHA,QAAA;AAILJ,MAAAA,SAAS,EAJJA,SAAA;AAKLO,MAAAA,WAAW,EALNA,WAAA;AAMLD,MAAAA,SAAS,EANJA,SAAA;sBAOW6B,aAAa,CAAAV,OAAA;AAPxB;AADuB,GAAA,EAU9B,CAAAvB,QAAA,EAAAE,QAAA,EAAAJ,SAAA,EAAAO,WAAA,EAAAD,SAAA,EAAAP,IAAA,EAV8B0B,OAU9B,CAV8B;MAa1BW,aAAa,GAAGf,WAAW,CAAC,YAAA;2CAE3BY,mBAAAA;AACHtB,MAAAA,KAAK,EAALA,KADGsB;AAEHrB,MAAAA,QAAQ,EAAEQ,YAFPa;AAGHpB,MAAAA,OAAO,EAAEe,WAHNK;AAIHnB,MAAAA,MAAM,EAAEgB;AAJLG;AAF0B,GAAA,EAQ9B,CAAAtB,KAAA,EAAAS,YAAA,EAAAQ,WAAA,EAAAE,UAAA,EAR8BG,gBAQ9B,CAR8B;SAU1B;AACLR,IAAAA,OAAO,EADFA,OAAA;AAELd,IAAAA,KAAK,EAFAA,KAAA;AAGLQ,IAAAA,cAAc,EAHTA,cAAA;AAILiB,IAAAA,aAAa,EAAbA;AAJK;;;"}
@@ -0,0 +1,29 @@
1
+ /** @LICENSE
2
+ * @hi-ui/tree-select
3
+ * https://github.com/XiaoMi/hiui/tree/master/packages/ui/tree-select#readme
4
+ *
5
+ * Copyright (c) HIUI <mi-hiui@xiaomi.com>.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */
10
+
11
+ /** @LICENSE
12
+ * @hi-ui/dom-utils
13
+ * https://github.com/XiaoMi/hiui/tree/master/packages/utils/dom-utils#readme
14
+ *
15
+ * Copyright (c) HIUI <mi-hiui@xiaomi.com>.
16
+ *
17
+ * This source code is licensed under the MIT license found in the
18
+ * LICENSE file in the root directory of this source tree.
19
+ */
20
+
21
+ /**
22
+ * 设置 html data 属性,表示状态
23
+ */
24
+ var setAttrStatus = function setAttrStatus(bool) {
25
+ return bool ? '' : undefined;
26
+ };
27
+
28
+ export { setAttrStatus };
29
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../../../../../../utils/dom-utils/lib/esm/index.js"],"sourcesContent":["/** @LICENSE\n * @hi-ui/dom-utils\n * https://github.com/XiaoMi/hiui/tree/master/packages/utils/dom-utils#readme\n *\n * Copyright (c) HIUI <mi-hiui@xiaomi.com>.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n/**\n * 隐藏 dom 样式\n */\nvar hiddenStyle = {\n position: 'absolute',\n border: 0,\n margin: 0,\n opacity: 0,\n overflow: 'hidden'\n};\n/**\n * 模拟事件默认事件处理机制,以此执行传入的事件处理器\n *\n * @param handlers\n * @returns\n * @ref https://developer.mozilla.org/zh-CN/docs/Web/API/Event/preventDefault\n */\n\nfunction mockDefaultHandlers() {\n for (var _len = arguments.length, handlers = new Array(_len), _key = 0; _key < _len; _key++) {\n handlers[_key] = arguments[_key];\n }\n\n return function mockedDefaultHandler(event) {\n handlers.some(function (handler) {\n if (handler) {\n // handler 执行中,可以阻止默认行为,即将 `defaultPrevented` 置为 `true`\n handler(event);\n }\n\n return event.defaultPrevented;\n });\n };\n}\n/**\n * 设置 html data 属性,表示状态\n */\n\n\nvar setAttrStatus = function setAttrStatus(bool) {\n return bool ? '' : undefined;\n};\n/**\n * 设置 html aria 属性\n */\n\n\nvar setAttrAria = function setAttrAria(bool) {\n return bool ? true : undefined;\n};\n/**\n * 阻止事件的行为,包括默认事件和冒泡\n */\n\n\nvar stopEvent = function stopEvent(evt) {\n evt === null || evt === void 0 ? void 0 : evt.preventDefault();\n evt === null || evt === void 0 ? void 0 : evt.stopPropagation();\n};\n\nexport { hiddenStyle, mockDefaultHandlers, setAttrAria, setAttrStatus, stopEvent };\n//# sourceMappingURL=index.js.map\n"],"names":["setAttrStatus","bool","undefined"],"mappings":";;;;;;;;;;;;;;;;;;;;AAkCA;;;IAGaA,aAAa,GAAG,SAAhBA,aAAgB,CAAAC,IAAA,EAAA;SAAqBA,IAAI,GAAA,EAAA,GAAQC;;;"}
@@ -0,0 +1,127 @@
1
+ import React from 'react';
2
+ import { DataSourceFunc, FieldNames, TreeSelectDataItem, TreeSelectDataSource } from './types';
3
+ import { PopperProps } from '@hi-ui/popper';
4
+ import { TreeNodeEventData } from '@hi-ui/tree';
5
+ import { PickerProps } from '@hi-ui/picker';
6
+ /**
7
+ * TODO: What is TreeSelect
8
+ */
9
+ export declare const TreeSelect: React.ForwardRefExoticComponent<TreeSelectProps & React.RefAttributes<HTMLDivElement | null>>;
10
+ export interface TreeSelectProps extends Omit<PickerProps, 'data' | 'onChange' | 'trigger'> {
11
+ /**
12
+ * 展示数据
13
+ */
14
+ data?: TreeSelectDataItem[];
15
+ /**
16
+ * 设置 data 中 id, title, disabled, children 对应的 key (3.0 新增) object - { title: 'title', id: 'id',disabled:'disabled', children: 'children'}
17
+ */
18
+ fieldNames?: FieldNames;
19
+ /**
20
+ * 数据回显模式 string
21
+ * ALL: 所有被选中节点,不区分父子节点
22
+ * PARENT: 当所有子节点被选中时将只保留父节点
23
+ * CHILD: 仅显示子节点
24
+ */
25
+ showCheckedMode?: 'ALL' | 'PARENT' | 'CHILD';
26
+ /**
27
+ * 数据选择类型
28
+ */
29
+ type?: 'single' | 'multiple';
30
+ /**
31
+ * 是否有边框
32
+ */
33
+ bordered?: boolean;
34
+ /**
35
+ * 是否禁用
36
+ */
37
+ disabled?: boolean;
38
+ /**
39
+ * 是否默认展开所有树节点
40
+ */
41
+ defaultExpandAll?: boolean;
42
+ /**
43
+ * 展开的节点(受控)
44
+ */
45
+ expandedIds?: React.ReactText[];
46
+ /**
47
+ * 默认展开的节点(非受控)
48
+ */
49
+ defaultExpandedIds?: React.ReactText[];
50
+ /**
51
+ * 节点被点击(展开/收起)时触发
52
+ */
53
+ onExpand?: () => void;
54
+ /**
55
+ * 默认选中项 (非受控)
56
+ */
57
+ defaultValue?: React.ReactText;
58
+ /**
59
+ * 默认选中项 (受控)
60
+ */
61
+ value?: React.ReactText;
62
+ /**
63
+ * 自定义渲染 Input 中展示内容
64
+ */
65
+ displayRender?: (item: TreeSelectDataItem) => React.ReactNode;
66
+ /**
67
+ * 输入框占位 string - 请选择
68
+ */
69
+ placeholder?: string;
70
+ /**
71
+ * 节点搜索模式,仅在mode=normal模式下生效
72
+ */
73
+ searchMode?: 'highlight' | 'filter';
74
+ /**
75
+ * 自定义搜索过滤器,仅在 searchable 为 true 时有效
76
+ * 第一个参数为输入的关键字,
77
+ * 第二个为数据项,返回值为 true 时将出现在结果项
78
+ */
79
+ filterOption?: (keyword: string, item: TreeSelectDataItem) => boolean;
80
+ /**
81
+ * 自定义渲染节点的 title 内容
82
+ */
83
+ titleRender?: (node: TreeNodeEventData) => React.ReactNode;
84
+ /**
85
+ * 点击异步加载子项
86
+ */
87
+ onLoadChildren?: (node: TreeNodeEventData) => void | Promise<TreeSelectDataItem[] | void>;
88
+ /**
89
+ * 从远端获取数据,初始时是否自动加载
90
+ */
91
+ autoload?: boolean;
92
+ /**
93
+ * 异步加载数据
94
+ */
95
+ dataSource?: DataSourceFunc | TreeSelectDataSource | Promise<TreeSelectDataItem[]>;
96
+ /**
97
+ * 没有选项时的提示
98
+ */
99
+ emptyContent?: React.ReactNode;
100
+ /**
101
+ * 自定义下拉选项宽度
102
+ */
103
+ optionWidth?: number;
104
+ /**
105
+ * 下拉根元素的类名称 (3.0 新增)
106
+ */
107
+ overlayClassName?: string;
108
+ /**
109
+ * 选中时触发
110
+ * checkedIds | checkedId: 选中项 ID 集合 | ID
111
+ * checkedNodes | checkedNode: 选中项数据项集合|数据项
112
+ * currentNode: 当前操作节点
113
+ */
114
+ onChange?: (selectedIds: React.ReactText, changedItem: TreeSelectDataItem, currentNode: TreeSelectDataItem) => void;
115
+ /**
116
+ * 是否可清空
117
+ */
118
+ clearable?: boolean;
119
+ /**
120
+ * 自定义控制 popper 行为
121
+ */
122
+ popper?: PopperProps;
123
+ /**
124
+ * 设置展现形式
125
+ */
126
+ appearance?: 'outline' | 'unset' | 'filled';
127
+ }
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ export declare const TreeSelectProvider: import("react").Provider<Omit<{
3
+ rootProps: {};
4
+ }, "rootProps"> | null>;
5
+ export declare const useTreeSelectContext: () => Omit<{
6
+ rootProps: {};
7
+ }, "rootProps">;
@@ -0,0 +1,3 @@
1
+ import './styles/index.scss';
2
+ export * from './TreeSelect';
3
+ export { TreeSelect as default } from './TreeSelect';
@@ -0,0 +1,57 @@
1
+ import React from 'react';
2
+ export interface TreeSelectDataItem {
3
+ /**
4
+ * 节点唯一 id
5
+ */
6
+ id: React.ReactText;
7
+ /**
8
+ * 节点标题
9
+ */
10
+ title: React.ReactNode;
11
+ /**
12
+ * 子级数据
13
+ */
14
+ children?: TreeSelectDataItem[];
15
+ /**
16
+ * 是否禁用
17
+ */
18
+ disabled?: boolean;
19
+ }
20
+ export interface TreeSelectDataSource<T = any> {
21
+ /**
22
+ * 请求的 url
23
+ */
24
+ url?: string;
25
+ /**
26
+ * 请求方法
27
+ */
28
+ type?: 'get' | 'post';
29
+ /**
30
+ * post 请求时请求体参数
31
+ */
32
+ data?: object;
33
+ /**
34
+ * url 查询参数
35
+ */
36
+ params?: object;
37
+ /**
38
+ * 请求头
39
+ */
40
+ headers?: object;
41
+ /**
42
+ * 请求模式
43
+ */
44
+ mode?: 'same-origin' | 'cors' | 'no-cors' | 'navigate' | 'same-origin';
45
+ /**
46
+ * 成功时的回调,用于对数据进行预处理
47
+ */
48
+ transformResponse?: (response: object) => T;
49
+ }
50
+ export declare type FilterOptionFunc = (keyword: string, item: TreeSelectDataItem) => boolean;
51
+ export declare type DataSourceFunc = (keyword: string) => TreeSelectDataSource;
52
+ export declare type FieldNames = {
53
+ id?: string;
54
+ title?: string;
55
+ disabled?: string;
56
+ children?: string;
57
+ };
@@ -0,0 +1,8 @@
1
+ import { TreeSelectDataItem } from './types';
2
+ export declare const useTreeSelect: ({ data: dataProp, ...rest }: UseTreeSelectProps) => {
3
+ rootProps: {};
4
+ };
5
+ export interface UseTreeSelectProps {
6
+ data?: TreeSelectDataItem[];
7
+ }
8
+ export declare type UseTreeSelectReturn = ReturnType<typeof useTreeSelect>;
package/package.json ADDED
@@ -0,0 +1,73 @@
1
+ {
2
+ "name": "@hi-ui/tree-select",
3
+ "version": "4.0.0-alpha.10",
4
+ "description": "A sub-package for @hi-ui/hiui.",
5
+ "keywords": [],
6
+ "author": "HIUI <mi-hiui@xiaomi.com>",
7
+ "homepage": "https://github.com/XiaoMi/hiui/tree/master/packages/ui/tree-select#readme",
8
+ "license": "MIT",
9
+ "directories": {
10
+ "lib": "lib",
11
+ "test": "__tests__"
12
+ },
13
+ "files": [
14
+ "lib"
15
+ ],
16
+ "main": "lib/cjs/index.js",
17
+ "module": "lib/esm/index.js",
18
+ "types": "lib/types/index.d.ts",
19
+ "typings": "lib/types/index.d.ts",
20
+ "exports": {
21
+ ".": {
22
+ "require": "./lib/cjs/index.js",
23
+ "default": "./lib/esm/index.js"
24
+ }
25
+ },
26
+ "publishConfig": {
27
+ "access": "public"
28
+ },
29
+ "repository": {
30
+ "type": "git",
31
+ "url": "git+https://github.com/XiaoMi/hiui.git"
32
+ },
33
+ "scripts": {
34
+ "test": "jest",
35
+ "clean": "rimraf lib",
36
+ "prebuild": "yarn clean",
37
+ "build:esm": "hi-build ./src/index.ts --format esm -d ./lib/esm",
38
+ "build:cjs": "hi-build ./src/index.ts --format cjs -d ./lib/cjs",
39
+ "build:types": "tsc --emitDeclarationOnly --declaration --declarationDir lib/types",
40
+ "build": "concurrently yarn:build:*"
41
+ },
42
+ "bugs": {
43
+ "url": "https://github.com/XiaoMi/hiui/issues"
44
+ },
45
+ "dependencies": {
46
+ "@hi-ui/classname": "^4.0.0-alpha.3",
47
+ "@hi-ui/core": "^4.0.0-alpha.14",
48
+ "@hi-ui/core-css": "^4.0.0-alpha.10",
49
+ "@hi-ui/env": "^4.0.0-alpha.5",
50
+ "@hi-ui/highlighter": "^4.0.0-alpha.6",
51
+ "@hi-ui/icons": "^4.0.0-alpha.20",
52
+ "@hi-ui/picker": "^4.0.0-alpha.8",
53
+ "@hi-ui/popper": "^4.0.0-alpha.17",
54
+ "@hi-ui/tag-input": "^4.0.0-alpha.15",
55
+ "@hi-ui/tree": "^4.0.0-alpha.29",
56
+ "@hi-ui/tree-utils": "^4.0.0-alpha.8",
57
+ "@hi-ui/type-assertion": "^4.0.0-alpha.13",
58
+ "@hi-ui/use-search-mode": "^4.0.0-alpha.7",
59
+ "@hi-ui/use-toggle": "^4.0.0-alpha.10",
60
+ "@hi-ui/use-uncontrolled-state": "^4.0.0-alpha.12",
61
+ "lodash": "^4.17.21"
62
+ },
63
+ "peerDependencies": {
64
+ "react": "^17.0.1",
65
+ "react-dom": "^17.0.1"
66
+ },
67
+ "devDependencies": {
68
+ "@hi-ui/hi-build": "^4.0.0-alpha.4",
69
+ "react": "^17.0.1",
70
+ "react-dom": "^17.0.1"
71
+ },
72
+ "gitHead": "2ff88f2004062d5da030fa36217fa664892a94c9"
73
+ }