@e1011/es-kit 1.0.214 → 1.0.218

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.
Files changed (141) hide show
  1. package/dist/hooks/esm/index.css +76 -24
  2. package/dist/hooks/index.css +76 -24
  3. package/dist/lib/cjs/index.css +83 -31
  4. package/dist/lib/cjs/src/core/ui/components/container/CollapsibleContainer.js.map +1 -1
  5. package/dist/lib/cjs/src/core/ui/components/container/ResizableContainer.js +1 -1
  6. package/dist/lib/cjs/src/core/ui/components/container/ResizableContainer.js.map +1 -1
  7. package/dist/lib/cjs/src/core/ui/components/container/layoutBox/LayoutBox.js +2 -0
  8. package/dist/lib/cjs/src/core/ui/components/container/layoutBox/LayoutBox.js.map +1 -0
  9. package/dist/lib/cjs/src/core/ui/components/container/{layoutBox.module.scss.js → layoutBox/layoutBox.module.scss.js} +1 -1
  10. package/dist/lib/cjs/src/core/ui/components/container/layoutBox/layoutBox.types.js.map +1 -0
  11. package/dist/lib/cjs/src/core/ui/components/container/lazyComponent/LazyComponent.js +2 -0
  12. package/dist/lib/cjs/src/core/ui/components/container/lazyComponent/LazyComponent.js.map +1 -0
  13. package/dist/lib/cjs/src/core/ui/components/container/lazyComponent/lazyComponent.module.scss.js +2 -0
  14. package/dist/lib/cjs/src/core/ui/components/container/lazyComponent/lazyComponent.module.scss.js.map +1 -0
  15. package/dist/lib/cjs/src/core/ui/components/dividers/DividerLine.js.map +1 -1
  16. package/dist/lib/cjs/src/core/ui/components/error/ErrorBoundary.js +2 -0
  17. package/dist/lib/cjs/src/core/ui/components/error/ErrorBoundary.js.map +1 -0
  18. package/dist/lib/cjs/src/core/ui/components/error/errorBoundary.module.scss.js +2 -0
  19. package/dist/lib/cjs/src/core/ui/components/error/errorBoundary.module.scss.js.map +1 -0
  20. package/dist/lib/cjs/src/core/ui/components/molecules/layouts/FlowLayout.js +1 -1
  21. package/dist/lib/cjs/src/core/ui/components/molecules/layouts/FlowLayout.js.map +1 -1
  22. package/dist/lib/cjs/src/index.js +1 -1
  23. package/dist/lib/esm/index.css +83 -31
  24. package/dist/lib/esm/src/core/ui/components/container/CollapsibleContainer.js.map +1 -1
  25. package/dist/lib/esm/src/core/ui/components/container/ResizableContainer.js +1 -1
  26. package/dist/lib/esm/src/core/ui/components/container/ResizableContainer.js.map +1 -1
  27. package/dist/lib/esm/src/core/ui/components/container/layoutBox/LayoutBox.js +2 -0
  28. package/dist/lib/esm/src/core/ui/components/container/layoutBox/LayoutBox.js.map +1 -0
  29. package/dist/lib/esm/src/core/ui/components/container/{layoutBox.module.scss.js → layoutBox/layoutBox.module.scss.js} +1 -1
  30. package/dist/lib/esm/src/core/ui/components/container/layoutBox/layoutBox.types.js.map +1 -0
  31. package/dist/lib/esm/src/core/ui/components/container/lazyComponent/LazyComponent.js +2 -0
  32. package/dist/lib/esm/src/core/ui/components/container/lazyComponent/LazyComponent.js.map +1 -0
  33. package/dist/lib/esm/src/core/ui/components/container/lazyComponent/lazyComponent.module.scss.js +2 -0
  34. package/dist/lib/esm/src/core/ui/components/container/lazyComponent/lazyComponent.module.scss.js.map +1 -0
  35. package/dist/lib/esm/src/core/ui/components/dividers/DividerLine.js.map +1 -1
  36. package/dist/lib/esm/src/core/ui/components/error/ErrorBoundary.js +2 -0
  37. package/dist/lib/esm/src/core/ui/components/error/ErrorBoundary.js.map +1 -0
  38. package/dist/lib/esm/src/core/ui/components/error/errorBoundary.module.scss.js +2 -0
  39. package/dist/lib/esm/src/core/ui/components/error/errorBoundary.module.scss.js.map +1 -0
  40. package/dist/lib/esm/src/core/ui/components/molecules/layouts/FlowLayout.js +1 -1
  41. package/dist/lib/esm/src/core/ui/components/molecules/layouts/FlowLayout.js.map +1 -1
  42. package/dist/lib/esm/src/index.js +1 -1
  43. package/dist/lib/tsconfig.tsbuildinfo +1 -1
  44. package/dist/types/src/core/ui/components/container/CollapsibleContainer.d.ts +1 -1
  45. package/dist/types/src/core/ui/components/container/CollapsibleContainer.d.ts.map +1 -1
  46. package/dist/types/src/core/ui/components/container/ResizableContainer.d.ts +1 -1
  47. package/dist/types/src/core/ui/components/container/ResizableContainer.d.ts.map +1 -1
  48. package/dist/types/src/core/ui/components/container/index.d.ts +3 -2
  49. package/dist/types/src/core/ui/components/container/index.d.ts.map +1 -1
  50. package/dist/types/src/core/ui/components/container/layoutBox/LayoutBox.d.ts.map +1 -0
  51. package/dist/types/src/core/ui/components/container/layoutBox/LayoutBox.test.d.ts.map +1 -0
  52. package/dist/types/src/core/ui/components/container/layoutBox/layoutBox.types.d.ts.map +1 -0
  53. package/dist/types/src/core/ui/components/container/lazyComponent/LazyComponent.d.ts +25 -0
  54. package/dist/types/src/core/ui/components/container/lazyComponent/LazyComponent.d.ts.map +1 -0
  55. package/dist/types/src/core/ui/components/container/lazyComponent/lazyComponent.stories.d.ts +8 -0
  56. package/dist/types/src/core/ui/components/container/lazyComponent/lazyComponent.stories.d.ts.map +1 -0
  57. package/dist/types/src/core/ui/components/dividers/DividerLine.d.ts +1 -2
  58. package/dist/types/src/core/ui/components/dividers/DividerLine.d.ts.map +1 -1
  59. package/dist/types/src/core/ui/components/error/ErrorBoundary.d.ts +22 -0
  60. package/dist/types/src/core/ui/components/error/ErrorBoundary.d.ts.map +1 -0
  61. package/dist/types/src/core/ui/components/error/errorBoundary.stories.d.ts +5 -0
  62. package/dist/types/src/core/ui/components/error/errorBoundary.stories.d.ts.map +1 -0
  63. package/dist/types/src/core/ui/components/error/errorBoundary.test.d.ts +5 -0
  64. package/dist/types/src/core/ui/components/error/errorBoundary.test.d.ts.map +1 -0
  65. package/dist/types/src/core/ui/components/error/errorBoundary.types.d.ts +7 -0
  66. package/dist/types/src/core/ui/components/error/errorBoundary.types.d.ts.map +1 -0
  67. package/dist/types/src/core/ui/components/error/index.d.ts +3 -0
  68. package/dist/types/src/core/ui/components/error/index.d.ts.map +1 -0
  69. package/dist/types/src/core/ui/components/index.d.ts +1 -0
  70. package/dist/types/src/core/ui/components/index.d.ts.map +1 -1
  71. package/dist/types/src/core/ui/components/molecules/layouts/flowLayout.types.d.ts +1 -1
  72. package/dist/types/src/core/ui/components/molecules/layouts/flowLayout.types.d.ts.map +1 -1
  73. package/dist/ui/esm/index.css +83 -31
  74. package/dist/ui/esm/src/core/ui/components/container/CollapsibleContainer.js.map +1 -1
  75. package/dist/ui/esm/src/core/ui/components/container/ResizableContainer.js +1 -1
  76. package/dist/ui/esm/src/core/ui/components/container/ResizableContainer.js.map +1 -1
  77. package/dist/ui/esm/src/core/ui/components/container/layoutBox/LayoutBox.js +2 -0
  78. package/dist/ui/esm/src/core/ui/components/container/layoutBox/LayoutBox.js.map +1 -0
  79. package/dist/ui/esm/src/core/ui/components/container/{layoutBox.module.scss.js → layoutBox/layoutBox.module.scss.js} +1 -1
  80. package/dist/ui/esm/src/core/ui/components/container/layoutBox/layoutBox.types.js.map +1 -0
  81. package/dist/ui/esm/src/core/ui/components/container/lazyComponent/LazyComponent.js +2 -0
  82. package/dist/ui/esm/src/core/ui/components/container/lazyComponent/LazyComponent.js.map +1 -0
  83. package/dist/ui/esm/src/core/ui/components/container/lazyComponent/lazyComponent.module.scss.js +2 -0
  84. package/dist/ui/esm/src/core/ui/components/container/lazyComponent/lazyComponent.module.scss.js.map +1 -0
  85. package/dist/ui/esm/src/core/ui/components/dividers/DividerLine.js.map +1 -1
  86. package/dist/ui/esm/src/core/ui/components/error/ErrorBoundary.js +2 -0
  87. package/dist/ui/esm/src/core/ui/components/error/ErrorBoundary.js.map +1 -0
  88. package/dist/ui/esm/src/core/ui/components/error/errorBoundary.module.scss.js +2 -0
  89. package/dist/ui/esm/src/core/ui/components/error/errorBoundary.module.scss.js.map +1 -0
  90. package/dist/ui/esm/src/core/ui/components/molecules/layouts/FlowLayout.js +1 -1
  91. package/dist/ui/esm/src/core/ui/components/molecules/layouts/FlowLayout.js.map +1 -1
  92. package/dist/ui/esm/src/core/ui/index.js +1 -1
  93. package/dist/ui/index.css +83 -31
  94. package/dist/ui/src/core/ui/components/container/CollapsibleContainer.js.map +1 -1
  95. package/dist/ui/src/core/ui/components/container/ResizableContainer.js +1 -1
  96. package/dist/ui/src/core/ui/components/container/ResizableContainer.js.map +1 -1
  97. package/dist/ui/src/core/ui/components/container/layoutBox/LayoutBox.js +2 -0
  98. package/dist/ui/src/core/ui/components/container/layoutBox/LayoutBox.js.map +1 -0
  99. package/dist/ui/src/core/ui/components/container/{layoutBox.module.scss.js → layoutBox/layoutBox.module.scss.js} +1 -1
  100. package/dist/ui/src/core/ui/components/container/layoutBox/layoutBox.types.js.map +1 -0
  101. package/dist/ui/src/core/ui/components/container/lazyComponent/LazyComponent.js +2 -0
  102. package/dist/ui/src/core/ui/components/container/lazyComponent/LazyComponent.js.map +1 -0
  103. package/dist/ui/src/core/ui/components/container/lazyComponent/lazyComponent.module.scss.js +2 -0
  104. package/dist/ui/src/core/ui/components/container/lazyComponent/lazyComponent.module.scss.js.map +1 -0
  105. package/dist/ui/src/core/ui/components/dividers/DividerLine.js.map +1 -1
  106. package/dist/ui/src/core/ui/components/error/ErrorBoundary.js +2 -0
  107. package/dist/ui/src/core/ui/components/error/ErrorBoundary.js.map +1 -0
  108. package/dist/ui/src/core/ui/components/error/errorBoundary.module.scss.js +2 -0
  109. package/dist/ui/src/core/ui/components/error/errorBoundary.module.scss.js.map +1 -0
  110. package/dist/ui/src/core/ui/components/molecules/layouts/FlowLayout.js +1 -1
  111. package/dist/ui/src/core/ui/components/molecules/layouts/FlowLayout.js.map +1 -1
  112. package/dist/ui/src/core/ui/index.js +1 -1
  113. package/dist/utils/esm/index.css +76 -24
  114. package/dist/utils/index.css +76 -24
  115. package/package.json +25 -3
  116. package/dist/lib/cjs/src/core/ui/components/container/LayoutBox.js +0 -2
  117. package/dist/lib/cjs/src/core/ui/components/container/LayoutBox.js.map +0 -1
  118. package/dist/lib/cjs/src/core/ui/components/container/layoutBox.types.js.map +0 -1
  119. package/dist/lib/esm/src/core/ui/components/container/LayoutBox.js +0 -2
  120. package/dist/lib/esm/src/core/ui/components/container/LayoutBox.js.map +0 -1
  121. package/dist/lib/esm/src/core/ui/components/container/layoutBox.types.js.map +0 -1
  122. package/dist/types/src/core/ui/components/container/LayoutBox.d.ts.map +0 -1
  123. package/dist/types/src/core/ui/components/container/LayoutBox.test.d.ts.map +0 -1
  124. package/dist/types/src/core/ui/components/container/layoutBox.types.d.ts.map +0 -1
  125. package/dist/ui/esm/src/core/ui/components/container/LayoutBox.js +0 -2
  126. package/dist/ui/esm/src/core/ui/components/container/LayoutBox.js.map +0 -1
  127. package/dist/ui/esm/src/core/ui/components/container/layoutBox.types.js.map +0 -1
  128. package/dist/ui/src/core/ui/components/container/LayoutBox.js +0 -2
  129. package/dist/ui/src/core/ui/components/container/LayoutBox.js.map +0 -1
  130. package/dist/ui/src/core/ui/components/container/layoutBox.types.js.map +0 -1
  131. /package/dist/lib/cjs/src/core/ui/components/container/{layoutBox.module.scss.js.map → layoutBox/layoutBox.module.scss.js.map} +0 -0
  132. /package/dist/lib/cjs/src/core/ui/components/container/{layoutBox.types.js → layoutBox/layoutBox.types.js} +0 -0
  133. /package/dist/lib/esm/src/core/ui/components/container/{layoutBox.module.scss.js.map → layoutBox/layoutBox.module.scss.js.map} +0 -0
  134. /package/dist/lib/esm/src/core/ui/components/container/{layoutBox.types.js → layoutBox/layoutBox.types.js} +0 -0
  135. /package/dist/types/src/core/ui/components/container/{LayoutBox.d.ts → layoutBox/LayoutBox.d.ts} +0 -0
  136. /package/dist/types/src/core/ui/components/container/{LayoutBox.test.d.ts → layoutBox/LayoutBox.test.d.ts} +0 -0
  137. /package/dist/types/src/core/ui/components/container/{layoutBox.types.d.ts → layoutBox/layoutBox.types.d.ts} +0 -0
  138. /package/dist/ui/esm/src/core/ui/components/container/{layoutBox.module.scss.js.map → layoutBox/layoutBox.module.scss.js.map} +0 -0
  139. /package/dist/ui/esm/src/core/ui/components/container/{layoutBox.types.js → layoutBox/layoutBox.types.js} +0 -0
  140. /package/dist/ui/src/core/ui/components/container/{layoutBox.module.scss.js.map → layoutBox/layoutBox.module.scss.js.map} +0 -0
  141. /package/dist/ui/src/core/ui/components/container/{layoutBox.types.js → layoutBox/layoutBox.types.js} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@e1011/es-kit",
3
- "version": "1.0.214",
3
+ "version": "1.0.218",
4
4
  "main": "dist/lib/cjs/src/index.js",
5
5
  "module": "dist/lib/esm/src/index.js",
6
6
  "sideEffects": false,
@@ -68,7 +68,10 @@
68
68
  "test:coverage": "jest ./src --coverage --verbose",
69
69
  "test:watch": "jest ./src --watch --verbose",
70
70
  "tsc": "tsc",
71
- "prepush": "yarn lint && yarn test && yarn tsc"
71
+ "prepush": "yarn lint && yarn test && yarn tsc",
72
+ "generate:scss:types": "ts-node --esm ./scripts/typed-scss-modules/index.mts src",
73
+ "storybook": "storybook dev -p 6006",
74
+ "build-storybook": "storybook build"
72
75
  },
73
76
  "devDependencies": {
74
77
  "@babel/cli": "^7.16.0",
@@ -84,27 +87,41 @@
84
87
  "@babel/preset-env": "^7.16.4",
85
88
  "@babel/preset-react": "^7.16.7",
86
89
  "@babel/preset-typescript": "^7.16.0",
90
+ "@chromatic-com/storybook": "^1.2.25",
87
91
  "@earlorg/eslint-config": "^1.1.2",
88
92
  "@rollup/plugin-babel": "^6.0.3",
89
93
  "@rollup/plugin-commonjs": "^25.0.7",
90
94
  "@rollup/plugin-json": "^6.1.0",
91
95
  "@rollup/plugin-node-resolve": "^15.2.3",
92
96
  "@rollup/plugin-terser": "^0.4.0",
97
+ "@storybook/addon-essentials": "^8.0.4",
98
+ "@storybook/addon-interactions": "^8.0.4",
99
+ "@storybook/addon-links": "^8.0.4",
100
+ "@storybook/addon-onboarding": "^8.0.4",
101
+ "@storybook/blocks": "^8.0.4",
102
+ "@storybook/react": "^8.0.4",
103
+ "@storybook/react-vite": "^8.0.4",
104
+ "@storybook/test": "^8.0.4",
93
105
  "@testing-library/jest-dom": "^5.16.5",
94
106
  "@testing-library/react": "^13.4.0",
95
107
  "@testing-library/user-event": "^14.4.3",
108
+ "@types/inquirer": "^9.0.7",
96
109
  "@types/jest": "^27.0.3",
97
110
  "@types/lodash-es": "^4.17.5",
98
111
  "@types/ramda": "^0.27.62",
99
112
  "@types/react": "^18.0.34",
100
113
  "@types/sanitize-html": "^2.6.1",
114
+ "@types/shelljs": "^0.8.15",
101
115
  "@types/styled-components": "^5.1.19",
102
116
  "babel-plugin-react-html-attrs": "^3.0.5",
103
117
  "babel-plugin-styled-components": "^2.1.4",
104
118
  "babel-plugin-transform-remove-console": "^6.9.4",
105
119
  "babel-plugin-transform-typescript-metadata": "^0.3.2",
120
+ "chalk-pipe": "^6.0.0",
121
+ "eslint-plugin-storybook": "^0.8.0",
106
122
  "husky": "^7.0.4",
107
123
  "identity-obj-proxy": "^3.0.0",
124
+ "inquirer": "^9.2.16",
108
125
  "jest": "^29.3.1",
109
126
  "jest-environment-jsdom": "^29.3.1",
110
127
  "pretty-format": "^29.5.0",
@@ -112,9 +129,13 @@
112
129
  "reselect": "^4.1.8",
113
130
  "rollup": "^4.9.2",
114
131
  "rollup-plugin-postcss": "^4.0.2",
132
+ "rollup-plugin-tsconfig-paths": "^1.5.2",
115
133
  "sass": "^1.59.3",
134
+ "shelljs": "^0.8.5",
135
+ "storybook": "^8.0.4",
116
136
  "ts-jest": "^29.0.5",
117
137
  "ts-node": "^10.9.1",
138
+ "typed-scss-modules": "^8.0.0",
118
139
  "typescript": "^5.3.3"
119
140
  },
120
141
  "dependencies": {
@@ -127,7 +148,8 @@
127
148
  "react-dom": "^17.0.2 || ^18.2.0",
128
149
  "react-i18next": "^11.16.2",
129
150
  "sanitize-html": "^2.6.1",
130
- "styled-components": "^6.1.8"
151
+ "styled-components": "^6.1.8",
152
+ "vite": "^5.2.6"
131
153
  },
132
154
  "peerDdependencies": {
133
155
  "core-js": "^3.20.2",
@@ -1,2 +0,0 @@
1
- "use strict";var e=require("../../../../../_virtual/_rollupPluginBabelHelpers.js"),t=require("react"),s=require("../../../hooks/useParseProps.js"),a=require("./layoutBox.types.js"),o=require("./layoutBox.module.scss.js");const r={start:"flex-start","flex-start":"flex-start",end:"flex-end","flex-end":"flex-end"},l=e=>e&&r[e]||e,n=t.forwardRef(((r,n)=>{let{id:i,style:u,children:d,tabIndex:c,className:x="",onClick:y,column:f,...m}=r;const{dataProps:p,restProps:j}=s.useParseProps(m),P=t.useMemo((()=>y?{onClick:y,onKeyDown:y,role:"button",tabIndex:-1}:{}),[y]),b=t.useMemo((()=>void 0!==f&&!0===f?a.LayoutDirection.COLUMN:null),[f]),B=t.useMemo((()=>({...j,...j.align?{alignItems:l(j.align)}:{},...j.justify?{justifyContent:l(j.justify)}:{},...j.direction||b?{flexDirection:j.direction||b}:{},...u})),[b,j,u]);return React.createElement("div",e.extends({},i?{id:"".concat(i)}:{},{ref:n,tabIndex:c,className:"".concat(o.default["layout-box"]," ").concat(x),style:B},p,{"data-testid":p.dataTestId||p["data-testid"]||i},P),d)}));n.displayName="LayoutBoxRefForwarded";const i=t.memo(n);i.displayName="LayoutBox",exports.LayoutBox=i;
2
- //# sourceMappingURL=LayoutBox.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LayoutBox.js","sources":["../../../../../../../../src/core/ui/components/container/LayoutBox.tsx"],"sourcesContent":["import { memo, FC, useMemo, CSSProperties, forwardRef, LegacyRef } from 'react'\n\nimport { useParseProps } from '../../../hooks/useParseProps'\n\nimport { LayoutDirection, LayoutBoxProps } from './layoutBox.types'\nimport classes from './layoutBox.module.scss'\n\n\n/**\n * Map of flex values for resolving flex alignment and justification.\n * @type {Record<string, string>}\n */\nconst flexValueMap: Record<string, string> = {\n start: 'flex-start',\n 'flex-start': 'flex-start',\n end: 'flex-end',\n 'flex-end': 'flex-end',\n}\n\n/**\n * Resolves flex alignment and justification properties based on the provided value.\n * @param {string | undefined} value - The value to resolve.\n * @returns {string | undefined} - Resolved flex property value.\n */\nconst resolveFlexProps = (value?: string): string | undefined => (value ? (flexValueMap[value] || value) : value)\n\n/**\n * Forwarded ref version of the LayoutBox component.\n * @param {LayoutBoxProps} props - Props for the LayoutBox component.\n * @param {LegacyRef<HTMLDivElement> | undefined} ref - Ref for accessing the underlying DOM element.\n * @returns {JSX.Element} - Rendered LayoutBox component.\n */\nconst LayoutBoxRefForwarded = forwardRef(({\n id, style, children, tabIndex, className = '', onClick, column, ...props\n}: LayoutBoxProps, ref: LegacyRef<HTMLDivElement> | undefined | null) => {\n const { dataProps, restProps } = useParseProps(props)\n\n /**\n * Memoized onClick event properties.\n * @type {{ onClick?: () => void; onKeyDown?: () => void; role?: string; tabIndex?: number }}\n */\n const onClickProps = useMemo(() => (onClick ? ({\n onClick,\n onKeyDown: onClick,\n role: 'button',\n tabIndex: -1,\n }) : {}), [onClick])\n\n /**\n * Memoized resolved direction based on the column prop.\n * @type {LayoutDirection}\n */\n const resolvedColumn = useMemo(() => ((\n column !== undefined && column === true)\n ? LayoutDirection.COLUMN\n : null), [column])\n\n /**\n * Memoized styles combining parsed props and additional styles.\n * @type {CSSProperties}\n */\n const styles = useMemo(() => (\n {\n ...restProps,\n ...(restProps.align ? { alignItems: resolveFlexProps(restProps.align as string) } : {}),\n ...(restProps.justify ? { justifyContent: resolveFlexProps(restProps.justify as string) } : {}),\n ...(restProps.direction || resolvedColumn ? { flexDirection: restProps.direction || resolvedColumn } : {}),\n ...style,\n }\n ), [resolvedColumn, restProps, style])\n\n return (\n <div\n {...(id ? { id: `${id}` } : {})}\n ref={ref}\n tabIndex={tabIndex}\n className={`${(classes as any)['layout-box']} ${className}`}\n style={styles as CSSProperties}\n {...dataProps}\n data-testid={dataProps.dataTestId || dataProps['data-testid'] || id}\n {...onClickProps}\n >\n {children}\n </div>\n )\n})\n\nLayoutBoxRefForwarded.displayName = 'LayoutBoxRefForwarded'\n\n/**\n * Memoized and memoized LayoutBox component.\n * @type {FC<LayoutBoxProps>}\n */\nexport const LayoutBox: FC<LayoutBoxProps> = memo<LayoutBoxProps>(LayoutBoxRefForwarded)\n\nLayoutBox.displayName = 'LayoutBox'\n"],"names":["flexValueMap","start","end","resolveFlexProps","value","LayoutBoxRefForwarded","forwardRef","_ref","ref","id","style","children","tabIndex","className","onClick","column","props","dataProps","restProps","useParseProps","onClickProps","useMemo","onKeyDown","role","resolvedColumn","undefined","LayoutDirection","COLUMN","styles","align","alignItems","justify","justifyContent","direction","flexDirection","React","createElement","_extends","concat","classes","default","dataTestId","displayName","LayoutBox","memo"],"mappings":"6NAYA,MAAMA,EAAuC,CAC3CC,MAAO,aACP,aAAc,aACdC,IAAK,WACL,WAAY,YAQRC,EAAoBC,GAAwCA,GAASJ,EAAaI,IAAmBA,EAQrGC,EAAwBC,EAAUA,YAAC,CAAAC,EAEtBC,KAAsD,IAF/BC,GACxCA,EAAEC,MAAEA,EAAKC,SAAEA,EAAQC,SAAEA,EAAQC,UAAEA,EAAY,GAAEC,QAAEA,EAAOC,OAAEA,KAAWC,GACpDT,EACf,MAAMU,UAAEA,EAASC,UAAEA,GAAcC,EAAAA,cAAcH,GAMzCI,EAAeC,WAAQ,IAAOP,EAAW,CAC7CA,UACAQ,UAAWR,EACXS,KAAM,SACNX,UAAW,GACR,CAAG,GAAE,CAACE,IAMLU,EAAiBH,EAAOA,SAAC,SAClBI,IAAXV,IAAmC,IAAXA,EACtBW,EAAAA,gBAAgBC,OAChB,MAAO,CAACZ,IAMNa,EAASP,EAAAA,SAAQ,KACrB,IACKH,KACCA,EAAUW,MAAQ,CAAEC,WAAY3B,EAAiBe,EAAUW,QAAqB,CAAE,KAClFX,EAAUa,QAAU,CAAEC,eAAgB7B,EAAiBe,EAAUa,UAAuB,CAAE,KAC1Fb,EAAUe,WAAaT,EAAiB,CAAEU,cAAehB,EAAUe,WAAaT,GAAmB,CAAE,KACtGd,KAEJ,CAACc,EAAgBN,EAAWR,IAE/B,OACEyB,MAAAC,oBAAAC,EAAAA,QAAA,CAAA,EACO5B,EAAK,CAAEA,GAAE,GAAA6B,OAAK7B,IAAS,GAAE,CAC9BD,IAAKA,EACLI,SAAUA,EACVC,UAAS,GAAAyB,OAAMC,EAAOC,QAAS,cAAaF,KAAAA,OAAIzB,GAChDH,MAAOkB,GACHX,EAAS,CACb,cAAaA,EAAUwB,YAAcxB,EAAU,gBAAkBR,GAC7DW,GAEHT,EACG,IAIVN,EAAsBqC,YAAc,8BAMvBC,EAAgCC,EAAIA,KAAiBvC,GAElEsC,EAAUD,YAAc"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"layoutBox.types.js","sources":["../../../../../../../../src/core/ui/components/container/layoutBox.types.ts"],"sourcesContent":["import { CSSProperties, LegacyRef, PropsWithChildren } from 'react'\n\n/**\n * Enum representing the possible layout directions.\n */\nexport enum LayoutDirection {\n ROW = 'row',\n COLUMN = 'column',\n}\n\n/**\n * Props for the LayoutBox component.\n */\nexport type LayoutBoxProps = PropsWithChildren & {\n /** Unique identifier for the component. */\n id?: string | number\n /** CSS flex property. */\n flex?: string\n /** CSS flexGrow property. */\n flexGrow?: string | number\n /** Text alignment within the box. */\n alignText?: 'center' | 'right' | 'left'\n /** Direction of the layout (row or column). */\n direction?: LayoutDirection | string\n /** CSS flexShrink property. */\n flexShrink?: string | number\n /** CSS flexBasis property. */\n flexBasis?: string\n /** CSS flexWrap property. */\n flexWrap?: string\n /** CSS justify-content property. */\n justify?: string\n /** CSS align-items property. */\n align?: string\n /** CSS align-self property. */\n alignSelf?: string\n /** CSS margin property. */\n margin?: string\n /** CSS padding property. */\n padding?: string\n /** CSS width property. */\n width?: string\n /** CSS height property. */\n height?: string\n /** CSS maxWidth property. */\n maxWidth?: string\n /** CSS maxHeight property. */\n maxHeight?: string\n /** CSS minWidth property. */\n minWidth?: string\n /** CSS minHeight property. */\n minHeight?: string\n /** Gap between child elements. */\n gap?: string\n /** CSS borderRadius property. */\n borderRadius?: string\n /** Additional inline styles for the component. */\n style?: Record<string, unknown> | null\n /** Additional class name(s) for the component. */\n className?: string\n /** Tab index for keyboard navigation. */\n tabIndex?: number\n /** Ref for accessing the underlying DOM element. */\n ref?: LegacyRef<HTMLDivElement> | undefined | null\n /** Callback function for click event. */\n onClick?: () => void\n /** If true, sets the layout direction to column. */\n column?: boolean\n} & Omit<CSSProperties, 'direction'>;\n"],"names":["LayoutDirection"],"mappings":"aAKYA,IAAAA,WAAAA,GAAe,OAAfA,EAAe,IAAA,MAAfA,EAAe,OAAA,SAAfA,CAAe,EAAA"}
@@ -1,2 +0,0 @@
1
- import{extends as t}from"../../../../../_virtual/_rollupPluginBabelHelpers.js";import{memo as e,forwardRef as o,useMemo as a}from"react";import{useParseProps as s}from"../../../hooks/useParseProps.js";import{LayoutDirection as l}from"./layoutBox.types.js";import r from"./layoutBox.module.scss.js";const n={start:"flex-start","flex-start":"flex-start",end:"flex-end","flex-end":"flex-end"},i=t=>t&&n[t]||t,d=o(((e,o)=>{let{id:n,style:d,children:c,tabIndex:m,className:f="",onClick:u,column:x,...p}=e;const{dataProps:y,restProps:j}=s(p),b=a((()=>u?{onClick:u,onKeyDown:u,role:"button",tabIndex:-1}:{}),[u]),B=a((()=>void 0!==x&&!0===x?l.COLUMN:null),[x]),I=a((()=>({...j,...j.align?{alignItems:i(j.align)}:{},...j.justify?{justifyContent:i(j.justify)}:{},...j.direction||B?{flexDirection:j.direction||B}:{},...d})),[B,j,d]);return React.createElement("div",t({},n?{id:"".concat(n)}:{},{ref:o,tabIndex:m,className:"".concat(r["layout-box"]," ").concat(f),style:I},y,{"data-testid":y.dataTestId||y["data-testid"]||n},b),c)}));d.displayName="LayoutBoxRefForwarded";const c=e(d);c.displayName="LayoutBox";export{c as LayoutBox};
2
- //# sourceMappingURL=LayoutBox.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LayoutBox.js","sources":["../../../../../../../../src/core/ui/components/container/LayoutBox.tsx"],"sourcesContent":["import { memo, FC, useMemo, CSSProperties, forwardRef, LegacyRef } from 'react'\n\nimport { useParseProps } from '../../../hooks/useParseProps'\n\nimport { LayoutDirection, LayoutBoxProps } from './layoutBox.types'\nimport classes from './layoutBox.module.scss'\n\n\n/**\n * Map of flex values for resolving flex alignment and justification.\n * @type {Record<string, string>}\n */\nconst flexValueMap: Record<string, string> = {\n start: 'flex-start',\n 'flex-start': 'flex-start',\n end: 'flex-end',\n 'flex-end': 'flex-end',\n}\n\n/**\n * Resolves flex alignment and justification properties based on the provided value.\n * @param {string | undefined} value - The value to resolve.\n * @returns {string | undefined} - Resolved flex property value.\n */\nconst resolveFlexProps = (value?: string): string | undefined => (value ? (flexValueMap[value] || value) : value)\n\n/**\n * Forwarded ref version of the LayoutBox component.\n * @param {LayoutBoxProps} props - Props for the LayoutBox component.\n * @param {LegacyRef<HTMLDivElement> | undefined} ref - Ref for accessing the underlying DOM element.\n * @returns {JSX.Element} - Rendered LayoutBox component.\n */\nconst LayoutBoxRefForwarded = forwardRef(({\n id, style, children, tabIndex, className = '', onClick, column, ...props\n}: LayoutBoxProps, ref: LegacyRef<HTMLDivElement> | undefined | null) => {\n const { dataProps, restProps } = useParseProps(props)\n\n /**\n * Memoized onClick event properties.\n * @type {{ onClick?: () => void; onKeyDown?: () => void; role?: string; tabIndex?: number }}\n */\n const onClickProps = useMemo(() => (onClick ? ({\n onClick,\n onKeyDown: onClick,\n role: 'button',\n tabIndex: -1,\n }) : {}), [onClick])\n\n /**\n * Memoized resolved direction based on the column prop.\n * @type {LayoutDirection}\n */\n const resolvedColumn = useMemo(() => ((\n column !== undefined && column === true)\n ? LayoutDirection.COLUMN\n : null), [column])\n\n /**\n * Memoized styles combining parsed props and additional styles.\n * @type {CSSProperties}\n */\n const styles = useMemo(() => (\n {\n ...restProps,\n ...(restProps.align ? { alignItems: resolveFlexProps(restProps.align as string) } : {}),\n ...(restProps.justify ? { justifyContent: resolveFlexProps(restProps.justify as string) } : {}),\n ...(restProps.direction || resolvedColumn ? { flexDirection: restProps.direction || resolvedColumn } : {}),\n ...style,\n }\n ), [resolvedColumn, restProps, style])\n\n return (\n <div\n {...(id ? { id: `${id}` } : {})}\n ref={ref}\n tabIndex={tabIndex}\n className={`${(classes as any)['layout-box']} ${className}`}\n style={styles as CSSProperties}\n {...dataProps}\n data-testid={dataProps.dataTestId || dataProps['data-testid'] || id}\n {...onClickProps}\n >\n {children}\n </div>\n )\n})\n\nLayoutBoxRefForwarded.displayName = 'LayoutBoxRefForwarded'\n\n/**\n * Memoized and memoized LayoutBox component.\n * @type {FC<LayoutBoxProps>}\n */\nexport const LayoutBox: FC<LayoutBoxProps> = memo<LayoutBoxProps>(LayoutBoxRefForwarded)\n\nLayoutBox.displayName = 'LayoutBox'\n"],"names":["flexValueMap","start","end","resolveFlexProps","value","LayoutBoxRefForwarded","forwardRef","_ref","ref","id","style","children","tabIndex","className","onClick","column","props","dataProps","restProps","useParseProps","onClickProps","useMemo","onKeyDown","role","resolvedColumn","undefined","LayoutDirection","COLUMN","styles","align","alignItems","justify","justifyContent","direction","flexDirection","React","createElement","_extends","concat","classes","dataTestId","displayName","LayoutBox","memo"],"mappings":"0SAYA,MAAMA,EAAuC,CAC3CC,MAAO,aACP,aAAc,aACdC,IAAK,WACL,WAAY,YAQRC,EAAoBC,GAAwCA,GAASJ,EAAaI,IAAmBA,EAQrGC,EAAwBC,GAAW,CAAAC,EAEtBC,KAAsD,IAF/BC,GACxCA,EAAEC,MAAEA,EAAKC,SAAEA,EAAQC,SAAEA,EAAQC,UAAEA,EAAY,GAAEC,QAAEA,EAAOC,OAAEA,KAAWC,GACpDT,EACf,MAAMU,UAAEA,EAASC,UAAEA,GAAcC,EAAcH,GAMzCI,EAAeC,GAAQ,IAAOP,EAAW,CAC7CA,UACAQ,UAAWR,EACXS,KAAM,SACNX,UAAW,GACR,CAAG,GAAE,CAACE,IAMLU,EAAiBH,GAAQ,SAClBI,IAAXV,IAAmC,IAAXA,EACtBW,EAAgBC,OAChB,MAAO,CAACZ,IAMNa,EAASP,GAAQ,KACrB,IACKH,KACCA,EAAUW,MAAQ,CAAEC,WAAY3B,EAAiBe,EAAUW,QAAqB,CAAE,KAClFX,EAAUa,QAAU,CAAEC,eAAgB7B,EAAiBe,EAAUa,UAAuB,CAAE,KAC1Fb,EAAUe,WAAaT,EAAiB,CAAEU,cAAehB,EAAUe,WAAaT,GAAmB,CAAE,KACtGd,KAEJ,CAACc,EAAgBN,EAAWR,IAE/B,OACEyB,MAAAC,oBAAAC,EAAA,CAAA,EACO5B,EAAK,CAAEA,GAAE,GAAA6B,OAAK7B,IAAS,GAAE,CAC9BD,IAAKA,EACLI,SAAUA,EACVC,UAAS,GAAAyB,OAAMC,EAAgB,cAAaD,KAAAA,OAAIzB,GAChDH,MAAOkB,GACHX,EAAS,CACb,cAAaA,EAAUuB,YAAcvB,EAAU,gBAAkBR,GAC7DW,GAEHT,EACG,IAIVN,EAAsBoC,YAAc,8BAMvBC,EAAgCC,EAAqBtC,GAElEqC,EAAUD,YAAc"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"layoutBox.types.js","sources":["../../../../../../../../src/core/ui/components/container/layoutBox.types.ts"],"sourcesContent":["import { CSSProperties, LegacyRef, PropsWithChildren } from 'react'\n\n/**\n * Enum representing the possible layout directions.\n */\nexport enum LayoutDirection {\n ROW = 'row',\n COLUMN = 'column',\n}\n\n/**\n * Props for the LayoutBox component.\n */\nexport type LayoutBoxProps = PropsWithChildren & {\n /** Unique identifier for the component. */\n id?: string | number\n /** CSS flex property. */\n flex?: string\n /** CSS flexGrow property. */\n flexGrow?: string | number\n /** Text alignment within the box. */\n alignText?: 'center' | 'right' | 'left'\n /** Direction of the layout (row or column). */\n direction?: LayoutDirection | string\n /** CSS flexShrink property. */\n flexShrink?: string | number\n /** CSS flexBasis property. */\n flexBasis?: string\n /** CSS flexWrap property. */\n flexWrap?: string\n /** CSS justify-content property. */\n justify?: string\n /** CSS align-items property. */\n align?: string\n /** CSS align-self property. */\n alignSelf?: string\n /** CSS margin property. */\n margin?: string\n /** CSS padding property. */\n padding?: string\n /** CSS width property. */\n width?: string\n /** CSS height property. */\n height?: string\n /** CSS maxWidth property. */\n maxWidth?: string\n /** CSS maxHeight property. */\n maxHeight?: string\n /** CSS minWidth property. */\n minWidth?: string\n /** CSS minHeight property. */\n minHeight?: string\n /** Gap between child elements. */\n gap?: string\n /** CSS borderRadius property. */\n borderRadius?: string\n /** Additional inline styles for the component. */\n style?: Record<string, unknown> | null\n /** Additional class name(s) for the component. */\n className?: string\n /** Tab index for keyboard navigation. */\n tabIndex?: number\n /** Ref for accessing the underlying DOM element. */\n ref?: LegacyRef<HTMLDivElement> | undefined | null\n /** Callback function for click event. */\n onClick?: () => void\n /** If true, sets the layout direction to column. */\n column?: boolean\n} & Omit<CSSProperties, 'direction'>;\n"],"names":["LayoutDirection"],"mappings":"AAKYA,IAAAA,WAAAA,GAAe,OAAfA,EAAe,IAAA,MAAfA,EAAe,OAAA,SAAfA,CAAe,EAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"LayoutBox.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/ui/components/container/LayoutBox.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAQ,EAAE,EAAiD,MAAM,OAAO,CAAA;AAI/E,OAAO,EAAmB,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAqFnE;;;GAGG;AACH,eAAO,MAAM,SAAS,EAAE,EAAE,CAAC,cAAc,CAA+C,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"LayoutBox.test.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/ui/components/container/LayoutBox.test.tsx"],"names":[],"mappings":"AAAA;;GAEG"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"layoutBox.types.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/ui/components/container/layoutBox.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAEnE;;GAEG;AACH,oBAAY,eAAe;IACzB,GAAG,QAAQ;IACX,MAAM,WAAW;CAClB;AAED;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,iBAAiB,GAAG;IAC/C,2CAA2C;IAC3C,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACpB,yBAAyB;IACzB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,6BAA6B;IAC7B,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC1B,qCAAqC;IACrC,SAAS,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAA;IACvC,+CAA+C;IAC/C,SAAS,CAAC,EAAE,eAAe,GAAG,MAAM,CAAA;IACpC,+BAA+B;IAC/B,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC5B,8BAA8B;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,6BAA6B;IAC7B,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,oCAAoC;IACpC,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,gCAAgC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,+BAA+B;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,2BAA2B;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,4BAA4B;IAC5B,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,0BAA0B;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,2BAA2B;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,6BAA6B;IAC7B,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,8BAA8B;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,6BAA6B;IAC7B,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,8BAA8B;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,kCAAkC;IAClC,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,iCAAiC;IACjC,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,kDAAkD;IAClD,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAA;IACtC,kDAAkD;IAClD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,yCAAyC;IACzC,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,oDAAoD;IACpD,GAAG,CAAC,EAAE,SAAS,CAAC,cAAc,CAAC,GAAG,SAAS,GAAG,IAAI,CAAA;IAClD,yCAAyC;IACzC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,oDAAoD;IACpD,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,GAAG,IAAI,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- import{extends as t}from"../../../../../_virtual/_rollupPluginBabelHelpers.js";import{memo as e,forwardRef as o,useMemo as a}from"react";import{useParseProps as s}from"../../../hooks/useParseProps.js";import{LayoutDirection as l}from"./layoutBox.types.js";import r from"./layoutBox.module.scss.js";const n={start:"flex-start","flex-start":"flex-start",end:"flex-end","flex-end":"flex-end"},i=t=>t&&n[t]||t,d=o(((e,o)=>{let{id:n,style:d,children:c,tabIndex:m,className:f="",onClick:u,column:x,...p}=e;const{dataProps:y,restProps:j}=s(p),b=a((()=>u?{onClick:u,onKeyDown:u,role:"button",tabIndex:-1}:{}),[u]),B=a((()=>void 0!==x&&!0===x?l.COLUMN:null),[x]),I=a((()=>({...j,...j.align?{alignItems:i(j.align)}:{},...j.justify?{justifyContent:i(j.justify)}:{},...j.direction||B?{flexDirection:j.direction||B}:{},...d})),[B,j,d]);return React.createElement("div",t({},n?{id:"".concat(n)}:{},{ref:o,tabIndex:m,className:"".concat(r["layout-box"]," ").concat(f),style:I},y,{"data-testid":y.dataTestId||y["data-testid"]||n},b),c)}));d.displayName="LayoutBoxRefForwarded";const c=e(d);c.displayName="LayoutBox";export{c as LayoutBox};
2
- //# sourceMappingURL=LayoutBox.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LayoutBox.js","sources":["../../../../../../../../src/core/ui/components/container/LayoutBox.tsx"],"sourcesContent":["import { memo, FC, useMemo, CSSProperties, forwardRef, LegacyRef } from 'react'\n\nimport { useParseProps } from '../../../hooks/useParseProps'\n\nimport { LayoutDirection, LayoutBoxProps } from './layoutBox.types'\nimport classes from './layoutBox.module.scss'\n\n\n/**\n * Map of flex values for resolving flex alignment and justification.\n * @type {Record<string, string>}\n */\nconst flexValueMap: Record<string, string> = {\n start: 'flex-start',\n 'flex-start': 'flex-start',\n end: 'flex-end',\n 'flex-end': 'flex-end',\n}\n\n/**\n * Resolves flex alignment and justification properties based on the provided value.\n * @param {string | undefined} value - The value to resolve.\n * @returns {string | undefined} - Resolved flex property value.\n */\nconst resolveFlexProps = (value?: string): string | undefined => (value ? (flexValueMap[value] || value) : value)\n\n/**\n * Forwarded ref version of the LayoutBox component.\n * @param {LayoutBoxProps} props - Props for the LayoutBox component.\n * @param {LegacyRef<HTMLDivElement> | undefined} ref - Ref for accessing the underlying DOM element.\n * @returns {JSX.Element} - Rendered LayoutBox component.\n */\nconst LayoutBoxRefForwarded = forwardRef(({\n id, style, children, tabIndex, className = '', onClick, column, ...props\n}: LayoutBoxProps, ref: LegacyRef<HTMLDivElement> | undefined | null) => {\n const { dataProps, restProps } = useParseProps(props)\n\n /**\n * Memoized onClick event properties.\n * @type {{ onClick?: () => void; onKeyDown?: () => void; role?: string; tabIndex?: number }}\n */\n const onClickProps = useMemo(() => (onClick ? ({\n onClick,\n onKeyDown: onClick,\n role: 'button',\n tabIndex: -1,\n }) : {}), [onClick])\n\n /**\n * Memoized resolved direction based on the column prop.\n * @type {LayoutDirection}\n */\n const resolvedColumn = useMemo(() => ((\n column !== undefined && column === true)\n ? LayoutDirection.COLUMN\n : null), [column])\n\n /**\n * Memoized styles combining parsed props and additional styles.\n * @type {CSSProperties}\n */\n const styles = useMemo(() => (\n {\n ...restProps,\n ...(restProps.align ? { alignItems: resolveFlexProps(restProps.align as string) } : {}),\n ...(restProps.justify ? { justifyContent: resolveFlexProps(restProps.justify as string) } : {}),\n ...(restProps.direction || resolvedColumn ? { flexDirection: restProps.direction || resolvedColumn } : {}),\n ...style,\n }\n ), [resolvedColumn, restProps, style])\n\n return (\n <div\n {...(id ? { id: `${id}` } : {})}\n ref={ref}\n tabIndex={tabIndex}\n className={`${(classes as any)['layout-box']} ${className}`}\n style={styles as CSSProperties}\n {...dataProps}\n data-testid={dataProps.dataTestId || dataProps['data-testid'] || id}\n {...onClickProps}\n >\n {children}\n </div>\n )\n})\n\nLayoutBoxRefForwarded.displayName = 'LayoutBoxRefForwarded'\n\n/**\n * Memoized and memoized LayoutBox component.\n * @type {FC<LayoutBoxProps>}\n */\nexport const LayoutBox: FC<LayoutBoxProps> = memo<LayoutBoxProps>(LayoutBoxRefForwarded)\n\nLayoutBox.displayName = 'LayoutBox'\n"],"names":["flexValueMap","start","end","resolveFlexProps","value","LayoutBoxRefForwarded","forwardRef","_ref","ref","id","style","children","tabIndex","className","onClick","column","props","dataProps","restProps","useParseProps","onClickProps","useMemo","onKeyDown","role","resolvedColumn","undefined","LayoutDirection","COLUMN","styles","align","alignItems","justify","justifyContent","direction","flexDirection","React","createElement","_extends","concat","classes","dataTestId","displayName","LayoutBox","memo"],"mappings":"0SAYA,MAAMA,EAAuC,CAC3CC,MAAO,aACP,aAAc,aACdC,IAAK,WACL,WAAY,YAQRC,EAAoBC,GAAwCA,GAASJ,EAAaI,IAAmBA,EAQrGC,EAAwBC,GAAW,CAAAC,EAEtBC,KAAsD,IAF/BC,GACxCA,EAAEC,MAAEA,EAAKC,SAAEA,EAAQC,SAAEA,EAAQC,UAAEA,EAAY,GAAEC,QAAEA,EAAOC,OAAEA,KAAWC,GACpDT,EACf,MAAMU,UAAEA,EAASC,UAAEA,GAAcC,EAAcH,GAMzCI,EAAeC,GAAQ,IAAOP,EAAW,CAC7CA,UACAQ,UAAWR,EACXS,KAAM,SACNX,UAAW,GACR,CAAG,GAAE,CAACE,IAMLU,EAAiBH,GAAQ,SAClBI,IAAXV,IAAmC,IAAXA,EACtBW,EAAgBC,OAChB,MAAO,CAACZ,IAMNa,EAASP,GAAQ,KACrB,IACKH,KACCA,EAAUW,MAAQ,CAAEC,WAAY3B,EAAiBe,EAAUW,QAAqB,CAAE,KAClFX,EAAUa,QAAU,CAAEC,eAAgB7B,EAAiBe,EAAUa,UAAuB,CAAE,KAC1Fb,EAAUe,WAAaT,EAAiB,CAAEU,cAAehB,EAAUe,WAAaT,GAAmB,CAAE,KACtGd,KAEJ,CAACc,EAAgBN,EAAWR,IAE/B,OACEyB,MAAAC,oBAAAC,EAAA,CAAA,EACO5B,EAAK,CAAEA,GAAE,GAAA6B,OAAK7B,IAAS,GAAE,CAC9BD,IAAKA,EACLI,SAAUA,EACVC,UAAS,GAAAyB,OAAMC,EAAgB,cAAaD,KAAAA,OAAIzB,GAChDH,MAAOkB,GACHX,EAAS,CACb,cAAaA,EAAUuB,YAAcvB,EAAU,gBAAkBR,GAC7DW,GAEHT,EACG,IAIVN,EAAsBoC,YAAc,8BAMvBC,EAAgCC,EAAqBtC,GAElEqC,EAAUD,YAAc"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"layoutBox.types.js","sources":["../../../../../../../../src/core/ui/components/container/layoutBox.types.ts"],"sourcesContent":["import { CSSProperties, LegacyRef, PropsWithChildren } from 'react'\n\n/**\n * Enum representing the possible layout directions.\n */\nexport enum LayoutDirection {\n ROW = 'row',\n COLUMN = 'column',\n}\n\n/**\n * Props for the LayoutBox component.\n */\nexport type LayoutBoxProps = PropsWithChildren & {\n /** Unique identifier for the component. */\n id?: string | number\n /** CSS flex property. */\n flex?: string\n /** CSS flexGrow property. */\n flexGrow?: string | number\n /** Text alignment within the box. */\n alignText?: 'center' | 'right' | 'left'\n /** Direction of the layout (row or column). */\n direction?: LayoutDirection | string\n /** CSS flexShrink property. */\n flexShrink?: string | number\n /** CSS flexBasis property. */\n flexBasis?: string\n /** CSS flexWrap property. */\n flexWrap?: string\n /** CSS justify-content property. */\n justify?: string\n /** CSS align-items property. */\n align?: string\n /** CSS align-self property. */\n alignSelf?: string\n /** CSS margin property. */\n margin?: string\n /** CSS padding property. */\n padding?: string\n /** CSS width property. */\n width?: string\n /** CSS height property. */\n height?: string\n /** CSS maxWidth property. */\n maxWidth?: string\n /** CSS maxHeight property. */\n maxHeight?: string\n /** CSS minWidth property. */\n minWidth?: string\n /** CSS minHeight property. */\n minHeight?: string\n /** Gap between child elements. */\n gap?: string\n /** CSS borderRadius property. */\n borderRadius?: string\n /** Additional inline styles for the component. */\n style?: Record<string, unknown> | null\n /** Additional class name(s) for the component. */\n className?: string\n /** Tab index for keyboard navigation. */\n tabIndex?: number\n /** Ref for accessing the underlying DOM element. */\n ref?: LegacyRef<HTMLDivElement> | undefined | null\n /** Callback function for click event. */\n onClick?: () => void\n /** If true, sets the layout direction to column. */\n column?: boolean\n} & Omit<CSSProperties, 'direction'>;\n"],"names":["LayoutDirection"],"mappings":"AAKYA,IAAAA,WAAAA,GAAe,OAAfA,EAAe,IAAA,MAAfA,EAAe,OAAA,SAAfA,CAAe,EAAA"}
@@ -1,2 +0,0 @@
1
- "use strict";var e=require("../../../../../_virtual/_rollupPluginBabelHelpers.js"),t=require("react"),s=require("../../../hooks/useParseProps.js"),a=require("./layoutBox.types.js"),o=require("./layoutBox.module.scss.js");const r={start:"flex-start","flex-start":"flex-start",end:"flex-end","flex-end":"flex-end"},l=e=>e&&r[e]||e,n=t.forwardRef(((r,n)=>{let{id:i,style:u,children:d,tabIndex:c,className:x="",onClick:y,column:f,...m}=r;const{dataProps:p,restProps:j}=s.useParseProps(m),P=t.useMemo((()=>y?{onClick:y,onKeyDown:y,role:"button",tabIndex:-1}:{}),[y]),b=t.useMemo((()=>void 0!==f&&!0===f?a.LayoutDirection.COLUMN:null),[f]),B=t.useMemo((()=>({...j,...j.align?{alignItems:l(j.align)}:{},...j.justify?{justifyContent:l(j.justify)}:{},...j.direction||b?{flexDirection:j.direction||b}:{},...u})),[b,j,u]);return React.createElement("div",e.extends({},i?{id:"".concat(i)}:{},{ref:n,tabIndex:c,className:"".concat(o.default["layout-box"]," ").concat(x),style:B},p,{"data-testid":p.dataTestId||p["data-testid"]||i},P),d)}));n.displayName="LayoutBoxRefForwarded";const i=t.memo(n);i.displayName="LayoutBox",exports.LayoutBox=i;
2
- //# sourceMappingURL=LayoutBox.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LayoutBox.js","sources":["../../../../../../../src/core/ui/components/container/LayoutBox.tsx"],"sourcesContent":["import { memo, FC, useMemo, CSSProperties, forwardRef, LegacyRef } from 'react'\n\nimport { useParseProps } from '../../../hooks/useParseProps'\n\nimport { LayoutDirection, LayoutBoxProps } from './layoutBox.types'\nimport classes from './layoutBox.module.scss'\n\n\n/**\n * Map of flex values for resolving flex alignment and justification.\n * @type {Record<string, string>}\n */\nconst flexValueMap: Record<string, string> = {\n start: 'flex-start',\n 'flex-start': 'flex-start',\n end: 'flex-end',\n 'flex-end': 'flex-end',\n}\n\n/**\n * Resolves flex alignment and justification properties based on the provided value.\n * @param {string | undefined} value - The value to resolve.\n * @returns {string | undefined} - Resolved flex property value.\n */\nconst resolveFlexProps = (value?: string): string | undefined => (value ? (flexValueMap[value] || value) : value)\n\n/**\n * Forwarded ref version of the LayoutBox component.\n * @param {LayoutBoxProps} props - Props for the LayoutBox component.\n * @param {LegacyRef<HTMLDivElement> | undefined} ref - Ref for accessing the underlying DOM element.\n * @returns {JSX.Element} - Rendered LayoutBox component.\n */\nconst LayoutBoxRefForwarded = forwardRef(({\n id, style, children, tabIndex, className = '', onClick, column, ...props\n}: LayoutBoxProps, ref: LegacyRef<HTMLDivElement> | undefined | null) => {\n const { dataProps, restProps } = useParseProps(props)\n\n /**\n * Memoized onClick event properties.\n * @type {{ onClick?: () => void; onKeyDown?: () => void; role?: string; tabIndex?: number }}\n */\n const onClickProps = useMemo(() => (onClick ? ({\n onClick,\n onKeyDown: onClick,\n role: 'button',\n tabIndex: -1,\n }) : {}), [onClick])\n\n /**\n * Memoized resolved direction based on the column prop.\n * @type {LayoutDirection}\n */\n const resolvedColumn = useMemo(() => ((\n column !== undefined && column === true)\n ? LayoutDirection.COLUMN\n : null), [column])\n\n /**\n * Memoized styles combining parsed props and additional styles.\n * @type {CSSProperties}\n */\n const styles = useMemo(() => (\n {\n ...restProps,\n ...(restProps.align ? { alignItems: resolveFlexProps(restProps.align as string) } : {}),\n ...(restProps.justify ? { justifyContent: resolveFlexProps(restProps.justify as string) } : {}),\n ...(restProps.direction || resolvedColumn ? { flexDirection: restProps.direction || resolvedColumn } : {}),\n ...style,\n }\n ), [resolvedColumn, restProps, style])\n\n return (\n <div\n {...(id ? { id: `${id}` } : {})}\n ref={ref}\n tabIndex={tabIndex}\n className={`${(classes as any)['layout-box']} ${className}`}\n style={styles as CSSProperties}\n {...dataProps}\n data-testid={dataProps.dataTestId || dataProps['data-testid'] || id}\n {...onClickProps}\n >\n {children}\n </div>\n )\n})\n\nLayoutBoxRefForwarded.displayName = 'LayoutBoxRefForwarded'\n\n/**\n * Memoized and memoized LayoutBox component.\n * @type {FC<LayoutBoxProps>}\n */\nexport const LayoutBox: FC<LayoutBoxProps> = memo<LayoutBoxProps>(LayoutBoxRefForwarded)\n\nLayoutBox.displayName = 'LayoutBox'\n"],"names":["flexValueMap","start","end","resolveFlexProps","value","LayoutBoxRefForwarded","forwardRef","_ref","ref","id","style","children","tabIndex","className","onClick","column","props","dataProps","restProps","useParseProps","onClickProps","useMemo","onKeyDown","role","resolvedColumn","undefined","LayoutDirection","COLUMN","styles","align","alignItems","justify","justifyContent","direction","flexDirection","React","createElement","_extends","concat","classes","default","dataTestId","displayName","LayoutBox","memo"],"mappings":"6NAYA,MAAMA,EAAuC,CAC3CC,MAAO,aACP,aAAc,aACdC,IAAK,WACL,WAAY,YAQRC,EAAoBC,GAAwCA,GAASJ,EAAaI,IAAmBA,EAQrGC,EAAwBC,EAAUA,YAAC,CAAAC,EAEtBC,KAAsD,IAF/BC,GACxCA,EAAEC,MAAEA,EAAKC,SAAEA,EAAQC,SAAEA,EAAQC,UAAEA,EAAY,GAAEC,QAAEA,EAAOC,OAAEA,KAAWC,GACpDT,EACf,MAAMU,UAAEA,EAASC,UAAEA,GAAcC,EAAAA,cAAcH,GAMzCI,EAAeC,WAAQ,IAAOP,EAAW,CAC7CA,UACAQ,UAAWR,EACXS,KAAM,SACNX,UAAW,GACR,CAAG,GAAE,CAACE,IAMLU,EAAiBH,EAAOA,SAAC,SAClBI,IAAXV,IAAmC,IAAXA,EACtBW,EAAAA,gBAAgBC,OAChB,MAAO,CAACZ,IAMNa,EAASP,EAAAA,SAAQ,KACrB,IACKH,KACCA,EAAUW,MAAQ,CAAEC,WAAY3B,EAAiBe,EAAUW,QAAqB,CAAE,KAClFX,EAAUa,QAAU,CAAEC,eAAgB7B,EAAiBe,EAAUa,UAAuB,CAAE,KAC1Fb,EAAUe,WAAaT,EAAiB,CAAEU,cAAehB,EAAUe,WAAaT,GAAmB,CAAE,KACtGd,KAEJ,CAACc,EAAgBN,EAAWR,IAE/B,OACEyB,MAAAC,oBAAAC,EAAAA,QAAA,CAAA,EACO5B,EAAK,CAAEA,GAAE,GAAA6B,OAAK7B,IAAS,GAAE,CAC9BD,IAAKA,EACLI,SAAUA,EACVC,UAAS,GAAAyB,OAAMC,EAAOC,QAAS,cAAaF,KAAAA,OAAIzB,GAChDH,MAAOkB,GACHX,EAAS,CACb,cAAaA,EAAUwB,YAAcxB,EAAU,gBAAkBR,GAC7DW,GAEHT,EACG,IAIVN,EAAsBqC,YAAc,8BAMvBC,EAAgCC,EAAIA,KAAiBvC,GAElEsC,EAAUD,YAAc"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"layoutBox.types.js","sources":["../../../../../../../src/core/ui/components/container/layoutBox.types.ts"],"sourcesContent":["import { CSSProperties, LegacyRef, PropsWithChildren } from 'react'\n\n/**\n * Enum representing the possible layout directions.\n */\nexport enum LayoutDirection {\n ROW = 'row',\n COLUMN = 'column',\n}\n\n/**\n * Props for the LayoutBox component.\n */\nexport type LayoutBoxProps = PropsWithChildren & {\n /** Unique identifier for the component. */\n id?: string | number\n /** CSS flex property. */\n flex?: string\n /** CSS flexGrow property. */\n flexGrow?: string | number\n /** Text alignment within the box. */\n alignText?: 'center' | 'right' | 'left'\n /** Direction of the layout (row or column). */\n direction?: LayoutDirection | string\n /** CSS flexShrink property. */\n flexShrink?: string | number\n /** CSS flexBasis property. */\n flexBasis?: string\n /** CSS flexWrap property. */\n flexWrap?: string\n /** CSS justify-content property. */\n justify?: string\n /** CSS align-items property. */\n align?: string\n /** CSS align-self property. */\n alignSelf?: string\n /** CSS margin property. */\n margin?: string\n /** CSS padding property. */\n padding?: string\n /** CSS width property. */\n width?: string\n /** CSS height property. */\n height?: string\n /** CSS maxWidth property. */\n maxWidth?: string\n /** CSS maxHeight property. */\n maxHeight?: string\n /** CSS minWidth property. */\n minWidth?: string\n /** CSS minHeight property. */\n minHeight?: string\n /** Gap between child elements. */\n gap?: string\n /** CSS borderRadius property. */\n borderRadius?: string\n /** Additional inline styles for the component. */\n style?: Record<string, unknown> | null\n /** Additional class name(s) for the component. */\n className?: string\n /** Tab index for keyboard navigation. */\n tabIndex?: number\n /** Ref for accessing the underlying DOM element. */\n ref?: LegacyRef<HTMLDivElement> | undefined | null\n /** Callback function for click event. */\n onClick?: () => void\n /** If true, sets the layout direction to column. */\n column?: boolean\n} & Omit<CSSProperties, 'direction'>;\n"],"names":["LayoutDirection"],"mappings":"aAKYA,IAAAA,WAAAA,GAAe,OAAfA,EAAe,IAAA,MAAfA,EAAe,OAAA,SAAfA,CAAe,EAAA"}