@cypress-design/react-accordion 0.2.1 → 0.4.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.
- package/.turbo/turbo-build.log +6 -0
- package/Accordion.tsx +2 -2
- package/AccordionReact.cy.tsx +1 -1
- package/CHANGELOG.md +23 -0
- package/ReadMe.md +17 -17
- package/dist/{react/Accordion.d.ts → Accordion.d.ts} +1 -1
- package/dist/Accordion.d.ts.map +1 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.es.mjs +10 -9
- package/dist/index.es.mjs.map +1 -1
- package/dist/index.umd.js +19 -22
- package/dist/index.umd.js.map +1 -1
- package/package.json +30 -25
- package/tsconfig.build.json +2 -2
- package/tsconfig.json +3 -0
- package/Accordion.stories.mdx +0 -142
- package/dist/constants.d.ts +0 -53
- package/dist/constants.d.ts.map +0 -1
- package/dist/react/Accordion.d.ts.map +0 -1
- package/dist/react/index.d.ts.map +0 -1
- /package/dist/{react/index.d.ts → index.d.ts} +0 -0
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
$ yarn build:module && yarn build:types
|
|
2
|
+
$ rollup -c ./rollup.config.mjs
|
|
3
|
+
[36m
|
|
4
|
+
[1m./index.ts[22m → [1m./dist/index.umd.js, ./dist/index.es.mjs[22m...[39m
|
|
5
|
+
[32mcreated [1m./dist/index.umd.js, ./dist/index.es.mjs[22m in [1m22.9s[22m[39m
|
|
6
|
+
$ tsc --project ./tsconfig.build.json
|
package/Accordion.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react'
|
|
2
2
|
import clsx from 'clsx'
|
|
3
|
-
import { CssClasses } from '
|
|
4
|
-
import type { AccordionProps } from '
|
|
3
|
+
import { CssClasses } from '@cypress-design/constants-accordion'
|
|
4
|
+
import type { AccordionProps } from '@cypress-design/constants-accordion'
|
|
5
5
|
import { DetailsAnimation } from '@cypress-design/details-animation'
|
|
6
6
|
import { IconChevronDownSmall } from '@cypress-design/react-icon'
|
|
7
7
|
|
package/AccordionReact.cy.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="cypress" />
|
|
2
2
|
|
|
3
3
|
import * as React from 'react'
|
|
4
|
-
import { mount } from 'cypress/
|
|
4
|
+
import { mount } from 'cypress/react18'
|
|
5
5
|
import AccordionStory from './Accordion.rootstory'
|
|
6
6
|
import assertions from '../assertions'
|
|
7
7
|
import Accordion from './Accordion'
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# @cypress-design/react-accordion
|
|
2
2
|
|
|
3
|
+
## 0.4.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#196](https://github.com/cypress-io/cypress-design/pull/196) [`fc6d9e4`](https://github.com/cypress-io/cypress-design/commit/fc6d9e4fedcc01fa8e01b868b0fa66d8895c37d0) Thanks [@elevatebart](https://github.com/elevatebart)! - refactor: avoid constants relative imports
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [[`fc6d9e4`](https://github.com/cypress-io/cypress-design/commit/fc6d9e4fedcc01fa8e01b868b0fa66d8895c37d0)]:
|
|
12
|
+
- @cypress-design/react-icon@0.20.0
|
|
13
|
+
|
|
14
|
+
## 0.3.0
|
|
15
|
+
|
|
16
|
+
### Minor Changes
|
|
17
|
+
|
|
18
|
+
- [#178](https://github.com/cypress-io/cypress-design/pull/178) [`d0de778`](https://github.com/cypress-io/cypress-design/commit/d0de77843adb87d8f4804219c6dca8f45b15c650) Thanks [@elevatebart](https://github.com/elevatebart)! - deliver new docs and improved components
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- Updated dependencies [[`18399c7`](https://github.com/cypress-io/cypress-design/commit/18399c72a52288c67af0935384430d4e4cd24251), [`d0de778`](https://github.com/cypress-io/cypress-design/commit/d0de77843adb87d8f4804219c6dca8f45b15c650)]:
|
|
23
|
+
- @cypress-design/react-icon@0.19.0
|
|
24
|
+
- @cypress-design/details-animation@0.1.0
|
|
25
|
+
|
|
3
26
|
## 0.2.1
|
|
4
27
|
|
|
5
28
|
### Patch Changes
|
package/ReadMe.md
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
# Accordion
|
|
2
2
|
|
|
3
|
-
##
|
|
4
|
-
|
|
5
|
-
Collapsible component with a header and a body.
|
|
6
|
-
|
|
7
|
-
## install
|
|
3
|
+
## Install
|
|
8
4
|
|
|
9
5
|
```bash
|
|
10
6
|
npm install @cypress-design/react-accordion
|
|
@@ -22,16 +18,20 @@ yarn add @cypress-design/react-accordion
|
|
|
22
18
|
import Accordion from '@cypress-design/react-accordion'
|
|
23
19
|
```
|
|
24
20
|
|
|
25
|
-
```tsx
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
21
|
+
```tsx live
|
|
22
|
+
import { IconActionQuestionMarkCircle } from '@cypress-design/react-icon'
|
|
23
|
+
|
|
24
|
+
export default () => (
|
|
25
|
+
<Accordion
|
|
26
|
+
icon={IconActionQuestionMarkCircle}
|
|
27
|
+
title="Accordion Title"
|
|
28
|
+
description="Vestibulum id ligula porta felis euismod semper. Nulla... "
|
|
29
|
+
separator
|
|
30
|
+
open
|
|
31
|
+
fullWidthContent
|
|
32
|
+
>
|
|
33
|
+
Lorem ipsum, dolor sit amet consectetur adipisicing elit. Odio dolore omnis
|
|
34
|
+
nemo minus, sapiente magni ...
|
|
35
|
+
</Accordion>
|
|
36
|
+
)
|
|
37
37
|
```
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import type { AccordionProps } from '
|
|
2
|
+
import type { AccordionProps } from '@cypress-design/constants-accordion';
|
|
3
3
|
export interface AccordionPropsReact extends AccordionProps {
|
|
4
4
|
/**
|
|
5
5
|
* Icon to be displayed on the left of the the heading. Overridden by the iconEl prop, if both are provided.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Accordion.d.ts","sourceRoot":"./","sources":["Accordion.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAA;AAIzE,MAAM,WAAW,mBAAoB,SAAQ,cAAc;IACzD;;OAEG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAA;IAC9C;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CACzB;AAED,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAC9B,mBAAmB,GAAG,KAAK,CAAC,SAAS,CAAC,kBAAkB,CAAC,CAwE1D,CAAA;AAED,eAAe,SAAS,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"./","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA"}
|
package/dist/index.es.mjs
CHANGED
|
@@ -42,7 +42,7 @@ function __rest$1(s, e) {
|
|
|
42
42
|
return t;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
const CssClasses = {
|
|
46
46
|
summary: 'details-none card open:rounded-b-none',
|
|
47
47
|
summaryDiv: 'flex flex-row py-[12px] px-[24px] flex-nowrap items-center min-h-[63px]',
|
|
48
48
|
summaryColor: 'bg-white',
|
|
@@ -54,7 +54,7 @@ var CssClasses = {
|
|
|
54
54
|
separator: 'w-[1px] h-[40px] bg-gray-100 mr-[16px]',
|
|
55
55
|
chevron: 'flex-shrink-0 transition transform rotate-0 open:rotate-180',
|
|
56
56
|
contentWrapper: 'border border-gray-100 rounded-b-md border-t-0',
|
|
57
|
-
content: 'px-[24px] py-[16px]'
|
|
57
|
+
content: 'px-[24px] py-[16px]',
|
|
58
58
|
};
|
|
59
59
|
|
|
60
60
|
/******************************************************************************
|
|
@@ -104,8 +104,8 @@ var compileReactIconProperties = function (_a) {
|
|
|
104
104
|
}
|
|
105
105
|
return newAttributes;
|
|
106
106
|
}, {});
|
|
107
|
-
var componentProps = __assign({ width: size, height: size, viewBox: "0 0 "
|
|
108
|
-
__html: body
|
|
107
|
+
var componentProps = __assign({ width: size, height: size, viewBox: "0 0 ".concat(size, " ").concat(size), fill: 'none', dangerouslySetInnerHTML: {
|
|
108
|
+
__html: body,
|
|
109
109
|
} }, filteredAttributes);
|
|
110
110
|
if (attributes.className) {
|
|
111
111
|
compiledClasses.push(attributes.className);
|
|
@@ -118,16 +118,17 @@ var compileReactIconProperties = function (_a) {
|
|
|
118
118
|
var IconChevronDownSmall = function (props) {
|
|
119
119
|
var _a = iconsRegistry.getComponentAttributes(__assign(__assign({}, props), { availableSizes: ["8", "16"] })), size = _a.sizeWithDefault, compiledClasses = _a.compiledClasses;
|
|
120
120
|
var iconBodies = {
|
|
121
|
-
"8": "<path
|
|
122
|
-
"16": "<path
|
|
121
|
+
"8": "<path stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"m1 2.5 3 3 3-3\" class=\"icon-dark\"/>",
|
|
122
|
+
"16": "<path stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"m4 6 4 4 4-4\" class=\"icon-dark\"/>"
|
|
123
123
|
};
|
|
124
124
|
var body = iconBodies[size];
|
|
125
125
|
if (!body) {
|
|
126
|
-
throw Error("Icon \"chevron-down-small\" is not available in size "
|
|
126
|
+
throw Error("Icon \"chevron-down-small\" is not available in size ".concat(size));
|
|
127
127
|
}
|
|
128
128
|
return React.createElement('svg', compileReactIconProperties(__assign(__assign({}, props), { size: size, body: body, compiledClasses: compiledClasses })));
|
|
129
129
|
};
|
|
130
130
|
|
|
131
|
+
|
|
131
132
|
/* <windicss-keep class=""> */
|
|
132
133
|
|
|
133
134
|
var Accordion = function (_a) {
|
|
@@ -153,6 +154,6 @@ var Accordion = function (_a) {
|
|
|
153
154
|
};
|
|
154
155
|
|
|
155
156
|
export { Accordion as default };
|
|
156
|
-
|
|
157
|
-
/* <windicss-keep class="flex-grow pr-[16px] open:icon-dark-gray-500 details-none card open:rounded-b-none flex flex-row py-[12px] px-[24px] flex-nowrap items-center min-h-[63px] bg-white text-[18px] leading-[28px] font-medium text-indigo-500 block text-[14px] leading-[20px] font-normal text-gray-700 mr-[24px] flex-shrink-0 w-[1px] h-[40px] bg-gray-100 mr-[16px] transition transform rotate-0 open:rotate-180 border border-gray-100 rounded-b-md border-t-0 py-[16px]"> */
|
|
158
157
|
//# sourceMappingURL=index.es.mjs.map
|
|
158
|
+
|
|
159
|
+
/* <windicss-keep class="flex-grow pr-[16px] open:icon-dark-gray-500"> */
|