softable-pixels-web 1.0.7 → 1.0.8

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 (59) hide show
  1. package/dist/{Button-B9tDbn4Q.js → Button-rI1zyBIr.js} +19 -12
  2. package/dist/Button-rI1zyBIr.js.map +1 -0
  3. package/dist/{CheckItem-CBzbinCc.js → CheckItem-OVa0nZlJ.js} +5 -5
  4. package/dist/CheckItem-OVa0nZlJ.js.map +1 -0
  5. package/dist/{Checkbox-l_SA4qUE.js → Checkbox-DdPF40bm.js} +7 -7
  6. package/dist/Checkbox-DdPF40bm.js.map +1 -0
  7. package/dist/{Icon-BrLGgg0w.js → Icon-T_2VPPNe.js} +4 -4
  8. package/dist/{Icon-BrLGgg0w.js.map → Icon-T_2VPPNe.js.map} +1 -1
  9. package/dist/{InfoSummary-CHRfCc3v.js → InfoSummary-D4GgSlQ0.js} +12 -12
  10. package/dist/InfoSummary-D4GgSlQ0.js.map +1 -0
  11. package/dist/{Input-CUZNjGoG.js → Input-9E5L4S5O.js} +8 -7
  12. package/dist/Input-9E5L4S5O.js.map +1 -0
  13. package/dist/{Label-BVteAeiK.js → Label-DFcePle9.js} +4 -4
  14. package/dist/Label-DFcePle9.js.map +1 -0
  15. package/dist/{TabSwitch-DRs6-76U.js → TabSwitch-CHS3g1CP.js} +7 -11
  16. package/dist/TabSwitch-CHS3g1CP.js.map +1 -0
  17. package/dist/{TextArea-ZKDCCx4I.js → TextArea-CrJs9f5t.js} +6 -6
  18. package/dist/TextArea-CrJs9f5t.js.map +1 -0
  19. package/dist/{ThemeContext-BQQnMo5F.js → ThemeContext-CMCP5Hqz.js} +52 -90
  20. package/dist/ThemeContext-CMCP5Hqz.js.map +1 -0
  21. package/dist/{Typography-BaE9Y1O8.js → Typography-ZFnL1M33.js} +34 -19
  22. package/dist/Typography-ZFnL1M33.js.map +1 -0
  23. package/dist/button.d.ts +2 -2
  24. package/dist/button.js +2 -2
  25. package/dist/check-item.js +3 -3
  26. package/dist/checkbox.d.ts +2 -2
  27. package/dist/checkbox.js +3 -3
  28. package/dist/{index-H8VYQre4.d.ts → index-B33Qb8xC.d.ts} +4 -13
  29. package/dist/{index-Cbt7nYQB.d.ts → index-CDUVPVvZ.d.ts} +2 -2
  30. package/dist/{index-BvkboQOE.d.ts → index-Dkyy3OOB.d.ts} +13 -9
  31. package/dist/{index-CqAWI5LI.d.ts → index-DuKjuLFf.d.ts} +2 -2
  32. package/dist/{index-x_PYKZgv.d.ts → index-NpIJSn1Q.d.ts} +47 -3
  33. package/dist/{index-CXR_rnK-.d.ts → index-feodN4N9.d.ts} +11 -11
  34. package/dist/index.d.ts +7 -7
  35. package/dist/index.js +11 -11
  36. package/dist/info-summary.js +2 -2
  37. package/dist/input.d.ts +2 -2
  38. package/dist/input.js +4 -4
  39. package/dist/tab-switch.d.ts +1 -1
  40. package/dist/tab-switch.js +2 -2
  41. package/dist/text-area.d.ts +2 -2
  42. package/dist/text-area.js +4 -4
  43. package/dist/theme-context.d.ts +1 -1
  44. package/dist/theme-context.js +3 -1
  45. package/dist/{types-_ZbgGCjb.d.ts → types-WcPOnA5M.d.ts} +3 -3
  46. package/dist/typography.d.ts +1 -1
  47. package/dist/typography.js +1 -1
  48. package/dist/{useThemedStyles-_SsqjB7Q.d.ts → useThemedStyles-CniQ6zDU.d.ts} +10 -2
  49. package/package.json +1 -1
  50. package/dist/Button-B9tDbn4Q.js.map +0 -1
  51. package/dist/CheckItem-CBzbinCc.js.map +0 -1
  52. package/dist/Checkbox-l_SA4qUE.js.map +0 -1
  53. package/dist/InfoSummary-CHRfCc3v.js.map +0 -1
  54. package/dist/Input-CUZNjGoG.js.map +0 -1
  55. package/dist/Label-BVteAeiK.js.map +0 -1
  56. package/dist/TabSwitch-DRs6-76U.js.map +0 -1
  57. package/dist/TextArea-ZKDCCx4I.js.map +0 -1
  58. package/dist/ThemeContext-BQQnMo5F.js.map +0 -1
  59. package/dist/Typography-BaE9Y1O8.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import { n as useThemedStyles, t as Typography } from "./Typography-BaE9Y1O8.js";
1
+ import { n as styled, r as useThemedStyles, t as Typography } from "./Typography-ZFnL1M33.js";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
3
  import { AnimatePresence, motion } from "framer-motion";
4
4
 
@@ -28,14 +28,14 @@ function getBorder$1(props) {
28
28
  //#endregion
29
29
  //#region src/components/toolkit/Loader/styles.ts
30
30
  function createButtonLoaderStyles$1(props) {
31
- return { container: {
31
+ return styled({ container: {
32
32
  display: " inline-block",
33
33
  width: props.size || DEFAULT_SIZE,
34
34
  height: props.size || DEFAULT_SIZE,
35
35
  borderRadius: "50%",
36
36
  border: getBorder$1(props),
37
37
  borderLeftColor: props.color || DEFAULT_COLOR
38
- } };
38
+ } });
39
39
  }
40
40
 
41
41
  //#endregion
@@ -53,7 +53,7 @@ const Loader = (props) => {
53
53
  //#endregion
54
54
  //#region src/components/commons/buttons/Button/components/ButtonLoader/styles.ts
55
55
  function createButtonLoaderStyles() {
56
- return { container: {
56
+ return styled({ container: {
57
57
  position: "absolute",
58
58
  top: 0,
59
59
  left: 0,
@@ -63,7 +63,7 @@ function createButtonLoaderStyles() {
63
63
  alignItems: "center",
64
64
  justifyContent: "center",
65
65
  borderRadius: "var(--px-border-radius-button)"
66
- } };
66
+ } });
67
67
  }
68
68
 
69
69
  //#endregion
@@ -81,9 +81,9 @@ const ButtonLoader = ({ color }) => {
81
81
 
82
82
  //#endregion
83
83
  //#region src/components/commons/buttons/Button/styles.ts
84
- function createButtonStyles({ color, variant, disabled, fullWidth, textAlign }) {
84
+ function createButtonStyles({ color, variant, disabled, fullWidth, textAlign, outlineColor }) {
85
85
  const finalVariant = variant ?? "filled";
86
- return {
86
+ return styled({
87
87
  container: {
88
88
  minHeight: "2rem",
89
89
  height: "fit-content",
@@ -96,8 +96,8 @@ function createButtonStyles({ color, variant, disabled, fullWidth, textAlign })
96
96
  borderRadius: "var(--px-radius-md)",
97
97
  cursor: disabled ? "not-allowed" : "pointer",
98
98
  opacity: disabled ? .5 : 1,
99
- transition: "0.5s",
100
- border: getBorder(finalVariant, color),
99
+ transition: "background-color 0.5s",
100
+ border: getBorder(finalVariant, outlineColor || color),
101
101
  backgroundColor: getBackgroundColor(finalVariant, color),
102
102
  __rules: { "&:hover": { opacity: "0.85 !important" } }
103
103
  },
@@ -110,7 +110,7 @@ function createButtonStyles({ color, variant, disabled, fullWidth, textAlign })
110
110
  whiteSpace: "nowrap",
111
111
  columnGap: "var(--px-space-sm)"
112
112
  }
113
- };
113
+ });
114
114
  }
115
115
  function getBackgroundColor(variant, color) {
116
116
  if (color) return color;
@@ -147,8 +147,15 @@ const Button = ({ type = "button", variant = "filled", ...rest }) => {
147
147
  const textColor = getTextColor(resolvedProps);
148
148
  const { label, endIcon, startIcon, loading } = resolvedProps;
149
149
  const { styles, classes } = useThemedStyles(resolvedProps, createButtonStyles, {
150
+ override: rest.styles,
150
151
  applyCommonProps: true,
151
- commonSlot: "container"
152
+ commonSlot: "container",
153
+ pick: (p) => [
154
+ p.disabled,
155
+ p.loading,
156
+ p.label,
157
+ p.color
158
+ ]
152
159
  });
153
160
  function handleButtonClick() {
154
161
  if (disabled) return;
@@ -179,4 +186,4 @@ const Button = ({ type = "button", variant = "filled", ...rest }) => {
179
186
 
180
187
  //#endregion
181
188
  export { Button as t };
182
- //# sourceMappingURL=Button-B9tDbn4Q.js.map
189
+ //# sourceMappingURL=Button-rI1zyBIr.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Button-rI1zyBIr.js","names":["getBorder","createButtonLoaderStyles","getBorder","Loader: React.FC<LoaderProps>","createButtonLoaderStyles","ButtonLoader: React.FC<Props>","Button: React.FC<ButtonProps>"],"sources":["../src/utils/animations/spiner.ts","../src/components/toolkit/Loader/constants.ts","../src/components/toolkit/Loader/utils.ts","../src/components/toolkit/Loader/styles.ts","../src/components/toolkit/Loader/index.tsx","../src/components/commons/buttons/Button/components/ButtonLoader/styles.ts","../src/components/commons/buttons/Button/components/ButtonLoader/index.tsx","../src/components/commons/buttons/Button/styles.ts","../src/components/commons/buttons/Button/index.tsx"],"sourcesContent":["export const SPINNER_ANIMATION = {\n animate: { rotate: 360 },\n transition: {\n repeat: Infinity,\n duration: 1,\n ease: 'linear'\n }\n}\n","const DEFAULT_SIZE = '20px'\nconst DEFAULT_THICKNESS = '2px'\n\nconst DEFAULT_COLOR = 'white'\nconst DEFAULT_EMPTY_COLOR = 'transparent'\n\nexport { DEFAULT_SIZE, DEFAULT_THICKNESS, DEFAULT_COLOR, DEFAULT_EMPTY_COLOR }\n","// Utils\nimport { DEFAULT_THICKNESS, DEFAULT_EMPTY_COLOR } from './constants'\n\n// Types\nimport type { LoaderProps } from './types'\n\nexport function getBorder(props: LoaderProps) {\n const thickness = props.thickness || DEFAULT_THICKNESS\n const emptyColor = props.emptyColor || DEFAULT_EMPTY_COLOR\n\n return `${thickness} solid ${emptyColor}`\n}\n","// Types\nimport { styled, type StyleMap } from '@hooks/useThemedStyles/types'\nimport type { LoaderProps } from './types'\nimport { getBorder } from './utils'\nimport { DEFAULT_COLOR, DEFAULT_SIZE } from './constants'\n\nexport function createButtonLoaderStyles(props: LoaderProps): StyleMap {\n return styled({\n container: {\n display: ' inline-block',\n\n width: props.size || DEFAULT_SIZE,\n height: props.size || DEFAULT_SIZE,\n\n borderRadius: '50%',\n border: getBorder(props),\n borderLeftColor: props.color || DEFAULT_COLOR\n }\n })\n}\n","// External Libraries\nimport type React from 'react'\nimport { motion } from 'framer-motion'\n\n// Hooks\nimport { useThemedStyles } from '@hooks/useThemedStyles'\n\n// Utils\nimport { SPINNER_ANIMATION } from '@utils/animations'\n\n// Types\nimport type { LoaderProps } from './types'\n\n// Styles\nimport { createButtonLoaderStyles } from './styles'\n\nexport const Loader: React.FC<LoaderProps> = props => {\n // Hooks\n const { styles } = useThemedStyles(props, createButtonLoaderStyles, {})\n\n return (\n <motion.div\n role=\"status\"\n aria-label=\"Loading\"\n style={styles.container}\n {...SPINNER_ANIMATION}\n />\n )\n}\n","// Types\nimport { styled, type StyleMap } from '@hooks/useThemedStyles/types'\n\nexport function createButtonLoaderStyles(): StyleMap {\n return styled({\n container: {\n position: 'absolute',\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n\n borderRadius: 'var(--px-border-radius-button)'\n }\n })\n}\n","// External Libraries\nimport type React from 'react'\nimport { motion } from 'framer-motion'\n\n// Components\nimport { Loader } from '@components/toolkit/Loader'\n\n// Hooks\nimport { useThemedStyles } from '@hooks/useThemedStyles'\n\n// Styles\nimport { createButtonLoaderStyles } from './styles'\n\ntype Props = {\n color: string\n}\n\nexport const ButtonLoader: React.FC<Props> = ({ color }) => {\n // Hooks\n const { styles } = useThemedStyles({}, createButtonLoaderStyles, {})\n\n return (\n <motion.div\n style={styles.container}\n initial={{ opacity: 0 }}\n animate={{ opacity: 1 }}\n exit={{ opacity: 0 }}\n >\n <Loader color={color} />\n </motion.div>\n )\n}\n","// Types\nimport type { ButtonProps, ButtonVariant } from './types'\nimport { styled } from '@hooks/useThemedStyles/types'\n\nexport function createButtonStyles({\n color,\n variant,\n disabled,\n fullWidth,\n textAlign,\n outlineColor\n}: ButtonProps) {\n const finalVariant = variant ?? 'filled'\n\n return styled({\n container: {\n minHeight: '2rem',\n height: 'fit-content',\n width: fullWidth ? '100%' : 'fit-content',\n\n position: 'relative',\n display: 'flex',\n justifyContent: textAlign || 'center',\n\n padding: '10px var(--px-space-xl)',\n gap: 'var(--px-space-sm)',\n\n borderRadius: 'var(--px-radius-md)',\n\n cursor: disabled ? 'not-allowed' : 'pointer',\n opacity: disabled ? 0.5 : 1,\n transition: 'background-color 0.5s',\n\n border: getBorder(finalVariant, outlineColor || color),\n backgroundColor: getBackgroundColor(finalVariant, color),\n\n __rules: {\n '&:hover': {\n opacity: '0.85 !important'\n }\n }\n },\n\n content: {\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n\n padding: '0',\n borderRadius: 'inherit',\n\n whiteSpace: 'nowrap',\n columnGap: 'var(--px-space-sm)'\n }\n })\n}\n\nfunction getBackgroundColor(variant: ButtonVariant, color?: string): string {\n if (color) return color\n\n if (variant === 'filled') return 'var(--px-btn-filled-bg)'\n\n if (variant === 'outlined') return 'transparent'\n\n if (variant === 'ghost') return 'transparent'\n\n return 'var(--px-btn-filled-bg)'\n}\n\nfunction getBorder(variant: ButtonVariant, color?: string): string {\n if (color) return `1px solid ${color}`\n\n if (variant === 'filled') return '1px solid var(--px-btn-filled-bg)'\n\n if (variant === 'outlined') return '1px solid var(--px-btn-outlined-border)'\n\n if (variant === 'ghost') return 'none'\n\n return '1px solid var(--px-color-primary)'\n}\n\nexport function getTextColor({ variant, labelColor }: ButtonProps) {\n if (labelColor) return labelColor\n\n if (variant === 'filled') return 'var(--px-btn-filled-label)'\n\n if (variant === 'outlined') return 'var(--px-btn-outlined-label)'\n\n if (variant === 'ghost') return '--px-btn-ghost-label'\n\n return 'var(--px-btn-filled-label)'\n}\n","// External Libraries\nimport type React from 'react'\nimport { AnimatePresence } from 'framer-motion'\n\n// Components\nimport { Typography } from '@components/toolkit/Typography'\nimport { ButtonLoader } from './components/ButtonLoader'\n\n// Hooks\nimport { useThemedStyles } from '@hooks/useThemedStyles'\n\n// Types\nimport type { ButtonProps } from './types'\n\n// Styles\nimport { createButtonStyles, getTextColor } from './styles'\n\nexport const Button: React.FC<ButtonProps> = ({\n type = 'button',\n variant = 'filled',\n ...rest\n}) => {\n // Constants\n const disabled = rest.disabled || rest.loading\n const resolvedProps = { type, variant, disabled, ...rest }\n const textColor = getTextColor(resolvedProps)\n const { label, endIcon, startIcon, loading } = resolvedProps\n\n // Hooks\n const { styles, classes } = useThemedStyles(\n resolvedProps,\n createButtonStyles,\n {\n override: rest.styles,\n applyCommonProps: true,\n commonSlot: 'container',\n pick: p => [p.disabled, p.loading, p.label, p.color]\n }\n )\n\n // Functions\n function handleButtonClick() {\n if (disabled) return\n\n if (rest.onClick) rest.onClick()\n }\n\n return (\n <button\n type={type}\n disabled={disabled}\n aria-busy={rest.loading}\n style={styles.container}\n className={classes.container}\n onClick={handleButtonClick}\n >\n <div style={styles.content}>\n {startIcon ?? null}\n\n <Typography variant=\"b1\" color={textColor}>\n {label}\n </Typography>\n\n {endIcon ?? null}\n\n {loading ? (\n <AnimatePresence>\n <ButtonLoader color={textColor} />\n </AnimatePresence>\n ) : null}\n </div>\n </button>\n )\n}\n"],"mappings":";;;;;AAAA,MAAa,oBAAoB;CAC/B,SAAS,EAAE,QAAQ,KAAK;CACxB,YAAY;EACV,QAAQ;EACR,UAAU;EACV,MAAM;EACP;CACF;;;;ACPD,MAAM,eAAe;AACrB,MAAM,oBAAoB;AAE1B,MAAM,gBAAgB;AACtB,MAAM,sBAAsB;;;;ACE5B,SAAgBA,YAAU,OAAoB;AAI5C,QAAO,GAHW,MAAM,aAAa,kBAGjB,SAFD,MAAM,cAAc;;;;;ACFzC,SAAgBC,2BAAyB,OAA8B;AACrE,QAAO,OAAO,EACZ,WAAW;EACT,SAAS;EAET,OAAO,MAAM,QAAQ;EACrB,QAAQ,MAAM,QAAQ;EAEtB,cAAc;EACd,QAAQC,YAAU,MAAM;EACxB,iBAAiB,MAAM,SAAS;EACjC,EACF,CAAC;;;;;ACFJ,MAAaC,UAAgC,UAAS;CAEpD,MAAM,EAAE,WAAW,gBAAgB,OAAOC,4BAA0B,EAAE,CAAC;AAEvE,QACE,oBAAC,OAAO;EACN,MAAK;EACL,cAAW;EACX,OAAO,OAAO;EACd,GAAI;GACJ;;;;;ACvBN,SAAgB,2BAAqC;AACnD,QAAO,OAAO,EACZ,WAAW;EACT,UAAU;EACV,KAAK;EACL,MAAM;EACN,OAAO;EACP,QAAQ;EAER,SAAS;EACT,YAAY;EACZ,gBAAgB;EAEhB,cAAc;EACf,EACF,CAAC;;;;;ACDJ,MAAaC,gBAAiC,EAAE,YAAY;CAE1D,MAAM,EAAE,WAAW,gB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S,QAAO;AAEhC,QAAO;;;;;ACzET,MAAaC,UAAiC,EAC5C,OAAO,UACP,UAAU,UACV,GAAG,WACC;CAEJ,MAAM,WAAW,KAAK,YAAY,KAAK;CACvC,MAAM,gBAAgB;EAAE;EAAM;EAAS;EAAU,GAAG;EAAM;CAC1D,MAAM,YAAY,aAAa,cAAc;CAC7C,MAAM,EAAE,OAAO,SAAS,WAAW,YAAY;CAG/C,MAAM,EAAE,QAAQ,YAAY,gBAC1B,eACA,oBACA;EACE,UAAU,KAAK;EACf,kBAAkB;EAClB,YAAY;EACZ,OAAM,MAAK;GAAC,EAAE;GAAU,EAAE;GAAS,EAAE;GAAO,EAAE;GAAM;EACrD,CACF;CAGD,SAAS,oBAAoB;AAC3B,MAAI,SAAU;AAEd,MAAI,KAAK,QAAS,MAAK,SAAS;;AAGlC,QACE,oBAAC;EACO;EACI;EACV,aAAW,KAAK;EAChB,OAAO,OAAO;EACd,WAAW,QAAQ;EACnB,SAAS;YAET,qBAAC;GAAI,OAAO,OAAO;;IAChB,aAAa;IAEd,oBAAC;KAAW,SAAQ;KAAK,OAAO;eAC7B;MACU;IAEZ,WAAW;IAEX,UACC,oBAAC,6BACC,oBAAC,gBAAa,OAAO,YAAa,GAClB,GAChB;;IACA;GACC"}
@@ -1,10 +1,10 @@
1
- import { t as Icon } from "./Icon-BrLGgg0w.js";
2
- import { n as useThemedStyles, t as Typography } from "./Typography-BaE9Y1O8.js";
1
+ import { t as Icon } from "./Icon-T_2VPPNe.js";
2
+ import { n as styled, r as useThemedStyles, t as Typography } from "./Typography-ZFnL1M33.js";
3
3
  import { jsx, jsxs } from "react/jsx-runtime";
4
4
 
5
5
  //#region src/components/toolkit/CheckItem/styles.ts
6
6
  function createCheckItemStyles({ checked }) {
7
- return {
7
+ return styled({
8
8
  container: {
9
9
  display: "flex",
10
10
  flexDirection: "row",
@@ -19,7 +19,7 @@ function createCheckItemStyles({ checked }) {
19
19
  backgroundColor: checked ? "var(--px-color-success)" : "var(--px-color-disabled)",
20
20
  borderRadius: "50%"
21
21
  }
22
- };
22
+ });
23
23
  }
24
24
 
25
25
  //#endregion
@@ -44,4 +44,4 @@ const CheckItem = (props) => {
44
44
 
45
45
  //#endregion
46
46
  export { CheckItem as t };
47
- //# sourceMappingURL=CheckItem-CBzbinCc.js.map
47
+ //# sourceMappingURL=CheckItem-OVa0nZlJ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CheckItem-OVa0nZlJ.js","names":["CheckItem: React.FC<CheckItemProps>"],"sources":["../src/components/toolkit/CheckItem/styles.ts","../src/components/toolkit/CheckItem/index.tsx"],"sourcesContent":["// Types\nimport type { CheckItemProps } from './types'\nimport { styled, type StyleMap } from '@hooks/useThemedStyles/types'\n\nexport function createCheckItemStyles({ checked }: CheckItemProps): StyleMap {\n return styled({\n container: {\n display: 'flex',\n flexDirection: 'row',\n columnGap: 'var(--px-space-sm)'\n },\n\n iconContainer: {\n width: '20px',\n height: '20px',\n\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n\n backgroundColor: checked\n ? 'var(--px-color-success)'\n : 'var(--px-color-disabled)',\n\n borderRadius: '50%'\n }\n })\n}\n","// External Libraries\nimport type React from 'react'\n\n// Components\nimport { Icon } from '../Icon'\nimport { Typography } from '../Typography'\n\n// Hooks\nimport { useThemedStyles } from '@hooks/useThemedStyles'\n\n// Types\nimport type { CheckItemProps } from './types'\n\n// Styles\nimport { createCheckItemStyles } from './styles'\n\nexport const CheckItem: React.FC<CheckItemProps> = props => {\n // Hooks\n const { styles } = useThemedStyles(props, createCheckItemStyles)\n\n return (\n <div style={styles.container}>\n <div style={styles.iconContainer}>\n <Icon name=\"general-check\" color=\"white\" size=\"sm\" />\n </div>\n\n <Typography variant=\"b2\">{props.label}</Typography>\n </div>\n )\n}\n"],"mappings":";;;;;AAIA,SAAgB,sBAAsB,EAAE,WAAqC;AAC3E,QAAO,OAAO;EACZ,WAAW;GACT,SAAS;GACT,eAAe;GACf,WAAW;GACZ;EAED,eAAe;GACb,OAAO;GACP,QAAQ;GAER,SAAS;GACT,YAAY;GACZ,gBAAgB;GAEhB,iBAAiB,UACb,4BACA;GAEJ,cAAc;GACf;EACF,CAAC;;;;;ACVJ,MAAaA,aAAsC,UAAS;CAE1D,MAAM,EAAE,WAAW,gBAAgB,OAAO,sBAAsB;AAEhE,QACE,qBAAC;EAAI,OAAO,OAAO;aACjB,oBAAC;GAAI,OAAO,OAAO;aACjB,oBAAC;IAAK,MAAK;IAAgB,OAAM;IAAQ,MAAK;KAAO;IACjD,EAEN,oBAAC;GAAW,SAAQ;aAAM,MAAM;IAAmB;GAC/C"}
@@ -1,5 +1,5 @@
1
- import { t as Icon } from "./Icon-BrLGgg0w.js";
2
- import { n as useThemedStyles, t as Typography } from "./Typography-BaE9Y1O8.js";
1
+ import { t as Icon } from "./Icon-T_2VPPNe.js";
2
+ import { n as styled, r as useThemedStyles, t as Typography } from "./Typography-ZFnL1M33.js";
3
3
  import { Checkbox, Label } from "radix-ui";
4
4
  import { useId } from "react";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -7,13 +7,13 @@ import { jsx, jsxs } from "react/jsx-runtime";
7
7
  //#region src/components/toolkit/Checkbox/components/Label/styles.ts
8
8
  function createLabelStyles(props) {
9
9
  const { disabled } = props;
10
- return { container: {
10
+ return styled({ container: {
11
11
  userSelect: "none",
12
12
  opacity: disabled ? .6 : 1,
13
13
  cursor: disabled ? "not-allowed" : "pointer",
14
14
  transition: "all 200ms",
15
15
  __rules: { ":hover": { color: "var(--px-color-secondary)" } }
16
- } };
16
+ } });
17
17
  }
18
18
 
19
19
  //#endregion
@@ -73,7 +73,7 @@ const CHECKBOX_STYLES = {
73
73
  function createCheckBoxStyles(props) {
74
74
  const { color, checked, size = "md", radius = "md", disabled = false, labelPlacement = "right" } = props;
75
75
  const focusIndicatorOffsetColor = "#fff";
76
- return {
76
+ return styled({
77
77
  container: {
78
78
  display: "flex",
79
79
  columnGap: "0.5rem",
@@ -108,7 +108,7 @@ function createCheckBoxStyles(props) {
108
108
  justifyContent: "center",
109
109
  color: "var(--px-text-primary, #4b5563)"
110
110
  }
111
- };
111
+ });
112
112
  }
113
113
 
114
114
  //#endregion
@@ -164,4 +164,4 @@ const Checkbox$1 = (props) => {
164
164
 
165
165
  //#endregion
166
166
  export { Checkbox$1 as t };
167
- //# sourceMappingURL=Checkbox-l_SA4qUE.js.map
167
+ //# sourceMappingURL=Checkbox-DdPF40bm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Checkbox-DdPF40bm.js","names":["Label: React.FC<LabelProps>","LabelRadix","CHECKBOX_STYLES: Record<string, StyleMap>","Checkbox: React.FC<CheckboxProps>","CheckboxRadix","checked","Label"],"sources":["../src/components/toolkit/Checkbox/components/Label/styles.ts","../src/components/toolkit/Checkbox/components/Label/index.tsx","../src/components/toolkit/Checkbox/hooks/useCheckbox.ts","../src/components/toolkit/Checkbox/styles.ts","../src/utils/functions/getContrastingTextColor.ts","../src/components/toolkit/Checkbox/index.tsx"],"sourcesContent":["// Types\nimport type { LabelProps } from './types'\nimport { styled, type StyleMap } from '@hooks/useThemedStyles/types'\n\nexport function createLabelStyles(props: LabelProps): StyleMap {\n const { disabled } = props\n\n return styled({\n container: {\n userSelect: 'none',\n opacity: disabled ? 0.6 : 1,\n cursor: disabled ? 'not-allowed' : 'pointer',\n\n transition: 'all 200ms',\n\n __rules: {\n ':hover': { color: 'var(--px-color-secondary)' }\n }\n }\n })\n}\n","// External libraries\nimport { Label as LabelRadix } from 'radix-ui'\n\n// Components\nimport { Typography } from '@components/toolkit/Typography'\n\n// Hooks\nimport { useThemedStyles } from '@hooks/useThemedStyles'\n\n// Types\nimport type { LabelProps } from './types'\n\n// Styles\nimport { createLabelStyles } from './styles'\n\nexport const Label: React.FC<LabelProps> = props => {\n const { idFor, label, labelVariant } = props\n\n // Hooks\n const { styles } = useThemedStyles(props, createLabelStyles, {\n pick: p => [p.disabled, p.labelVariant, p.label],\n applyCommonProps: true\n })\n\n return (\n <LabelRadix.Root htmlFor={idFor} style={styles.container}>\n <Typography variant={labelVariant ?? 'b1'} fontWeight=\"normal\">\n {label}\n </Typography>\n </LabelRadix.Root>\n )\n}\n","// External libraries\nimport { useId } from 'react'\n\nexport function useCheckbox() {\n return {\n id: useId()\n }\n}\n","// Types\nimport type { CheckboxProps } from './types'\nimport { styled, type StyleMap } from '@hooks/useThemedStyles/types'\n\nexport const CHECKBOX_STYLES: Record<string, StyleMap> = {\n size: {\n sm: { width: '1rem', height: '1rem' },\n md: { width: '1.25rem', height: '1.25rem' },\n lg: { width: '1.5rem', height: '1.5rem' }\n },\n radius: {\n none: { borderRadius: 0 },\n sm: { borderRadius: '0.25rem' },\n md: { borderRadius: '0.375rem' },\n lg: { borderRadius: '0.5rem' },\n full: { borderRadius: '100%' }\n }\n}\n\nexport function createCheckBoxStyles(props: CheckboxProps): StyleMap {\n const {\n color,\n checked,\n size = 'md',\n radius = 'md',\n disabled = false,\n labelPlacement = 'right'\n } = props\n\n const focusIndicatorOffsetColor = '#fff'\n\n return styled({\n container: {\n display: 'flex',\n columnGap: '0.5rem',\n alignItems: 'center',\n '--px-ring-color': color ?? undefined,\n flexDirection: labelPlacement === 'right' ? 'row' : 'row-reverse'\n },\n\n root: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n\n backgroundColor: checked ? color : 'white',\n borderWidth: '1px',\n borderStyle: 'solid',\n borderColor: checked ? color : 'var(--px-border-primary, #e5e7eb)',\n\n transition: 'color 200ms',\n opacity: disabled ? 0.5 : 1,\n cursor: disabled ? 'not-allowed' : 'pointer',\n\n ...CHECKBOX_STYLES.size[size],\n ...CHECKBOX_STYLES.radius[radius],\n\n __rules: {\n '&:hover': { borderColor: 'var(--px-border-secondary, #e5e7eb)' },\n '&:focus-visible': {\n outline: 'none',\n boxShadow: `0 0 0 2px ${focusIndicatorOffsetColor}, 0 0 0 4px var(--px-ring-color, #2b2b2bff)`\n }\n }\n },\n\n indicator: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n color: 'var(--px-text-primary, #4b5563)'\n }\n })\n}\n","/**\n * Returns the contrasting text color for a given background color.\n * @param backgroundColor hexadecimal color (i.e.: \"#ffffff\", \"#000\", \"#ffcc00\")\n */\nexport function getContrastingTextColor(\n backgroundColor: string\n): 'black' | 'white' {\n let hex = backgroundColor.replace('#', '')\n\n if (hex.length === 3) {\n hex = hex\n .split('')\n .map(c => c + c)\n .join('')\n }\n\n if (hex.length === 8) {\n hex = hex.substring(0, 6)\n }\n\n if (hex.length !== 6) return 'black'\n\n const r = parseInt(hex.substring(0, 2), 16)\n const g = parseInt(hex.substring(2, 4), 16)\n const b = parseInt(hex.substring(4, 6), 16)\n\n const luminance = (0.299 * r + 0.587 * g + 0.114 * b) / 255\n\n return luminance > 0.6 ? 'black' : 'white'\n}\n","// External Libraries\nimport type React from 'react'\nimport { Checkbox as CheckboxRadix } from 'radix-ui'\n\n// Components\nimport { Icon } from '../Icon'\nimport { Label } from './components/Label'\n\n// Hooks\nimport { useCheckbox } from './hooks/useCheckbox'\nimport { useThemedStyles } from '@hooks/useThemedStyles'\n\n// Types\nimport type { CheckboxProps } from './types'\n\n// Styles\nimport { createCheckBoxStyles } from './styles'\nimport { getContrastingTextColor } from '@utils/functions'\n\nexport const Checkbox: React.FC<CheckboxProps> = props => {\n const {\n icon,\n label,\n color,\n labelVariant,\n checked = false,\n disabled = false,\n onChange\n } = props\n\n const iconColor = color ? getContrastingTextColor(color) : undefined\n\n // Hooks\n const { id } = useCheckbox()\n\n const { styles, classes } = useThemedStyles(props, createCheckBoxStyles)\n\n return (\n <div style={styles.container}>\n <CheckboxRadix.Root\n style={styles.root}\n className={classes.root}\n id={id}\n tabIndex={0}\n checked={checked}\n disabled={disabled}\n onCheckedChange={checked => onChange(checked === true)}\n >\n <CheckboxRadix.Indicator style={styles.indicator}>\n {icon ?? <Icon name=\"general-check\" size=\"sm\" color={iconColor} />}\n </CheckboxRadix.Indicator>\n </CheckboxRadix.Root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Aa;CAE5B,MAAM,EAAE,QAAQ,YAAY,gBAAgB,OAAO,qBAAqB;AAExE,QACE,qBAAC;EAAI,OAAO,OAAO;aACjB,oBAACC,SAAc;GACb,OAAO,OAAO;GACd,WAAW,QAAQ;GACf;GACJ,UAAU;GACD;GACC;GACV,kBAAiB,cAAW,SAASC,cAAY,KAAK;aAEtD,oBAACD,SAAc;IAAU,OAAO,OAAO;cACpC,QAAQ,oBAAC;KAAK,MAAK;KAAgB,MAAK;KAAK,OAAO;MAAa;KAC1C;IACP,EAEpB,QACC,oBAACE;GACC,OAAO;GACA;GACG;GACI;IACd,GACA;GACA"}
@@ -1,4 +1,4 @@
1
- import { n as useThemedStyles } from "./Typography-BaE9Y1O8.js";
1
+ import { n as styled, r as useThemedStyles } from "./Typography-ZFnL1M33.js";
2
2
  import { Suspense, useMemo } from "react";
3
3
  import { jsx, jsxs } from "react/jsx-runtime";
4
4
 
@@ -169,13 +169,13 @@ const ICON_SIZE_MAP = {
169
169
  //#region src/components/toolkit/Icon/style.ts
170
170
  function createIconStyles(props) {
171
171
  const { color, size = "md" } = props;
172
- return { container: {
172
+ return styled({ container: {
173
173
  display: "inline-flex",
174
174
  alignItems: "center",
175
175
  justifyContent: "center",
176
176
  color: color === "primary" ? "var(--px-text-primary)" : color === "secondary" ? "var(--px-text-secondary)" : color,
177
177
  ...ICON_SIZE_MAP[size]
178
- } };
178
+ } });
179
179
  }
180
180
 
181
181
  //#endregion
@@ -206,4 +206,4 @@ const Icon = (props) => {
206
206
 
207
207
  //#endregion
208
208
  export { Icon as t };
209
- //# sourceMappingURL=Icon-BrLGgg0w.js.map
209
+ //# sourceMappingURL=Icon-T_2VPPNe.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Icon-BrLGgg0w.js","names":["ICON_SIZE_MAP: Record<string, CSSProperties>","IconLoaders"],"sources":["../src/assets/icons/__generated__/general/check.tsx","../src/assets/icons/__generated__/general/eye.tsx","../src/assets/icons/__generated__/general/eye-off.tsx","../src/assets/icons/__generated__/brands/facebook.tsx","../src/assets/icons/__generated__/brands/facebook-fit.tsx","../src/assets/icons/__generated__/brands/google.tsx","../src/assets/icons/index.tsx","../src/components/toolkit/Icon/constants.ts","../src/components/toolkit/Icon/style.ts","../src/components/toolkit/Icon/index.tsx"],"sourcesContent":["// Auto-generated from general/check.svg. Do not edit manually.\n\n// External Libraries\nimport type { SVGProps } from 'react'\n\nexport type CheckProps = SVGProps<SVGSVGElement> & { title?: string }\n\nexport const Check = ({ title, ...props }: CheckProps) => (\n<svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth={2} strokeLinecap=\"round\" strokeLinejoin=\"round\" {...props}>\n <title>{title ?? 'check'}</title><polyline points=\"20 6 9 17 4 12\"></polyline></svg>\n)\n","// Auto-generated from general/eye.svg. Do not edit manually.\n\n// External Libraries\nimport type { SVGProps } from 'react'\n\nexport type EyeProps = SVGProps<SVGSVGElement> & { title?: string }\n\nexport const Eye = ({ title, ...props }: EyeProps) => (\n<svg viewBox=\"0 0 24 24\" fill=\"none\" {...props}>\n<path d=\"M2.42012 12.7132C2.28394 12.4975 2.21584 12.3897 2.17772 12.2234C2.14909 12.0985 2.14909 11.9015 2.17772 11.7766C2.21584 11.6103 2.28394 11.5025 2.42012 11.2868C3.54553 9.50484 6.8954 5 12.0004 5C17.1054 5 20.4553 9.50484 21.5807 11.2868C21.7169 11.5025 21.785 11.6103 21.8231 11.7766C21.8517 11.9015 21.8517 12.0985 21.8231 12.2234C21.785 12.3897 21.7169 12.4975 21.5807 12.7132C20.4553 14.4952 17.1054 19 12.0004 19C6.8954 19 3.54553 14.4952 2.42012 12.7132Z\" stroke=\"currentColor\" strokeWidth={2} strokeLinecap=\"round\" strokeLinejoin=\"round\"/>\n <title>{title ?? 'eye'}</title>\n<path d=\"M12.0004 15C13.6573 15 15.0004 13.6569 15.0004 12C15.0004 10.3431 13.6573 9 12.0004 9C10.3435 9 9.0004 10.3431 9.0004 12C9.0004 13.6569 10.3435 15 12.0004 15Z\" stroke=\"currentColor\" strokeWidth={2} strokeLinecap=\"round\" strokeLinejoin=\"round\"/>\n</svg>\n)\n","// Auto-generated from general/eye-off.svg. Do not edit manually.\n\n// External Libraries\nimport type { SVGProps } from 'react'\n\nexport type EyeOffProps = SVGProps<SVGSVGElement> & { title?: string }\n\nexport const EyeOff = ({ title, ...props }: EyeOffProps) => (\n<svg viewBox=\"0 0 24 24\" fill=\"none\" {...props}>\n<path d=\"M10.7429 5.09232C11.1494 5.03223 11.5686 5 12.0004 5C17.1054 5 20.4553 9.50484 21.5807 11.2868C21.7169 11.5025 21.785 11.6103 21.8231 11.7767C21.8518 11.9016 21.8517 12.0987 21.8231 12.2236C21.7849 12.3899 21.7164 12.4985 21.5792 12.7156C21.2793 13.1901 20.8222 13.8571 20.2165 14.5805M6.72432 6.71504C4.56225 8.1817 3.09445 10.2194 2.42111 11.2853C2.28428 11.5019 2.21587 11.6102 2.17774 11.7765C2.1491 11.9014 2.14909 12.0984 2.17771 12.2234C2.21583 12.3897 2.28393 12.4975 2.42013 12.7132C3.54554 14.4952 6.89541 19 12.0004 19C14.0588 19 15.8319 18.2676 17.2888 17.2766M3.00042 3L21.0004 21M9.8791 9.87868C9.3362 10.4216 9.00042 11.1716 9.00042 12C9.00042 13.6569 10.3436 15 12.0004 15C12.8288 15 13.5788 14.6642 14.1217 14.1213\" stroke=\"currentColor\" strokeWidth={2} strokeLinecap=\"round\" strokeLinejoin=\"round\"/>\n <title>{title ?? 'eye-off'}</title>\n</svg>\n)\n","// Auto-generated from brands/facebook.svg. Do not edit manually.\n\n// External Libraries\nimport type { SVGProps } from 'react'\n\nexport type FacebookProps = SVGProps<SVGSVGElement> & { title?: string }\n\nexport const Facebook = ({ title, ...props }: FacebookProps) => (\n<svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" {...props}>\n<path d=\"M16 8C16 11.9927 13.0707 15.3027 9.24667 15.9033V10.328H11.106L11.46 8.02133H9.24667V6.52467C9.24667 5.89333 9.556 5.27867 10.5467 5.27867H11.5527V3.31467C11.5527 3.31467 10.6393 3.15867 9.76667 3.15867C7.944 3.15867 6.75333 4.26333 6.75333 6.26267V8.02067H4.72733V10.3273H6.75333V15.9027C2.93 15.3013 0 11.992 0 8C0 3.582 3.582 0 8 0C12.418 0 16 3.58133 16 8Z\" fill=\"currentColor\"/>\n <title>{title ?? 'facebook'}</title>\n</svg>\n)\n","// Auto-generated from brands/facebook-fit.svg. Do not edit manually.\n\n// External Libraries\nimport type { SVGProps } from 'react'\n\nexport type FacebookFitProps = SVGProps<SVGSVGElement> & { title?: string }\n\nexport const FacebookFit = ({ title, ...props }: FacebookFitProps) => (\n<svg viewBox=\"0 0 1024 1024\" id=\"facebook\" {...props}>\n <path fill=\"#1877f2\" d=\"M1024,512C1024,229.23016,794.76978,0,512,0S0,229.23016,0,512c0,255.554,187.231,467.37012,432,505.77777V660H302V512H432V399.2C432,270.87982,508.43854,200,625.38922,200,681.40765,200,740,210,740,210V336H675.43713C611.83508,336,592,375.46667,592,415.95728V512H734L711.3,660H592v357.77777C836.769,979.37012,1024,767.554,1024,512Z\"></path>\n <title>{title ?? 'facebook-fit'}</title>\n <path fill=\"#fff\" d=\"M711.3,660,734,512H592V415.95728C592,375.46667,611.83508,336,675.43713,336H740V210s-58.59235-10-114.61078-10C508.43854,200,432,270.87982,432,399.2V512H302V660H432v357.77777a517.39619,517.39619,0,0,0,160,0V660Z\"></path>\n</svg>\n)\n","// Auto-generated from brands/google.svg. Do not edit manually.\n\n// External Libraries\nimport type { SVGProps } from 'react'\n\nexport type GoogleProps = SVGProps<SVGSVGElement> & { title?: string }\n\nexport const Google = ({ title, ...props }: GoogleProps) => (\n<svg width=\"800px\" height=\"800px\" viewBox=\"-3 0 262 262\" version=\"1.1\" preserveAspectRatio=\"xMidYMid\" {...props}>\n\t<g>\n\t\t<path d=\"M255.878,133.451 C255.878,122.717 255.007,114.884 253.122,106.761 L130.55,106.761 L130.55,155.209 L202.497,155.209 C201.047,167.249 193.214,185.381 175.807,197.565 L175.563,199.187 L214.318,229.21 L217.003,229.478 C241.662,206.704 255.878,173.196 255.878,133.451\" fill=\"#4285F4\"></path>\n <title>{title ?? 'google'}</title>\n\t\t<path d=\"M130.55,261.1 C165.798,261.1 195.389,249.495 217.003,229.478 L175.807,197.565 C164.783,205.253 149.987,210.62 130.55,210.62 C96.027,210.62 66.726,187.847 56.281,156.37 L54.75,156.5 L14.452,187.687 L13.925,189.152 C35.393,231.798 79.49,261.1 130.55,261.1\" fill=\"#34A853\"></path>\n\t\t<path d=\"M56.281,156.37 C53.525,148.247 51.93,139.543 51.93,130.55 C51.93,121.556 53.525,112.853 56.136,104.73 L56.063,103 L15.26,71.312 L13.925,71.947 C5.077,89.644 0,109.517 0,130.55 C0,151.583 5.077,171.455 13.925,189.152 L56.281,156.37\" fill=\"#FBBC05\"></path>\n\t\t<path d=\"M130.55,50.479 C155.064,50.479 171.6,61.068 181.029,69.917 L217.873,33.943 C195.245,12.91 165.798,0 130.55,0 C79.49,0 35.393,29.301 13.925,71.947 L56.136,104.73 C66.726,73.253 96.027,50.479 130.55,50.479\" fill=\"#EB4335\"></path>\n\t</g>\n</svg>\n)\n","// Auto-generated by generate-icon-components.sh. Do not edit manually.\n/** biome-ignore-all lint/suspicious/noShadowRestrictedNames: generated */\n\nimport { Check } from './__generated__/general/check'\nimport { Eye } from './__generated__/general/eye'\nimport { EyeOff } from './__generated__/general/eye-off'\nimport { Facebook } from './__generated__/brands/facebook'\nimport { FacebookFit } from './__generated__/brands/facebook-fit'\nimport { Google } from './__generated__/brands/google'\n\nconst icons = {\n 'brands-facebook': <Facebook />,\n 'brands-facebook-fit': <FacebookFit />,\n 'brands-google': <Google />,\n 'general-check': <Check />,\n 'general-eye': <Eye />,\n 'general-eye-off': <EyeOff />,\n}\n\nexport type IconName = keyof typeof icons\nexport default icons\n","// External Libraries\nimport type { CSSProperties } from \"react\";\n\nexport const ICON_SIZE_MAP: Record<string, CSSProperties> = {\n xs: {\n width: '0.75rem',\n height: '0.75rem'\n },\n sm: {\n width: '1rem',\n height: '1rem'\n },\n md: {\n width: '1.25rem',\n height: '1.25rem'\n },\n lg: {\n width: '1.5rem',\n height: '1.5rem'\n },\n xl: {\n width: '1.75rem',\n height: '1.75rem'\n },\n '2xl': {\n width: '2rem',\n height: '2rem'\n },\n '3xl': {\n width: '2.5rem',\n height: '2.5rem'\n }\n} as const","// External Libraries\nimport type { CSSProperties } from 'react'\n\n// Types\nimport type { IconProps } from './types'\n\n// Utils\nimport { ICON_SIZE_MAP } from './constants'\n\nexport function createIconStyles(props: IconProps) {\n const { color, size = 'md' } = props\n\n return {\n container: {\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n color:\n color === 'primary'\n ? 'var(--px-text-primary)'\n : color === 'secondary'\n ? 'var(--px-text-secondary)'\n : color,\n ...ICON_SIZE_MAP[size]\n } as CSSProperties\n }\n}\n","// External Libraries\nimport { Suspense, useMemo } from 'react'\n\n// Components\nimport IconLoaders from '@assets/icons'\n\n// Types\nimport type { IconProps } from './types'\n\n// Hooks\nimport { useThemedStyles } from '@hooks/useThemedStyles'\n\n// Styles\nimport { createIconStyles } from './style'\n\nexport const Icon = (props: IconProps) => {\n const { name } = props\n\n // Hooks\n const { styles, classes } = useThemedStyles(props, createIconStyles, {\n pick: p => [p.color, p.size],\n override: props.styles,\n applyCommonProps: true\n })\n\n // Constants\n const IconComponent = useMemo(() => {\n const loader = IconLoaders[name]\n return loader\n }, [name])\n\n if (!IconComponent) {\n console.warn(`Icon \"${name}\" not found.`)\n return null\n }\n\n return (\n <Suspense fallback={null}>\n <span className={classes.container} style={styles.container}>\n {IconComponent}\n </span>\n </Suspense>\n )\n}\n"],"mappings":";;;;;AAOA,MAAa,SAAS,EAAE,OAAO,GAAG,YAClC,qBAAC;CAAI,OAAM;CAAK,QAAO;CAAK,SAAQ;CAAY,MAAK;CAAO,QAAO;CAAe,aAAa;CAAG,eAAc;C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Ac;AACzC,SAAO;;AAGT,QACE,oBAAC;EAAS,UAAU;YAClB,oBAAC;GAAK,WAAW,QAAQ;GAAW,OAAO,OAAO;aAC/C;IACI;GACE"}
1
+ {"version":3,"file":"Icon-T_2VPPNe.js","names":["ICON_SIZE_MAP: Record<string, CSSProperties>","IconLoaders"],"sources":["../src/assets/icons/__generated__/general/check.tsx","../src/assets/icons/__generated__/general/eye.tsx","../src/assets/icons/__generated__/general/eye-off.tsx","../src/assets/icons/__generated__/brands/facebook.tsx","../src/assets/icons/__generated__/brands/facebook-fit.tsx","../src/assets/icons/__generated__/brands/google.tsx","../src/assets/icons/index.tsx","../src/components/toolkit/Icon/constants.ts","../src/components/toolkit/Icon/style.ts","../src/components/toolkit/Icon/index.tsx"],"sourcesContent":["// Auto-generated from general/check.svg. Do not edit manually.\n\n// External Libraries\nimport type { SVGProps } from 'react'\n\nexport type CheckProps = SVGProps<SVGSVGElement> & { title?: string }\n\nexport const Check = ({ title, ...props }: CheckProps) => (\n<svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth={2} strokeLinecap=\"round\" strokeLinejoin=\"round\" {...props}>\n <title>{title ?? 'check'}</title><polyline points=\"20 6 9 17 4 12\"></polyline></svg>\n)\n","// Auto-generated from general/eye.svg. Do not edit manually.\n\n// External Libraries\nimport type { SVGProps } from 'react'\n\nexport type EyeProps = SVGProps<SVGSVGElement> & { title?: string }\n\nexport const Eye = ({ title, ...props }: EyeProps) => (\n<svg viewBox=\"0 0 24 24\" fill=\"none\" {...props}>\n<path d=\"M2.42012 12.7132C2.28394 12.4975 2.21584 12.3897 2.17772 12.2234C2.14909 12.0985 2.14909 11.9015 2.17772 11.7766C2.21584 11.6103 2.28394 11.5025 2.42012 11.2868C3.54553 9.50484 6.8954 5 12.0004 5C17.1054 5 20.4553 9.50484 21.5807 11.2868C21.7169 11.5025 21.785 11.6103 21.8231 11.7766C21.8517 11.9015 21.8517 12.0985 21.8231 12.2234C21.785 12.3897 21.7169 12.4975 21.5807 12.7132C20.4553 14.4952 17.1054 19 12.0004 19C6.8954 19 3.54553 14.4952 2.42012 12.7132Z\" stroke=\"currentColor\" strokeWidth={2} strokeLinecap=\"round\" strokeLinejoin=\"round\"/>\n <title>{title ?? 'eye'}</title>\n<path d=\"M12.0004 15C13.6573 15 15.0004 13.6569 15.0004 12C15.0004 10.3431 13.6573 9 12.0004 9C10.3435 9 9.0004 10.3431 9.0004 12C9.0004 13.6569 10.3435 15 12.0004 15Z\" stroke=\"currentColor\" strokeWidth={2} strokeLinecap=\"round\" strokeLinejoin=\"round\"/>\n</svg>\n)\n","// Auto-generated from general/eye-off.svg. Do not edit manually.\n\n// External Libraries\nimport type { SVGProps } from 'react'\n\nexport type EyeOffProps = SVGProps<SVGSVGElement> & { title?: string }\n\nexport const EyeOff = ({ title, ...props }: EyeOffProps) => (\n<svg viewBox=\"0 0 24 24\" fill=\"none\" {...props}>\n<path d=\"M10.7429 5.09232C11.1494 5.03223 11.5686 5 12.0004 5C17.1054 5 20.4553 9.50484 21.5807 11.2868C21.7169 11.5025 21.785 11.6103 21.8231 11.7767C21.8518 11.9016 21.8517 12.0987 21.8231 12.2236C21.7849 12.3899 21.7164 12.4985 21.5792 12.7156C21.2793 13.1901 20.8222 13.8571 20.2165 14.5805M6.72432 6.71504C4.56225 8.1817 3.09445 10.2194 2.42111 11.2853C2.28428 11.5019 2.21587 11.6102 2.17774 11.7765C2.1491 11.9014 2.14909 12.0984 2.17771 12.2234C2.21583 12.3897 2.28393 12.4975 2.42013 12.7132C3.54554 14.4952 6.89541 19 12.0004 19C14.0588 19 15.8319 18.2676 17.2888 17.2766M3.00042 3L21.0004 21M9.8791 9.87868C9.3362 10.4216 9.00042 11.1716 9.00042 12C9.00042 13.6569 10.3436 15 12.0004 15C12.8288 15 13.5788 14.6642 14.1217 14.1213\" stroke=\"currentColor\" strokeWidth={2} strokeLinecap=\"round\" strokeLinejoin=\"round\"/>\n <title>{title ?? 'eye-off'}</title>\n</svg>\n)\n","// Auto-generated from brands/facebook.svg. Do not edit manually.\n\n// External Libraries\nimport type { SVGProps } from 'react'\n\nexport type FacebookProps = SVGProps<SVGSVGElement> & { title?: string }\n\nexport const Facebook = ({ title, ...props }: FacebookProps) => (\n<svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" {...props}>\n<path d=\"M16 8C16 11.9927 13.0707 15.3027 9.24667 15.9033V10.328H11.106L11.46 8.02133H9.24667V6.52467C9.24667 5.89333 9.556 5.27867 10.5467 5.27867H11.5527V3.31467C11.5527 3.31467 10.6393 3.15867 9.76667 3.15867C7.944 3.15867 6.75333 4.26333 6.75333 6.26267V8.02067H4.72733V10.3273H6.75333V15.9027C2.93 15.3013 0 11.992 0 8C0 3.582 3.582 0 8 0C12.418 0 16 3.58133 16 8Z\" fill=\"currentColor\"/>\n <title>{title ?? 'facebook'}</title>\n</svg>\n)\n","// Auto-generated from brands/facebook-fit.svg. Do not edit manually.\n\n// External Libraries\nimport type { SVGProps } from 'react'\n\nexport type FacebookFitProps = SVGProps<SVGSVGElement> & { title?: string }\n\nexport const FacebookFit = ({ title, ...props }: FacebookFitProps) => (\n<svg viewBox=\"0 0 1024 1024\" id=\"facebook\" {...props}>\n <path fill=\"#1877f2\" d=\"M1024,512C1024,229.23016,794.76978,0,512,0S0,229.23016,0,512c0,255.554,187.231,467.37012,432,505.77777V660H302V512H432V399.2C432,270.87982,508.43854,200,625.38922,200,681.40765,200,740,210,740,210V336H675.43713C611.83508,336,592,375.46667,592,415.95728V512H734L711.3,660H592v357.77777C836.769,979.37012,1024,767.554,1024,512Z\"></path>\n <title>{title ?? 'facebook-fit'}</title>\n <path fill=\"#fff\" d=\"M711.3,660,734,512H592V415.95728C592,375.46667,611.83508,336,675.43713,336H740V210s-58.59235-10-114.61078-10C508.43854,200,432,270.87982,432,399.2V512H302V660H432v357.77777a517.39619,517.39619,0,0,0,160,0V660Z\"></path>\n</svg>\n)\n","// Auto-generated from brands/google.svg. Do not edit manually.\n\n// External Libraries\nimport type { SVGProps } from 'react'\n\nexport type GoogleProps = SVGProps<SVGSVGElement> & { title?: string }\n\nexport const Google = ({ title, ...props }: GoogleProps) => (\n<svg width=\"800px\" height=\"800px\" viewBox=\"-3 0 262 262\" version=\"1.1\" preserveAspectRatio=\"xMidYMid\" {...props}>\n\t<g>\n\t\t<path d=\"M255.878,133.451 C255.878,122.717 255.007,114.884 253.122,106.761 L130.55,106.761 L130.55,155.209 L202.497,155.209 C201.047,167.249 193.214,185.381 175.807,197.565 L175.563,199.187 L214.318,229.21 L217.003,229.478 C241.662,206.704 255.878,173.196 255.878,133.451\" fill=\"#4285F4\"></path>\n <title>{title ?? 'google'}</title>\n\t\t<path d=\"M130.55,261.1 C165.798,261.1 195.389,249.495 217.003,229.478 L175.807,197.565 C164.783,205.253 149.987,210.62 130.55,210.62 C96.027,210.62 66.726,187.847 56.281,156.37 L54.75,156.5 L14.452,187.687 L13.925,189.152 C35.393,231.798 79.49,261.1 130.55,261.1\" fill=\"#34A853\"></path>\n\t\t<path d=\"M56.281,156.37 C53.525,148.247 51.93,139.543 51.93,130.55 C51.93,121.556 53.525,112.853 56.136,104.73 L56.063,103 L15.26,71.312 L13.925,71.947 C5.077,89.644 0,109.517 0,130.55 C0,151.583 5.077,171.455 13.925,189.152 L56.281,156.37\" fill=\"#FBBC05\"></path>\n\t\t<path d=\"M130.55,50.479 C155.064,50.479 171.6,61.068 181.029,69.917 L217.873,33.943 C195.245,12.91 165.798,0 130.55,0 C79.49,0 35.393,29.301 13.925,71.947 L56.136,104.73 C66.726,73.253 96.027,50.479 130.55,50.479\" fill=\"#EB4335\"></path>\n\t</g>\n</svg>\n)\n","// Auto-generated by generate-icon-components.sh. Do not edit manually.\n/** biome-ignore-all lint/suspicious/noShadowRestrictedNames: generated */\n\nimport { Check } from './__generated__/general/check'\nimport { Eye } from './__generated__/general/eye'\nimport { EyeOff } from './__generated__/general/eye-off'\nimport { Facebook } from './__generated__/brands/facebook'\nimport { FacebookFit } from './__generated__/brands/facebook-fit'\nimport { Google } from './__generated__/brands/google'\n\nconst icons = {\n 'brands-facebook': <Facebook />,\n 'brands-facebook-fit': <FacebookFit />,\n 'brands-google': <Google />,\n 'general-check': <Check />,\n 'general-eye': <Eye />,\n 'general-eye-off': <EyeOff />,\n}\n\nexport type IconName = keyof typeof icons\nexport default icons\n","// External Libraries\nimport type { CSSProperties } from \"react\";\n\nexport const ICON_SIZE_MAP: Record<string, CSSProperties> = {\n xs: {\n width: '0.75rem',\n height: '0.75rem'\n },\n sm: {\n width: '1rem',\n height: '1rem'\n },\n md: {\n width: '1.25rem',\n height: '1.25rem'\n },\n lg: {\n width: '1.5rem',\n height: '1.5rem'\n },\n xl: {\n width: '1.75rem',\n height: '1.75rem'\n },\n '2xl': {\n width: '2rem',\n height: '2rem'\n },\n '3xl': {\n width: '2.5rem',\n height: '2.5rem'\n }\n} as const","// External Libraries\nimport type { CSSProperties } from 'react'\n\n// Types\nimport type { IconProps } from './types'\n\n// Utils\nimport { ICON_SIZE_MAP } from './constants'\nimport { styled } from '@hooks/useThemedStyles/types'\n\nexport function createIconStyles(props: IconProps) {\n const { color, size = 'md' } = props\n\n return styled({\n container: {\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n color:\n color === 'primary'\n ? 'var(--px-text-primary)'\n : color === 'secondary'\n ? 'var(--px-text-secondary)'\n : color,\n ...ICON_SIZE_MAP[size]\n } as CSSProperties\n })\n}\n","// External Libraries\nimport { Suspense, useMemo } from 'react'\n\n// Components\nimport IconLoaders from '@assets/icons'\n\n// Types\nimport type { IconProps } from './types'\n\n// Hooks\nimport { useThemedStyles } from '@hooks/useThemedStyles'\n\n// Styles\nimport { createIconStyles } from './style'\n\nexport const Icon = (props: IconProps) => {\n const { name } = props\n\n // Hooks\n const { styles, classes } = useThemedStyles(props, createIconStyles, {\n pick: p => [p.color, p.size],\n override: props.styles,\n applyCommonProps: true\n })\n\n // Constants\n const IconComponent = useMemo(() => {\n const loader = IconLoaders[name]\n return loader\n }, [name])\n\n if (!IconComponent) {\n console.warn(`Icon \"${name}\" not found.`)\n return null\n }\n\n return (\n <Suspense fallback={null}>\n <span className={classes.container} style={styles.container}>\n {IconComponent}\n </span>\n </Suspense>\n )\n}\n"],"mappings":";;;;;AAOA,MAAa,SAAS,EAAE,OAAO,GAAG,YAClC,qBAAC;CAAI,OAAM;CAAK,QAAO;CAAK,SAAQ;CAAY,MAAK;CAAO,QAAO;CAAe,aAAa;CAAG,eAAc;CAAQ,gBAAe;CAAQ,GAAI;YAC/I,oBAAC,qBAAO,SAAS,UAAgB,sBAAC,cAAS,QAAO,mBAA4B;EAAM;;;;ACFxF,MAAa,OAAO,EAAE,OAAO,GAAG,YAChC,qBAAC;CAAI,SAAQ;CAAY,MAAK;CAAO,GAAI;;EACzC,oBAAC;GAAK,GAAE;GAA+c,QAAO;GAAe,aAAa;GAAG,eAAc;GAAQ,gBAAe;IAAS;EACviB,oBAAC,qBAAO,SAAS,QAAc;EACnC,oBAAC;GAAK,GAAE;GAAiK,QAAO;GAAe,aAAa;GAAG,eAAc;GAAQ,gBAAe;IAAS;;EACvP;;;;ACLN,MAAa,UAAU,EAAE,OAAO,GAAG,YACnC,qBAAC;CAAI,SAAQ;CAAY,MAAK;CAAO,GAAI;YACzC,oBAAC;EAAK,GAAE;EAA8tB,QAAO;EAAe,aAAa;EAAG,eAAc;EAAQ,gBAAe;GAAS,EACtzB,oBAAC,qBAAO,SAAS,YAAkB;EACjC;;;;ACJN,MAAa,YAAY,EAAE,OAAO,GAAG,YACrC,qBAAC;CAAI,OAAM;CAAK,QAAO;CAAK,SAAQ;CAAY,MAAK;CAAO,GAAI;YAChE,oBAAC;EAAK,GAAE;EAA2W,MAAK;GAAgB,EACpY,oBAAC,qBAAO,SAAS,aAAmB;EAClC;;;;ACJN,MAAa,eAAe,EAAE,OAAO,GAAG,YACxC,qBAAC;CAAI,SAAQ;CAAgB,IAAG;CAAW,GAAI;;EAC7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,CAAC;;;;;ACXJ,MAAa,QAAQ,UAAqB;CACxC,MAAM,EAAE,SAAS;CAGjB,MAAM,EAAE,QAAQ,YAAY,gBAAgB,OAAO,kBAAkB;EACnE,OAAM,MAAK,CAAC,EAAE,OAAO,EAAE,KAAK;EAC5B,UAAU,MAAM;EAChB,kBAAkB;EACnB,CAAC;CAGF,MAAM,gBAAgB,cAAc;AAElC,SADeC,cAAY;IAE1B,CAAC,KAAK,CAAC;AAEV,KAAI,CAAC,eAAe;AAClB,UAAQ,KAAK,SAAS,KAAK,cAAc;AACzC,SAAO;;AAGT,QACE,oBAAC;EAAS,UAAU;YAClB,oBAAC;GAAK,WAAW,QAAQ;GAAW,OAAO,OAAO;aAC/C;IACI;GACE"}
@@ -1,9 +1,9 @@
1
- import { n as useThemedStyles, t as Typography } from "./Typography-BaE9Y1O8.js";
1
+ import { n as styled, r as useThemedStyles, t as Typography } from "./Typography-ZFnL1M33.js";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
3
 
4
4
  //#region src/components/toolkit/InfoSummary/components/SummaryItem/components/SummaryHeader/styles.ts
5
5
  function createSummaryHeaderStyles() {
6
- return {
6
+ return styled({
7
7
  container: {
8
8
  width: "100%",
9
9
  minHeight: "1rem",
@@ -27,7 +27,7 @@ function createSummaryHeaderStyles() {
27
27
  textOverflow: "ellipsis"
28
28
  } }
29
29
  }
30
- };
30
+ });
31
31
  }
32
32
 
33
33
  //#endregion
@@ -55,7 +55,7 @@ const SummaryHeader = ({ icon, title }) => {
55
55
  //#endregion
56
56
  //#region src/components/toolkit/InfoSummary/components/SummaryItem/components/SummaryCaption/styles.ts
57
57
  function createSummaryCaptionStyles() {
58
- return {
58
+ return styled({
59
59
  container: {
60
60
  width: "100%",
61
61
  minHeight: "0.625rem",
@@ -76,7 +76,7 @@ function createSummaryCaptionStyles() {
76
76
  textOverflow: "ellipsis"
77
77
  } }
78
78
  }
79
- };
79
+ });
80
80
  }
81
81
 
82
82
  //#endregion
@@ -102,7 +102,7 @@ const SummaryCaption = ({ loading, captionText }) => {
102
102
  //#endregion
103
103
  //#region src/components/toolkit/InfoSummary/components/SummaryItem/components/SummaryHighlight/styles.ts
104
104
  function createSummaryHighlightStyles() {
105
- return {
105
+ return styled({
106
106
  container: {
107
107
  width: "100%",
108
108
  minHeight: "1rem",
@@ -127,7 +127,7 @@ function createSummaryHighlightStyles() {
127
127
  lineHeight: "1"
128
128
  } }
129
129
  }
130
- };
130
+ });
131
131
  }
132
132
 
133
133
  //#endregion
@@ -156,7 +156,7 @@ const SummaryHighlight = ({ loading, highlightText, highlightIcon }) => {
156
156
  //#endregion
157
157
  //#region src/components/toolkit/InfoSummary/components/SummaryItem/styles.ts
158
158
  function createSummaryItemStyles(props) {
159
- return {
159
+ return styled({
160
160
  container: {
161
161
  height: "100%",
162
162
  borderRight: props.isLast ? "none" : "2px solid var(--border-secondary)"
@@ -170,7 +170,7 @@ function createSummaryItemStyles(props) {
170
170
  paddingBlock: "0.5rem",
171
171
  paddingInline: "1rem"
172
172
  }
173
- };
173
+ });
174
174
  }
175
175
 
176
176
  //#endregion
@@ -203,7 +203,7 @@ const SummaryItem = (props) => {
203
203
  //#endregion
204
204
  //#region src/components/toolkit/InfoSummary/styles.ts
205
205
  function createInfoSummaryStyles() {
206
- return {
206
+ return styled({
207
207
  section: {
208
208
  height: "5.5rem",
209
209
  minHeight: "5.5rem",
@@ -222,7 +222,7 @@ function createInfoSummaryStyles() {
222
222
  flexDirection: "row",
223
223
  alignItems: "flex-start"
224
224
  }
225
- };
225
+ });
226
226
  }
227
227
 
228
228
  //#endregion
@@ -247,4 +247,4 @@ const InfoSummary = ({ infos, loading }) => {
247
247
 
248
248
  //#endregion
249
249
  export { InfoSummary as t };
250
- //# sourceMappingURL=InfoSummary-CHRfCc3v.js.map
250
+ //# sourceMappingURL=InfoSummary-D4GgSlQ0.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InfoSummary-D4GgSlQ0.js","names":["SummaryHeader: React.FC<Props>","SummaryCaption: React.FC<Props>","SummaryHighlight: React.FC<Props>","SummaryItem: React.FC<SummaryItemProps>","InfoSummary: React.FC<InfoSummaryProps>"],"sources":["../src/components/toolkit/InfoSummary/components/SummaryItem/components/SummaryHeader/styles.ts","../src/components/toolkit/InfoSummary/components/SummaryItem/components/SummaryHeader/index.tsx","../src/components/toolkit/InfoSummary/components/SummaryItem/components/SummaryCaption/styles.ts","../src/components/toolkit/InfoSummary/components/SummaryItem/components/SummaryCaption/index.tsx","../src/components/toolkit/InfoSummary/components/SummaryItem/components/SummaryHighlight/styles.ts","../src/components/toolkit/InfoSummary/components/SummaryItem/components/SummaryHighlight/index.tsx","../src/components/toolkit/InfoSummary/components/SummaryItem/styles.ts","../src/components/toolkit/InfoSummary/components/SummaryItem/index.tsx","../src/components/toolkit/InfoSummary/styles.ts","../src/components/toolkit/InfoSummary/index.tsx"],"sourcesContent":["// Types\nimport { styled, type StyleMap } from '@hooks/useThemedStyles/types'\n\nexport function createSummaryHeaderStyles(): StyleMap {\n return styled({\n container: {\n width: '100%',\n minHeight: '1rem',\n\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'flex-end',\n\n gap: '0.125rem'\n },\n\n iconContainer: {\n display: 'flex',\n alignItems: 'flex-start'\n },\n\n textContainer: {\n flex: '1',\n maxWidth: '8rem',\n\n display: 'flex',\n alignItems: 'flex-start',\n\n __rules: {\n '& > p': {\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n textOverflow: 'ellipsis'\n }\n }\n }\n })\n}\n","// External Libraries\nimport type React from 'react'\nimport type { ReactNode } from 'react'\n\n// Components\nimport { Typography } from '@components/toolkit/Typography'\n\n// Hooks\nimport { useThemedStyles } from '@hooks/useThemedStyles'\n\n// Styles\nimport { createSummaryHeaderStyles } from './styles'\n\ninterface Props {\n title: string\n icon?: ReactNode\n}\n\nexport const SummaryHeader: React.FC<Props> = ({ icon, title }) => {\n const { styles } = useThemedStyles({}, createSummaryHeaderStyles)\n\n return (\n <header style={styles.container}>\n {icon ? <div style={styles.iconContainer}>{icon}</div> : null}\n\n <div style={styles.textContainer}>\n <Typography\n variant=\"b1\"\n fontWeight=\"bold\"\n lineHeight=\"100%\"\n fontSize=\"0.75rem\"\n >\n {title}\n </Typography>\n </div>\n </header>\n )\n}\n","// Types\nimport { styled, type StyleMap } from '@hooks/useThemedStyles/types'\n\nexport function createSummaryCaptionStyles(): StyleMap {\n return styled({\n container: {\n width: '100%',\n minHeight: '0.625rem',\n\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n justifyItems: 'start',\n\n columnGap: '0.125rem'\n },\n\n textContainer: {\n flex: '1',\n maxWidth: '8rem',\n\n display: 'flex',\n alignItems: 'center',\n\n __rules: {\n '& > p': {\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n textOverflow: 'ellipsis'\n }\n }\n }\n })\n}\n","// External Libraries\nimport type React from 'react'\n\n// Components\nimport { Typography } from '@components/toolkit/Typography'\n\n// Hooks\nimport { useThemedStyles } from '@hooks/useThemedStyles'\n\n// Styles\nimport { createSummaryCaptionStyles } from './styles'\n\ninterface Props {\n loading?: boolean\n captionText?: string\n}\n\nexport const SummaryCaption: React.FC<Props> = ({ loading, captionText }) => {\n // Hooks\n const { styles } = useThemedStyles({}, createSummaryCaptionStyles)\n\n return (\n <div style={styles.container}>\n <div style={styles.textContainer}>\n <Typography\n variant=\"b3\"\n lineHeight=\"100%\"\n isLoading={loading}\n fontSize=\"0.625rem\"\n color=\"var(--px-text-secondary)\"\n >\n {captionText}\n </Typography>\n </div>\n </div>\n )\n}\n","// Types\nimport { styled, type StyleMap } from '@hooks/useThemedStyles/types'\n\nexport function createSummaryHighlightStyles(): StyleMap {\n return styled({\n container: {\n width: '100%',\n minHeight: '1rem',\n\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'flex-end',\n\n columnGap: '0.125rem'\n },\n\n iconContainer: {\n display: 'flex',\n alignItems: 'flex-start'\n },\n\n textContainer: {\n flex: '1',\n maxWidth: '8rem',\n\n display: 'flex',\n alignItems: 'flex-start',\n\n __rules: {\n '& > p': {\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n lineHeight: '1'\n }\n }\n }\n })\n}\n","// External Libraries\nimport type React from 'react'\nimport type { ReactNode } from 'react'\n\n// Components\nimport { Typography } from '@components/toolkit/Typography'\n\n// Hooks\nimport { useThemedStyles } from '@hooks/useThemedStyles'\n\n// Styles\nimport { createSummaryHighlightStyles } from './styles'\n\ninterface Props {\n loading?: boolean\n highlightText?: string\n highlightIcon?: ReactNode\n}\n\nexport const SummaryHighlight: React.FC<Props> = ({\n loading,\n highlightText,\n highlightIcon\n}) => {\n // Hooks\n const { styles } = useThemedStyles({}, createSummaryHighlightStyles)\n\n return (\n <div style={styles.container}>\n {highlightIcon ? (\n <div style={styles.iconContainer}>{highlightIcon}</div>\n ) : null}\n\n <div style={styles.textContainer}>\n <Typography\n variant=\"b1\"\n lineHeight=\"100%\"\n fontSize=\"0.875rem\"\n fontWeight=\"normal\"\n isLoading={loading}\n >\n {highlightText}\n </Typography>\n </div>\n </div>\n )\n}\n","// Types\nimport type { SummaryItemProps } from './types'\nimport { styled, type StyleMap } from '@hooks/useThemedStyles/types'\n\nexport function createSummaryItemStyles(props: SummaryItemProps): StyleMap {\n return styled({\n container: {\n height: '100%',\n borderRight: props.isLast ? 'none' : '2px solid var(--border-secondary)'\n },\n\n content: {\n minWidth: '8rem',\n height: '100%',\n\n display: 'flex',\n flexDirection: 'column',\n justifyContent: 'space-between',\n\n paddingBlock: '0.5rem',\n paddingInline: '1rem'\n }\n })\n}\n","// External Libraries\nimport type React from 'react'\n\n// Components\nimport { SummaryHeader } from './components/SummaryHeader'\nimport { SummaryCaption } from './components/SummaryCaption'\nimport { SummaryHighlight } from './components/SummaryHighlight'\n\n// Hooks\nimport { useThemedStyles } from '@hooks/useThemedStyles'\n\n// Types\nimport type { SummaryItemProps } from './types'\n\n// Styles\nimport { createSummaryItemStyles } from './styles'\n\nexport const SummaryItem: React.FC<SummaryItemProps> = props => {\n // Hooks\n const { styles } = useThemedStyles(props, createSummaryItemStyles)\n\n return (\n <li style={styles.container}>\n <article style={styles.content}>\n <SummaryHeader icon={props.item.titleIcon} title={props.item.title} />\n\n <SummaryHighlight\n loading={props.loading}\n highlightText={props.item.highlight}\n highlightIcon={props.item.highlightIcon}\n />\n\n <SummaryCaption\n loading={props.loading}\n captionText={props.item.caption}\n />\n </article>\n </li>\n )\n}\n","// Types\nimport { styled, type StyleMap } from '@hooks/useThemedStyles/types'\n\nexport function createInfoSummaryStyles(): StyleMap {\n return styled({\n section: {\n height: '5.5rem',\n minHeight: '5.5rem',\n\n width: 'fit-content',\n\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'flex-start',\n\n backgroundColor: 'var(--px-background-card-primary)',\n\n borderRadius: '10px',\n paddingBlock: 'var(--px-space-sm)'\n },\n\n summaryListContainer: {\n width: '100%',\n height: '100%',\n\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'flex-start'\n }\n })\n}\n","// External Libraries\nimport type React from 'react'\n\n// Components\nimport { SummaryItem } from './components/SummaryItem'\n\n// Hooks\nimport { useThemedStyles } from '@hooks/useThemedStyles'\n\n// Types\nimport type { InfoSummaryProps } from './types'\n\n// Styles\nimport { createInfoSummaryStyles } from './styles'\n\nexport * from './types'\n\nexport const InfoSummary: React.FC<InfoSummaryProps> = ({ infos, loading }) => {\n // Hooks\n const { styles } = useThemedStyles({}, createInfoSummaryStyles)\n\n // Functions\n function renderSummaryItems() {\n return (\n <ul style={styles.summaryListContainer}>\n {infos.map((info, index) => (\n <SummaryItem\n item={info}\n key={info.id}\n loading={loading}\n isLast={index === infos.length - 1}\n />\n ))}\n </ul>\n )\n }\n\n return <section style={styles.section}>{renderSummaryItems()}</section>\n}\n"],"mappings":";;;;AAGA,SAAgB,4BAAsC;AACpD,QAAO,OAAO;EACZ,WAAW;GACT,OAAO;GACP,WAAW;GAEX,SAAS;GACT,eAAe;GACf,YAAY;GAEZ,KAA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;GAER,SAAS;GACT,eAAe;GACf,YAAY;GACb;EACF,CAAC;;;;;ACZJ,MAAaC,eAA2C,EAAE,OAAO,cAAc;CAE7E,MAAM,EAAE,WAAW,gBAAgB,EAAE,EAAE,wBAAwB;CAG/D,SAAS,qBAAqB;AAC5B,SACE,oBAAC;GAAG,OAAO,OAAO;aACf,MAAM,KAAK,MAAM,UAChB,oBAAC;IACC,MAAM;IAEG;IACT,QAAQ,UAAU,MAAM,SAAS;MAF5B,KAAK,GAGV,CACF;IACC;;AAIT,QAAO,oBAAC;EAAQ,OAAO,OAAO;YAAU,oBAAoB;GAAW"}
@@ -1,6 +1,6 @@
1
- import { t as Icon } from "./Icon-BrLGgg0w.js";
2
- import { n as useThemedStyles } from "./Typography-BaE9Y1O8.js";
3
- import { t as Label } from "./Label-BVteAeiK.js";
1
+ import { t as Icon } from "./Icon-T_2VPPNe.js";
2
+ import { n as styled, r as useThemedStyles } from "./Typography-ZFnL1M33.js";
3
+ import { t as Label } from "./Label-DFcePle9.js";
4
4
  import { useCallback, useId, useMemo, useRef, useState } from "react";
5
5
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
6
 
@@ -162,7 +162,7 @@ const INPUT_STYLES = {
162
162
  function createInputStyles(props) {
163
163
  const { size = "md", variant = "bordered", radius = "md", isDisabled = false, isInvalid = false, focusedRingColor } = props;
164
164
  const focusRingColor = focusedRingColor || "var(--px-color-info)";
165
- return {
165
+ return styled({
166
166
  wrapper: {
167
167
  position: "relative",
168
168
  display: "flex",
@@ -213,7 +213,7 @@ function createInputStyles(props) {
213
213
  alignItems: "center",
214
214
  padding: "0.25rem"
215
215
  }
216
- };
216
+ });
217
217
  }
218
218
 
219
219
  //#endregion
@@ -246,7 +246,8 @@ const Input = (props) => {
246
246
  p.focusedRingColor
247
247
  ],
248
248
  override: props.styles,
249
- applyCommonProps: true
249
+ applyCommonProps: true,
250
+ commonSlot: "input"
250
251
  });
251
252
  function getType() {
252
253
  if (type === "password" && showPassword) return "text";
@@ -323,4 +324,4 @@ const Input = (props) => {
323
324
 
324
325
  //#endregion
325
326
  export { Input as t };
326
- //# sourceMappingURL=Input-CUZNjGoG.js.map
327
+ //# sourceMappingURL=Input-9E5L4S5O.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Input-9E5L4S5O.js","names":["Input: React.FC<InputProps>"],"sources":["../src/components/commons/inputs/Input/hooks/useInput/index.ts","../src/components/commons/inputs/Input/styles.ts","../src/components/commons/inputs/Input/index.tsx"],"sourcesContent":["// External Libraries\nimport { useState, useRef, useCallback } from 'react'\n\n// Types\nimport type { InputProps } from '../../types'\n\nexport const useInput = ({\n value: controlledValue,\n defaultValue = '',\n onChange,\n}: Partial<InputProps>) => {\n // Refs\n const inputRef = useRef<HTMLInputElement>(null)\n\n // States\n const [internalValue, setInternalValue] = useState(defaultValue)\n const [showPassword, setShowPassword] = useState(false)\n\n // Constants\n const isControlled = controlledValue !== undefined\n const currentValue = isControlled ? controlledValue : internalValue\n\n // Functions\n const handleChange = useCallback(\n (e: React.ChangeEvent<HTMLInputElement>) => {\n const value = e.target.value\n\n if (!isControlled) setInternalValue(value)\n onChange?.(value)\n },\n [isControlled, onChange],\n )\n\n const togglePasswordVisibility = useCallback(() => {\n setShowPassword(prev => !prev)\n }, [])\n\n const focusInput = useCallback(() => {\n inputRef.current?.focus()\n }, [])\n\n return {\n inputRef,\n focusInput,\n isControlled,\n currentValue,\n showPassword,\n handleChange,\n togglePasswordVisibility,\n }\n}\n","// External libraries\nimport type { CSSProperties } from 'react'\n\n// Types\nimport { styled, type StyleMap } from '@hooks/useThemedStyles/types'\nimport type { InputProps } from './types'\n\nexport const INPUT_STYLES = {\n width: {\n auto: { width: 'auto' },\n full: { width: '100%' },\n md: { width: '12rem' },\n lg: { width: '16rem' },\n xl: { width: '20rem' },\n '2xl': { width: '24rem' }\n } as Record<string, CSSProperties>,\n radius: {\n none: { borderRadius: '0px' },\n sm: { borderRadius: '0.125rem' },\n md: { borderRadius: '0.375rem' },\n lg: { borderRadius: '0.5rem' },\n full: { borderRadius: '9999px' }\n } as Record<string, CSSProperties>,\n size: {\n sm: {\n wrapper: { minHeight: '2rem' },\n input: {\n padding: '0.5rem 0.75rem',\n lineHeight: '1rem',\n fontSize: '0.75rem'\n },\n label: {\n fontSize: '0.75rem',\n lineHeight: '1rem',\n marginBottom: '0.25rem'\n },\n description: {\n fontSize: '0.75rem',\n lineHeight: '1rem',\n marginTop: '0.25rem'\n },\n error: {\n fontSize: '0.75rem',\n lineHeight: '1rem',\n marginTop: '0.25rem'\n }\n } as Record<string, CSSProperties>,\n md: {\n wrapper: { minHeight: '2.5rem' },\n input: {\n padding: '0.5rem 0.75rem',\n lineHeight: '1.25rem',\n fontSize: '0.875rem'\n },\n label: {\n fontSize: '0.875rem',\n lineHeight: '1.25rem',\n marginBottom: '0.375rem'\n },\n description: {\n fontSize: '0.75rem',\n lineHeight: '1rem',\n marginTop: '0.375rem'\n },\n error: {\n fontSize: '0.75rem',\n lineHeight: '1rem',\n marginTop: '0.375rem'\n }\n } as Record<string, CSSProperties>,\n lg: {\n wrapper: { minHeight: '3rem' },\n input: {\n padding: '0.75rem 1rem',\n lineHeight: '1.5rem',\n fontSize: '1rem',\n width: '16rem'\n },\n label: {\n fontSize: '0.875rem',\n lineHeight: '1.25rem',\n marginBottom: '0.5rem'\n },\n description: {\n fontSize: '0.875rem',\n lineHeight: '1.25rem',\n marginTop: '0.5rem'\n },\n error: {\n fontSize: '0.875rem',\n lineHeight: '1.25rem',\n marginTop: '0.5rem'\n }\n } as Record<string, CSSProperties>\n },\n variant: {\n bordered: {\n wrapper: { border: '1px solid var(--px-border-primary)' },\n input: {\n backgroundColor: 'transparent',\n color: 'var(--px-text-primary)',\n '::placeholder': {\n color: 'var(--px-text-secondary)'\n }\n },\n label: { color: 'var(--px-text-primary)' },\n button: {\n color: 'var(--px-text-secondary)',\n ':hover': { color: 'var(--px-text-primary)' }\n }\n } as Record<string, CSSProperties>\n },\n state: {\n default: {\n input: {},\n ring: {\n boxShadow: '0 0 0 2px var(--px-color-info)'\n }\n },\n invalid: {\n wrapper: {\n borderColor: 'var(--px-color-invalid)',\n __rules: {\n '&:focus-within': {\n boxShadow:\n '0 0 0 1px var(--px-background), 0 0 0 3px var(--px-color-invalid)'\n }\n }\n },\n input: {\n color: 'var(--px-color-invalid)'\n },\n error: {\n color: 'var(--px-color-invalid)'\n }\n },\n\n disabled: {\n wrapper: {\n opacity: 0.6,\n cursor: 'not-allowed',\n backgroundColor: '#f9fafb'\n },\n input: {\n cursor: 'not-allowed'\n },\n label: {\n cursor: 'not-allowed'\n }\n }\n } as Record<string, Partial<StyleMap>>\n}\n\nexport function createInputStyles(props: InputProps): StyleMap {\n const {\n size = 'md',\n variant = 'bordered',\n radius = 'md',\n isDisabled = false,\n isInvalid = false,\n focusedRingColor\n } = props\n\n const focusRingColor = focusedRingColor || 'var(--px-color-info)'\n\n return styled({\n wrapper: {\n position: 'relative',\n display: 'flex',\n alignItems: 'center',\n\n ...(INPUT_STYLES.size[size]?.wrapper ?? {}),\n ...(INPUT_STYLES.variant[variant]?.wrapper ?? {}),\n ...(INPUT_STYLES.radius[radius] ?? {}),\n\n __rules: {\n '&:focus-within': {\n boxShadow: `0 0 0 1px var(--px-background), 0 0 0 3px ${focusRingColor}`\n }\n },\n\n ...(isDisabled ? INPUT_STYLES.state.disabled.wrapper : {}),\n ...(isInvalid ? INPUT_STYLES.state.invalid.wrapper : {})\n },\n\n input: {\n flex: 1,\n backgroundColor: 'transparent',\n outline: 'none',\n width: '100%',\n\n ...(INPUT_STYLES.size[size]?.input ?? {}),\n\n ...(INPUT_STYLES.variant[variant]?.input ?? {}),\n ...(INPUT_STYLES.state.default.input ?? {}),\n\n ...(isDisabled ? INPUT_STYLES.state.disabled.input : {}),\n ...(isInvalid ? INPUT_STYLES.state.invalid.input : {})\n },\n\n label: {\n ...(INPUT_STYLES.size[size]?.label ?? {}),\n ...(INPUT_STYLES.variant[variant]?.label ?? {}),\n\n ...(isDisabled ? INPUT_STYLES.state.disabled.label : {})\n },\n\n error: {\n display: 'block',\n\n ...(INPUT_STYLES.size[size]?.error ?? {}),\n ...(INPUT_STYLES.state.invalid.error ?? {})\n },\n\n button: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n padding: '0.25rem',\n cursor: 'pointer',\n\n ...(INPUT_STYLES.variant[variant]?.button ?? {}),\n ...(INPUT_STYLES.radius[radius] ?? {}),\n\n ...(isDisabled ? { cursor: 'not-allowed', opacity: 0.5 } : {})\n },\n\n startContent: {\n display: 'flex',\n alignItems: 'center',\n padding: '0.25rem'\n }\n })\n}\n","// External Libraries\nimport type React from 'react'\nimport { useId, useMemo } from 'react'\n\n// Components\nimport { Label } from '../../Label'\nimport { Icon } from '@components/toolkit/Icon'\n\n// Types\nimport type { InputProps } from './types'\n\n// Hooks\nimport { useInput } from './hooks/useInput'\nimport { useThemedStyles } from '@hooks/useThemedStyles'\n\n// Styles\nimport { createInputStyles, INPUT_STYLES } from './styles'\n\nexport const Input: React.FC<InputProps> = props => {\n // Hooks\n const {\n id,\n type,\n label,\n width,\n fullWidth,\n required,\n isDisabled,\n minLength,\n maxLength,\n placeholder,\n requiredColor,\n labelColor,\n labelWeight,\n labelVariant,\n startContent,\n endContent,\n errorMessage,\n onChange,\n value,\n defaultValue,\n size,\n radius,\n variant,\n isInvalid,\n ...nativeInputProps\n } = props\n\n const {\n inputRef,\n currentValue,\n showPassword,\n handleChange,\n togglePasswordVisibility\n } = useInput({\n size,\n value,\n radius,\n variant,\n isInvalid,\n fullWidth,\n isDisabled,\n defaultValue,\n onChange\n })\n\n // Constants\n const reactId = useId()\n const inputId = useMemo(() => {\n return id || `input-${reactId}`\n }, [id, reactId])\n const containerWidth = getWidth()\n\n // Hooks\n const { styles, classes } = useThemedStyles(props, createInputStyles, {\n pick: p => [\n p.size,\n p.variant,\n p.radius,\n p.isDisabled,\n p.isInvalid,\n p.focusedRingColor\n ],\n override: props.styles,\n applyCommonProps: true,\n commonSlot: 'input'\n })\n\n // Functions\n function getType() {\n if (type === 'password' && showPassword) return 'text'\n return type\n }\n\n function getWidth() {\n if (fullWidth) return { width: '100%' }\n if (width) return INPUT_STYLES.width[width] || { width: 'auto' }\n return { width: 'auto' }\n }\n\n function renderLabel() {\n if (!label) return null\n\n return (\n <div className=\"flex items-center gap-3\">\n <Label\n htmlFor={inputId}\n label={label}\n required={required}\n styles={{ label: styles.label }}\n requiredColor={requiredColor}\n labelColor={labelColor}\n labelWeight={labelWeight}\n labelVariant={labelVariant}\n />\n </div>\n )\n }\n\n function renderEndContent() {\n return (\n <>\n {type === 'password' ? (\n <button\n type=\"button\"\n style={styles.button}\n onClick={togglePasswordVisibility}\n >\n {showPassword ? (\n <Icon name={'general-eye-off'} />\n ) : (\n <Icon name={'general-eye'} />\n )}\n </button>\n ) : (\n endContent\n )}\n </>\n )\n }\n\n return (\n <div style={containerWidth}>\n {renderLabel()}\n <div style={styles.wrapper} className={classes.wrapper}>\n {startContent && <div style={styles.startContent}>{startContent}</div>}\n <div style={{ flex: 1 }}>\n <input\n ref={inputRef}\n id={inputId}\n type={getType()}\n value={currentValue}\n style={styles.input}\n className={classes.input}\n disabled={isDisabled}\n minLength={minLength}\n maxLength={maxLength}\n placeholder={placeholder ?? 'Digite aqui...'}\n onChange={handleChange}\n {...nativeInputProps}\n />\n </div>\n {renderEndContent() && <div>{renderEndContent()}</div>}\n </div>\n\n {errorMessage ? <div style={styles.error}>{errorMessage}</div> : null}\n </div>\n )\n}\n"],"mappings":";;;;;;;AAMA,MAAa,YAAY,EACvB,OAAO,iBACP,eAAe,IACf,eACyB;CAEzB,MAAM,WAAW,OAAyB,KAAK;CAG/C,MAAM,CAAC,eAAe,oBAAoB,SAAS,aAAa;CAChE,MAAM,CAAC,cAAc,mBAAmB,SAAS,MAAM;CAGvD,MAAM,eAAe,oBAAoB;CACzC,MAAM,eAAe,eAAe,kBAAkB;CAGtD,MAAM,eAAe,aAClB,MAA2C;EAC1C,MAAM,QAAQ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E;KACL,kBAAkB,IAAI,oBAAC,mBAAK,kBAAkB,GAAO;;KAClD;GAEL,eAAe,oBAAC;IAAI,OAAO,OAAO;cAAQ;KAAmB,GAAG;;GAC7D"}
@@ -1,4 +1,4 @@
1
- import { n as useThemedStyles, t as Typography } from "./Typography-BaE9Y1O8.js";
1
+ import { n as styled, r as useThemedStyles, t as Typography } from "./Typography-ZFnL1M33.js";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
3
 
4
4
  //#region src/components/commons/Label/style.ts
@@ -18,7 +18,7 @@ const LABEL_VARIANTS = {
18
18
  };
19
19
  function createLabelStyles(props) {
20
20
  const { labelColor, labelWeight, labelVariant = "b2", requiredColor } = props;
21
- return {
21
+ return styled({
22
22
  label: {
23
23
  display: "inline-flex",
24
24
  alignItems: "center",
@@ -33,7 +33,7 @@ function createLabelStyles(props) {
33
33
  fontSize: "inherit",
34
34
  fontWeight: "inherit"
35
35
  }
36
- };
36
+ });
37
37
  }
38
38
 
39
39
  //#endregion
@@ -75,4 +75,4 @@ const Label = (props) => {
75
75
 
76
76
  //#endregion
77
77
  export { Label as t };
78
- //# sourceMappingURL=Label-BVteAeiK.js.map
78
+ //# sourceMappingURL=Label-DFcePle9.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Label-DFcePle9.js","names":["LABEL_VARIANTS: Record<string, CSSProperties>"],"sources":["../src/components/commons/Label/style.ts","../src/components/commons/Label/index.tsx"],"sourcesContent":["// External libraries\nimport type { CSSProperties } from 'react'\n\n// Types\nimport type { LabelProps } from './types'\nimport { styled, type StyleMap } from '@hooks/useThemedStyles/types'\n\nconst LABEL_VARIANTS: Record<string, CSSProperties> = {\n b1: {\n fontSize: '1rem',\n lineHeight: '1.5rem'\n },\n b2: {\n fontSize: '0.875rem',\n lineHeight: '1.25rem'\n },\n b3: {\n fontSize: '0.75rem',\n lineHeight: '1rem'\n }\n}\n\nexport function createLabelStyles(props: LabelProps): StyleMap {\n const { labelColor, labelWeight, labelVariant = 'b2', requiredColor } = props\n\n return styled({\n label: {\n display: 'inline-flex',\n alignItems: 'center',\n gap: '0.25rem',\n fontWeight: labelWeight,\n\n ...(LABEL_VARIANTS[labelVariant] ?? {}),\n\n ...(labelColor ? { color: labelColor } : {})\n },\n\n required: {\n color: requiredColor,\n lineHeight: 'inherit',\n fontSize: 'inherit',\n fontWeight: 'inherit'\n }\n })\n}\n","// Components\nimport { Typography } from '@components/toolkit/Typography'\n\n// Types\nimport type { LabelProps } from './types'\n\n// Hooks\nimport { useThemedStyles } from '@hooks/useThemedStyles'\n\n// Styles\nimport { createLabelStyles } from './style'\n\nexport const Label = (props: LabelProps) => {\n const {\n htmlFor,\n label,\n required,\n requiredColor,\n labelColor,\n labelWeight,\n labelVariant = 'b2',\n } = props\n\n const { styles } = useThemedStyles(props, createLabelStyles, {\n pick: p => [p.labelColor, p.labelWeight, p.labelVariant, p.requiredColor],\n override: props.styles,\n applyCommonProps: true,\n })\n\n return (\n <label htmlFor={htmlFor} style={styles.label}>\n <Typography\n variant={labelVariant}\n styles={{\n text: {\n minWidth: 'fit-content',\n color: labelColor,\n fontWeight: labelWeight,\n },\n }}\n >\n {label}\n\n {required ? (\n <Typography\n as=\"span\"\n variant=\"b2\"\n styles={{ text: { color: requiredColor, marginLeft: '0.125rem' } }}\n >\n *\n </Typography>\n ) : null}\n </Typography>\n </label>\n )\n}\n"],"mappings":";;;;AAOA,MAAMA,iBAAgD;CACpD,IAAI;EACF,UAAU;EACV,YAAY;EACb;CACD,IAAI;EACF,UAAU;EACV,YAAY;EACb;CACD,IAAI;EACF,UAAU;EACV,YAAY;EACb;CACF;AAED,SAAgB,kBAAkB,OAA6B;CAC7D,MAAM,EAAE,YAAY,aAAa,eAAe,MAAM,kBAAkB;AAExE,QAAO,OAAO;EACZ,OAAO;GACL,SAAS;GACT,YAAY;GACZ,KAAK;GACL,YAAY;GAEZ,GAAI,eAAe,iBAAiB,EAAE;GAEtC,GAAI,aAAa,EAAE,OAAO,YAAY,GAAG,EAAE;GAC5C;EAED,UAAU;GACR,OAAO;GACP,YAAY;GACZ,UAAU;GACV,YAAY;GACb;EACF,CAAC;;;;;AC/BJ,MAAa,SAAS,UAAsB;CAC1C,MAAM,EACJ,SACA,OACA,UACA,eACA,YACA,aACA,eAAe,SACb;CAEJ,MAAM,EAAE,WAAW,gBAAgB,OAAO,mBAAmB;EAC3D,OAAM,MAAK;GAAC,EAAE;GAAY,EAAE;GAAa,EAAE;GAAc,EAAE;GAAc;EACzE,UAAU,MAAM;EAChB,kBAAkB;EACnB,CAAC;AAEF,QACE,oBAAC;EAAe;EAAS,OAAO,OAAO;YACrC,qBAAC;GACC,SAAS;GACT,QAAQ,EACN,MAAM;IACJ,UAAU;IACV,OAAO;IACP,YAAY;IACb,EACF;cAEA,OAEA,WACC,oBAAC;IACC,IAAG;IACH,SAAQ;IACR,QAAQ,EAAE,MAAM;KAAE,OAAO;KAAe,YAAY;KAAY,EAAE;cACnE;KAEY,GACX;IACO;GACP"}