softable-pixels-web 1.2.40 → 1.2.41
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/{Chip-0yO5bwim.js → Chip-4yKggGpF.js} +2 -1
- package/dist/{Chip-0yO5bwim.js.map → Chip-4yKggGpF.js.map} +1 -1
- package/dist/{ChipList-CmO2ctak.js → ChipList-MHNN5Q3u.js} +2 -2
- package/dist/{ChipList-CmO2ctak.js.map → ChipList-MHNN5Q3u.js.map} +1 -1
- package/dist/chip-list.js +2 -2
- package/dist/chip.js +1 -1
- package/dist/context-menu.d.ts +1 -1
- package/dist/{index-R4SFv1ug.d.ts → index-Bo6Mz8jJ.d.ts} +3 -3
- package/dist/{index-Q90gI7Q2.d.ts → index-D6on4J-S.d.ts} +3 -3
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/text-area.d.ts +1 -1
- package/package.json +1 -1
|
@@ -54,6 +54,7 @@ const Chip = (props) => {
|
|
|
54
54
|
props.onClick?.(props.data);
|
|
55
55
|
}
|
|
56
56
|
return /* @__PURE__ */ jsxs(Component, {
|
|
57
|
+
type: "button",
|
|
57
58
|
disabled: isDisabled,
|
|
58
59
|
style: styles.container,
|
|
59
60
|
className: classes.container,
|
|
@@ -69,4 +70,4 @@ const Chip = (props) => {
|
|
|
69
70
|
|
|
70
71
|
//#endregion
|
|
71
72
|
export { types_exports as n, Chip as t };
|
|
72
|
-
//# sourceMappingURL=Chip-
|
|
73
|
+
//# sourceMappingURL=Chip-4yKggGpF.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Chip-
|
|
1
|
+
{"version":3,"file":"Chip-4yKggGpF.js","names":["Chip: React.FC<ChipProps>"],"sources":["../src/components/commons/toolkit/Chip/styles.ts","../src/components/commons/toolkit/Chip/types.ts","../src/components/commons/toolkit/Chip/index.tsx"],"sourcesContent":["// Types\nimport type { ChipProps } from './types'\nimport { styled } from '@hooks/useThemedStyles/types'\n\nexport function createChipStyles(props: ChipProps) {\n return styled({\n container: {\n display: 'flex',\n alignItems: 'center',\n\n borderWidth: 1,\n columnGap: '0.25rem',\n borderRadius: '0.5rem',\n paddingBlock: '0.25rem',\n paddingRight: '0.625rem',\n paddingLeft: props.data.icon ? '0.5rem' : '0.625rem',\n\n cursor: !props.viewOnly ? 'pointer' : 'default',\n\n boxShadow: 'var(--px-shadow-default)',\n borderColor: 'var(--px-border-primary)',\n color: props.isSelected ? 'white' : 'var(--px-text-primary)',\n backgroundColor: props.isSelected\n ? 'var(--px-color-primary)'\n : 'var(--px-bg)',\n\n whiteSpace: 'nowrap',\n userSelect: props.viewOnly ? 'auto' : 'none',\n MozUserSelect: props.viewOnly ? 'auto' : 'none',\n msUserSelect: props.viewOnly ? 'inherit' : 'none',\n WebkitUserSelect: props.viewOnly ? 'auto' : 'none',\n\n transition: 'background-color 0.25s ease-out',\n opacity: checkDisabled(props) ? 0.5 : 1,\n\n __rules: {\n '&:hover': {\n opacity: props.viewOnly ? 1 : 0.85\n },\n\n '&:disabled': {\n opacity: '0.5 !important',\n cursor: 'not-allowed !important'\n }\n }\n }\n })\n}\n\nfunction checkDisabled(props: ChipProps) {\n if (!props.viewOnly) return false\n return props.listDisabled || props.data.disabled\n}\n","export interface ChipProps {\n data: ChipOption\n viewOnly?: boolean\n isSelected?: boolean\n listDisabled?: boolean\n\n onClick?(value: ChipOption): void\n}\n\nexport interface ChipOption {\n value: string\n label: string\n\n disabled?: boolean\n icon?: React.ReactNode\n}\n","// External Libraries\nimport type React from 'react'\n\n// Components\nimport { Typography } from '../Typography'\n\n// Hooks\nimport { useThemedStyles } from '@hooks/useThemedStyles'\n\n// Types\nimport type { ChipProps } from './types'\n\n// Styles\nimport { createChipStyles } from './styles'\n\nexport * as ChipTypes from './types'\n\nexport const Chip: React.FC<ChipProps> = props => {\n // Hooks\n const { styles, classes } = useThemedStyles(props, createChipStyles)\n\n // Constants\n const Component = props.viewOnly ? 'span' : 'button'\n const isDisabled = props.listDisabled || props.data.disabled\n\n // Functions\n function handleClick() {\n if (isDisabled || props.viewOnly) return\n props.onClick?.(props.data)\n }\n\n return (\n <Component\n type=\"button\"\n disabled={isDisabled}\n style={styles.container}\n className={classes.container}\n onClick={handleClick}\n >\n {props.data.icon}\n\n <Typography variant=\"b2\" lineHeight=\"1.25rem\" color=\"inherit\">\n {props.data.label}\n </Typography>\n </Component>\n )\n}\n"],"mappings":";;;;;AAIA,SAAgB,iBAAiB,OAAkB;AACjD,QAAO,OAAO,EACZ,WAAW;EACT,SAAS;EACT,YAAY;EAEZ,aAAa;EACb,WAAW;EACX,cAAc;EACd,cAAc;EACd,cAAc;EACd,aAAa,MAAM,KAAK,OAAO,WAAW;EAE1C,QAAQ,CAAC,MAAM,WAAW,YAAY;EAEtC,WAAW;EACX,aAAa;EACb,OAAO,MAAM,aAAa,UAAU;EACpC,iBAAiB,MAAM,aACnB,4BACA;EAEJ,YAAY;EACZ,YAAY,MAAM,WAAW,SAAS;EACtC,eAAe,MAAM,WAAW,SAAS;EACzC,cAAc,MAAM,WAAW,YAAY;EAC3C,kBAAkB,MAAM,WAAW,SAAS;EAE5C,YAAY;EACZ,SAAS,cAAc,MAAM,GAAG,KAAM;EAEtC,SAAS;GACP,WAAW,EACT,SAAS,MAAM,WAAW,IAAI,KAC/B;GAED,cAAc;IACZ,SAAS;IACT,QAAQ;IACT;GACF;EACF,EACF,CAAC;;AAGJ,SAAS,cAAc,OAAkB;AACvC,KAAI,CAAC,MAAM,SAAU,QAAO;AAC5B,QAAO,MAAM,gBAAgB,MAAM,KAAK;;;;;;;;;AElC1C,MAAaA,QAA4B,UAAS;CAEhD,MAAM,EAAE,QAAQ,YAAY,gBAAgB,OAAO,iBAAiB;CAGpE,MAAM,YAAY,MAAM,WAAW,SAAS;CAC5C,MAAM,aAAa,MAAM,gBAAgB,MAAM,KAAK;CAGpD,SAAS,cAAc;AACrB,MAAI,cAAc,MAAM,SAAU;AAClC,QAAM,UAAU,MAAM,KAAK;;AAG7B,QACE,qBAAC;EACC,MAAK;EACL,UAAU;EACV,OAAO,OAAO;EACd,WAAW,QAAQ;EACnB,SAAS;aAER,MAAM,KAAK,MAEZ,oBAAC;GAAW,SAAQ;GAAK,YAAW;GAAU,OAAM;aACjD,MAAM,KAAK;IACD;GACH"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as styled, t as useThemedStyles } from "./useThemedStyles-Dco_54KA.js";
|
|
2
|
-
import { t as Chip } from "./Chip-
|
|
2
|
+
import { t as Chip } from "./Chip-4yKggGpF.js";
|
|
3
3
|
import { t as Label } from "./Label-CBUa-x13.js";
|
|
4
4
|
import { t as ErrorMessage } from "./ErrorMessage-6pG4hFId.js";
|
|
5
5
|
import { useEffect, useState } from "react";
|
|
@@ -111,4 +111,4 @@ const ChipList = (props) => {
|
|
|
111
111
|
|
|
112
112
|
//#endregion
|
|
113
113
|
export { ChipList as t };
|
|
114
|
-
//# sourceMappingURL=ChipList-
|
|
114
|
+
//# sourceMappingURL=ChipList-MHNN5Q3u.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChipList-
|
|
1
|
+
{"version":3,"file":"ChipList-MHNN5Q3u.js","names":["ChipsLoader: React.FC","ChipList: React.FC<ChipListProps>"],"sources":["../src/components/commons/toolkit/ChipList/components/ChipsLoader/styles.ts","../src/components/commons/toolkit/ChipList/components/ChipsLoader/index.tsx","../src/components/commons/toolkit/ChipList/hooks/useChipList/index.ts","../src/components/commons/toolkit/ChipList/styles.ts","../src/components/commons/toolkit/ChipList/index.tsx"],"sourcesContent":["// Types\nimport { styled } from '@hooks/useThemedStyles/types'\n\nexport function createChipsLoaderStyles() {\n return styled({\n container: {\n width: '5rem',\n height: '1.75rem',\n\n display: 'flex',\n\n borderRadius: '0.5rem',\n\n backgroundColor: 'var(--px-surface)'\n }\n })\n}\n","// External Libraries\nimport type React from 'react'\nimport { useEffect, useState } from 'react'\n\n// Hooks\nimport { useThemedStyles } from '@hooks/useThemedStyles'\n\n// Styles\nimport { createChipsLoaderStyles } from './styles'\n\nexport const ChipsLoader: React.FC = () => {\n // States\n const [pulseOn, setPulseOn] = useState(true)\n\n // Hooks\n const { styles } = useThemedStyles({}, createChipsLoaderStyles)\n\n useEffect(() => {\n const id = setInterval(() => setPulseOn(v => !v), 600)\n return () => clearInterval(id)\n }, [])\n\n // Functions\n function renderContent() {\n return Array.from({ length: 5 }).map((_, idx) => {\n const delayMs = idx * 120\n\n return (\n <div\n key={idx.toString()}\n style={{\n ...styles.container,\n opacity: pulseOn ? 1 : 0.6,\n transition: `opacity 600ms ease-in-out ${delayMs}ms`\n }}\n />\n )\n })\n }\n\n return <>{renderContent()}</>\n}\n","// Types\nimport type { ChipListProps } from '../../types'\nimport type { ChipOption } from '@components/commons/toolkit/Chip/types'\n\nexport function useChipList({\n value,\n canClear,\n multiple,\n onChange\n}: ChipListProps) {\n // Functions\n function handleChange(option: ChipOption) {\n const isAlreadySelected = value.includes(option.value)\n\n if (!multiple) {\n if (isAlreadySelected) {\n if (canClear) onChange?.([])\n } else onChange?.([option.value])\n\n return\n }\n\n if (isAlreadySelected) {\n if (value.length === 1) {\n if (canClear) onChange?.([])\n } else onChange?.(value.filter(v => v !== option.value))\n } else onChange?.([...value, option.value])\n }\n\n return { handleChange }\n}\n","// Types\nimport { styled } from '@hooks/useThemedStyles/types'\n\nexport function createChipListStyles() {\n return styled({\n container: {\n width: '100%',\n\n display: 'flex',\n flexDirection: 'column',\n\n rowGap: '0.375rem'\n },\n\n listContainer: {\n width: '100%',\n\n display: 'flex',\n flexWrap: 'wrap',\n\n gap: '0.5rem'\n }\n })\n}\n","// External Libraries\nimport type React from 'react'\n\n// Components\nimport { Chip } from '../Chip'\nimport { Label } from '../Label'\nimport { ErrorMessage } from '../ErrorMessage'\nimport { ChipsLoader } from './components/ChipsLoader'\n\n// Hooks\nimport { useChipList } from './hooks/useChipList'\nimport { useThemedStyles } from '@hooks/useThemedStyles'\n\n// Types\nimport type { ChipListProps } from './types'\n\n// Styles\nimport { createChipListStyles } from './styles'\n\nexport const ChipList: React.FC<ChipListProps> = props => {\n // Hooks\n const { handleChange } = useChipList(props)\n const { styles } = useThemedStyles(props, createChipListStyles)\n\n // Functions\n function renderContent() {\n if (props.isLoading) return <ChipsLoader />\n\n return props.options.map(item => (\n <Chip\n key={item.value}\n data={item}\n viewOnly={props.viewOnly}\n listDisabled={props.disabled}\n isSelected={props.value.includes(item.value)}\n onClick={handleChange}\n />\n ))\n }\n\n return (\n <div style={styles.container}>\n {props.hideLabel ? null : (\n <Label\n label={props.label}\n required={props.required}\n requiredColor={props.requiredColor}\n {...props.labelConfig}\n />\n )}\n\n <div style={styles.listContainer}>{renderContent()}</div>\n\n {props.errorMessage ? (\n <ErrorMessage message={props.errorMessage} />\n ) : null}\n </div>\n )\n}\n"],"mappings":";;;;;;;;AAGA,SAAgB,0BAA0B;AACxC,QAAO,OAAO,EACZ,WAAW;EACT,OAAO;EACP,QAAQ;EAER,SAAS;EAET,cAAc;EAEd,iBAAiB;EAClB,EACF,CAAC;;;;;ACLJ,MAAaA,oBAA8B;CAEzC,MAAM,CAAC,SAAS,cAAc,SAAS,KAAK;CAG5C,MAAM,EAAE,WAAW,gBAAgB,EAAE,EAAE,wBAAwB;AAE/D,iBAAgB;EACd,MAAM,KAAK,kBAAkB,YAAW,MAAK,CAAC,EAAE,EAAE,IAAI;AACtD,eAAa,cAAc,GAAG;IAC7B,EAAE,CAAC;CAGN,SAAS,gBAAgB;AACvB,SAAO,MAAM,KAAK,EAAE,QAAQ,GAAG,CAAC,CAAC,KAAK,GAAG,QAAQ;GAC/C,MAAM,UAAU,MAAM;AAEtB,UACE,oBAAC,SAEC,OAAO;IACL,GAAG,OAAO;IACV,SAAS,UAAU,IAAI;IACvB,YAAY,6BAA6B,QAAQ;IAClD,IALI,IAAI,UAAU,CAMnB;IAEJ;;AAGJ,QAAO,4CAAG,eAAe,GAAI;;;;;ACpC/B,SAAgB,YAAY,EAC1B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ANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "./useThemedStyles-Dco_54KA.js";
|
|
2
2
|
import "./Typography-CcQTHV-F.js";
|
|
3
|
-
import "./Chip-
|
|
3
|
+
import "./Chip-4yKggGpF.js";
|
|
4
4
|
import "./Label-CBUa-x13.js";
|
|
5
5
|
import "./ErrorMessage-6pG4hFId.js";
|
|
6
|
-
import { t as ChipList } from "./ChipList-
|
|
6
|
+
import { t as ChipList } from "./ChipList-MHNN5Q3u.js";
|
|
7
7
|
|
|
8
8
|
export { ChipList };
|
package/dist/chip.js
CHANGED
package/dist/context-menu.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as types_d_exports, t as ContextMenu } from "./index-
|
|
1
|
+
import { n as types_d_exports, t as ContextMenu } from "./index-Bo6Mz8jJ.js";
|
|
2
2
|
export { ContextMenu, types_d_exports as ContextMenuTypes };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as TypeStyles } from "./useThemedStyles-DoHwc6h5.js";
|
|
2
2
|
import { n as Placement } from "./types-CsM6b8c5.js";
|
|
3
3
|
import { ReactNode } from "react";
|
|
4
|
-
import * as
|
|
4
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
5
5
|
|
|
6
6
|
//#region src/components/commons/toolkit/ContextMenu/styles.d.ts
|
|
7
7
|
declare function createContextMenuStyles<T>(_props: ContextMenuProps<T>): {
|
|
@@ -68,7 +68,7 @@ interface ContextMenuProps<T> {
|
|
|
68
68
|
}
|
|
69
69
|
//#endregion
|
|
70
70
|
//#region src/components/commons/toolkit/ContextMenu/index.d.ts
|
|
71
|
-
declare const ContextMenu: <T extends string>(props: ContextMenuProps<T>) =>
|
|
71
|
+
declare const ContextMenu: <T extends string>(props: ContextMenuProps<T>) => react_jsx_runtime0.JSX.Element;
|
|
72
72
|
//#endregion
|
|
73
73
|
export { types_d_exports as n, ContextMenu as t };
|
|
74
|
-
//# sourceMappingURL=index-
|
|
74
|
+
//# sourceMappingURL=index-Bo6Mz8jJ.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as TextProps } from "./styleProps-Bq2PkDym.js";
|
|
2
2
|
import { r as TypeStyles } from "./useThemedStyles-DoHwc6h5.js";
|
|
3
|
-
import * as
|
|
3
|
+
import * as react_jsx_runtime1 from "react/jsx-runtime";
|
|
4
4
|
|
|
5
5
|
//#region src/components/commons/inputs/TextArea/styles.d.ts
|
|
6
6
|
declare function createTextAreaStyles(props: TextAreaProps): {
|
|
@@ -67,7 +67,7 @@ interface TextAreaProps {
|
|
|
67
67
|
}
|
|
68
68
|
//#endregion
|
|
69
69
|
//#region src/components/commons/inputs/TextArea/index.d.ts
|
|
70
|
-
declare const TextArea: (props: TextAreaProps) =>
|
|
70
|
+
declare const TextArea: (props: TextAreaProps) => react_jsx_runtime1.JSX.Element;
|
|
71
71
|
//#endregion
|
|
72
72
|
export { TextArea as t };
|
|
73
|
-
//# sourceMappingURL=index-
|
|
73
|
+
//# sourceMappingURL=index-D6on4J-S.d.ts.map
|
package/dist/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ import { t as Input } from "./index-qPJuO65u.js";
|
|
|
10
10
|
import { t as SearchInput } from "./index-MyZ_XVsH.js";
|
|
11
11
|
import { n as types_d_exports$6, t as Select } from "./index-j6W-PwB7.js";
|
|
12
12
|
import { t as index_d_exports } from "./index-CriBmhqv.js";
|
|
13
|
-
import { t as TextArea } from "./index-
|
|
13
|
+
import { t as TextArea } from "./index-D6on4J-S.js";
|
|
14
14
|
import { t as Popover } from "./index-tivXt3ba.js";
|
|
15
15
|
import { t as BasePopover } from "./index-BKsKKh1p.js";
|
|
16
16
|
import { t as Breadcrumb } from "./index-CBHEtmuG.js";
|
|
@@ -20,7 +20,7 @@ import { t as Checkbox } from "./index-DlP2AWaD.js";
|
|
|
20
20
|
import { r as types_d_exports } from "./types-Db3dpdVw.js";
|
|
21
21
|
import { Chip } from "./chip.js";
|
|
22
22
|
import { t as ChipList } from "./index-CdGHX8AR.js";
|
|
23
|
-
import { n as types_d_exports$2, t as ContextMenu } from "./index-
|
|
23
|
+
import { n as types_d_exports$2, t as ContextMenu } from "./index-Bo6Mz8jJ.js";
|
|
24
24
|
import { InfoSummary, InfoSummaryItem, InfoSummaryProps } from "./info-summary.js";
|
|
25
25
|
import { t as Pagination } from "./index-D5kC89SC.js";
|
|
26
26
|
import { ScrollPaginationContainer } from "./scroll-pagination-container.js";
|
package/dist/index.js
CHANGED
|
@@ -14,10 +14,10 @@ import { t as CheckItem } from "./CheckItem-CE27veSs.js";
|
|
|
14
14
|
import { t as InfoSummary } from "./InfoSummary-D8x-t44q.js";
|
|
15
15
|
import { t as BasePopover } from "./BasePopover-CY-9StFD.js";
|
|
16
16
|
import { n as types_exports$2, t as ContextMenu } from "./ContextMenu-CG3Anq1A.js";
|
|
17
|
-
import { n as types_exports, t as Chip } from "./Chip-
|
|
17
|
+
import { n as types_exports, t as Chip } from "./Chip-4yKggGpF.js";
|
|
18
18
|
import "./Label-CBUa-x13.js";
|
|
19
19
|
import "./ErrorMessage-6pG4hFId.js";
|
|
20
|
-
import { t as ChipList } from "./ChipList-
|
|
20
|
+
import { t as ChipList } from "./ChipList-MHNN5Q3u.js";
|
|
21
21
|
import { t as IconButton } from "./IconButton-R8wpGZU_.js";
|
|
22
22
|
import { t as Pagination } from "./Pagination-i2_x464D.js";
|
|
23
23
|
import "./Loader-BTp8PCMz.js";
|
package/dist/text-area.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as TextArea } from "./index-
|
|
1
|
+
import { t as TextArea } from "./index-D6on4J-S.js";
|
|
2
2
|
export { TextArea };
|