chop-logic-components 3.7.2 → 4.0.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/README.md +4 -4
- package/dist/components/atoms/button/Button.css +1 -0
- package/dist/components/atoms/button/Button.js +66 -0
- package/dist/components/atoms/button/icon-button/IconButton.css +1 -0
- package/dist/components/atoms/button/icon-button/IconButton.js +15 -0
- package/dist/components/atoms/button/icon-button/index.js +3 -0
- package/dist/components/atoms/button/index.js +3 -0
- package/dist/components/atoms/button/inner-button/InnerButton.css +1 -0
- package/dist/components/atoms/button/inner-button/InnerButton.js +28 -0
- package/dist/components/atoms/button/inner-button/index.js +3 -0
- package/dist/components/atoms/button/primary-button/PrimaryButton.css +1 -0
- package/dist/components/atoms/button/primary-button/PrimaryButton.js +18 -0
- package/dist/components/atoms/button/primary-button/index.js +3 -0
- package/dist/components/atoms/button/secondary-button/SecondaryButton.css +1 -0
- package/dist/components/atoms/button/secondary-button/SecondaryButton.js +18 -0
- package/dist/components/atoms/button/secondary-button/index.js +3 -0
- package/dist/components/atoms/editable-text/EditView.js +37 -0
- package/dist/components/atoms/editable-text/EditableText.css +1 -0
- package/dist/components/atoms/editable-text/EditableText.js +71 -0
- package/dist/components/atoms/editable-text/ReadView.js +25 -0
- package/dist/components/atoms/editable-text/index.js +3 -0
- package/dist/components/atoms/editable-text/useEditModeState.js +17 -0
- package/dist/components/atoms/editable-text/useInputFocus.js +9 -0
- package/dist/components/atoms/editable-text/useValueState.js +21 -0
- package/dist/components/atoms/error-message/ErrorMessage.css +1 -0
- package/dist/components/atoms/error-message/ErrorMessage.js +30 -0
- package/dist/components/atoms/error-message/index.js +3 -0
- package/dist/components/atoms/header/Header.css +1 -0
- package/dist/components/atoms/header/Header.js +22 -0
- package/dist/components/atoms/header/index.js +3 -0
- package/dist/components/atoms/icon/Icon.css +1 -0
- package/dist/components/atoms/icon/Icon.js +31 -0
- package/dist/components/atoms/icon/index.js +3 -0
- package/dist/components/atoms/image/BasicImage.js +27 -0
- package/dist/components/atoms/image/FallBackImage.js +10 -0
- package/dist/components/atoms/image/Image.css +1 -0
- package/dist/components/atoms/image/Image.js +24 -0
- package/dist/components/atoms/image/ResponsivePicture.js +17 -0
- package/dist/components/atoms/image/index.js +3 -0
- package/dist/components/atoms/input/Input.css +1 -0
- package/dist/components/atoms/input/Input.js +10 -0
- package/dist/components/atoms/input/index.js +3 -0
- package/dist/components/atoms/label/Label.css +1 -0
- package/dist/components/atoms/label/Label.js +30 -0
- package/dist/components/atoms/label/index.js +3 -0
- package/dist/components/atoms/link/Link.css +1 -0
- package/dist/components/atoms/link/Link.js +39 -0
- package/dist/components/atoms/link/index.js +3 -0
- package/dist/components/atoms/portal/Portal.js +11 -0
- package/dist/components/atoms/portal/index.js +2 -0
- package/dist/components/atoms/tooltip/Tooltip.controller.js +35 -0
- package/dist/components/atoms/tooltip/Tooltip.css +1 -0
- package/dist/components/atoms/tooltip/Tooltip.js +70 -0
- package/dist/components/atoms/tooltip/index.js +3 -0
- package/dist/components/contexts/form/FormContext.js +5 -0
- package/dist/components/contexts/theme/ThemeContext.js +11 -0
- package/dist/components/contexts/theme/ThemeProvider.js +21 -0
- package/dist/components/hocs/with-figure-caption/Figure.css +1 -0
- package/dist/components/hocs/with-figure-caption/index.js +2 -0
- package/dist/components/hocs/with-figure-caption/with-figure-caption.js +11 -0
- package/dist/components/hocs/with-tooltip/index.js +2 -0
- package/dist/components/hocs/with-tooltip/with-tooltip.js +8 -0
- package/dist/components/molecules/accordion/Accordion.css +1 -0
- package/dist/components/molecules/accordion/Accordion.js +11 -0
- package/dist/components/molecules/accordion/AccordionItem.css +1 -0
- package/dist/components/molecules/accordion/AccordionItem.js +24 -0
- package/dist/components/molecules/accordion/index.js +3 -0
- package/dist/components/molecules/alert/Alert.css +1 -0
- package/dist/components/molecules/alert/Alert.helpers.js +41 -0
- package/dist/components/molecules/alert/Alert.js +59 -0
- package/dist/components/molecules/alert/AlertProgressBar.js +13 -0
- package/dist/components/molecules/alert/index.js +3 -0
- package/dist/components/molecules/breadcrumbs/BreadcrumbItem.js +27 -0
- package/dist/components/molecules/breadcrumbs/BreadcrumbList.js +6 -0
- package/dist/components/molecules/breadcrumbs/Breadcrumbs.css +1 -0
- package/dist/components/molecules/breadcrumbs/Breadcrumbs.js +31 -0
- package/dist/components/molecules/breadcrumbs/index.js +3 -0
- package/dist/components/molecules/checkbox/Checkbox.controller.js +25 -0
- package/dist/components/molecules/checkbox/Checkbox.css +1 -0
- package/dist/components/molecules/checkbox/Checkbox.helpers.js +10 -0
- package/dist/components/molecules/checkbox/Checkbox.js +7 -0
- package/dist/components/molecules/checkbox/CheckboxStateful.js +61 -0
- package/dist/components/molecules/checkbox/CheckboxStateless.js +59 -0
- package/dist/components/molecules/checkbox/index.js +3 -0
- package/dist/components/molecules/multi-select/MultiSelect.Combobox.js +47 -0
- package/dist/components/molecules/multi-select/MultiSelect.Dropdown.js +31 -0
- package/dist/components/molecules/multi-select/MultiSelect.controller.js +37 -0
- package/dist/components/molecules/multi-select/MultiSelect.helpers.js +22 -0
- package/dist/components/molecules/multi-select/MultiSelect.js +61 -0
- package/dist/components/molecules/multi-select/MultiSelectComboboxSelectedValues.js +8 -0
- package/dist/components/molecules/multi-select/Option.js +40 -0
- package/dist/components/molecules/multi-select/index.js +2 -0
- package/dist/components/molecules/numeric-input/NumericInput.controller.js +45 -0
- package/dist/components/molecules/numeric-input/NumericInput.css +1 -0
- package/dist/components/molecules/numeric-input/NumericInput.helpers.js +20 -0
- package/dist/components/molecules/numeric-input/NumericInput.js +7 -0
- package/dist/components/molecules/numeric-input/NumericInputStateful.js +108 -0
- package/dist/components/molecules/numeric-input/NumericInputStateless.js +96 -0
- package/dist/components/molecules/numeric-input/index.js +3 -0
- package/dist/components/molecules/search/Search.controller.js +42 -0
- package/dist/components/molecules/search/Search.css +1 -0
- package/dist/components/molecules/search/Search.js +112 -0
- package/dist/components/molecules/search/index.js +3 -0
- package/dist/components/molecules/select/Select.controller.js +32 -0
- package/dist/components/molecules/select/Select.css +1 -0
- package/dist/components/molecules/select/Select.helpers.js +16 -0
- package/dist/components/molecules/select/Select.js +64 -0
- package/dist/components/molecules/select/combobox/Combobox.css +1 -0
- package/dist/components/molecules/select/combobox/Combobox.js +46 -0
- package/dist/components/molecules/select/combobox/index.js +3 -0
- package/dist/components/molecules/select/dropdown/Dropdown.css +1 -0
- package/dist/components/molecules/select/dropdown/Dropdown.js +46 -0
- package/dist/components/molecules/select/dropdown/index.js +3 -0
- package/dist/components/molecules/select/index.js +3 -0
- package/dist/components/molecules/select/option/Option.css +1 -0
- package/dist/components/molecules/select/option/Option.js +38 -0
- package/dist/components/molecules/select/option/index.js +3 -0
- package/dist/components/molecules/switch/Switch.controller.js +33 -0
- package/dist/components/molecules/switch/Switch.css +1 -0
- package/dist/components/molecules/switch/Switch.helpers.js +10 -0
- package/dist/components/molecules/switch/Switch.js +68 -0
- package/dist/components/molecules/switch/index.js +3 -0
- package/dist/components/molecules/text-input/TextInput.controller.js +36 -0
- package/dist/components/molecules/text-input/TextInput.css +1 -0
- package/dist/components/molecules/text-input/TextInput.helpers.js +18 -0
- package/dist/components/molecules/text-input/TextInput.js +7 -0
- package/dist/components/molecules/text-input/TextInputButtons.js +37 -0
- package/dist/components/molecules/text-input/TextInputStateful.js +92 -0
- package/dist/components/molecules/text-input/TextInputStateless.js +89 -0
- package/dist/components/molecules/text-input/index.js +3 -0
- package/dist/components/organisms/dialog/Dialog.css +1 -0
- package/dist/components/organisms/dialog/Dialog.js +32 -0
- package/dist/components/organisms/dialog/index.js +3 -0
- package/dist/components/organisms/form/Form.controller.js +29 -0
- package/dist/components/organisms/form/Form.css +1 -0
- package/dist/components/organisms/form/Form.helpers.js +14 -0
- package/dist/components/organisms/form/Form.js +48 -0
- package/dist/components/organisms/form/index.js +3 -0
- package/dist/components/organisms/grid/Grid.controller.js +34 -0
- package/dist/components/organisms/grid/Grid.css +1 -0
- package/dist/components/organisms/grid/Grid.helpers.js +15 -0
- package/dist/components/organisms/grid/Grid.js +60 -0
- package/dist/components/organisms/grid/body/GridBody.css +1 -0
- package/dist/components/organisms/grid/body/GridBody.js +31 -0
- package/dist/components/organisms/grid/checkbox/GridCheckbox.css +1 -0
- package/dist/components/organisms/grid/checkbox/GridCheckbox.js +52 -0
- package/dist/components/organisms/grid/column-group/GridColumnGroup.css +1 -0
- package/dist/components/organisms/grid/column-group/GridColumnGroup.js +26 -0
- package/dist/components/organisms/grid/data-cell/GridDataCell.js +5 -0
- package/dist/components/organisms/grid/grid-row/GridRow.css +1 -0
- package/dist/components/organisms/grid/grid-row/GridRow.js +35 -0
- package/dist/components/organisms/grid/grid-row/index.js +3 -0
- package/dist/components/organisms/grid/head/GridHead.css +1 -0
- package/dist/components/organisms/grid/head/GridHead.js +35 -0
- package/dist/components/organisms/grid/header-cell/HeaderCell.js +8 -0
- package/dist/components/organisms/grid/header-cell/index.js +2 -0
- package/dist/components/organisms/grid/index.js +3 -0
- package/dist/components/organisms/grid/select-all-grid-rows-cell/SelectAllGridRowsCell.js +24 -0
- package/dist/components/organisms/grid/select-all-grid-rows-cell/index.js +2 -0
- package/dist/components/organisms/grid/select-grid-row-cell/SelectGridRowCell.js +24 -0
- package/dist/components/organisms/grid/select-grid-row-cell/index.js +2 -0
- package/dist/components/organisms/menu/Menu.css +1 -0
- package/dist/components/organisms/menu/Menu.js +22 -0
- package/dist/components/organisms/menu/index.js +3 -0
- package/dist/components/organisms/menu/leaf/MenuLeaf.css +1 -0
- package/dist/components/organisms/menu/leaf/MenuLeaf.js +28 -0
- package/dist/components/organisms/menu/list-item/MenuListItem.css +1 -0
- package/dist/components/organisms/menu/list-item/MenuListItem.js +35 -0
- package/dist/components/organisms/menu/sub-menu/SubMenu.css +1 -0
- package/dist/components/organisms/menu/sub-menu/SubMenu.js +67 -0
- package/dist/components/organisms/menu/sub-menu/index.js +3 -0
- package/dist/components/organisms/tabs/Tabs.css +1 -0
- package/dist/components/organisms/tabs/Tabs.js +80 -0
- package/dist/components/organisms/tabs/button/TabButton.css +1 -0
- package/dist/components/organisms/tabs/button/TabButton.js +111 -0
- package/dist/components/organisms/tabs/content/TabContent.css +1 -0
- package/dist/components/organisms/tabs/content/TabContent.js +19 -0
- package/dist/components/organisms/tabs/edit-input/TabEditInput.css +1 -0
- package/dist/components/organisms/tabs/edit-input/TabEditInput.js +64 -0
- package/dist/components/organisms/tabs/index.js +3 -0
- package/dist/components/organisms/tabs/list/TabList.css +1 -0
- package/dist/components/organisms/tabs/list/TabList.js +67 -0
- package/dist/enums/alert-mode.js +4 -0
- package/dist/enums/button-view.js +4 -0
- package/dist/enums/element-size.js +4 -0
- package/dist/enums/icon-name.js +4 -0
- package/dist/enums/index.js +8 -0
- package/dist/enums/loader-view.js +4 -0
- package/dist/enums/orientation-mode.js +4 -0
- package/dist/enums/semantic-color.js +4 -0
- package/dist/enums/tooltip-container.js +4 -0
- package/dist/hooks/index.js +15 -0
- package/dist/hooks/use-auto-close/index.js +2 -0
- package/dist/hooks/use-auto-close/use-auto-close.js +18 -0
- package/dist/hooks/use-click-outside/index.js +2 -0
- package/dist/hooks/use-click-outside/use-click-outside.js +19 -0
- package/dist/hooks/use-container-dimensions/index.js +2 -0
- package/dist/hooks/use-container-dimensions/use-container-dimensions.js +16 -0
- package/dist/hooks/use-debounce/index.js +2 -0
- package/dist/hooks/use-debounce/use-debounce.js +15 -0
- package/dist/hooks/use-element-ids/index.js +2 -0
- package/dist/hooks/use-element-ids/use-element-ids.js +12 -0
- package/dist/hooks/use-is-hovered/index.js +2 -0
- package/dist/hooks/use-is-hovered/use-is-hovered.js +15 -0
- package/dist/hooks/use-is-mounted/index.js +2 -0
- package/dist/hooks/use-is-mounted/use-is-mounted.js +15 -0
- package/dist/hooks/use-is-overflow/index.js +2 -0
- package/dist/hooks/use-is-overflow/use-is-overflow.js +27 -0
- package/dist/hooks/use-key-press/index.js +2 -0
- package/dist/hooks/use-key-press/use-key-press.js +14 -0
- package/dist/hooks/use-modal-focus-trap/index.js +2 -0
- package/dist/hooks/use-modal-focus-trap/use-modal-focus-trap.js +20 -0
- package/dist/hooks/use-remaining-timer/index.js +2 -0
- package/dist/hooks/use-remaining-timer/use-remaining-timer.js +38 -0
- package/dist/hooks/use-reset-form-input/index.js +2 -0
- package/dist/hooks/use-reset-form-input/use-reset-form-input.js +11 -0
- package/dist/hooks/use-theme/index.js +2 -0
- package/dist/hooks/use-theme/use-theme.js +6 -0
- package/dist/hooks/use-tooltip-position/index.js +2 -0
- package/dist/hooks/use-tooltip-position/use-tooltip-position.js +31 -0
- package/dist/hooks/use-window-dimensions/index.js +2 -0
- package/dist/hooks/use-window-dimensions/use-window-dimensions.js +17 -0
- package/dist/index.d.ts +329 -71
- package/dist/index.es.js +109 -4667
- package/dist/styles/icons.css +1 -0
- package/dist/styles/main.css +1 -0
- package/dist/utils/get-class-name.js +16 -0
- package/dist/utils/handle-dropdown-list-key-press.js +32 -0
- package/dist/utils/index.js +3 -0
- package/dist/utils/move-focus-on-element-by-id.js +7 -0
- package/package.json +80 -23
- package/dist/favicon.ico +0 -0
- package/dist/index.cjs.js +0 -7
- package/dist/index.cjs.js.map +0 -1
- package/dist/index.css +0 -1
- package/dist/index.es.js.map +0 -1
- package/dist/logo.jpeg +0 -0
- package/dist/logo.png +0 -0
package/README.md
CHANGED
|
@@ -47,12 +47,12 @@ yarn add chop-logic-components
|
|
|
47
47
|
| `build` | Builds the TypeScript types and compiles the library using Vite. |
|
|
48
48
|
| `build:storybook` | Builds a static version of Storybook into the `storybook-static` directory. |
|
|
49
49
|
| `prepare` | Runs the production build and sets up Husky git hooks. |
|
|
50
|
-
| `format` | Formats all files using both Biome (for JS/TS) and Prettier (for
|
|
51
|
-
| `format:biome` | Formats JS, TS, JSON, and
|
|
52
|
-
| `format:prettier` | Formats
|
|
50
|
+
| `format` | Formats all files using both Biome (for JS/TS) and Prettier (for MD/MDX). |
|
|
51
|
+
| `format:biome` | Formats JS, TS, JSON, and CSS files using Biome. |
|
|
52
|
+
| `format:prettier` | Formats MD and MDX files using Prettier. |
|
|
53
53
|
| `lint` | Runs both Biome and Prettier linters to check code style and quality. |
|
|
54
54
|
| `lint:biome` | Runs Biome linter on JS/TS files. |
|
|
55
|
-
| `lint:prettier` | Checks formatting of
|
|
55
|
+
| `lint:prettier` | Checks formatting of MD and MDX files using Prettier. |
|
|
56
56
|
| `lint:errors` | Shows only error-level diagnostics from Biome (limited to 100 issues). |
|
|
57
57
|
| `lint:warnings` | Shows only warning-level diagnostics from Biome (limited to 100 issues). |
|
|
58
58
|
| `lint:fix` | Automatically fixes Biome issues where possible. |
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.cl-button{font-size:var(--cl-typography-base-mobile);padding:var(--cl-m-gap);display:flex;align-items:center;justify-content:center;width:fit-content}.cl-button:focus-visible{outline:var(--cl-outline-border);outline-offset:var(--cl-s-gap)}.cl-button[disabled]{pointer-events:none;opacity:.5}.cl-button_extended{width:100%}@media(min-width:640px){.cl-button{font-size:var(--cl-typography-base-tablet);padding:var(--cl-m-gap) var(--cl-l-gap)}}@media(min-width:1024px){.cl-button{font-size:var(--cl-typography-base-desktop)}}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { getClassName as i } from "../../../utils/get-class-name.js";
|
|
3
|
+
import { withTooltip as l } from "../../hocs/with-tooltip/with-tooltip.js";
|
|
4
|
+
import './Button.css';/* empty css */
|
|
5
|
+
import { IconButton as c } from "./icon-button/IconButton.js";
|
|
6
|
+
import { InnerButton as d } from "./inner-button/InnerButton.js";
|
|
7
|
+
import { PrimaryButton as B } from "./primary-button/PrimaryButton.js";
|
|
8
|
+
import { SecondaryButton as y } from "./secondary-button/SecondaryButton.js";
|
|
9
|
+
import { ButtonView as t } from "../../../enums/button-view.js";
|
|
10
|
+
const I = ({
|
|
11
|
+
text: u,
|
|
12
|
+
icon: r,
|
|
13
|
+
tooltip: w,
|
|
14
|
+
extended: s = !1,
|
|
15
|
+
view: f = t.Primary,
|
|
16
|
+
label: o,
|
|
17
|
+
className: a,
|
|
18
|
+
iconSize: n,
|
|
19
|
+
...m
|
|
20
|
+
}) => {
|
|
21
|
+
const p = i([a, "cl-button", { "cl-button_extended": s }]);
|
|
22
|
+
switch (f) {
|
|
23
|
+
case t.Primary:
|
|
24
|
+
return /* @__PURE__ */ e(
|
|
25
|
+
B,
|
|
26
|
+
{
|
|
27
|
+
className: p,
|
|
28
|
+
icon: r,
|
|
29
|
+
text: u,
|
|
30
|
+
"aria-label": o,
|
|
31
|
+
iconSize: n,
|
|
32
|
+
...m
|
|
33
|
+
}
|
|
34
|
+
);
|
|
35
|
+
case t.Secondary:
|
|
36
|
+
return /* @__PURE__ */ e(
|
|
37
|
+
y,
|
|
38
|
+
{
|
|
39
|
+
className: p,
|
|
40
|
+
icon: r,
|
|
41
|
+
text: u,
|
|
42
|
+
"aria-label": o,
|
|
43
|
+
iconSize: n,
|
|
44
|
+
...m
|
|
45
|
+
}
|
|
46
|
+
);
|
|
47
|
+
case t.Icon:
|
|
48
|
+
return /* @__PURE__ */ e(c, { label: o, icon: r, iconSize: n, ...m, className: a });
|
|
49
|
+
case t.Inner:
|
|
50
|
+
return /* @__PURE__ */ e(
|
|
51
|
+
d,
|
|
52
|
+
{
|
|
53
|
+
label: o,
|
|
54
|
+
icon: r,
|
|
55
|
+
iconSize: n,
|
|
56
|
+
...m,
|
|
57
|
+
className: a
|
|
58
|
+
}
|
|
59
|
+
);
|
|
60
|
+
default:
|
|
61
|
+
return null;
|
|
62
|
+
}
|
|
63
|
+
}, V = l(I);
|
|
64
|
+
export {
|
|
65
|
+
V as default
|
|
66
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.cl-icon-button{border:none;cursor:pointer;padding:var(--cl-m-gap);border-radius:50%;background:transparent;width:fit-content;transition:all .15s ease}.cl-icon-button__icon:before{color:var(--cl-base-font-color)}.cl-icon-button:hover{transform:scale(1.1);filter:drop-shadow(0 2px 4px hsla(0,0%,0%,.15))}.cl-icon-button:hover .cl-icon-button__icon:before{color:var(--cl-accent-a0)}.cl-icon-button:active{transform:scale(.95)}.cl-icon-button[disabled]{pointer-events:none;opacity:.5}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { getClassName as r } from "../../../../utils/get-class-name.js";
|
|
3
|
+
import './IconButton.css';/* empty css */
|
|
4
|
+
import a from "../../icon/Icon.js";
|
|
5
|
+
import { ElementSize as c } from "../../../../enums/element-size.js";
|
|
6
|
+
const f = ({
|
|
7
|
+
icon: o,
|
|
8
|
+
className: m,
|
|
9
|
+
label: e,
|
|
10
|
+
iconSize: i = c.Medium,
|
|
11
|
+
...n
|
|
12
|
+
}) => /* @__PURE__ */ t("button", { ...n, "aria-label": e, className: r(["cl-icon-button", m]), children: o && /* @__PURE__ */ t(a, { name: o, className: "cl-icon-button__icon", size: i }) });
|
|
13
|
+
export {
|
|
14
|
+
f as IconButton
|
|
15
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.cl-inner-button{background:transparent;border:none;padding:0;cursor:pointer;height:var(--cl-icon-size);width:var(--cl-icon-size);transition:all .15s ease}.cl-inner-button:focus-visible{outline:var(--cl-outline-border);outline-offset:-1px}.cl-inner-button:hover{transform:scale(1.15);filter:var(--cl-drop-shadow)}.cl-inner-button:hover .cl-inner-button__icon:before{color:var(--cl-accent-a10)}.cl-inner-button:active{transform:scale(.95)}.cl-inner-button[disabled]{pointer-events:none;opacity:.5}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { getClassName as l } from "../../../../utils/get-class-name.js";
|
|
3
|
+
import './InnerButton.css';/* empty css */
|
|
4
|
+
import s from "../../icon/Icon.js";
|
|
5
|
+
import { ElementSize as c } from "../../../../enums/element-size.js";
|
|
6
|
+
const x = ({
|
|
7
|
+
onClick: n,
|
|
8
|
+
label: o,
|
|
9
|
+
icon: e,
|
|
10
|
+
disabled: r,
|
|
11
|
+
className: m,
|
|
12
|
+
iconSize: i = c.Small,
|
|
13
|
+
...a
|
|
14
|
+
}) => /* @__PURE__ */ t(
|
|
15
|
+
"button",
|
|
16
|
+
{
|
|
17
|
+
className: l(["cl-inner-button", m]),
|
|
18
|
+
onClick: n,
|
|
19
|
+
"aria-label": o,
|
|
20
|
+
type: "button",
|
|
21
|
+
disabled: r,
|
|
22
|
+
...a,
|
|
23
|
+
children: /* @__PURE__ */ t(s, { name: e, size: i, className: "cl-inner-button__icon" })
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
export {
|
|
27
|
+
x as InnerButton
|
|
28
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.cl-primary-button{border:none;cursor:pointer;border-radius:var(--cl-border-radius);background:var(--cl-accent-gradient);box-shadow:var(--cl-box-shadow);gap:var(--cl-s-gap);transition:all .15s ease}.cl-primary-button:hover{filter:brightness(1.1);box-shadow:var(--cl-box-shadow-extended)}.cl-primary-button:active{transform:scale(.98);box-shadow:var(--cl-box-shadow)}.cl-primary-button__text{font-family:var(--cl-core-font);font-size:inherit;color:var(--cl-base-background-color);font-weight:400;line-height:1.5;letter-spacing:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.cl-primary-button__icon:before{color:var(--cl-base-background-color)}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsxs as s, jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import { getClassName as i } from "../../../../utils/get-class-name.js";
|
|
3
|
+
import './PrimaryButton.css';/* empty css */
|
|
4
|
+
import l from "../../icon/Icon.js";
|
|
5
|
+
import { ElementSize as n } from "../../../../enums/element-size.js";
|
|
6
|
+
const x = ({
|
|
7
|
+
icon: t,
|
|
8
|
+
text: r,
|
|
9
|
+
className: o,
|
|
10
|
+
iconSize: a = n.Small,
|
|
11
|
+
...e
|
|
12
|
+
}) => /* @__PURE__ */ s("button", { ...e, className: i(["cl-primary-button", o]), children: [
|
|
13
|
+
t && /* @__PURE__ */ m(l, { name: t, className: "cl-primary-button__icon", size: a }),
|
|
14
|
+
/* @__PURE__ */ m("span", { className: "cl-primary-button__text", children: r })
|
|
15
|
+
] });
|
|
16
|
+
export {
|
|
17
|
+
x as PrimaryButton
|
|
18
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.cl-secondary-button{background:var(--cl-surface-a10);cursor:pointer;border-radius:var(--cl-border-radius);border:none;gap:var(--cl-s-gap);transition:all .15s ease;box-shadow:var(--cl-box-shadow)}.cl-secondary-button:hover{box-shadow:var(--cl-box-shadow-extended)}.cl-secondary-button:active{transform:scale(.98);box-shadow:var(--cl-box-shadow)}.cl-secondary-button__text{font-family:var(--cl-core-font);font-size:inherit;color:var(--cl-base-font-color);font-weight:400;line-height:1.5;letter-spacing:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.cl-secondary-button__icon:before{color:var(--cl-base-font-color);margin-right:var(--cl-s-gap)}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsxs as r, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { getClassName as a } from "../../../../utils/get-class-name.js";
|
|
3
|
+
import './SecondaryButton.css';/* empty css */
|
|
4
|
+
import c from "../../icon/Icon.js";
|
|
5
|
+
import { ElementSize as l } from "../../../../enums/element-size.js";
|
|
6
|
+
const f = ({
|
|
7
|
+
icon: o,
|
|
8
|
+
text: e,
|
|
9
|
+
className: s,
|
|
10
|
+
iconSize: m = l.Small,
|
|
11
|
+
...n
|
|
12
|
+
}) => /* @__PURE__ */ r("button", { ...n, className: a(["cl-secondary-button", s]), children: [
|
|
13
|
+
o && /* @__PURE__ */ t(c, { name: o, className: "cl-secondary-button__icon", size: m }),
|
|
14
|
+
/* @__PURE__ */ t("span", { className: "cl-secondary-button__text", children: e })
|
|
15
|
+
] });
|
|
16
|
+
export {
|
|
17
|
+
f as SecondaryButton
|
|
18
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { jsx as d } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback as f } from "react";
|
|
3
|
+
const g = ({
|
|
4
|
+
multiline: t,
|
|
5
|
+
value: e,
|
|
6
|
+
placeholder: r,
|
|
7
|
+
onChange: o,
|
|
8
|
+
onBlur: n,
|
|
9
|
+
onKeyDown: a,
|
|
10
|
+
className: p,
|
|
11
|
+
inputRef: s,
|
|
12
|
+
...c
|
|
13
|
+
}) => {
|
|
14
|
+
const i = t ? "textarea" : "input", m = f(
|
|
15
|
+
(u) => {
|
|
16
|
+
o(u.target.value);
|
|
17
|
+
},
|
|
18
|
+
[o]
|
|
19
|
+
);
|
|
20
|
+
return /* @__PURE__ */ d(
|
|
21
|
+
i,
|
|
22
|
+
{
|
|
23
|
+
ref: s,
|
|
24
|
+
value: e,
|
|
25
|
+
onChange: m,
|
|
26
|
+
onBlur: n,
|
|
27
|
+
onKeyDown: a,
|
|
28
|
+
placeholder: r,
|
|
29
|
+
className: p,
|
|
30
|
+
rows: t ? 3 : void 0,
|
|
31
|
+
...c
|
|
32
|
+
}
|
|
33
|
+
);
|
|
34
|
+
};
|
|
35
|
+
export {
|
|
36
|
+
g as EditView
|
|
37
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.cl-editable-text{color:var(--cl-base-font-color);border-radius:var(--cl-border-radius);display:inline-block;font-family:var(--cl-core-font);font-size:var(--cl-typography-base-mobile);font-weight:400;line-height:1.5;letter-spacing:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.cl-editable-text:hover,.cl-editable-text:focus{outline:var(--cl-accent-border);outline-offset:var(--cl-xs-gap)}.cl-editable-text_edit-mode{border:none;background:transparent;outline:var(--cl-accent-border);outline-offset:var(--cl-xs-gap);min-width:var(--cl-l-gap)}.cl-editable-text_read-only:hover,.cl-editable-text_read-only:focus{outline:none}.cl-editable-text_empty{min-width:var(--cl-l-gap);min-height:24px;outline:var(--cl-accent-border);outline-offset:var(--cl-xs-gap)}@media(min-width:640px){.cl-editable-text{font-size:var(--cl-typography-base-tablet)}}@media(min-width:1024px){.cl-editable-text{font-size:var(--cl-typography-base-desktop)}}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { jsx as E } from "react/jsx-runtime";
|
|
2
|
+
import { getClassName as D } from "../../../utils/get-class-name.js";
|
|
3
|
+
import { useRef as N, useCallback as r } from "react";
|
|
4
|
+
import './EditableText.css';/* empty css */
|
|
5
|
+
import { EditView as R } from "./EditView.js";
|
|
6
|
+
import { ReadView as _ } from "./ReadView.js";
|
|
7
|
+
import { useEditModeState as g } from "./useEditModeState.js";
|
|
8
|
+
import { useInputFocus as B } from "./useInputFocus.js";
|
|
9
|
+
import { useValueState as K } from "./useValueState.js";
|
|
10
|
+
const G = ({
|
|
11
|
+
value: V,
|
|
12
|
+
isEditMode: b,
|
|
13
|
+
onChange: C,
|
|
14
|
+
onClick: n,
|
|
15
|
+
className: k,
|
|
16
|
+
autoSelectTextOnEditMode: M = !1,
|
|
17
|
+
multiline: a = !1,
|
|
18
|
+
placeholder: d = "Click to edit...",
|
|
19
|
+
readOnly: t = !1,
|
|
20
|
+
...m
|
|
21
|
+
}) => {
|
|
22
|
+
const u = N(null), { editMode: i, enterEditMode: c, exitEditMode: o } = g(b, t), { internalValue: l, updateValue: w, commitValue: f, resetValue: p } = K(V, C);
|
|
23
|
+
B(u, i, M, t);
|
|
24
|
+
const h = r(
|
|
25
|
+
(e) => {
|
|
26
|
+
n?.(e), c();
|
|
27
|
+
},
|
|
28
|
+
[n, c]
|
|
29
|
+
), s = r(() => {
|
|
30
|
+
o(), f();
|
|
31
|
+
}, [o, f]), y = r(
|
|
32
|
+
(e) => {
|
|
33
|
+
e.key === "Enter" && !a && (e.preventDefault(), s()), e.key === "Escape" && (p(), o());
|
|
34
|
+
},
|
|
35
|
+
[a, s, p, o]
|
|
36
|
+
), x = D([
|
|
37
|
+
"cl-editable-text",
|
|
38
|
+
k,
|
|
39
|
+
{
|
|
40
|
+
"cl-editable-text_edit-mode": i,
|
|
41
|
+
"cl-editable-text_read-only": t,
|
|
42
|
+
"cl-editable-text_empty": !l
|
|
43
|
+
}
|
|
44
|
+
]);
|
|
45
|
+
return i && !t ? /* @__PURE__ */ E(
|
|
46
|
+
R,
|
|
47
|
+
{
|
|
48
|
+
multiline: a,
|
|
49
|
+
value: l,
|
|
50
|
+
placeholder: d,
|
|
51
|
+
onChange: w,
|
|
52
|
+
onBlur: s,
|
|
53
|
+
onKeyDown: y,
|
|
54
|
+
className: x,
|
|
55
|
+
inputRef: u,
|
|
56
|
+
...m
|
|
57
|
+
}
|
|
58
|
+
) : /* @__PURE__ */ E(
|
|
59
|
+
_,
|
|
60
|
+
{
|
|
61
|
+
value: l,
|
|
62
|
+
placeholder: d,
|
|
63
|
+
onClick: h,
|
|
64
|
+
className: x,
|
|
65
|
+
...m
|
|
66
|
+
}
|
|
67
|
+
);
|
|
68
|
+
};
|
|
69
|
+
export {
|
|
70
|
+
G as default
|
|
71
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
+
const y = ({
|
|
3
|
+
value: t,
|
|
4
|
+
placeholder: a,
|
|
5
|
+
onClick: n,
|
|
6
|
+
className: o,
|
|
7
|
+
...r
|
|
8
|
+
}) => /* @__PURE__ */ l(
|
|
9
|
+
"span",
|
|
10
|
+
{
|
|
11
|
+
onClick: n,
|
|
12
|
+
className: o,
|
|
13
|
+
role: "button",
|
|
14
|
+
tabIndex: 0,
|
|
15
|
+
onKeyDown: (e) => {
|
|
16
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), n(e));
|
|
17
|
+
},
|
|
18
|
+
"aria-label": "Editable text",
|
|
19
|
+
...r,
|
|
20
|
+
children: t || a
|
|
21
|
+
}
|
|
22
|
+
);
|
|
23
|
+
export {
|
|
24
|
+
y as ReadView
|
|
25
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { useState as d } from "react";
|
|
2
|
+
const c = (e, i) => {
|
|
3
|
+
const [s, o] = d(!1), [t] = d(e !== void 0);
|
|
4
|
+
return {
|
|
5
|
+
editMode: t ? !!e : s,
|
|
6
|
+
enterEditMode: () => {
|
|
7
|
+
!t && !i && o(!0);
|
|
8
|
+
},
|
|
9
|
+
exitEditMode: () => {
|
|
10
|
+
t || o(!1);
|
|
11
|
+
},
|
|
12
|
+
isControlled: t
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export {
|
|
16
|
+
c as useEditModeState
|
|
17
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { useState as n, useEffect as o } from "react";
|
|
2
|
+
const m = (e, s) => {
|
|
3
|
+
const [t, a] = n(e);
|
|
4
|
+
return o(() => {
|
|
5
|
+
a(e);
|
|
6
|
+
}, [e]), {
|
|
7
|
+
internalValue: t,
|
|
8
|
+
updateValue: (u) => {
|
|
9
|
+
a(u);
|
|
10
|
+
},
|
|
11
|
+
commitValue: () => {
|
|
12
|
+
t !== e && s?.(t);
|
|
13
|
+
},
|
|
14
|
+
resetValue: () => {
|
|
15
|
+
a(e);
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export {
|
|
20
|
+
m as useValueState
|
|
21
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.cl-error-message{display:none;max-width:100%;z-index:var(--cl-z-index-popup);background-color:var(--cl-surface-a10);color:var(--cl-base-font-color);padding:var(--cl-s-gap) var(--cl-m-gap);border-radius:var(--cl-border-radius);border:var(--cl-danger-border);box-shadow:var(--cl-box-shadow);pointer-events:none;animation:cl-fade-in ease .4s;font-family:var(--cl-core-font);font-size:var(--cl-typography-small-mobile);font-weight:400;line-height:1.5;letter-spacing:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media(min-width:640px){.cl-error-message{font-size:var(--cl-typography-small-tablet)}}@media(min-width:1024px){.cl-error-message{font-size:var(--cl-typography-small-desktop)}}.cl-error-message_visible{display:block}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { getClassName as l } from "../../../utils/get-class-name.js";
|
|
3
|
+
import './ErrorMessage.css';/* empty css */
|
|
4
|
+
const n = ({
|
|
5
|
+
errorId: e,
|
|
6
|
+
testId: s,
|
|
7
|
+
message: a = "Error!",
|
|
8
|
+
visible: r = !1,
|
|
9
|
+
className: o
|
|
10
|
+
}) => {
|
|
11
|
+
const t = l([
|
|
12
|
+
"cl-error-message",
|
|
13
|
+
o,
|
|
14
|
+
{ "cl-error-message_visible": r }
|
|
15
|
+
]);
|
|
16
|
+
return /* @__PURE__ */ i(
|
|
17
|
+
"span",
|
|
18
|
+
{
|
|
19
|
+
id: e,
|
|
20
|
+
className: t,
|
|
21
|
+
"data-testid": s,
|
|
22
|
+
"aria-hidden": !r,
|
|
23
|
+
"aria-live": "polite",
|
|
24
|
+
children: a
|
|
25
|
+
}
|
|
26
|
+
);
|
|
27
|
+
};
|
|
28
|
+
export {
|
|
29
|
+
n as default
|
|
30
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.cl-header{margin:0;color:var(--cl-base-font-color)}.cl-header:before{padding-right:var(--cl-m-gap)}.cl-header__h1{border-bottom:var(--cl-light-border);font-family:var(--cl-fancy-font);font-weight:700;line-height:1.5;letter-spacing:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:var(--cl-typography-h1-mobile)}@media(min-width:640px){.cl-header__h1{font-size:var(--cl-typography-h1-tablet)}}@media(min-width:1024px){.cl-header__h1{font-size:var(--cl-typography-h1-desktop)}}.cl-header__h2{border-bottom:var(--cl-light-border);font-family:var(--cl-fancy-font);font-weight:700;line-height:1.5;letter-spacing:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:var(--cl-typography-h2-mobile)}@media(min-width:640px){.cl-header__h2{font-size:var(--cl-typography-h2-tablet)}}@media(min-width:1024px){.cl-header__h2{font-size:var(--cl-typography-h2-desktop)}}.cl-header__h3{border-bottom:var(--cl-light-border);font-family:var(--cl-fancy-font);font-weight:700;line-height:1.5;letter-spacing:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:var(--cl-typography-h3-mobile)}@media(min-width:640px){.cl-header__h3{font-size:var(--cl-typography-h3-tablet)}}@media(min-width:1024px){.cl-header__h3{font-size:var(--cl-typography-h3-desktop)}}.cl-header__h4{font-family:var(--cl-fancy-font);font-weight:700;line-height:1.5;letter-spacing:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:var(--cl-typography-h4-mobile)}@media(min-width:640px){.cl-header__h4{font-size:var(--cl-typography-h4-tablet)}}@media(min-width:1024px){.cl-header__h4{font-size:var(--cl-typography-h4-desktop)}}.cl-header__h5{font-family:var(--cl-fancy-font);font-weight:700;line-height:1.5;letter-spacing:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:var(--cl-typography-h5-mobile)}@media(min-width:640px){.cl-header__h5{font-size:var(--cl-typography-h5-tablet)}}@media(min-width:1024px){.cl-header__h5{font-size:var(--cl-typography-h5-desktop)}}.cl-header__h6{font-family:var(--cl-fancy-font);font-weight:700;line-height:1.5;letter-spacing:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:var(--cl-typography-h6-mobile)}@media(min-width:640px){.cl-header__h6{font-size:var(--cl-typography-h6-tablet)}}@media(min-width:1024px){.cl-header__h6{font-size:var(--cl-typography-h6-desktop)}}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { getClassName as t } from "../../../utils/get-class-name.js";
|
|
3
|
+
import './Header.css';/* empty css */
|
|
4
|
+
const n = ({ as: e = "h1", icon: h, children: r, className: a, ..._ }) => {
|
|
5
|
+
const c = e, d = t([
|
|
6
|
+
a,
|
|
7
|
+
"cl-header",
|
|
8
|
+
h,
|
|
9
|
+
{
|
|
10
|
+
"cl-header__h1": e === "h1",
|
|
11
|
+
"cl-header__h2": e === "h2",
|
|
12
|
+
"cl-header__h3": e === "h3",
|
|
13
|
+
"cl-header__h4": e === "h4",
|
|
14
|
+
"cl-header__h5": e === "h5",
|
|
15
|
+
"cl-header__h6": e === "h6"
|
|
16
|
+
}
|
|
17
|
+
]);
|
|
18
|
+
return /* @__PURE__ */ l(c, { className: d, ..._, children: r });
|
|
19
|
+
};
|
|
20
|
+
export {
|
|
21
|
+
n as default
|
|
22
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.cl-icon{color:var(--cl-base-font-color);display:inline-flex;width:var(--cl-icon-size);height:var(--cl-icon-size);align-items:center;justify-content:center}.cl-icon_extra-small{font-size:var(--cl-typography-small-mobile)}.cl-icon_small{font-size:var(--cl-typography-base-mobile)}.cl-icon_medium{font-size:var(--cl-typography-h5-mobile)}.cl-icon_large{font-size:var(--cl-typography-h4-mobile)}.cl-icon_xlarge{font-size:var(--cl-typography-h3-mobile)}.cl-icon_2xlarge{font-size:var(--cl-typography-h2-mobile)}@media(min-width:640px){.cl-icon_extra-small{font-size:var(--cl-typography-small-tablet)}.cl-icon_small{font-size:var(--cl-typography-base-tablet)}.cl-icon_medium{font-size:var(--cl-typography-h5-tablet)}.cl-icon_large{font-size:var(--cl-typography-h4-tablet)}.cl-icon_xlarge{font-size:var(--cl-typography-h3-tablet)}.cl-icon_2xlarge{font-size:var(--cl-typography-h2-tablet)}}@media(min-width:1024px){.cl-icon_extra-small{font-size:var(--cl-typography-small-desktop)}.cl-icon_small{font-size:var(--cl-typography-base-desktop)}.cl-icon_medium{font-size:var(--cl-typography-h5-desktop)}.cl-icon_large{font-size:var(--cl-typography-h4-desktop)}.cl-icon_xlarge{font-size:var(--cl-typography-h3-desktop)}.cl-icon_2xlarge{font-size:var(--cl-typography-h2-desktop)}}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { getClassName as i } from "../../../utils/get-class-name.js";
|
|
3
|
+
import './Icon.css';/* empty css */
|
|
4
|
+
import { ElementSize as a } from "../../../enums/element-size.js";
|
|
5
|
+
const u = ({
|
|
6
|
+
name: r,
|
|
7
|
+
testId: t,
|
|
8
|
+
className: c,
|
|
9
|
+
hidden: o,
|
|
10
|
+
size: l = a.Medium,
|
|
11
|
+
...m
|
|
12
|
+
}) => {
|
|
13
|
+
if (!r) return null;
|
|
14
|
+
const e = i([
|
|
15
|
+
c,
|
|
16
|
+
"cl-icon",
|
|
17
|
+
r,
|
|
18
|
+
{
|
|
19
|
+
"cl-icon_extra-small": l === a.ExtraSmall,
|
|
20
|
+
"cl-icon_small": l === a.Small,
|
|
21
|
+
"cl-icon_medium": l === a.Medium,
|
|
22
|
+
"cl-icon_large": l === a.Large,
|
|
23
|
+
"cl-icon_xlarge": l === a.ExtraLarge,
|
|
24
|
+
"cl-icon_2xlarge": l === a.ExtraExtraLarge
|
|
25
|
+
}
|
|
26
|
+
]);
|
|
27
|
+
return /* @__PURE__ */ n("span", { "data-testid": t, className: e, "aria-hidden": o, ...m });
|
|
28
|
+
};
|
|
29
|
+
export {
|
|
30
|
+
u as default
|
|
31
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
const l = ({
|
|
3
|
+
src: a,
|
|
4
|
+
alt: m,
|
|
5
|
+
width: s,
|
|
6
|
+
height: c,
|
|
7
|
+
sizes: e,
|
|
8
|
+
loading: i = "lazy",
|
|
9
|
+
decoding: r = "async",
|
|
10
|
+
onError: g
|
|
11
|
+
}) => /* @__PURE__ */ o(
|
|
12
|
+
"img",
|
|
13
|
+
{
|
|
14
|
+
src: a,
|
|
15
|
+
alt: m,
|
|
16
|
+
width: s,
|
|
17
|
+
height: c,
|
|
18
|
+
loading: i,
|
|
19
|
+
decoding: r,
|
|
20
|
+
sizes: e,
|
|
21
|
+
className: "cl-image__img",
|
|
22
|
+
onError: g
|
|
23
|
+
}
|
|
24
|
+
);
|
|
25
|
+
export {
|
|
26
|
+
l as BasicImage
|
|
27
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsxs as l, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import m from "../icon/Icon.js";
|
|
3
|
+
import { IconName as c } from "../../../enums/icon-name.js";
|
|
4
|
+
const s = () => /* @__PURE__ */ l("div", { className: "cl-image__fallback", children: [
|
|
5
|
+
/* @__PURE__ */ a(m, { name: c.Image, className: "cl-image__fallback-icon" }),
|
|
6
|
+
/* @__PURE__ */ a("span", { className: "cl-image__fallback-text", children: "Image not available" })
|
|
7
|
+
] });
|
|
8
|
+
export {
|
|
9
|
+
s as FallbackImage
|
|
10
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.cl-image{object-fit:cover;border-radius:var(--cl-border-radius)}.cl-image__img{max-width:100%;height:auto;border-radius:var(--cl-border-radius)}.cl-image__picture{display:block;object-fit:cover;border-radius:var(--cl-border-radius)}.cl-image__fallback{display:flex;flex-direction:column;align-items:center;justify-content:space-between}.cl-image__fallback-icon{width:148px;height:148px}.cl-image__fallback-icon:before{font-size:6rem}.cl-image__fallback-text{text-align:center;padding-top:var(--cl-s-gap);color:var(--cl-base-font-color);font-family:var(--cl-core-font);font-size:var(--cl-typography-small-mobile);font-weight:400;line-height:1.5;letter-spacing:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media(min-width:640px){.cl-image__fallback-text{font-size:var(--cl-typography-small-tablet)}}@media(min-width:1024px){.cl-image__fallback-text{font-size:var(--cl-typography-small-desktop)}}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { getClassName as u } from "../../../utils/get-class-name.js";
|
|
3
|
+
import { useState as h } from "react";
|
|
4
|
+
import { BasicImage as E } from "./BasicImage.js";
|
|
5
|
+
import { FallbackImage as d } from "./FallBackImage.js";
|
|
6
|
+
import './Image.css';/* empty css */
|
|
7
|
+
import { ResponsivePicture as C } from "./ResponsivePicture.js";
|
|
8
|
+
import { withFigureCaption as I } from "../../hocs/with-figure-caption/with-figure-caption.js";
|
|
9
|
+
const v = ({
|
|
10
|
+
alt: s,
|
|
11
|
+
sources: o = [],
|
|
12
|
+
className: m,
|
|
13
|
+
decorative: i = !1,
|
|
14
|
+
onError: n,
|
|
15
|
+
...t
|
|
16
|
+
}) => {
|
|
17
|
+
const [l, p] = h(!1), c = u(["cl-image", m]), f = o.length > 0, a = i ? "" : s, e = (g) => {
|
|
18
|
+
p(!0), n?.(g);
|
|
19
|
+
};
|
|
20
|
+
return l ? /* @__PURE__ */ r(d, {}) : f ? /* @__PURE__ */ r(C, { alt: a, sources: o, onError: e, ...t }) : /* @__PURE__ */ r("div", { className: c, children: /* @__PURE__ */ r(E, { alt: a, onError: e, ...t }) });
|
|
21
|
+
}, k = I(v);
|
|
22
|
+
export {
|
|
23
|
+
k as default
|
|
24
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsxs as m, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { BasicImage as s } from "./BasicImage.js";
|
|
3
|
+
const d = ({ sources: i = [], ...t }) => /* @__PURE__ */ m("picture", { className: "cl-image__picture", children: [
|
|
4
|
+
i.map((r, p) => /* @__PURE__ */ e(
|
|
5
|
+
"source",
|
|
6
|
+
{
|
|
7
|
+
srcSet: r.descriptor ? `${r.src} ${r.descriptor}` : r.src,
|
|
8
|
+
media: r.media,
|
|
9
|
+
type: r.type
|
|
10
|
+
},
|
|
11
|
+
`${r.src}-${p}`
|
|
12
|
+
)),
|
|
13
|
+
/* @__PURE__ */ e(s, { ...t })
|
|
14
|
+
] });
|
|
15
|
+
export {
|
|
16
|
+
d as ResponsivePicture
|
|
17
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.cl-input__wrapper{display:flex;gap:var(--cl-m-gap);align-items:center;border:var(--cl-light-border);border-radius:var(--cl-border-radius);padding:var(--cl-m-gap);background-color:var(--cl-surface-a10);position:relative}.cl-input__wrapper:has(input:focus){border:var(--cl-outline-border)}.cl-input__wrapper:has(input[aria-invalid=true]){border:var(--cl-danger-border)}.cl-input__wrapper:has(input[disabled]){pointer-events:none;opacity:.5}.cl-input__wrapper>span:nth-child(2){display:flex;gap:var(--cl-m-gap);align-items:center}.cl-input__field{color:var(--cl-base-font-color);padding:0;border:none;display:inline-block;background:transparent;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;flex-grow:1;min-width:0;font-family:var(--cl-core-font);font-size:var(--cl-typography-base-mobile);font-weight:400;line-height:1.5;letter-spacing:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.cl-input__field:focus-visible{outline:none}.cl-input__field:placeholder-shown+span{display:none!important}.cl-input__field::-webkit-outer-spin-button,.cl-input__field::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.cl-input__field[type=number]{-moz-appearance:textfield;appearance:textfield}@media(min-width:640px){.cl-input__field{font-size:var(--cl-typography-base-tablet)}}@media(min-width:1024px){.cl-input__field{font-size:var(--cl-typography-base-desktop)}}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsxs as s, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as i } from "react";
|
|
3
|
+
import './Input.css';/* empty css */
|
|
4
|
+
const n = ({ children: r, ...t }, p) => /* @__PURE__ */ s("div", { className: "cl-input__wrapper", children: [
|
|
5
|
+
/* @__PURE__ */ e("input", { ...t, className: "cl-input__field", ref: p }),
|
|
6
|
+
r
|
|
7
|
+
] }), l = i(n);
|
|
8
|
+
export {
|
|
9
|
+
l as default
|
|
10
|
+
};
|