@oslokommune/punkt-react 11.10.1 → 11.12.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/CHANGELOG.md CHANGED
@@ -5,6 +5,157 @@ og skriver commits ca etter [Conventional Commits](https://conventionalcommits.o
5
5
 
6
6
  ---
7
7
 
8
+ ## [11.12.0](https://github.com/oslokommune/punkt/compare/11.11.0...11.12.0) (2024-04-29)
9
+
10
+ ### ⚠ BREAKING CHANGES
11
+ Ingen
12
+
13
+ ### Features
14
+ * Legg til children i Header (#1603).
15
+
16
+
17
+ ### Bug Fixes
18
+ Ingen
19
+
20
+ ### Chores
21
+ Ingen
22
+
23
+ ---
24
+
25
+
26
+ ## [11.11.0](https://github.com/oslokommune/punkt/compare/11.10.1...11.11.0) (2024-04-25)
27
+
28
+ ### ⚠ BREAKING CHANGES
29
+ Ingen
30
+
31
+ ### Features
32
+ * Accordion 🪗 (#1624). * feat(react): accordion✨ (#1596)
33
+
34
+ * feat(react): Accordion WIP
35
+
36
+ * ✨ feat(react,css): Accordion
37
+
38
+ - Update component specs: Accordion and Accordionitem
39
+ - Make AccordionItem and Accordion accessible
40
+ - Add props: compact, skin, defaultOpen, onClick
41
+ - Add React display of component
42
+ - Add descriptions
43
+
44
+ * 🧹 Clean up
45
+
46
+ * 🔒 npm install and update lockfile
47
+
48
+ * ♻️ Refactor & add state example
49
+
50
+ * ✅ Add Accordion test
51
+
52
+ - Renders without errors
53
+ - Is Ref working correctly
54
+ - Is children rendered
55
+ - Props properly applied
56
+ - Accessibility
57
+
58
+ * ♻️ Refactor hover & open style as discussed
59
+
60
+ - Remove blue background & white text for opened acc item
61
+ - Add purple border when active acc item
62
+ - Add underline on summary text and arrow movement when hovering
63
+
64
+ * ♻️ Jan roter rundt i CSS igjen!
65
+ - Fix hovering and active state
66
+
67
+ * ♻️ Refactor AccordionItem: optional toggleFn & prop
68
+
69
+ The toggle function is now optional with the "open" prop. This is so that the user will not have to provide the open state of each items if they want the accordion to allow multiple open items at once (which is the default). If they do want to restrict the number of open items, an example will be provided on how to locally in their own code.
70
+
71
+ * feat(react): ✨ add optional overriding toggleProps
72
+
73
+ - Add working example of handling toggleState to limit number of opened accordionItems.
74
+ - Styling and opening works as intended.
75
+ - Both when having automatic state handling (all items are expandable) and when using toggleProps to override it.
76
+ - Add description of why we have chosen to do it like this.
77
+
78
+
79
+
80
+ ---------
81
+
82
+ Co-authored-by: Jan Schjetne <jan.schjetne@origo.oslo.kommune.no>
83
+
84
+ * feat(vue): accordion 🪗✨ (#1617)
85
+
86
+ * feat(vue): ✨ we tried something
87
+
88
+ * feat(vue): add Vue version of Accordion+fix test✨
89
+
90
+ * Add routing
91
+
92
+ * Update Accordion.vue
93
+
94
+ * add trine as codeowner
95
+
96
+ ---------
97
+
98
+ Co-authored-by: Jan Schjetne <jan.schjetne@origo.oslo.kommune.no>
99
+
100
+ * Feature accordion docs ✨ #1549 (#1619)
101
+
102
+
103
+ * feat(docs,react): add pure html/css example...
104
+
105
+ .. and edit react✨
106
+
107
+ * fix(docs): legg til mer doc
108
+
109
+ * fix(docs): Improve UU and code examples + text
110
+
111
+ * fix(docs): Småendringer på acc docs
112
+
113
+ * fix(docs): Endre tekst. pga E-preventDefault()
114
+
115
+ * fix(docs): use CheckList component
116
+
117
+ ---------
118
+
119
+ Signed-off-by: dependabot[bot] <support@github.com>
120
+ Co-authored-by: julielyng <35265191+julielyng@users.noreply.github.com>
121
+ Co-authored-by: Jan Schjetne <jan.schjetne@origo.oslo.kommune.no>
122
+ Co-authored-by: omatrebym <97092636+omatrebym@users.noreply.github.com>
123
+ Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
124
+
125
+ * fix(css): adjust borderless & compact border width
126
+
127
+ * fix(docs): Update component-status.json 📄
128
+
129
+ * feat(docs):#1550 Lagt til innhold (#1643)
130
+
131
+ * docs:#1550 Lagt til innhold
132
+
133
+ * docs:#1550 Oppdatert innhold
134
+
135
+ * add svg photos
136
+
137
+ ---------
138
+
139
+ Co-authored-by: julielyng <35265191+julielyng@users.noreply.github.com>
140
+
141
+ ---------
142
+
143
+ Signed-off-by: dependabot[bot] <support@github.com>
144
+ Co-authored-by: Jan Schjetne <jan.schjetne@origo.oslo.kommune.no>
145
+ Co-authored-by: julielyng <35265191+julielyng@users.noreply.github.com>
146
+ Co-authored-by: omatrebym <97092636+omatrebym@users.noreply.github.com>
147
+ Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
148
+
149
+
150
+ ### Bug Fixes
151
+ Ingen
152
+
153
+ ### Chores
154
+ Ingen
155
+
156
+ ---
157
+
158
+
8
159
  ## [11.11.0](https://github.com/oslokommune/punkt/compare/11.10.0...11.11.0) (2024-04-19)
9
160
 
10
161
  ### ⚠ BREAKING CHANGES
@@ -0,0 +1,15 @@
1
+ import React, { ReactNode } from 'react';
2
+ export interface IPktAccordion {
3
+ ariaLabelledById?: string;
4
+ className?: string;
5
+ children: ReactNode | ReactNode[];
6
+ /**
7
+ * @default compact: "false"
8
+ */
9
+ compact?: boolean;
10
+ /**
11
+ * @default skin: "borderless"
12
+ */
13
+ skin?: 'borderless' | 'outlined' | 'beige' | 'blue';
14
+ }
15
+ export declare const PktAccordion: React.ForwardRefExoticComponent<IPktAccordion & React.RefAttributes<HTMLDivElement>>;
File without changes
@@ -0,0 +1,20 @@
1
+ import React from 'react';
2
+ /**
3
+ * @param toggleProps
4
+ *
5
+ * @description Send in an "isOpen" boolean and "onToggleClick" function
6
+ * to override the automatic toggling
7
+ */
8
+ export interface IPktAccordionToggleProps {
9
+ isOpen: boolean;
10
+ onToggleClick: (e: React.MouseEvent, id: string) => void;
11
+ }
12
+ export interface IPktAccordionItem {
13
+ children?: React.ReactNode | React.ReactNode[];
14
+ className?: string;
15
+ id: string;
16
+ defaultOpen?: boolean;
17
+ title: string | React.ReactNode;
18
+ toggleProps?: IPktAccordionToggleProps;
19
+ }
20
+ export declare const PktAccordionItem: React.ForwardRefExoticComponent<IPktAccordionItem & React.RefAttributes<HTMLDetailsElement>>;
@@ -34,5 +34,6 @@ export interface IPktHeader extends HTMLAttributes<HTMLDivElement> {
34
34
  openMenu?: () => void;
35
35
  logOut?: () => void;
36
36
  changeRepresentation?: () => void;
37
+ children?: React.ReactNode;
37
38
  }
38
39
  export declare const PktHeader: React.ForwardRefExoticComponent<IPktHeader & React.RefAttributes<HTMLDivElement>>;
@@ -1,4 +1,4 @@
1
1
  import { IconFetcher } from './IconContext';
2
- export declare const defaultSvgPath = "https://punkt-cdn.oslo.kommune.no/11.10/icons/";
2
+ export declare const defaultSvgPath = "https://punkt-cdn.oslo.kommune.no/11.12/icons/";
3
3
  declare const defaultIconFetcher: IconFetcher;
4
4
  export default defaultIconFetcher;