chop-logic-components 4.0.3 → 4.1.1
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/README.md +23 -8
- package/dist/components/atoms/button/Button.d.ts +7 -0
- package/dist/components/atoms/button/icon-button/IconButton.d.ts +3 -0
- package/dist/components/atoms/button/inner-button/InnerButton.d.ts +3 -0
- package/dist/components/atoms/button/primary-button/PrimaryButton.d.ts +3 -0
- package/dist/components/atoms/button/secondary-button/SecondaryButton.css +1 -1
- package/dist/components/atoms/button/secondary-button/SecondaryButton.d.ts +3 -0
- package/dist/components/atoms/editable-text/EditView.d.ts +14 -0
- package/dist/components/atoms/editable-text/EditableText.d.ts +4 -0
- package/dist/components/atoms/editable-text/ReadView.d.ts +10 -0
- package/dist/components/atoms/editable-text/useEditModeState.d.ts +6 -0
- package/dist/components/atoms/editable-text/useInputFocus.d.ts +2 -0
- package/dist/components/atoms/editable-text/useValueState.d.ts +6 -0
- package/dist/components/atoms/error-message/ErrorMessage.d.ts +10 -0
- package/dist/components/atoms/header/Header.d.ts +4 -0
- package/dist/components/atoms/icon/Icon.d.ts +11 -0
- package/dist/components/atoms/icon/Icon2.js +7 -11
- package/dist/components/atoms/image/BasicImage.d.ts +13 -0
- package/dist/components/atoms/image/FallBackImage.d.ts +2 -0
- package/dist/components/atoms/image/Image.d.ts +6 -0
- package/dist/components/atoms/image/ResponsivePicture.d.ts +15 -0
- package/dist/components/atoms/index.d.ts +11 -0
- package/dist/components/atoms/input/Input.d.ts +5 -0
- package/dist/components/atoms/label/Label.d.ts +16 -0
- package/dist/components/atoms/link/Link.d.ts +4 -0
- package/dist/components/atoms/portal/Portal.d.ts +5 -0
- package/dist/components/atoms/tooltip/Tooltip.controller.d.ts +19 -0
- package/dist/components/atoms/tooltip/Tooltip.d.ts +4 -0
- package/dist/components/contexts/form/FormContext.d.ts +7 -0
- package/dist/components/contexts/index.d.ts +4 -0
- package/dist/components/contexts/theme/ThemeContext.d.ts +8 -0
- package/dist/components/contexts/theme/ThemeProvider.d.ts +8 -0
- package/dist/components/hocs/index.d.ts +3 -0
- package/dist/components/hocs/with-error-boundary/index.js +2 -0
- package/dist/components/hocs/with-error-boundary/with-error-boundary.d.ts +6 -0
- package/dist/components/hocs/with-error-boundary/with-error-boundary.js +32 -0
- package/dist/components/hocs/with-figure-caption/with-figure-caption.d.ts +6 -0
- package/dist/components/hocs/with-tooltip/with-tooltip.d.ts +7 -0
- package/dist/components/molecules/accordion/Accordion.d.ts +4 -0
- package/dist/components/molecules/accordion/AccordionItem.d.ts +3 -0
- package/dist/components/molecules/alert/Alert.d.ts +4 -0
- package/dist/components/molecules/alert/Alert.helpers.d.ts +3 -0
- package/dist/components/molecules/alert/AlertProgressBar.d.ts +4 -0
- package/dist/components/molecules/breadcrumbs/BreadcrumbItem.d.ts +7 -0
- package/dist/components/molecules/breadcrumbs/BreadcrumbList.d.ts +6 -0
- package/dist/components/molecules/breadcrumbs/Breadcrumbs.d.ts +4 -0
- package/dist/components/molecules/checkbox/Checkbox.controller.d.ts +9 -0
- package/dist/components/molecules/checkbox/Checkbox.d.ts +9 -0
- package/dist/components/molecules/checkbox/Checkbox.helpers.d.ts +6 -0
- package/dist/components/molecules/checkbox/CheckboxStateful.d.ts +4 -0
- package/dist/components/molecules/checkbox/CheckboxStateless.d.ts +4 -0
- package/dist/components/molecules/index.d.ts +10 -0
- package/dist/components/molecules/multi-select/MultiSelect.Combobox.d.ts +15 -0
- package/dist/components/molecules/multi-select/MultiSelect.Dropdown.d.ts +11 -0
- package/dist/components/molecules/multi-select/MultiSelect.controller.d.ts +13 -0
- package/dist/components/molecules/multi-select/MultiSelect.d.ts +4 -0
- package/dist/components/molecules/multi-select/MultiSelect.helpers.d.ts +9 -0
- package/dist/components/molecules/multi-select/MultiSelectComboboxSelectedValues.d.ts +8 -0
- package/dist/components/molecules/multi-select/Option.d.ts +8 -0
- package/dist/components/molecules/multi-select/Option.js +11 -11
- package/dist/components/molecules/numeric-input/NumericInput.controller.d.ts +22 -0
- package/dist/components/molecules/numeric-input/NumericInput.d.ts +9 -0
- package/dist/components/molecules/numeric-input/NumericInput.helpers.d.ts +13 -0
- package/dist/components/molecules/numeric-input/NumericInputStateful.d.ts +4 -0
- package/dist/components/molecules/numeric-input/NumericInputStateless.d.ts +4 -0
- package/dist/components/molecules/search/Search.controller.d.ts +12 -0
- package/dist/components/molecules/search/Search.d.ts +4 -0
- package/dist/components/molecules/select/Select.controller.d.ts +14 -0
- package/dist/components/molecules/select/Select.d.ts +4 -0
- package/dist/components/molecules/select/Select.helpers.d.ts +7 -0
- package/dist/components/molecules/select/combobox/Combobox.d.ts +15 -0
- package/dist/components/molecules/select/dropdown/Dropdown.d.ts +14 -0
- package/dist/components/molecules/select/option/Option.d.ts +10 -0
- package/dist/components/molecules/select/option/Option2.js +10 -10
- package/dist/components/molecules/switch/Switch.controller.d.ts +10 -0
- package/dist/components/molecules/switch/Switch.d.ts +4 -0
- package/dist/components/molecules/switch/Switch.helpers.d.ts +6 -0
- package/dist/components/molecules/switch/Switch2.js +4 -4
- package/dist/components/molecules/text-input/TextInput.controller.d.ts +17 -0
- package/dist/components/molecules/text-input/TextInput.d.ts +9 -0
- package/dist/components/molecules/text-input/TextInput.helpers.d.ts +11 -0
- package/dist/components/molecules/text-input/TextInputButtons.d.ts +11 -0
- package/dist/components/molecules/text-input/TextInputStateful.d.ts +4 -0
- package/dist/components/molecules/text-input/TextInputStateless.d.ts +4 -0
- package/dist/components/molecules/text-input/TextInputStateless.js +8 -8
- package/dist/components/organisms/dialog/Dialog.css +1 -1
- package/dist/components/organisms/dialog/Dialog.d.ts +4 -0
- package/dist/components/organisms/form/Form.controller.d.ts +14 -0
- package/dist/components/organisms/form/Form.d.ts +4 -0
- package/dist/components/organisms/form/Form.helpers.d.ts +4 -0
- package/dist/components/organisms/grid/Grid.controller.d.ts +15 -0
- package/dist/components/organisms/grid/Grid.d.ts +4 -0
- package/dist/components/organisms/grid/Grid.helpers.d.ts +6 -0
- package/dist/components/organisms/grid/body/GridBody.d.ts +13 -0
- package/dist/components/organisms/grid/checkbox/GridCheckbox.d.ts +6 -0
- package/dist/components/organisms/grid/column-group/GridColumnGroup.d.ts +6 -0
- package/dist/components/organisms/grid/data-cell/GridDataCell.d.ts +4 -0
- package/dist/components/organisms/grid/grid-row/GridRow.d.ts +13 -0
- package/dist/components/organisms/grid/head/GridHead.d.ts +13 -0
- package/dist/components/organisms/grid/header-cell/HeaderCell.d.ts +5 -0
- package/dist/components/organisms/grid/select-all-grid-rows-cell/SelectAllGridRowsCell.d.ts +10 -0
- package/dist/components/organisms/grid/select-grid-row-cell/SelectGridRowCell.d.ts +10 -0
- package/dist/components/organisms/index.d.ts +5 -0
- package/dist/components/organisms/menu/Menu.d.ts +4 -0
- package/dist/components/organisms/menu/leaf/MenuLeaf.d.ts +5 -0
- package/dist/components/organisms/menu/list-item/MenuListItem.d.ts +10 -0
- package/dist/components/organisms/menu/sub-menu/SubMenu.d.ts +14 -0
- package/dist/components/organisms/tabs/Tabs.d.ts +4 -0
- package/dist/components/organisms/tabs/button/TabButton.d.ts +18 -0
- package/dist/components/organisms/tabs/content/TabContent.d.ts +8 -0
- package/dist/components/organisms/tabs/content/TabContent2.js +3 -3
- package/dist/components/organisms/tabs/edit-input/TabEditInput.d.ts +14 -0
- package/dist/components/organisms/tabs/list/TabList.d.ts +19 -0
- package/dist/enums/alert-mode.d.ts +7 -0
- package/dist/enums/button-view.d.ts +6 -0
- package/dist/enums/element-size.d.ts +8 -0
- package/dist/enums/icon-name.d.ts +284 -0
- package/dist/enums/index.d.ts +8 -0
- package/dist/enums/loader-view.d.ts +11 -0
- package/dist/enums/orientation-mode.d.ts +4 -0
- package/dist/enums/semantic-color.d.ts +7 -0
- package/dist/enums/tooltip-container.d.ts +7 -0
- package/dist/hooks/index.d.ts +15 -0
- package/dist/hooks/use-auto-close/use-auto-close.d.ts +6 -0
- package/dist/hooks/use-click-outside/use-click-outside.d.ts +8 -0
- package/dist/hooks/use-container-dimensions/use-container-dimensions.d.ts +8 -0
- package/dist/hooks/use-debounce/use-debounce.d.ts +1 -0
- package/dist/hooks/use-element-ids/use-element-ids.d.ts +5 -0
- package/dist/hooks/use-is-hovered/use-is-hovered.d.ts +2 -0
- package/dist/hooks/use-is-mounted/use-is-mounted.d.ts +1 -0
- package/dist/hooks/use-is-overflow/use-is-overflow.d.ts +6 -0
- package/dist/hooks/use-key-press/use-key-press.d.ts +8 -0
- package/dist/hooks/use-modal-focus-trap/use-modal-focus-trap.d.ts +7 -0
- package/dist/hooks/use-remaining-timer/use-remaining-timer.d.ts +9 -0
- package/dist/hooks/use-reset-form-input/use-reset-form-input.d.ts +1 -0
- package/dist/hooks/use-theme/use-theme.d.ts +4 -0
- package/dist/hooks/use-tooltip-position/use-tooltip-position.d.ts +12 -0
- package/dist/hooks/use-window-dimensions/use-window-dimensions.d.ts +2 -0
- package/dist/index.d.ts +2 -917
- package/dist/index.es.js +42 -41
- package/dist/main.d.ts +8 -0
- package/dist/styles/main.css +1 -1
- package/dist/types/_common.d.ts +35 -0
- package/dist/types/accordion.d.ts +8 -0
- package/dist/types/alert.d.ts +11 -0
- package/dist/types/breadcrumbs.d.ts +10 -0
- package/dist/types/button.d.ts +11 -0
- package/dist/types/checkbox.d.ts +9 -0
- package/dist/types/dialog.d.ts +9 -0
- package/dist/types/editable-text.d.ts +12 -0
- package/dist/types/form.d.ts +18 -0
- package/dist/types/grid.d.ts +27 -0
- package/dist/types/header.d.ts +9 -0
- package/dist/types/image.d.ts +21 -0
- package/dist/types/index.d.ts +23 -0
- package/dist/types/link.d.ts +9 -0
- package/dist/types/loader.d.ts +6 -0
- package/dist/types/menu.d.ts +17 -0
- package/dist/types/multi-select.d.ts +7 -0
- package/dist/types/numeric.d.ts +19 -0
- package/dist/types/search.d.ts +16 -0
- package/dist/types/select.d.ts +7 -0
- package/dist/types/switch.d.ts +13 -0
- package/dist/types/tabs.d.ts +23 -0
- package/dist/types/text.d.ts +17 -0
- package/dist/types/tooltip.d.ts +11 -0
- package/dist/utils/get-class-name.d.ts +5 -0
- package/dist/utils/handle-dropdown-list-key-press.d.ts +7 -0
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/move-focus-on-element-by-id.d.ts +1 -0
- package/package.json +22 -18
package/dist/index.es.js
CHANGED
|
@@ -12,44 +12,45 @@ import u from "./components/atoms/editable-text/EditableText2.js";
|
|
|
12
12
|
import d from "./components/atoms/error-message/ErrorMessage2.js";
|
|
13
13
|
import f from "./components/atoms/header/Header2.js";
|
|
14
14
|
import p from "./components/atoms/icon/Icon2.js";
|
|
15
|
-
import {
|
|
16
|
-
import h from "./components/
|
|
17
|
-
import g from "./components/atoms/
|
|
18
|
-
import _ from "./components/atoms/
|
|
19
|
-
import v from "./components/atoms/
|
|
20
|
-
import y from "./components/atoms/
|
|
21
|
-
import
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import B from "./
|
|
40
|
-
import V from "./components/
|
|
41
|
-
import H from "./components/molecules/
|
|
42
|
-
import U from "./components/molecules/
|
|
43
|
-
import W from "./components/molecules/
|
|
44
|
-
import G from "./components/molecules/
|
|
45
|
-
import K from "./components/molecules/
|
|
46
|
-
import q from "./components/molecules/
|
|
47
|
-
import J from "./components/molecules/
|
|
48
|
-
import Y from "./components/molecules/
|
|
49
|
-
import X from "./components/molecules/
|
|
50
|
-
import Z from "./components/
|
|
51
|
-
import Q from "./components/organisms/
|
|
52
|
-
import $ from "./components/organisms/
|
|
53
|
-
import ee from "./components/organisms/
|
|
54
|
-
import te from "./components/organisms/
|
|
55
|
-
|
|
15
|
+
import { withErrorBoundary as m } from "./components/hocs/with-error-boundary/with-error-boundary.js";
|
|
16
|
+
import { withFigureCaption as h } from "./components/hocs/with-figure-caption/with-figure-caption.js";
|
|
17
|
+
import g from "./components/atoms/image/Image2.js";
|
|
18
|
+
import _ from "./components/atoms/input/Input2.js";
|
|
19
|
+
import v from "./components/atoms/label/Label2.js";
|
|
20
|
+
import y from "./components/atoms/link/Link2.js";
|
|
21
|
+
import b from "./components/atoms/portal/Portal.js";
|
|
22
|
+
import { useAutoClose as x } from "./hooks/use-auto-close/use-auto-close.js";
|
|
23
|
+
import { useClickOutside as S } from "./hooks/use-click-outside/use-click-outside.js";
|
|
24
|
+
import { useContainerDimensions as C } from "./hooks/use-container-dimensions/use-container-dimensions.js";
|
|
25
|
+
import { useDebounce as w } from "./hooks/use-debounce/use-debounce.js";
|
|
26
|
+
import { useElementIds as T } from "./hooks/use-element-ids/use-element-ids.js";
|
|
27
|
+
import { useIsHovered as E } from "./hooks/use-is-hovered/use-is-hovered.js";
|
|
28
|
+
import { useIsMounted as D } from "./hooks/use-is-mounted/use-is-mounted.js";
|
|
29
|
+
import { useIsOverflow as O } from "./hooks/use-is-overflow/use-is-overflow.js";
|
|
30
|
+
import { useKeyPress as k } from "./hooks/use-key-press/use-key-press.js";
|
|
31
|
+
import { useModalFocusTrap as A } from "./hooks/use-modal-focus-trap/use-modal-focus-trap.js";
|
|
32
|
+
import { useRemainingTimer as j } from "./hooks/use-remaining-timer/use-remaining-timer.js";
|
|
33
|
+
import { FormContext as M } from "./components/contexts/form/FormContext.js";
|
|
34
|
+
import { CL_DARK_THEME_CLASS as N, CL_LIGHT_THEME_CLASS as P, ThemeContext as F } from "./components/contexts/theme/ThemeContext.js";
|
|
35
|
+
import { ThemeProvider as I } from "./components/contexts/theme/ThemeProvider.js";
|
|
36
|
+
import { useResetFormInput as L } from "./hooks/use-reset-form-input/use-reset-form-input.js";
|
|
37
|
+
import { useTheme as R } from "./hooks/use-theme/use-theme.js";
|
|
38
|
+
import { useTooltipPosition as z } from "./hooks/use-tooltip-position/use-tooltip-position.js";
|
|
39
|
+
import { useWindowDimensions as B } from "./hooks/use-window-dimensions/use-window-dimensions.js";
|
|
40
|
+
import V from "./components/atoms/tooltip/Tooltip2.js";
|
|
41
|
+
import H from "./components/molecules/accordion/Accordion2.js";
|
|
42
|
+
import U from "./components/molecules/alert/Alert2.js";
|
|
43
|
+
import W from "./components/molecules/breadcrumbs/Breadcrumbs2.js";
|
|
44
|
+
import G from "./components/molecules/checkbox/Checkbox2.js";
|
|
45
|
+
import K from "./components/molecules/multi-select/MultiSelect.js";
|
|
46
|
+
import q from "./components/molecules/numeric-input/NumericInput2.js";
|
|
47
|
+
import J from "./components/molecules/search/Search2.js";
|
|
48
|
+
import Y from "./components/molecules/select/Select2.js";
|
|
49
|
+
import X from "./components/molecules/switch/Switch2.js";
|
|
50
|
+
import Z from "./components/molecules/text-input/TextInput2.js";
|
|
51
|
+
import Q from "./components/organisms/dialog/Dialog2.js";
|
|
52
|
+
import $ from "./components/organisms/form/Form2.js";
|
|
53
|
+
import ee from "./components/organisms/grid/Grid2.js";
|
|
54
|
+
import te from "./components/organisms/menu/Menu2.js";
|
|
55
|
+
import ne from "./components/organisms/tabs/Tabs2.js";
|
|
56
|
+
export { H as Accordion, U as Alert, t as AlertMode, W as Breadcrumbs, l as Button, n as ButtonView, N as CL_DARK_THEME_CLASS, P as CL_LIGHT_THEME_CLASS, G as Checkbox, Q as Dialog, u as EditableText, r as ElementSize, d as ErrorMessage, $ as Form, M as FormContext, ee as Grid, f as Header, p as Icon, i as IconName, g as Image, _ as Input, v as Label, y as Link, a as LoaderView, te as Menu, K as MultiSelect, q as NumericInput, o as OrientationMode, b as Portal, J as Search, Y as Select, s as SemanticColor, X as Switch, ne as Tabs, Z as TextInput, F as ThemeContext, I as ThemeProvider, V as Tooltip, c as TooltipContainer, x as useAutoClose, S as useClickOutside, C as useContainerDimensions, w as useDebounce, T as useElementIds, E as useIsHovered, D as useIsMounted, O as useIsOverflow, k as useKeyPress, A as useModalFocusTrap, j as useRemainingTimer, L as useResetFormInput, R as useTheme, z as useTooltipPosition, B as useWindowDimensions, m as withErrorBoundary, h as withFigureCaption, e as withTooltip };
|
package/dist/main.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './components/atoms';
|
|
2
|
+
export * from './components/contexts';
|
|
3
|
+
export * from './components/hocs';
|
|
4
|
+
export * from './components/molecules';
|
|
5
|
+
export * from './components/organisms';
|
|
6
|
+
export * from './enums';
|
|
7
|
+
export * from './hooks';
|
|
8
|
+
export * from './types';
|
package/dist/styles/main.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--cl-core-font:Arial, Helvetica, sans-serif;--cl-monospace-font:"Courier New", Courier, monospace;--cl-fancy-font:Georgia, "Times New Roman", Times, serif;--cl-xs-gap:2px;--cl-s-gap:4px;--cl-m-gap:8px;--cl-l-gap:16px;--cl-xl-gap:32px;--cl-xxl-gap:64px;--cl-icon-size:20px;--cl-thumb-size:24px;--cl-border-radius:4px;--cl-z-index-base:1;--cl-z-index-menu:5;--cl-z-index-popup:10;--cl-z-index-modal:20;--cl-typography-h1-mobile:2.25rem;--cl-typography-h1-tablet:2.5rem;--cl-typography-h1-desktop:3rem;--cl-typography-h2-mobile:2rem;--cl-typography-h2-tablet:2.25rem;--cl-typography-h2-desktop:2.5rem;--cl-typography-h3-mobile:1.75rem;--cl-typography-h3-tablet:2rem;--cl-typography-h3-desktop:2.25rem;--cl-typography-h4-mobile:1.5rem;--cl-typography-h4-tablet:1.75rem;--cl-typography-h4-desktop:2rem;--cl-typography-h5-mobile:1.25rem;--cl-typography-h5-tablet:1.5rem;--cl-typography-h5-desktop:1.75rem;--cl-typography-h6-mobile:1rem;--cl-typography-h6-tablet:1.125rem;--cl-typography-h6-desktop:1.25rem;--cl-typography-base-mobile:1rem;--cl-typography-base-tablet:1.125rem;--cl-typography-base-desktop:1.25rem;--cl-typography-small-mobile:.875rem;--cl-typography-small-tablet:1rem;--cl-typography-small-desktop:1.125rem;--cl-breakpoint-sm:640px;--cl-breakpoint-md:768px;--cl-breakpoint-lg:1024px;--cl-breakpoint-xl:1280px;--cl-breakpoint-xxl:1536px;--cl-base-font-color:#000;--cl-base-background-color:#fff;--cl-accent-a0:#8d1c12;--cl-accent-a10:#7d1c11;--cl-accent-a20:#6d1b10;--cl-accent-a30:#5e190f;--cl-surface-a0:#fff;--cl-surface-a10:#f0f0f0;--cl-surface-a20:#e1e1e1;--cl-surface-a30:#d3d3d3;--cl-surface-tonal-a0:#f7e8e4;--cl-surface-tonal-a10:#e9dcd8;--cl-surface-tonal-a20:#dbd0cd;--cl-surface-tonal-a30:#cec4c2;--cl-success-a0:#1b7f5c;--cl-success-a10:#28be8a;--cl-success-a20:#58dbad;--cl-warning-a0:#b8871f;--cl-warning-a10:#dfae44;--cl-warning-a20:#ebca85;--cl-danger-a0:#b13535;--cl-danger-a10:#d06262;--cl-danger-a20:#e29d9d;--cl-info-a0:#1e56a3;--cl-info-a10:#347ada;--cl-info-a20:#74a4e6;--cl-accent-gradient:linear-gradient(135deg, #8d1c12 0%, #7d1c11 50%, #6d1b10 100%);--cl-box-shadow:#0003 2.4px 2.4px 3.2px;--cl-box-shadow-extended:#0003 4.8px 4.8px 6.4px;--cl-text-shadow:2.4px 2.4px 3.2px #00000026;--cl-drop-shadow:drop-shadow(2.4px 2.4px 3.2px #00000026);--cl-accent-border:1px solid #8d1c12;--cl-danger-border:1px solid #
|
|
1
|
+
:root{--cl-core-font:Arial, Helvetica, sans-serif;--cl-monospace-font:"Courier New", Courier, monospace;--cl-fancy-font:Georgia, "Times New Roman", Times, serif;--cl-xs-gap:2px;--cl-s-gap:4px;--cl-m-gap:8px;--cl-l-gap:16px;--cl-xl-gap:32px;--cl-xxl-gap:64px;--cl-icon-size:20px;--cl-thumb-size:24px;--cl-border-radius:4px;--cl-z-index-base:1;--cl-z-index-menu:5;--cl-z-index-popup:10;--cl-z-index-modal:20;--cl-typography-h1-mobile:2.25rem;--cl-typography-h1-tablet:2.5rem;--cl-typography-h1-desktop:3rem;--cl-typography-h2-mobile:2rem;--cl-typography-h2-tablet:2.25rem;--cl-typography-h2-desktop:2.5rem;--cl-typography-h3-mobile:1.75rem;--cl-typography-h3-tablet:2rem;--cl-typography-h3-desktop:2.25rem;--cl-typography-h4-mobile:1.5rem;--cl-typography-h4-tablet:1.75rem;--cl-typography-h4-desktop:2rem;--cl-typography-h5-mobile:1.25rem;--cl-typography-h5-tablet:1.5rem;--cl-typography-h5-desktop:1.75rem;--cl-typography-h6-mobile:1rem;--cl-typography-h6-tablet:1.125rem;--cl-typography-h6-desktop:1.25rem;--cl-typography-base-mobile:1rem;--cl-typography-base-tablet:1.125rem;--cl-typography-base-desktop:1.25rem;--cl-typography-small-mobile:.875rem;--cl-typography-small-tablet:1rem;--cl-typography-small-desktop:1.125rem;--cl-breakpoint-sm:640px;--cl-breakpoint-md:768px;--cl-breakpoint-lg:1024px;--cl-breakpoint-xl:1280px;--cl-breakpoint-xxl:1536px;--cl-base-font-color:#000;--cl-base-background-color:#fff;--cl-accent-a0:#8d1c12;--cl-accent-a10:#7d1c11;--cl-accent-a20:#6d1b10;--cl-accent-a30:#5e190f;--cl-surface-a0:#fff;--cl-surface-a10:#f0f0f0;--cl-surface-a20:#e1e1e1;--cl-surface-a30:#d3d3d3;--cl-surface-tonal-a0:#f7e8e4;--cl-surface-tonal-a10:#e9dcd8;--cl-surface-tonal-a20:#dbd0cd;--cl-surface-tonal-a30:#cec4c2;--cl-success-a0:#1b7f5c;--cl-success-a10:#28be8a;--cl-success-a20:#58dbad;--cl-warning-a0:#b8871f;--cl-warning-a10:#dfae44;--cl-warning-a20:#ebca85;--cl-danger-a0:#b13535;--cl-danger-a10:#d06262;--cl-danger-a20:#e29d9d;--cl-info-a0:#1e56a3;--cl-info-a10:#347ada;--cl-info-a20:#74a4e6;--cl-accent-gradient:linear-gradient(135deg, #8d1c12 0%, #7d1c11 50%, #6d1b10 100%);--cl-box-shadow:#0003 2.4px 2.4px 3.2px;--cl-box-shadow-extended:#0003 4.8px 4.8px 6.4px;--cl-text-shadow:2.4px 2.4px 3.2px #00000026;--cl-drop-shadow:drop-shadow(2.4px 2.4px 3.2px #00000026);--cl-shadow-background:#0000004d;--cl-accent-border:1px solid #8d1c12;--cl-danger-border:1px solid #d06262;--cl-success-border:1px solid #28be8a;--cl-warning-border:1px solid #dfae44;--cl-info-border:1px solid #347ada;--cl-light-border:1px solid #c0b8b6;--cl-outline-border:1px solid #000}.cl-components-dark-theme{--cl-base-background-color:#000;--cl-base-font-color:#fff;--cl-accent-a0:#eb5cbe;--cl-accent-a10:#ef71c5;--cl-accent-a20:#f385cc;--cl-accent-a30:#f697d4;--cl-surface-a0:#121212;--cl-surface-a10:#282828;--cl-surface-a20:#3f3f3f;--cl-surface-a30:#575757;--cl-surface-tonal-a0:#251a21;--cl-surface-tonal-a10:#3a2f36;--cl-surface-tonal-a20:#4f464c;--cl-surface-tonal-a30:#665d63;--cl-success-a0:#9ae8ce;--cl-success-a10:#47d5a6;--cl-success-a20:#22946e;--cl-warning-a0:#a87a2a;--cl-warning-a10:#d7ac61;--cl-warning-a20:#ecd7b2;--cl-danger-a0:#eb9e9e;--cl-danger-a10:#d94a4a;--cl-danger-a20:#9c2121;--cl-info-a0:#92b2e5;--cl-info-a10:#4077d1;--cl-info-a20:#21498a;--cl-accent-gradient:linear-gradient(135deg, #eb5cbe 0%, #ef71c5 50%, #f385cc 100%);--cl-box-shadow:#ffffff4d 2.4px 2.4px 3.2px;--cl-box-shadow-extended:#ffffff4d 4px 4px 5px;--cl-text-shadow:2.4px 2.4px 3.2px #ffffff80;--cl-drop-shadow:drop-shadow(2.4px 2.4px 3.2px #ffffff4d);--cl-shadow-background:#ffffff4d;--cl-accent-border:1px solid #eb5cbe;--cl-danger-border:1px solid #d94a4a;--cl-success-border:1px solid #47d5a6;--cl-warning-border:1px solid #d7ac61;--cl-info-border:1px solid #4077d1;--cl-light-border:1px solid #665d63;--cl-outline-border:1px solid #fff}@keyframes cl-fade-in{0%{opacity:0}to{opacity:1}}@keyframes cl-fade-out{0%{opacity:1}to{opacity:0}}.cl-fade-in{animation:.4s cl-fade-in}.cl-fade-out{animation:.4s cl-fade-out}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
export interface ChopLogicComponentProps {
|
|
3
|
+
id?: string;
|
|
4
|
+
className?: string;
|
|
5
|
+
style?: CSSProperties;
|
|
6
|
+
tabIndex?: number;
|
|
7
|
+
title?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface ChopLogicInputProps extends ChopLogicComponentProps {
|
|
10
|
+
label: string;
|
|
11
|
+
name: string;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
required?: boolean;
|
|
14
|
+
stateless?: boolean;
|
|
15
|
+
value?: string | number | readonly string[];
|
|
16
|
+
}
|
|
17
|
+
export type SelectValue = {
|
|
18
|
+
id: string;
|
|
19
|
+
label: string;
|
|
20
|
+
} & {
|
|
21
|
+
[key in string]: unknown;
|
|
22
|
+
};
|
|
23
|
+
export type MultiSelectValue = SelectValue & {
|
|
24
|
+
selected: boolean;
|
|
25
|
+
};
|
|
26
|
+
export type NumericInputValidator = (input?: number) => boolean;
|
|
27
|
+
export type TextInputValidator = (input: string) => boolean;
|
|
28
|
+
export type ChopLogicRegExpWithFlags = {
|
|
29
|
+
regexp: string;
|
|
30
|
+
flags?: string;
|
|
31
|
+
};
|
|
32
|
+
export type Dimensions = {
|
|
33
|
+
width: number;
|
|
34
|
+
height: number;
|
|
35
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { ChopLogicComponentProps } from './_common';
|
|
3
|
+
export type AccordionItemProps = PropsWithChildren & {
|
|
4
|
+
summary: string;
|
|
5
|
+
};
|
|
6
|
+
export interface AccordionProps extends ChopLogicComponentProps {
|
|
7
|
+
items: AccordionItemProps[];
|
|
8
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { AlertMode, IconName } from '../enums';
|
|
2
|
+
import { ChopLogicComponentProps } from './_common';
|
|
3
|
+
export interface AlertProps extends ChopLogicComponentProps {
|
|
4
|
+
isOpened: boolean;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
message: string;
|
|
7
|
+
mode?: AlertMode;
|
|
8
|
+
icon?: IconName;
|
|
9
|
+
autoClose?: boolean;
|
|
10
|
+
autoCloseDelay?: number;
|
|
11
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IconName } from '../enums';
|
|
2
|
+
import { ChopLogicComponentProps } from './_common';
|
|
3
|
+
export interface Breadcrumb {
|
|
4
|
+
label: string;
|
|
5
|
+
icon?: IconName;
|
|
6
|
+
link?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface BreadcrumbsProps extends ChopLogicComponentProps {
|
|
9
|
+
items: Breadcrumb[];
|
|
10
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ButtonView, ElementSize, IconName } from '../enums';
|
|
2
|
+
import { ButtonHTMLAttributes } from 'react';
|
|
3
|
+
export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
4
|
+
view?: ButtonView;
|
|
5
|
+
icon?: IconName;
|
|
6
|
+
text?: string;
|
|
7
|
+
extended?: boolean;
|
|
8
|
+
tooltip?: string;
|
|
9
|
+
label?: string;
|
|
10
|
+
iconSize?: ElementSize;
|
|
11
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ChangeEventHandler } from 'react';
|
|
2
|
+
import { ChopLogicInputProps } from './_common';
|
|
3
|
+
export interface CheckboxProps extends ChopLogicInputProps {
|
|
4
|
+
noLabel?: boolean;
|
|
5
|
+
iconPosition?: 'left' | 'right';
|
|
6
|
+
onChange?: ChangeEventHandler<HTMLInputElement>;
|
|
7
|
+
defaultChecked?: boolean;
|
|
8
|
+
checked?: boolean;
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IconName } from '../enums';
|
|
2
|
+
import { PropsWithChildren } from 'react';
|
|
3
|
+
import { ChopLogicComponentProps } from './_common';
|
|
4
|
+
export interface DialogProps extends ChopLogicComponentProps, PropsWithChildren {
|
|
5
|
+
isOpened: boolean;
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
title: string;
|
|
8
|
+
icon?: IconName;
|
|
9
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { MouseEvent } from 'react';
|
|
2
|
+
import { ChopLogicComponentProps } from './_common';
|
|
3
|
+
export interface EditableTextProps extends ChopLogicComponentProps {
|
|
4
|
+
value: string;
|
|
5
|
+
autoSelectTextOnEditMode?: boolean;
|
|
6
|
+
isEditMode?: boolean;
|
|
7
|
+
multiline?: boolean;
|
|
8
|
+
onChange?: (value: string) => void;
|
|
9
|
+
onClick?: (event: MouseEvent) => void;
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
readOnly?: boolean;
|
|
12
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { FormEventHandler, PropsWithChildren } from 'react';
|
|
2
|
+
import { ChopLogicComponentProps } from './_common';
|
|
3
|
+
export type FormValues = {
|
|
4
|
+
[key: string]: unknown;
|
|
5
|
+
};
|
|
6
|
+
export type FormValidationState = [string, boolean][];
|
|
7
|
+
export interface FormInputParams {
|
|
8
|
+
name: string;
|
|
9
|
+
value: unknown;
|
|
10
|
+
valid?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export interface FormProps extends PropsWithChildren, ChopLogicComponentProps {
|
|
13
|
+
initialValues?: FormValues;
|
|
14
|
+
hasReset?: boolean;
|
|
15
|
+
onClickSubmit?: (data: FormValues) => void;
|
|
16
|
+
onReset?: FormEventHandler<HTMLFormElement>;
|
|
17
|
+
onSubmit?: FormEventHandler<HTMLFormElement>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import { ChopLogicComponentProps } from './_common';
|
|
3
|
+
export interface GridProps extends ChopLogicComponentProps {
|
|
4
|
+
columns: GridColumn[];
|
|
5
|
+
data: GridItem[];
|
|
6
|
+
caption?: string;
|
|
7
|
+
selectable?: boolean;
|
|
8
|
+
renderDataItem?: RenderDataItemCallback;
|
|
9
|
+
onSelect?: (ids: string[]) => void;
|
|
10
|
+
}
|
|
11
|
+
export type GridColumn = {
|
|
12
|
+
field: string;
|
|
13
|
+
title?: string;
|
|
14
|
+
component?: ReactElement;
|
|
15
|
+
highlighted?: boolean;
|
|
16
|
+
className?: string;
|
|
17
|
+
};
|
|
18
|
+
export type GridItem = {
|
|
19
|
+
id: string;
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
[key: string]: unknown;
|
|
22
|
+
};
|
|
23
|
+
export type RenderDataItemCallback = (item: GridItem, field: string) => ReactElement;
|
|
24
|
+
export type GridRowValue = {
|
|
25
|
+
field: string;
|
|
26
|
+
value: string | ReactElement;
|
|
27
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IconName } from '../enums';
|
|
2
|
+
import { HTMLAttributes, ReactNode } from 'react';
|
|
3
|
+
type HeaderLevel = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
4
|
+
export interface HeaderProps extends HTMLAttributes<HTMLHeadingElement> {
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
as?: HeaderLevel;
|
|
7
|
+
icon?: IconName;
|
|
8
|
+
}
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface ImageSource {
|
|
2
|
+
src: string;
|
|
3
|
+
descriptor?: string;
|
|
4
|
+
media?: string;
|
|
5
|
+
type?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface ImageProps {
|
|
8
|
+
src: string;
|
|
9
|
+
alt: string;
|
|
10
|
+
sources?: ImageSource[];
|
|
11
|
+
sizes?: string;
|
|
12
|
+
caption?: string;
|
|
13
|
+
width?: number | string;
|
|
14
|
+
height?: number | string;
|
|
15
|
+
aspectRatio?: string;
|
|
16
|
+
loading?: 'lazy' | 'eager';
|
|
17
|
+
decoding?: 'sync' | 'async' | 'auto';
|
|
18
|
+
className?: string;
|
|
19
|
+
decorative?: boolean;
|
|
20
|
+
onError?: (event: React.SyntheticEvent<HTMLImageElement, Event>) => void;
|
|
21
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export type { ChopLogicComponentProps, ChopLogicInputProps, ChopLogicRegExpWithFlags, Dimensions, MultiSelectValue, NumericInputValidator, SelectValue, TextInputValidator, } from './_common';
|
|
2
|
+
export type { AccordionItemProps, AccordionProps } from './accordion';
|
|
3
|
+
export type { AlertProps } from './alert';
|
|
4
|
+
export type { Breadcrumb, BreadcrumbsProps } from './breadcrumbs';
|
|
5
|
+
export type { ButtonProps } from './button';
|
|
6
|
+
export type { CheckboxProps } from './checkbox';
|
|
7
|
+
export type { DialogProps } from './dialog';
|
|
8
|
+
export type { EditableTextProps } from './editable-text';
|
|
9
|
+
export type { FormInputParams, FormProps, FormValidationState, FormValues } from './form';
|
|
10
|
+
export type { GridColumn, GridItem, GridProps, GridRowValue, RenderDataItemCallback } from './grid';
|
|
11
|
+
export type { HeaderProps } from './header';
|
|
12
|
+
export type { ImageProps, ImageSource } from './image';
|
|
13
|
+
export type { LinkProps } from './link';
|
|
14
|
+
export type { LoaderProps } from './loader';
|
|
15
|
+
export type { MenuItem, MenuProps } from './menu';
|
|
16
|
+
export type { MultiSelectProps } from './multi-select';
|
|
17
|
+
export type { NumericInputProps } from './numeric';
|
|
18
|
+
export type { SearchProps } from './search';
|
|
19
|
+
export type { SelectProps } from './select';
|
|
20
|
+
export type { SwitchProps } from './switch';
|
|
21
|
+
export type { ChopLogicTabItem, TabsProps } from './tabs';
|
|
22
|
+
export type { TextInputProps } from './text';
|
|
23
|
+
export type { TooltipProps } from './tooltip';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IconName } from '../enums';
|
|
2
|
+
import { AnchorHTMLAttributes, PropsWithChildren } from 'react';
|
|
3
|
+
export interface LinkProps extends PropsWithChildren, AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
4
|
+
href: string;
|
|
5
|
+
icon?: IconName;
|
|
6
|
+
iconPosition?: 'left' | 'right';
|
|
7
|
+
external?: boolean;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { IconName, OrientationMode } from '../enums';
|
|
2
|
+
import { ChopLogicComponentProps } from './_common';
|
|
3
|
+
export interface MenuProps extends ChopLogicComponentProps {
|
|
4
|
+
items: MenuItem[];
|
|
5
|
+
mode?: OrientationMode;
|
|
6
|
+
openedOn?: 'hover' | 'click';
|
|
7
|
+
}
|
|
8
|
+
export interface MenuItem {
|
|
9
|
+
label: string;
|
|
10
|
+
id: string;
|
|
11
|
+
nestedItems?: MenuItem[];
|
|
12
|
+
icon?: IconName;
|
|
13
|
+
link?: string;
|
|
14
|
+
onClick?: () => void;
|
|
15
|
+
onHover?: () => void;
|
|
16
|
+
onFocus?: () => void;
|
|
17
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ChopLogicInputProps, SelectValue } from './_common';
|
|
2
|
+
export interface MultiSelectProps extends ChopLogicInputProps {
|
|
3
|
+
options: SelectValue[];
|
|
4
|
+
onChange?: (values?: SelectValue[]) => void;
|
|
5
|
+
defaultValue?: string | number | readonly string[];
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ChangeEventHandler, FocusEventHandler } from 'react';
|
|
2
|
+
import { ChopLogicInputProps, NumericInputValidator } from './_common';
|
|
3
|
+
export interface NumericInputProps extends ChopLogicInputProps {
|
|
4
|
+
errorMessage?: string;
|
|
5
|
+
validator?: NumericInputValidator;
|
|
6
|
+
hasSpinButtons?: boolean;
|
|
7
|
+
min?: number;
|
|
8
|
+
max?: number;
|
|
9
|
+
step?: number;
|
|
10
|
+
readOnly?: boolean;
|
|
11
|
+
defaultValue?: number;
|
|
12
|
+
stateless?: boolean;
|
|
13
|
+
value?: number;
|
|
14
|
+
onIncrement?: () => void;
|
|
15
|
+
onDecrement?: () => void;
|
|
16
|
+
onChange?: ChangeEventHandler<HTMLInputElement>;
|
|
17
|
+
onBlur?: FocusEventHandler<HTMLInputElement>;
|
|
18
|
+
onFocus?: FocusEventHandler<HTMLInputElement>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { FocusEventHandler, HTMLInputAutoCompleteAttribute } from 'react';
|
|
2
|
+
import { ChopLogicInputProps } from './_common';
|
|
3
|
+
export interface SearchProps extends ChopLogicInputProps {
|
|
4
|
+
maxLength?: number;
|
|
5
|
+
minLength?: number;
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
autoComplete?: HTMLInputAutoCompleteAttribute;
|
|
8
|
+
clearable?: boolean;
|
|
9
|
+
spellCheck?: boolean;
|
|
10
|
+
searchMode?: 'automatic' | 'manual';
|
|
11
|
+
onSearch?: (searchTerm: string) => void;
|
|
12
|
+
onClear?: () => void;
|
|
13
|
+
onBlur?: FocusEventHandler<HTMLInputElement>;
|
|
14
|
+
onFocus?: FocusEventHandler<HTMLInputElement>;
|
|
15
|
+
debounceDelay?: number;
|
|
16
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ChopLogicInputProps, SelectValue } from './_common';
|
|
2
|
+
export interface SelectProps extends ChopLogicInputProps {
|
|
3
|
+
options: SelectValue[];
|
|
4
|
+
onChange?: (value?: SelectValue) => void;
|
|
5
|
+
placeholder?: string;
|
|
6
|
+
defaultValue?: string | number | readonly string[];
|
|
7
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
export interface SwitchProps {
|
|
3
|
+
checked?: boolean;
|
|
4
|
+
onChange?: (checked: boolean) => void;
|
|
5
|
+
value?: string;
|
|
6
|
+
hasIndicator?: boolean;
|
|
7
|
+
label: string;
|
|
8
|
+
name: string;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
id?: string;
|
|
11
|
+
className?: string;
|
|
12
|
+
style?: CSSProperties;
|
|
13
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { OrientationMode } from '../enums';
|
|
2
|
+
import { ReactElement } from 'react';
|
|
3
|
+
import { ChopLogicComponentProps } from './_common';
|
|
4
|
+
export interface TabsProps extends ChopLogicComponentProps {
|
|
5
|
+
tabs: ChopLogicTabItem[];
|
|
6
|
+
defaultTabId?: string;
|
|
7
|
+
mode?: OrientationMode;
|
|
8
|
+
stretched?: boolean;
|
|
9
|
+
editable?: boolean;
|
|
10
|
+
extendable?: boolean;
|
|
11
|
+
extendedTabLabel?: string;
|
|
12
|
+
extendedTabContent?: ReactElement;
|
|
13
|
+
onTabTitleChange?: (tabId: string, newTitle: string) => void;
|
|
14
|
+
onTabAdd?: () => void;
|
|
15
|
+
onTabSelect?: (id: string) => void;
|
|
16
|
+
onTabDelete?: (id: string) => void;
|
|
17
|
+
}
|
|
18
|
+
export interface ChopLogicTabItem {
|
|
19
|
+
content: ReactElement;
|
|
20
|
+
title: string;
|
|
21
|
+
id: string;
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ChangeEventHandler, FocusEventHandler, HTMLInputAutoCompleteAttribute } from 'react';
|
|
2
|
+
import { ChopLogicInputProps, ChopLogicRegExpWithFlags, TextInputValidator } from './_common';
|
|
3
|
+
export interface TextInputProps extends ChopLogicInputProps {
|
|
4
|
+
errorMessage?: string;
|
|
5
|
+
clearable?: boolean;
|
|
6
|
+
readOnly?: boolean;
|
|
7
|
+
type?: 'text' | 'email' | 'password';
|
|
8
|
+
validator?: ChopLogicRegExpWithFlags | TextInputValidator;
|
|
9
|
+
maxLength?: number;
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
defaultValue?: string;
|
|
12
|
+
autoComplete?: HTMLInputAutoCompleteAttribute;
|
|
13
|
+
onClear?: () => void;
|
|
14
|
+
onChange?: ChangeEventHandler<HTMLInputElement>;
|
|
15
|
+
onBlur?: FocusEventHandler<HTMLInputElement>;
|
|
16
|
+
onFocus?: FocusEventHandler<HTMLInputElement>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { SemanticColor, TooltipContainer } from '../enums';
|
|
2
|
+
import { PropsWithChildren, ReactElement } from 'react';
|
|
3
|
+
import { ChopLogicComponentProps } from './_common';
|
|
4
|
+
export interface TooltipProps extends PropsWithChildren, ChopLogicComponentProps {
|
|
5
|
+
tooltipContent: string | ReactElement;
|
|
6
|
+
containerTag?: TooltipContainer;
|
|
7
|
+
visibleOn?: 'hover' | 'click' | 'focus' | 'contextmenu';
|
|
8
|
+
autoClose?: boolean;
|
|
9
|
+
autoCloseDelay?: number;
|
|
10
|
+
color?: SemanticColor;
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function moveFocusOnElementById(id: string): void;
|
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.1.1",
|
|
8
8
|
"description": "Reusable React components and hooks for the Chop Logic project",
|
|
9
9
|
"type": "module",
|
|
10
10
|
"module": "dist/index.es.js",
|
|
@@ -85,6 +85,7 @@
|
|
|
85
85
|
"typecheck": "tsc --pretty --noEmit",
|
|
86
86
|
"test": "vitest",
|
|
87
87
|
"test:ci": "vitest run --passWithNoTests",
|
|
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",
|
|
88
89
|
"test:mutation": "stryker run",
|
|
89
90
|
"coverage": "vitest run --coverage",
|
|
90
91
|
"release:version": "node scripts/release-version.js"
|
|
@@ -116,31 +117,34 @@
|
|
|
116
117
|
},
|
|
117
118
|
"homepage": "https://choplogic.github.io/chop-logic-components",
|
|
118
119
|
"devDependencies": {
|
|
119
|
-
"@biomejs/biome": "^2.4.
|
|
120
|
-
"@commitlint/cli": "^20.
|
|
121
|
-
"@commitlint/config-conventional": "^20.
|
|
122
|
-
"@storybook/addon-a11y": "^10.
|
|
123
|
-
"@storybook/addon-docs": "^10.
|
|
124
|
-
"@storybook/react-vite": "^10.
|
|
125
|
-
"@
|
|
126
|
-
"@stryker-mutator/
|
|
120
|
+
"@biomejs/biome": "^2.4.13",
|
|
121
|
+
"@commitlint/cli": "^20.5.3",
|
|
122
|
+
"@commitlint/config-conventional": "^20.5.3",
|
|
123
|
+
"@storybook/addon-a11y": "^10.3.6",
|
|
124
|
+
"@storybook/addon-docs": "^10.3.6",
|
|
125
|
+
"@storybook/react-vite": "^10.3.6",
|
|
126
|
+
"@storybook/test-runner": "^0.24.3",
|
|
127
|
+
"@stryker-mutator/core": "^9.6.1",
|
|
128
|
+
"@stryker-mutator/vitest-runner": "^9.6.1",
|
|
127
129
|
"@testing-library/jest-dom": "^6.9.1",
|
|
128
130
|
"@testing-library/react": "^16.3.2",
|
|
129
|
-
"@types/node": "^25.
|
|
131
|
+
"@types/node": "^25.6.0",
|
|
130
132
|
"@types/react": "^19.2.14",
|
|
131
133
|
"@types/react-dom": "^19.2.3",
|
|
132
|
-
"@vitest/coverage-v8": "^4.1.
|
|
134
|
+
"@vitest/coverage-v8": "^4.1.5",
|
|
135
|
+
"http-server": "^14.1.1",
|
|
133
136
|
"husky": "^9.1.7",
|
|
134
137
|
"husky-init": "^8.0.0",
|
|
135
|
-
"jsdom": "^
|
|
136
|
-
"prettier": "^3.8.
|
|
138
|
+
"jsdom": "^29.1.1",
|
|
139
|
+
"prettier": "^3.8.3",
|
|
137
140
|
"remark-gfm": "^4.0.1",
|
|
138
|
-
"
|
|
139
|
-
"
|
|
140
|
-
"
|
|
141
|
-
"vite
|
|
141
|
+
"start-server-and-test": "^3.0.2",
|
|
142
|
+
"storybook": "^10.3.6",
|
|
143
|
+
"typescript": "^6.0.3",
|
|
144
|
+
"vite": "^8.0.10",
|
|
145
|
+
"vite-plugin-dts": "^5.0.0",
|
|
142
146
|
"vite-plugin-lib-inject-css": "^2.2.2",
|
|
143
|
-
"vitest": "^4.1.
|
|
147
|
+
"vitest": "^4.1.5"
|
|
144
148
|
},
|
|
145
149
|
"overrides": {
|
|
146
150
|
"storybook": "$storybook"
|