@rolster/react-components 19.10.0 → 19.11.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.
@@ -0,0 +1,13 @@
1
+ import { MouseEventHandler } from 'react';
2
+ import { RlsComponent } from '../../definitions';
3
+ interface ChipProps extends RlsComponent {
4
+ contrasted?: boolean;
5
+ disabled?: boolean;
6
+ icon?: string;
7
+ onClick?: MouseEventHandler<HTMLDivElement>;
8
+ onRemove?: MouseEventHandler<HTMLButtonElement>;
9
+ selected?: boolean;
10
+ }
11
+ declare function RlsChipComponent({ children, className, contrasted, disabled, icon, identifier, onClick, onRemove, rlsTheme, selected }: ChipProps): import("react/jsx-runtime").JSX.Element;
12
+ export declare const RlsChip: import("react").MemoExoticComponent<typeof RlsChipComponent>;
13
+ export {};
@@ -0,0 +1,10 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { memo } from 'react';
3
+ import { renderClassStatus } from '../../../helpers/css';
4
+ import { RlsIcon } from '../Icon/Icon';
5
+ function RlsChipComponent({ children, className, contrasted, disabled, icon, identifier, onClick, onRemove, rlsTheme, selected }) {
6
+ const classNameChip = renderClassStatus('rls-chip', { clickable: !!onClick && !disabled, contrasted, disabled, selected }, className);
7
+ return (_jsxs("div", { id: identifier, className: classNameChip, "rls-theme": rlsTheme, onClick: disabled ? undefined : onClick, children: [icon && _jsx(RlsIcon, { className: "rls-chip__icon", value: icon }), _jsx("span", { className: "rls-chip__description", children: children }), onRemove && !disabled && (_jsx("button", { className: "rls-chip__remove", type: "button", onClick: onRemove, children: _jsx(RlsIcon, { value: "close" }) }))] }));
8
+ }
9
+ export const RlsChip = memo(RlsChipComponent);
10
+ //# sourceMappingURL=Chip.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Chip.js","sourceRoot":"","sources":["../../../../../src/components/atoms/Chip/Chip.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAqB,MAAM,OAAO,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAWvC,SAAS,gBAAgB,CAAC,EACxB,QAAQ,EACR,SAAS,EACT,UAAU,EACV,QAAQ,EACR,IAAI,EACJ,UAAU,EACV,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,QAAQ,EACE;IACV,MAAM,aAAa,GAAG,iBAAiB,CACrC,UAAU,EACV,EAAE,SAAS,EAAE,CAAC,CAAC,OAAO,IAAI,CAAC,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,EACrE,SAAS,CACV,CAAC;IAEF,OAAO,CACL,eACE,EAAE,EAAE,UAAU,EACd,SAAS,EAAE,aAAa,eACb,QAAQ,EACnB,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,aAEtC,IAAI,IAAI,KAAC,OAAO,IAAC,SAAS,EAAC,gBAAgB,EAAC,KAAK,EAAE,IAAI,GAAI,EAE5D,eAAM,SAAS,EAAC,uBAAuB,YAAE,QAAQ,GAAQ,EAExD,QAAQ,IAAI,CAAC,QAAQ,IAAI,CACxB,iBAAQ,SAAS,EAAC,kBAAkB,EAAC,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAE,QAAQ,YAClE,KAAC,OAAO,IAAC,KAAK,EAAC,OAAO,GAAG,GAClB,CACV,IACG,CACP,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,IAAI,CAAC,gBAAgB,CAAC,CAAC"}
@@ -0,0 +1,31 @@
1
+ import { ReactControl } from '@rolster/react-forms';
2
+ import { ReactNode } from 'react';
3
+ import { PropsWithClassName, PropsWithRlsTheme } from '../../definitions';
4
+ import { RolsterReactHtmlControl } from '../../types';
5
+ interface ChipGroupProps<T = any, K = any> extends PropsWithRlsTheme, PropsWithClassName {
6
+ options: T[];
7
+ disabled?: boolean;
8
+ formControl?: RolsterReactHtmlControl<T>;
9
+ identifier?: string;
10
+ onValue?: ((value?: T) => void) | ((value: T) => void);
11
+ reference?: (option: T) => K;
12
+ render?: (option: T) => ReactNode;
13
+ value?: T;
14
+ }
15
+ interface ChipGroupDefinedProps<T = any, K = any> extends ChipGroupProps<T, K> {
16
+ formControl: ReactControl<HTMLElement, T>;
17
+ value: T;
18
+ onValue?: (value: T) => void;
19
+ }
20
+ interface ChipGroupVoidProps<T = any, K = any> extends Omit<ChipGroupProps<T, K>, 'value'> {
21
+ formControl: ReactControl<HTMLElement, T | undefined>;
22
+ onValue?: (value?: T) => void;
23
+ }
24
+ interface ChipGroupEmptyProps<T = any, K = any> extends Omit<ChipGroupProps<T, K>, 'formControl'> {
25
+ onValue?: (value?: T) => void;
26
+ }
27
+ declare function RlsChipGroupComponent<T = any, K = any>(props: ChipGroupDefinedProps<T, K>): ReactNode;
28
+ declare function RlsChipGroupComponent<T = any, K = any>(props: ChipGroupVoidProps<T, K>): ReactNode;
29
+ declare function RlsChipGroupComponent<T = any, K = any>(props: ChipGroupEmptyProps<T, K>): ReactNode;
30
+ export declare const RlsChipGroup: typeof RlsChipGroupComponent;
31
+ export {};
@@ -0,0 +1,34 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { memo, useCallback, useMemo, useState } from 'react';
3
+ import { renderClassStatus } from '../../../helpers/css';
4
+ import { RlsChip } from '../../atoms/Chip/Chip';
5
+ function RlsChipGroupComponent({ className, disabled: disabledProps, formControl, identifier, onValue, options, reference, render, rlsTheme, value: valueInitial }) {
6
+ const [value, setValue] = useState(formControl?.value ?? valueInitial);
7
+ const selected = useMemo(() => {
8
+ return formControl ? formControl.value : value;
9
+ }, [formControl?.value, value]);
10
+ const disabled = useMemo(() => {
11
+ return formControl?.disabled || disabledProps;
12
+ }, [formControl?.disabled, disabledProps]);
13
+ const classNameGroup = renderClassStatus('rls-chip-group', { disabled }, className);
14
+ const isSelected = useCallback((option) => {
15
+ if (selected === undefined || selected === null) {
16
+ return false;
17
+ }
18
+ return reference
19
+ ? reference(option) === reference(selected)
20
+ : option === selected;
21
+ }, [reference, selected]);
22
+ const onSelect = useCallback((option) => () => {
23
+ if (disabled) {
24
+ return;
25
+ }
26
+ setValue(option);
27
+ formControl?.setValue(option);
28
+ formControl?.touch();
29
+ onValue?.(option);
30
+ }, [disabled, formControl, onValue]);
31
+ return (_jsx("div", { id: identifier, className: classNameGroup, "rls-theme": rlsTheme, children: options.map((option, index) => (_jsx(RlsChip, { disabled: disabled, selected: isSelected(option), onClick: onSelect(option), children: render ? render(option) : String(option) }, index))) }));
32
+ }
33
+ export const RlsChipGroup = memo(RlsChipGroupComponent);
34
+ //# sourceMappingURL=ChipGroup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChipGroup.js","sourceRoot":"","sources":["../../../../../src/components/molecules/ChipGroup/ChipGroup.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAAa,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxE,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AA8ChD,SAAS,qBAAqB,CAAmB,EAC/C,SAAS,EACT,QAAQ,EAAE,aAAa,EACvB,WAAW,EACX,UAAU,EACV,OAAO,EACP,OAAO,EACP,SAAS,EACT,MAAM,EACN,QAAQ,EACR,KAAK,EAAE,YAAY,EACE;IACrB,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,WAAW,EAAE,KAAK,IAAI,YAAY,CAAC,CAAC;IAEvE,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,EAAE;QAC5B,OAAO,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC;IACjD,CAAC,EAAE,CAAC,WAAW,EAAE,KAAK,EAAE,KAAK,CAAC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AU,CAAC,MAAM,CAAC,EAC5B,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,YAExB,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,IALpC,KAAK,CAMF,CACX,CAAC,GACE,CACP,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,CAC9B,qBAAqB,CACU,CAAC"}
@@ -3,7 +3,7 @@ import { memo, useCallback, useMemo } from 'react';
3
3
  import { renderClassStatus } from '../../../helpers/css';
4
4
  import { RlsButtonIcon } from '../../atoms/ButtonIcon/ButtonIcon';
5
5
  import { RlsCheckBox } from '../../atoms/CheckBox/CheckBox';
6
- import { RlsIcon } from '../../atoms/Icon/Icon';
6
+ import { RlsChip } from '../../atoms/Chip/Chip';
7
7
  import { RlsBallot } from '../../molecules/Ballot/Ballot';
8
8
  import { RlsFieldListSuggestions } from '../../molecules/FieldListSuggestions/FieldListSuggestions';
9
9
  import { RlsMessageFormError } from '../../molecules/MessageFormError/MessageFormError';
@@ -19,7 +19,9 @@ function RlsFieldListInner({ render, suggestions, action, children, formControl,
19
19
  readonly: props.readOnly
20
20
  }, `rls-field-list rls-field-list__multi ${props.className ?? ''}`);
21
21
  const renderWithCheckbox = useCallback((element) => (_jsxs("div", { className: "rls-field-list__multi__element", children: [_jsx(RlsCheckBox, { checked: fieldList.isSelected(element) }), render(element)] })), [fieldList.isSelected, render]);
22
- return (_jsxs("div", { id: props.identifier, ref: fieldList.refContent, className: className, "rls-theme": rlsTheme, children: [children && _jsx("span", { className: "rls-field-box__label", children: children }), _jsx("div", { className: "rls-field-box__component", children: _jsxs("div", { className: "rls-field-box__body", children: [_jsx("div", { className: "rls-field-list__multi__chips", onClick: disabled ? undefined : fieldList.onClickInput, children: !fieldList.selected.length && placeholder ? (_jsx("span", { className: "rls-field-list__multi__placeholder", children: placeholder })) : (fieldList.selected.map((item, index) => (_jsxs("div", { className: "rls-field-list__multi__chip", children: [_jsx("span", { className: "rls-field-list__multi__chip__description", children: item.description }), !props.readOnly && !disabled && (_jsx("button", { className: "rls-field-list__multi__chip__remove", onClick: fieldList.onRemoveElement(item), children: _jsx(RlsIcon, { value: "close" }) }))] }, index)))) }), !props.readOnly && !disabled && (_jsx(RlsButtonIcon, { icon: "arrow-ios-down", onClick: fieldList.onClickAction }))] }) }), !msgErrorDisabled && (_jsx(RlsMessageFormError, { className: "rls-field-box__error", formControl: formControl })), _jsx(RlsFieldListSuggestions, { elements: suggestions, visible: fieldList.listIsVisible, action: action, disabled: disabled, higher: fieldList.higher, render: renderWithCheckbox, refAnchor: fieldList.refContent, refList: fieldList.refList, refSuggestions: fieldList.refSuggestions, onClickElement: fieldList.onClickElement, onKeydownElement: fieldList.onKeydownElement, onClickBackdrop: fieldList.onClickBackdrop, onHiddenAnchor: fieldList.onClickBackdrop })] }));
22
+ return (_jsxs("div", { id: props.identifier, ref: fieldList.refContent, className: className, "rls-theme": rlsTheme, children: [children && _jsx("span", { className: "rls-field-box__label", children: children }), _jsx("div", { className: "rls-field-box__component", children: _jsxs("div", { className: "rls-field-box__body", children: [_jsx("div", { className: "rls-field-list__multi__chips", onClick: disabled ? undefined : fieldList.onClickInput, children: !fieldList.selected.length && placeholder ? (_jsx("span", { className: "rls-field-list__multi__placeholder", children: placeholder })) : (fieldList.selected.map((item, index) => (_jsx(RlsChip, { onRemove: !props.readOnly && !disabled
23
+ ? fieldList.onRemoveElement(item)
24
+ : undefined, children: item.description }, index)))) }), !props.readOnly && !disabled && (_jsx(RlsButtonIcon, { icon: "arrow-ios-down", onClick: fieldList.onClickAction }))] }) }), !msgErrorDisabled && (_jsx(RlsMessageFormError, { className: "rls-field-box__error", formControl: formControl })), _jsx(RlsFieldListSuggestions, { elements: suggestions, visible: fieldList.listIsVisible, action: action, disabled: disabled, higher: fieldList.higher, render: renderWithCheckbox, refAnchor: fieldList.refContent, refList: fieldList.refList, refSuggestions: fieldList.refSuggestions, onClickElement: fieldList.onClickElement, onKeydownElement: fieldList.onKeydownElement, onClickBackdrop: fieldList.onClickBackdrop, onHiddenAnchor: fieldList.onClickBackdrop })] }));
23
25
  }
24
26
  function RlsFieldListTemplateComponent(props) {
25
27
  const fieldList = useFieldList(props);
@@ -1 +1 @@
1
- {"version":3,"file":"FieldList.js","sourceRoot":"","sources":["../../../../../src/components/organisms/FieldList/FieldList.tsx"],"names":[],"mappings":";AAKA,OAAO,EAAE,IAAI,EAAa,WAAW,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,OAAO,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAC1D,OAAO,EAEL,uBAAuB,EACxB,MAAM,2DAA2D,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,mDAAmD,CAAC;AACxF,OAAO,EAAoB,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAkCvE,SAAS,iBAAiB,CAA6C,EACrE,MAAM,EACN,WAAW,EACX,MAAM,EACN,QAAQ,EACR,WAAW,EACX,SAAS,EACT,gBAAgB,EAChB,WAAW,EACX,QAAQ,EACR,GAAG,KAAK,EACkB;IAC1B,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,EAAE;QAC5B,OAAO,WAAW,EAAE,QAAQ,IAAI,KAAK,CAAC,QAAQ,CAAC;IACjD,CAAC,EAAE,CAAC,WAAW,EAAE,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC;IAE5C,MAAM,SAAS,GAAG,iBAAiB,CACjC,eAAe,EACf;QACE,OAAO,EAAE,SAAS,CAAC,aAAa,IAAI,CAAC,QAAQ;QAC7C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IAEtC,MAAM,MAAM,GAAG,WAAW,CACxB,CAAC,OAAuB,EAAE,EAAE,CAAC,CAC3B,KAAC,SAAS,IACR,SAAS,EAAC,wBAAwB,EAClC,QAAQ,EAAE,OAAO,CAAC,QAAQ,EAC1B,GAAG,EAAE,OAAO,CAAC,GAAG,EAChB,QAAQ,EAAE,OAAO,CAAC,QAAQ,YAE1B,yBAAO,OAAO,CAAC,KAAK,GAAQ,GAClB,CACb,EACD,EAAE,CACH,CAAC;IAEF,OAAO,KAAC,iBAAiB,OAAK,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,GAAI,CAAC;AAChF,CAAC;AAED,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,CAC9B,qBAAqB,CACU,CAAC"}
1
+ {"version":3,"file":"FieldList.js","sourceRoot":"","sources":["../../../../../src/components/organisms/FieldList/FieldList.tsx"],"names":[],"mappings":";AAKA,OAAO,EAAE,IAAI,EAAa,WAAW,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,OAAO,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAC1D,OAAO,EAEL,uBAAuB,EACxB,MAAM,2DAA2D,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,mDAAmD,CAAC;AACxF,OAAO,EAAoB,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAkCvE,SAAS,iBAAiB,CAA6C,EACrE,MAAM,EACN,WAAW,EACX,MAAM,EACN,QAAQ,EACR,WAAW,EACX,SAAS,EACT,gBAAgB,EAChB,WAAW,EACX,QAAQ,EACR,GAAG,KAAK,EACkB;IAC1B,MAAM,QAA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AI,CAAC;AAChE,CAAC;AAED,MAAM,CAAC,MAAM,oBAAoB,GAAG,IAAI,CACtC,6BAA6B,CACU,CAAC;AAkD1C,SAAS,qBAAqB,CAC5B,KAAwC;IAExC,MAAM,SAAS,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC;IAEtC,MAAM,MAAM,GAAG,WAAW,CACxB,CAAC,OAAuB,EAAE,EAAE,CAAC,CAC3B,KAAC,SAAS,IACR,SAAS,EAAC,wBAAwB,EAClC,QAAQ,EAAE,OAAO,CAAC,QAAQ,EAC1B,GAAG,EAAE,OAAO,CAAC,GAAG,EAChB,QAAQ,EAAE,OAAO,CAAC,QAAQ,YAE1B,yBAAO,OAAO,CAAC,KAAK,GAAQ,GAClB,CACb,EACD,EAAE,CACH,CAAC;IAEF,OAAO,KAAC,iBAAiB,OAAK,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,GAAI,CAAC;AAChF,CAAC;AAED,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,CAC9B,qBAAqB,CACU,CAAC"}
@@ -0,0 +1,36 @@
1
+ import { ReactControl } from '@rolster/react-forms';
2
+ import { ReactNode } from 'react';
3
+ import { PropsWithClassName, PropsWithRlsTheme } from '../../definitions';
4
+ import { RolsterReactHtmlControl } from '../../types';
5
+ interface LedColorProps extends PropsWithRlsTheme, PropsWithClassName {
6
+ color?: string;
7
+ disabled?: boolean;
8
+ formControl?: RolsterReactHtmlControl<string>;
9
+ identifier?: string;
10
+ onValue?: ((value?: string) => void) | ((value: string) => void);
11
+ readOnly?: boolean;
12
+ value?: string;
13
+ }
14
+ interface LedColorDefinedProps extends LedColorProps {
15
+ formControl: ReactControl<HTMLElement, string>;
16
+ value: string;
17
+ onValue?: (value: string) => void;
18
+ }
19
+ interface LedColorUndefinedProps extends LedColorProps {
20
+ formControl: ReactControl<HTMLElement, string | undefined>;
21
+ value: undefined;
22
+ onValue?: (value?: string) => void;
23
+ }
24
+ interface LedColorVoidProps extends Omit<LedColorProps, 'value'> {
25
+ formControl: ReactControl<HTMLElement, string | undefined>;
26
+ onValue?: (value?: string) => void;
27
+ }
28
+ interface LedColorEmptyProps extends Omit<LedColorProps, 'formControl'> {
29
+ onValue?: (value?: string) => void;
30
+ }
31
+ declare function RlsLedColorComponent(props: LedColorDefinedProps): ReactNode;
32
+ declare function RlsLedColorComponent(props: LedColorUndefinedProps): ReactNode;
33
+ declare function RlsLedColorComponent(props: LedColorVoidProps): ReactNode;
34
+ declare function RlsLedColorComponent(props: LedColorEmptyProps): ReactNode;
35
+ export declare const RlsLedColor: typeof RlsLedColorComponent;
36
+ export {};
@@ -0,0 +1,48 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { PickerListenerEvent } from '@rolster/components';
3
+ import { memo, useCallback, useMemo, useState } from 'react';
4
+ import { hexIsValid, normalizeHex } from '../../../helpers/color';
5
+ import { renderClassStatus } from '../../../helpers/css';
6
+ import { RlsLed } from '../../atoms/Led/Led';
7
+ import { RlsModal } from '../Modal/Modal';
8
+ import { RlsPickerColor } from '../PickerColor/PickerColor';
9
+ function RlsLedColorComponent({ className, color, disabled: disabledProps, formControl, identifier, onValue, readOnly, rlsTheme, value: valueInitial }) {
10
+ const [value, setValue] = useState(formControl?.value ?? valueInitial);
11
+ const [modalIsVisible, setModalIsVisible] = useState(false);
12
+ const [pickerKey, setPickerKey] = useState(0);
13
+ const colorValue = useMemo(() => {
14
+ return formControl ? formControl.value : value;
15
+ }, [formControl?.value, value]);
16
+ const disabled = useMemo(() => {
17
+ return formControl?.disabled || disabledProps;
18
+ }, [formControl?.disabled, disabledProps]);
19
+ const ledColor = useMemo(() => {
20
+ return colorValue && hexIsValid(colorValue)
21
+ ? normalizeHex(colorValue)
22
+ : undefined;
23
+ }, [colorValue]);
24
+ const classNameLed = renderClassStatus('rls-led-color', { disabled, error: formControl?.wrong, readonly: readOnly }, className);
25
+ const onChange = useCallback((value) => {
26
+ setValue(value);
27
+ onValue?.(value);
28
+ }, [onValue]);
29
+ const onClickLed = useCallback(() => {
30
+ if (!disabled && !readOnly) {
31
+ setPickerKey((key) => key + 1);
32
+ setModalIsVisible(true);
33
+ }
34
+ }, [disabled, readOnly]);
35
+ const onListener = useCallback(({ event, value }) => {
36
+ if (event !== PickerListenerEvent.Cancel) {
37
+ onChange(value);
38
+ }
39
+ formControl?.touch();
40
+ setModalIsVisible(false);
41
+ }, [formControl, onChange]);
42
+ const onBackdrop = useCallback(() => {
43
+ setModalIsVisible(false);
44
+ }, []);
45
+ return (_jsxs("div", { id: identifier, className: classNameLed, "rls-theme": rlsTheme, children: [_jsx("button", { className: "rls-led-color__trigger", type: "button", disabled: disabled, onClick: onClickLed, children: _jsx(RlsLed, { color: ledColor, rlsTheme: rlsTheme }) }), _jsx(RlsModal, { className: "rls-modal-color", visible: modalIsVisible, rlsTheme: rlsTheme, onBackdrop: onBackdrop, children: _jsx(RlsPickerColor, { formControl: formControl, color: ledColor ?? color, disabled: disabled, onListener: onListener }, pickerKey) })] }));
46
+ }
47
+ export const RlsLedColor = memo(RlsLedColorComponent);
48
+ //# sourceMappingURL=LedColor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LedColor.js","sourceRoot":"","sources":["../../../../../src/components/organisms/LedColor/LedColor.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAE1D,OAAO,EAAE,IAAI,EAAa,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxE,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAG7C,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAqC5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,QAAQ,EAAE,QAAQ,EAClB,UAAU,EAAE,UAAU,YAEtB,KAAC,cAAc,IAEb,WAAW,EAAE,WAAW,EACxB,KAAK,EAAE,QAAQ,IAAI,KAAK,EACxB,QAAQ,EAAE,QAAQ,EAClB,UAAU,EAAE,UAAU,IAJjB,SAAS,CAKd,GACO,IACP,CACP,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,CAC7B,oBAAoB,CACU,CAAC"}
@@ -8,6 +8,7 @@ export * from './components/atoms/ButtonAction/ButtonAction';
8
8
  export * from './components/atoms/ButtonIcon/ButtonIcon';
9
9
  export * from './components/atoms/ButtonOption/ButtonOption';
10
10
  export * from './components/atoms/CheckBox/CheckBox';
11
+ export * from './components/atoms/Chip/Chip';
11
12
  export * from './components/atoms/Icon/Icon';
12
13
  export * from './components/atoms/Image/Image';
13
14
  export * from './components/atoms/Input/Input';
@@ -41,6 +42,7 @@ export * from './components/molecules/Body/Body';
41
42
  export * from './components/molecules/ButtonProgress/ButtonProgress';
42
43
  export * from './components/molecules/ButtonStepper/ButtonStepper';
43
44
  export * from './components/molecules/ButtonToggle/ButtonToggle';
45
+ export * from './components/molecules/ChipGroup/ChipGroup';
44
46
  export * from './components/molecules/Content/Content';
45
47
  export * from './components/molecules/FieldArea/FieldArea';
46
48
  export * from './components/molecules/FieldDecimal/FieldDecimal';
@@ -89,6 +91,7 @@ export * from './components/organisms/FieldSelect/FieldSelectController';
89
91
  export * from './components/organisms/FormNavigation/FormNavigation';
90
92
  export * from './components/organisms/ImageChooser/ImageChooser';
91
93
  export * from './components/organisms/ImageEditor/ImageEditor';
94
+ export * from './components/organisms/LedColor/LedColor';
92
95
  export * from './components/organisms/Modal/Modal';
93
96
  export * from './components/organisms/ModalClock/ModalClock';
94
97
  export * from './components/organisms/ModalDate/ModalDate';
package/dist/esm/index.js CHANGED
@@ -8,6 +8,7 @@ export * from './components/atoms/ButtonAction/ButtonAction';
8
8
  export * from './components/atoms/ButtonIcon/ButtonIcon';
9
9
  export * from './components/atoms/ButtonOption/ButtonOption';
10
10
  export * from './components/atoms/CheckBox/CheckBox';
11
+ export * from './components/atoms/Chip/Chip';
11
12
  export * from './components/atoms/Icon/Icon';
12
13
  export * from './components/atoms/Image/Image';
13
14
  export * from './components/atoms/Input/Input';
@@ -41,6 +42,7 @@ export * from './components/molecules/Body/Body';
41
42
  export * from './components/molecules/ButtonProgress/ButtonProgress';
42
43
  export * from './components/molecules/ButtonStepper/ButtonStepper';
43
44
  export * from './components/molecules/ButtonToggle/ButtonToggle';
45
+ export * from './components/molecules/ChipGroup/ChipGroup';
44
46
  export * from './components/molecules/Content/Content';
45
47
  export * from './components/molecules/FieldArea/FieldArea';
46
48
  export * from './components/molecules/FieldDecimal/FieldDecimal';
@@ -89,6 +91,7 @@ export * from './components/organisms/FieldSelect/FieldSelectController';
89
91
  export * from './components/organisms/FormNavigation/FormNavigation';
90
92
  export * from './components/organisms/ImageChooser/ImageChooser';
91
93
  export * from './components/organisms/ImageEditor/ImageEditor';
94
+ export * from './components/organisms/LedColor/LedColor';
92
95
  export * from './components/organisms/Modal/Modal';
93
96
  export * from './components/organisms/ModalClock/ModalClock';
94
97
  export * from './components/organisms/ModalDate/ModalDate';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAC;AACjD,cAAc,sCAAsC,CAAC;AACrD,cAAc,kCAAkC,CAAC;AACjD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,0CAA0C,CAAC;AACzD,cAAc,kCAAkC,CAAC;AACjD,cAAc,8CAA8C,CAAC;AAC7D,cAAc,0CAA0C,CAAC;AACzD,cAAc,8CAA8C,CAAC;AAC7D,cAAc,sCAAsC,CAAC;AACrD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,8CAA8C,CAAC;AAC7D,cA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cAAc,+CAA+C,CAAC;AAC9D,cAAc,gCAAgC,CAAC;AAC/C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yBAAyB,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,cAAc,SAAS,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rolster/react-components",
3
- "version": "19.10.0",
3
+ "version": "19.11.0",
4
4
  "type": "module",
5
5
  "description": "Package containing UI components for React Project.",
6
6
  "license": "MIT",
@@ -50,7 +50,7 @@
50
50
  "devDependencies": {
51
51
  "@eslint/js": "^10.0.1",
52
52
  "@rolster/rollup": "^2.2.0",
53
- "@rolster/styles-foundations": "^3.7.0",
53
+ "@rolster/styles-foundations": "^3.9.0",
54
54
  "@rolster/types": "^1.1.1",
55
55
  "@types/react": "^19.0.0",
56
56
  "@types/react-dom": "^19.0.0",
package/readme.md CHANGED
@@ -112,6 +112,7 @@ Components that display a list of options (`RlsFieldSelect`, `RlsFieldList`, `Rl
112
112
  | `RlsButtonOption` | Icon button that behaves as one option of a single selection over a control |
113
113
  | `RlsCheckBox` | Checkbox mark driven by the `checked` prop |
114
114
  | `RlsCheckBoxControl` | `RlsCheckBox` bound to a `boolean` control |
115
+ | `RlsChip` | Compact label with optional icon, remove button and clickable state |
115
116
  | `RlsHoverSwap` | Renders `children` and swaps it for `content` while the pointer is over it |
116
117
  | `RlsIcon` | Renders the glyph `rls-icon-{value}`, with skeleton state |
117
118
  | `RlsImage` | `img` that shows a skeleton until the source finishes loading |
@@ -174,6 +175,7 @@ function Header({ requesting, onSave }: HeaderProps) {
174
175
  | `RlsButtonProgress` | Action button surrounded by a circular progress while `progressing` |
175
176
  | `RlsButtonStepper` | Pair of buttons that emit a down and an up action |
176
177
  | `RlsButtonToggle` | Action button with a second button that opens the list of `options` |
178
+ | `RlsChipGroup` | Group of chips that behaves as a single selection over a list of values |
177
179
  | `RlsContent` | Content container of an application page |
178
180
  | `RlsFieldArea` | Labelled field over `RlsAreaText`, with an optional counter and its error message |
179
181
  | `RlsFieldDecimal` | Labelled field over `RlsInputDecimal` with its error message |
@@ -261,6 +263,7 @@ function Account() {
261
263
  | `RlsFormNavigation` | Navigation panel that slides over a form |
262
264
  | `RlsImageChooser` | Avatar that opens the file selector and the image editor |
263
265
  | `RlsImageEditor` | Image editor with zoom, crop by ratio and export to `ImageEditorValue` |
266
+ | `RlsLedColor` | Led that opens the color picker and shows the selected color |
264
267
  | `RlsModal` | Modal window with backdrop |
265
268
  | `RlsModalClock` | Modal that hosts `RlsPickerClock` |
266
269
  | `RlsModalDate` | Modal that hosts `RlsPickerDate` |