chop-logic-components 4.1.1 → 4.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.
- package/dist/components/atoms/avatar/Avatar.css +1 -0
- package/dist/components/atoms/avatar/Avatar.d.ts +7 -0
- package/dist/components/atoms/avatar/Avatar2.js +44 -0
- package/dist/components/atoms/button/Button2.js +11 -11
- package/dist/components/atoms/button/icon-button/IconButton2.js +4 -4
- package/dist/components/atoms/button/inner-button/InnerButton2.js +4 -4
- package/dist/components/atoms/button/primary-button/PrimaryButton2.js +4 -4
- package/dist/components/atoms/button/secondary-button/SecondaryButton2.js +4 -4
- package/dist/components/atoms/editable-text/EditView.js +4 -4
- package/dist/components/atoms/editable-text/EditableText2.js +8 -8
- package/dist/components/atoms/icon/Icon2.js +10 -10
- package/dist/components/atoms/image/BasicImage.d.ts +2 -0
- package/dist/components/atoms/image/BasicImage.js +4 -9
- package/dist/components/atoms/image/Image.css +1 -1
- package/dist/components/atoms/image/Image2.js +16 -16
- package/dist/components/atoms/image/ResponsivePicture.d.ts +1 -0
- package/dist/components/atoms/image/ResponsivePicture.js +16 -9
- package/dist/components/atoms/index.d.ts +2 -0
- package/dist/components/atoms/input/Input2.js +5 -5
- package/dist/components/atoms/label/Label2.js +4 -4
- package/dist/components/atoms/link/Link2.js +4 -4
- package/dist/components/atoms/tag/Tag.css +1 -0
- package/dist/components/atoms/tag/Tag.d.ts +7 -0
- package/dist/components/atoms/tag/Tag2.js +15 -0
- package/dist/components/atoms/tooltip/Tooltip2.js +9 -8
- package/dist/components/contexts/theme/ThemeProvider.js +8 -8
- package/dist/components/hocs/with-error-boundary/with-error-boundary.js +8 -8
- package/dist/components/hocs/with-figure-caption/Figure.css +1 -1
- package/dist/components/molecules/alert/Alert2.js +19 -19
- package/dist/components/molecules/checkbox/CheckboxStateful.js +6 -6
- package/dist/components/molecules/checkbox/CheckboxStateless.js +6 -6
- package/dist/components/molecules/multi-select/MultiSelect.Combobox.js +6 -6
- package/dist/components/molecules/multi-select/MultiSelect.js +7 -7
- package/dist/components/molecules/multi-select/Option.js +8 -8
- package/dist/components/molecules/numeric-input/NumericInputStateful.js +8 -8
- package/dist/components/molecules/numeric-input/NumericInputStateless.js +8 -8
- package/dist/components/molecules/search/Search2.js +16 -16
- package/dist/components/molecules/select/Select2.js +7 -7
- package/dist/components/molecules/select/combobox/Combobox2.js +6 -6
- package/dist/components/molecules/select/option/Option2.js +6 -6
- package/dist/components/molecules/text-input/TextInputStateless.js +8 -8
- package/dist/components/organisms/dialog/Dialog2.js +14 -14
- package/dist/components/organisms/form/Form2.js +14 -14
- package/dist/components/organisms/gallery/Gallery.css +1 -0
- package/dist/components/organisms/gallery/Gallery.d.ts +4 -0
- package/dist/components/organisms/gallery/Gallery.helpers.d.ts +3 -0
- package/dist/components/organisms/gallery/Gallery.helpers.js +29 -0
- package/dist/components/organisms/gallery/Gallery2.js +57 -0
- package/dist/components/organisms/gallery/carousel-navigation/CarouselNavigation.css +1 -0
- package/dist/components/organisms/gallery/carousel-navigation/CarouselNavigation.d.ts +9 -0
- package/dist/components/organisms/gallery/carousel-navigation/CarouselNavigation2.js +25 -0
- package/dist/components/organisms/gallery/full-screen-viewer/FullscreenViewer.css +1 -0
- package/dist/components/organisms/gallery/full-screen-viewer/FullscreenViewer.d.ts +11 -0
- package/dist/components/organisms/gallery/full-screen-viewer/FullscreenViewer2.js +48 -0
- package/dist/components/organisms/gallery/gallery-image-item/GalleryImageItem.css +1 -0
- package/dist/components/organisms/gallery/gallery-image-item/GalleryImageItem.d.ts +10 -0
- package/dist/components/organisms/gallery/gallery-image-item/GalleryImageItem2.js +17 -0
- package/dist/components/organisms/gallery/hooks/use-carousel-scroll.d.ts +10 -0
- package/dist/components/organisms/gallery/hooks/use-carousel-scroll.js +50 -0
- package/dist/components/organisms/gallery/hooks/use-fullscreen-viewer.d.ts +11 -0
- package/dist/components/organisms/gallery/hooks/use-fullscreen-viewer.js +23 -0
- package/dist/components/organisms/gallery/viewer-close-button/ViewerCloseButton.css +1 -0
- package/dist/components/organisms/gallery/viewer-close-button/ViewerCloseButton.d.ts +6 -0
- package/dist/components/organisms/gallery/viewer-close-button/ViewerCloseButton2.js +15 -0
- package/dist/components/organisms/gallery/viewer-counter/ViewerCounter.css +1 -0
- package/dist/components/organisms/gallery/viewer-counter/ViewerCounter.d.ts +7 -0
- package/dist/components/organisms/gallery/viewer-counter/ViewerCounter2.js +14 -0
- package/dist/components/organisms/gallery/viewer-image-container/ViewerImageContainer.css +1 -0
- package/dist/components/organisms/gallery/viewer-image-container/ViewerImageContainer.d.ts +8 -0
- package/dist/components/organisms/gallery/viewer-image-container/ViewerImageContainer2.js +14 -0
- package/dist/components/organisms/gallery/viewer-navigation/ViewerNavigation.css +1 -0
- package/dist/components/organisms/gallery/viewer-navigation/ViewerNavigation.d.ts +8 -0
- package/dist/components/organisms/gallery/viewer-navigation/ViewerNavigation2.js +29 -0
- package/dist/components/organisms/gallery/viewer-overlay/ViewerOverlay.css +1 -0
- package/dist/components/organisms/gallery/viewer-overlay/ViewerOverlay.d.ts +12 -0
- package/dist/components/organisms/gallery/viewer-overlay/ViewerOverlay2.js +33 -0
- package/dist/components/organisms/grid/checkbox/GridCheckbox2.js +4 -4
- package/dist/components/organisms/index.d.ts +2 -0
- package/dist/components/organisms/menu/Menu2.js +5 -5
- package/dist/components/organisms/menu/list-item/MenuListItem2.js +8 -8
- package/dist/components/organisms/menu/sub-menu/SubMenu2.js +17 -17
- package/dist/components/organisms/preview-card/PreviewCard.css +1 -0
- package/dist/components/organisms/preview-card/PreviewCard.d.ts +4 -0
- package/dist/components/organisms/preview-card/PreviewCard2.js +57 -0
- package/dist/components/organisms/tabs/Tabs2.js +11 -11
- package/dist/components/organisms/tabs/button/TabButton2.js +23 -23
- package/dist/components/organisms/tabs/edit-input/TabEditInput2.js +9 -9
- package/dist/components/organisms/tabs/list/TabList2.js +12 -12
- package/dist/enums/index.d.ts +1 -0
- package/dist/enums/index.js +1 -0
- package/dist/enums/link-target.d.ts +6 -0
- package/dist/enums/link-target.js +6 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.es.js +61 -56
- package/dist/styles/main.css +1 -1
- package/dist/types/gallery.d.ts +13 -0
- package/dist/types/image.d.ts +16 -3
- package/dist/types/index.d.ts +3 -1
- package/dist/types/preview-card.d.ts +38 -0
- package/package.json +18 -18
package/dist/types/image.d.ts
CHANGED
|
@@ -1,9 +1,22 @@
|
|
|
1
|
-
export interface
|
|
1
|
+
export interface ArtDirectionSource {
|
|
2
2
|
src: string;
|
|
3
|
-
|
|
4
|
-
media?: string;
|
|
3
|
+
media: string;
|
|
5
4
|
type?: string;
|
|
5
|
+
descriptor?: never;
|
|
6
6
|
}
|
|
7
|
+
export interface ResolutionSource {
|
|
8
|
+
src: string;
|
|
9
|
+
descriptor: string;
|
|
10
|
+
type?: string;
|
|
11
|
+
media?: never;
|
|
12
|
+
}
|
|
13
|
+
export interface PlainSource {
|
|
14
|
+
src: string;
|
|
15
|
+
type?: string;
|
|
16
|
+
media?: never;
|
|
17
|
+
descriptor?: never;
|
|
18
|
+
}
|
|
19
|
+
export type ImageSource = ArtDirectionSource | ResolutionSource | PlainSource;
|
|
7
20
|
export interface ImageProps {
|
|
8
21
|
src: string;
|
|
9
22
|
alt: string;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -7,14 +7,16 @@ export type { CheckboxProps } from './checkbox';
|
|
|
7
7
|
export type { DialogProps } from './dialog';
|
|
8
8
|
export type { EditableTextProps } from './editable-text';
|
|
9
9
|
export type { FormInputParams, FormProps, FormValidationState, FormValues } from './form';
|
|
10
|
+
export type { GalleryItem, GalleryMode, GalleryProps } from './gallery';
|
|
10
11
|
export type { GridColumn, GridItem, GridProps, GridRowValue, RenderDataItemCallback } from './grid';
|
|
11
12
|
export type { HeaderProps } from './header';
|
|
12
|
-
export type { ImageProps, ImageSource } from './image';
|
|
13
|
+
export type { ArtDirectionSource, ImageProps, ImageSource, PlainSource, ResolutionSource, } from './image';
|
|
13
14
|
export type { LinkProps } from './link';
|
|
14
15
|
export type { LoaderProps } from './loader';
|
|
15
16
|
export type { MenuItem, MenuProps } from './menu';
|
|
16
17
|
export type { MultiSelectProps } from './multi-select';
|
|
17
18
|
export type { NumericInputProps } from './numeric';
|
|
19
|
+
export type { Author, AvatarProps, PreviewCardProps, TagData, TagProps } from './preview-card';
|
|
18
20
|
export type { SearchProps } from './search';
|
|
19
21
|
export type { SelectProps } from './select';
|
|
20
22
|
export type { SwitchProps } from './switch';
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { LinkTarget } from '../enums';
|
|
2
|
+
import { ChopLogicComponentProps } from './_common';
|
|
3
|
+
import { ImageProps } from './image';
|
|
4
|
+
export interface Author {
|
|
5
|
+
id: string;
|
|
6
|
+
name: string;
|
|
7
|
+
imageUrl: string;
|
|
8
|
+
tooltip?: string;
|
|
9
|
+
link?: string;
|
|
10
|
+
linkTarget?: LinkTarget;
|
|
11
|
+
}
|
|
12
|
+
export interface TagData {
|
|
13
|
+
id: string;
|
|
14
|
+
name: string;
|
|
15
|
+
description?: string;
|
|
16
|
+
color?: string;
|
|
17
|
+
}
|
|
18
|
+
export interface AvatarProps extends ChopLogicComponentProps {
|
|
19
|
+
name: string;
|
|
20
|
+
imageUrl: string;
|
|
21
|
+
tooltip?: string;
|
|
22
|
+
link?: string;
|
|
23
|
+
linkTarget?: LinkTarget;
|
|
24
|
+
}
|
|
25
|
+
export interface TagProps extends ChopLogicComponentProps {
|
|
26
|
+
name: string;
|
|
27
|
+
tooltip?: string;
|
|
28
|
+
color?: string;
|
|
29
|
+
}
|
|
30
|
+
export interface PreviewCardProps extends ChopLogicComponentProps {
|
|
31
|
+
link: string;
|
|
32
|
+
linkTarget?: LinkTarget;
|
|
33
|
+
image: ImageProps;
|
|
34
|
+
title: string;
|
|
35
|
+
authors: Author[];
|
|
36
|
+
tags: TagData[];
|
|
37
|
+
summary?: string;
|
|
38
|
+
}
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"type": "git",
|
|
5
5
|
"url": "git+https://github.com/ChopLogic/chop-logic-components.git"
|
|
6
6
|
},
|
|
7
|
-
"version": "4.
|
|
7
|
+
"version": "4.3.0",
|
|
8
8
|
"description": "Reusable React components and hooks for the Chop Logic project",
|
|
9
9
|
"type": "module",
|
|
10
10
|
"module": "dist/index.es.js",
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"lint:warnings": "biome check --diagnostic-level warn --max-diagnostics 100",
|
|
84
84
|
"lint:fix": "biome check --write",
|
|
85
85
|
"typecheck": "tsc --pretty --noEmit",
|
|
86
|
-
"test": "vitest",
|
|
86
|
+
"test": "vitest --watch",
|
|
87
87
|
"test:ci": "vitest run --passWithNoTests",
|
|
88
88
|
"test:integration": "npm run build:storybook && start-server-and-test 'http-server storybook-static -p 6006 -s' http://127.0.0.1:6006 test-storybook",
|
|
89
89
|
"test:mutation": "stryker run",
|
|
@@ -117,34 +117,34 @@
|
|
|
117
117
|
},
|
|
118
118
|
"homepage": "https://choplogic.github.io/chop-logic-components",
|
|
119
119
|
"devDependencies": {
|
|
120
|
-
"@biomejs/biome": "^2.
|
|
121
|
-
"@commitlint/cli": "^
|
|
122
|
-
"@commitlint/config-conventional": "^
|
|
123
|
-
"@storybook/addon-a11y": "^10.
|
|
124
|
-
"@storybook/addon-docs": "^10.
|
|
125
|
-
"@storybook/react-vite": "^10.
|
|
126
|
-
"@storybook/test-runner": "^0.24.
|
|
120
|
+
"@biomejs/biome": "^2.5.1",
|
|
121
|
+
"@commitlint/cli": "^21.1.0",
|
|
122
|
+
"@commitlint/config-conventional": "^21.1.0",
|
|
123
|
+
"@storybook/addon-a11y": "^10.4.6",
|
|
124
|
+
"@storybook/addon-docs": "^10.4.6",
|
|
125
|
+
"@storybook/react-vite": "^10.4.6",
|
|
126
|
+
"@storybook/test-runner": "^0.24.4",
|
|
127
127
|
"@stryker-mutator/core": "^9.6.1",
|
|
128
128
|
"@stryker-mutator/vitest-runner": "^9.6.1",
|
|
129
129
|
"@testing-library/jest-dom": "^6.9.1",
|
|
130
130
|
"@testing-library/react": "^16.3.2",
|
|
131
|
-
"@types/node": "^
|
|
132
|
-
"@types/react": "^19.2.
|
|
131
|
+
"@types/node": "^26.0.1",
|
|
132
|
+
"@types/react": "^19.2.17",
|
|
133
133
|
"@types/react-dom": "^19.2.3",
|
|
134
|
-
"@vitest/coverage-v8": "^4.1.
|
|
134
|
+
"@vitest/coverage-v8": "^4.1.9",
|
|
135
135
|
"http-server": "^14.1.1",
|
|
136
136
|
"husky": "^9.1.7",
|
|
137
137
|
"husky-init": "^8.0.0",
|
|
138
138
|
"jsdom": "^29.1.1",
|
|
139
|
-
"prettier": "^3.8.
|
|
139
|
+
"prettier": "^3.8.5",
|
|
140
140
|
"remark-gfm": "^4.0.1",
|
|
141
|
-
"start-server-and-test": "^3.0.
|
|
142
|
-
"storybook": "^10.
|
|
141
|
+
"start-server-and-test": "^3.0.11",
|
|
142
|
+
"storybook": "^10.4.6",
|
|
143
143
|
"typescript": "^6.0.3",
|
|
144
|
-
"vite": "^8.0
|
|
145
|
-
"vite-plugin-dts": "^5.0.
|
|
144
|
+
"vite": "^8.1.0",
|
|
145
|
+
"vite-plugin-dts": "^5.0.3",
|
|
146
146
|
"vite-plugin-lib-inject-css": "^2.2.2",
|
|
147
|
-
"vitest": "^4.1.
|
|
147
|
+
"vitest": "^4.1.9"
|
|
148
148
|
},
|
|
149
149
|
"overrides": {
|
|
150
150
|
"storybook": "$storybook"
|