@fibrae/semi-foundation 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (194) hide show
  1. package/dist/anchor/foundation.d.ts +1 -1
  2. package/dist/anchor/foundation.js +21 -21
  3. package/dist/audio-player/foundation.d.ts +10 -10
  4. package/dist/audio-player/foundation.js +19 -19
  5. package/dist/auto-complete/foundation.d.ts +12 -12
  6. package/dist/auto-complete/foundation.js +51 -51
  7. package/dist/avatar/foundation.d.ts +5 -5
  8. package/dist/avatar/foundation.js +16 -16
  9. package/dist/backtop/foundation.d.ts +2 -2
  10. package/dist/backtop/foundation.js +7 -7
  11. package/dist/banner/foundation.d.ts +1 -1
  12. package/dist/banner/foundation.js +4 -4
  13. package/dist/base/auto-close-foundation.d.ts +8 -8
  14. package/dist/base/auto-close-foundation.js +15 -15
  15. package/dist/base/foundation.d.ts +4 -3
  16. package/dist/base/foundation.js +12 -11
  17. package/dist/breadcrumb/foundation.d.ts +5 -5
  18. package/dist/breadcrumb/foundation.js +9 -10
  19. package/dist/breadcrumb/item-foundation.d.ts +3 -3
  20. package/dist/breadcrumb/item-foundation.js +6 -6
  21. package/dist/calendar/event-util.js +1 -1
  22. package/dist/calendar/foundation.js +4 -4
  23. package/dist/calendar/month-foundation.d.ts +2 -2
  24. package/dist/calendar/month-foundation.js +6 -6
  25. package/dist/carousel/foundation.d.ts +17 -17
  26. package/dist/carousel/foundation.js +51 -51
  27. package/dist/cascader/foundation.d.ts +34 -26
  28. package/dist/cascader/foundation.js +143 -121
  29. package/dist/checkbox/checkbox-foundation.d.ts +2 -2
  30. package/dist/checkbox/checkbox-foundation.js +15 -15
  31. package/dist/checkbox/checkbox-group-foundation.d.ts +2 -2
  32. package/dist/checkbox/checkbox-group-foundation.js +8 -8
  33. package/dist/code-highlight/index.d.ts +1 -1
  34. package/dist/code-highlight/index.js +3 -3
  35. package/dist/collapse/foundation.d.ts +2 -2
  36. package/dist/collapse/foundation.js +7 -7
  37. package/dist/collapsible/foundation.d.ts +3 -3
  38. package/dist/collapsible/foundation.js +8 -8
  39. package/dist/color-picker/alpha-slider-foundation.d.ts +2 -4
  40. package/dist/color-picker/alpha-slider-foundation.js +10 -10
  41. package/dist/color-picker/color-choose-area-foundation.d.ts +2 -5
  42. package/dist/color-picker/color-choose-area-foundation.js +14 -14
  43. package/dist/color-picker/color-slider-foundation.d.ts +2 -4
  44. package/dist/color-picker/color-slider-foundation.js +10 -10
  45. package/dist/color-picker/data-part-foundation.d.ts +5 -5
  46. package/dist/color-picker/data-part-foundation.js +11 -11
  47. package/dist/color-picker/foundation.d.ts +4 -4
  48. package/dist/color-picker/foundation.js +10 -10
  49. package/dist/config-provider/breakpoint-observer.d.ts +3 -3
  50. package/dist/config-provider/breakpoint-observer.js +6 -6
  51. package/dist/cropper/foundation.d.ts +15 -15
  52. package/dist/cropper/foundation.js +26 -23
  53. package/dist/date-picker/_utils/picker-type.d.ts +1 -1
  54. package/dist/date-picker/foundation.d.ts +36 -36
  55. package/dist/date-picker/foundation.js +125 -129
  56. package/dist/date-picker/input-foundation.d.ts +9 -9
  57. package/dist/date-picker/input-foundation.js +28 -28
  58. package/dist/date-picker/months-grid-foundation.d.ts +17 -17
  59. package/dist/date-picker/months-grid-foundation.js +64 -65
  60. package/dist/date-picker/year-and-month-foundation.d.ts +3 -3
  61. package/dist/date-picker/year-and-month-foundation.js +11 -11
  62. package/dist/drag-move/foundation.d.ts +2 -2
  63. package/dist/drag-move/foundation.js +15 -13
  64. package/dist/dropdown/foundation.d.ts +8 -5
  65. package/dist/dropdown/foundation.js +32 -28
  66. package/dist/dropdown/menu-foundation.d.ts +1 -1
  67. package/dist/dropdown/menu-foundation.js +11 -11
  68. package/dist/feedback/foundation.d.ts +9 -9
  69. package/dist/feedback/foundation.js +33 -33
  70. package/dist/form/form-api-proxy.d.ts +8 -7
  71. package/dist/form/form-api-proxy.js +25 -25
  72. package/dist/form/foundation.d.ts +5 -5
  73. package/dist/form/foundation.js +60 -61
  74. package/dist/highlight/foundation.js +1 -1
  75. package/dist/hot-keys/foundation.d.ts +2 -2
  76. package/dist/hot-keys/foundation.js +5 -5
  77. package/dist/image/image-foundation.d.ts +4 -4
  78. package/dist/image/image-foundation.js +10 -10
  79. package/dist/image/preview-footer-foundation.d.ts +3 -3
  80. package/dist/image/preview-footer-foundation.js +10 -10
  81. package/dist/image/preview-foundation.js +7 -6
  82. package/dist/image/preview-image-foundation.d.ts +6 -8
  83. package/dist/image/preview-image-foundation.js +14 -14
  84. package/dist/image/preview-inner-foundation.d.ts +9 -9
  85. package/dist/image/preview-inner-foundation.js +38 -38
  86. package/dist/input/foundation.d.ts +10 -10
  87. package/dist/input/foundation.js +47 -49
  88. package/dist/input/text-entry-foundation.d.ts +3 -3
  89. package/dist/input/text-entry-foundation.js +14 -14
  90. package/dist/input/textarea-foundation.d.ts +7 -7
  91. package/dist/input/textarea-foundation.js +36 -36
  92. package/dist/input-number/foundation.d.ts +16 -14
  93. package/dist/input-number/foundation.js +54 -53
  94. package/dist/json-viewer/foundation.d.ts +8 -8
  95. package/dist/json-viewer/foundation.js +23 -23
  96. package/dist/lottie/foundation.d.ts +1 -1
  97. package/dist/lottie/foundation.js +4 -4
  98. package/dist/markdown-render/foundation.d.ts +1 -1
  99. package/dist/markdown-render/foundation.js +4 -4
  100. package/dist/modal/modal-content-foundation.d.ts +7 -7
  101. package/dist/modal/modal-content-foundation.js +20 -20
  102. package/dist/modal/modal-foundation.d.ts +6 -6
  103. package/dist/modal/modal-foundation.js +24 -24
  104. package/dist/navigation/foundation.d.ts +1 -1
  105. package/dist/navigation/foundation.js +14 -14
  106. package/dist/navigation/item-foundation.d.ts +1 -1
  107. package/dist/navigation/item-foundation.js +8 -8
  108. package/dist/navigation/sub-nav-foundation.d.ts +3 -3
  109. package/dist/navigation/sub-nav-foundation.js +17 -17
  110. package/dist/notification/notification-list-foundation.d.ts +7 -7
  111. package/dist/notification/notification-list-foundation.js +12 -12
  112. package/dist/overflow-list/foundation.d.ts +4 -4
  113. package/dist/overflow-list/foundation.js +18 -18
  114. package/dist/pagination/foundation.d.ts +8 -8
  115. package/dist/pagination/foundation.js +28 -28
  116. package/dist/pincode/foundation.d.ts +5 -5
  117. package/dist/pincode/foundation.js +22 -22
  118. package/dist/popconfirm/popconfirm-foundation.d.ts +7 -7
  119. package/dist/popconfirm/popconfirm-foundation.js +26 -26
  120. package/dist/radio/radio-foundation.d.ts +5 -5
  121. package/dist/radio/radio-foundation.js +15 -15
  122. package/dist/radio/radio-group-foundation.d.ts +2 -2
  123. package/dist/radio/radio-group-foundation.js +9 -9
  124. package/dist/rating/foundation.d.ts +10 -10
  125. package/dist/rating/foundation.js +35 -35
  126. package/dist/resizable/group/index.d.ts +6 -6
  127. package/dist/resizable/group/index.js +40 -40
  128. package/dist/resizable/single/index.d.ts +2 -2
  129. package/dist/resizable/single/index.js +9 -9
  130. package/dist/scroll-list/item-foundation.d.ts +7 -7
  131. package/dist/scroll-list/item-foundation.js +35 -35
  132. package/dist/select/foundation.d.ts +42 -56
  133. package/dist/select/foundation.js +214 -279
  134. package/dist/select/option-foundation.d.ts +23 -27
  135. package/dist/select/option-foundation.js +10 -18
  136. package/dist/side-sheet/side-sheet-foundation.d.ts +6 -6
  137. package/dist/side-sheet/side-sheet-foundation.js +22 -22
  138. package/dist/slider/foundation.d.ts +16 -16
  139. package/dist/slider/foundation.js +46 -46
  140. package/dist/sortable/accessibility.d.ts +1 -1
  141. package/dist/sortable/accessibility.js +2 -2
  142. package/dist/spin/foundation.d.ts +2 -2
  143. package/dist/spin/foundation.js +6 -6
  144. package/dist/steps/utils.d.ts +1 -1
  145. package/dist/switch/foundation.d.ts +2 -2
  146. package/dist/switch/foundation.js +7 -7
  147. package/dist/table/foundation.d.ts +14 -14
  148. package/dist/table/foundation.js +93 -93
  149. package/dist/table/utils.d.ts +2 -2
  150. package/dist/tabs/foundation.d.ts +5 -5
  151. package/dist/tabs/foundation.js +17 -17
  152. package/dist/tag-input/foundation.d.ts +11 -11
  153. package/dist/tag-input/foundation.js +52 -52
  154. package/dist/time-picker/foundation.d.ts +13 -13
  155. package/dist/time-picker/foundation.js +39 -39
  156. package/dist/time-picker/input-foundation.d.ts +4 -4
  157. package/dist/time-picker/input-foundation.js +13 -13
  158. package/dist/toast/toast-list-foundation.d.ts +7 -7
  159. package/dist/toast/toast-list-foundation.js +14 -14
  160. package/dist/tooltip/foundation.d.ts +9 -9
  161. package/dist/tooltip/foundation.js +67 -61
  162. package/dist/transfer/foundation.d.ts +22 -9
  163. package/dist/transfer/foundation.js +38 -23
  164. package/dist/tree/foundation.d.ts +14 -14
  165. package/dist/tree/foundation.js +61 -61
  166. package/dist/tree/shared.d.ts +1 -1
  167. package/dist/tree-select/foundation.d.ts +26 -20
  168. package/dist/tree-select/foundation.js +91 -83
  169. package/dist/typography/ellipsis.d.ts +4 -4
  170. package/dist/typography/ellipsis.js +8 -8
  171. package/dist/typography/format-numeral.d.ts +1 -1
  172. package/dist/typography/format-numeral.js +2 -2
  173. package/dist/upload/constants.d.ts +1 -1
  174. package/dist/upload/foundation.d.ts +17 -17
  175. package/dist/upload/foundation.js +92 -92
  176. package/dist/upload/utils.d.ts +3 -3
  177. package/dist/upload/utils.js +6 -6
  178. package/dist/user-guide/foundation.d.ts +3 -3
  179. package/dist/user-guide/foundation.js +19 -19
  180. package/dist/utils/a11y.d.ts +1 -1
  181. package/dist/utils/announcer.d.ts +2 -2
  182. package/dist/utils/announcer.js +4 -4
  183. package/dist/utils/focus-handle.d.ts +1 -1
  184. package/dist/utils/focus-handle.js +1 -2
  185. package/dist/utils/focus-scope.d.ts +5 -5
  186. package/dist/utils/focus-scope.js +10 -10
  187. package/dist/utils/is-promise.d.ts +1 -1
  188. package/dist/utils/release-holder.d.ts +2 -2
  189. package/dist/utils/release-holder.js +4 -4
  190. package/dist/video-player/foundation.d.ts +15 -15
  191. package/dist/video-player/foundation.js +89 -89
  192. package/dist/video-player/progress-foundation.d.ts +2 -2
  193. package/dist/video-player/progress-foundation.js +12 -12
  194. package/package.json +2 -2
@@ -18,7 +18,6 @@ export interface BasicEntities {
18
18
  [idx: string]: BasicEntity;
19
19
  }
20
20
  export interface BasicEntity {
21
- _notExist?: boolean;
22
21
  children?: Array<BasicEntity>;
23
22
  data: BasicCascaderData;
24
23
  ind: number;
@@ -174,8 +173,8 @@ export interface CascaderAdapter<E = unknown, LE = unknown> extends DefaultAdapt
174
173
  notifyChange: (value: BasicValue) => void;
175
174
  notifySelect: (selected: string | number | Array<string | number>) => void;
176
175
  notifyOnSearch: (input: string) => void;
177
- notifyFocus: (e: E) => void;
178
- notifyBlur: (e?: E | MouseEvent) => void;
176
+ notifyFocus: (e: E | FocusEvent) => void;
177
+ notifyBlur: (e?: E | MouseEvent | FocusEvent) => void;
179
178
  notifyDropdownVisibleChange: (visible: boolean) => void;
180
179
  /**
181
180
  * Calls `loadData`. `callback` must run after the treeData update it caused is applied, since that update keeps
@@ -247,7 +246,7 @@ export default class CascaderFoundation<E = unknown, LE = unknown> extends BaseF
247
246
  getStates(): BasicCascaderInnerData;
248
247
  getState<K extends keyof BasicCascaderInnerData>(key: K): BasicCascaderInnerData[K];
249
248
  init(): void;
250
- handleKeyDown(e: E & Pick<KeyboardEvent, 'key' | 'preventDefault'>): void;
249
+ handleKeyDown: (e: E & Pick<KeyboardEvent, "key" | "preventDefault">) => void;
251
250
  /**
252
251
  * Keys of the open popup (APG combobox with a tree popup, or a listbox while searching); focus stays on the
253
252
  * trigger or its search input. Up, Down, Home and End move within the current column or the search results;
@@ -256,45 +255,54 @@ export default class CascaderFoundation<E = unknown, LE = unknown> extends BaseF
256
255
  * starting with them (APG tree typeahead). In a search input Space and typed characters edit the text; while
257
256
  * searching only Up, Down and Enter navigate. Returns whether the key was used.
258
257
  */
259
- handleOptionKeyDown(e: E & Pick<KeyboardEvent, 'key' | 'ctrlKey' | 'metaKey' | 'altKey' | 'preventDefault'>, { editing, rtl }: {
258
+ handleOptionKeyDown: (e: E & Pick<KeyboardEvent, "key" | "ctrlKey" | "metaKey" | "altKey" | "preventDefault">, { editing, rtl }: {
260
259
  editing: boolean;
261
260
  rtl: boolean;
262
- }): boolean;
261
+ }) => boolean;
263
262
  /**
264
263
  * After an update, the host reports whether the options (treeData or keyMaps) and value changed by its own change
265
264
  * detection. Re-collecting the options also re-resolves the value.
266
265
  */
267
- handleInputsChange({ optionsChanged, valueChanged }: {
266
+ handleInputsChange: ({ optionsChanged, valueChanged }: {
268
267
  optionsChanged: boolean;
269
268
  valueChanged: boolean;
270
- }, value: BasicValue): void;
271
- open(): void;
269
+ }, value: BasicValue) => void;
270
+ open: () => void;
272
271
  /** Mousedown outside the trigger and dropdown while open */
273
- handleClickOutside(e: MouseEvent): void;
274
- close(e?: E | MouseEvent, key?: string): void;
272
+ handleClickOutside: (e: MouseEvent) => void;
273
+ /** Focus entered the trigger (its search input, tags, clear button) or the dropdown from outside, by any means */
274
+ handleFocusEnter: (e: E | FocusEvent) => void;
275
+ /**
276
+ * The focus left the trigger and the dropdown (the component checks where it went): reports the blur. An open
277
+ * dropdown closes when the focus went to another element (APG combobox); a window blur has no target and keeps
278
+ * it, as the native select does.
279
+ */
280
+ handleFocusLeave: (e: FocusEvent) => void;
281
+ /** Closes the dropdown; the focus stays in the component, so no blur */
282
+ close: () => void;
275
283
  /** Closes without a blur; called when Vue KeepAlive deactivates the host */
276
- deactivate(): void;
277
- focus(): void;
278
- blur(): void;
284
+ deactivate: () => void;
285
+ focus: () => void;
286
+ blur: () => void;
279
287
  /** Leaves search mode after the closed dropdown finishes its exit */
280
- endSearching(): void;
288
+ endSearching: () => void;
281
289
  /** A key that opens the dropdown sets the current option before the list mounts; it is scrolled to once shown */
282
- handlePopoverOpen(): void;
283
- handleItemClick(e: E, item: BasicEntity | BasicData): void;
284
- handleItemHover(_e: unknown, item: BasicEntity): void;
285
- onItemCheckboxClick(item: BasicEntity | BasicData): void;
286
- handleClick(e: E & Pick<UIEvent, 'detail' | 'target' | 'currentTarget'>): void;
290
+ handlePopoverOpen: () => void;
291
+ handleItemClick: (e: E, item: BasicEntity | BasicData) => void;
292
+ handleItemHover: (_e: unknown, item: BasicEntity) => void;
293
+ onItemCheckboxClick: (item: BasicEntity | BasicData) => void;
294
+ handleClick: (e: E & Pick<UIEvent, "detail" | "target" | "currentTarget">) => void;
287
295
  /**
288
296
  * Enter toggles like a click; Down and Up open a closed popup (APG combobox). Without a search input (select-only
289
297
  * combobox) Space also opens it, and Home and End open it on the first and last option of the first column.
290
298
  * While open with no current option (handleOptionKeyDown left the key), Space outside a text field acts like
291
299
  * Enter, as in Select and TreeSelect. A search input keeps Space, Home and End for its text.
292
300
  */
293
- handleSelectionKeyDown(keyboardEvent: E & Pick<KeyboardEvent, 'key' | 'preventDefault' | 'detail' | 'target' | 'currentTarget'>): void;
294
- handleInputChange(sugInput: string): void;
295
- handleClear(): void;
296
- handleListScroll(e: LE, ind: number): void;
297
- handleTagRemoveByKey(key: string): void;
298
- handleTagRemoveInTrigger(pos: string): void;
301
+ handleSelectionKeyDown: (keyboardEvent: E & Pick<KeyboardEvent, "key" | "preventDefault" | "detail" | "target" | "currentTarget">) => void;
302
+ handleInputChange: (sugInput: string) => void;
303
+ handleClear: () => void;
304
+ handleListScroll: (e: LE, ind: number) => void;
305
+ handleTagRemoveByKey: (key: string) => void;
306
+ handleTagRemoveInTrigger: (pos: string) => void;
299
307
  }
300
308
  export type { KeyMapProps };