fictoan-react 1.2.3 → 1.2.6

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 ADDED
@@ -0,0 +1,622 @@
1
+ # CHANGELOG
2
+
3
+ ## 1.2.6
4
+ - Fix `Button` active theme bug
5
+ - Add `button-font-family` via theme
6
+
7
+ ## 1.2.5
8
+ - Fix text colour for lists
9
+ - Add `height` prop for `Divider`
10
+
11
+ ## 1.2.4
12
+ - Add line numbers to `CodeBlock` component with `showLineNumbers` prop
13
+ - Add better token support
14
+ - Fix style overrides for `CodeBlock` component
15
+
16
+ ## 1.2.3
17
+ - Remove `as` prop from `Heading`, so you can now use `Heading1`, `Heading2` etc
18
+
19
+ ## 1.2.2
20
+ - Tweak `Range` styles
21
+
22
+ ## 1.2.1
23
+ - Add accessibility improvements for `Breadcrumbs`, and `Badge`
24
+
25
+ ## 1.2.0
26
+ - Add new `Meter` component
27
+
28
+ ## 1.1.1
29
+ - Fix `Breadcrumbs` style not loading
30
+ - Add resets for `Breadcrumbs` element
31
+
32
+ ## 1.1.0
33
+ - Add `OptionCard` component
34
+
35
+ ## 1.0.3
36
+ - Rename `HRule` to `Divider`
37
+
38
+ ## 1.0.2
39
+ - Rename `ExpandableContent` to `OptionCard`
40
+
41
+ ## 1.0.1
42
+ - Fix `Breadcrumbs` element type
43
+
44
+ ## 1.0.0
45
+ #### GENERIC CHANGES
46
+ - Move to Vite
47
+ - Move to `pnpm` for package management
48
+ - Remove `styled-components` as a dependency
49
+ - Adopt plain CSS for styling
50
+ - Support twice as many `defaultColours`
51
+ - Use `rem` units for font sizes
52
+ - Ability to set `Element` as a flexbox/grid div using `layoutAsFlexbox` and `layoutAsGrid`
53
+ - Add `horizontalPadding`, `verticalPadding`, `horizontalMargin`, and `verticalMargin`
54
+ - Add generic block-level sectioning elements as custom components. Eg `<Div>`, `<Section>`, `<Article>` etc
55
+ - Add copy code to clipboard for `CodeBlock`
56
+ - Add `RadioTabGroup` component
57
+ - Convert all millisecond values to seconds
58
+
59
+ #### ⚠️ BREAKING CHANGES ⚠️
60
+ - Remove `ThemeProvider` and `theme` prop from all components
61
+ - Refactor `Row` and `Portion` to use CSS Grid and Flexbox both
62
+ - Import, usage and extension of `CodeBlock`
63
+ - Remove `defaultColours` object as exported
64
+ - Remove `InfoPanel` and extend `Drawer` with `position` prop
65
+ - Rename `sidePadding` and `sideMargin` to `horizontalPadding` and `horizontalMargin`
66
+ - Rename `para` to `paragraph` in CSS variables
67
+ - Rename `FormWrapper` to `Form`
68
+ - Rename `CheckBox` to `Checkbox`
69
+ - Add consistent `showWhen`, `closeWhen` and `secondsToShowFor` props for transitory components
70
+
71
+ [//]: # (TODO: Make Fictoan more accessible)
72
+ [//]: # (TODO: ⚠️ Remove style tag in CodeBlock)
73
+ [//]: # (TODO: ⚠️ Fix TS issue in Select and SWS)
74
+ [//]: # (TODO: Fix Dismiss Button in NotifcationItem)
75
+ [//]: # (TODO: Add mask design to PinInputField)
76
+ [//]: # (TODO: Fix Sidebar scrolling issue)
77
+ [//]: # (TODO: Revamp BreadCrumbs?)
78
+ ~~[//]: # (TODO: ⚠️ Fix Meter height issue)~~
79
+
80
+
81
+ ---
82
+
83
+ ### 0.46.8
84
+ - Fix `focusFirstInputOnReset` prop behaviour to properly set focus on first input on reset
85
+
86
+ ### 0.46.7
87
+ - Export custom `PinInputFieldElementType` for supporting custom ref types in TypeScript
88
+
89
+ ### 0.46.5
90
+ - Add an imperative reset handler to reset `PinInputField` from the parent component with ref
91
+ - Add a `focusFirstInputOnReset` prop for the above change, to opt out of focusing on first input on reset
92
+
93
+ ### 0.45.5
94
+ - Add Tab component label prop to be used as reactnode for custom label
95
+
96
+ ### 0.45.4
97
+ - Fix PinInputField behaviour on paste or replace at position
98
+
99
+ ### 0.45.3
100
+ - Add optional `isDismissable` prop for showing a close button for `Drawer` *(true by default)*
101
+
102
+ ### 0.45.2
103
+ - Fix prop name for disable copy/paste to pasteFromClipboard which takes either enabled or disabled as parameters for `PinInput Field`
104
+
105
+ ### 0.45.1
106
+ - Export props types for all components
107
+ - Fix excess margin issue for `Tabs` labels
108
+ - Add toggle for disabling copy/paste functionality in the `PinInputField` component
109
+
110
+ ### 0.45.0
111
+ - Add support for defaultTabIndex props in `Tabs` component because by default it select first tab as active tab
112
+
113
+ ### 0.44.0
114
+ - Rename `style` prop for `Heading` and `Text` to `fontStyle` since `style` is a reserved
115
+ prop name in React and causes the react/style-prop-object eslint rule to complain in any
116
+ project with basic react-app rules setup.
117
+
118
+ ### 0.43.0
119
+ - Fix npm publish action workflow
120
+ - Fix unique key issue for `Tabs`
121
+
122
+ ### 0.42.3
123
+ - Update command for installing dependencies and build in CI
124
+
125
+ ### 0.42.2
126
+ - Fix broken npm publish action
127
+
128
+ ### 0.42.1
129
+ - Fix styling issues in `Tabs`
130
+
131
+ ### 0.42.0
132
+ - Padding and margin values can now be configured via the `globals` object in the theme
133
+ - Convert utility styles into JS file from plain CSS to access props
134
+ - Refactor `TablePagination` for better theme-ing
135
+ - Tweak `notification` theme object
136
+ - Add String() constructor to theme object values
137
+ - Fix a bunch of inconsistencies in theme values
138
+
139
+ ### 0.41.27
140
+ - ⚠ Breaking change: add `style` prop for `Heading` and `Text` to select font style.
141
+
142
+ ### 0.41.26
143
+ - Add support for passing additional items to the navbar for `Tabs`
144
+ - Update React peer dependency version
145
+
146
+ ### 0.41.25
147
+ - Export styled-components also from the project to allow component-wide over-rides
148
+
149
+ ### 0.41.24
150
+ - Convert `isMono`, `isSans` and `isSerif` to a `style` enum
151
+ - Fix `isSubtext` prop for text elements
152
+ - Fix cursor-pointer on hover for `ExpandableGroup`
153
+ - Add back the right margin bottoms for `FormItem` elements inside `FormItemGroup`
154
+ - Fix margin bottom for `Checkbox` and `Switch` inside a `Form`
155
+
156
+ ### 0.41.23
157
+ - Remove `line-height` property from `body` and apply it more specifically to text elements only
158
+
159
+ ### 0.41.22
160
+ - Add `InputField` invalid state text theme colour
161
+ - Rework text sizes progression
162
+ - Add reset styles for `picture`
163
+ - Add `weight` prop to `Element` to be used in `span` elements
164
+ - Add types for possible font weight values
165
+
166
+ ### 0.41.19
167
+ - Fix `disabled` styling for `InputField`
168
+
169
+ ### 0.41.18
170
+ - Remove style overrides in Tabs component
171
+
172
+ ### 0.41.17
173
+ - Add `closeOnClickOutside` prop for `InfoPanel` & `Drawer`
174
+
175
+ ### 0.41.16
176
+ - Fix wrong font value for links in theme file
177
+
178
+ ### 0.41.15
179
+ - `Drawer` overlay is now theme-able and style-able with props
180
+
181
+ ### 0.41.14
182
+ - Overhaul `Drawer` to now come with a page overlay
183
+
184
+ ### 0.41.13
185
+ - Add span types for `Portion`
186
+
187
+ ### 0.41.11
188
+ - Add `spacing` prop for `PinInputField`
189
+
190
+ ### 0.41.10
191
+ - Add separate theme object for `Drawer`
192
+
193
+ ### 0.41.9
194
+ - Allow controlling auto-focus behaviour for `PinInputField`
195
+
196
+ ### 0.41.8
197
+ - Add ability to theme disabled states for `primary`, `secondary` and `tertiary` buttons separately
198
+
199
+ ### 0.41.7
200
+ - Add different letter spacing values for empty and filled `input[type=password]`
201
+
202
+ ### 0.41.6
203
+ - Fix `InputField` text colour dark theme bug
204
+
205
+ ### 0.41.5
206
+ - Add `spacing` and `retainLayout` props for `FormItemGroup`
207
+
208
+ ### 0.41.4
209
+ - Fix bug in `onChange` implementation for `PinInputField`
210
+
211
+ ### 0.41.3
212
+ - Fix missing font family for `hepText` and `errorText`
213
+
214
+ ### 0.41.2
215
+ - Replace `onComplete` with `onChange` callback for `PinInputField`
216
+
217
+ ### 0.41.1
218
+ - Add `PinInputField` component
219
+
220
+ ### 0.40.0
221
+ - Add `Drawer` component
222
+
223
+ ### 0.39.3
224
+ - Rename `timeout` prop for `Drawer` and `NotificationItem` to `showFor`
225
+ - Fix `Select` border-radius bug
226
+
227
+ ### 0.39.2
228
+ - Move `unit` prop in the `Meter` from being displayed via CSS to markup
229
+
230
+ ### 0.39.1
231
+ - Tweak `Badge` padding values
232
+
233
+ ### 0.39.0
234
+ - Fix `Badge` line height bug
235
+ - Fix `Switch` theme colour mismatch
236
+
237
+ ### 0.38.3
238
+ - Tweak `Badge` padding values
239
+
240
+ ### 0.38.2
241
+ - Fix `Badge` height bug
242
+
243
+ ### 0.38.1
244
+ - Add opinionated defaults for `mark` element
245
+
246
+ ### 0.38.0
247
+ - Add `Badge` component
248
+
249
+ ### 0.37.1
250
+ - Rename `Toast` to `Drawer` for better consistency
251
+
252
+ ### 0.37.0
253
+ - Add `Toast` component
254
+
255
+ ### 0.36.4
256
+ - Add `horizontallyCentreThis`, `horizontallyCenterThis`, `verticallyCentreItems`, `verticallyCenterItems`, `pushItemsToEnds` as props instead of class names
257
+
258
+ ### 0.36.3
259
+ - Fix `Select` border-radius inheritance bug
260
+ - Fix `SidebarItemText` hover state text colour
261
+
262
+ ### 0.36.2
263
+ - Fix inconsistent `tabLS` and `tabPT` props
264
+
265
+ ### 0.36.1
266
+ - Add types for `Element`’s `as` attribute
267
+
268
+ ### 0.36.0
269
+ - Fix text colour for nested links in sidebar for better differentiation
270
+ - Fix typo in `portionProps`
271
+ - Refactor sidebar theme object hierarchy for links and sublinks, remove `linksWrapper` object
272
+ - Mention `styled-components` requirement in the README
273
+
274
+ ### 0.35.4
275
+ - Rename `tabLS` to `tabletLandscape` and `tabPT` to `tabletPortrait` for more consistency with the naming scheme and less ambiguity.
276
+
277
+ ### 0.35.3
278
+ - Fix focus states for checkbox, switch, radio and select
279
+
280
+ ### 0.35.2
281
+ - Fix theme throwing error on colour overrides
282
+ - Add custom colours to ColorPropsType and export it from library
283
+ - Fix InputField element type
284
+
285
+ ### 0.35.0
286
+
287
+ **General**
288
+ - Add Storybook for easy testing and documentation
289
+ - Each component folder now contains a `<component_name>.stories.tsx` (to create stories) and `<component_name>.stories.mdx` (to write docs) file
290
+ - Add make commands for easy creation of components
291
+ - Remove `name` props from RadioGroup `options` type; Add `label` and `id`
292
+ - Remove `as` from RadioButton and Checkbox props
293
+ - Make `shadow` a global prop
294
+ - Make `shape` a global prop
295
+ - Add `ExpandableContent` component which implements details and summary tags
296
+ - Add `Tag` component
297
+ - Add `opacity` as a global prop
298
+ - Divider now supports custom background colors
299
+ - Add `hr.default` to theme
300
+ - All colour props are now typed
301
+ - Add command (`make color-props`) to generate colour props from default colors
302
+
303
+ **Form improvements**
304
+ - Remove `isAnswers` prop from FormItem
305
+ - Remove FormItemJointGroup component
306
+ - Add `isJoint` prop to FormItemGroup
307
+ - Remove Extra spacing after FormItemGroup
308
+ - Add `fields` and `onFieldsChange` prop to Form to allow form creation using an array of config 🎉
309
+ - RadioGroup and Select now use BaseInputComponent
310
+ - Add better and consistent help & error text for each form field
311
+ - Make InputLabel atomic
312
+ - Add error text for Form which uses Callout component
313
+ - Add sizes to Switch component
314
+ - Make Select chevron consistent with ExpandableContent
315
+ - Make required and disabled states consistent in form fields
316
+ - Remove `name` props from RadioGroup `options` type; Add `label` and `id`
317
+
318
+ **Sidebar improvements**
319
+ - Remove `isSticky` from Sidebar footer
320
+ - `sidebar.body.bg` is now `sidebar.bg` in theme
321
+ - Add sidebar width properties to theme; SidebarHeader, SidebarFooter and SidebarItem span 100% automatically
322
+ - Remove `isSticky` from SidebarFooter, it always sticks to bottom
323
+ - Remove SidebarLink, SidebarNestedLinks and SidebarLinksWrapper
324
+ - Make SidebarHeader and SidebarFooter sticky instead of fixed to get simpler and consistent sidebar layout
325
+ - Remove `sidebar.linksWrapper.marginTop` and `sidebar.linksWrapper.marginBottom` from theme
326
+ - Remove SidebarItemsGroup and SidebarItemsGroupHeader
327
+
328
+ **New components**
329
+ - Tooltip (very basic, might overflow screens)
330
+ - Callout
331
+ - ExpandableContent
332
+ - Tag
333
+
334
+ **Removed components**
335
+ - FormItemJointGroup
336
+ - SidebarLink
337
+ - SidebarNestedLinks
338
+ - SidebarLinksWrapper
339
+ - SidebarItemsGroup
340
+ - SidebarItemsGroupHeader
341
+
342
+ ## BREAKING CHANGES ⚠️
343
+
344
+ - Inside theme:
345
+ - `inputField.default.helpText` is now `inputField.onFocus.helpText`
346
+ - `inputField.isInvalid.helpText` is now `inputField.isInvalid.errorText`
347
+ - `sidebar.body.bg` is now `sidebar.bg`
348
+ - `sidebar.linksWrapper.marginTop` and `sidebar.linksWrapper.marginBottom` have been removed
349
+ - Remove `isSticky` from SidebarFooter
350
+ - It always sticks to bottom
351
+ - Remove FormItemJointGroup
352
+ - Use `isJoint` prop inside FormItemGroup instead
353
+ - Remove SidebarLink, SidebarNestedLinks and SidebarLinksWrapper
354
+ - Remove SidebarItemsGroup and SidebarItemsGroupHeader
355
+ - Use ExpandableContent component instead
356
+ - Default Switch size now `medium` which is larger than before
357
+ - Set to size `small` for old size
358
+
359
+ ### 0.34.0
360
+ - Replace `react-syntax-highlighter` with `prism-react-renderer`
361
+ - Add simple wrappers for `prism-components` to import specific languages from `prismjs`
362
+ - Fix CodeBlock erratic output issue
363
+
364
+ ### 0.33.15
365
+ - Fix `spinner` padding
366
+
367
+ ### 0.33.14
368
+ - Add `Spinner` component
369
+
370
+ ### 0.33.12
371
+ - Remove `Element` props being passed to all HTML elements as attributes
372
+ - Fix Badge `is-loading` colours
373
+
374
+ ### 0.33.11
375
+ - Fix transition for `SidebarHeader`
376
+
377
+ ### 0.33.10
378
+ - Add `isSticky` prop for `SidebarHeader` and `SidebarFooter`
379
+ - Add new component `SidebarLinksWrapper` to better manage `SidebarHeader` and `SidebarFooter`
380
+
381
+ ### 0.33.9
382
+ - Fix `polished` imports
383
+
384
+ ### 0.33.8
385
+ ## BREAKING CHANGES ⚠️
386
+
387
+ - Breadcrumbs
388
+ - `BreadcrumbWrapper` renamed to `Breadcrumbs`
389
+ - The `separator` is now configurable in the theme file
390
+
391
+ - Badge
392
+ - `isLoading` class now works for `custom` kind buttons also
393
+ - Fix padding inconsistencies
394
+ - `with-loader` and `with-delete` classes renamed to `is-loading` and `has-delete`
395
+
396
+ - Form elements
397
+ - `input` theme object is now `inputField`
398
+ - `Checkbox`, `RadioButton`, `Select` etc have been moved out from inside `input`
399
+
400
+ - InfoPanel
401
+ - Dismiss button now styled differently, and does not interfere with the content
402
+
403
+ - Notifications
404
+ - The `type` prop is now `kind` to be more consistent with the rest of the components
405
+ - `onClose` is renamed to `onCloseCallback`
406
+ - `NotificationWrapper` has a `order` prop to set the stacking order of `NotificationItem` children
407
+
408
+ - Meter
409
+ - `isThin` prop is deprecated in favour of a far more flexible `height` prop
410
+ - `shape` prop is now available just like the `Badge`
411
+
412
+ - The theme object is now called `FictoanTheme`
413
+
414
+ ### 0.33.7
415
+ - Fix types for `CodeBlock`, `BaseInputElement`, `Meter`, `TextArea`, and `Select`.
416
+
417
+ ### 0.33.6
418
+ - Add autoprefixer to add vendor styles to CSS
419
+
420
+ ### 0.33.5
421
+ - Fix `alignText` styling for `Table` 😬
422
+
423
+ ### 0.33.4
424
+ - Add `alignText` prop for `Table`
425
+
426
+ ### 0.33.3
427
+ - Fix npm publish bug
428
+
429
+ ### 0.33.2
430
+ - Fix CSS overrides for all components
431
+
432
+ ### 0.33.1
433
+ - Support heading in `InfoPanel`
434
+
435
+ ### 0.33.0
436
+ - Replace lodash with lodash-es for tree shaking
437
+ - Bump rollup to 2.52.7
438
+ - Replace `prism-react-renderer` and `prismjs` with `react-syntax-highlighter` which is more customizable and tree-shakable
439
+ - Add `@rollup/plugin-babel` to add /_#**PURE**_/ prefix to `React.forwardRef` which is required for tree-shaking
440
+ - Add CSS files for Normalize, Reset, Colours and Utility to move static styles out of JS. Injecting to head tag using `rollup-plugin-styles`
441
+ - Programmatically generate Colours.styled.tsx classes (To be added to build flow soon)
442
+
443
+ ### 0.32.14
444
+ - Fix crash in tabs component
445
+
446
+ ### 0.32.13
447
+ - Simplify TablePagination component (breaking)
448
+
449
+ ### 0.32.10
450
+ - Add TablePagination component
451
+
452
+ ### 0.32.9
453
+ - Fix `InfoPanel` close button fixed position bug
454
+
455
+ ### 0.32.7
456
+ - Cap `sidePadding` and `sideMargin` for `Row` and `Divider` in ultra-wide res displays above 2400px
457
+
458
+ ### 0.32.5
459
+ - Add @emotion/is-prop-valid as an optional dependency
460
+
461
+ ### 0.32.3
462
+ - Add ability to set Sidebar logo width via the theme
463
+
464
+ ### 0.32.1
465
+ - Add Tabs component
466
+
467
+ ### 0.31.22
468
+ - Remove opinionated `ul`, `ol`, and `li` styles
469
+
470
+ ### 0.31.21
471
+ - Add opinionated version of Normalize.css
472
+
473
+ ### 0.31.20
474
+ - Remove Normalize.css
475
+
476
+ ### 0.31.19
477
+ - Add theme variables for `RadioButton`, `Checkbox` and `ToggleSwitch`
478
+
479
+ ### 0.31.18
480
+ - Upgrade to React 17.0.1
481
+ - Tweak colour and font family for other input elements
482
+
483
+ ### 0.31.17
484
+ - Change `fontFamily` to `font` for `Badge` component
485
+ - Fix font fallback styling inconsistency for labels, tables, and links
486
+
487
+ ### 0.31.16
488
+ - Rework Notification component
489
+
490
+ ### 0.31.15
491
+ - Fix `bg` of `SidebarWrapper`
492
+
493
+ ### 0.31.13
494
+ - Add `size` property for `SidebarItemIcon` to be picked from theme file
495
+
496
+ ### 0.31.12
497
+ - Add `font-family` to tables, and inherit from body font
498
+
499
+ ### 0.31.11
500
+ - Remove improper colour override for dark sidebar theme
501
+
502
+ ### 0.31.10
503
+ - Move React & styled-components to peerDependencies
504
+
505
+ ### 0.31.8
506
+ - Switch to useState & useEffect for merging theme
507
+
508
+ ### 0.31.7
509
+ - Fix Drawer theme issue for setting `borderRadius`
510
+
511
+ ### 0.31.6
512
+ - Fix broken builds (0.31.2 - 0.31.5)
513
+
514
+ ### 0.31.2
515
+ - Set ThemeType to recursive optional typeof RFTheme
516
+
517
+ ### 0.31.1
518
+ - Export `StaticGlobalStyles`
519
+
520
+ ### 0.31.0
521
+ - Add support for passing `refs`
522
+
523
+ ### 0.30.14
524
+ - Upgrade `styled-components` from `5.0.1` to `5.1.1` for Jest reasons
525
+
526
+ ### 0.30.13
527
+ - Add `tertiary` button
528
+
529
+ ### 0.30.12
530
+ - Add `transparent` as a `defaultColour`
531
+
532
+ ### 0.30.11
533
+ - Fix incorrect centering rule
534
+
535
+ ### 0.30.10
536
+ - Make `borderRadius` themeable for cards and input fields
537
+
538
+ ### 0.30.9
539
+ - Rename `baseColors` to `defaultColours`, and `mainColors` to `customColours`
540
+
541
+ ### 0.30.8
542
+ - Memoize theme prop in ThemeProvider
543
+
544
+ ### v0.30.7
545
+ - Add missing props for theming some elements
546
+
547
+ ### v0.30.6
548
+ - Add merge to reduce size of custom overrides
549
+
550
+ ### v0.30.5
551
+ - Fix `a` tag hover colour bug
552
+
553
+ ### v0.30.4
554
+ - Fix type bug that wouldn’t let `paras` inherit `font-family`
555
+
556
+ ### v0.30.3
557
+ - Fix lodash `merge` speed issue
558
+
559
+ ### v0.30.0
560
+ - Remove static CSS classes from `GlobalStyles`
561
+
562
+ ### v0.29.3
563
+ - Rename `Textarea` to `TextArea`
564
+
565
+ ### v0.29.2
566
+ - Add media queries for `InfoPanel` below `1200px` to handle `width` prop
567
+
568
+ ### v0.29.1
569
+ - Add `primary`, `secondary`, and `tertiary` props for the `Divider` element
570
+
571
+ ### v0.29.0
572
+ - Add `bgColour`, `textColour`, `borderColour`, `strokeColour` and `fillColour` props with British English
573
+
574
+ ### v0.28.7
575
+ - Add `spring`, `brick` and `sienna` colour values
576
+
577
+ ### v0.28.5
578
+ - Fix `FormItem` margin bottom bug inside `FormItemGroup`
579
+
580
+ ### v0.28.4
581
+ - Add `nano` and `micro` sizing for Text
582
+
583
+ ### v0.28.3
584
+ - Tweak links theme styling
585
+ - `links.default.text` is now `links.default.color`
586
+ - `links.onHover.text` is now `links.onHover.color`
587
+
588
+ ### v0.28.2
589
+ - Fix Textarea styling bug
590
+ - Add `nano` and `micro` text sizes
591
+ - Text theme tweaks
592
+ - `size` object deprecated
593
+ - `size.default` is now `paras.size`
594
+ - `size.multiplier` is now `headings.multiplier`
595
+
596
+ ### v0.27.0
597
+ - Add props for Meter to display a label and value
598
+
599
+ ### v0.23.8
600
+ - Remove all SCSS files
601
+ - Remove unused svg icon
602
+ - Move `theme` to `styles` folder
603
+
604
+ ### v0.23.7
605
+ - Use relative path everywhere
606
+
607
+ ### v0.23.6
608
+ - Generate typings
609
+
610
+ ### v0.23.5
611
+ - Upgrade all packages
612
+
613
+ ### v0.21.2
614
+ - Update styled components
615
+ - Remove unused component `EventHandler`
616
+ - Fix rollup dependencies
617
+
618
+ ### v0.21.1
619
+ - Add `onCloseButtonClick` prop in `NotificationItem`
620
+
621
+ ### v0.21.0
622
+ - Code cleanup
@@ -1 +1 @@
1
- "use strict";Object.create,Object.defineProperty,Object.getOwnPropertyDescriptor,Object.getOwnPropertyNames,Object.getPrototypeOf,Object.prototype.hasOwnProperty;Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),t=require("../Element/Element.cjs"),r=require("../Button/Button.cjs"),n=require("../Badge/Badge.cjs");var o=["children","source","language","showCopyButton"];function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},a.apply(this,arguments)}function l(e){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var i=e.lazy((function(){return import("prism-react-renderer").then((function(t){return t.Highlight?{default:t.Highlight}:(console.log("FICTOAN : Looking for syntax highlighting?\n╭──────────────────────────────────────────────────────────────────────────────────────────────────╮\n│ Please install the prism-react-renderer (https://www.npmjs.com/package/prism-react-renderer) │\n│ package to have syntax highlighting in the CodeBlock component. │\n│ For example: yarn add prism-react-renderer │\n╰──────────────────────────────────────────────────────────────────────────────────────────────────╯"),{default:function(t){var r=t.code;return e.createElement("pre",{"data-code-block":!0,className:"module-fallback"},r)}})}))})),u=e.forwardRef((function(u,s){var p,f,y=u.children,m=u.source,d=u.language,b=void 0===d?"json":d,g=u.showCopyButton,h=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(u,o),O=(p=e.useState(!1),f=2,function(e){if(Array.isArray(e))return e}(p)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a,l,c=[],i=!0,u=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;i=!1}else for(;!(i=(n=a.call(r)).done)&&(c.push(n.value),c.length!==t);i=!0);}catch(s){u=!0,o=s}finally{try{if(!i&&null!=r.return&&(l=r.return(),Object(l)!==l))return}finally{if(u)throw o}}return c}}(p,f)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}(p,f)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),j=O[0],v=O[1],k="string"==typeof y?y:e.Children.toArray(y).join("");return y||(k="object"===l(m)?JSON.stringify(m,null,2):null!=m?m:""),e.createElement(t.Element,a({"data-code-block":!0,as:"div"},h),g?j?e.createElement(n.Badge,{className:"code-block-copy-button",size:"tiny",shape:"rounded",bgColor:"green-light-80",borderColour:"green-dark-20",textColour:"green-dark-20"},"COPIED!"):e.createElement(r.Button,{type:"button",className:"code-block-copy-button",size:"tiny",shape:"rounded",bgColor:"transparent",borderColour:"blue-light-40",textColour:"blue",onClick:function(){navigator.clipboard.writeText(k).then((function(){v(!0),setTimeout((function(){return v(!1)}),3e3)})).catch((function(e){console.error("Could not copy text: ",e)}))}},"Copy"):null,e.createElement(e.Suspense,{fallback:e.createElement("pre",{"data-code-block":!0,className:"suspense-fallback"},k)},e.createElement(i,{code:k,language:b,theme:void 0},(function(t){var r=t.className,n=t.tokens,o=t.getLineProps,a=t.getTokenProps;return e.createElement("pre",{ref:s,className:r},n.map((function(t,r){return e.createElement("div",o({line:t,key:r}),t.map((function(t,r){return e.createElement("span",a({token:t,key:r}))})))})))}))))}));exports.CodeBlock=u;
1
+ "use strict";Object.create,Object.defineProperty,Object.getOwnPropertyDescriptor,Object.getOwnPropertyNames,Object.getPrototypeOf,Object.prototype.hasOwnProperty;Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),t=require("../Element/Element.cjs"),r=require("../Button/Button.cjs"),n=require("../Badge/Badge.cjs");var o=["children","source","language","showCopyButton","showLineNumbers"];function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},a.apply(this,arguments)}function l(e){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var i=e.lazy((function(){return import("prism-react-renderer").then((function(t){return t.Highlight?{default:t.Highlight}:(console.log("FICTOAN : Looking for syntax highlighting?\n╭──────────────────────────────────────────────────────────────────────────────────────────────────╮\n│ Please install the prism-react-renderer (https://www.npmjs.com/package/prism-react-renderer) │\n│ package to have syntax highlighting in the CodeBlock component. │\n│ For example: yarn add prism-react-renderer │\n╰──────────────────────────────────────────────────────────────────────────────────────────────────╯"),{default:function(t){var r=t.code;return e.createElement("pre",{"data-code-block":!0,className:"module-fallback"},r)}})}))})),u=e.forwardRef((function(u,s){var p,m,f=u.children,y=u.source,d=u.language,b=void 0===d?"json":d,g=u.showCopyButton,h=u.showLineNumbers,O=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(u,o),v=(p=e.useState(!1),m=2,function(e){if(Array.isArray(e))return e}(p)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a,l,c=[],i=!0,u=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;i=!1}else for(;!(i=(n=a.call(r)).done)&&(c.push(n.value),c.length!==t);i=!0);}catch(s){u=!0,o=s}finally{try{if(!i&&null!=r.return&&(l=r.return(),Object(l)!==l))return}finally{if(u)throw o}}return c}}(p,m)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}(p,m)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),j=v[0],k=v[1],w="string"==typeof f?f:e.Children.toArray(f).join("");f||(w="object"===l(y)?JSON.stringify(y,null,2):null!=y?y:"");var E=[];return h&&E.push("show-line-numbers"),e.createElement(t.Element,a({"data-code-block":!0,as:"div",classNames:E},O),g?j?e.createElement(n.Badge,{className:"code-block-copied-badge",size:"tiny",shape:"rounded","aria-live":"polite"},"Copied!"):e.createElement(r.Button,{type:"button",className:"code-block-copy-button",size:"tiny",shape:"rounded",onClick:function(){navigator.clipboard.writeText(w).then((function(){k(!0),setTimeout((function(){return k(!1)}),3e3)})).catch((function(e){console.error("Could not copy text: ",e)}))},role:"button","aria-label":"Copy code to clipboard"},"Copy"):null,e.createElement(e.Suspense,{fallback:e.createElement("pre",{"data-code-block":!0,className:"suspense-fallback"},w)},e.createElement(i,{code:w,language:b,theme:void 0},(function(t){var r=t.className,n=t.tokens,o=t.getLineProps,a=t.getTokenProps;return e.createElement("pre",{ref:s,className:r},n.map((function(t,r){return e.createElement("div",o({line:t,key:r}),h&&e.createElement("span",{className:"line-numbers"},r+1),e.createElement("span",{className:"l-o-c"},t.map((function(t,r){return e.createElement("span",a({token:t,key:r}))}))))})))}))))}));exports.CodeBlock=u;
@@ -2,8 +2,9 @@ import React from "react";
2
2
  import { CommonAndHTMLProps } from "../Element/constants";
3
3
  export interface CodeBlockCustomProps {
4
4
  source?: object | string;
5
- language?: string;
5
+ language?: string | undefined;
6
6
  showCopyButton?: boolean;
7
+ showLineNumbers?: boolean;
7
8
  }
8
9
  export type CodeBlockElementType = HTMLPreElement;
9
10
  export type CodeBlockProps = Omit<CommonAndHTMLProps<CodeBlockElementType>, keyof CodeBlockCustomProps> & CodeBlockCustomProps;