@cypress-design/react-accordion 0.2.0 → 0.3.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.
@@ -0,0 +1,6 @@
1
+ $ yarn build:module && yarn build:types
2
+ $ rollup -c ./rollup.config.mjs
3
+ 
4
+ ./index.ts → ./dist/index.umd.js, ./dist/index.es.mjs...
5
+ created ./dist/index.umd.js, ./dist/index.es.mjs in 28.3s
6
+ $ tsc --project ./tsconfig.build.json
package/Accordion.tsx CHANGED
@@ -52,7 +52,7 @@ export const Accordion: React.FC<
52
52
  {Icon && !iconEl && <Icon className={CssClasses.icon} />}
53
53
 
54
54
  {(Icon || iconEl) && separator && (
55
- <span className={CssClasses.separator} aria-role="separator" />
55
+ <span className={CssClasses.separator} role="separator" />
56
56
  )}
57
57
  <span className="flex-grow pr-[16px]">
58
58
  <span
@@ -1,7 +1,7 @@
1
1
  /// <reference types="cypress" />
2
2
 
3
3
  import * as React from 'react'
4
- import { mount } from 'cypress/react'
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,23 @@
1
1
  # @cypress-design/react-accordion
2
2
 
3
+ ## 0.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#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
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [[`18399c7`](https://github.com/cypress-io/cypress-design/commit/18399c72a52288c67af0935384430d4e4cd24251), [`d0de778`](https://github.com/cypress-io/cypress-design/commit/d0de77843adb87d8f4804219c6dca8f45b15c650)]:
12
+ - @cypress-design/react-icon@0.19.0
13
+ - @cypress-design/details-animation@0.1.0
14
+
15
+ ## 0.2.1
16
+
17
+ ### Patch Changes
18
+
19
+ - [`c798320`](https://github.com/cypress-io/cypress-design/commit/c798320236ec41a43eb74be80f407781e980aaf0) Thanks [@elevatebart](https://github.com/elevatebart)! - fix the aria-role of accordion separator
20
+
3
21
  ## 0.2.0
4
22
 
5
23
  ### Minor Changes
package/ReadMe.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  Collapsible component with a header and a body.
6
6
 
7
- ## install
7
+ ## Install
8
8
 
9
9
  ```bash
10
10
  npm install @cypress-design/react-accordion
@@ -22,16 +22,20 @@ yarn add @cypress-design/react-accordion
22
22
  import Accordion from '@cypress-design/react-accordion'
23
23
  ```
24
24
 
25
- ```tsx
26
- <Accordion
27
- icon={IconActionQuestionMarkCircle}
28
- title="Accordion Title"
29
- description="Vestibulum id ligula porta felis euismod semper. Nulla... "
30
- separator
31
- open
32
- fullWidthContent
33
- >
34
- Lorem ipsum, dolor sit amet consectetur adipisicing elit. Odio dolore omnis
35
- nemo minus, sapiente magni ...
36
- </Accordion>
25
+ ```tsx live
26
+ import { IconActionQuestionMarkCircle } from '@cypress-design/react-icon'
27
+
28
+ export default () => (
29
+ <Accordion
30
+ icon={IconActionQuestionMarkCircle}
31
+ title="Accordion Title"
32
+ description="Vestibulum id ligula porta felis euismod semper. Nulla... "
33
+ separator
34
+ open
35
+ fullWidthContent
36
+ >
37
+ Lorem ipsum, dolor sit amet consectetur adipisicing elit. Odio dolore omnis
38
+ nemo minus, sapiente magni ...
39
+ </Accordion>
40
+ )
37
41
  ```
package/dist/index.es.mjs CHANGED
@@ -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 " + size + " " + size, fill: 'none', dangerouslySetInnerHTML: {
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 d=\"m1 2.5 3 3 3-3\" stroke=\"currentColor\" class=\"icon-dark\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>",
122
- "16": "<path d=\"m4 6 4 4 4-4\" stroke=\"currentColor\" class=\"icon-dark\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>"
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 " + 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) {
@@ -144,7 +145,7 @@ var Accordion = function (_a) {
144
145
  React.createElement("span", { className: CssClasses.summaryDiv },
145
146
  Boolean(iconEl) && React.createElement("span", { className: CssClasses.icon }, iconEl),
146
147
  Icon && !iconEl && React.createElement(Icon, { className: CssClasses.icon }),
147
- (Icon || iconEl) && separator && (React.createElement("span", { className: CssClasses.separator, "aria-role": "separator" })),
148
+ (Icon || iconEl) && separator && (React.createElement("span", { className: CssClasses.separator, role: "separator" })),
148
149
  React.createElement("span", { className: "flex-grow pr-[16px]" },
149
150
  React.createElement("span", { className: clsx(titleClassName !== null && titleClassName !== void 0 ? titleClassName : CssClasses.summaryTitleColor, CssClasses.summaryTitle) }, title),
150
151
  description && (React.createElement("span", { className: clsx(CssClasses.summaryDescription, descriptionClassName !== null && descriptionClassName !== void 0 ? descriptionClassName : CssClasses.summaryDescriptionColor) }, description))),
@@ -153,6 +154,6 @@ var Accordion = function (_a) {
153
154
  };
154
155
 
155
156
  export { Accordion as default };
157
+ //# sourceMappingURL=index.es.mjs.map
156
158
 
157
159
  /* <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
- //# sourceMappingURL=index.es.mjs.map