groovinads-ui 1.9.96 → 1.9.98

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
@@ -46,6 +46,7 @@ The library includes the following components:
46
46
  - [ModalComponent](#modalcomponent): For displaying modals.
47
47
 
48
48
  - [Navigation](#navigation):
49
+ - [Accordion](#accordion): For collapsible content sections.
49
50
  - [Aside](#aside): For displaying aside panels.
50
51
  - [Navbar](#navbar): For top navigation bars.
51
52
  - [Pagination](#pagination): For pagination of tables.
@@ -127,7 +128,7 @@ This library requires several peer dependencies. Install them first:
127
128
 
128
129
  ```bash
129
130
  # For npm users
130
- npm install @awesome.me/kit-9889deefc5@^1.0.3 \
131
+ npm install @awesome.me/kit-YOUR_CODE_HERE@^1.0.3 \
131
132
  @fortawesome/fontawesome-svg-core@^7.1.0 \
132
133
  @fortawesome/free-brands-svg-icons@^7.1.0 \
133
134
  @fortawesome/duotone-regular-svg-icons@^7.1.0 \
@@ -140,7 +141,7 @@ npm install @awesome.me/kit-9889deefc5@^1.0.3 \
140
141
  react-responsive@^10.0.0
141
142
 
142
143
  # For Yarn users
143
- yarn add @awesome.me/kit-9889deefc5@^1.0.3 \
144
+ yarn add @awesome.me/kit-YOUR_CODE_HERE@^1.0.3 \
144
145
  @fortawesome/fontawesome-svg-core@^7.1.0 \
145
146
  @fortawesome/free-brands-svg-icons@^7.1.0 \
146
147
  @fortawesome/duotone-regular-svg-icons@^7.1.0 \
@@ -1306,6 +1307,38 @@ import { ModalComponent } from 'groovinads-ui';
1306
1307
 
1307
1308
  ## Navigation
1308
1309
 
1310
+ ### Accordion
1311
+ ```jsx
1312
+ import React from 'react';
1313
+ import { Accordion } from 'react-bootstrap';
1314
+ import { AccordionComponent } from 'groovinads-ui';
1315
+
1316
+ <AccordionComponent defaultActiveKey="0">
1317
+ <Accordion.Item eventKey="0">
1318
+ <Accordion.Header>Accordion Item #1</Accordion.Header>
1319
+ <Accordion.Body>
1320
+ This is the first item's accordion body.
1321
+ </Accordion.Body>
1322
+ </Accordion.Item>
1323
+ <Accordion.Item eventKey="1">
1324
+ <Accordion.Header>Accordion Item #2</Accordion.Header>
1325
+ <Accordion.Body>
1326
+ This is the second item's accordion body.
1327
+ </Accordion.Body>
1328
+ </Accordion.Item>
1329
+ </AccordionComponent>
1330
+ ```
1331
+
1332
+ | Property | Type | Required | Options | Default | Description |
1333
+ | ----------------- | ----------------- | -------- | ----------------- | ------- | ---------------------------------------------------------------------------------------------------------- |
1334
+ | `activeKey` | String / String[] | No | n/a | n/a | Currently active accordion item key(s). String for single, array for multiple when alwaysOpen is true. |
1335
+ | `alwaysOpen` | Boolean | No | `true` `false` | `false` | Allow multiple accordion items to stay open at the same time. |
1336
+ | `caretPosition` | String | No | `start` `end` | `start` | Position of the caret icon. `start` places it before the content, `end` places it after. |
1337
+ | `children` | Node | Yes | n/a | n/a | Accordion.Item components from react-bootstrap. |
1338
+ | `className` | String | No | n/a | `''` | Additional CSS classes. |
1339
+ | `defaultActiveKey`| String / String[] | No | n/a | n/a | Default active key for uncontrolled mode. String for single, array for multiple when alwaysOpen is true. |
1340
+ | `size` | String | No | `sm` `md` `lg` | `md` | Size variant for the accordion. |
1341
+
1309
1342
  ### Aside
1310
1343
  ```jsx
1311
1344
  import React from 'react';
@@ -1865,6 +1898,83 @@ export default MyToastExamples;
1865
1898
  | `status` | String | No | `in-progress` `error` | `in-progress` | Define the current state of the task. If `in-progress`, shows the ongoing progress, reflected in the progress bar. If `error`, indicates that the upload or processing has failed. |
1866
1899
  | `variant` | String | Yes | `upload` `processing` | n/a | Define the type of process being performed. If `upload`, displays a progress bar and a loading status indicator. If `upload`, displays a progress bar and a loading status indicator. |
1867
1900
 
1901
+ # Testing
1902
+
1903
+ This library includes an automated testing system that validates all components using **Vitest** and **Playwright**.
1904
+
1905
+ ## Test System Overview
1906
+
1907
+ The testing infrastructure is built on:
1908
+ - **Vitest**: Fast unit test framework powered by Vite
1909
+ - **Playwright**: Browser automation for real component testing
1910
+ - **Storybook Integration**: All Storybook stories are automatically converted to tests
1911
+
1912
+ ## Available Test Commands
1913
+
1914
+ ```bash
1915
+ # Run all tests once (for CI/CD)
1916
+ yarn test
1917
+
1918
+ # Run tests in watch mode (for development)
1919
+ yarn test:watch
1920
+
1921
+ # Open Vitest UI (visual test interface)
1922
+ yarn test:ui
1923
+
1924
+ # Run tests with coverage report
1925
+ yarn test:coverage
1926
+ ```
1927
+
1928
+ ## What Gets Tested
1929
+
1930
+ The test system automatically validates:
1931
+ - ✅ **Component Rendering**: All 36+ components render without errors
1932
+ - ✅ **Props Validation**: Each component handles props correctly
1933
+ - ✅ **Variants**: All component variants (sizes, colors, states) work properly
1934
+ - ✅ **Interactive Elements**: Buttons, dropdowns, inputs respond to user actions
1935
+ - ✅ **Storybook Stories**: All 322+ stories are tested automatically
1936
+
1937
+ ## Test Results
1938
+
1939
+ Current test coverage:
1940
+ - **36 test files** (one per component category)
1941
+ - **322 individual tests** (one per Storybook story)
1942
+ - **100% pass rate** on component rendering
1943
+
1944
+ ## Running Tests Locally
1945
+
1946
+ ### Prerequisites
1947
+ - Node.js v20 (use `nvm use 20`)
1948
+ - All dependencies installed (`yarn install`)
1949
+ - Playwright browsers installed (runs automatically on first test)
1950
+
1951
+ ### Example
1952
+
1953
+ ```bash
1954
+ # Activate Node 20
1955
+ nvm use 20
1956
+
1957
+ # Run tests
1958
+ yarn test
1959
+ ```
1960
+
1961
+ ### Test Output Example
1962
+
1963
+ ```
1964
+ Test Files 36 passed (36)
1965
+ Tests 322 passed (322)
1966
+ Duration 7.57s
1967
+ ```
1968
+
1969
+ ## Continuous Integration
1970
+
1971
+ Tests run automatically on:
1972
+ - Every commit
1973
+ - Pull requests
1974
+ - Before releases
1975
+
1976
+ This ensures component library stability and prevents regressions.
1977
+
1868
1978
  # Customization
1869
1979
 
1870
1980
  Currently, the components are not customizable.