pns-component-library 1.5.11 → 1.5.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -8,7 +8,7 @@ A comprehensive Vue 3 component library built with modern development practices,
8
8
  - **2 Powerful Composables** - Reusable logic for common patterns
9
9
  - **2 Custom Directives** - Loading states and UI enhancements
10
10
  - **Vue 3 Composition API** - Modern, performant, and type-safe
11
- - **Responsive Design** - Mobile-first approach with breakpoint handling
11
+ - **Fully Responsive UI & UX** - Components automatically adapt to all screen sizes with optimized mobile-first design and touch-friendly interactions
12
12
  - **Accessibility** - ARIA attributes and keyboard navigation support
13
13
  - **Customizable Themes** - Multiple built-in color schemes
14
14
 
@@ -75,74 +75,6 @@ const handleClick = () => {
75
75
 
76
76
  ### Form Components
77
77
 
78
- #### Checkbox
79
- Customizable checkbox with multiple themes and validation support.
80
-
81
- ##### Attributes
82
-
83
- | Attribute | Description | Type | Default |
84
- |-----------|-------------|------|---------|
85
- | v-model / modelValue | binding value - `true` when checked, `false` when unchecked | `boolean` | `false` |
86
- | label | checkbox label | `string` | — |
87
- | size | checkbox size | `'small' \| 'medium'` | `'medium'` |
88
- | built_in_theme | color theme | `'green' \| 'primary-blue' \| 'secondary-blue' \| 'red'` | `'green'` |
89
- | disabled | whether checkbox is disabled | `boolean` | `false` |
90
- | indeterminate | whether checkbox is indeterminate | `boolean` | `false` |
91
-
92
- ##### Events
93
-
94
- | Event | Description | Parameters |
95
- |-------|-------------|------------|
96
- | change | triggers when the binding value changes | `(value: boolean)` |
97
-
98
- ##### Exposes
99
-
100
- | Method | Description | Type |
101
- |--------|-------------|------|
102
- | focus | focus the checkbox | `() => void` |
103
- | blur | blur the checkbox | `() => void` |
104
- | alert | show error message | `(message: string) => void` |
105
- | removeAlertOrErrorEffect | clear error state | `() => void` |
106
-
107
- ```vue
108
- <template>
109
- <Checkbox
110
- v-model="agreed"
111
- label="I agree to terms"
112
- built_in_theme="primary-blue"
113
- @change="handleChange"
114
- />
115
- </template>
116
- ```
117
-
118
- #### GroupCheckbox
119
- Container for managing multiple related checkboxes as a group.
120
-
121
- ##### Attributes
122
-
123
- | Attribute | Description | Type | Default |
124
- |-----------|-------------|------|---------|
125
- | v-model / modelValue | binding value - array of selected checkbox labels from child Checkbox components | `array` | `[]` |
126
-
127
- ##### Events
128
-
129
- | Event | Description | Parameters |
130
- |-------|-------------|------------|
131
- | change | triggers when the binding value changes | `(value: array)` |
132
-
133
- ```vue
134
- <template>
135
- <GroupCheckbox v-model="selectedItems">
136
- <Checkbox v-for="item in options" :key="item" :label="item" />
137
- </GroupCheckbox>
138
- </template>
139
-
140
- <script setup>
141
- const selectedItems = ref(['option1'])
142
- const options = ['option1', 'option2', 'option3']
143
- </script>
144
- ```
145
-
146
78
  #### AreaCodePhoneInput
147
79
  International phone number input with country selection and area code handling.
148
80
 
@@ -184,9 +116,10 @@ Versatile input field component with validation and styling options.
184
116
  |-----------|-------------|------|---------|
185
117
  | v-model / modelValue | binding value - the current input text value | `string` | — |
186
118
  | type | input type | `string` | `'text'` |
187
- | placeholder | placeholder text | `string` | |
119
+ | placeholder | placeholder text | `string` | `'Enter'` |
188
120
  | clearable | whether to show clear button | `boolean` | `false` |
189
121
  | disabled | whether input is disabled | `boolean` | `false` |
122
+ | autocomplete | autocomplete attribute for input, raw input tag values work | `string` | `'off'` |
190
123
 
191
124
  ##### Events
192
125
 
@@ -228,47 +161,6 @@ Versatile input field component with validation and styling options.
228
161
  </InputBox>
229
162
  ```
230
163
 
231
- #### Radio
232
- Radio button component for single selection from multiple options.
233
-
234
- ##### Attributes
235
-
236
- | Attribute | Description | Type | Default |
237
- |-----------|-------------|------|---------|
238
- | v-model / modelValue | binding value - the `value` of the currently selected radio button in the group | `string` | — |
239
- | value | radio value | `string` | — |
240
- | label | radio label | `string` | — |
241
- | name | group name for radio group | `string` | — |
242
- | size | radio size | `'small' \| 'medium'` | `'medium'` |
243
- | built_in_theme | color theme | `'primary-blue' \| 'secondary-blue' \| 'red'` | `'primary-blue'` |
244
- | customized_class | custom CSS class | `string` | — |
245
- | disabled | whether radio is disabled | `boolean` | `false` |
246
- | autofocus | whether to auto focus | `boolean` | `false` |
247
-
248
- ##### Events
249
-
250
- | Event | Description | Parameters |
251
- |-------|-------------|------------|
252
- | change | triggers when the binding value changes | `(value: string)` |
253
-
254
- ##### Exposes
255
-
256
- | Method | Description | Type |
257
- |--------|-------------|------|
258
- | focus | focus the radio | `() => void` |
259
- | blur | blur the radio | `() => void` |
260
- | alert | show alert message | `(message: string) => void` |
261
- | removeAlertOrErrorEffect | clear alert/error state | `() => void` |
262
-
263
- ```vue
264
- <!-- Radio Group -->
265
- <Radio v-model="selected" value="option1" name="group1" label="Option 1" />
266
- <Radio v-model="selected" value="option2" name="group1" label="Option 2" />
267
-
268
- <!-- Single Radio -->
269
- <Radio v-model="single" value="yes" label="Agree to terms" />
270
- ```
271
-
272
164
  #### SingleSelector
273
165
  Dropdown selector component with filtering and search capabilities.
274
166
 
@@ -286,6 +178,10 @@ Dropdown selector component with filtering and search capabilities.
286
178
  | loading | loading state | `boolean` | `false` |
287
179
  | loading_text | loading text | `string` | `'Loading'` |
288
180
  | no_data_text | no data text | `string` | `'No data'` |
181
+ | filter_only_among_options_value | filter only among option values | `boolean` | `false` |
182
+ | filter_only_among_options_label | filter only among option labels | `boolean` | `false` |
183
+
184
+ > **Note**: `filter_only_among_options_value` and `filter_only_among_options_label` cannot be true at the same time. If both are true, `filter_only_among_options_value=true` will override `filter_only_among_options_label`'s logic.
289
185
 
290
186
  ##### Events
291
187
 
@@ -331,6 +227,117 @@ Dropdown selector component with filtering and search capabilities.
331
227
  </SingleSelector>
332
228
  ```
333
229
 
230
+ #### Checkbox
231
+ Customizable checkbox with multiple themes and validation support.
232
+
233
+ ##### Attributes
234
+
235
+ | Attribute | Description | Type | Default |
236
+ |-----------|-------------|------|---------|
237
+ | v-model / modelValue | binding value - `true` when checked, `false` when unchecked | `boolean` | `false` |
238
+ | label | checkbox label | `string` | — |
239
+ | size | checkbox size | `'small' \| 'medium'` | `'medium'` |
240
+ | built_in_theme | color theme | `'green' \| 'primary-blue' \| 'secondary-blue' \| 'red'` | `'green'` |
241
+ | customized_class | custom CSS class | `string` | — |
242
+ | disabled | whether checkbox is disabled | `boolean` | `false` |
243
+ | autofocus | whether to auto focus | `boolean` | `false` |
244
+ | indeterminate | whether checkbox is indeterminate | `boolean` | `false` |
245
+
246
+ ##### Events
247
+
248
+ | Event | Description | Parameters |
249
+ |-------|-------------|------------|
250
+ | change | triggers when the binding value changes | `(value: boolean)` |
251
+
252
+ ##### Exposes
253
+
254
+ | Method | Description | Type |
255
+ |--------|-------------|------|
256
+ | focus | focus the checkbox | `() => void` |
257
+ | blur | blur the checkbox | `() => void` |
258
+ | alert | show error message | `(message: string) => void` |
259
+ | removeAlertOrErrorEffect | clear error state | `() => void` |
260
+
261
+ ```vue
262
+ <template>
263
+ <Checkbox
264
+ v-model="agreed"
265
+ label="I agree to terms"
266
+ built_in_theme="primary-blue"
267
+ @change="handleChange"
268
+ />
269
+ </template>
270
+ ```
271
+
272
+ #### GroupCheckbox
273
+ Container for managing multiple related checkboxes as a group.
274
+
275
+ ##### Attributes
276
+
277
+ | Attribute | Description | Type | Default |
278
+ |-----------|-------------|------|---------|
279
+ | v-model / modelValue | binding value - array of selected checkbox labels from child Checkbox components | `array` | `[]` |
280
+
281
+ ##### Events
282
+
283
+ | Event | Description | Parameters |
284
+ |-------|-------------|------------|
285
+ | change | triggers when the binding value changes | `(value: array)` |
286
+
287
+ ```vue
288
+ <template>
289
+ <GroupCheckbox v-model="selectedItems">
290
+ <Checkbox v-for="item in options" :key="item" :label="item" />
291
+ </GroupCheckbox>
292
+ </template>
293
+
294
+ <script setup>
295
+ const selectedItems = ref(['option1'])
296
+ const options = ['option1', 'option2', 'option3']
297
+ </script>
298
+ ```
299
+
300
+ #### Radio
301
+ Radio button component for single selection from multiple options.
302
+
303
+ ##### Attributes
304
+
305
+ | Attribute | Description | Type | Default |
306
+ |-----------|-------------|------|---------|
307
+ | v-model / modelValue | binding value - the `value` of the currently selected radio button in the group | `string` | — |
308
+ | value | radio value | `string` | — |
309
+ | label | radio label | `string` | — |
310
+ | name | group name for radio group | `string` | — |
311
+ | size | radio size | `'small' \| 'medium'` | `'medium'` |
312
+ | built_in_theme | color theme | `'primary-blue' \| 'secondary-blue' \| 'red'` | `'primary-blue'` |
313
+ | customized_class | custom CSS class | `string` | — |
314
+ | disabled | whether radio is disabled | `boolean` | `false` |
315
+ | autofocus | whether to auto focus | `boolean` | `false` |
316
+
317
+ ##### Events
318
+
319
+ | Event | Description | Parameters |
320
+ |-------|-------------|------------|
321
+ | change | triggers when the binding value changes | `(value: string)` |
322
+
323
+ ##### Exposes
324
+
325
+ | Method | Description | Type |
326
+ |--------|-------------|------|
327
+ | focus | focus the radio | `() => void` |
328
+ | blur | blur the radio | `() => void` |
329
+ | alert | show alert message | `(message: string) => void` |
330
+ | removeAlertOrErrorEffect | clear alert/error state | `() => void` |
331
+
332
+ ```vue
333
+ <!-- Radio Group -->
334
+ <Radio v-model="selected" value="option1" name="group1" label="Option 1" />
335
+ <Radio v-model="selected" value="option2" name="group1" label="Option 2" />
336
+
337
+ <!-- Single Radio -->
338
+ <Radio v-model="single" value="yes" label="Agree to terms" />
339
+ ```
340
+
334
341
  ### Interactive Components
335
342
 
336
343
  #### ResponsiveButton