Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 0.16.x #218

Merged
merged 20 commits into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
d233883
feat: 0.16.x
subraAntoine Jul 15, 2024
3a8d7e1
fix: css and peer dependcies mantine version (#198)
subraAntoine Jul 15, 2024
a6e9242
Fix: Table pagination (#200)
subraAntoine Jul 18, 2024
d46907c
Feat/stepper page last step (#199)
Meriemu Jul 19, 2024
d162e5f
feat(redmine 1305131): make some corrections (#202)
Meriemu Jul 25, 2024
4bed473
fix: table actions (#203)
tonai Jul 29, 2024
81ba004
feat(redmine 1306608): accessibility - corrections to images (#207)
Meriemu Aug 5, 2024
810c143
feat(redmine 1305754): create a floating menu (#206)
Meriemu Aug 6, 2024
2a9441f
feat(redmine 1306617): accessibility correction unsupported aria attr…
Meriemu Aug 9, 2024
85e6198
feat(redmine 1306612): correction to color contrast (#208)
Meriemu Aug 9, 2024
0f0d647
Feat/aria tabs (#211)
Meriemu Aug 9, 2024
eaf66ee
feat(redmine 1306616): display header column title 'Actions' (#209)
Meriemu Aug 9, 2024
3d27f22
feat(redmine 1306629): accessibility correction focusable element (#212)
Meriemu Aug 12, 2024
69a0aba
fix(redmine 1306613): fixed form elements accessibility errors (#205)
subraAntoine Aug 12, 2024
d28d51d
feat(redmine 1306622): add role to the calendar wrapper (#213)
Meriemu Sep 5, 2024
2aead99
Fix/button accessibility error (#204)
subraAntoine Sep 5, 2024
61b6f39
Feat/dynamic zone (#215)
MorganeLeCaignec Sep 9, 2024
2004835
Feat/form dynamic zone (#216)
MorganeLeCaignec Sep 25, 2024
4538167
Feat/form dynamic zone animation example (#217)
MorganeLeCaignec Sep 25, 2024
024702a
ci: version packages (#201)
github-actions[bot] Sep 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2,064 changes: 1,044 additions & 1,020 deletions package-lock.json

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions packages/haring-react-dates/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# @smile/haring-react-dates

## 0.16.0

### Minor Changes

- [#213](https://github.com/Smile-SA/haring/pull/213) [`d28d51d`](https://github.com/Smile-SA/haring/commit/d28d51dad2f9663883b5fd6a789ec18ac7bf0711) Thanks [@Meriemu](https://github.com/Meriemu)! - add a role to MantineCalendarHeader

### Patch Changes

- Updated dependencies [[`2004835`](https://github.com/Smile-SA/haring/commit/200483533f4a10665709deb9545c5c564fdb8d3d), [`2a9441f`](https://github.com/Smile-SA/haring/commit/2a9441fd5b0d794abd10b622c695eae2ab5c54c0), [`85e6198`](https://github.com/Smile-SA/haring/commit/85e6198db3bf58afbf3ebf1e256fa4c8ae1c6785), [`2aead99`](https://github.com/Smile-SA/haring/commit/2aead99da90fc43254d1b8882d33132612e767dc), [`0f0d647`](https://github.com/Smile-SA/haring/commit/0f0d647eda2e3af05f1d678f2529c9f7d95d4129), [`810c143`](https://github.com/Smile-SA/haring/commit/810c143ae7761c07943797a5a6d300bf5b21c840), [`81ba004`](https://github.com/Smile-SA/haring/commit/81ba004b67465466235a68a80c1c7f2c4131cb93), [`61b6f39`](https://github.com/Smile-SA/haring/commit/61b6f394adcfdb6ee250ae81894534677cf87224), [`4538167`](https://github.com/Smile-SA/haring/commit/4538167d2f6700399f55c645bba44cf5f66fb6ec), [`3d27f22`](https://github.com/Smile-SA/haring/commit/3d27f22453fccc14bc7babc0b7cac21b5b60da5f), [`69a0aba`](https://github.com/Smile-SA/haring/commit/69a0aba210283bfc4374d7c5e5d7cff62d5234b4)]:
- @smile/haring-react-shared@0.16.0
- @smile/haring-react@0.16.0

## 0.15.0

### Minor Changes
Expand Down
12 changes: 6 additions & 6 deletions packages/haring-react-dates/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@smile/haring-react-dates",
"version": "0.15.0",
"version": "0.16.0",
"description": "Date and Calendar React component library based on mantine",
"license": "LGPL-3.0",
"homepage": "https://github.com/Smile-SA/haring",
Expand Down Expand Up @@ -70,8 +70,8 @@
"prepublishOnly": "npm run build && node ../../scripts/prepublish.mjs"
},
"dependencies": {
"@smile/haring-react": "0.15.0",
"@smile/haring-react-shared": "0.15.0"
"@smile/haring-react": "0.16.0",
"@smile/haring-react-shared": "0.16.0"
},
"devDependencies": {
"@babel/preset-env": "^7.22.20",
Expand All @@ -95,9 +95,9 @@
"vite-plugin-dts": "^3.7.2"
},
"peerDependencies": {
"@mantine/core": "7.11.0",
"@mantine/dates": "7.11.0",
"@mantine/hooks": "7.11.0",
"@mantine/core": ">=7.11.0",
"@mantine/dates": ">=7.11.0",
"@mantine/hooks": ">=7.11.0",
"@phosphor-icons/react": ">=2",
"react": ">=18.0",
"react-dom": ">=18.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,14 @@ export function CalendarHeader(props: ICalendarHeaderProps): ReactElement {
<Popover onChange={setOpened} opened={opened} radius={10} width="target">
<Popover.Target>
<MantineCalendarHeader
aria-label="calendar"
className={classes.header}
color="red"
label={label}
nextLabel="Next button"
onLevelClick={() => setOpened(!opened)}
previousLabel="Previous button"
role="region"
size="md"
{...calendarHeaderProps}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,16 @@ exports[`CalendarHeader matches snapshot 1`] = `
aria-controls="mantine-f4bipx4bi-dropdown"
aria-expanded="false"
aria-haspopup="dialog"
aria-label="calendar"
class="m_730a79ed mantine-CalendarHeader-calendarHeader"
color="red"
data-size="md"
id="mantine-f4bipx4bi-target"
role="region"
style="--dch-control-size: var(--dch-control-size-md); --dch-fz: var(--mantine-font-size-md);"
>
<button
aria-label="Previous button"
class="haring-focus m_2351eeb0 mantine-CalendarHeader-calendarHeaderControl m_87cf2631 mantine-UnstyledButton-root"
data-direction="previous"
tabindex="0"
Expand Down Expand Up @@ -55,6 +58,7 @@ exports[`CalendarHeader matches snapshot 1`] = `
August 2023
</button>
<button
aria-label="Next button"
class="haring-focus m_2351eeb0 mantine-CalendarHeader-calendarHeaderControl m_87cf2631 mantine-UnstyledButton-root"
data-direction="next"
tabindex="0"
Expand Down
8 changes: 8 additions & 0 deletions packages/haring-react-dropzone/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# @smile/haring-react-dropzone

## 0.16.0

### Patch Changes

- Updated dependencies [[`2004835`](https://github.com/Smile-SA/haring/commit/200483533f4a10665709deb9545c5c564fdb8d3d), [`2a9441f`](https://github.com/Smile-SA/haring/commit/2a9441fd5b0d794abd10b622c695eae2ab5c54c0), [`85e6198`](https://github.com/Smile-SA/haring/commit/85e6198db3bf58afbf3ebf1e256fa4c8ae1c6785), [`2aead99`](https://github.com/Smile-SA/haring/commit/2aead99da90fc43254d1b8882d33132612e767dc), [`0f0d647`](https://github.com/Smile-SA/haring/commit/0f0d647eda2e3af05f1d678f2529c9f7d95d4129), [`810c143`](https://github.com/Smile-SA/haring/commit/810c143ae7761c07943797a5a6d300bf5b21c840), [`81ba004`](https://github.com/Smile-SA/haring/commit/81ba004b67465466235a68a80c1c7f2c4131cb93), [`61b6f39`](https://github.com/Smile-SA/haring/commit/61b6f394adcfdb6ee250ae81894534677cf87224), [`4538167`](https://github.com/Smile-SA/haring/commit/4538167d2f6700399f55c645bba44cf5f66fb6ec), [`3d27f22`](https://github.com/Smile-SA/haring/commit/3d27f22453fccc14bc7babc0b7cac21b5b60da5f), [`69a0aba`](https://github.com/Smile-SA/haring/commit/69a0aba210283bfc4374d7c5e5d7cff62d5234b4)]:
- @smile/haring-react-shared@0.16.0
- @smile/haring-react@0.16.0

## 0.15.0

### Minor Changes
Expand Down
12 changes: 6 additions & 6 deletions packages/haring-react-dropzone/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@smile/haring-react-dropzone",
"version": "0.15.0",
"version": "0.16.0",
"description": "Dropzone React component library based on mantine",
"license": "LGPL-3.0",
"homepage": "https://github.com/Smile-SA/haring",
Expand Down Expand Up @@ -54,8 +54,8 @@
"prepublishOnly": "npm run build && node ../../scripts/prepublish.mjs"
},
"dependencies": {
"@smile/haring-react": "0.15.0",
"@smile/haring-react-shared": "0.15.0"
"@smile/haring-react": "0.16.0",
"@smile/haring-react-shared": "0.16.0"
},
"devDependencies": {
"@babel/preset-env": "^7.22.20",
Expand All @@ -79,9 +79,9 @@
"vite-plugin-dts": "^3.7.2"
},
"peerDependencies": {
"@mantine/core": "7.11.0",
"@mantine/dropzone": "7.11.0",
"@mantine/hooks": "7.11.0",
"@mantine/core": ">=7.11.0",
"@mantine/dropzone": ">=7.11.0",
"@mantine/hooks": ">=7.11.0",
"@phosphor-icons/react": ">=2",
"react": ">=18.0",
"react-dom": ">=18.0"
Expand Down
8 changes: 8 additions & 0 deletions packages/haring-react-shared/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# @smile/haring-react-shared

## 0.16.0

### Minor Changes

- [#216](https://github.com/Smile-SA/haring/pull/216) [`2004835`](https://github.com/Smile-SA/haring/commit/200483533f4a10665709deb9545c5c564fdb8d3d) Thanks [@QuentinLeCaignec](https://github.com/QuentinLeCaignec)! - Refactored DynamicZone and FormDynamicZone to be more configurable, remove state and react-hook-form dependency and make them neutral, fixed errors and added a few features, added example page ReactHookFormDynamicZone to implement FormDynamicZone example with react-hook-form, added/reworked types and utilities

- [#215](https://github.com/Smile-SA/haring/pull/215) [`61b6f39`](https://github.com/Smile-SA/haring/commit/61b6f394adcfdb6ee250ae81894534677cf87224) Thanks [@QuentinLeCaignec](https://github.com/QuentinLeCaignec)! - Added DynamicZone component, related types and utilities, updated snapshot

## 0.15.0

### Minor Changes
Expand Down
6 changes: 3 additions & 3 deletions packages/haring-react-shared/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@smile/haring-react-shared",
"version": "0.15.0",
"version": "0.16.0",
"description": "Shared elements for Haring component library based on mantine",
"license": "LGPL-3.0",
"homepage": "https://github.com/Smile-SA/haring",
Expand Down Expand Up @@ -102,8 +102,8 @@
"vite-plugin-dts": "^3.7.2"
},
"peerDependencies": {
"@mantine/core": "7.11.0",
"@mantine/hooks": "7.11.0",
"@mantine/core": ">=7.11.0",
"@mantine/hooks": ">=7.11.0",
"@phosphor-icons/react": ">=2",
"react": ">=18.0",
"react-dom": ">=18.0"
Expand Down
27 changes: 27 additions & 0 deletions packages/haring-react-shared/src/helpers/utilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,30 @@ export function isNotNullNorEmpty<S>(
export function isCallback<T, U>(maybeFunc: T | U): maybeFunc is T {
return typeof maybeFunc === 'function';
}

export function isObject(value: unknown): value is object {
return Boolean(value && typeof value === 'object' && !Array.isArray(value));
}

export function findNestedObject(
object: object,
keyToMatch: string,
valueToMatch: string,
): object | null {
if (isObject(object)) {
const entries = Object.entries(object);
for (const element of entries) {
const [objectKey, objectValue] = element;
if (objectKey === keyToMatch && objectValue && valueToMatch) {
return object;
}
if (isObject(objectValue)) {
const child = findNestedObject(objectValue, keyToMatch, valueToMatch);
if (child !== null) {
return child;
}
}
}
}
return null;
}
3 changes: 3 additions & 0 deletions packages/haring-react-shared/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ export {
createThemes,
isCallback,
isNotNullNorEmpty,
isObject,
findNestedObject,
typeGuard,
typeGuardInterface,
} from './helpers';
Expand All @@ -44,6 +46,7 @@ export type {
IThemeOverride,
IThemes,
IFilter,
IOmitRespectIndexSignature,
} from './types';
// type exports
export { mainTheme, primaryTheme, secondaryTheme, themes } from './theme';
1 change: 1 addition & 0 deletions packages/haring-react-shared/src/types/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export interface IActionConfirmModalProps<Item>
}

export interface IAction<Item> {
ariaLabel?: string | ((item: Item) => string);
color?: string;
componentProps?:
| Record<string, unknown>
Expand Down
1 change: 1 addition & 0 deletions packages/haring-react-shared/src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ export * from './options';
export * from './theme';
export * from './filters';
export * from './items';
export * from './utility';
3 changes: 3 additions & 0 deletions packages/haring-react-shared/src/types/utility.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export type IOmitRespectIndexSignature<T, K extends PropertyKey> = {
[P in keyof T as Exclude<P, K>]: T[P];
};
16 changes: 16 additions & 0 deletions packages/haring-react-table/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# @smile/haring-react-table

## 0.16.0

### Minor Changes

- [#204](https://github.com/Smile-SA/haring/pull/204) [`2aead99`](https://github.com/Smile-SA/haring/commit/2aead99da90fc43254d1b8882d33132612e767dc) Thanks [@subraAntoine](https://github.com/subraAntoine)! - fixed button accessibility erros

- [#209](https://github.com/Smile-SA/haring/pull/209) [`eaf66ee`](https://github.com/Smile-SA/haring/commit/eaf66eef3b2000758c5497d3126f0c886bc454a0) Thanks [@Meriemu](https://github.com/Meriemu)! - Accessibility corrections to table header text

### Patch Changes

- [#203](https://github.com/Smile-SA/haring/pull/203) [`4bed473`](https://github.com/Smile-SA/haring/commit/4bed47334b645d5868ddb67cd8e851433bf85d09) Thanks [@tonai](https://github.com/tonai)! - Fix table actions

- Updated dependencies [[`2004835`](https://github.com/Smile-SA/haring/commit/200483533f4a10665709deb9545c5c564fdb8d3d), [`2a9441f`](https://github.com/Smile-SA/haring/commit/2a9441fd5b0d794abd10b622c695eae2ab5c54c0), [`85e6198`](https://github.com/Smile-SA/haring/commit/85e6198db3bf58afbf3ebf1e256fa4c8ae1c6785), [`2aead99`](https://github.com/Smile-SA/haring/commit/2aead99da90fc43254d1b8882d33132612e767dc), [`0f0d647`](https://github.com/Smile-SA/haring/commit/0f0d647eda2e3af05f1d678f2529c9f7d95d4129), [`810c143`](https://github.com/Smile-SA/haring/commit/810c143ae7761c07943797a5a6d300bf5b21c840), [`81ba004`](https://github.com/Smile-SA/haring/commit/81ba004b67465466235a68a80c1c7f2c4131cb93), [`61b6f39`](https://github.com/Smile-SA/haring/commit/61b6f394adcfdb6ee250ae81894534677cf87224), [`4538167`](https://github.com/Smile-SA/haring/commit/4538167d2f6700399f55c645bba44cf5f66fb6ec), [`3d27f22`](https://github.com/Smile-SA/haring/commit/3d27f22453fccc14bc7babc0b7cac21b5b60da5f), [`69a0aba`](https://github.com/Smile-SA/haring/commit/69a0aba210283bfc4374d7c5e5d7cff62d5234b4)]:
- @smile/haring-react-shared@0.16.0
- @smile/haring-react@0.16.0

## 0.15.0

### Minor Changes
Expand Down
12 changes: 6 additions & 6 deletions packages/haring-react-table/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@smile/haring-react-table",
"version": "0.15.0",
"version": "0.16.0",
"description": "Table React component library based on mantine",
"license": "LGPL-3.0",
"homepage": "https://github.com/Smile-SA/haring",
Expand Down Expand Up @@ -69,8 +69,8 @@
"prepublishOnly": "npm run build && node ../../scripts/prepublish.mjs"
},
"dependencies": {
"@smile/haring-react": "0.15.0",
"@smile/haring-react-shared": "0.15.0"
"@smile/haring-react": "0.16.0",
"@smile/haring-react-shared": "0.16.0"
},
"devDependencies": {
"@babel/preset-env": "^7.22.20",
Expand All @@ -94,9 +94,9 @@
"vite-plugin-dts": "^3.7.2"
},
"peerDependencies": {
"@mantine/core": "7.11.0",
"@mantine/dates": "7.11.0",
"@mantine/hooks": "7.11.0",
"@mantine/core": ">=7.11.0",
"@mantine/dates": ">=7.11.0",
"@mantine/hooks": ">=7.11.0",
"@phosphor-icons/react": ">=2",
"@tabler/icons-react": ">=2",
"dayjs": ">=1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { action } from '@storybook/addon-actions';
export const tableMock: ITableProps<Record<string, unknown>> = {
actions: [
{
ariaLabel: 'move',
icon: <FolderMove />,
id: 'move',
isMassAction: true,
Expand Down Expand Up @@ -69,6 +70,9 @@ export const tableMock: ITableProps<Record<string, unknown>> = {
onAction: action('Delete'),
},
],
ariaLabels: {
otherActions: 'Other actions',
},
columns: [
{
accessorKey: 'id',
Expand Down
Loading
Loading