@fleetia/components 1.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/dist/Badge/Badge.css.d.ts +1 -0
- package/dist/Badge/Badge.d.ts +7 -0
- package/dist/Badge/Badge.js +9 -0
- package/dist/Badge/Badge.styles.js +6 -0
- package/dist/Badge/index.d.ts +1 -0
- package/dist/Badge/index.js +1 -0
- package/dist/Box/Box.css.d.ts +4 -0
- package/dist/Box/Box.d.ts +8 -0
- package/dist/Box/Box.js +14 -0
- package/dist/Box/Box.styles.js +9 -0
- package/dist/Box/index.d.ts +1 -0
- package/dist/Box/index.js +1 -0
- package/dist/Breadcrumb/Breadcrumb.css.d.ts +4 -0
- package/dist/Breadcrumb/Breadcrumb.d.ts +11 -0
- package/dist/Breadcrumb/Breadcrumb.js +10 -0
- package/dist/Breadcrumb/Breadcrumb.styles.js +9 -0
- package/dist/Breadcrumb/index.d.ts +1 -0
- package/dist/Breadcrumb/index.js +1 -0
- package/dist/Button/Button.css.d.ts +2 -0
- package/dist/Button/Button.d.ts +12 -0
- package/dist/Button/Button.js +9 -0
- package/dist/Button/Button.styles.js +7 -0
- package/dist/Button/index.d.ts +1 -0
- package/dist/Button/index.js +1 -0
- package/dist/CardPagination/CardPagination.css.d.ts +3 -0
- package/dist/CardPagination/CardPagination.d.ts +9 -0
- package/dist/CardPagination/CardPagination.js +15 -0
- package/dist/CardPagination/CardPagination.styles.js +8 -0
- package/dist/CardPagination/index.d.ts +1 -0
- package/dist/CardPagination/index.js +1 -0
- package/dist/Checkbox/Checkbox.css.d.ts +3 -0
- package/dist/Checkbox/Checkbox.d.ts +9 -0
- package/dist/Checkbox/Checkbox.js +11 -0
- package/dist/Checkbox/Checkbox.styles.js +8 -0
- package/dist/Checkbox/index.d.ts +1 -0
- package/dist/Checkbox/index.js +1 -0
- package/dist/CollapsibleSection/CollapsibleSection.css.d.ts +3 -0
- package/dist/CollapsibleSection/CollapsibleSection.d.ts +8 -0
- package/dist/CollapsibleSection/CollapsibleSection.js +11 -0
- package/dist/CollapsibleSection/CollapsibleSection.styles.js +8 -0
- package/dist/CollapsibleSection/index.d.ts +1 -0
- package/dist/CollapsibleSection/index.js +1 -0
- package/dist/ColorPicker/ColorPicker.constants.d.ts +5 -0
- package/dist/ColorPicker/ColorPicker.constants.js +8 -0
- package/dist/ColorPicker/ColorPicker.css.d.ts +19 -0
- package/dist/ColorPicker/ColorPicker.d.ts +6 -0
- package/dist/ColorPicker/ColorPicker.js +55 -0
- package/dist/ColorPicker/ColorPicker.styles.js +24 -0
- package/dist/ColorPicker/ColorPicker.type.d.ts +8 -0
- package/dist/ColorPicker/ColorPicker.utils.d.ts +6 -0
- package/dist/ColorPicker/ColorPicker.utils.js +49 -0
- package/dist/ColorPicker/NativeColorPicker.d.ts +2 -0
- package/dist/ColorPicker/NativeColorPicker.js +13 -0
- package/dist/ColorPicker/index.d.ts +1 -0
- package/dist/ColorPicker/index.js +1 -0
- package/dist/ColorPicker/useColorPanel.d.ts +11 -0
- package/dist/ColorPicker/useColorPanel.js +38 -0
- package/dist/ColorPicker/useColorWheel.d.ts +18 -0
- package/dist/ColorPicker/useColorWheel.js +232 -0
- package/dist/ColorRow/ColorRow.css.d.ts +1 -0
- package/dist/ColorRow/ColorRow.d.ts +9 -0
- package/dist/ColorRow/ColorRow.js +9 -0
- package/dist/ColorRow/ColorRow.styles.js +5 -0
- package/dist/ColorRow/index.d.ts +1 -0
- package/dist/ColorRow/index.js +1 -0
- package/dist/ConfirmDialog/ConfirmDialog.css.d.ts +7 -0
- package/dist/ConfirmDialog/ConfirmDialog.d.ts +4 -0
- package/dist/ConfirmDialog/ConfirmDialog.js +22 -0
- package/dist/ConfirmDialog/ConfirmDialog.styles.js +12 -0
- package/dist/ConfirmDialog/ConfirmDialog.type.d.ts +9 -0
- package/dist/ConfirmDialog/index.d.ts +1 -0
- package/dist/ConfirmDialog/index.js +1 -0
- package/dist/ContextMenu/ContextMenu.css.d.ts +3 -0
- package/dist/ContextMenu/ContextMenu.d.ts +5 -0
- package/dist/ContextMenu/ContextMenu.js +16 -0
- package/dist/ContextMenu/ContextMenu.styles.js +8 -0
- package/dist/ContextMenu/ContextMenu.type.d.ts +11 -0
- package/dist/ContextMenu/index.d.ts +1 -0
- package/dist/ContextMenu/index.js +1 -0
- package/dist/ContextMenu/useContextMenuKeyboard.d.ts +5 -0
- package/dist/ContextMenu/useContextMenuKeyboard.js +63 -0
- package/dist/ContextMenu/useViewportClamp.d.ts +2 -0
- package/dist/ContextMenu/useViewportClamp.js +18 -0
- package/dist/DateInput/DateInput.css.d.ts +5 -0
- package/dist/DateInput/DateInput.d.ts +11 -0
- package/dist/DateInput/DateInput.js +23 -0
- package/dist/DateInput/DateInput.styles.js +10 -0
- package/dist/DateInput/index.d.ts +1 -0
- package/dist/DateInput/index.js +1 -0
- package/dist/IconButton/IconButton.css.d.ts +7 -0
- package/dist/IconButton/IconButton.d.ts +5 -0
- package/dist/IconButton/IconButton.js +22 -0
- package/dist/IconButton/IconButton.styles.js +12 -0
- package/dist/IconButton/IconButton.type.d.ts +27 -0
- package/dist/IconButton/index.d.ts +1 -0
- package/dist/IconButton/index.js +1 -0
- package/dist/Modal/Modal.css.d.ts +6 -0
- package/dist/Modal/Modal.d.ts +4 -0
- package/dist/Modal/Modal.js +19 -0
- package/dist/Modal/Modal.styles.js +11 -0
- package/dist/Modal/Modal.type.d.ts +9 -0
- package/dist/Modal/index.d.ts +1 -0
- package/dist/Modal/index.js +1 -0
- package/dist/NavigationButton/NavigationButton.css.d.ts +1 -0
- package/dist/NavigationButton/NavigationButton.d.ts +8 -0
- package/dist/NavigationButton/NavigationButton.js +14 -0
- package/dist/NavigationButton/NavigationButton.styles.js +6 -0
- package/dist/NavigationButton/index.d.ts +1 -0
- package/dist/NavigationButton/index.js +1 -0
- package/dist/PositionGrid/PositionGrid.css.d.ts +10 -0
- package/dist/PositionGrid/PositionGrid.d.ts +5 -0
- package/dist/PositionGrid/PositionGrid.js +17 -0
- package/dist/PositionGrid/PositionGrid.styles.js +15 -0
- package/dist/PositionGrid/PositionGrid.type.d.ts +13 -0
- package/dist/PositionGrid/index.d.ts +1 -0
- package/dist/PositionGrid/index.js +1 -0
- package/dist/RadioGroup/RadioGroup.css.d.ts +3 -0
- package/dist/RadioGroup/RadioGroup.d.ts +15 -0
- package/dist/RadioGroup/RadioGroup.js +15 -0
- package/dist/RadioGroup/RadioGroup.styles.js +8 -0
- package/dist/RadioGroup/index.d.ts +1 -0
- package/dist/RadioGroup/index.js +1 -0
- package/dist/RangeInput/RangeInput.css.d.ts +4 -0
- package/dist/RangeInput/RangeInput.d.ts +12 -0
- package/dist/RangeInput/RangeInput.js +10 -0
- package/dist/RangeInput/RangeInput.styles.js +9 -0
- package/dist/RangeInput/index.d.ts +1 -0
- package/dist/RangeInput/index.js +1 -0
- package/dist/Select/Select.css.d.ts +4 -0
- package/dist/Select/Select.d.ts +20 -0
- package/dist/Select/Select.js +15 -0
- package/dist/Select/Select.styles.js +8 -0
- package/dist/Select/index.d.ts +1 -0
- package/dist/Select/index.js +1 -0
- package/dist/Sidebar/Sidebar.css.d.ts +3 -0
- package/dist/Sidebar/Sidebar.d.ts +10 -0
- package/dist/Sidebar/Sidebar.js +9 -0
- package/dist/Sidebar/Sidebar.styles.js +8 -0
- package/dist/Sidebar/index.d.ts +1 -0
- package/dist/Sidebar/index.js +1 -0
- package/dist/Tabs/Tabs.css.d.ts +5 -0
- package/dist/Tabs/Tabs.d.ts +14 -0
- package/dist/Tabs/Tabs.js +33 -0
- package/dist/Tabs/Tabs.styles.js +10 -0
- package/dist/Tabs/index.d.ts +1 -0
- package/dist/Tabs/index.js +1 -0
- package/dist/TextInput/TextInput.css.d.ts +5 -0
- package/dist/TextInput/TextInput.d.ts +17 -0
- package/dist/TextInput/TextInput.js +14 -0
- package/dist/TextInput/TextInput.styles.js +10 -0
- package/dist/TextInput/index.d.ts +1 -0
- package/dist/TextInput/index.js +1 -0
- package/dist/Toggle/Toggle.css.d.ts +4 -0
- package/dist/Toggle/Toggle.d.ts +9 -0
- package/dist/Toggle/Toggle.js +14 -0
- package/dist/Toggle/Toggle.styles.js +9 -0
- package/dist/Toggle/index.d.ts +1 -0
- package/dist/Toggle/index.js +1 -0
- package/dist/Tree/Tree.css.d.ts +10 -0
- package/dist/Tree/Tree.d.ts +4 -0
- package/dist/Tree/Tree.js +72 -0
- package/dist/Tree/Tree.styles.js +15 -0
- package/dist/Tree/Tree.type.d.ts +26 -0
- package/dist/Tree/TreeLevel.d.ts +3 -0
- package/dist/Tree/TreeLevel.js +42 -0
- package/dist/Tree/index.d.ts +1 -0
- package/dist/Tree/index.js +1 -0
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/index.js +2 -0
- package/dist/hooks/useBodyScrollLock.d.ts +1 -0
- package/dist/hooks/useBodyScrollLock.js +15 -0
- package/dist/hooks/useFocusTrap.d.ts +7 -0
- package/dist/hooks/useFocusTrap.js +59 -0
- package/dist/i18n/I18nProvider.d.ts +8 -0
- package/dist/i18n/I18nProvider.js +13 -0
- package/dist/i18n/context.d.ts +9 -0
- package/dist/i18n/context.js +15 -0
- package/dist/i18n/index.d.ts +3 -0
- package/dist/i18n/index.js +2 -0
- package/dist/i18n/locales/en.d.ts +3 -0
- package/dist/i18n/locales/en.js +152 -0
- package/dist/i18n/locales/ja.d.ts +3 -0
- package/dist/i18n/locales/ja.js +152 -0
- package/dist/i18n/locales/ko.d.ts +3 -0
- package/dist/i18n/locales/ko.js +152 -0
- package/dist/i18n/types.d.ts +3 -0
- package/dist/icons/ChevronLeftIcon.d.ts +7 -0
- package/dist/icons/ChevronLeftIcon.js +7 -0
- package/dist/icons/ChevronRightIcon.d.ts +7 -0
- package/dist/icons/ChevronRightIcon.js +7 -0
- package/dist/icons/DragHandleIcon.d.ts +7 -0
- package/dist/icons/DragHandleIcon.js +7 -0
- package/dist/icons/EyeIcon.d.ts +8 -0
- package/dist/icons/EyeIcon.js +10 -0
- package/dist/icons/FolderIcon.d.ts +7 -0
- package/dist/icons/FolderIcon.js +7 -0
- package/dist/icons/GearIcon.d.ts +7 -0
- package/dist/icons/GearIcon.js +7 -0
- package/dist/icons/TriangleDownIcon.d.ts +7 -0
- package/dist/icons/TriangleDownIcon.js +7 -0
- package/dist/icons/TriangleUpIcon.d.ts +7 -0
- package/dist/icons/TriangleUpIcon.js +7 -0
- package/dist/icons/index.d.ts +8 -0
- package/dist/icons/index.js +8 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +6 -0
- package/dist/styles/Badge/Badge.css +22 -0
- package/dist/styles/Box/Box.css +20 -0
- package/dist/styles/Breadcrumb/Breadcrumb.css +28 -0
- package/dist/styles/Button/Button.css +51 -0
- package/dist/styles/CardPagination/CardPagination.css +29 -0
- package/dist/styles/Checkbox/Checkbox.css +22 -0
- package/dist/styles/CollapsibleSection/CollapsibleSection.css +21 -0
- package/dist/styles/ColorPicker/ColorPicker.css +153 -0
- package/dist/styles/ColorRow/ColorRow.css +9 -0
- package/dist/styles/ConfirmDialog/ConfirmDialog.css +52 -0
- package/dist/styles/ContextMenu/ContextMenu.css +34 -0
- package/dist/styles/DateInput/DateInput.css +47 -0
- package/dist/styles/IconButton/IconButton.css +79 -0
- package/dist/styles/Modal/Modal.css +58 -0
- package/dist/styles/NavigationButton/NavigationButton.css +13 -0
- package/dist/styles/PositionGrid/PositionGrid.css +70 -0
- package/dist/styles/RadioGroup/RadioGroup.css +26 -0
- package/dist/styles/RangeInput/RangeInput.css +33 -0
- package/dist/styles/Select/Select.css +39 -0
- package/dist/styles/Sidebar/Sidebar.css +18 -0
- package/dist/styles/Tabs/Tabs.css +61 -0
- package/dist/styles/TextInput/TextInput.css +37 -0
- package/dist/styles/Toggle/Toggle.css +46 -0
- package/dist/styles/Tree/Tree.css +89 -0
- package/dist/styles/tokens.css +13 -0
- package/dist/styles/tokens.css.d.ts +15 -0
- package/dist/styles/tokens.styles.js +5 -0
- package/dist/theme/index.d.ts +2 -0
- package/dist/theme/index.js +1 -0
- package/dist/theme/presets.d.ts +3 -0
- package/dist/theme/presets.js +22 -0
- package/dist/theme/types.d.ts +10 -0
- package/dist/utils/colorUtils.d.ts +32 -0
- package/dist/utils/colorUtils.js +227 -0
- package/dist/utils/cssVariable.d.ts +2 -0
- package/dist/utils/cssVariable.js +11 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.js +2 -0
- package/package.json +191 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { useId } from 'react';
|
|
3
|
+
import clsx from 'clsx';
|
|
4
|
+
import { useTranslation } from '../i18n/context.js';
|
|
5
|
+
import { useFocusTrap } from '../hooks/useFocusTrap.js';
|
|
6
|
+
import { useBodyScrollLock } from '../hooks/useBodyScrollLock.js';
|
|
7
|
+
import { overlay, header, title, closeButton, body, modal } from './Modal.styles.js';
|
|
8
|
+
|
|
9
|
+
function Modal({ isOpen, onClose, children, size = "md", title: title$1, className }) {
|
|
10
|
+
const { t } = useTranslation();
|
|
11
|
+
const titleId = useId();
|
|
12
|
+
const modalRef = useFocusTrap({ enabled: isOpen, onEscape: onClose });
|
|
13
|
+
useBodyScrollLock(isOpen);
|
|
14
|
+
if (!isOpen)
|
|
15
|
+
return null;
|
|
16
|
+
return (jsx("div", { className: overlay, onClick: onClose, role: "presentation", children: jsxs("div", { ref: modalRef, className: clsx(modal[size], className), onClick: e => e.stopPropagation(), role: "dialog", "aria-modal": "true", "aria-labelledby": title$1 ? titleId : undefined, children: [title$1 && (jsxs("div", { className: header, children: [jsx("h2", { id: titleId, className: title, children: title$1 }), jsx("button", { className: closeButton, onClick: onClose, "aria-label": t("modal.close"), children: "\u00D7" })] })), jsx("div", { className: body, children: children })] }) }));
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export { Modal };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import './../styles/tokens.css';
|
|
2
|
+
import './../styles/Modal/Modal.css';
|
|
3
|
+
|
|
4
|
+
var body = 'Modal_body__xxu4lt8';
|
|
5
|
+
var closeButton = 'Modal_closeButton__xxu4lt7';
|
|
6
|
+
var header = 'Modal_header__xxu4lt5';
|
|
7
|
+
var modal = {sm:'Modal_modal_sm__xxu4lt2 Modal_modalBase__xxu4lt1',md:'Modal_modal_md__xxu4lt3 Modal_modalBase__xxu4lt1',lg:'Modal_modal_lg__xxu4lt4 Modal_modalBase__xxu4lt1'};
|
|
8
|
+
var overlay = 'Modal_overlay__xxu4lt0';
|
|
9
|
+
var title = 'Modal_title__xxu4lt6';
|
|
10
|
+
|
|
11
|
+
export { body, closeButton, header, modal, overlay, title };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Modal, type ModalProps } from "./Modal";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Modal } from './Modal.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const pageButton: string;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export type NavigationButtonProps = {
|
|
3
|
+
direction: "left" | "right";
|
|
4
|
+
onClick: () => void;
|
|
5
|
+
className?: string;
|
|
6
|
+
};
|
|
7
|
+
declare function NavigationButton({ direction, onClick, className }: NavigationButtonProps): React.ReactElement;
|
|
8
|
+
export { NavigationButton };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { clsx } from 'clsx';
|
|
3
|
+
import { ChevronLeftIcon } from '../icons/ChevronLeftIcon.js';
|
|
4
|
+
import { ChevronRightIcon } from '../icons/ChevronRightIcon.js';
|
|
5
|
+
import 'react';
|
|
6
|
+
import { useTranslation } from '../i18n/context.js';
|
|
7
|
+
import { pageButton } from './NavigationButton.styles.js';
|
|
8
|
+
|
|
9
|
+
function NavigationButton({ direction, onClick, className }) {
|
|
10
|
+
const { t } = useTranslation();
|
|
11
|
+
return (jsx("button", { onClick: onClick, className: clsx(pageButton, className), "aria-label": direction === "left" ? t("navigation.previous") : t("navigation.next"), children: direction === "left" ? jsx(ChevronLeftIcon, {}) : jsx(ChevronRightIcon, {}) }));
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export { NavigationButton };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { NavigationButton, type NavigationButtonProps } from "./NavigationButton";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { NavigationButton } from './NavigationButton.js';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const positionWrapper: string;
|
|
2
|
+
export declare const positionGrid: string;
|
|
3
|
+
export declare const positionCell: string;
|
|
4
|
+
export declare const positionActive: string;
|
|
5
|
+
export declare const marginTop: string;
|
|
6
|
+
export declare const marginBottom: string;
|
|
7
|
+
export declare const marginMiddle: string;
|
|
8
|
+
export declare const marginSide: string;
|
|
9
|
+
export declare const marginInput: string;
|
|
10
|
+
export declare const marginUnit: string;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { MarginValues, PositionGridProps } from "./PositionGrid.type";
|
|
3
|
+
export type { MarginValues, PositionGridProps };
|
|
4
|
+
declare function PositionGrid({ value, options, onChange, margin, onMarginChange }: PositionGridProps): React.ReactElement;
|
|
5
|
+
export { PositionGrid };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
|
+
import { clsx } from 'clsx';
|
|
3
|
+
import 'react';
|
|
4
|
+
import { useTranslation } from '../i18n/context.js';
|
|
5
|
+
import { positionWrapper, marginTop, marginInput, marginUnit, marginMiddle, marginSide, positionGrid, positionCell, positionActive, marginBottom } from './PositionGrid.styles.js';
|
|
6
|
+
|
|
7
|
+
function PositionGrid({ value, options, onChange, margin, onMarginChange }) {
|
|
8
|
+
const { t } = useTranslation();
|
|
9
|
+
const handleMargin = (side, val) => {
|
|
10
|
+
if (!onMarginChange || !margin)
|
|
11
|
+
return;
|
|
12
|
+
onMarginChange({ ...margin, [side]: val });
|
|
13
|
+
};
|
|
14
|
+
return (jsx("div", { className: positionWrapper, role: "group", "aria-label": t("positionGrid.group"), children: margin && onMarginChange ? (jsxs(Fragment, { children: [jsxs("div", { className: marginTop, children: [jsx("input", { type: "number", className: marginInput, value: margin.top, onChange: e => handleMargin("top", Number(e.target.value)), min: 0, "aria-label": t("positionGrid.margin.top") }), jsx("span", { className: marginUnit, children: "px" })] }), jsxs("div", { className: marginMiddle, children: [jsxs("div", { className: marginSide, children: [jsx("input", { type: "number", className: marginInput, value: margin.left, onChange: e => handleMargin("left", Number(e.target.value)), min: 0, "aria-label": t("positionGrid.margin.left") }), jsx("span", { className: marginUnit, children: "px" })] }), jsx("div", { className: positionGrid, children: options.map(pos => (jsx("button", { className: clsx(positionCell, value === pos && positionActive), onClick: () => onChange(pos), "aria-label": pos }, pos))) }), jsxs("div", { className: marginSide, children: [jsx("input", { type: "number", className: marginInput, value: margin.right, onChange: e => handleMargin("right", Number(e.target.value)), min: 0, "aria-label": t("positionGrid.margin.right") }), jsx("span", { className: marginUnit, children: "px" })] })] }), jsxs("div", { className: marginBottom, children: [jsx("input", { type: "number", className: marginInput, value: margin.bottom, onChange: e => handleMargin("bottom", Number(e.target.value)), min: 0, "aria-label": t("positionGrid.margin.bottom") }), jsx("span", { className: marginUnit, children: "px" })] })] })) : (jsx("div", { className: positionGrid, children: options.map(pos => (jsx("button", { className: clsx(positionCell, value === pos && positionActive), onClick: () => onChange(pos), "aria-label": pos }, pos))) })) }));
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export { PositionGrid };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import './../styles/tokens.css';
|
|
2
|
+
import './../styles/PositionGrid/PositionGrid.css';
|
|
3
|
+
|
|
4
|
+
var marginBottom = 'PositionGrid_marginBottom__1iy2ljo5';
|
|
5
|
+
var marginInput = 'PositionGrid_marginInput__1iy2ljo8';
|
|
6
|
+
var marginMiddle = 'PositionGrid_marginMiddle__1iy2ljo6';
|
|
7
|
+
var marginSide = 'PositionGrid_marginSide__1iy2ljo7';
|
|
8
|
+
var marginTop = 'PositionGrid_marginTop__1iy2ljo4';
|
|
9
|
+
var marginUnit = 'PositionGrid_marginUnit__1iy2ljo9';
|
|
10
|
+
var positionActive = 'PositionGrid_positionActive__1iy2ljo3';
|
|
11
|
+
var positionCell = 'PositionGrid_positionCell__1iy2ljo2';
|
|
12
|
+
var positionGrid = 'PositionGrid_positionGrid__1iy2ljo1';
|
|
13
|
+
var positionWrapper = 'PositionGrid_positionWrapper__1iy2ljo0';
|
|
14
|
+
|
|
15
|
+
export { marginBottom, marginInput, marginMiddle, marginSide, marginTop, marginUnit, positionActive, positionCell, positionGrid, positionWrapper };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type MarginValues = {
|
|
2
|
+
top: number;
|
|
3
|
+
bottom: number;
|
|
4
|
+
left: number;
|
|
5
|
+
right: number;
|
|
6
|
+
};
|
|
7
|
+
export type PositionGridProps = {
|
|
8
|
+
value: string;
|
|
9
|
+
options: string[];
|
|
10
|
+
onChange: (pos: string) => void;
|
|
11
|
+
margin?: MarginValues;
|
|
12
|
+
onMarginChange?: (margin: MarginValues) => void;
|
|
13
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { PositionGrid, type PositionGridProps, type MarginValues } from "./PositionGrid";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { PositionGrid } from './PositionGrid.js';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export type RadioOption<T extends string = string> = {
|
|
3
|
+
value: T;
|
|
4
|
+
label: string;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
};
|
|
7
|
+
export type RadioGroupProps<T extends string = string> = {
|
|
8
|
+
name?: string;
|
|
9
|
+
options: RadioOption<T>[];
|
|
10
|
+
value: T;
|
|
11
|
+
onChange: (value: T) => void;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
className?: string;
|
|
14
|
+
};
|
|
15
|
+
export declare function RadioGroup<T extends string = string>({ name, options, value, onChange, disabled, className }: RadioGroupProps<T>): React.ReactElement;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { useId } from 'react';
|
|
3
|
+
import clsx from 'clsx';
|
|
4
|
+
import { label, input, group } from './RadioGroup.styles.js';
|
|
5
|
+
|
|
6
|
+
function RadioGroup({ name, options, value, onChange, disabled, className }) {
|
|
7
|
+
const groupId = useId();
|
|
8
|
+
const groupName = name ?? groupId;
|
|
9
|
+
return (jsx("div", { role: "radiogroup", className: clsx(group, className), children: options.map(option => {
|
|
10
|
+
const isDisabled = disabled || option.disabled;
|
|
11
|
+
return (jsxs("label", { className: label, "data-disabled": isDisabled || undefined, children: [jsx("input", { type: "radio", name: groupName, value: option.value, checked: value === option.value, onChange: () => onChange(option.value), disabled: isDisabled, className: input }), option.label] }, option.value));
|
|
12
|
+
}) }));
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export { RadioGroup };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { RadioGroup, type RadioGroupProps, type RadioOption } from "./RadioGroup";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { RadioGroup } from './RadioGroup.js';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export type RangeInputProps = {
|
|
3
|
+
label: string;
|
|
4
|
+
value: number;
|
|
5
|
+
min: number;
|
|
6
|
+
max: number;
|
|
7
|
+
step?: number;
|
|
8
|
+
displayValue?: string;
|
|
9
|
+
onChange: (value: number) => void;
|
|
10
|
+
};
|
|
11
|
+
declare function RangeInput({ label, value, min, max, step, displayValue, onChange }: RangeInputProps): React.ReactElement;
|
|
12
|
+
export { RangeInput };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { useId } from 'react';
|
|
3
|
+
import { rangeInputWrapper, settingLabel, rangeLabel, rangeInput } from './RangeInput.styles.js';
|
|
4
|
+
|
|
5
|
+
function RangeInput({ label, value, min, max, step, displayValue, onChange }) {
|
|
6
|
+
const inputId = useId();
|
|
7
|
+
return (jsxs("div", { className: rangeInputWrapper, children: [jsx("label", { htmlFor: inputId, className: settingLabel, children: jsxs("span", { className: rangeLabel, children: [label, ": ", displayValue ?? value] }) }), jsx("input", { id: inputId, type: "range", min: min, max: max, step: step, value: value, "aria-label": label, "aria-valuemin": min, "aria-valuemax": max, "aria-valuenow": value, onChange: e => onChange(parseFloat(e.target.value)), className: rangeInput })] }));
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export { RangeInput };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import './../styles/tokens.css';
|
|
2
|
+
import './../styles/RangeInput/RangeInput.css';
|
|
3
|
+
|
|
4
|
+
var rangeInput = 'RangeInput_rangeInput__96j5at3';
|
|
5
|
+
var rangeInputWrapper = 'RangeInput_rangeInputWrapper__96j5at0';
|
|
6
|
+
var rangeLabel = 'RangeInput_rangeLabel__96j5at2';
|
|
7
|
+
var settingLabel = 'RangeInput_settingLabel__96j5at1';
|
|
8
|
+
|
|
9
|
+
export { rangeInput, rangeInputWrapper, rangeLabel, settingLabel };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { RangeInput, type RangeInputProps } from "./RangeInput";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { RangeInput } from './RangeInput.js';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export type SelectProps = {
|
|
3
|
+
value: string;
|
|
4
|
+
onChange: (value: string) => void;
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
size?: "sm" | "md" | "lg";
|
|
7
|
+
className?: string;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
};
|
|
10
|
+
export declare function Select({ value, onChange, children, size, className, disabled }: SelectProps): React.ReactElement;
|
|
11
|
+
export type SelectLabelProps = {
|
|
12
|
+
children: React.ReactNode;
|
|
13
|
+
className?: string;
|
|
14
|
+
};
|
|
15
|
+
export declare function SelectLabel({ children, className }: SelectLabelProps): React.ReactElement;
|
|
16
|
+
export type SelectGroupProps = {
|
|
17
|
+
children: React.ReactNode;
|
|
18
|
+
className?: string;
|
|
19
|
+
};
|
|
20
|
+
export declare function SelectGroup({ children, className }: SelectGroupProps): React.ReactElement;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import { size, wrapper, label } from './Select.styles.js';
|
|
4
|
+
|
|
5
|
+
function Select({ value, onChange, children, size: size$1 = "md", className, disabled }) {
|
|
6
|
+
return (jsx("select", { className: clsx(size[size$1], className), value: value, onChange: e => onChange(e.target.value), disabled: disabled, children: children }));
|
|
7
|
+
}
|
|
8
|
+
function SelectLabel({ children, className }) {
|
|
9
|
+
return jsx("span", { className: clsx(label, className), children: children });
|
|
10
|
+
}
|
|
11
|
+
function SelectGroup({ children, className }) {
|
|
12
|
+
return jsx("div", { className: clsx(wrapper, className), children: children });
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export { Select, SelectGroup, SelectLabel };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import './../styles/tokens.css';
|
|
2
|
+
import './../styles/Select/Select.css';
|
|
3
|
+
|
|
4
|
+
var label = 'Select_label__19h9gyc1';
|
|
5
|
+
var size = {sm:'Select_size_sm__19h9gyc3 Select_base__19h9gyc2',md:'Select_size_md__19h9gyc4 Select_base__19h9gyc2',lg:'Select_size_lg__19h9gyc5 Select_base__19h9gyc2'};
|
|
6
|
+
var wrapper = 'Select_wrapper__19h9gyc0';
|
|
7
|
+
|
|
8
|
+
export { label, size, wrapper };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Select, SelectLabel, SelectGroup, type SelectProps, type SelectLabelProps, type SelectGroupProps } from "./Select";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Select, SelectGroup, SelectLabel } from './Select.js';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export type SidebarProps = {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
className?: string;
|
|
5
|
+
position?: "left" | "right";
|
|
6
|
+
"aria-label"?: string;
|
|
7
|
+
ref?: React.Ref<HTMLElement>;
|
|
8
|
+
};
|
|
9
|
+
declare function Sidebar({ children, className, position, "aria-label": ariaLabel, ref }: SidebarProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export { Sidebar };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { clsx } from 'clsx';
|
|
3
|
+
import { sidebar, sidebarRight, sidebarLeft } from './Sidebar.styles.js';
|
|
4
|
+
|
|
5
|
+
function Sidebar({ children, className, position = "right", "aria-label": ariaLabel, ref }) {
|
|
6
|
+
return (jsx("section", { ref: ref, className: clsx(sidebar, position === "right" ? sidebarRight : sidebarLeft, className), "aria-label": ariaLabel, children: children }));
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export { Sidebar };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import './../styles/tokens.css';
|
|
2
|
+
import './../styles/Sidebar/Sidebar.css';
|
|
3
|
+
|
|
4
|
+
var sidebar = 'Sidebar_sidebar__1wau54s0';
|
|
5
|
+
var sidebarLeft = 'Sidebar_sidebarLeft__1wau54s2';
|
|
6
|
+
var sidebarRight = 'Sidebar_sidebarRight__1wau54s1';
|
|
7
|
+
|
|
8
|
+
export { sidebar, sidebarLeft, sidebarRight };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Sidebar, type SidebarProps } from "./Sidebar";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Sidebar } from './Sidebar.js';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const wrapper: string;
|
|
2
|
+
export declare const container: Record<"primary" | "secondary", string>;
|
|
3
|
+
export declare const tab: Record<"primary" | "secondary", string>;
|
|
4
|
+
export declare const tabActive: Record<"primary" | "secondary", string>;
|
|
5
|
+
export declare const panel: string;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export type TabItem = {
|
|
3
|
+
key: string;
|
|
4
|
+
label: string;
|
|
5
|
+
content: React.ReactNode;
|
|
6
|
+
};
|
|
7
|
+
export type TabsProps = {
|
|
8
|
+
items: TabItem[];
|
|
9
|
+
activeKey: string;
|
|
10
|
+
onChange: (key: string) => void;
|
|
11
|
+
variant?: "primary" | "secondary";
|
|
12
|
+
className?: string;
|
|
13
|
+
};
|
|
14
|
+
export declare function Tabs({ items, activeKey, onChange, variant, className }: TabsProps): React.ReactElement;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { useRef } from 'react';
|
|
3
|
+
import clsx from 'clsx';
|
|
4
|
+
import { container, tab, tabActive, panel, wrapper } from './Tabs.styles.js';
|
|
5
|
+
|
|
6
|
+
function Tabs({ items, activeKey, onChange, variant = "primary", className }) {
|
|
7
|
+
const tabsRef = useRef(null);
|
|
8
|
+
const handleKeyDown = (e, index) => {
|
|
9
|
+
let nextIndex = null;
|
|
10
|
+
if (e.key === "ArrowRight") {
|
|
11
|
+
nextIndex = (index + 1) % items.length;
|
|
12
|
+
}
|
|
13
|
+
else if (e.key === "ArrowLeft") {
|
|
14
|
+
nextIndex = (index - 1 + items.length) % items.length;
|
|
15
|
+
}
|
|
16
|
+
else if (e.key === "Home") {
|
|
17
|
+
nextIndex = 0;
|
|
18
|
+
}
|
|
19
|
+
else if (e.key === "End") {
|
|
20
|
+
nextIndex = items.length - 1;
|
|
21
|
+
}
|
|
22
|
+
if (nextIndex !== null) {
|
|
23
|
+
e.preventDefault();
|
|
24
|
+
const tabs = tabsRef.current?.querySelectorAll('[role="tab"]');
|
|
25
|
+
tabs?.[nextIndex]?.focus();
|
|
26
|
+
onChange(items[nextIndex].key);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
const activeItem = items.find(item => item.key === activeKey);
|
|
30
|
+
return (jsxs("div", { className: clsx(wrapper, className), children: [jsx("div", { ref: tabsRef, role: "tablist", className: container[variant], children: items.map((item, index) => (jsx("button", { role: "tab", "aria-selected": activeKey === item.key, tabIndex: activeKey === item.key ? 0 : -1, className: clsx(tab[variant], activeKey === item.key && tabActive[variant]), onClick: () => onChange(item.key), onKeyDown: e => handleKeyDown(e, index), children: item.label }, item.key))) }), activeItem && (jsx("div", { role: "tabpanel", className: panel, children: activeItem.content }))] }));
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export { Tabs };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import './../styles/tokens.css';
|
|
2
|
+
import './../styles/Tabs/Tabs.css';
|
|
3
|
+
|
|
4
|
+
var container = {primary:'Tabs_container_primary__u7x5if1',secondary:'Tabs_container_secondary__u7x5if2'};
|
|
5
|
+
var panel = 'Tabs_panel__u7x5if8';
|
|
6
|
+
var tab = {primary:'Tabs_tab_primary__u7x5if4 Tabs_tabBase__u7x5if3',secondary:'Tabs_tab_secondary__u7x5if5 Tabs_tabBase__u7x5if3'};
|
|
7
|
+
var tabActive = {primary:'Tabs_tabActive_primary__u7x5if6',secondary:'Tabs_tabActive_secondary__u7x5if7'};
|
|
8
|
+
var wrapper = 'Tabs_wrapper__u7x5if0';
|
|
9
|
+
|
|
10
|
+
export { container, panel, tab, tabActive, wrapper };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Tabs, type TabsProps, type TabItem } from "./Tabs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Tabs } from './Tabs.js';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export type TextInputProps = {
|
|
3
|
+
label?: string;
|
|
4
|
+
placeholder?: string;
|
|
5
|
+
value: string;
|
|
6
|
+
onChange: (value: string) => void;
|
|
7
|
+
onFocus?: () => void;
|
|
8
|
+
onBlur?: () => void;
|
|
9
|
+
error?: string;
|
|
10
|
+
type?: string;
|
|
11
|
+
lang?: string;
|
|
12
|
+
min?: number | string;
|
|
13
|
+
max?: number | string;
|
|
14
|
+
step?: number;
|
|
15
|
+
className?: string;
|
|
16
|
+
};
|
|
17
|
+
export declare function TextInput({ label, placeholder, value, onChange, onFocus, onBlur, error, type, lang, min, max, step, className }: TextInputProps): React.ReactElement;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { useId } from 'react';
|
|
3
|
+
import clsx from 'clsx';
|
|
4
|
+
import { DateInput } from '../DateInput/DateInput.js';
|
|
5
|
+
import { label, input, inputError, error, wrapper } from './TextInput.styles.js';
|
|
6
|
+
|
|
7
|
+
function TextInput({ label: label$1, placeholder, value, onChange, onFocus, onBlur, error: error$1, type = "text", lang, min, max, step, className }) {
|
|
8
|
+
const inputId = useId();
|
|
9
|
+
const errorId = useId();
|
|
10
|
+
const isDate = type === "date";
|
|
11
|
+
return (jsxs("div", { className: clsx(wrapper, className), children: [label$1 && (jsx("label", { htmlFor: isDate ? undefined : inputId, className: label, children: label$1 })), isDate ? (jsx(DateInput, { value: value, onChange: onChange, onFocus: onFocus, min: typeof min === "string" ? min : undefined, max: typeof max === "string" ? max : undefined, hasError: !!error$1 })) : (jsx("input", { id: inputId, type: type, lang: lang, value: value, onChange: e => onChange(e.target.value), onFocus: onFocus, onBlur: onBlur, placeholder: placeholder, min: min, max: max, step: step, "aria-invalid": error$1 ? true : undefined, "aria-describedby": error$1 ? errorId : undefined, className: clsx(input, error$1 && inputError) })), error$1 && (jsx("span", { id: errorId, className: error, role: "alert", children: error$1 }))] }));
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export { TextInput };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import './../styles/tokens.css';
|
|
2
|
+
import './../styles/TextInput/TextInput.css';
|
|
3
|
+
|
|
4
|
+
var error = 'TextInput_error__164di2t4';
|
|
5
|
+
var input = 'TextInput_input__164di2t2';
|
|
6
|
+
var inputError = 'TextInput_inputError__164di2t3';
|
|
7
|
+
var label = 'TextInput_label__164di2t1';
|
|
8
|
+
var wrapper = 'TextInput_wrapper__164di2t0';
|
|
9
|
+
|
|
10
|
+
export { error, input, inputError, label, wrapper };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { TextInput, type TextInputProps } from "./TextInput";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { TextInput } from './TextInput.js';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export type ToggleProps = {
|
|
3
|
+
checked: boolean;
|
|
4
|
+
onChange: (checked: boolean) => void;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
label?: string;
|
|
7
|
+
className?: string;
|
|
8
|
+
};
|
|
9
|
+
export declare function Toggle({ checked, onChange, disabled, label, className }: ToggleProps): React.ReactElement;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import { track, thumb, label, wrapper } from './Toggle.styles.js';
|
|
4
|
+
|
|
5
|
+
function Toggle({ checked, onChange, disabled, label: label$1, className }) {
|
|
6
|
+
const handleClick = () => {
|
|
7
|
+
if (!disabled) {
|
|
8
|
+
onChange(!checked);
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
return (jsxs("div", { className: clsx(wrapper, className), "data-disabled": disabled || undefined, children: [jsx("button", { type: "button", role: "switch", "aria-checked": checked, "aria-label": label$1, disabled: disabled, className: track, "data-checked": checked || undefined, onClick: handleClick, children: jsx("span", { className: thumb }) }), label$1 && jsx("span", { className: label, children: label$1 })] }));
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export { Toggle };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import './../styles/tokens.css';
|
|
2
|
+
import './../styles/Toggle/Toggle.css';
|
|
3
|
+
|
|
4
|
+
var label = 'Toggle_label__npa7nv3';
|
|
5
|
+
var thumb = 'Toggle_thumb__npa7nv2';
|
|
6
|
+
var track = 'Toggle_track__npa7nv1';
|
|
7
|
+
var wrapper = 'Toggle_wrapper__npa7nv0';
|
|
8
|
+
|
|
9
|
+
export { label, thumb, track, wrapper };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Toggle, type ToggleProps } from "./Toggle";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Toggle } from './Toggle.js';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const tree: string;
|
|
2
|
+
export declare const row: string;
|
|
3
|
+
export declare const rowDraggable: string;
|
|
4
|
+
export declare const rowDragOver: string;
|
|
5
|
+
export declare const rowHidden: string;
|
|
6
|
+
export declare const expandButton: string;
|
|
7
|
+
export declare const expandPlaceholder: string;
|
|
8
|
+
export declare const itemLabel: string;
|
|
9
|
+
export declare const actionButton: string;
|
|
10
|
+
export declare const dragHandle: string;
|