bitboss-ui 2.1.105 → 2.1.107

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 (291) hide show
  1. package/dist/components/BaseDatePickerInput/BaseDatePickerInput.vue.d.ts +60 -14
  2. package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +10 -3
  3. package/dist/index.css +1 -1
  4. package/dist/index.d.ts +1 -0
  5. package/dist/index.js +153 -150
  6. package/dist/index109.js +8 -8
  7. package/dist/index11.js +1 -1
  8. package/dist/index110.js +502 -163
  9. package/dist/index112.js +130 -55
  10. package/dist/index114.js +106 -48
  11. package/dist/index116.js +52 -34
  12. package/dist/index118.js +33 -93
  13. package/dist/index12.js +2 -2
  14. package/dist/index120.js +56 -92
  15. package/dist/index122.js +120 -352
  16. package/dist/index124.js +344 -531
  17. package/dist/index126.js +535 -104
  18. package/dist/index128.js +52 -46
  19. package/dist/index13.js +6 -6
  20. package/dist/index130.js +36 -41
  21. package/dist/index132.js +117 -22
  22. package/dist/index134.js +23 -160
  23. package/dist/index136.js +158 -115
  24. package/dist/index138.js +115 -64
  25. package/dist/index14.js +2 -2
  26. package/dist/index140.js +68 -12
  27. package/dist/index142.js +13 -2
  28. package/dist/index143.js +11 -419
  29. package/dist/index144.js +2 -9
  30. package/dist/index145.js +419 -9
  31. package/dist/index146.js +9 -25
  32. package/dist/index147.js +9 -2
  33. package/dist/index148.js +25 -5
  34. package/dist/index149.js +2 -6
  35. package/dist/index150.js +5 -5
  36. package/dist/index151.js +6 -3
  37. package/dist/index152.js +5 -3
  38. package/dist/index153.js +1 -1
  39. package/dist/index154.js +1 -1
  40. package/dist/index155.js +1 -1
  41. package/dist/index156.js +1 -1
  42. package/dist/index157.js +1 -1
  43. package/dist/index158.js +1 -1
  44. package/dist/index159.js +1 -1
  45. package/dist/index16.js +6 -6
  46. package/dist/index160.js +1 -1
  47. package/dist/index161.js +1 -1
  48. package/dist/index162.js +1 -1
  49. package/dist/index163.js +1 -1
  50. package/dist/index164.js +1 -1
  51. package/dist/index165.js +1 -1
  52. package/dist/index166.js +1 -1
  53. package/dist/index167.js +1 -1
  54. package/dist/index168.js +1 -1
  55. package/dist/index169.js +1 -1
  56. package/dist/index170.js +1 -1
  57. package/dist/index171.js +1 -1
  58. package/dist/index172.js +1 -1
  59. package/dist/index173.js +1 -1
  60. package/dist/index174.js +1 -1
  61. package/dist/index175.js +1 -1
  62. package/dist/index176.js +1 -1
  63. package/dist/index177.js +1 -1
  64. package/dist/index178.js +1 -1
  65. package/dist/index179.js +1 -1
  66. package/dist/index18.js +3 -3
  67. package/dist/index180.js +1 -1
  68. package/dist/index181.js +3 -2
  69. package/dist/index182.js +1 -1
  70. package/dist/index183.js +1 -1
  71. package/dist/index184.js +1 -1
  72. package/dist/index185.js +2 -3
  73. package/dist/index186.js +1 -1
  74. package/dist/index187.js +1 -1
  75. package/dist/index188.js +1 -1
  76. package/dist/index189.js +1 -1
  77. package/dist/index190.js +3 -2
  78. package/dist/index191.js +1 -1
  79. package/dist/index192.js +2 -3
  80. package/dist/index193.js +1 -1
  81. package/dist/index194.js +1 -1
  82. package/dist/index195.js +2 -2
  83. package/dist/index196.js +2 -2
  84. package/dist/index197.js +1 -1
  85. package/dist/index198.js +1 -1
  86. package/dist/index199.js +1 -1
  87. package/dist/index20.js +7 -7
  88. package/dist/index200.js +3 -2
  89. package/dist/index201.js +1 -1
  90. package/dist/index202.js +2 -3
  91. package/dist/index203.js +1 -1
  92. package/dist/index204.js +1 -1
  93. package/dist/index205.js +1 -1
  94. package/dist/index206.js +1 -1
  95. package/dist/index207.js +1 -1
  96. package/dist/index208.js +1 -1
  97. package/dist/index209.js +1 -1
  98. package/dist/index210.js +1 -1
  99. package/dist/index211.js +1 -1
  100. package/dist/index212.js +1 -1
  101. package/dist/index213.js +1 -1
  102. package/dist/index214.js +1 -1
  103. package/dist/index215.js +1 -1
  104. package/dist/index216.js +5 -0
  105. package/dist/index217.js +3 -7
  106. package/dist/index218.js +3 -138
  107. package/dist/index22.js +13 -13
  108. package/dist/index220.js +7 -2
  109. package/dist/index221.js +137 -4
  110. package/dist/index222.js +2 -8
  111. package/dist/index223.js +2 -6
  112. package/dist/index224.js +5 -16
  113. package/dist/index225.js +8 -5
  114. package/dist/index226.js +9 -5
  115. package/dist/index227.js +2 -5
  116. package/dist/index228.js +21 -5
  117. package/dist/index229.js +1 -1
  118. package/dist/index230.js +30 -2
  119. package/dist/index231.js +18 -6
  120. package/dist/index232.js +17 -8
  121. package/dist/index233.js +49 -266
  122. package/dist/index234.js +12 -52
  123. package/dist/index235.js +4 -52
  124. package/dist/index236.js +12 -31
  125. package/dist/index237.js +18 -58
  126. package/dist/index238.js +3 -13
  127. package/dist/index239.js +25 -3
  128. package/dist/index24.js +440 -378
  129. package/dist/index240.js +3 -33
  130. package/dist/index241.js +9 -28
  131. package/dist/index242.js +6 -0
  132. package/dist/index243.js +53 -2
  133. package/dist/index244.js +8 -2
  134. package/dist/index245.js +2 -3
  135. package/dist/index246.js +12 -8
  136. package/dist/index247.js +135 -13
  137. package/dist/index249.js +6 -0
  138. package/dist/index250.js +23 -23
  139. package/dist/index251.js +3 -4
  140. package/dist/index252.js +2 -23
  141. package/dist/index253.js +16 -31
  142. package/dist/index254.js +12 -2
  143. package/dist/index255.js +18 -67
  144. package/dist/index256.js +106 -2
  145. package/dist/index258.js +99 -19
  146. package/dist/index26.js +4 -4
  147. package/dist/index260.js +101 -80
  148. package/dist/index261.js +13 -0
  149. package/dist/index262.js +5 -30
  150. package/dist/index263.js +5 -17
  151. package/dist/index264.js +5 -51
  152. package/dist/index265.js +5 -18
  153. package/dist/index266.js +6 -12
  154. package/dist/index267.js +268 -18
  155. package/dist/index268.js +52 -3
  156. package/dist/index269.js +52 -11
  157. package/dist/index270.js +32 -5
  158. package/dist/index271.js +59 -12
  159. package/dist/index272.js +86 -9
  160. package/dist/index274.js +35 -0
  161. package/dist/index275.js +2 -25
  162. package/dist/index276.js +7 -4
  163. package/dist/index277.js +7 -9
  164. package/dist/index278.js +6 -52
  165. package/dist/index279.js +33 -187
  166. package/dist/index28.js +2 -2
  167. package/dist/index280.js +67 -3
  168. package/dist/index281.js +188 -3
  169. package/dist/index282.js +3 -18
  170. package/dist/index283.js +32 -11
  171. package/dist/index284.js +5 -105
  172. package/dist/index285.js +12 -0
  173. package/dist/index286.js +3 -100
  174. package/dist/index287.js +5 -0
  175. package/dist/index288.js +368 -102
  176. package/dist/index290.js +13 -5
  177. package/dist/index291.js +28 -5
  178. package/dist/index293.js +2 -7
  179. package/dist/index294.js +2 -7
  180. package/dist/index295.js +5 -21
  181. package/dist/index296.js +6 -7
  182. package/dist/index297.js +16 -10
  183. package/dist/index298.js +5 -3
  184. package/dist/index299.js +5 -5
  185. package/dist/index30.js +6 -6
  186. package/dist/index300.js +5 -7
  187. package/dist/index301.js +11 -0
  188. package/dist/index302.js +23 -3
  189. package/dist/index303.js +5 -3
  190. package/dist/index305.js +3 -28
  191. package/dist/index306.js +28 -719
  192. package/dist/index307.js +17 -366
  193. package/dist/index308.js +7 -57
  194. package/dist/index309.js +1 -1
  195. package/dist/index310.js +4 -2
  196. package/dist/index311.js +3 -280
  197. package/dist/index312.js +3 -2
  198. package/dist/index313.js +3 -16
  199. package/dist/index314.js +2 -2
  200. package/dist/index315.js +277 -13
  201. package/dist/index316.js +2 -2
  202. package/dist/index317.js +12 -23
  203. package/dist/index319.js +16 -2
  204. package/dist/index32.js +2 -2
  205. package/dist/index320.js +2 -2
  206. package/dist/index321.js +27 -2
  207. package/dist/index322.js +2 -2
  208. package/dist/index323.js +1 -1
  209. package/dist/index324.js +1 -1
  210. package/dist/index325.js +2 -3
  211. package/dist/index326.js +2 -4
  212. package/dist/index327.js +2 -3
  213. package/dist/index328.js +3 -4
  214. package/dist/index329.js +4 -3
  215. package/dist/index330.js +2 -3
  216. package/dist/index331.js +1 -1
  217. package/dist/index333.js +3 -125
  218. package/dist/index334.js +719 -2
  219. package/dist/index335.js +366 -15
  220. package/dist/index336.js +57 -2
  221. package/dist/index337.js +227 -18
  222. package/dist/index338.js +125 -2
  223. package/dist/index339.js +2 -228
  224. package/dist/index34.js +7 -7
  225. package/dist/index340.js +15 -67
  226. package/dist/index341.js +2 -67
  227. package/dist/index342.js +16 -90
  228. package/dist/index343.js +2 -5
  229. package/dist/index344.js +6 -6
  230. package/dist/index345.js +5 -19
  231. package/dist/index346.js +200 -9
  232. package/dist/index347.js +258 -14
  233. package/dist/index348.js +34 -6
  234. package/dist/index349.js +125 -31
  235. package/dist/index350.js +398 -6
  236. package/dist/index351.js +6 -128
  237. package/dist/index352.js +16 -395
  238. package/dist/index353.js +9 -22
  239. package/dist/index354.js +17 -0
  240. package/dist/index355.js +66 -133
  241. package/dist/index356.js +65 -198
  242. package/dist/index357.js +91 -257
  243. package/dist/index358.js +21 -1
  244. package/dist/index36.js +5 -5
  245. package/dist/index360.js +2 -441
  246. package/dist/index361.js +2 -128
  247. package/dist/index362.js +131 -44
  248. package/dist/index363.js +44 -67
  249. package/dist/index364.js +66 -516
  250. package/dist/index365.js +435 -44
  251. package/dist/index366.js +130 -0
  252. package/dist/index367.js +522 -0
  253. package/dist/index368.js +52 -0
  254. package/dist/index38.js +24 -24
  255. package/dist/index40.js +8 -8
  256. package/dist/index42.js +2 -2
  257. package/dist/index44.js +7 -7
  258. package/dist/index46.js +9 -9
  259. package/dist/index48.js +4 -4
  260. package/dist/index50.js +4 -4
  261. package/dist/index54.js +1 -1
  262. package/dist/index56.js +2 -2
  263. package/dist/index58.js +2 -2
  264. package/dist/index60.js +3 -3
  265. package/dist/index62.js +7 -7
  266. package/dist/index68.js +1 -1
  267. package/dist/index7.js +2 -2
  268. package/dist/index74.js +4 -4
  269. package/dist/index75.js +1 -1
  270. package/dist/index78.js +13 -11
  271. package/dist/index82.js +8 -8
  272. package/dist/index84.js +2 -2
  273. package/dist/index86.js +3 -3
  274. package/dist/index88.js +3 -3
  275. package/dist/index9.js +1 -1
  276. package/dist/index90.js +1 -1
  277. package/dist/index93.js +4 -4
  278. package/dist/index95.js +3 -3
  279. package/dist/index97.js +6 -6
  280. package/dist/index99.js +2 -2
  281. package/package.json +2 -2
  282. package/dist/index141.js +0 -13
  283. package/dist/index219.js +0 -4
  284. package/dist/index248.js +0 -137
  285. package/dist/index257.js +0 -6
  286. package/dist/index259.js +0 -36
  287. package/dist/index273.js +0 -375
  288. package/dist/index289.js +0 -7
  289. package/dist/index292.js +0 -4
  290. package/dist/index304.js +0 -19
  291. package/dist/index359.js +0 -4
@@ -1,13 +1,15 @@
1
1
  import { HTMLAttributes, InputHTMLAttributes } from 'vue';
2
2
  import { IconType } from '../../types/Icon';
3
3
  /**
4
- * Props for the low-level date-picker input that couples a masked text field with a popover calendar.
4
+ * Props for the low-level date-picker input that couples a segmented text field with a popover calendar.
5
5
  * Accepts ISO strings (or `YYYY-MM-DD` when `floating` is true) and can operate in single or range mode.
6
+ * In both modes users type directly into segmented day / month / year inputs with auto-advance between them.
6
7
  */
7
8
  export type BaseDatePickerInputProps = {
8
9
  /**
9
- * Controls whether manual typing is allowed inside the text field.
10
+ * Controls whether manual typing is allowed inside the text fields.
10
11
  * Use `'not-mobile'` to disable typing on mobile devices while keeping it on desktop.
12
+ * Applies to both single and range modes.
11
13
  * @default true
12
14
  */
13
15
  allowWriting?: boolean | 'not-mobile';
@@ -21,7 +23,7 @@ export type BaseDatePickerInputProps = {
21
23
  */
22
24
  autocomplete?: InputHTMLAttributes['autocomplete'];
23
25
  /**
24
- * Focus the text field automatically when the component mounts.
26
+ * Focus the first text field automatically when the component mounts.
25
27
  */
26
28
  autofocus?: InputHTMLAttributes['autofocus'];
27
29
  /**
@@ -72,11 +74,14 @@ export type BaseDatePickerInputProps = {
72
74
  */
73
75
  modelValue: string | string[] | null;
74
76
  /**
75
- * Name attribute forwarded to the native input.
77
+ * Name attribute forwarded to the native inputs. In single mode fields are named
78
+ * `${name}-day`, `${name}-month`, `${name}-year`; in range mode they are prefixed
79
+ * with the segment (`${name}-start-day`, `${name}-end-day`, …).
76
80
  */
77
81
  name?: InputHTMLAttributes['name'];
78
82
  /**
79
- * Placeholder text displayed when no value is present.
83
+ * Placeholder text displayed when no value is present. Defaults to a format hint
84
+ * (`DD/MM/YYYY` or `DD/MM/YYYY – DD/MM/YYYY` for range mode).
80
85
  */
81
86
  placeholder?: InputHTMLAttributes['placeholder'];
82
87
  /**
@@ -84,36 +89,79 @@ export type BaseDatePickerInputProps = {
84
89
  */
85
90
  'prepend:icon'?: IconType;
86
91
  /**
87
- * Enables range selection. When active, v-model expects a two-element array and typing is disabled.
92
+ * Enables range selection. When active, v-model expects a two-element array `[start, end]`.
93
+ * Users can still type into the start and end segments as long as `allowWriting` is truthy.
88
94
  */
89
95
  range?: boolean;
90
96
  /**
91
- * Makes the text field read-only and prevents opening the calendar.
97
+ * Makes the text fields read-only and prevents opening the calendar.
92
98
  */
93
99
  readonly?: boolean;
94
100
  /**
95
- * Marks the input as required to the browser.
101
+ * Marks the inputs as required to the browser.
96
102
  */
97
103
  required?: boolean;
98
104
  /**
99
105
  * Predicate invoked for each candidate date. Return `false` to disable selection for that value.
100
106
  */
101
107
  selectable?: (date: string) => boolean;
108
+ /**
109
+ * Hides the calendar trigger button and prevents the calendar popover from opening.
110
+ * Use `'not-mobile'` to hide the popover on desktop while keeping it visible on mobile,
111
+ * complementing `allowWriting: 'not-mobile'` (desktop = keyboard-first, mobile = calendar-first).
112
+ * An error is thrown if both writing and the popover would be unavailable on the same platform.
113
+ */
114
+ hidePopover?: boolean | 'not-mobile';
102
115
  /**
103
116
  * Transition duration, in milliseconds, for the popover appearance.
104
117
  */
105
118
  transitionDuration?: number;
106
119
  };
120
+ /**
121
+ * Structured payload carried by every `error` event.
122
+ *
123
+ * | `code` | Trigger | `original` | `normalized` |
124
+ * |------------------------|------------------------------------|------------------------------|-------------------------------------------------------|
125
+ * | `disabled_date` | Typed single date is disabled | The disabled date | Snapped to `min`/`max`, or `null` if not normalizable |
126
+ * | `disabled_range_start` | Typed range start is disabled | `[start]` or `[start, end]` | Snapped range, or `null` if start is not normalizable |
127
+ * | `disabled_range_end` | Typed range end is disabled | `[start, end]` | Snapped range (length 1 or 2), or `null` |
128
+ * | `end_before_start` | Typed end is chronologically first | `[start, end]` (wrong order) | `[end, start]` — always the swapped pair |
129
+ */
130
+ export type DatePickerInputError = {
131
+ code: 'disabled_date';
132
+ /** The value the user typed before normalization. */
133
+ original: string;
134
+ /** Snapped to the nearest `min`/`max` boundary, or `null` if disabled by `selectable`. */
135
+ normalized: string | null;
136
+ } | {
137
+ code: 'disabled_range_start';
138
+ /** The range value before normalization (may be `[start]` or `[start, end]`). */
139
+ original: string[];
140
+ /** Snapped range, or `null` if start could not be normalized. */
141
+ normalized: string[] | null;
142
+ } | {
143
+ code: 'disabled_range_end';
144
+ /** The full range before normalization. */
145
+ original: [string, string];
146
+ /** Range with end snapped, or `[start]` if end could not be normalized. */
147
+ normalized: string[] | null;
148
+ } | {
149
+ code: 'end_before_start';
150
+ /** `[start, end]` in the order the user typed them. */
151
+ original: [string, string];
152
+ /** `[end, start]` — the chronologically corrected pair. */
153
+ normalized: [string, string];
154
+ };
107
155
  /**
108
156
  * Events emitted by `BaseDatePickerInput`.
109
157
  * - `active` / `inactive`: fired when focus enters or leaves the composite control.
110
- * - `error`: emitted with an error code (e.g. `invalid_date_typed`) when manual input is rejected.
158
+ * - `error`: emitted alongside every normalization or removal — see `DatePickerInputError` for the full code map.
111
159
  * - `focus`: forwarded from the native input focus event.
112
160
  * - `update:modelValue`: emitted whenever the selected value changes.
113
161
  */
114
162
  export type BaseDatePickerInputEvents = {
115
163
  (e: 'active'): void;
116
- (e: 'error', message: string): void;
164
+ (e: 'error', error: DatePickerInputError): void;
117
165
  (e: 'focus', event: FocusEvent): void;
118
166
  (e: 'inactive'): void;
119
167
  (e: 'update:modelValue', value: BaseDatePickerInputProps['modelValue']): void;
@@ -242,7 +290,6 @@ declare function __VLS_template(): {
242
290
  suffix?(_: {}): any;
243
291
  };
244
292
  }) | null;
245
- input: HTMLInputElement;
246
293
  calendar: HTMLDivElement;
247
294
  baseDatePicker: ({
248
295
  $: import('vue').ComponentInternalInstance;
@@ -319,13 +366,13 @@ declare function __VLS_template(): {
319
366
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
320
367
  declare const __VLS_component: import('vue').DefineComponent<BaseDatePickerInputProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
321
368
  "update:modelValue": (value: string | string[] | null) => any;
322
- error: (message: string) => any;
369
+ error: (error: DatePickerInputError) => any;
323
370
  focus: (event: FocusEvent) => any;
324
371
  inactive: () => any;
325
372
  active: () => any;
326
373
  }, string, import('vue').PublicProps, Readonly<BaseDatePickerInputProps> & Readonly<{
327
374
  "onUpdate:modelValue"?: ((value: string | string[] | null) => any) | undefined;
328
- onError?: ((message: string) => any) | undefined;
375
+ onError?: ((error: DatePickerInputError) => any) | undefined;
329
376
  onFocus?: ((event: FocusEvent) => any) | undefined;
330
377
  onInactive?: (() => any) | undefined;
331
378
  onActive?: (() => any) | undefined;
@@ -439,7 +486,6 @@ declare const __VLS_component: import('vue').DefineComponent<BaseDatePickerInput
439
486
  suffix?(_: {}): any;
440
487
  };
441
488
  }) | null;
442
- input: HTMLInputElement;
443
489
  calendar: HTMLDivElement;
444
490
  baseDatePicker: ({
445
491
  $: import('vue').ComponentInternalInstance;
@@ -1,6 +1,7 @@
1
- import { BaseDatePickerInputEvents } from '../BaseDatePickerInput/BaseDatePickerInput.vue';
1
+ import { BaseDatePickerInputEvents, DatePickerInputError } from '../BaseDatePickerInput/BaseDatePickerInput.vue';
2
2
  import { HTMLAttributes, InputHTMLAttributes } from 'vue';
3
3
  import { IconType } from '../../types/Icon';
4
+ export type { DatePickerInputError };
4
5
  export type BbDatePickerInputProps = {
5
6
  /**
6
7
  * Allows typing into the input.
@@ -51,6 +52,12 @@ export type BbDatePickerInputProps = {
51
52
  * It usually attaches a CSS class for styling purposes.
52
53
  */
53
54
  hasErrors?: boolean;
55
+ /**
56
+ * Hides the calendar trigger button and prevents the popover from opening.
57
+ * Use `'not-mobile'` to hide on desktop and keep visible on mobile,
58
+ * complementing `allowWriting: 'not-mobile'` for platform-specific interaction modes.
59
+ */
60
+ hidePopover?: boolean | 'not-mobile';
54
61
  /**
55
62
  * Visually hides the label of the input while maintaining accessibility.
56
63
  */
@@ -163,13 +170,13 @@ declare function __VLS_template(): {
163
170
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
164
171
  declare const __VLS_component: import('vue').DefineComponent<BbDatePickerInputProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
165
172
  "update:modelValue": (value: string | string[] | null) => any;
166
- error: (message: string) => any;
173
+ error: (error: DatePickerInputError) => any;
167
174
  focus: (event: FocusEvent) => any;
168
175
  inactive: () => any;
169
176
  active: () => any;
170
177
  }, string, import('vue').PublicProps, Readonly<BbDatePickerInputProps> & Readonly<{
171
178
  "onUpdate:modelValue"?: ((value: string | string[] | null) => any) | undefined;
172
- onError?: ((message: string) => any) | undefined;
179
+ onError?: ((error: DatePickerInputError) => any) | undefined;
173
180
  onFocus?: ((event: FocusEvent) => any) | undefined;
174
181
  onInactive?: (() => any) | undefined;
175
182
  onActive?: (() => any) | undefined;