react-bootstrap-plugins 1.0.3 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/README.md +39 -270
  2. package/dist/DatePicker.cjs +2 -2
  3. package/dist/DatePicker.d.cts +57 -0
  4. package/dist/DatePicker.d.ts +54 -42
  5. package/dist/DatePicker.js +2 -2
  6. package/dist/Label.cjs +2 -2
  7. package/dist/Label.d.cts +15 -0
  8. package/dist/Label.d.ts +12 -13
  9. package/dist/Label.js +2 -2
  10. package/dist/SearchSelect.cjs +2 -2
  11. package/dist/SearchSelect.d.cts +40 -0
  12. package/dist/SearchSelect.d.ts +37 -25
  13. package/dist/SearchSelect.js +2 -2
  14. package/dist/TableLoading.cjs +2 -0
  15. package/dist/TableLoading.d.cts +13 -0
  16. package/dist/TableLoading.d.ts +13 -0
  17. package/dist/TableLoading.js +2 -0
  18. package/dist/chunk-2Q4NZKMX.cjs +2 -0
  19. package/dist/chunk-5IOLZUVD.cjs +2 -0
  20. package/dist/chunk-7LXLWNUR.js +2 -0
  21. package/dist/chunk-AWU5XGMI.cjs +2 -0
  22. package/dist/chunk-ES5ABK5L.js +2 -0
  23. package/dist/chunk-GZ2D7HTS.cjs +2 -0
  24. package/dist/chunk-HYB5IGJK.js +2 -0
  25. package/dist/chunk-NPQQDBFB.cjs +2 -0
  26. package/dist/chunk-RR7TBRGI.js +2 -0
  27. package/dist/chunk-ZCAQ7S2A.js +2 -0
  28. package/dist/css/datepicker.css +1 -299
  29. package/dist/css/plugins.css +1 -0
  30. package/dist/index.cjs +2 -2
  31. package/dist/index.d.cts +5 -0
  32. package/dist/index.d.ts +5 -10
  33. package/dist/index.js +2 -2
  34. package/docs/DATEPICKER.md +157 -0
  35. package/docs/LABEL.md +89 -0
  36. package/docs/SEARCHSELECT.md +123 -0
  37. package/docs/TABLELOADING.md +98 -0
  38. package/package.json +29 -10
  39. package/dist/DatePicker.cjs.map +0 -1
  40. package/dist/DatePicker.js.map +0 -1
  41. package/dist/Label.cjs.map +0 -1
  42. package/dist/Label.js.map +0 -1
  43. package/dist/SearchSelect.cjs.map +0 -1
  44. package/dist/SearchSelect.js.map +0 -1
  45. package/dist/chunk-46AJ2Q5H.js +0 -2
  46. package/dist/chunk-46AJ2Q5H.js.map +0 -1
  47. package/dist/chunk-4ISYCPRB.cjs +0 -2
  48. package/dist/chunk-4ISYCPRB.cjs.map +0 -1
  49. package/dist/chunk-CZV7QBHA.cjs +0 -2
  50. package/dist/chunk-CZV7QBHA.cjs.map +0 -1
  51. package/dist/chunk-DIUGH74M.js +0 -2
  52. package/dist/chunk-DIUGH74M.js.map +0 -1
  53. package/dist/chunk-F3KMQZXU.js +0 -2
  54. package/dist/chunk-F3KMQZXU.js.map +0 -1
  55. package/dist/chunk-HBS6VOGV.cjs +0 -2
  56. package/dist/chunk-HBS6VOGV.cjs.map +0 -1
  57. package/dist/chunk-NOGRIWSU.js +0 -2
  58. package/dist/chunk-NOGRIWSU.js.map +0 -1
  59. package/dist/chunk-QQNPKA7A.cjs +0 -2
  60. package/dist/chunk-QQNPKA7A.cjs.map +0 -1
  61. package/dist/index.cjs.map +0 -1
  62. package/dist/index.js.map +0 -1
  63. package/src/components/DatePicker.d.ts +0 -45
  64. package/src/components/DatePicker.jsx +0 -690
  65. package/src/components/Label.d.ts +0 -16
  66. package/src/components/Label.jsx +0 -21
  67. package/src/components/SearchSelect.d.ts +0 -28
  68. package/src/components/SearchSelect.jsx +0 -152
  69. package/src/css/datepicker.css +0 -299
  70. package/src/index.js +0 -15
  71. package/src/lib/cn.js +0 -35
package/README.md CHANGED
@@ -6,6 +6,19 @@
6
6
 
7
7
  ---
8
8
 
9
+ ## Components
10
+
11
+ | Component | Guide | Description |
12
+ |---|---|---|
13
+ | **DatePicker** | [DATEPICKER.md](./docs/DATEPICKER.md) | Date, time, and datetime picker with popover calendar |
14
+ | **SearchSelect** | [SEARCHSELECT.md](./docs/SEARCHSELECT.md) | Filterable, searchable select dropdown |
15
+ | **Label** | [LABEL.md](./docs/LABEL.md) | Bootstrap-styled form label with required indicator |
16
+ | **TableLoading** | [TABLELOADING.md](./docs/TABLELOADING.md) | Bootstrap 5 placeholder loading skeleton for table `<tbody>` |
17
+
18
+ Each component guide includes full prop tables, usage examples, import patterns, and dark mode behavior.
19
+
20
+ ---
21
+
9
22
  ## Features
10
23
 
11
24
  - 🎯 **Zero runtime dependencies** — only React and React DOM as peer dependencies
@@ -16,6 +29,8 @@
16
29
  - ♿ **Accessible** — ARIA attributes, keyboard navigation, screen-reader friendly
17
30
  - 📱 **Responsive** — mobile-optimized layouts for all components
18
31
 
32
+ ---
33
+
19
34
  ## Installation
20
35
 
21
36
  ```bash
@@ -45,10 +60,12 @@ DatePicker requires a small CSS file for its popover calendar layout. Import it
45
60
 
46
61
  ```js
47
62
  // Recommended — uses the package exports map (works with Vite, webpack 5+, Turbopack, Rollup)
48
- import 'react-bootstrap-plugins/css/datepicker.css'
63
+ import 'react-bootstrap-plugins/css/plugins.css'
49
64
  ```
50
65
 
51
- This resolves to `dist/css/datepicker.css` via the package's `exports` map. No additional configuration is needed for modern bundlers.
66
+ This resolves to `dist/css/plugins.css` via the package's `exports` map. No additional configuration is needed for modern bundlers.
67
+
68
+ > **Backward compatibility:** The old path `react-bootstrap-plugins/css/datepicker.css` still works — it points to the same file. Prefer the new `plugins.css` path for new code.
52
69
 
53
70
  #### Troubleshooting CSS import issues
54
71
 
@@ -63,7 +80,7 @@ If your bundler reports **"Cannot find module"** or fails to resolve the CSS imp
63
80
  - **For older webpack (v4)** — you may need to use the full path if your version doesn't support the `exports` field.
64
81
 
65
82
  ```js
66
- import 'react-bootstrap-plugins/dist/css/datepicker.css'
83
+ import 'react-bootstrap-plugins/dist/css/plugins.css'
67
84
  ```
68
85
 
69
86
  - **For Next.js** — add the package to `transpilePackages` in `next.config.mjs` if not already present.
@@ -81,282 +98,32 @@ If your bundler reports **"Cannot find module"** or fails to resolve the CSS imp
81
98
 
82
99
  ---
83
100
 
84
- ## Components
85
-
86
- ### DatePicker
87
-
88
- A fully-featured date, time, and datetime picker with Bootstrap styling. Popover is rendered via React Portal — no z-index stacking issues with modals or sidebars.
89
-
90
- #### Import
91
-
92
- ```js
93
- // Tree-shakeable single import (recommended)
94
- import { DatePicker } from 'react-bootstrap-plugins/DatePicker'
95
-
96
- // Or barrel import
97
- import { DatePicker } from 'react-bootstrap-plugins'
98
-
99
- // Required CSS (import once, anywhere in your app)
100
- import 'react-bootstrap-plugins/css/datepicker.css'
101
- ```
102
-
103
- #### Basic Usage
104
-
105
- ```jsx
106
- import { useState } from 'react'
107
- import { DatePicker } from 'react-bootstrap-plugins'
108
- import 'react-bootstrap-plugins/css/datepicker.css'
109
-
110
- function MyForm() {
111
- const [date, setDate] = useState(null)
112
-
113
- return (
114
- <DatePicker
115
- value={date}
116
- onChange={(e) => setDate(e.target.value)}
117
- placeholderText="Pick a date"
118
- />
119
- )
120
- }
121
- ```
122
-
123
- #### Props
124
-
125
- | Prop | Type | Default | Description |
126
- |---|---|---|---|
127
- | `mode` | `'date'` \| `'time'` \| `'datetime'` | `'date'` | Picker mode |
128
- | `value` | `Date` \| `string` \| `null` | — | Currently selected value |
129
- | `selected` | `Date` \| `null` | — | Alias for `value` |
130
- | `onChange` | `(e) => void` | — | Synthetic event; `e.target.value` is formatted string |
131
- | `dateFormat` | `string` | — | Custom format. Tokens: `yyyy`, `MM`, `dd`, `hh`, `mm`, `aa` |
132
- | `placeholderText` | `string` | Auto | Placeholder when empty |
133
- | `size` | `'sm'` \| `'lg'` | — | Bootstrap input size variant |
134
- | `isClearable` | `boolean` | `false` | Show clear button |
135
- | `disabled` | `boolean` | `false` | Disable the input |
136
- | `minDate` | `Date` | — | Earliest selectable date |
137
- | `maxDate` | `Date` | — | Latest selectable date |
138
- | `timeIntervals` | `number` | `5` | Minute step in time picker |
139
- | `timezone` | `string` | `'Kampala'` | Timezone label |
140
- | `className` | `string` | — | Additional CSS classes on the input |
141
- | `id` | `string` | — | Input element ID |
142
- | `name` | `string` | — | Input name attribute |
143
-
144
- #### Examples
145
-
146
- **Date mode (default):**
147
- ```jsx
148
- <DatePicker
149
- name="dob"
150
- value={birthDate}
151
- onChange={(e) => setBirthDate(e.target.value)}
152
- maxDate={new Date()}
153
- isClearable
154
- />
155
- // e.target.value → "2026-06-29"
156
- ```
157
-
158
- **Time mode:**
159
- ```jsx
160
- <DatePicker
161
- mode="time"
162
- value={startTime}
163
- onChange={(e) => setStartTime(e.target.value)}
164
- timeIntervals={15}
165
- />
166
- // e.target.value → "02:30 PM"
167
- ```
168
-
169
- **Datetime mode:**
170
- ```jsx
171
- <DatePicker
172
- mode="datetime"
173
- value={appointmentDateTime}
174
- onChange={(e) => setAppointmentDateTime(e.target.value)}
175
- dateFormat="dd/MM/yyyy hh:mm aa"
176
- />
177
- // e.target.value → "29/06/2026 02:30 PM"
178
- ```
179
-
180
- **With Bootstrap form layout:**
181
- ```jsx
182
- <div className="mb-3">
183
- <label htmlFor="eventDate" className="form-label">Event Date</label>
184
- <DatePicker
185
- id="eventDate"
186
- name="eventDate"
187
- value={eventDate}
188
- onChange={(e) => setEventDate(e.target.value)}
189
- minDate={new Date()}
190
- className="form-control-lg"
191
- />
192
- </div>
193
- ```
194
-
195
- ---
196
-
197
- ### SearchSelect
198
-
199
- A filterable, searchable select dropdown. Supports both primitive arrays and object arrays with configurable label/value keys.
200
-
201
- #### Import
202
-
203
- ```js
204
- import SearchSelect from 'react-bootstrap-plugins/SearchSelect'
205
- // or
206
- import { SearchSelect } from 'react-bootstrap-plugins'
207
- ```
208
-
209
- #### Basic Usage
210
-
211
- **Primitive array (strings/numbers):**
212
- ```jsx
213
- import { useState } from 'react'
214
- import { SearchSelect } from 'react-bootstrap-plugins'
215
-
216
- function FruitPicker() {
217
- const [fruit, setFruit] = useState('')
218
-
219
- return (
220
- <SearchSelect
221
- options={['Apple', 'Banana', 'Orange', 'Mango', 'Pineapple']}
222
- placeholder="Choose a fruit..."
223
- value={fruit}
224
- onChange={(val) => setFruit(val)}
225
- />
226
- )
227
- }
228
- ```
229
-
230
- **Object array with label/value mapping:**
231
- ```jsx
232
- function UserPicker() {
233
- const [userId, setUserId] = useState(null)
234
-
235
- const users = [
236
- { id: 101, fullName: 'Alice Johnson', email: 'alice@example.com' },
237
- { id: 102, fullName: 'Bob Smith', email: 'bob@example.com' },
238
- { id: 103, fullName: 'Charlie Brown', email: 'charlie@example.com' },
239
- ]
240
-
241
- return (
242
- <SearchSelect
243
- options={users}
244
- labelKey="fullName"
245
- valueKey="id"
246
- placeholder="Select a user..."
247
- value={userId}
248
- onChange={(id) => setUserId(id)}
249
- />
250
- )
251
- }
252
- ```
253
-
254
- #### Props
255
-
256
- | Prop | Type | Default | Description |
257
- |---|---|---|---|
258
- | `options` | `Array<string\|number\|boolean\|object>` | `[]` | Selectable options |
259
- | `labelKey` | `string` | `'label'` | Key for display text (object options only) |
260
- | `valueKey` | `string` | `'value'` | Key for the value (object options only) |
261
- | `placeholder` | `string` | `'Select...'` | Placeholder text |
262
- | `value` | `any` | `null` | Currently selected value |
263
- | `onChange` | `(value: any) => void` | — | Called with selected value |
264
- | `id` | `string` | `'filterable-select'` | Input element ID |
265
- | `disabled` | `boolean` | `false` | Disable the input |
266
- | `className` | `string` | — | Additional CSS classes on wrapper |
267
-
268
- #### Inside Bootstrap Input Groups
269
-
270
- ```jsx
271
- <div className="input-group mb-3">
272
- <span className="input-group-text">Subject</span>
273
- <SearchSelect
274
- options={subjects}
275
- labelKey="name"
276
- valueKey="id"
277
- placeholder="Search subject..."
278
- value={subjectId}
279
- onChange={setSubjectId}
280
- />
281
- </div>
282
- ```
283
-
284
- ---
285
-
286
- ### Label
287
-
288
- A simple form label with a Bootstrap-styled required field indicator.
289
-
290
- #### Import
291
-
292
- ```js
293
- import { Label } from 'react-bootstrap-plugins/Label'
294
- // or
295
- import { Label } from 'react-bootstrap-plugins'
296
- ```
297
-
298
- #### Basic Usage
299
-
300
- ```jsx
301
- import { Label } from 'react-bootstrap-plugins'
302
-
303
- <Label hf="studentName" label="Student Name" />
304
- // Renders: <label for="studentName">Student Name <b class="text-danger">*</b></label>
305
- ```
306
-
307
- #### Props
308
-
309
- | Prop | Type | Default | Description |
310
- |---|---|---|---|
311
- | `hf` | `string` | `'default'` | `htmlFor` attribute — matches input `id` |
312
- | `label` | `string` | `'Title'` | Label text |
313
- | `required` | `boolean` | `true` | Show red asterisk |
314
- | `className` | `string` | — | Additional CSS classes |
315
-
316
- #### Examples
317
-
318
- **With required indicator:**
319
- ```jsx
320
- <Label hf="email" label="Email Address" required />
321
- ```
322
-
323
- **Optional field (no asterisk):**
324
- ```jsx
325
- <Label hf="middleName" label="Middle Name" required={false} />
326
- ```
327
-
328
- **With Bootstrap grid:**
329
- ```jsx
330
- <div className="mb-3 row">
331
- <div className="col-sm-3">
332
- <Label hf="phone" label="Phone Number" className="col-form-label" />
333
- </div>
334
- <div className="col-sm-9">
335
- <input id="phone" type="tel" className="form-control" />
336
- </div>
337
- </div>
338
- ```
339
-
340
- ---
341
-
342
101
  ## Import Patterns
343
102
 
344
103
  All patterns are tree-shakeable. Your bundler will only include the code you actually import.
345
104
 
346
105
  ```js
347
- // Single component — smallest bundle
348
- import { DatePicker } from 'react-bootstrap-plugins/DatePicker'
106
+ // Single component — smallest bundle (default import)
107
+ import DatePicker from 'react-bootstrap-plugins/DatePicker'
108
+ import SearchSelect from 'react-bootstrap-plugins/SearchSelect'
109
+ import Label from 'react-bootstrap-plugins/Label'
110
+ import TableLoading from 'react-bootstrap-plugins/TableLoading'
349
111
 
350
- // Multiple namedtree-shaken
351
- import { DatePicker, Label } from 'react-bootstrap-plugins'
112
+ // Single componentnamed import
113
+ import { DatePicker } from 'react-bootstrap-plugins/DatePicker'
114
+ import { SearchSelect } from 'react-bootstrap-plugins/SearchSelect'
115
+ import { Label } from 'react-bootstrap-plugins/Label'
116
+ import { TableLoading } from 'react-bootstrap-plugins/TableLoading'
352
117
 
353
- // All components
354
- import { DatePicker, SearchSelect, Label } from 'react-bootstrap-plugins'
118
+ // Multiple named — barrel, tree-shaken
119
+ import { DatePicker, SearchSelect, Label, TableLoading } from 'react-bootstrap-plugins'
355
120
 
356
121
  // CSS (required for DatePicker)
357
- import 'react-bootstrap-plugins/css/datepicker.css'
122
+ import 'react-bootstrap-plugins/css/plugins.css'
358
123
  ```
359
124
 
125
+ Every component supports **both** default and named imports — use whichever fits your codebase conventions.
126
+
360
127
  ---
361
128
 
362
129
  ## Dark Mode
@@ -392,7 +159,8 @@ function App() {
392
159
  | `DatePicker` (with CSS) | ~5.5 KB |
393
160
  | `SearchSelect` | ~1.2 KB |
394
161
  | `Label` | ~0.3 KB |
395
- | All three (barrel) | ~6.5 KB |
162
+ | `TableLoading` | ~0.2 KB |
163
+ | All four (barrel) | ~6.7 KB |
396
164
 
397
165
  Measured with ESM, tree-shaken, minified, gzipped. Your actual size depends on your bundler configuration.
398
166
 
@@ -446,9 +214,10 @@ src/
446
214
  │ ├── DatePicker.jsx Date/time/datetime picker
447
215
  │ ├── SearchSelect.jsx Searchable select dropdown
448
216
  │ ├── Label.jsx Form label
217
+ │ ├── TableLoading.jsx Table placeholder skeleton
449
218
  │ └── *.d.ts TypeScript declarations
450
219
  └── css/
451
- └── datepicker.css
220
+ └── plugins.css
452
221
  ```
453
222
 
454
223
  ---
@@ -1,2 +1,2 @@
1
- 'use strict';var chunk4ISYCPRB_cjs=require('./chunk-4ISYCPRB.cjs');require('./chunk-QQNPKA7A.cjs');Object.defineProperty(exports,"DatePicker",{enumerable:true,get:function(){return chunk4ISYCPRB_cjs.a}});//# sourceMappingURL=DatePicker.cjs.map
2
- //# sourceMappingURL=DatePicker.cjs.map
1
+ 'use strict';Object.defineProperty(exports,'__esModule',{value:true});var chunkGZ2D7HTS_cjs=require('./chunk-GZ2D7HTS.cjs');require('./chunk-NPQQDBFB.cjs');Object.defineProperty(exports,"DatePicker",{enumerable:true,get:function(){return chunkGZ2D7HTS_cjs.a}});Object.defineProperty(exports,"default",{enumerable:true,get:function(){return chunkGZ2D7HTS_cjs.b}});//# sourceMappingURL=DatePicker.cjs.map
2
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJEYXRlUGlja2VyLmNqcyJ9
@@ -0,0 +1,57 @@
1
+ import * as React from 'react';
2
+
3
+ interface DatePickerChangeEvent {
4
+ target: {
5
+ value: string | null;
6
+ name: string;
7
+ type: string;
8
+ };
9
+ preventDefault: () => void;
10
+ stopPropagation: () => void;
11
+ nativeEvent: null;
12
+ }
13
+ interface DatePickerProps {
14
+ /** Picker mode (default 'date') */
15
+ mode?: 'date' | 'time' | 'datetime';
16
+ /** Currently selected Date (alias for value) */
17
+ selected?: Date | null;
18
+ /** Currently selected Date, ISO string, "hh:mm AA" time string, "YYYY-MM-DD hh:mm AA" datetime string, or timestamp */
19
+ value?: Date | string | number | null;
20
+ /** Synthetic event handler — e.target.value is a pre-formatted string */
21
+ onChange?: (e: DatePickerChangeEvent) => void;
22
+ /** Display format with tokens: yyyy, MM, dd, hh, mm, aa */
23
+ dateFormat?: string;
24
+ /** Placeholder text when empty */
25
+ placeholderText?: string;
26
+ /** Bootstrap size variant */
27
+ size?: 'sm' | 'lg';
28
+ /** Show a clear button on the input */
29
+ isClearable?: boolean;
30
+ /** Disable the input */
31
+ disabled?: boolean;
32
+ /** Earliest selectable date */
33
+ minDate?: Date;
34
+ /** Latest selectable date */
35
+ maxDate?: Date;
36
+ /** Minute step in the time list (default 5) */
37
+ timeIntervals?: number;
38
+ /** Timezone identifier (default 'Kampala') */
39
+ timezone?: string;
40
+ /** Additional CSS classes on the input */
41
+ className?: string;
42
+ /** Input element ID */
43
+ id?: string;
44
+ /** Input name attribute — surfaces as e.target.name in onChange */
45
+ name?: string;
46
+ }
47
+ /**
48
+ * Custom Bootstrap-styled date / time / datetime picker. Zero dependencies.
49
+ *
50
+ * **Important:** The accompanying CSS **must** be imported for the picker to render correctly:
51
+ * ```js
52
+ * import 'react-bootstrap-plugins/css/plugins.css'
53
+ * ```
54
+ */
55
+ declare const DatePicker: React.ForwardRefExoticComponent<DatePickerProps & React.RefAttributes<HTMLInputElement>>;
56
+
57
+ export { DatePicker, type DatePickerChangeEvent, type DatePickerProps, DatePicker as default };
@@ -1,45 +1,57 @@
1
- import * as React from 'react'
1
+ import * as React from 'react';
2
2
 
3
- export interface DatePickerProps {
4
- /** Picker mode (default 'date') */
5
- mode?: 'date' | 'time' | 'datetime'
6
- /** Currently selected Date (alias for `value`) */
7
- selected?: Date | null
8
- /** Currently selected Date */
9
- value?: Date | string | number | null
10
- /**
11
- * Synthetic event handler — `e.target.value` is a pre-formatted string:
12
- * - date → `"YYYY-MM-DD"`
13
- * - time → `"hh:mm AA"`
14
- * - datetime → `"YYYY-MM-DD hh:mm AA"`
15
- */
16
- onChange?: (e: { target: { value: string | null; name: string; type: string } }) => void
17
- /** Display format — tokens: yyyy, MM, dd, hh, mm, aa */
18
- dateFormat?: string
19
- /** Placeholder text when empty */
20
- placeholderText?: string
21
- /** Bootstrap size variant */
22
- size?: 'sm' | 'lg'
23
- /** Show a clear button on the input */
24
- isClearable?: boolean
25
- /** Disable the input */
26
- disabled?: boolean
27
- /** Earliest selectable date */
28
- minDate?: Date
29
- /** Latest selectable date */
30
- maxDate?: Date
31
- /** Minute step in the time list (default 5) */
32
- timeIntervals?: number
33
- /** Timezone identifier for display (default 'Kampala') */
34
- timezone?: string
35
- /** Additional CSS classes on the input */
36
- className?: string
37
- /** Input element ID */
38
- id?: string
39
- /** Input name attribute */
40
- name?: string
3
+ interface DatePickerChangeEvent {
4
+ target: {
5
+ value: string | null;
6
+ name: string;
7
+ type: string;
8
+ };
9
+ preventDefault: () => void;
10
+ stopPropagation: () => void;
11
+ nativeEvent: null;
41
12
  }
13
+ interface DatePickerProps {
14
+ /** Picker mode (default 'date') */
15
+ mode?: 'date' | 'time' | 'datetime';
16
+ /** Currently selected Date (alias for value) */
17
+ selected?: Date | null;
18
+ /** Currently selected Date, ISO string, "hh:mm AA" time string, "YYYY-MM-DD hh:mm AA" datetime string, or timestamp */
19
+ value?: Date | string | number | null;
20
+ /** Synthetic event handler — e.target.value is a pre-formatted string */
21
+ onChange?: (e: DatePickerChangeEvent) => void;
22
+ /** Display format with tokens: yyyy, MM, dd, hh, mm, aa */
23
+ dateFormat?: string;
24
+ /** Placeholder text when empty */
25
+ placeholderText?: string;
26
+ /** Bootstrap size variant */
27
+ size?: 'sm' | 'lg';
28
+ /** Show a clear button on the input */
29
+ isClearable?: boolean;
30
+ /** Disable the input */
31
+ disabled?: boolean;
32
+ /** Earliest selectable date */
33
+ minDate?: Date;
34
+ /** Latest selectable date */
35
+ maxDate?: Date;
36
+ /** Minute step in the time list (default 5) */
37
+ timeIntervals?: number;
38
+ /** Timezone identifier (default 'Kampala') */
39
+ timezone?: string;
40
+ /** Additional CSS classes on the input */
41
+ className?: string;
42
+ /** Input element ID */
43
+ id?: string;
44
+ /** Input name attribute — surfaces as e.target.name in onChange */
45
+ name?: string;
46
+ }
47
+ /**
48
+ * Custom Bootstrap-styled date / time / datetime picker. Zero dependencies.
49
+ *
50
+ * **Important:** The accompanying CSS **must** be imported for the picker to render correctly:
51
+ * ```js
52
+ * import 'react-bootstrap-plugins/css/plugins.css'
53
+ * ```
54
+ */
55
+ declare const DatePicker: React.ForwardRefExoticComponent<DatePickerProps & React.RefAttributes<HTMLInputElement>>;
42
56
 
43
- export const DatePicker: React.ForwardRefExoticComponent<
44
- DatePickerProps & React.RefAttributes<HTMLInputElement>
45
- >
57
+ export { DatePicker, type DatePickerChangeEvent, type DatePickerProps, DatePicker as default };
@@ -1,2 +1,2 @@
1
- export{a as DatePicker}from'./chunk-DIUGH74M.js';import'./chunk-46AJ2Q5H.js';//# sourceMappingURL=DatePicker.js.map
2
- //# sourceMappingURL=DatePicker.js.map
1
+ export{a as DatePicker,b as default}from'./chunk-ES5ABK5L.js';import'./chunk-RR7TBRGI.js';//# sourceMappingURL=DatePicker.js.map
2
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJEYXRlUGlja2VyLmpzIn0=
package/dist/Label.cjs CHANGED
@@ -1,2 +1,2 @@
1
- 'use strict';var chunkCZV7QBHA_cjs=require('./chunk-CZV7QBHA.cjs');Object.defineProperty(exports,"Label",{enumerable:true,get:function(){return chunkCZV7QBHA_cjs.a}});//# sourceMappingURL=Label.cjs.map
2
- //# sourceMappingURL=Label.cjs.map
1
+ 'use strict';Object.defineProperty(exports,'__esModule',{value:true});var chunk2Q4NZKMX_cjs=require('./chunk-2Q4NZKMX.cjs');Object.defineProperty(exports,"Label",{enumerable:true,get:function(){return chunk2Q4NZKMX_cjs.a}});Object.defineProperty(exports,"default",{enumerable:true,get:function(){return chunk2Q4NZKMX_cjs.b}});//# sourceMappingURL=Label.cjs.map
2
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJMYWJlbC5janMifQ==
@@ -0,0 +1,15 @@
1
+ import * as React from 'react';
2
+
3
+ interface LabelProps {
4
+ /** Additional CSS classes */
5
+ className?: string;
6
+ /** htmlFor attribute — associates label with input ID (default 'default') */
7
+ hf?: string;
8
+ /** Whether to show the required asterisk (default true) */
9
+ required?: boolean;
10
+ /** Label text content (default 'Title') */
11
+ label?: string;
12
+ }
13
+ declare const Label: React.ForwardRefExoticComponent<LabelProps & React.RefAttributes<HTMLLabelElement>>;
14
+
15
+ export { Label, type LabelProps, Label as default };
package/dist/Label.d.ts CHANGED
@@ -1,16 +1,15 @@
1
- import * as React from 'react'
1
+ import * as React from 'react';
2
2
 
3
- export interface LabelProps {
4
- /** Additional CSS classes */
5
- className?: string
6
- /** htmlFor attribute — associates label with input ID (default 'default') */
7
- hf?: string
8
- /** Whether to show the required asterisk (default true) */
9
- required?: boolean
10
- /** Label text content (default 'Title') */
11
- label?: string
3
+ interface LabelProps {
4
+ /** Additional CSS classes */
5
+ className?: string;
6
+ /** htmlFor attribute — associates label with input ID (default 'default') */
7
+ hf?: string;
8
+ /** Whether to show the required asterisk (default true) */
9
+ required?: boolean;
10
+ /** Label text content (default 'Title') */
11
+ label?: string;
12
12
  }
13
+ declare const Label: React.ForwardRefExoticComponent<LabelProps & React.RefAttributes<HTMLLabelElement>>;
13
14
 
14
- export const Label: React.ForwardRefExoticComponent<
15
- LabelProps & React.RefAttributes<HTMLLabelElement>
16
- >
15
+ export { Label, type LabelProps, Label as default };
package/dist/Label.js CHANGED
@@ -1,2 +1,2 @@
1
- export{a as Label}from'./chunk-F3KMQZXU.js';//# sourceMappingURL=Label.js.map
2
- //# sourceMappingURL=Label.js.map
1
+ export{a as Label,b as default}from'./chunk-HYB5IGJK.js';//# sourceMappingURL=Label.js.map
2
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJMYWJlbC5qcyJ9
@@ -1,2 +1,2 @@
1
- 'use strict';var chunkHBS6VOGV_cjs=require('./chunk-HBS6VOGV.cjs');require('./chunk-QQNPKA7A.cjs');module.exports=chunkHBS6VOGV_cjs.a;//# sourceMappingURL=SearchSelect.cjs.map
2
- //# sourceMappingURL=SearchSelect.cjs.map
1
+ 'use strict';Object.defineProperty(exports,'__esModule',{value:true});var chunkAWU5XGMI_cjs=require('./chunk-AWU5XGMI.cjs');require('./chunk-NPQQDBFB.cjs');Object.defineProperty(exports,"SearchSelect",{enumerable:true,get:function(){return chunkAWU5XGMI_cjs.a}});Object.defineProperty(exports,"default",{enumerable:true,get:function(){return chunkAWU5XGMI_cjs.b}});//# sourceMappingURL=SearchSelect.cjs.map
2
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJTZWFyY2hTZWxlY3QuY2pzIn0=
@@ -0,0 +1,40 @@
1
+ import * as React from 'react';
2
+
3
+ interface SearchSelectProps<T = unknown> {
4
+ /** Additional CSS classes on the wrapper */
5
+ className?: string;
6
+ /** Selectable options — primitives (string|number|boolean) or objects */
7
+ options?: T[];
8
+ /** Key for display text when options are objects (default 'label') */
9
+ labelKey?: string;
10
+ /** Key for the value when options are objects (default 'value') */
11
+ valueKey?: string;
12
+ /** Placeholder text (default 'Select...') */
13
+ placeholder?: string;
14
+ /** Currently selected value */
15
+ value?: T | null;
16
+ /** Called with synthetic event; e.target.value is the selected value, e.target.name is the input name */
17
+ onChange?: (e: {
18
+ target: {
19
+ value: T | null;
20
+ name: string;
21
+ };
22
+ }) => void;
23
+ /** Input element ID */
24
+ id?: string;
25
+ /** Input name attribute — surfaces as e.target.name in onChange */
26
+ name?: string;
27
+ /** Disable the input */
28
+ disabled?: boolean;
29
+ }
30
+ /**
31
+ * A filterable, searchable select dropdown styled with Bootstrap 5.
32
+ * Supports both primitive arrays and object arrays with configurable label/value keys.
33
+ */
34
+ interface SearchSelectComponent {
35
+ <T>(props: SearchSelectProps<T> & React.RefAttributes<HTMLDivElement>): React.ReactElement | null;
36
+ displayName?: string;
37
+ }
38
+ declare const SearchSelect: SearchSelectComponent;
39
+
40
+ export { SearchSelect, type SearchSelectProps, SearchSelect as default };