@soroush.tech/design-system 1.1.0 → 1.2.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.
Files changed (100) hide show
  1. package/dist/AppBar.cjs +1 -1
  2. package/dist/Avatar.cjs +2 -2
  3. package/dist/Avatar.mjs +1 -1
  4. package/dist/Backdrop.cjs +1 -1
  5. package/dist/Button.cjs +2 -2
  6. package/dist/Button.mjs +1 -1
  7. package/dist/ButtonGroup.cjs +1 -1
  8. package/dist/Card.cjs +3 -3
  9. package/dist/Card.mjs +2 -2
  10. package/dist/Checkbox.cjs +1 -1
  11. package/dist/CircularProgress.cjs +1 -1
  12. package/dist/Drawer.cjs +4 -3
  13. package/dist/Drawer.mjs +3 -2
  14. package/dist/Flex.cjs +1 -1
  15. package/dist/Flex.mjs +3 -1
  16. package/dist/FocusTrap.cjs +1 -1
  17. package/dist/Form.cjs +1 -1
  18. package/dist/FormControl.cjs +2 -2
  19. package/dist/FormControl.mjs +1 -1
  20. package/dist/FormHelperText.cjs +1 -1
  21. package/dist/FormLabel.cjs +1 -1
  22. package/dist/Grid.cjs +1 -1
  23. package/dist/Grid.mjs +3 -1
  24. package/dist/{Icon-BOjk5r39.cjs → Icon-ByDvM-t1.cjs} +9 -7
  25. package/dist/{Icon-CYjD0Bad.mjs → Icon-GgwNXKEY.mjs} +8 -6
  26. package/dist/Icon.cjs +1 -1
  27. package/dist/Icon.mjs +1 -1
  28. package/dist/Image.cjs +10 -9
  29. package/dist/Image.mjs +9 -8
  30. package/dist/LinearProgress.cjs +1 -1
  31. package/dist/Link.cjs +2 -2
  32. package/dist/Link.mjs +1 -1
  33. package/dist/MenuItem.cjs +3 -3
  34. package/dist/MenuItem.mjs +2 -2
  35. package/dist/{Modal-dy5l7gfH.mjs → Modal-COLrJoNW.mjs} +2 -1
  36. package/dist/{Modal-DZH-DzMZ.cjs → Modal-S2nb35q-.cjs} +3 -2
  37. package/dist/Modal.cjs +1 -1
  38. package/dist/Modal.mjs +1 -1
  39. package/dist/NativeSelect.cjs +9 -8
  40. package/dist/NativeSelect.mjs +8 -7
  41. package/dist/Pagination/PaginationItem.cjs +2 -2
  42. package/dist/Pagination/PaginationItem.mjs +1 -1
  43. package/dist/Pagination.cjs +1 -1
  44. package/dist/Paper.cjs +2 -2
  45. package/dist/Paper.mjs +1 -1
  46. package/dist/{Popover-Chgtjn-N.mjs → Popover-BjGubpna.mjs} +2 -2
  47. package/dist/{Popover-pEVboMZO.cjs → Popover-BxN7ts_I.cjs} +3 -3
  48. package/dist/Popover.cjs +1 -1
  49. package/dist/Popover.mjs +1 -1
  50. package/dist/Pressable.cjs +2 -2
  51. package/dist/Pressable.mjs +1 -1
  52. package/dist/Quote.cjs +1 -1
  53. package/dist/Radio.cjs +1 -1
  54. package/dist/Select.cjs +42 -41
  55. package/dist/Select.mjs +41 -40
  56. package/dist/Sidebar/Sidebar.cjs +1 -1
  57. package/dist/Sidebar/SidebarItem.cjs +2 -2
  58. package/dist/Sidebar/SidebarItem.mjs +1 -1
  59. package/dist/Skeleton.cjs +1 -1
  60. package/dist/Switch.cjs +2 -2
  61. package/dist/Switch.mjs +1 -1
  62. package/dist/Table/Table.cjs +1 -1
  63. package/dist/Table/TableBody.cjs +18 -16
  64. package/dist/Table/TableBody.mjs +17 -15
  65. package/dist/Table/TableCell.cjs +1 -1
  66. package/dist/Table/TableContainer.cjs +1 -1
  67. package/dist/Table/TableControl.cjs +3 -2
  68. package/dist/Table/TableControl.mjs +3 -2
  69. package/dist/Table/TableFooter.cjs +18 -16
  70. package/dist/Table/TableFooter.mjs +17 -15
  71. package/dist/Table/TableHead.cjs +18 -16
  72. package/dist/Table/TableHead.mjs +17 -15
  73. package/dist/Table/TablePagination.cjs +1 -1
  74. package/dist/Table/TablePaginationActions.cjs +2 -2
  75. package/dist/Table/TablePaginationActions.mjs +1 -1
  76. package/dist/Table/TableRow.cjs +1 -1
  77. package/dist/Table/TableSortLabel.cjs +8 -7
  78. package/dist/Table/TableSortLabel.mjs +7 -6
  79. package/dist/Table/hooks.cjs +2 -1
  80. package/dist/Table/hooks.mjs +2 -1
  81. package/dist/TextInput.cjs +11 -10
  82. package/dist/TextInput.mjs +10 -9
  83. package/dist/ToggleButton/ToggleButton.cjs +2 -2
  84. package/dist/ToggleButton/ToggleButton.mjs +1 -1
  85. package/dist/ToggleButton/ToggleButtonGroup.cjs +2 -2
  86. package/dist/ToggleButton/ToggleButtonGroup.mjs +1 -1
  87. package/dist/Typography.cjs +2 -2
  88. package/dist/Typography.mjs +1 -1
  89. package/dist/View.cjs +1 -1
  90. package/dist/engine.cjs +1 -1
  91. package/dist/index.cjs +1 -1
  92. package/dist/{rolldown-runtime-DDXJien1.cjs → rolldown-runtime-BloeesfJ.cjs} +1 -1
  93. package/dist/{src-C8PIppTy.cjs → src-BJrcLd7P.cjs} +1 -1
  94. package/dist/style.cjs +1 -1
  95. package/dist/style.mjs +1 -1
  96. package/dist/{theme-Du6xgPsg.cjs → theme-CleLAV6A.cjs} +2 -1
  97. package/dist/{theme-V6lYzd3j.mjs → theme-Cudynq5K.mjs} +2 -1
  98. package/dist/theme.cjs +1 -1
  99. package/dist/theme.mjs +1 -1
  100. package/package.json +17 -17
package/dist/Paper.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { a as src_exports, o as styled, t as createShouldForwardProp } from "./src-BJy4dM4f.mjs";
2
2
  import { Flex } from "./Flex.mjs";
3
3
  import { t as themeDefault } from "./themeDefault-Z3KmyIbm.mjs";
4
- import { r as useTheme } from "./theme-V6lYzd3j.mjs";
4
+ import { r as useTheme } from "./theme-Cudynq5K.mjs";
5
5
  import "react";
6
6
  import { jsx } from "react/jsx-runtime";
7
7
  //#region src/Paper/Paper.tsx
@@ -1,7 +1,7 @@
1
1
  import { o as styled, t as createShouldForwardProp } from "./src-BJy4dM4f.mjs";
2
- import { r as useTheme } from "./theme-V6lYzd3j.mjs";
2
+ import { r as useTheme } from "./theme-Cudynq5K.mjs";
3
3
  import { Paper } from "./Paper.mjs";
4
- import { t as Modal } from "./Modal-dy5l7gfH.mjs";
4
+ import { t as Modal } from "./Modal-COLrJoNW.mjs";
5
5
  import { useCallback, useEffect, useImperativeHandle, useLayoutEffect, useRef, useState } from "react";
6
6
  import { jsx } from "react/jsx-runtime";
7
7
  //#region src/Popover/utils/resolveAnchorEl.ts
@@ -1,7 +1,7 @@
1
- const require_src = require("./src-C8PIppTy.cjs");
2
- const require_theme = require("./theme-Du6xgPsg.cjs");
1
+ const require_src = require("./src-BJrcLd7P.cjs");
2
+ const require_theme = require("./theme-CleLAV6A.cjs");
3
3
  const require_Paper = require("./Paper.cjs");
4
- const require_Modal = require("./Modal-DZH-DzMZ.cjs");
4
+ const require_Modal = require("./Modal-S2nb35q-.cjs");
5
5
  let react = require("react");
6
6
  let react_jsx_runtime = require("react/jsx-runtime");
7
7
  let _soroush_tech_styled_system_should_forward_prop = require("@soroush.tech/styled-system/should-forward-prop");
package/dist/Popover.cjs CHANGED
@@ -1,3 +1,3 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_Popover = require("./Popover-pEVboMZO.cjs");
2
+ const require_Popover = require("./Popover-BxN7ts_I.cjs");
3
3
  exports.Popover = require_Popover.Popover;
package/dist/Popover.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { t as Popover } from "./Popover-Chgtjn-N.mjs";
1
+ import { t as Popover } from "./Popover-BjGubpna.mjs";
2
2
  export { Popover };
@@ -1,8 +1,8 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_src = require("./src-C8PIppTy.cjs");
2
+ const require_src = require("./src-BJrcLd7P.cjs");
3
3
  const require_themeDefault = require("./themeDefault-Cebi08Cv.cjs");
4
4
  const require_utils = require("./utils.cjs");
5
- const require_theme = require("./theme-Du6xgPsg.cjs");
5
+ const require_theme = require("./theme-CleLAV6A.cjs");
6
6
  require("react");
7
7
  let react_jsx_runtime = require("react/jsx-runtime");
8
8
  let _soroush_tech_styled_system_should_forward_prop = require("@soroush.tech/styled-system/should-forward-prop");
@@ -1,7 +1,7 @@
1
1
  import { a as src_exports, i as props, o as styled, t as createShouldForwardProp } from "./src-BJy4dM4f.mjs";
2
2
  import { t as themeDefault } from "./themeDefault-Z3KmyIbm.mjs";
3
3
  import { alpha } from "./utils.mjs";
4
- import { n as useDefaultProps, r as useTheme } from "./theme-V6lYzd3j.mjs";
4
+ import { n as useDefaultProps, r as useTheme } from "./theme-Cudynq5K.mjs";
5
5
  import "react";
6
6
  import { jsx } from "react/jsx-runtime";
7
7
  //#region src/Pressable/Pressable.tsx
package/dist/Quote.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_src = require("./src-C8PIppTy.cjs");
2
+ const require_src = require("./src-BJrcLd7P.cjs");
3
3
  const require_View = require("./View.cjs");
4
4
  //#region src/Quote/Quote.tsx
5
5
  /** A View with a 2px primary left-border — used for terminal readouts and markdown blockquotes. */
package/dist/Radio.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_src = require("./src-C8PIppTy.cjs");
2
+ const require_src = require("./src-BJrcLd7P.cjs");
3
3
  const require_themeDefault = require("./themeDefault-Cebi08Cv.cjs");
4
4
  const require_FormControl = require("./FormControl.cjs");
5
5
  require("react");
package/dist/Select.cjs CHANGED
@@ -1,12 +1,12 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_src = require("./src-C8PIppTy.cjs");
2
+ const require_src = require("./src-BJrcLd7P.cjs");
3
3
  const require_themeDefault = require("./themeDefault-Cebi08Cv.cjs");
4
- const require_theme = require("./theme-Du6xgPsg.cjs");
5
- const require_Icon = require("./Icon-BOjk5r39.cjs");
4
+ const require_theme = require("./theme-CleLAV6A.cjs");
5
+ const require_Icon = require("./Icon-ByDvM-t1.cjs");
6
6
  const require_FormControl = require("./FormControl.cjs");
7
7
  const require_inputVariantStyles = require("./inputVariantStyles-BBkkYQtE.cjs");
8
8
  const require_NativeSelect = require("./NativeSelect.cjs");
9
- const require_Popover = require("./Popover-pEVboMZO.cjs");
9
+ const require_Popover = require("./Popover-BxN7ts_I.cjs");
10
10
  let react = require("react");
11
11
  let react_jsx_runtime = require("react/jsx-runtime");
12
12
  let _soroush_tech_styled_system_should_forward_prop = require("@soroush.tech/styled-system/should-forward-prop");
@@ -174,15 +174,16 @@ const layoutStyles = ({ fullWidth, disabled }) => ({
174
174
  cursor: "not-allowed"
175
175
  } : {}
176
176
  });
177
+ const widthStyles = (0, require_src.src_exports.system)({
178
+ width: true,
179
+ minWidth: true,
180
+ maxWidth: true
181
+ });
177
182
  const Trigger = require_src.styled("div", {
178
183
  name: "Select",
179
184
  label: "Select",
180
185
  shouldForwardProp,
181
- systemProps: [require_src.src_exports.space, (0, require_src.src_exports.system)({
182
- width: true,
183
- minWidth: true,
184
- maxWidth: true
185
- })]
186
+ systemProps: [require_src.src_exports.space, widthStyles]
186
187
  })(baseStyle, require_inputVariantStyles.inputVariantStyles, borderRadiusStyle, colorBorder, activeBorder, backgroundStyle, sizeVariants, layoutStyles);
187
188
  const ValueArea = require_src.styled("span", {
188
189
  name: "Select",
@@ -251,33 +252,36 @@ function Select({ children, native = false, multiple = false, autoWidth = false,
251
252
  const [internalValue, setInternalValue] = (0, react.useState)(defaultValue ?? (multiple ? [] : ""));
252
253
  const rawValue = isControlledValue ? valueProp : internalValue;
253
254
  const value = multiple ? Array.isArray(rawValue) ? rawValue : [] : Array.isArray(rawValue) ? "" : rawValue;
254
- if (native) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_NativeSelect.NativeSelect, {
255
- options: options.map((option) => ({
255
+ if (native) {
256
+ const nativeOptions = options.map((option) => ({
256
257
  value: option.value,
257
258
  label: typeof option.label === "string" ? option.label : String(option.label)
258
- })),
259
- value: Array.isArray(valueProp) ? void 0 : valueProp,
260
- defaultValue: Array.isArray(defaultValue) ? void 0 : defaultValue,
261
- onChange,
262
- placeholder,
263
- borderRadius,
264
- color: colorProp,
265
- textColor: textColorProp,
266
- bg,
267
- disabled: disabledProp,
268
- error: errorProp,
269
- fullWidth: fullWidthProp,
270
- required: requiredProp,
271
- size: sizeProp,
272
- variant,
273
- iconName,
274
- iconProps,
275
- id: idProp,
276
- name,
277
- className,
278
- "data-testid": dataTestid,
279
- ...spaceProps
280
- });
259
+ }));
260
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_NativeSelect.NativeSelect, {
261
+ options: nativeOptions,
262
+ value: Array.isArray(valueProp) ? void 0 : valueProp,
263
+ defaultValue: Array.isArray(defaultValue) ? void 0 : defaultValue,
264
+ onChange,
265
+ placeholder,
266
+ borderRadius,
267
+ color: colorProp,
268
+ textColor: textColorProp,
269
+ bg,
270
+ disabled: disabledProp,
271
+ error: errorProp,
272
+ fullWidth: fullWidthProp,
273
+ required: requiredProp,
274
+ size: sizeProp,
275
+ variant,
276
+ iconName,
277
+ iconProps,
278
+ id: idProp,
279
+ name,
280
+ className,
281
+ "data-testid": dataTestid,
282
+ ...spaceProps
283
+ });
284
+ }
281
285
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(NonNativeSelect, {
282
286
  options,
283
287
  value,
@@ -379,13 +383,10 @@ function NonNativeSelect({ children, options, value, autoWidth, onChangeValue, m
379
383
  if (open) selectHighlighted();
380
384
  else openWithHighlight();
381
385
  break;
382
- case "Escape":
383
- if (open) {
384
- event.preventDefault();
385
- closeMenu();
386
- }
387
- break;
388
- default: break;
386
+ case "Escape": if (open) {
387
+ event.preventDefault();
388
+ closeMenu();
389
+ }
389
390
  }
390
391
  };
391
392
  const handleTriggerClick = () => {
package/dist/Select.mjs CHANGED
@@ -1,11 +1,11 @@
1
1
  import { a as src_exports, i as props, o as styled, t as createShouldForwardProp } from "./src-BJy4dM4f.mjs";
2
2
  import { t as themeDefault } from "./themeDefault-Z3KmyIbm.mjs";
3
- import { r as useTheme } from "./theme-V6lYzd3j.mjs";
4
- import { t as Icon } from "./Icon-CYjD0Bad.mjs";
3
+ import { r as useTheme } from "./theme-Cudynq5K.mjs";
4
+ import { t as Icon } from "./Icon-GgwNXKEY.mjs";
5
5
  import { useFormControl } from "./FormControl.mjs";
6
6
  import { t as inputVariantStyles } from "./inputVariantStyles-CcqpGfuP.mjs";
7
7
  import { NativeSelect } from "./NativeSelect.mjs";
8
- import { t as Popover } from "./Popover-Chgtjn-N.mjs";
8
+ import { t as Popover } from "./Popover-BjGubpna.mjs";
9
9
  import { Children, cloneElement, isValidElement, useCallback, useId, useState } from "react";
10
10
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
11
11
  //#region src/Select/hooks/useSelectPopover.ts
@@ -172,15 +172,16 @@ const layoutStyles = ({ fullWidth, disabled }) => ({
172
172
  cursor: "not-allowed"
173
173
  } : {}
174
174
  });
175
+ const widthStyles = (0, src_exports.system)({
176
+ width: true,
177
+ minWidth: true,
178
+ maxWidth: true
179
+ });
175
180
  const Trigger = styled("div", {
176
181
  name: "Select",
177
182
  label: "Select",
178
183
  shouldForwardProp,
179
- systemProps: [src_exports.space, (0, src_exports.system)({
180
- width: true,
181
- minWidth: true,
182
- maxWidth: true
183
- })]
184
+ systemProps: [src_exports.space, widthStyles]
184
185
  })(baseStyle, inputVariantStyles, borderRadiusStyle, colorBorder, activeBorder, backgroundStyle, sizeVariants, layoutStyles);
185
186
  const ValueArea = styled("span", {
186
187
  name: "Select",
@@ -249,33 +250,36 @@ function Select({ children, native = false, multiple = false, autoWidth = false,
249
250
  const [internalValue, setInternalValue] = useState(defaultValue ?? (multiple ? [] : ""));
250
251
  const rawValue = isControlledValue ? valueProp : internalValue;
251
252
  const value = multiple ? Array.isArray(rawValue) ? rawValue : [] : Array.isArray(rawValue) ? "" : rawValue;
252
- if (native) return /* @__PURE__ */ jsx(NativeSelect, {
253
- options: options.map((option) => ({
253
+ if (native) {
254
+ const nativeOptions = options.map((option) => ({
254
255
  value: option.value,
255
256
  label: typeof option.label === "string" ? option.label : String(option.label)
256
- })),
257
- value: Array.isArray(valueProp) ? void 0 : valueProp,
258
- defaultValue: Array.isArray(defaultValue) ? void 0 : defaultValue,
259
- onChange,
260
- placeholder,
261
- borderRadius,
262
- color: colorProp,
263
- textColor: textColorProp,
264
- bg,
265
- disabled: disabledProp,
266
- error: errorProp,
267
- fullWidth: fullWidthProp,
268
- required: requiredProp,
269
- size: sizeProp,
270
- variant,
271
- iconName,
272
- iconProps,
273
- id: idProp,
274
- name,
275
- className,
276
- "data-testid": dataTestid,
277
- ...spaceProps
278
- });
257
+ }));
258
+ return /* @__PURE__ */ jsx(NativeSelect, {
259
+ options: nativeOptions,
260
+ value: Array.isArray(valueProp) ? void 0 : valueProp,
261
+ defaultValue: Array.isArray(defaultValue) ? void 0 : defaultValue,
262
+ onChange,
263
+ placeholder,
264
+ borderRadius,
265
+ color: colorProp,
266
+ textColor: textColorProp,
267
+ bg,
268
+ disabled: disabledProp,
269
+ error: errorProp,
270
+ fullWidth: fullWidthProp,
271
+ required: requiredProp,
272
+ size: sizeProp,
273
+ variant,
274
+ iconName,
275
+ iconProps,
276
+ id: idProp,
277
+ name,
278
+ className,
279
+ "data-testid": dataTestid,
280
+ ...spaceProps
281
+ });
282
+ }
279
283
  return /* @__PURE__ */ jsx(NonNativeSelect, {
280
284
  options,
281
285
  value,
@@ -377,13 +381,10 @@ function NonNativeSelect({ children, options, value, autoWidth, onChangeValue, m
377
381
  if (open) selectHighlighted();
378
382
  else openWithHighlight();
379
383
  break;
380
- case "Escape":
381
- if (open) {
382
- event.preventDefault();
383
- closeMenu();
384
- }
385
- break;
386
- default: break;
384
+ case "Escape": if (open) {
385
+ event.preventDefault();
386
+ closeMenu();
387
+ }
387
388
  }
388
389
  };
389
390
  const handleTriggerClick = () => {
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_src = require("../src-C8PIppTy.cjs");
2
+ const require_src = require("../src-BJrcLd7P.cjs");
3
3
  const require_Flex = require("../Flex.cjs");
4
4
  const require_SidebarContext = require("../SidebarContext-jG6OioC-.cjs");
5
5
  let react = require("react");
@@ -1,9 +1,9 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_src = require("../src-C8PIppTy.cjs");
2
+ const require_src = require("../src-BJrcLd7P.cjs");
3
3
  const require_Flex = require("../Flex.cjs");
4
4
  const require_utils = require("../utils.cjs");
5
5
  const require_Typography = require("../Typography.cjs");
6
- const require_Icon = require("../Icon-BOjk5r39.cjs");
6
+ const require_Icon = require("../Icon-ByDvM-t1.cjs");
7
7
  const require_Portal = require("../Portal.cjs");
8
8
  const require_Pressable = require("../Pressable.cjs");
9
9
  const require_SidebarContext = require("../SidebarContext-jG6OioC-.cjs");
@@ -2,7 +2,7 @@ import { a as src_exports, o as styled } from "../src-BJy4dM4f.mjs";
2
2
  import { Flex } from "../Flex.mjs";
3
3
  import { alpha } from "../utils.mjs";
4
4
  import { Typography } from "../Typography.mjs";
5
- import { t as Icon } from "../Icon-CYjD0Bad.mjs";
5
+ import { t as Icon } from "../Icon-GgwNXKEY.mjs";
6
6
  import { Portal } from "../Portal.mjs";
7
7
  import { Pressable } from "../Pressable.mjs";
8
8
  import { t as SidebarContext } from "../SidebarContext-DgSLwjur.mjs";
package/dist/Skeleton.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_src = require("./src-C8PIppTy.cjs");
2
+ const require_src = require("./src-BJrcLd7P.cjs");
3
3
  require("react");
4
4
  let react_jsx_runtime = require("react/jsx-runtime");
5
5
  let _soroush_tech_styled_system_should_forward_prop = require("@soroush.tech/styled-system/should-forward-prop");
package/dist/Switch.cjs CHANGED
@@ -1,8 +1,8 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_src = require("./src-C8PIppTy.cjs");
2
+ const require_src = require("./src-BJrcLd7P.cjs");
3
3
  const require_themeDefault = require("./themeDefault-Cebi08Cv.cjs");
4
4
  const require_utils = require("./utils.cjs");
5
- const require_theme = require("./theme-Du6xgPsg.cjs");
5
+ const require_theme = require("./theme-CleLAV6A.cjs");
6
6
  require("react");
7
7
  let react_jsx_runtime = require("react/jsx-runtime");
8
8
  let _soroush_tech_styled_system_should_forward_prop = require("@soroush.tech/styled-system/should-forward-prop");
package/dist/Switch.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { a as src_exports, i as props, o as styled, t as createShouldForwardProp } from "./src-BJy4dM4f.mjs";
2
2
  import { t as themeDefault } from "./themeDefault-Z3KmyIbm.mjs";
3
3
  import { alpha } from "./utils.mjs";
4
- import { r as useTheme } from "./theme-V6lYzd3j.mjs";
4
+ import { r as useTheme } from "./theme-Cudynq5K.mjs";
5
5
  import "react";
6
6
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
7
7
  //#region src/Switch/Switch.tsx
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_src = require("../src-C8PIppTy.cjs");
2
+ const require_src = require("../src-BJrcLd7P.cjs");
3
3
  const require_TableContext = require("../TableContext-Bfg1C3Sr.cjs");
4
4
  let react = require("react");
5
5
  let react_jsx_runtime = require("react/jsx-runtime");
@@ -1,30 +1,32 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_src = require("../src-C8PIppTy.cjs");
2
+ const require_src = require("../src-BJrcLd7P.cjs");
3
3
  const require_TableSectionContext = require("../TableSectionContext-pYlJ-duI.cjs");
4
4
  require("react");
5
5
  let react_jsx_runtime = require("react/jsx-runtime");
6
6
  let _soroush_tech_styled_system_should_forward_prop = require("@soroush.tech/styled-system/should-forward-prop");
7
7
  //#region src/Table/TableBody/TableBody.tsx
8
+ const shouldForwardProp = (0, _soroush_tech_styled_system_should_forward_prop.createShouldForwardProp)([..._soroush_tech_styled_system_should_forward_prop.props]);
9
+ const colorSystem = (0, require_src.src_exports.system)({
10
+ color: {
11
+ property: "color",
12
+ scale: "text"
13
+ },
14
+ bg: {
15
+ property: "backgroundColor",
16
+ scale: "background"
17
+ },
18
+ borderColor: {
19
+ property: "borderColor",
20
+ scale: "border"
21
+ }
22
+ });
8
23
  const TableBodyBase = require_src.styled("tbody", {
9
24
  name: "TableBody",
10
25
  label: "TableBody",
11
- shouldForwardProp: (0, _soroush_tech_styled_system_should_forward_prop.createShouldForwardProp)([..._soroush_tech_styled_system_should_forward_prop.props]),
26
+ shouldForwardProp,
12
27
  systemProps: [
13
28
  require_src.src_exports.space,
14
- (0, require_src.src_exports.system)({
15
- color: {
16
- property: "color",
17
- scale: "text"
18
- },
19
- bg: {
20
- property: "backgroundColor",
21
- scale: "background"
22
- },
23
- borderColor: {
24
- property: "borderColor",
25
- scale: "border"
26
- }
27
- }),
29
+ colorSystem,
28
30
  require_src.src_exports.border
29
31
  ]
30
32
  })();
@@ -3,26 +3,28 @@ import { t as TableSectionContext } from "../TableSectionContext-meIG4lFZ.mjs";
3
3
  import "react";
4
4
  import { jsx } from "react/jsx-runtime";
5
5
  //#region src/Table/TableBody/TableBody.tsx
6
+ const shouldForwardProp = createShouldForwardProp([...props]);
7
+ const colorSystem = (0, src_exports.system)({
8
+ color: {
9
+ property: "color",
10
+ scale: "text"
11
+ },
12
+ bg: {
13
+ property: "backgroundColor",
14
+ scale: "background"
15
+ },
16
+ borderColor: {
17
+ property: "borderColor",
18
+ scale: "border"
19
+ }
20
+ });
6
21
  const TableBodyBase = styled("tbody", {
7
22
  name: "TableBody",
8
23
  label: "TableBody",
9
- shouldForwardProp: createShouldForwardProp([...props]),
24
+ shouldForwardProp,
10
25
  systemProps: [
11
26
  src_exports.space,
12
- (0, src_exports.system)({
13
- color: {
14
- property: "color",
15
- scale: "text"
16
- },
17
- bg: {
18
- property: "backgroundColor",
19
- scale: "background"
20
- },
21
- borderColor: {
22
- property: "borderColor",
23
- scale: "border"
24
- }
25
- }),
27
+ colorSystem,
26
28
  src_exports.border
27
29
  ]
28
30
  })();
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_src = require("../src-C8PIppTy.cjs");
2
+ const require_src = require("../src-BJrcLd7P.cjs");
3
3
  const require_themeDefault = require("../themeDefault-Cebi08Cv.cjs");
4
4
  const require_TableContext = require("../TableContext-Bfg1C3Sr.cjs");
5
5
  const require_TableSectionContext = require("../TableSectionContext-pYlJ-duI.cjs");
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_src = require("../src-C8PIppTy.cjs");
2
+ const require_src = require("../src-BJrcLd7P.cjs");
3
3
  const require_View = require("../View.cjs");
4
4
  //#region src/Table/TableContainer/TableContainer.tsx
5
5
  /**
@@ -16,7 +16,7 @@ const defaultSortFunction = (a, b, orderBy) => {
16
16
  * `<tr>` children of `<tbody>`. Both `sort` and `pagination` are optional.
17
17
  */
18
18
  function TableControl({ data, sort, pagination, sortFunction = defaultSortFunction, children }) {
19
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, { children: (0, react.useMemo)(() => {
19
+ const rows = (0, react.useMemo)(() => {
20
20
  let visible = [...data];
21
21
  const active = sort && Object.entries(sort).find(([, entry]) => entry.isActive);
22
22
  if (active) {
@@ -36,7 +36,8 @@ function TableControl({ data, sort, pagination, sortFunction = defaultSortFuncti
36
36
  sort,
37
37
  pagination,
38
38
  sortFunction
39
- ]).map(children) });
39
+ ]);
40
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, { children: rows.map(children) });
40
41
  }
41
42
  //#endregion
42
43
  exports.TableControl = TableControl;
@@ -15,7 +15,7 @@ const defaultSortFunction = (a, b, orderBy) => {
15
15
  * `<tr>` children of `<tbody>`. Both `sort` and `pagination` are optional.
16
16
  */
17
17
  function TableControl({ data, sort, pagination, sortFunction = defaultSortFunction, children }) {
18
- return /* @__PURE__ */ jsx(Fragment, { children: useMemo(() => {
18
+ const rows = useMemo(() => {
19
19
  let visible = [...data];
20
20
  const active = sort && Object.entries(sort).find(([, entry]) => entry.isActive);
21
21
  if (active) {
@@ -35,7 +35,8 @@ function TableControl({ data, sort, pagination, sortFunction = defaultSortFuncti
35
35
  sort,
36
36
  pagination,
37
37
  sortFunction
38
- ]).map(children) });
38
+ ]);
39
+ return /* @__PURE__ */ jsx(Fragment, { children: rows.map(children) });
39
40
  }
40
41
  //#endregion
41
42
  export { TableControl };
@@ -1,30 +1,32 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_src = require("../src-C8PIppTy.cjs");
2
+ const require_src = require("../src-BJrcLd7P.cjs");
3
3
  const require_TableSectionContext = require("../TableSectionContext-pYlJ-duI.cjs");
4
4
  require("react");
5
5
  let react_jsx_runtime = require("react/jsx-runtime");
6
6
  let _soroush_tech_styled_system_should_forward_prop = require("@soroush.tech/styled-system/should-forward-prop");
7
7
  //#region src/Table/TableFooter/TableFooter.tsx
8
+ const shouldForwardProp = (0, _soroush_tech_styled_system_should_forward_prop.createShouldForwardProp)([..._soroush_tech_styled_system_should_forward_prop.props]);
9
+ const colorSystem = (0, require_src.src_exports.system)({
10
+ color: {
11
+ property: "color",
12
+ scale: "text"
13
+ },
14
+ bg: {
15
+ property: "backgroundColor",
16
+ scale: "background"
17
+ },
18
+ borderColor: {
19
+ property: "borderColor",
20
+ scale: "border"
21
+ }
22
+ });
8
23
  const TableFooterBase = require_src.styled("tfoot", {
9
24
  name: "TableFooter",
10
25
  label: "TableFooter",
11
- shouldForwardProp: (0, _soroush_tech_styled_system_should_forward_prop.createShouldForwardProp)([..._soroush_tech_styled_system_should_forward_prop.props]),
26
+ shouldForwardProp,
12
27
  systemProps: [
13
28
  require_src.src_exports.space,
14
- (0, require_src.src_exports.system)({
15
- color: {
16
- property: "color",
17
- scale: "text"
18
- },
19
- bg: {
20
- property: "backgroundColor",
21
- scale: "background"
22
- },
23
- borderColor: {
24
- property: "borderColor",
25
- scale: "border"
26
- }
27
- }),
29
+ colorSystem,
28
30
  require_src.src_exports.border
29
31
  ]
30
32
  })();
@@ -3,26 +3,28 @@ import { t as TableSectionContext } from "../TableSectionContext-meIG4lFZ.mjs";
3
3
  import "react";
4
4
  import { jsx } from "react/jsx-runtime";
5
5
  //#region src/Table/TableFooter/TableFooter.tsx
6
+ const shouldForwardProp = createShouldForwardProp([...props]);
7
+ const colorSystem = (0, src_exports.system)({
8
+ color: {
9
+ property: "color",
10
+ scale: "text"
11
+ },
12
+ bg: {
13
+ property: "backgroundColor",
14
+ scale: "background"
15
+ },
16
+ borderColor: {
17
+ property: "borderColor",
18
+ scale: "border"
19
+ }
20
+ });
6
21
  const TableFooterBase = styled("tfoot", {
7
22
  name: "TableFooter",
8
23
  label: "TableFooter",
9
- shouldForwardProp: createShouldForwardProp([...props]),
24
+ shouldForwardProp,
10
25
  systemProps: [
11
26
  src_exports.space,
12
- (0, src_exports.system)({
13
- color: {
14
- property: "color",
15
- scale: "text"
16
- },
17
- bg: {
18
- property: "backgroundColor",
19
- scale: "background"
20
- },
21
- borderColor: {
22
- property: "borderColor",
23
- scale: "border"
24
- }
25
- }),
27
+ colorSystem,
26
28
  src_exports.border
27
29
  ]
28
30
  })();