softable-pixels-web 1.0.4 → 1.0.6

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 (41) hide show
  1. package/dist/Button-FBwDmqJ7.js +178 -0
  2. package/dist/Button-FBwDmqJ7.js.map +1 -0
  3. package/dist/Checkbox-D2dDt6Hp.js +149 -0
  4. package/dist/Checkbox-D2dDt6Hp.js.map +1 -0
  5. package/dist/Icon-CzUEwDPp.js +209 -0
  6. package/dist/Icon-CzUEwDPp.js.map +1 -0
  7. package/dist/{InfoSummary-DVuk2_3H.js → InfoSummary-DSOwr7Q1.js} +2 -2
  8. package/dist/{InfoSummary-DVuk2_3H.js.map → InfoSummary-DSOwr7Q1.js.map} +1 -1
  9. package/dist/Input-CTx0xk1z.js +398 -0
  10. package/dist/Input-CTx0xk1z.js.map +1 -0
  11. package/dist/{TabSwitch-COP-ySAl.js → TabSwitch-Bewsxeqz.js} +3 -3
  12. package/dist/{TabSwitch-COP-ySAl.js.map → TabSwitch-Bewsxeqz.js.map} +1 -1
  13. package/dist/{ThemeContext-DiTV3IJz.js → ThemeContext-BAcoPRJ-.js} +25 -17
  14. package/dist/ThemeContext-BAcoPRJ-.js.map +1 -0
  15. package/dist/{Typography-DRln739F.js → Typography-CTfrQCqI.js} +1 -1
  16. package/dist/Typography-CTfrQCqI.js.map +1 -0
  17. package/dist/button.d.ts +3 -0
  18. package/dist/button.js +4 -0
  19. package/dist/checkbox.d.ts +3 -0
  20. package/dist/checkbox.js +5 -0
  21. package/dist/{index-BIO2lN3W.d.ts → index-BMSLSVxv.d.ts} +8 -6
  22. package/dist/index-BN9pjWqo.d.ts +64 -0
  23. package/dist/index-CRdoo14l.d.ts +44 -0
  24. package/dist/{index-We1VnYPI.d.ts → index-DeyMp__h.d.ts} +2 -2
  25. package/dist/index-Y4JLziyn.d.ts +31 -0
  26. package/dist/index.d.ts +8 -4
  27. package/dist/index.js +9 -5
  28. package/dist/info-summary.js +2 -2
  29. package/dist/input.d.ts +3 -0
  30. package/dist/input.js +5 -0
  31. package/dist/tab-switch.d.ts +1 -1
  32. package/dist/tab-switch.js +2 -2
  33. package/dist/theme-context.d.ts +1 -1
  34. package/dist/theme-context.js +1 -1
  35. package/dist/{index-Bi8K59rR.d.ts → types-CzIXNt_Y.d.ts} +3 -7
  36. package/dist/typography.d.ts +8 -2
  37. package/dist/typography.js +1 -1
  38. package/dist/{useThemedStyles-IEQ_4Cqi.d.ts → useThemedStyles-t3wVpy-H.d.ts} +9 -2
  39. package/package.json +22 -1
  40. package/dist/ThemeContext-DiTV3IJz.js.map +0 -1
  41. package/dist/Typography-DRln739F.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"InfoSummary-DVuk2_3H.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 type { StyleMap } from '@hooks/useThemedStyles/types'\n\nexport function createSummaryHeaderStyles(): StyleMap {\n return {\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 type { StyleMap } from '@hooks/useThemedStyles/types'\n\nexport function createSummaryCaptionStyles(): StyleMap {\n return {\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 type { StyleMap } from '@hooks/useThemedStyles/types'\n\nexport function createSummaryHighlightStyles(): StyleMap {\n return {\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 type { StyleMap } from '@hooks/useThemedStyles/types'\n\nexport function createSummaryItemStyles(props: SummaryItemProps): StyleMap {\n return {\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 type { StyleMap } from '@hooks/useThemedStyles/types'\n\nexport function createInfoSummaryStyles(): StyleMap {\n return {\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;EACL,WAAW;GACT,OAAO;GACP,WAAW;GAEX,SAAS;GACT,eAAe;GACf,YAAY;GAEZ,KAAK;GACN;EAED,eAAe;GACb,SAAS;GACT,YAAY;GACb;EAED,eAAe;GACb,MAAM;GACN,UAAU;GAEV,SAAS;GACT,YAAY;GAEZ,SAAS,EACP,SAAS;IACP,YAAY;IACZ,UAAU;IACV,cAAc;IACf,EACF;GACF;EACF;;;;;AClBH,MAAaA,iBAAkC,EAAE,MAAM,YAAY;CACjE,MAAM,EAAE,WAAW,gBAAgB,EAAE,EAAE,0BAA0B;AAEjE,QACE,qBAAC;EAAO,OAAO,OAAO;aACnB,OAAO,oBAAC;GAAI,OAAO,OAAO;aAAgB;IAAW,GAAG,MAEzD,oBAAC;GAAI,OAAO,OAAO;aACjB,oBAAC;IACC,SAAQ;IACR,YAAW;IACX,YAAW;IACX,UAAS;cAER;KACU;IACT;GACC;;;;;AChCb,SAAgB,6BAAuC;AACrD,QAAO;EACL,WAAW;GACT,OAAO;GACP,WAAW;GAEX,SAAS;GACT,eAAe;GACf,YAAY;GACZ,cAAc;GAEd,WAAW;GACZ;EAED,eAAe;GACb,MAAM;GACN,UAAU;GAEV,SAAS;GACT,YAAY;GAEZ,SAAS,EACP,SAAS;IACP,YAAY;IACZ,UAAU;IACV,cAAc;IACf,EACF;GACF;EACF;;;;;ACfH,MAAaC,kBAAmC,EAAE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,MAAM,KAAK;KAAW,OAAO,MAAM,KAAK;MAAS;IAEtE,oBAAC;KACC,SAAS,MAAM;KACf,eAAe,MAAM,KAAK;KAC1B,eAAe,MAAM,KAAK;MAC1B;IAEF,oBAAC;KACC,SAAS,MAAM;KACf,aAAa,MAAM,KAAK;MACxB;;IACM;GACP;;;;;AClCT,SAAgB,0BAAoC;AAClD,QAAO;EACL,SAAS;GACP,QAAQ;GACR,WAAW;GAEX,OAAO;GAEP,SAAS;GACT,eAAe;GACf,YAAY;GAEZ,iBAAiB;GAEjB,cAAc;GACd,cAAc;GACf;EAED,sBAAsB;GACpB,OAAO;GACP,QAAQ;GAER,SAAS;GACT,eAAe;GACf,YAAY;GACb;EACF;;;;;ACZH,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
+ {"version":3,"file":"InfoSummary-DSOwr7Q1.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 type { StyleMap } from '@hooks/useThemedStyles/types'\n\nexport function createSummaryHeaderStyles(): StyleMap {\n return {\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 type { StyleMap } from '@hooks/useThemedStyles/types'\n\nexport function createSummaryCaptionStyles(): StyleMap {\n return {\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 type { StyleMap } from '@hooks/useThemedStyles/types'\n\nexport function createSummaryHighlightStyles(): StyleMap {\n return {\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 type { StyleMap } from '@hooks/useThemedStyles/types'\n\nexport function createSummaryItemStyles(props: SummaryItemProps): StyleMap {\n return {\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 type { StyleMap } from '@hooks/useThemedStyles/types'\n\nexport function createInfoSummaryStyles(): StyleMap {\n return {\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;EACL,WAAW;GACT,OAAO;GACP,WAAW;GAEX,SAAS;GACT,eAAe;GACf,YAAY;GAEZ,KAAK;GACN;EAED,eAAe;GACb,SAAS;GACT,YAAY;GACb;EAED,eAAe;GACb,MAAM;GACN,UAAU;GAEV,SAAS;GACT,YAAY;GAEZ,SAAS,EACP,SAAS;IACP,YAAY;IACZ,UAAU;IACV,cAAc;IACf,EACF;GACF;EACF;;;;;AClBH,MAAaA,iBAAkC,EAAE,MAAM,YAAY;CACjE,MAAM,EAAE,WAAW,gBAAgB,EAAE,EAAE,0BAA0B;AAEjE,QACE,qBAAC;EAAO,OAAO,OAAO;aACnB,OAAO,oBAAC;GAAI,OAAO,OAAO;aAAgB;IAAW,GAAG,MAEzD,oBAAC;GAAI,OAAO,OAAO;aACjB,oBAAC;IACC,SAAQ;IACR,YA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E,QAAO;EACL,WAAW;GACT,QAAQ;GACR,aAAa,MAAM,SAAS,SAAS;GACtC;EAED,SAAS;GACP,UAAU;GACV,QAAQ;GAER,SAAS;GACT,eAAe;GACf,gBAAgB;GAEhB,cAAc;GACd,eAAe;GAChB;EACF;;;;;ACLH,MAAaC,eAA0C,UAAS;CAE9D,MAAM,EAAE,WAAW,gBAAgB,OAAO,wBAAwB;AAElE,QACE,oBAAC;EAAG,OAAO,OAAO;YAChB,qBAAC;GAAQ,OAAO,OAAO;;IACrB,oBAAC;KAAc,MAAM,MAAM,KAAK;KAAW,OAAO,MAAM,KAAK;MAAS;IAEtE,oBAAC;KACC,SAAS,MAAM;KACf,eAAe,MAAM,KAAK;KAC1B,eAAe,MAAM,KAAK;MAC1B;IAEF,oBAAC;KACC,SAAS,MAAM;KACf,aAAa,MAAM,KAAK;MACxB;;IACM;GACP;;;;;AClCT,SAAgB,0BAAoC;AAClD,QAAO;EACL,SAAS;GACP,QAAQ;GACR,WAAW;GAEX,OAAO;GAEP,SAAS;GACT,eAAe;GACf,YAAY;GAEZ,iBAAiB;GAEjB,cAAc;GACd,cAAc;GACf;EAED,sBAAsB;GACpB,OAAO;GACP,QAAQ;GAER,SAAS;GACT,eAAe;GACf,YAAY;GACb;EACF;;;;;ACZH,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"}
@@ -0,0 +1,398 @@
1
+ import { t as Icon } from "./Icon-CzUEwDPp.js";
2
+ import { n as useThemedStyles, t as Typography } from "./Typography-CTfrQCqI.js";
3
+ import { useCallback, useId, useMemo, useRef, useState } from "react";
4
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
5
+
6
+ //#region src/components/commons/Label/style.ts
7
+ const LABEL_VARIANTS = {
8
+ b1: {
9
+ fontSize: "1rem",
10
+ lineHeight: "1.5rem"
11
+ },
12
+ b2: {
13
+ fontSize: "0.875rem",
14
+ lineHeight: "1.25rem"
15
+ },
16
+ b3: {
17
+ fontSize: "0.75rem",
18
+ lineHeight: "1rem"
19
+ }
20
+ };
21
+ function createLabelStyles(props) {
22
+ const { labelColor, labelWeight, labelVariant = "b2", requiredColor } = props;
23
+ return {
24
+ label: {
25
+ display: "inline-flex",
26
+ alignItems: "center",
27
+ gap: "0.25rem",
28
+ fontWeight: labelWeight,
29
+ ...LABEL_VARIANTS[labelVariant] ?? {},
30
+ ...labelColor ? { color: labelColor } : {}
31
+ },
32
+ required: {
33
+ color: requiredColor,
34
+ lineHeight: "inherit",
35
+ fontSize: "inherit",
36
+ fontWeight: "inherit"
37
+ }
38
+ };
39
+ }
40
+
41
+ //#endregion
42
+ //#region src/components/commons/Label/index.tsx
43
+ const Label = (props) => {
44
+ const { htmlFor, label, required, requiredColor, labelColor, labelWeight, labelVariant = "b2" } = props;
45
+ const { styles } = useThemedStyles(props, createLabelStyles, {
46
+ pick: (p) => [
47
+ p.labelColor,
48
+ p.labelWeight,
49
+ p.labelVariant,
50
+ p.requiredColor
51
+ ],
52
+ override: props.styles,
53
+ applyCommonProps: true
54
+ });
55
+ return /* @__PURE__ */ jsx("label", {
56
+ htmlFor,
57
+ style: styles.label,
58
+ children: /* @__PURE__ */ jsxs(Typography, {
59
+ variant: labelVariant,
60
+ styles: { text: {
61
+ minWidth: "fit-content",
62
+ color: labelColor,
63
+ fontWeight: labelWeight
64
+ } },
65
+ children: [label, required ? /* @__PURE__ */ jsx(Typography, {
66
+ as: "span",
67
+ variant: "b2",
68
+ styles: { text: {
69
+ color: requiredColor,
70
+ marginLeft: "0.125rem"
71
+ } },
72
+ children: "*"
73
+ }) : null]
74
+ })
75
+ });
76
+ };
77
+
78
+ //#endregion
79
+ //#region src/components/commons/inputs/Input/hooks/useInput/index.ts
80
+ const useInput = ({ value: controlledValue, defaultValue = "", onChange }) => {
81
+ const inputRef = useRef(null);
82
+ const [internalValue, setInternalValue] = useState(defaultValue);
83
+ const [showPassword, setShowPassword] = useState(false);
84
+ const isControlled = controlledValue !== void 0;
85
+ const currentValue = isControlled ? controlledValue : internalValue;
86
+ const handleChange = useCallback((e) => {
87
+ const value = e.target.value;
88
+ if (!isControlled) setInternalValue(value);
89
+ onChange?.(value);
90
+ }, [isControlled, onChange]);
91
+ const togglePasswordVisibility = useCallback(() => {
92
+ setShowPassword((prev) => !prev);
93
+ }, []);
94
+ return {
95
+ inputRef,
96
+ focusInput: useCallback(() => {
97
+ inputRef.current?.focus();
98
+ }, []),
99
+ isControlled,
100
+ currentValue,
101
+ showPassword,
102
+ handleChange,
103
+ togglePasswordVisibility
104
+ };
105
+ };
106
+
107
+ //#endregion
108
+ //#region src/components/commons/inputs/Input/styles.ts
109
+ const INPUT_STYLES = {
110
+ width: {
111
+ auto: { width: "auto" },
112
+ full: { width: "100%" },
113
+ md: { width: "12rem" },
114
+ lg: { width: "16rem" },
115
+ xl: { width: "20rem" },
116
+ "2xl": { width: "24rem" }
117
+ },
118
+ radius: {
119
+ none: { borderRadius: "0px" },
120
+ sm: { borderRadius: "0.125rem" },
121
+ md: { borderRadius: "0.375rem" },
122
+ lg: { borderRadius: "0.5rem" },
123
+ full: { borderRadius: "9999px" }
124
+ },
125
+ size: {
126
+ sm: {
127
+ wrapper: { minHeight: "2rem" },
128
+ input: {
129
+ padding: "0.5rem 0.75rem",
130
+ lineHeight: "1rem",
131
+ fontSize: "0.75rem"
132
+ },
133
+ label: {
134
+ fontSize: "0.75rem",
135
+ lineHeight: "1rem",
136
+ marginBottom: "0.25rem"
137
+ },
138
+ description: {
139
+ fontSize: "0.75rem",
140
+ lineHeight: "1rem",
141
+ marginTop: "0.25rem"
142
+ },
143
+ error: {
144
+ fontSize: "0.75rem",
145
+ lineHeight: "1rem",
146
+ marginTop: "0.25rem"
147
+ }
148
+ },
149
+ md: {
150
+ wrapper: { minHeight: "2.5rem" },
151
+ input: {
152
+ padding: "0.5rem 0.75rem",
153
+ lineHeight: "1.25rem",
154
+ fontSize: "0.875rem"
155
+ },
156
+ label: {
157
+ fontSize: "0.875rem",
158
+ lineHeight: "1.25rem",
159
+ marginBottom: "0.375rem"
160
+ },
161
+ description: {
162
+ fontSize: "0.75rem",
163
+ lineHeight: "1rem",
164
+ marginTop: "0.375rem"
165
+ },
166
+ error: {
167
+ fontSize: "0.75rem",
168
+ lineHeight: "1rem",
169
+ marginTop: "0.375rem"
170
+ }
171
+ },
172
+ lg: {
173
+ wrapper: { minHeight: "3rem" },
174
+ input: {
175
+ padding: "0.75rem 1rem",
176
+ lineHeight: "1.5rem",
177
+ fontSize: "1rem",
178
+ width: "16rem"
179
+ },
180
+ label: {
181
+ fontSize: "0.875rem",
182
+ lineHeight: "1.25rem",
183
+ marginBottom: "0.5rem"
184
+ },
185
+ description: {
186
+ fontSize: "0.875rem",
187
+ lineHeight: "1.25rem",
188
+ marginTop: "0.5rem"
189
+ },
190
+ error: {
191
+ fontSize: "0.875rem",
192
+ lineHeight: "1.25rem",
193
+ marginTop: "0.5rem"
194
+ }
195
+ }
196
+ },
197
+ variant: { bordered: {
198
+ wrapper: { border: "1px solid var(--px-border-primary)" },
199
+ input: {
200
+ backgroundColor: "transparent",
201
+ color: "var(--px-text-primary)",
202
+ "::placeholder": { color: "var(--px-text-secondary)" }
203
+ },
204
+ label: { color: "var(--px-text-primary)" },
205
+ button: {
206
+ color: "var(--px-text-secondary)",
207
+ ":hover": { color: "var(--px-text-primary)" }
208
+ }
209
+ } },
210
+ state: {
211
+ default: {
212
+ input: {},
213
+ ring: { boxShadow: "0 0 0 2px var(--px-color-info)" }
214
+ },
215
+ invalid: {
216
+ wrapper: {
217
+ borderColor: "var(--px-color-invalid)",
218
+ __rules: { "&:focus-within": { boxShadow: "0 0 0 1px var(--px-background), 0 0 0 3px var(--px-color-invalid)" } }
219
+ },
220
+ input: { color: "var(--px-color-invalid)" },
221
+ error: { color: "var(--px-color-invalid)" }
222
+ },
223
+ disabled: {
224
+ wrapper: {
225
+ opacity: .6,
226
+ cursor: "not-allowed",
227
+ backgroundColor: "#f9fafb"
228
+ },
229
+ input: { cursor: "not-allowed" },
230
+ label: { cursor: "not-allowed" }
231
+ }
232
+ }
233
+ };
234
+ function createInputStyles(props) {
235
+ const { size = "md", variant = "bordered", radius = "md", isDisabled = false, isInvalid = false, focusedRingColor } = props;
236
+ const focusRingColor = focusedRingColor || "var(--px-color-info)";
237
+ return {
238
+ wrapper: {
239
+ position: "relative",
240
+ display: "flex",
241
+ alignItems: "center",
242
+ ...INPUT_STYLES.size[size]?.wrapper ?? {},
243
+ ...INPUT_STYLES.variant[variant]?.wrapper ?? {},
244
+ ...INPUT_STYLES.radius[radius] ?? {},
245
+ __rules: { "&:focus-within": { boxShadow: `0 0 0 1px var(--px-background), 0 0 0 3px ${focusRingColor}` } },
246
+ ...isDisabled ? INPUT_STYLES.state.disabled.wrapper : {},
247
+ ...isInvalid ? INPUT_STYLES.state.invalid.wrapper : {}
248
+ },
249
+ input: {
250
+ flex: 1,
251
+ backgroundColor: "transparent",
252
+ outline: "none",
253
+ width: "100%",
254
+ ...INPUT_STYLES.size[size]?.input ?? {},
255
+ ...INPUT_STYLES.variant[variant]?.input ?? {},
256
+ ...INPUT_STYLES.state.default.input ?? {},
257
+ ...isDisabled ? INPUT_STYLES.state.disabled.input : {},
258
+ ...isInvalid ? INPUT_STYLES.state.invalid.input : {}
259
+ },
260
+ label: {
261
+ ...INPUT_STYLES.size[size]?.label ?? {},
262
+ ...INPUT_STYLES.variant[variant]?.label ?? {},
263
+ ...isDisabled ? INPUT_STYLES.state.disabled.label : {}
264
+ },
265
+ error: {
266
+ display: "block",
267
+ ...INPUT_STYLES.size[size]?.error ?? {},
268
+ ...INPUT_STYLES.state.invalid.error ?? {}
269
+ },
270
+ button: {
271
+ display: "flex",
272
+ alignItems: "center",
273
+ justifyContent: "center",
274
+ padding: "0.25rem",
275
+ cursor: "pointer",
276
+ ...INPUT_STYLES.variant[variant]?.button ?? {},
277
+ ...INPUT_STYLES.radius[radius] ?? {},
278
+ ...isDisabled ? {
279
+ cursor: "not-allowed",
280
+ opacity: .5
281
+ } : {}
282
+ },
283
+ startContent: {
284
+ display: "flex",
285
+ alignItems: "center",
286
+ padding: "0.25rem"
287
+ }
288
+ };
289
+ }
290
+
291
+ //#endregion
292
+ //#region src/components/commons/inputs/Input/index.tsx
293
+ const Input = (props) => {
294
+ const { id, type, label, width, fullWidth, required, isDisabled, minLength, maxLength, placeholder, requiredColor, labelColor, labelWeight, labelVariant, startContent, endContent, errorMessage, onChange, value, defaultValue, size, radius, variant, isInvalid, ...nativeInputProps } = props;
295
+ const { inputRef, currentValue, showPassword, handleChange, togglePasswordVisibility } = useInput({
296
+ size,
297
+ value,
298
+ radius,
299
+ variant,
300
+ isInvalid,
301
+ fullWidth,
302
+ isDisabled,
303
+ defaultValue,
304
+ onChange
305
+ });
306
+ const reactId = useId();
307
+ const inputId = useMemo(() => {
308
+ return id || `input-${reactId}`;
309
+ }, [id, reactId]);
310
+ const containerWidth = getWidth();
311
+ const { styles, classes } = useThemedStyles(props, createInputStyles, {
312
+ pick: (p) => [
313
+ p.size,
314
+ p.variant,
315
+ p.radius,
316
+ p.isDisabled,
317
+ p.isInvalid,
318
+ p.focusedRingColor
319
+ ],
320
+ override: props.styles,
321
+ applyCommonProps: true
322
+ });
323
+ function getType() {
324
+ if (type === "password" && showPassword) return "text";
325
+ return type;
326
+ }
327
+ function getWidth() {
328
+ if (fullWidth) return { width: "100%" };
329
+ if (width) return INPUT_STYLES.width[width] || { width: "auto" };
330
+ return { width: "auto" };
331
+ }
332
+ function renderLabel() {
333
+ if (!label) return null;
334
+ return /* @__PURE__ */ jsx("div", {
335
+ className: "flex items-center gap-3",
336
+ children: /* @__PURE__ */ jsx(Label, {
337
+ htmlFor: inputId,
338
+ label,
339
+ required,
340
+ styles: { label: styles.label },
341
+ requiredColor,
342
+ labelColor,
343
+ labelWeight,
344
+ labelVariant
345
+ })
346
+ });
347
+ }
348
+ function renderEndContent() {
349
+ return /* @__PURE__ */ jsx(Fragment, { children: type === "password" ? /* @__PURE__ */ jsx("button", {
350
+ type: "button",
351
+ style: styles.button,
352
+ onClick: togglePasswordVisibility,
353
+ children: showPassword ? /* @__PURE__ */ jsx(Icon, { name: "general-eye-off" }) : /* @__PURE__ */ jsx(Icon, { name: "general-eye" })
354
+ }) : endContent });
355
+ }
356
+ return /* @__PURE__ */ jsxs("div", {
357
+ style: containerWidth,
358
+ children: [
359
+ renderLabel(),
360
+ /* @__PURE__ */ jsxs("div", {
361
+ style: styles.wrapper,
362
+ className: classes.wrapper,
363
+ children: [
364
+ startContent && /* @__PURE__ */ jsx("div", {
365
+ style: styles.startContent,
366
+ children: startContent
367
+ }),
368
+ /* @__PURE__ */ jsx("div", {
369
+ style: { flex: 1 },
370
+ children: /* @__PURE__ */ jsx("input", {
371
+ ref: inputRef,
372
+ id: inputId,
373
+ type: getType(),
374
+ value: currentValue,
375
+ style: styles.input,
376
+ className: classes.input,
377
+ disabled: isDisabled,
378
+ minLength,
379
+ maxLength,
380
+ placeholder: placeholder ?? "Digite aqui...",
381
+ onChange: handleChange,
382
+ ...nativeInputProps
383
+ })
384
+ }),
385
+ renderEndContent() && /* @__PURE__ */ jsx("div", { children: renderEndContent() })
386
+ ]
387
+ }),
388
+ errorMessage ? /* @__PURE__ */ jsx("div", {
389
+ style: styles.error,
390
+ children: errorMessage
391
+ }) : null
392
+ ]
393
+ });
394
+ };
395
+
396
+ //#endregion
397
+ export { Input as t };
398
+ //# sourceMappingURL=Input-CTx0xk1z.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Input-CTx0xk1z.js","names":["LABEL_VARIANTS: Record<string, CSSProperties>"],"sources":["../src/components/commons/Label/style.ts","../src/components/commons/Label/index.tsx","../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 type { CSSProperties } from 'react'\n\n// Types\nimport type { LabelProps } from './types'\nimport { 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 {\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","// 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 { StyleMap } from '@hooks/useThemedStyles/types'\nimport { 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: { color: 'var(--px-text-secondary)', ':hover': { color: 'var(--px-text-primary)' } },\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: '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 {\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 { 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 = (props: InputProps) => {\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 })\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":";;;;;;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;EACL,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;;;;;AC/BH,MAAa,SAAS,UAAsB;CAC1C,MAAM,EACJ,SACA,OACA,UACA,eACA,YACA,aACA,eAAe,SACb;CAEJ,MAAM,EAAE,WAAW,gBAAg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AAEnB,SACE,oBAAC;GAAI,WAAU;aACb,oBAAC;IACC,SAAS;IACF;IACG;IACV,QAAQ,EAAE,OAAO,OAAO,OAAO;IAChB;IACH;IACC;IACC;KACd;IACE;;CAIV,SAAS,mBAAmB;AAC1B,SACE,0CACG,SAAS,aACR,oBAAC;GACC,MAAK;GACL,OAAO,OAAO;GACd,SAAS;aAER,eACC,oBAAC,QAAK,MAAM,oBAAqB,GAEjC,oBAAC,QAAK,MAAM,gBAAiB;IAExB,GAET,aAED;;AAIP,QACE,qBAAC;EAAI,OAAO;;GACT,aAAa;GACd,qBAAC;IAAI,OAAO,OAAO;IAAS,WAAW,QAAQ;;KAC5C,gBAAgB,oBAAC;MAAI,OAAO,OAAO;gBAAe;OAAmB;KACtE,oBAAC;MAAI,OAAO,EAAE,MAAM,GAAG;gBACrB,oBAAC;OACC,KAAK;OACL,IAAI;OACJ,MAAM,SAAS;OACf,OAAO;OACP,OAAO,OAAO;OACd,WAAW,QAAQ;OACnB,UAAU;OACC;OACA;OACX,aAAa,eAAe;OAC5B,UAAU;OACV,GAAI;QACJ;OACE;KACL,kBAAkB,IAAI,oBAAC,mBAAK,kBAAkB,GAAO;;KAClD;GAEL,eAAe,oBAAC;IAAI,OAAO,OAAO;cAAQ;KAAmB,GAAG;;GAC7D"}
@@ -1,6 +1,6 @@
1
- import { n as useThemedStyles, t as Typography } from "./Typography-DRln739F.js";
2
- import { motion } from "framer-motion";
1
+ import { n as useThemedStyles, t as Typography } from "./Typography-CTfrQCqI.js";
3
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
+ import { motion } from "framer-motion";
4
4
 
5
5
  //#region src/components/toolkit/TabSwitch/components/TabSwitchItem/styles.ts
6
6
  function createTabSwitchItemStyles({ variant, disabled, selected, selectedColor }) {
@@ -123,4 +123,4 @@ const TabSwitch = (props) => {
123
123
 
124
124
  //#endregion
125
125
  export { TabSwitch as t };
126
- //# sourceMappingURL=TabSwitch-COP-ySAl.js.map
126
+ //# sourceMappingURL=TabSwitch-Bewsxeqz.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TabSwitch-COP-ySAl.js","names":[],"sources":["../src/components/toolkit/TabSwitch/components/TabSwitchItem/styles.ts","../src/components/toolkit/TabSwitch/components/TabSwitchItem/index.tsx","../src/components/toolkit/TabSwitch/styles.ts","../src/components/toolkit/TabSwitch/index.tsx"],"sourcesContent":["// External Libraries\nimport type { StyleMap } from '@hooks/useThemedStyles/types'\n\ninterface Params {\n disabled?: boolean\n selected?: boolean\n selectedColor?: string\n variant: 'default' | 'underline'\n}\n\nexport function createTabSwitchItemStyles({\n variant,\n disabled,\n selected,\n selectedColor\n}: Params): StyleMap {\n const accent = selectedColor ?? 'var(--px-color-primary)'\n\n return {\n item: {\n minHeight: '1.25rem',\n position: 'relative',\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n gap: 4,\n background: 'transparent',\n border: 0,\n padding: '8px 10px',\n cursor: disabled ? 'not-allowed' : 'pointer',\n opacity: disabled ? 0.5 : 1,\n userSelect: 'none',\n whiteSpace: 'nowrap',\n __rules: { '& > p': { zIndex: 1 } }\n },\n\n selectedBg:\n variant === 'default'\n ? {\n position: 'absolute',\n inset: 0,\n borderRadius: 6,\n border: '1px solid var(--px-border-primary)',\n background: selected ? accent : 'transparent'\n }\n : {\n position: 'absolute',\n left: 0,\n right: 0,\n bottom: -2,\n height: 2,\n background: selected ? accent : 'transparent'\n }\n }\n}\n","// External Libraries\nimport { motion } from 'framer-motion'\n\n// Components\nimport { Typography } from '@components/toolkit/Typography'\n\n// Hooks\nimport { useThemedStyles } from '@hooks/useThemedStyles'\n\n// Types\nimport type { SwitchOption } from '../../types'\n\n// Styles\nimport { createTabSwitchItemStyles } from './styles'\n\ntype Props<T> = {\n option: SwitchOption<T>\n selected: boolean\n layoutId?: string\n disabled?: boolean\n selectedColor?: string\n selectedLabelColor?: string\n variant: 'default' | 'underline'\n onClick: (value: T) => void\n}\n\nexport const SwitchItem = <T,>(props: Props<T>) => {\n const { option, disabled, selected, layoutId, onClick } = props\n\n const { styles, classes } = useThemedStyles(\n props,\n createTabSwitchItemStyles,\n {\n pick: p => [p.variant, p.selectedColor, p.selectedLabelColor, p.selected]\n }\n )\n\n const isDisabled = disabled || option.disabled\n\n return (\n <button\n type=\"button\"\n style={styles.item}\n className={classes.item}\n tabIndex={isDisabled ? -1 : 0}\n onClick={() => !isDisabled && onClick(option.value)}\n >\n {selected ? (\n <motion.div\n layoutId={layoutId || 'pixel-tabswitch-selected'}\n style={styles.selectedBg}\n />\n ) : null}\n\n {option.icon ? (\n <span style={{ display: 'inline-flex' }}>{option.icon}</span>\n ) : null}\n\n <Typography variant=\"b1\" fontWeight=\"bold\">\n {option.label}\n </Typography>\n </button>\n )\n}\n","// Types\nimport type { TabSwitchProps } from './types'\nimport type { StyleMap } from '@hooks/useThemedStyles/types'\n\nexport function createTabSwitchStyles<T>(props: TabSwitchProps<T>): StyleMap {\n const { fitContent } = props\n\n return {\n container: {\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n color: 'var(--px-text-primary, #4b5563)',\n width: fitContent ? 'fit-content' : '100%',\n borderBottom: '1px solid var(--px-border-primaryder, #e5e7eb)',\n gap: 0,\n __rules: { '& svg': { zIndex: 1 } }\n }\n }\n}\n","// Hooks\nimport { useThemedStyles } from '@hooks/useThemedStyles'\n\n// Components\nimport { SwitchItem } from './components/TabSwitchItem'\n\n// Types\nimport type { TabSwitchProps } from './types'\n\n// Styles\nimport { createTabSwitchStyles } from './styles'\n\nexport * from './types'\n\nexport const TabSwitch = <T,>(props: TabSwitchProps<T>) => {\n {\n const {\n options,\n disabled,\n layoutId,\n currentValue,\n variant = 'default',\n onChange\n } = props\n\n const { styles, classes } = useThemedStyles(props, createTabSwitchStyles, {\n pick: p => [p.fitContent, p.selectedLabelColor, p.variant],\n override: props.styles,\n applyCommonProps: true\n })\n\n return (\n <div style={styles.container} className={classes.container}>\n {options.map(opt => (\n <SwitchItem\n key={String(opt.value)}\n option={opt}\n variant={variant}\n layoutId={layoutId}\n disabled={disabled}\n selectedColor={props.selectedColor}\n selected={currentValue === opt.value}\n selectedLabelColor={props.selectedLabelColor}\n onClick={onChange}\n />\n ))}\n </div>\n )\n }\n}\n"],"mappings":";;;;;AAUA,SAAgB,0BAA0B,EACxC,SACA,UACA,UACA,iBACmB;CACnB,MAAM,SAAS,iBAAiB;AAEhC,QAAO;EACL,MAAM;GACJ,WAAW;GACX,UAAU;GACV,SAAS;GACT,YAAY;GACZ,gBAAgB;GAChB,KAAK;GACL,YAAY;GACZ,QAAQ;GACR,SAAS;GACT,QAAQ,WAAW,gBAAgB;GACnC,SAAS,WAAW,KAAM;GAC1B,YAAY;GACZ,YAAY;GACZ,SAAS,EAAE,SAAS,EAAE,QAAQ,GAAG,EAAE;GACpC;EAED,YACE,YAAY,YACR;GACE,UAAU;GACV,OAAO;GACP,cAAc;GACd,QAAQ;GACR,YAAY,WAAW,SAAS;GACjC,GACD;GACE,UAAU;GACV,MAAM;GACN,OAAO;GACP,QAAQ;GACR,QAAQ;GACR,YAAY,WAAW,SAAS;GACjC;EACR;;;;;AC3BH,MAAa,cAAkB,UAAoB;CACjD,MAAM,EAAE,QAAQ,UAAU,UAAU,UAAU,YAAY;CAE1D,MAAM,EAAE,QAAQ,YAAY,gBAC1B,OACA,2BACA,EACE,OAAM,MAAK;EAAC,EAAE;EAAS,EAAE;EAAe,EAAE;EAAoB,EAAE;EAAS,EAC1E,CACF;CAED,MAAM,aAAa,YAAY,OAAO;AAEtC,QACE,qBAAC;EACC,MAAK;EACL,OAAO,OAAO;EACd,WAAW,QAAQ;EACnB,UAAU,aAAa,KAAK;EAC5B,eAAe,CAAC,cAAc,QAAQ,OAAO,MAAM;;GAElD,WACC,oBAAC,OAAO;IACN,UAAU,YAAY;IACtB,OAAO,OAAO;KACd,GACA;GAEH,OAAO,OACN,oBAAC;IAAK,OAAO,EAAE,SAAS,eAAe;cAAG,OAAO;KAAY,GAC3D;GAEJ,oBAAC;IAAW,SAAQ;IAAK,YAAW;cACjC,OAAO;KACG;;GACN;;;;;ACzDb,SAAgB,sBAAyB,OAAoC;CAC3E,MAAM,EAAE,eAAe;AAEvB,QAAO,EACL,WAAW;EACT,SAAS;EACT,eAAe;EACf,YAAY;EACZ,OAAO;EACP,OAAO,aAAa,gBAAgB;EACpC,cAAc;EACd,KAAK;EACL,SAAS,EAAE,SAAS,EAAE,QAAQ,GAAG,EAAE;EACpC,EACF;;;;;ACJH,MAAa,aAAiB,UAA6B;CACzD;EACE,MAAM,EACJ,SACA,UACA,UACA,cACA,UAAU,WACV,aACE;EAEJ,MAAM,EAAE,QAAQ,YAAY,gBAAgB,OAAO,uBAAuB;GACxE,OAAM,MAAK;IAAC,EAAE;IAAY,EAAE;IAAoB,EAAE;IAAQ;GAC1D,UAAU,MAAM;GAChB,kBAAkB;GACnB,CAAC;AAEF,SACE,oBAAC;GAAI,OAAO,OAAO;GAAW,WAAW,QAAQ;aAC9C,QAAQ,KAAI,QACX,oBAAC;IAEC,QAAQ;IACC;IACC;IACA;IACV,eAAe,MAAM;IACrB,UAAU,iBAAiB,IAAI;IAC/B,oBAAoB,MAAM;IAC1B,SAAS;MARJ,OAAO,IAAI,MAAM,CAStB,CACF;IACE"}
1
+ {"version":3,"file":"TabSwitch-Bewsxeqz.js","names":[],"sources":["../src/components/toolkit/TabSwitch/components/TabSwitchItem/styles.ts","../src/components/toolkit/TabSwitch/components/TabSwitchItem/index.tsx","../src/components/toolkit/TabSwitch/styles.ts","../src/components/toolkit/TabSwitch/index.tsx"],"sourcesContent":["// External Libraries\nimport type { StyleMap } from '@hooks/useThemedStyles/types'\n\ninterface Params {\n disabled?: boolean\n selected?: boolean\n selectedColor?: string\n variant: 'default' | 'underline'\n}\n\nexport function createTabSwitchItemStyles({\n variant,\n disabled,\n selected,\n selectedColor\n}: Params): StyleMap {\n const accent = selectedColor ?? 'var(--px-color-primary)'\n\n return {\n item: {\n minHeight: '1.25rem',\n position: 'relative',\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n gap: 4,\n background: 'transparent',\n border: 0,\n padding: '8px 10px',\n cursor: disabled ? 'not-allowed' : 'pointer',\n opacity: disabled ? 0.5 : 1,\n userSelect: 'none',\n whiteSpace: 'nowrap',\n __rules: { '& > p': { zIndex: 1 } }\n },\n\n selectedBg:\n variant === 'default'\n ? {\n position: 'absolute',\n inset: 0,\n borderRadius: 6,\n border: '1px solid var(--px-border-primary)',\n background: selected ? accent : 'transparent'\n }\n : {\n position: 'absolute',\n left: 0,\n right: 0,\n bottom: -2,\n height: 2,\n background: selected ? accent : 'transparent'\n }\n }\n}\n","// External Libraries\nimport { motion } from 'framer-motion'\n\n// Components\nimport { Typography } from '@components/toolkit/Typography'\n\n// Hooks\nimport { useThemedStyles } from '@hooks/useThemedStyles'\n\n// Types\nimport type { SwitchOption } from '../../types'\n\n// Styles\nimport { createTabSwitchItemStyles } from './styles'\n\ntype Props<T> = {\n option: SwitchOption<T>\n selected: boolean\n layoutId?: string\n disabled?: boolean\n selectedColor?: string\n selectedLabelColor?: string\n variant: 'default' | 'underline'\n onClick: (value: T) => void\n}\n\nexport const SwitchItem = <T,>(props: Props<T>) => {\n const { option, disabled, selected, layoutId, onClick } = props\n\n const { styles, classes } = useThemedStyles(\n props,\n createTabSwitchItemStyles,\n {\n pick: p => [p.variant, p.selectedColor, p.selectedLabelColor, p.selected]\n }\n )\n\n const isDisabled = disabled || option.disabled\n\n return (\n <button\n type=\"button\"\n style={styles.item}\n className={classes.item}\n tabIndex={isDisabled ? -1 : 0}\n onClick={() => !isDisabled && onClick(option.value)}\n >\n {selected ? (\n <motion.div\n layoutId={layoutId || 'pixel-tabswitch-selected'}\n style={styles.selectedBg}\n />\n ) : null}\n\n {option.icon ? (\n <span style={{ display: 'inline-flex' }}>{option.icon}</span>\n ) : null}\n\n <Typography variant=\"b1\" fontWeight=\"bold\">\n {option.label}\n </Typography>\n </button>\n )\n}\n","// Types\nimport type { TabSwitchProps } from './types'\nimport type { StyleMap } from '@hooks/useThemedStyles/types'\n\nexport function createTabSwitchStyles<T>(props: TabSwitchProps<T>): StyleMap {\n const { fitContent } = props\n\n return {\n container: {\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n color: 'var(--px-text-primary, #4b5563)',\n width: fitContent ? 'fit-content' : '100%',\n borderBottom: '1px solid var(--px-border-primaryder, #e5e7eb)',\n gap: 0,\n __rules: { '& svg': { zIndex: 1 } }\n }\n }\n}\n","// Hooks\nimport { useThemedStyles } from '@hooks/useThemedStyles'\n\n// Components\nimport { SwitchItem } from './components/TabSwitchItem'\n\n// Types\nimport type { TabSwitchProps } from './types'\n\n// Styles\nimport { createTabSwitchStyles } from './styles'\n\nexport * from './types'\n\nexport const TabSwitch = <T,>(props: TabSwitchProps<T>) => {\n {\n const {\n options,\n disabled,\n layoutId,\n currentValue,\n variant = 'default',\n onChange\n } = props\n\n const { styles, classes } = useThemedStyles(props, createTabSwitchStyles, {\n pick: p => [p.fitContent, p.selectedLabelColor, p.variant],\n override: props.styles,\n applyCommonProps: true\n })\n\n return (\n <div style={styles.container} className={classes.container}>\n {options.map(opt => (\n <SwitchItem\n key={String(opt.value)}\n option={opt}\n variant={variant}\n layoutId={layoutId}\n disabled={disabled}\n selectedColor={props.selectedColor}\n selected={currentValue === opt.value}\n selectedLabelColor={props.selectedLabelColor}\n onClick={onChange}\n />\n ))}\n </div>\n )\n }\n}\n"],"mappings":";;;;;AAUA,SAAgB,0BAA0B,EACxC,SACA,UACA,UACA,iBACmB;CACnB,MAAM,SAAS,iBAAiB;AAEhC,QAAO;EACL,MAAM;GACJ,WAAW;GACX,UAAU;GACV,SAAS;GACT,YAAY;GACZ,gBAAgB;GAChB,KAAK;GACL,YAAY;GACZ,QAAQ;GACR,SAAS;GACT,QAAQ,WAAW,gBAAgB;GACnC,SAAS,WAAW,KAAM;GAC1B,YAAY;GACZ,YAAY;GACZ,SAAS,EAAE,SAAS,EAAE,QAAQ,GAAG,EAAE;GACpC;EAED,YACE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M;GAChB,kBAAkB;GACnB,CAAC;AAEF,SACE,oBAAC;GAAI,OAAO,OAAO;GAAW,WAAW,QAAQ;aAC9C,QAAQ,KAAI,QACX,oBAAC;IAEC,QAAQ;IACC;IACC;IACA;IACV,eAAe,MAAM;IACrB,UAAU,iBAAiB,IAAI;IAC/B,oBAAoB,MAAM;IAC1B,SAAS;MARJ,OAAO,IAAI,MAAM,CAStB,CACF;IACE"}
@@ -80,6 +80,7 @@ const defaultThemes = {
80
80
  success: "#0EB24C",
81
81
  warning: "#f59e0b",
82
82
  error: "#ef4444",
83
+ invalid: "#f87171",
83
84
  info: "#06b6d4",
84
85
  background: {
85
86
  primary: "#FFFFFF",
@@ -89,16 +90,15 @@ const defaultThemes = {
89
90
  }
90
91
  },
91
92
  button: {
92
- primary: {
93
+ filled: {
93
94
  label: "#FFFFFF",
94
- background: "#003566",
95
- disabled_background: "#FFFFFF"
95
+ background: "#0EB24C"
96
96
  },
97
- secondary: {
98
- label: "#FFFFFF",
99
- background: "#5A595B",
100
- disabled_background: "#FFFFFF"
101
- }
97
+ outlined: {
98
+ label: "#0EB24C",
99
+ borderColor: "#0EB24C"
100
+ },
101
+ ghost: { label: "#6C6C6C" }
102
102
  },
103
103
  surface: "#FBFBFB",
104
104
  border: {
@@ -128,6 +128,7 @@ const defaultThemes = {
128
128
  success: "#0EB24C",
129
129
  warning: "#f59e0b",
130
130
  error: "#ef4444",
131
+ invalid: "#f87171",
131
132
  info: "#06b6d4",
132
133
  background: {
133
134
  primary: "#090909",
@@ -137,16 +138,15 @@ const defaultThemes = {
137
138
  }
138
139
  },
139
140
  button: {
140
- primary: {
141
+ filled: {
141
142
  label: "#FFFFFF",
142
- background: "#003566",
143
- disabled_background: "#FFFFFF"
143
+ background: "#0EB24C"
144
144
  },
145
- secondary: {
146
- label: "#FFFFFF",
147
- background: "#5A595B",
148
- disabled_background: "#FFFFFF"
149
- }
145
+ outlined: {
146
+ label: "#0EB24C",
147
+ borderColor: "#0EB24C"
148
+ },
149
+ ghost: { label: "#6C6C6C" }
150
150
  },
151
151
  surface: "#090909",
152
152
  border: {
@@ -359,16 +359,24 @@ function themeToCssVars(theme) {
359
359
  "--px-color-success": theme.colors.success,
360
360
  "--px-color-warning": theme.colors.warning,
361
361
  "--px-color-error": theme.colors.error,
362
+ "--px-color-invalid": theme.colors.invalid,
362
363
  "--px-color-info": theme.colors.info,
364
+ "--px-scrollbar": theme.colors.scrollbar,
363
365
  "--px-bg": theme.colors.background.primary,
364
366
  "--px-surface": theme.colors.surface,
365
367
  "--px-background-card-primary": theme.colors.background.card.primary,
368
+ "--px-background-card-secondary": theme.colors.background.card.secondary,
366
369
  "--px-border-primary": theme.colors.border.primary,
367
370
  "--px-border-secondary": theme.colors.border.secondary,
368
371
  "--px-text-primary": theme.colors.text.primary,
369
372
  "--px-text-secondary": theme.colors.text.secondary,
370
373
  "--px-text-disabled": theme.colors.text.disabled,
371
374
  "--px-text-inverse": theme.colors.text.inverse,
375
+ "--px-btn-filled-bg": theme.colors.button.filled.background,
376
+ "--px-btn-filled-label": theme.colors.button.filled.label,
377
+ "--px-btn-outlined-border": theme.colors.button.outlined.borderColor,
378
+ "--px-btn-outlined-label": theme.colors.button.outlined.label,
379
+ "--px-btn-ghost-label": theme.colors.button.ghost.label,
372
380
  "--px-space-xs": theme.spacing.xs,
373
381
  "--px-space-sm": theme.spacing.sm,
374
382
  "--px-space-md": theme.spacing.md,
@@ -548,4 +556,4 @@ function useTheme() {
548
556
 
549
557
  //#endregion
550
558
  export { useTheme as n, ThemeProvider as t };
551
- //# sourceMappingURL=ThemeContext-DiTV3IJz.js.map
559
+ //# sourceMappingURL=ThemeContext-BAcoPRJ-.js.map