@traefik-labs/faency 13.1.0 → 13.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (123) hide show
  1. package/dist/components/Badge/Badge.cjs +1 -5
  2. package/dist/components/Badge/Badge.cjs.map +1 -1
  3. package/dist/components/Badge/Badge.js +2 -6
  4. package/dist/components/Badge/Badge.js.map +1 -1
  5. package/dist/components/Button/Button.cjs +1 -2
  6. package/dist/components/Button/Button.cjs.map +1 -1
  7. package/dist/components/Button/Button.js +2 -3
  8. package/dist/components/Button/Button.js.map +1 -1
  9. package/dist/components/Checkbox/Checkbox.cjs +15 -2
  10. package/dist/components/Checkbox/Checkbox.cjs.map +1 -1
  11. package/dist/components/Checkbox/Checkbox.js +15 -2
  12. package/dist/components/Checkbox/Checkbox.js.map +1 -1
  13. package/dist/components/Checkbox/Checkbox.themes.cjs +4 -2
  14. package/dist/components/Checkbox/Checkbox.themes.cjs.map +1 -1
  15. package/dist/components/Checkbox/Checkbox.themes.js +4 -2
  16. package/dist/components/Checkbox/Checkbox.themes.js.map +1 -1
  17. package/dist/components/CodeBlock/CodeBlock.cjs +2 -1
  18. package/dist/components/CodeBlock/CodeBlock.cjs.map +1 -1
  19. package/dist/components/CodeBlock/CodeBlock.js +3 -2
  20. package/dist/components/CodeBlock/CodeBlock.js.map +1 -1
  21. package/dist/components/CodeBlock/CodeBlock.vanilla.cjs +2 -1
  22. package/dist/components/CodeBlock/CodeBlock.vanilla.cjs.map +1 -1
  23. package/dist/components/CodeBlock/CodeBlock.vanilla.js +3 -2
  24. package/dist/components/CodeBlock/CodeBlock.vanilla.js.map +1 -1
  25. package/dist/components/DateTimePickerInput/DateTimePickerInput.cjs +1 -1
  26. package/dist/components/DateTimePickerInput/DateTimePickerInput.cjs.map +1 -1
  27. package/dist/components/DateTimePickerInput/DateTimePickerInput.js +1 -1
  28. package/dist/components/DateTimePickerInput/DateTimePickerInput.js.map +1 -1
  29. package/dist/components/Field/Field.cjs +91 -0
  30. package/dist/components/Field/Field.cjs.map +1 -0
  31. package/dist/components/Field/Field.js +89 -0
  32. package/dist/components/Field/Field.js.map +1 -0
  33. package/dist/components/Field/Field.vanilla.cjs +95 -0
  34. package/dist/components/Field/Field.vanilla.cjs.map +1 -0
  35. package/dist/components/Field/Field.vanilla.css.cjs +6 -0
  36. package/dist/components/Field/Field.vanilla.css.cjs.map +1 -0
  37. package/dist/components/Field/Field.vanilla.css.js +6 -0
  38. package/dist/components/Field/Field.vanilla.css.js.map +1 -0
  39. package/dist/components/Field/Field.vanilla.js +93 -0
  40. package/dist/components/Field/Field.vanilla.js.map +1 -0
  41. package/dist/components/Field/FieldContext.cjs +136 -0
  42. package/dist/components/Field/FieldContext.cjs.map +1 -0
  43. package/dist/components/Field/FieldContext.js +130 -0
  44. package/dist/components/Field/FieldContext.js.map +1 -0
  45. package/dist/components/Input/Input.cjs +31 -6
  46. package/dist/components/Input/Input.cjs.map +1 -1
  47. package/dist/components/Input/Input.js +31 -6
  48. package/dist/components/Input/Input.js.map +1 -1
  49. package/dist/components/Input/Input.vanilla.cjs +17 -4
  50. package/dist/components/Input/Input.vanilla.cjs.map +1 -1
  51. package/dist/components/Input/Input.vanilla.css.cjs.map +1 -1
  52. package/dist/components/Input/Input.vanilla.css.js.map +1 -1
  53. package/dist/components/Input/Input.vanilla.js +17 -4
  54. package/dist/components/Input/Input.vanilla.js.map +1 -1
  55. package/dist/components/Radio/Radio.cjs +21 -1
  56. package/dist/components/Radio/Radio.cjs.map +1 -1
  57. package/dist/components/Radio/Radio.js +21 -1
  58. package/dist/components/Radio/Radio.js.map +1 -1
  59. package/dist/components/Radio/Radio.themes.cjs +4 -2
  60. package/dist/components/Radio/Radio.themes.cjs.map +1 -1
  61. package/dist/components/Radio/Radio.themes.js +4 -2
  62. package/dist/components/Radio/Radio.themes.js.map +1 -1
  63. package/dist/components/Select/Select.cjs +33 -4
  64. package/dist/components/Select/Select.cjs.map +1 -1
  65. package/dist/components/Select/Select.js +33 -4
  66. package/dist/components/Select/Select.js.map +1 -1
  67. package/dist/components/Switch/Switch.cjs +19 -5
  68. package/dist/components/Switch/Switch.cjs.map +1 -1
  69. package/dist/components/Switch/Switch.js +19 -5
  70. package/dist/components/Switch/Switch.js.map +1 -1
  71. package/dist/components/Switch/Switch.themes.cjs +4 -2
  72. package/dist/components/Switch/Switch.themes.cjs.map +1 -1
  73. package/dist/components/Switch/Switch.themes.js +4 -2
  74. package/dist/components/Switch/Switch.themes.js.map +1 -1
  75. package/dist/components/Text/Text.themes.cjs +2 -2
  76. package/dist/components/Text/Text.themes.cjs.map +1 -1
  77. package/dist/components/Text/Text.themes.js +2 -2
  78. package/dist/components/Text/Text.themes.js.map +1 -1
  79. package/dist/components/Text/Text.vanilla.cjs +36 -0
  80. package/dist/components/Text/Text.vanilla.cjs.map +1 -0
  81. package/dist/components/Text/Text.vanilla.css.cjs +55 -0
  82. package/dist/components/Text/Text.vanilla.css.cjs.map +1 -0
  83. package/dist/components/Text/Text.vanilla.css.js +56 -0
  84. package/dist/components/Text/Text.vanilla.css.js.map +1 -0
  85. package/dist/components/Text/Text.vanilla.js +36 -0
  86. package/dist/components/Text/Text.vanilla.js.map +1 -0
  87. package/dist/components/TextField/TextField.cjs +74 -78
  88. package/dist/components/TextField/TextField.cjs.map +1 -1
  89. package/dist/components/TextField/TextField.js +74 -78
  90. package/dist/components/TextField/TextField.js.map +1 -1
  91. package/dist/components/TextField/TextField.vanilla.cjs +70 -86
  92. package/dist/components/TextField/TextField.vanilla.cjs.map +1 -1
  93. package/dist/components/TextField/TextField.vanilla.css.cjs +10 -0
  94. package/dist/components/TextField/TextField.vanilla.css.cjs.map +1 -0
  95. package/dist/components/TextField/TextField.vanilla.css.js +8 -0
  96. package/dist/components/TextField/TextField.vanilla.css.js.map +1 -0
  97. package/dist/components/TextField/TextField.vanilla.js +71 -87
  98. package/dist/components/TextField/TextField.vanilla.js.map +1 -1
  99. package/dist/components/Textarea/Textarea.cjs +51 -41
  100. package/dist/components/Textarea/Textarea.cjs.map +1 -1
  101. package/dist/components/Textarea/Textarea.js +51 -41
  102. package/dist/components/Textarea/Textarea.js.map +1 -1
  103. package/dist/components/Textarea/Textarea.vanilla.cjs +49 -49
  104. package/dist/components/Textarea/Textarea.vanilla.cjs.map +1 -1
  105. package/dist/components/Textarea/Textarea.vanilla.css.cjs.map +1 -1
  106. package/dist/components/Textarea/Textarea.vanilla.css.js.map +1 -1
  107. package/dist/components/Textarea/Textarea.vanilla.js +49 -49
  108. package/dist/components/Textarea/Textarea.vanilla.js.map +1 -1
  109. package/dist/faency.css +170 -14
  110. package/dist/index.cjs +7 -1
  111. package/dist/index.d.ts +375 -0
  112. package/dist/index.js +5 -2
  113. package/dist/styles/themeContext.cjs +2 -1
  114. package/dist/styles/themeContext.cjs.map +1 -1
  115. package/dist/styles/themeContext.js +3 -2
  116. package/dist/styles/themeContext.js.map +1 -1
  117. package/dist/styles/themes.css.cjs.map +1 -1
  118. package/dist/styles/themes.css.js.map +1 -1
  119. package/dist/utils/useIsomorphicLayoutEffect.cjs +6 -0
  120. package/dist/utils/useIsomorphicLayoutEffect.cjs.map +1 -0
  121. package/dist/utils/useIsomorphicLayoutEffect.js +6 -0
  122. package/dist/utils/useIsomorphicLayoutEffect.js.map +1 -0
  123. package/package.json +15 -15
@@ -1 +1 @@
1
- {"version":3,"file":"Textarea.vanilla.css.js","names":["_7a468"],"sources":["../../../components/Textarea/Textarea.vanilla.css.ts"],"sourcesContent":["import { style } from '@vanilla-extract/css';\nimport { recipe } from '@vanilla-extract/recipes';\n\nimport { breakpoints } from '../../styles/breakpoints.css';\nimport { tokens } from '../../styles/tokens.css';\n\n// CONSTANTS\nconst FOCUS_SHADOW =\n '0 1px 5px 0 hsla(0, 0%, 0%, 0.2), 0 3px 1px -2px hsla(0, 0%, 0%, 0.12), 0 2px 2px 0 hsla(0, 0%, 0%, 0.14)';\n\nconst styledTextareaBase = style({\n // Reset\n appearance: 'none',\n overflow: 'auto',\n borderWidth: '0',\n boxSizing: 'border-box',\n fontFamily: tokens.fonts.rubik,\n margin: '0',\n outline: 'none',\n WebkitTapHighlightColor: 'rgba(0,0,0,0)',\n\n // Custom\n padding: tokens.space['3'],\n position: 'relative',\n flexGrow: 1,\n backgroundColor: 'transparent',\n borderRadius: 'inherit',\n boxShadow: `inset 0 0 0 1px ${tokens.colors.textareaBorder}`,\n color: tokens.colors.textareaText,\n fontVariantNumeric: 'tabular-nums',\n transition: 'box-shadow .1s ease-in-out',\n\n selectors: {\n '&:-webkit-autofill, &:autofill': {\n boxShadow: `inset 0 0 0 1px ${tokens.colors.textareaBorder}, inset 0 0 0 100px ${tokens.colors.textareaBg}`,\n },\n '&:-webkit-autofill::first-line, &:autofill::first-line': {\n fontFamily: tokens.fonts.rubik,\n color: tokens.colors.hiContrast,\n },\n '&:focus-visible': {\n boxShadow: `inset 0 0 0 2px ${tokens.colors.textareaFocusBorder}, ${FOCUS_SHADOW}`,\n },\n '&::placeholder': {\n color: tokens.colors.textareaPlaceholder,\n },\n '&:read-only:not(:disabled)': {\n boxShadow: 'none',\n },\n '&:disabled': {\n pointerEvents: 'none',\n opacity: '0.7',\n color: tokens.colors.textareaDisabledText,\n },\n },\n});\n\nexport const styledTextareaRecipe = recipe({\n base: styledTextareaBase,\n variants: {\n variant: {\n ghost: {\n boxShadow: 'none',\n backgroundColor: 'transparent',\n selectors: {\n '&:disabled': {\n boxShadow: 'none',\n },\n '&:focus-visible': {\n backgroundColor: tokens.colors.loContrast,\n },\n },\n },\n },\n state: {\n invalid: {\n boxShadow: `inset 0 0 0 1px ${tokens.colors.textareaInvalidBorder}`,\n selectors: {\n '&:focus-visible': {\n boxShadow: `inset 0 0 0 2px ${tokens.colors.textareaInvalidBorder}, ${FOCUS_SHADOW}`,\n },\n },\n '@media': {\n [breakpoints.hover]: {\n selectors: {\n '&:hover::after': {\n backgroundColor: tokens.colors.textareaInvalidBorder,\n },\n },\n },\n },\n },\n },\n cursor: {\n default: {\n cursor: 'default',\n '@media': {\n [breakpoints.hover]: {\n selectors: {\n '&:hover:not(:read-only)': {\n cursor: 'text',\n },\n },\n },\n },\n selectors: {\n '&:focus-visible:not(:read-only)': {\n cursor: 'text',\n },\n },\n },\n text: {\n cursor: 'text',\n },\n },\n resize: {\n none: {\n resize: 'none',\n },\n both: {\n resize: 'both',\n },\n vertical: {\n resize: 'vertical',\n },\n horizontal: {\n resize: 'horizontal',\n },\n },\n endAdornment: {\n true: {\n paddingBottom: tokens.space['5'],\n paddingRight: tokens.space['5'],\n },\n },\n },\n compoundVariants: [\n {\n variants: {\n variant: 'ghost',\n state: 'invalid',\n },\n style: {\n boxShadow: `inset 0 0 0 1px ${tokens.colors.textareaInvalidBorder}`,\n },\n },\n ],\n defaultVariants: {\n cursor: 'default',\n resize: 'both',\n },\n});\n\nconst textareaWrapperBase = style({\n // Reset\n outline: 'none',\n lineHeight: 0,\n\n position: 'relative',\n display: 'inline-flex',\n backgroundColor: tokens.colors.textareaBg,\n color: tokens.colors.textareaPlaceholder,\n borderRadius: tokens.radii['3'],\n\n selectors: {\n '&::before': {\n boxSizing: 'border-box',\n borderRadius: 'inherit',\n content: '\"\"',\n position: 'absolute',\n inset: '0',\n pointerEvents: 'none',\n },\n '&::after': {\n boxSizing: 'border-box',\n borderRadius: 'inherit',\n content: '\"\"',\n position: 'absolute',\n inset: '0',\n pointerEvents: 'none',\n },\n '&:focus-visible::before': {\n backgroundColor: tokens.colors.textareaFocusBg,\n },\n '&:focus-visible::after': {\n backgroundColor: tokens.colors.primary,\n opacity: '0.15',\n },\n },\n '@media': {\n [breakpoints.hover]: {\n selectors: {\n '&:hover::before': {\n backgroundColor: tokens.colors.textareaHoverBg,\n },\n '&:hover::after': {\n backgroundColor: tokens.colors.primary,\n opacity: '0.05',\n },\n },\n },\n },\n});\n\nexport const textareaWrapperRecipe = recipe({\n base: textareaWrapperBase,\n variants: {\n disabled: {\n true: {\n opacity: '0.7',\n color: tokens.colors.textareaDisabledText,\n '@media': {\n [breakpoints.hover]: {\n selectors: {\n '&:hover::before': {\n backgroundColor: 'inherit',\n },\n '&:hover::after': {\n backgroundColor: 'inherit',\n },\n },\n },\n },\n },\n },\n state: {\n invalid: {\n '@media': {\n [breakpoints.hover]: {\n selectors: {\n '&:hover::after': {\n backgroundColor: tokens.colors.textareaInvalidBorder,\n },\n },\n },\n },\n },\n },\n },\n defaultVariants: {\n disabled: false,\n },\n});\n\nexport const adornmentWrapperEnd = style({\n position: 'absolute',\n bottom: tokens.space['2'],\n right: tokens.space['3'],\n minWidth: tokens.sizes['5'],\n minHeight: tokens.sizes['5'],\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n});\n"],"mappings":""}
1
+ {"version":3,"file":"Textarea.vanilla.css.js","names":["_7a468"],"sources":["../../../components/Textarea/Textarea.vanilla.css.ts"],"sourcesContent":["import { style } from '@vanilla-extract/css';\nimport { recipe } from '@vanilla-extract/recipes';\n\nimport { breakpoints } from '../../styles/breakpoints.css';\nimport { tokens } from '../../styles/tokens.css';\n\n// CONSTANTS\nconst FOCUS_SHADOW =\n '0 1px 5px 0 hsla(0, 0%, 0%, 0.2), 0 3px 1px -2px hsla(0, 0%, 0%, 0.12), 0 2px 2px 0 hsla(0, 0%, 0%, 0.14)';\n\nconst styledTextareaBase = style({\n // Reset\n appearance: 'none',\n overflow: 'auto',\n borderWidth: '0',\n boxSizing: 'border-box',\n fontFamily: tokens.fonts.rubik,\n margin: '0',\n outline: 'none',\n WebkitTapHighlightColor: 'rgba(0,0,0,0)',\n\n // Custom\n padding: tokens.space['3'],\n position: 'relative',\n flexGrow: 1,\n backgroundColor: 'transparent',\n borderRadius: 'inherit',\n boxShadow: `inset 0 0 0 1px ${tokens.colors.textareaBorder}`,\n color: tokens.colors.textareaText,\n fontVariantNumeric: 'tabular-nums',\n transition: 'box-shadow .1s ease-in-out',\n\n selectors: {\n '&:-webkit-autofill, &:autofill': {\n boxShadow: `inset 0 0 0 1px ${tokens.colors.textareaBorder}, inset 0 0 0 100px ${tokens.colors.textareaBg}`,\n WebkitTextFillColor: tokens.colors.hiContrast,\n },\n '&:-webkit-autofill::first-line, &:autofill::first-line': {\n fontFamily: tokens.fonts.rubik,\n color: tokens.colors.hiContrast,\n },\n '&:focus-visible': {\n boxShadow: `inset 0 0 0 2px ${tokens.colors.textareaFocusBorder}, ${FOCUS_SHADOW}`,\n },\n '&:-webkit-autofill:focus-visible, &:autofill:focus-visible': {\n boxShadow: `inset 0 0 0 2px ${tokens.colors.textareaFocusBorder}, inset 0 0 0 100px ${tokens.colors.textareaBg}, ${FOCUS_SHADOW}`,\n },\n '&::placeholder': {\n color: tokens.colors.textareaPlaceholder,\n },\n '&:read-only:not(:disabled)': {\n boxShadow: 'none',\n },\n '&:disabled': {\n pointerEvents: 'none',\n opacity: '0.7',\n color: tokens.colors.textareaDisabledText,\n },\n },\n});\n\nexport const styledTextareaRecipe = recipe({\n base: styledTextareaBase,\n variants: {\n variant: {\n ghost: {\n boxShadow: 'none',\n backgroundColor: 'transparent',\n selectors: {\n '&:disabled': {\n boxShadow: 'none',\n },\n '&:focus-visible': {\n backgroundColor: tokens.colors.loContrast,\n },\n },\n },\n },\n state: {\n invalid: {\n boxShadow: `inset 0 0 0 1px ${tokens.colors.textareaInvalidBorder}`,\n selectors: {\n '&:-webkit-autofill, &:autofill': {\n boxShadow: `inset 0 0 0 1px ${tokens.colors.textareaInvalidBorder}, inset 0 0 0 100px ${tokens.colors.textareaBg}`,\n },\n '&:focus-visible': {\n boxShadow: `inset 0 0 0 2px ${tokens.colors.textareaInvalidBorder}, ${FOCUS_SHADOW}`,\n },\n '&:-webkit-autofill:focus-visible, &:autofill:focus-visible': {\n boxShadow: `inset 0 0 0 2px ${tokens.colors.textareaInvalidBorder}, inset 0 0 0 100px ${tokens.colors.textareaBg}, ${FOCUS_SHADOW}`,\n },\n },\n '@media': {\n [breakpoints.hover]: {\n selectors: {\n '&:hover::after': {\n backgroundColor: tokens.colors.textareaInvalidBorder,\n },\n },\n },\n },\n },\n },\n cursor: {\n default: {\n cursor: 'default',\n '@media': {\n [breakpoints.hover]: {\n selectors: {\n '&:hover:not(:read-only)': {\n cursor: 'text',\n },\n },\n },\n },\n selectors: {\n '&:focus-visible:not(:read-only)': {\n cursor: 'text',\n },\n },\n },\n text: {\n cursor: 'text',\n },\n },\n resize: {\n none: {\n resize: 'none',\n },\n both: {\n resize: 'both',\n },\n vertical: {\n resize: 'vertical',\n },\n horizontal: {\n resize: 'horizontal',\n },\n },\n endAdornment: {\n true: {\n paddingBottom: tokens.space['5'],\n paddingRight: tokens.space['5'],\n },\n },\n },\n compoundVariants: [\n {\n variants: {\n variant: 'ghost',\n state: 'invalid',\n },\n style: {\n boxShadow: `inset 0 0 0 1px ${tokens.colors.textareaInvalidBorder}`,\n },\n },\n ],\n defaultVariants: {\n cursor: 'default',\n resize: 'both',\n },\n});\n\nconst textareaWrapperBase = style({\n // Reset\n outline: 'none',\n lineHeight: 0,\n\n position: 'relative',\n display: 'inline-flex',\n backgroundColor: tokens.colors.textareaBg,\n color: tokens.colors.textareaPlaceholder,\n borderRadius: tokens.radii['3'],\n\n selectors: {\n '&::before': {\n boxSizing: 'border-box',\n borderRadius: 'inherit',\n content: '\"\"',\n position: 'absolute',\n inset: '0',\n pointerEvents: 'none',\n },\n '&::after': {\n boxSizing: 'border-box',\n borderRadius: 'inherit',\n content: '\"\"',\n position: 'absolute',\n inset: '0',\n pointerEvents: 'none',\n },\n '&:focus-visible::before': {\n backgroundColor: tokens.colors.textareaFocusBg,\n },\n '&:focus-visible::after': {\n backgroundColor: tokens.colors.primary,\n opacity: '0.15',\n },\n },\n '@media': {\n [breakpoints.hover]: {\n selectors: {\n '&:hover::before': {\n backgroundColor: tokens.colors.textareaHoverBg,\n },\n '&:hover::after': {\n backgroundColor: tokens.colors.primary,\n opacity: '0.05',\n },\n },\n },\n },\n});\n\nexport const textareaWrapperRecipe = recipe({\n base: textareaWrapperBase,\n variants: {\n disabled: {\n true: {\n opacity: '0.7',\n color: tokens.colors.textareaDisabledText,\n '@media': {\n [breakpoints.hover]: {\n selectors: {\n '&:hover::before': {\n backgroundColor: 'inherit',\n },\n '&:hover::after': {\n backgroundColor: 'inherit',\n },\n },\n },\n },\n },\n },\n state: {\n invalid: {\n '@media': {\n [breakpoints.hover]: {\n selectors: {\n '&:hover::after': {\n backgroundColor: tokens.colors.textareaInvalidBorder,\n },\n },\n },\n },\n },\n },\n },\n defaultVariants: {\n disabled: false,\n },\n});\n\nexport const adornmentWrapperEnd = style({\n position: 'absolute',\n bottom: tokens.space['2'],\n right: tokens.space['3'],\n minWidth: tokens.sizes['5'],\n minHeight: tokens.sizes['5'],\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n});\n"],"mappings":""}
@@ -1,39 +1,24 @@
1
1
  import { processCSSProp } from "../../styles/cssProps.js";
2
2
  import { useVanillaExtractTheme } from "../../styles/themeContext.js";
3
3
  import { LabelVanilla } from "../Label/Label.vanilla.js";
4
+ import { useFieldControl } from "../Field/FieldContext.js";
5
+ import { FieldVanilla } from "../Field/Field.vanilla.js";
4
6
  import { styledTextareaRecipe, textareaWrapperRecipe } from "./Textarea.vanilla.css.js";
5
7
  import React from "react";
6
8
  import { assignInlineVars } from "@vanilla-extract/dynamic";
7
9
  import { jsx, jsxs } from "react/jsx-runtime";
8
10
  // components/Textarea/Textarea.vanilla.tsx
9
- var TextareaVanilla = React.forwardRef(({ state, disabled, onFocus, onBlur, label, id, rootCss, css, endAdornment, variant, cursor, resize, className, style, ...props }, forwardedRef) => {
10
- const [hasFocus, setHasFocus] = React.useState(false);
11
+ var TextareaVanillaControl = React.forwardRef(({ state, disabled, id, css, endAdornment, variant, cursor, resize, className, style, "aria-describedby": ariaDescribedBy, "aria-invalid": ariaInvalid, ...props }, forwardedRef) => {
11
12
  const { colors } = useVanillaExtractTheme();
12
- const invalid = React.useMemo(() => state === "invalid", [state]);
13
- const hasEndAdornment = React.useMemo(() => Boolean(endAdornment), [endAdornment]);
14
- const labelVariant = React.useMemo(() => {
15
- if (disabled) return "subtle";
16
- if (invalid) return "invalid";
17
- if (hasFocus) return "contrast";
18
- return "default";
19
- }, [
20
- invalid,
13
+ const control = useFieldControl({
14
+ id,
21
15
  disabled,
22
- hasFocus
23
- ]);
24
- const handleFocus = React.useCallback((e) => {
25
- if (onFocus) onFocus(e);
26
- setHasFocus(true);
27
- }, [onFocus, setHasFocus]);
28
- const handleBlur = React.useCallback((e) => {
29
- if (onBlur) onBlur(e);
30
- setHasFocus(false);
31
- }, [onBlur, setHasFocus]);
32
- const { style: rootCssStyles, vars: rootVars } = processCSSProp(rootCss, colors);
33
- const rootMergedStyles = {
34
- ...rootCssStyles,
35
- ...assignInlineVars(rootVars)
36
- };
16
+ invalid: state === "invalid",
17
+ "aria-describedby": ariaDescribedBy,
18
+ "aria-invalid": ariaInvalid
19
+ });
20
+ const resolvedState = control.invalid ? "invalid" : state;
21
+ const hasEndAdornment = Boolean(endAdornment);
37
22
  const { style: cssStyles, vars } = processCSSProp(css, colors);
38
23
  const mergedStyles = {
39
24
  ...cssStyles,
@@ -41,39 +26,54 @@ var TextareaVanilla = React.forwardRef(({ state, disabled, onFocus, onBlur, labe
41
26
  ...assignInlineVars(vars)
42
27
  };
43
28
  const textareaWrapperClass = textareaWrapperRecipe({
44
- state,
45
- disabled
29
+ state: resolvedState,
30
+ disabled: control.disabled
46
31
  });
47
32
  const styledTextareaClass = styledTextareaRecipe({
48
33
  variant,
49
- state,
34
+ state: resolvedState,
50
35
  cursor,
51
36
  resize,
52
37
  endAdornment: hasEndAdornment
53
38
  });
54
39
  return /* @__PURE__ */ jsxs("div", {
55
- style: rootMergedStyles,
56
- children: [label && /* @__PURE__ */ jsx(LabelVanilla, {
57
- variant: labelVariant,
58
- htmlFor: id,
40
+ className: textareaWrapperClass,
41
+ children: [/* @__PURE__ */ jsx("textarea", {
42
+ id: control.id,
43
+ disabled: control.disabled,
44
+ ref: forwardedRef,
45
+ className: `${styledTextareaClass} ${className || ""}`.trim(),
46
+ style: mergedStyles,
47
+ "aria-describedby": control["aria-describedby"],
48
+ "aria-invalid": control["aria-invalid"],
49
+ ...props
50
+ }), hasEndAdornment && /* @__PURE__ */ jsx("div", {
51
+ className: "q2igawg",
52
+ children: endAdornment
53
+ })]
54
+ });
55
+ });
56
+ TextareaVanillaControl.displayName = "TextareaVanillaControl";
57
+ var TextareaVanilla = React.forwardRef(({ label, description, error, announceError, id, rootCss, state, ...props }, forwardedRef) => {
58
+ return /* @__PURE__ */ jsx(FieldVanilla, {
59
+ id,
60
+ label: label && ((labelProps) => /* @__PURE__ */ jsx(LabelVanilla, {
61
+ ...labelProps,
59
62
  css: { display: "block" },
60
63
  children: label
61
- }), /* @__PURE__ */ jsxs("div", {
62
- className: textareaWrapperClass,
63
- children: [/* @__PURE__ */ jsx("textarea", {
64
- id,
65
- ref: forwardedRef,
66
- className: `${styledTextareaClass} ${className || ""}`.trim(),
67
- style: mergedStyles,
68
- disabled,
69
- onFocus: handleFocus,
70
- onBlur: handleBlur,
71
- ...props
72
- }), hasEndAdornment && /* @__PURE__ */ jsx("div", {
73
- className: "q2igawg",
74
- children: endAdornment
75
- })]
76
- })]
64
+ })),
65
+ description,
66
+ error,
67
+ announceError,
68
+ invalid: state === "invalid",
69
+ disabled: props.disabled,
70
+ css: rootCss,
71
+ children: /* @__PURE__ */ jsx(TextareaVanillaControl, {
72
+ ref: forwardedRef,
73
+ id,
74
+ state,
75
+ ...props
76
+ })
77
77
  });
78
78
  });
79
79
  TextareaVanilla.displayName = "TextareaVanilla";
@@ -1 +1 @@
1
- {"version":3,"file":"Textarea.vanilla.js","names":[],"sources":["../../../components/Textarea/Textarea.vanilla.tsx"],"sourcesContent":["import { assignInlineVars } from '@vanilla-extract/dynamic';\nimport { RecipeVariants } from '@vanilla-extract/recipes';\nimport React from 'react';\n\nimport { CSSProps, processCSSProp } from '../../styles/cssProps';\nimport { useVanillaExtractTheme } from '../../styles/themeContext';\nimport { LabelVanilla } from '../Label';\nimport {\n adornmentWrapperEnd,\n styledTextareaRecipe,\n textareaWrapperRecipe,\n} from './Textarea.vanilla.css';\n\ntype StyledTextareaRecipeVariants = NonNullable<RecipeVariants<typeof styledTextareaRecipe>>;\n\nexport interface TextareaVanillaOwnProps extends CSSProps {\n variant?: StyledTextareaRecipeVariants['variant'];\n state?: StyledTextareaRecipeVariants['state'];\n cursor?: StyledTextareaRecipeVariants['cursor'];\n resize?: StyledTextareaRecipeVariants['resize'];\n label?: string;\n endAdornment?: React.ReactNode;\n rootCss?: CSSProps['css'];\n}\n\nexport type TextareaVanillaProps = Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, 'size'> &\n TextareaVanillaOwnProps;\n\nexport const TextareaVanilla = React.forwardRef<HTMLTextAreaElement, TextareaVanillaProps>(\n (\n {\n state,\n disabled,\n onFocus,\n onBlur,\n label,\n id,\n rootCss,\n css,\n endAdornment,\n variant,\n cursor,\n resize,\n className,\n style,\n ...props\n },\n forwardedRef,\n ) => {\n const [hasFocus, setHasFocus] = React.useState(false);\n const { colors } = useVanillaExtractTheme();\n\n const invalid = React.useMemo(() => state === 'invalid', [state]);\n const hasEndAdornment = React.useMemo(() => Boolean(endAdornment), [endAdornment]);\n\n const labelVariant = React.useMemo(() => {\n if (disabled) {\n return 'subtle';\n }\n if (invalid) {\n return 'invalid';\n }\n if (hasFocus) {\n return 'contrast';\n }\n return 'default';\n }, [invalid, disabled, hasFocus]);\n\n const handleFocus = React.useCallback(\n (e: React.FocusEvent<HTMLTextAreaElement>) => {\n if (onFocus) {\n onFocus(e);\n }\n setHasFocus(true);\n },\n [onFocus, setHasFocus],\n );\n\n const handleBlur = React.useCallback(\n (e: React.FocusEvent<HTMLTextAreaElement>) => {\n if (onBlur) {\n onBlur(e);\n }\n setHasFocus(false);\n },\n [onBlur, setHasFocus],\n );\n\n const { style: rootCssStyles, vars: rootVars } = processCSSProp(rootCss, colors);\n const rootMergedStyles = { ...rootCssStyles, ...assignInlineVars(rootVars) };\n\n const { style: cssStyles, vars } = processCSSProp(css, colors);\n const mergedStyles = { ...cssStyles, ...style, ...assignInlineVars(vars) };\n\n const textareaWrapperClass = textareaWrapperRecipe({ state, disabled });\n const styledTextareaClass = styledTextareaRecipe({\n variant,\n state,\n cursor,\n resize,\n endAdornment: hasEndAdornment,\n });\n\n return (\n <div style={rootMergedStyles}>\n {label && (\n <LabelVanilla variant={labelVariant} htmlFor={id} css={{ display: 'block' }}>\n {label}\n </LabelVanilla>\n )}\n <div className={textareaWrapperClass}>\n <textarea\n id={id}\n ref={forwardedRef}\n className={`${styledTextareaClass} ${className || ''}`.trim()}\n style={mergedStyles}\n disabled={disabled}\n onFocus={handleFocus}\n onBlur={handleBlur}\n {...props}\n />\n {hasEndAdornment && <div className={adornmentWrapperEnd}>{endAdornment}</div>}\n </div>\n </div>\n );\n },\n);\n\nTextareaVanilla.displayName = 'TextareaVanilla';\n"],"mappings":";;;;;;;;AA4BA,IAAa,kBAAkB,MAAM,YAEjC,EACE,OACA,UACA,SACA,QACA,OACA,IACA,SACA,KACA,cACA,SACA,QACA,QACA,WACA,OACA,GAAG,SAEL,iBACG;CACH,MAAM,CAAC,UAAU,eAAe,MAAM,SAAS,KAAK;CACpD,MAAM,EAAE,WAAW,uBAAuB;CAE1C,MAAM,UAAU,MAAM,cAAc,UAAU,WAAW,CAAC,KAAK,CAAC;CAChE,MAAM,kBAAkB,MAAM,cAAc,QAAQ,YAAY,GAAG,CAAC,YAAY,CAAC;CAEjF,MAAM,eAAe,MAAM,cAAc;EACvC,IAAI,UACF,OAAO;EAET,IAAI,SACF,OAAO;EAET,IAAI,UACF,OAAO;EAET,OAAO;CACT,GAAG;EAAC;EAAS;EAAU;CAAQ,CAAC;CAEhC,MAAM,cAAc,MAAM,aACvB,MAA6C;EAC5C,IAAI,SACF,QAAQ,CAAC;EAEX,YAAY,IAAI;CAClB,GACA,CAAC,SAAS,WAAW,CACvB;CAEA,MAAM,aAAa,MAAM,aACtB,MAA6C;EAC5C,IAAI,QACF,OAAO,CAAC;EAEV,YAAY,KAAK;CACnB,GACA,CAAC,QAAQ,WAAW,CACtB;CAEA,MAAM,EAAE,OAAO,eAAe,MAAM,aAAa,eAAe,SAAS,MAAM;CAC/E,MAAM,mBAAmB;EAAE,GAAG;EAAe,GAAG,iBAAiB,QAAQ;CAAE;CAE3E,MAAM,EAAE,OAAO,WAAW,SAAS,eAAe,KAAK,MAAM;CAC7D,MAAM,eAAe;EAAE,GAAG;EAAW,GAAG;EAAO,GAAG,iBAAiB,IAAI;CAAE;CAEzE,MAAM,uBAAuB,sBAAsB;EAAE;EAAO;CAAS,CAAC;CACtE,MAAM,sBAAsB,qBAAqB;EAC/C;EACA;EACA;EACA;EACA,cAAc;CAChB,CAAC;CAED,OACE,qBAAC,OAAD;EAAK,OAAO;EAAZ,UAAA,CACG,SACC,oBAAC,cAAD;GAAc,SAAS;GAAc,SAAS;GAAI,KAAK,EAAE,SAAS,QAAQ;GACvE,UAAA;EACW,CAAA,GAEhB,qBAAC,OAAD;GAAK,WAAW;GAAhB,UAAA,CACE,oBAAC,YAAD;IACM;IACJ,KAAK;IACL,WAAW,GAAG,oBAAoB,GAAG,aAAa,KAAK,KAAK;IAC5D,OAAO;IACG;IACV,SAAS;IACT,QAAQ;IACR,GAAI;GACL,CAAA,GACA,mBAAmB,oBAAC,OAAD;IAAK,WAAA;IAAiC,UAAA;GAAkB,CAAA,CACzE;EACF,CAAA,CAAA;;AAET,CACF;AAEA,gBAAgB,cAAc"}
1
+ {"version":3,"file":"Textarea.vanilla.js","names":[],"sources":["../../../components/Textarea/Textarea.vanilla.tsx"],"sourcesContent":["import { assignInlineVars } from '@vanilla-extract/dynamic';\nimport { RecipeVariants } from '@vanilla-extract/recipes';\nimport React from 'react';\n\nimport { CSSProps, processCSSProp } from '../../styles/cssProps';\nimport { useVanillaExtractTheme } from '../../styles/themeContext';\nimport { FieldVanilla } from '../Field/Field.vanilla';\nimport { FieldLabelProps, useFieldControl } from '../Field/FieldContext';\nimport { LabelVanilla } from '../Label';\nimport {\n adornmentWrapperEnd,\n styledTextareaRecipe,\n textareaWrapperRecipe,\n} from './Textarea.vanilla.css';\n\ntype StyledTextareaRecipeVariants = NonNullable<RecipeVariants<typeof styledTextareaRecipe>>;\n\nexport interface TextareaVanillaOwnProps extends CSSProps {\n variant?: StyledTextareaRecipeVariants['variant'];\n state?: StyledTextareaRecipeVariants['state'];\n cursor?: StyledTextareaRecipeVariants['cursor'];\n resize?: StyledTextareaRecipeVariants['resize'];\n label?: string;\n description?: React.ReactNode;\n error?: React.ReactNode;\n announceError?: boolean;\n endAdornment?: React.ReactNode;\n rootCss?: CSSProps['css'];\n}\n\nexport type TextareaVanillaProps = Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, 'size'> &\n TextareaVanillaOwnProps;\n\ntype TextareaVanillaControlProps = Omit<\n TextareaVanillaProps,\n 'label' | 'description' | 'error' | 'announceError' | 'rootCss'\n>;\n\nconst TextareaVanillaControl = React.forwardRef<HTMLTextAreaElement, TextareaVanillaControlProps>(\n (\n {\n state,\n disabled,\n id,\n css,\n endAdornment,\n variant,\n cursor,\n resize,\n className,\n style,\n 'aria-describedby': ariaDescribedBy,\n 'aria-invalid': ariaInvalid,\n ...props\n },\n forwardedRef,\n ) => {\n const { colors } = useVanillaExtractTheme();\n const control = useFieldControl({\n id,\n disabled,\n invalid: state === 'invalid',\n 'aria-describedby': ariaDescribedBy,\n 'aria-invalid': ariaInvalid,\n });\n const resolvedState = control.invalid ? 'invalid' : state;\n const hasEndAdornment = Boolean(endAdornment);\n\n const { style: cssStyles, vars } = processCSSProp(css, colors);\n const mergedStyles = { ...cssStyles, ...style, ...assignInlineVars(vars) };\n\n const textareaWrapperClass = textareaWrapperRecipe({\n state: resolvedState,\n disabled: control.disabled,\n });\n const styledTextareaClass = styledTextareaRecipe({\n variant,\n state: resolvedState,\n cursor,\n resize,\n endAdornment: hasEndAdornment,\n });\n\n return (\n <div className={textareaWrapperClass}>\n <textarea\n id={control.id}\n disabled={control.disabled}\n ref={forwardedRef}\n className={`${styledTextareaClass} ${className || ''}`.trim()}\n style={mergedStyles}\n aria-describedby={control['aria-describedby']}\n aria-invalid={control['aria-invalid']}\n {...props}\n />\n {hasEndAdornment && <div className={adornmentWrapperEnd}>{endAdornment}</div>}\n </div>\n );\n },\n);\n\nTextareaVanillaControl.displayName = 'TextareaVanillaControl';\n\nexport const TextareaVanilla = React.forwardRef<HTMLTextAreaElement, TextareaVanillaProps>(\n ({ label, description, error, announceError, id, rootCss, state, ...props }, forwardedRef) => {\n return (\n <FieldVanilla\n id={id}\n label={\n label &&\n ((labelProps: FieldLabelProps) => (\n <LabelVanilla {...labelProps} css={{ display: 'block' }}>\n {label}\n </LabelVanilla>\n ))\n }\n description={description}\n error={error}\n announceError={announceError}\n invalid={state === 'invalid'}\n disabled={props.disabled}\n css={rootCss}\n >\n <TextareaVanillaControl ref={forwardedRef} id={id} state={state} {...props} />\n </FieldVanilla>\n );\n },\n);\n\nTextareaVanilla.displayName = 'TextareaVanilla';\n"],"mappings":";;;;;;;;;;AAsCA,IAAM,yBAAyB,MAAM,YAEjC,EACE,OACA,UACA,IACA,KACA,cACA,SACA,QACA,QACA,WACA,OACA,oBAAoB,iBACpB,gBAAgB,aAChB,GAAG,SAEL,iBACG;CACH,MAAM,EAAE,WAAW,uBAAuB;CAC1C,MAAM,UAAU,gBAAgB;EAC9B;EACA;EACA,SAAS,UAAU;EACnB,oBAAoB;EACpB,gBAAgB;CAClB,CAAC;CACD,MAAM,gBAAgB,QAAQ,UAAU,YAAY;CACpD,MAAM,kBAAkB,QAAQ,YAAY;CAE5C,MAAM,EAAE,OAAO,WAAW,SAAS,eAAe,KAAK,MAAM;CAC7D,MAAM,eAAe;EAAE,GAAG;EAAW,GAAG;EAAO,GAAG,iBAAiB,IAAI;CAAE;CAEzE,MAAM,uBAAuB,sBAAsB;EACjD,OAAO;EACP,UAAU,QAAQ;CACpB,CAAC;CACD,MAAM,sBAAsB,qBAAqB;EAC/C;EACA,OAAO;EACP;EACA;EACA,cAAc;CAChB,CAAC;CAED,OACE,qBAAC,OAAD;EAAK,WAAW;EAAhB,UAAA,CACE,oBAAC,YAAD;GACE,IAAI,QAAQ;GACZ,UAAU,QAAQ;GAClB,KAAK;GACL,WAAW,GAAG,oBAAoB,GAAG,aAAa,KAAK,KAAK;GAC5D,OAAO;GACP,oBAAkB,QAAQ;GAC1B,gBAAc,QAAQ;GACtB,GAAI;EACL,CAAA,GACA,mBAAmB,oBAAC,OAAD;GAAK,WAAA;GAAiC,UAAA;EAAkB,CAAA,CACzE;;AAET,CACF;AAEA,uBAAuB,cAAc;AAErC,IAAa,kBAAkB,MAAM,YAClC,EAAE,OAAO,aAAa,OAAO,eAAe,IAAI,SAAS,OAAO,GAAG,SAAS,iBAAiB;CAC5F,OACE,oBAAC,cAAD;EACM;EACJ,OACE,WACE,eACA,oBAAC,cAAD;GAAc,GAAI;GAAY,KAAK,EAAE,SAAS,QAAQ;GACnD,UAAA;EACW,CAAA;EAGL;EACN;EACQ;EACf,SAAS,UAAU;EACnB,UAAU,MAAM;EAChB,KAAK;EAEL,UAAA,oBAAC,wBAAD;GAAwB,KAAK;GAAkB;GAAW;GAAO,GAAI;EAAQ,CAAA;CACjE,CAAA;AAElB,CACF;AAEA,gBAAgB,cAAc"}
package/dist/faency.css CHANGED
@@ -33,7 +33,7 @@
33
33
  --_17h2n968h: hsla(0, 0%, 0%, 0.51);
34
34
  --_17h2n968i: hsla(0, 0%, 0%, 0.74);
35
35
  --_17h2n968j: black;
36
- --_17h2n968k: hsl(347, 100%, 60.0%);
36
+ --_17h2n968k: hsl(347, 80.0%, 40.0%);
37
37
  --_17h2n968l: hsl(347 77.4% 52.4%);
38
38
  --_17h2n968m: hsla(0, 0%, 0%, 0.74);
39
39
  --_17h2n969i: white;
@@ -438,7 +438,7 @@
438
438
  --_17h2n968h: hsla(0, 0%, 0%, 0.51);
439
439
  --_17h2n968i: hsla(0, 0%, 0%, 0.74);
440
440
  --_17h2n968j: black;
441
- --_17h2n968k: hsl(347, 100%, 60.0%);
441
+ --_17h2n968k: hsl(347, 80.0%, 40.0%);
442
442
  --_17h2n968l: hsl(347 77.4% 52.4%);
443
443
  --_17h2n968m: hsla(0, 0%, 0%, 0.74);
444
444
  --_17h2n969i: white;
@@ -843,7 +843,7 @@
843
843
  --_17h2n968h: hsla(0, 0%, 0%, 0.51);
844
844
  --_17h2n968i: hsla(0, 0%, 0%, 0.74);
845
845
  --_17h2n968j: black;
846
- --_17h2n968k: hsl(347, 100%, 60.0%);
846
+ --_17h2n968k: hsl(347, 80.0%, 40.0%);
847
847
  --_17h2n968l: hsl(347 77.4% 52.4%);
848
848
  --_17h2n968m: hsla(0, 0%, 0%, 0.74);
849
849
  --_17h2n969i: white;
@@ -1248,7 +1248,7 @@
1248
1248
  --_17h2n968h: hsla(0, 0%, 0%, 0.51);
1249
1249
  --_17h2n968i: hsla(0, 0%, 0%, 0.74);
1250
1250
  --_17h2n968j: black;
1251
- --_17h2n968k: hsl(347, 100%, 60.0%);
1251
+ --_17h2n968k: hsl(347, 80.0%, 40.0%);
1252
1252
  --_17h2n968l: hsl(347 77.4% 52.4%);
1253
1253
  --_17h2n968m: hsla(0, 0%, 0%, 0.74);
1254
1254
  --_17h2n969i: white;
@@ -1653,7 +1653,7 @@
1653
1653
  --_17h2n968h: hsla(0, 0%, 0%, 0.51);
1654
1654
  --_17h2n968i: hsla(0, 0%, 0%, 0.74);
1655
1655
  --_17h2n968j: black;
1656
- --_17h2n968k: hsl(347, 100%, 60.0%);
1656
+ --_17h2n968k: hsl(347, 80.0%, 40.0%);
1657
1657
  --_17h2n968l: hsl(347 77.4% 52.4%);
1658
1658
  --_17h2n968m: hsla(0, 0%, 0%, 0.74);
1659
1659
  --_17h2n969i: white;
@@ -2058,7 +2058,7 @@
2058
2058
  --_17h2n968h: hsla(0, 0%, 0%, 0.51);
2059
2059
  --_17h2n968i: hsla(0, 0%, 0%, 0.74);
2060
2060
  --_17h2n968j: black;
2061
- --_17h2n968k: hsl(347, 100%, 60.0%);
2061
+ --_17h2n968k: hsl(347, 80.0%, 40.0%);
2062
2062
  --_17h2n968l: hsl(347 77.4% 52.4%);
2063
2063
  --_17h2n968m: hsla(0, 0%, 0%, 0.74);
2064
2064
  --_17h2n969i: white;
@@ -2463,7 +2463,7 @@
2463
2463
  --_17h2n968h: hsla(0, 0%, 0%, 0.51);
2464
2464
  --_17h2n968i: hsla(0, 0%, 0%, 0.74);
2465
2465
  --_17h2n968j: black;
2466
- --_17h2n968k: hsl(347, 100%, 60.0%);
2466
+ --_17h2n968k: hsl(347, 80.0%, 40.0%);
2467
2467
  --_17h2n968l: hsl(347 77.4% 52.4%);
2468
2468
  --_17h2n968m: hsla(0, 0%, 0%, 0.74);
2469
2469
  --_17h2n969i: white;
@@ -2868,7 +2868,7 @@
2868
2868
  --_17h2n968h: hsla(0, 0%, 100%, 0.51);
2869
2869
  --_17h2n968i: hsla(0, 0%, 100%, 0.74);
2870
2870
  --_17h2n968j: white;
2871
- --_17h2n968k: hsl(347, 100%, 60.0%);
2871
+ --_17h2n968k: hsl(347 100% 72.0%);
2872
2872
  --_17h2n968l: hsl(347, 100%, 67.0%);
2873
2873
  --_17h2n968m: hsla(0, 0%, 100%, 0.74);
2874
2874
  --_17h2n968o: hsl(209, 38.0%, 12.0%);
@@ -3273,7 +3273,7 @@
3273
3273
  --_17h2n968h: hsla(0, 0%, 100%, 0.51);
3274
3274
  --_17h2n968i: hsla(0, 0%, 100%, 0.74);
3275
3275
  --_17h2n968j: white;
3276
- --_17h2n968k: hsl(347, 100%, 60.0%);
3276
+ --_17h2n968k: hsl(347 100% 72.0%);
3277
3277
  --_17h2n968l: hsl(347, 100%, 67.0%);
3278
3278
  --_17h2n968m: hsla(0, 0%, 100%, 0.74);
3279
3279
  --_17h2n968o: hsl(209, 38.0%, 12.0%);
@@ -3678,7 +3678,7 @@
3678
3678
  --_17h2n968h: hsla(0, 0%, 100%, 0.51);
3679
3679
  --_17h2n968i: hsla(0, 0%, 100%, 0.74);
3680
3680
  --_17h2n968j: white;
3681
- --_17h2n968k: hsl(347, 100%, 60.0%);
3681
+ --_17h2n968k: hsl(347 100% 72.0%);
3682
3682
  --_17h2n968l: hsl(347, 100%, 67.0%);
3683
3683
  --_17h2n968m: hsla(0, 0%, 100%, 0.74);
3684
3684
  --_17h2n968o: hsl(209, 38.0%, 12.0%);
@@ -4083,7 +4083,7 @@
4083
4083
  --_17h2n968h: hsla(0, 0%, 100%, 0.51);
4084
4084
  --_17h2n968i: hsla(0, 0%, 100%, 0.74);
4085
4085
  --_17h2n968j: white;
4086
- --_17h2n968k: hsl(347, 100%, 60.0%);
4086
+ --_17h2n968k: hsl(347 100% 72.0%);
4087
4087
  --_17h2n968l: hsl(347, 100%, 67.0%);
4088
4088
  --_17h2n968m: hsla(0, 0%, 100%, 0.74);
4089
4089
  --_17h2n968o: hsl(209, 38.0%, 12.0%);
@@ -4488,7 +4488,7 @@
4488
4488
  --_17h2n968h: hsla(0, 0%, 100%, 0.51);
4489
4489
  --_17h2n968i: hsla(0, 0%, 100%, 0.74);
4490
4490
  --_17h2n968j: white;
4491
- --_17h2n968k: hsl(347, 100%, 60.0%);
4491
+ --_17h2n968k: hsl(347 100% 72.0%);
4492
4492
  --_17h2n968l: hsl(347, 100%, 67.0%);
4493
4493
  --_17h2n968m: hsla(0, 0%, 100%, 0.74);
4494
4494
  --_17h2n968o: hsl(209, 38.0%, 12.0%);
@@ -4893,7 +4893,7 @@
4893
4893
  --_17h2n968h: hsla(0, 0%, 100%, 0.51);
4894
4894
  --_17h2n968i: hsla(0, 0%, 100%, 0.74);
4895
4895
  --_17h2n968j: white;
4896
- --_17h2n968k: hsl(347, 100%, 60.0%);
4896
+ --_17h2n968k: hsl(347 100% 72.0%);
4897
4897
  --_17h2n968l: hsl(347, 100%, 67.0%);
4898
4898
  --_17h2n968m: hsla(0, 0%, 100%, 0.74);
4899
4899
  --_17h2n968o: hsl(209, 38.0%, 12.0%);
@@ -5298,7 +5298,7 @@
5298
5298
  --_17h2n968h: hsla(0, 0%, 100%, 0.51);
5299
5299
  --_17h2n968i: hsla(0, 0%, 100%, 0.74);
5300
5300
  --_17h2n968j: white;
5301
- --_17h2n968k: hsl(347, 100%, 60.0%);
5301
+ --_17h2n968k: hsl(347 100% 72.0%);
5302
5302
  --_17h2n968l: hsl(347, 100%, 67.0%);
5303
5303
  --_17h2n968m: hsla(0, 0%, 100%, 0.74);
5304
5304
  --_17h2n968o: hsl(209, 38.0%, 12.0%);
@@ -7358,6 +7358,7 @@
7358
7358
  }
7359
7359
  ._1st6suv0:-webkit-autofill, ._1st6suv0:autofill {
7360
7360
  box-shadow: inset 0 0 0 1px var(--_17h2n968p), inset 0 0 0 100px var(--_17h2n968o);
7361
+ -webkit-text-fill-color: var(--_17h2n962);
7361
7362
  }
7362
7363
  ._1st6suv0:-webkit-autofill::first-line, ._1st6suv0:autofill::first-line {
7363
7364
  font-family: var(--_17h2n969t);
@@ -7366,6 +7367,9 @@
7366
7367
  ._1st6suv0:focus-visible {
7367
7368
  box-shadow: inset 0 0 0 2px var(--_17h2n968r), 0 1px 5px 0 hsla(0, 0%, 0%, 0.2), 0 3px 1px -2px hsla(0, 0%, 0%, 0.12), 0 2px 2px 0 hsla(0, 0%, 0%, 0.14);
7368
7369
  }
7370
+ ._1st6suv0:-webkit-autofill:focus-visible, ._1st6suv0:autofill:focus-visible {
7371
+ box-shadow: inset 0 0 0 2px var(--_17h2n968r), inset 0 0 0 100px var(--_17h2n968o), 0 1px 5px 0 hsla(0, 0%, 0%, 0.2), 0 3px 1px -2px hsla(0, 0%, 0%, 0.12), 0 2px 2px 0 hsla(0, 0%, 0%, 0.14);
7372
+ }
7369
7373
  ._1st6suv0::placeholder {
7370
7374
  color: var(--_17h2n968u);
7371
7375
  }
@@ -7419,9 +7423,15 @@
7419
7423
  ._1st6suv6 {
7420
7424
  box-shadow: inset 0 0 0 1px var(--_17h2n968w);
7421
7425
  }
7426
+ ._1st6suv6:-webkit-autofill, ._1st6suv6:autofill {
7427
+ box-shadow: inset 0 0 0 1px var(--_17h2n968w), inset 0 0 0 100px var(--_17h2n968o);
7428
+ }
7422
7429
  ._1st6suv6:focus-visible {
7423
7430
  box-shadow: inset 0 0 0 2px var(--_17h2n968w), 0 1px 5px 0 hsla(0, 0%, 0%, 0.2), 0 3px 1px -2px hsla(0, 0%, 0%, 0.12), 0 2px 2px 0 hsla(0, 0%, 0%, 0.14);
7424
7431
  }
7432
+ ._1st6suv6:-webkit-autofill:focus-visible, ._1st6suv6:autofill:focus-visible {
7433
+ box-shadow: inset 0 0 0 2px var(--_17h2n968w), inset 0 0 0 100px var(--_17h2n968o), 0 1px 5px 0 hsla(0, 0%, 0%, 0.2), 0 3px 1px -2px hsla(0, 0%, 0%, 0.12), 0 2px 2px 0 hsla(0, 0%, 0%, 0.14);
7434
+ }
7425
7435
  ._1st6suv7 {
7426
7436
  cursor: default;
7427
7437
  }
@@ -7465,6 +7475,7 @@
7465
7475
  outline: none;
7466
7476
  line-height: 0;
7467
7477
  position: relative;
7478
+ isolation: isolate;
7468
7479
  background-color: var(--_17h2n968o);
7469
7480
  color: var(--_17h2n968u);
7470
7481
  }
@@ -7533,6 +7544,8 @@
7533
7544
  }
7534
7545
  ._1st6suvx {
7535
7546
  left: 0;
7547
+ z-index: 1;
7548
+ pointer-events: none;
7536
7549
  }
7537
7550
  ._1st6suvy {
7538
7551
  right: 0;
@@ -7656,6 +7669,115 @@
7656
7669
  }._15a4kqm0 {
7657
7670
  background-color: var(--_17h2n963z);
7658
7671
  border-radius: var(--_17h2n96ax);
7672
+ }.mlb3ql0 {
7673
+ line-height: 1;
7674
+ margin: 0;
7675
+ font-family: var(--_17h2n969t);
7676
+ font-variant-numeric: tabular-nums;
7677
+ display: inline-block;
7678
+ }
7679
+ .mlb3ql2 {
7680
+ font-size: var(--_17h2n96ad);
7681
+ }
7682
+ .mlb3ql3 {
7683
+ font-size: var(--_17h2n96ae);
7684
+ }
7685
+ .mlb3ql4 {
7686
+ font-size: var(--_17h2n96af);
7687
+ }
7688
+ .mlb3ql5 {
7689
+ font-size: var(--_17h2n96ag);
7690
+ }
7691
+ .mlb3ql6 {
7692
+ font-size: var(--_17h2n96ah);
7693
+ }
7694
+ .mlb3ql7 {
7695
+ font-size: var(--_17h2n96ai);
7696
+ }
7697
+ .mlb3ql8 {
7698
+ font-size: var(--_17h2n96aj);
7699
+ }
7700
+ .mlb3ql9 {
7701
+ font-size: var(--_17h2n96ak);
7702
+ }
7703
+ .mlb3qla {
7704
+ font-size: var(--_17h2n96al);
7705
+ }
7706
+ .mlb3qlb {
7707
+ font-size: var(--_17h2n96am);
7708
+ }
7709
+ .mlb3qlc {
7710
+ font-size: var(--_17h2n96an);
7711
+ }
7712
+ .mlb3qld {
7713
+ font-size: var(--_17h2n96ao);
7714
+ }
7715
+ .mlb3qle {
7716
+ font-size: var(--_17h2n96ap);
7717
+ }
7718
+ .mlb3qlf {
7719
+ font-size: inherit;
7720
+ }
7721
+ .mlb3qlg {
7722
+ font-weight: var(--_17h2n96aq);
7723
+ }
7724
+ .mlb3qlh {
7725
+ font-weight: var(--_17h2n96ar);
7726
+ }
7727
+ .mlb3qli {
7728
+ font-weight: var(--_17h2n96as);
7729
+ }
7730
+ .mlb3qlj {
7731
+ font-weight: var(--_17h2n96at);
7732
+ }
7733
+ .mlb3qlk {
7734
+ font-weight: var(--_17h2n96au);
7735
+ }
7736
+ .mlb3qll {
7737
+ color: var(--_17h2n968l);
7738
+ }
7739
+ .mlb3qlm {
7740
+ color: var(--_17h2n968h);
7741
+ }
7742
+ .mlb3qln {
7743
+ color: var(--_17h2n968i);
7744
+ }
7745
+ .mlb3qlo {
7746
+ color: var(--_17h2n968j);
7747
+ }
7748
+ .mlb3qlp {
7749
+ color: inherit;
7750
+ }
7751
+ .mlb3qlq {
7752
+ color: var(--_17h2n968k);
7753
+ }
7754
+ .mlb3qlr {
7755
+ -webkit-background-clip: text;
7756
+ -webkit-text-fill-color: transparent;
7757
+ }
7758
+ .mlb3qls {
7759
+ text-transform: uppercase;
7760
+ }
7761
+ .mlb3qlt {
7762
+ display: inline-block;
7763
+ }
7764
+ .mlb3qlt::first-letter {
7765
+ text-transform: uppercase;
7766
+ }
7767
+ .mlb3qlu {
7768
+ text-transform: capitalize;
7769
+ }
7770
+ .mlb3qlv {
7771
+ overflow: hidden;
7772
+ text-overflow: ellipsis;
7773
+ white-space: nowrap;
7774
+ }.qq7v300 {
7775
+ display: flex;
7776
+ align-items: center;
7777
+ gap: var(--_17h2n969v);
7778
+ }
7779
+ .qq7v300 > [role="switch"] {
7780
+ margin: 0;
7659
7781
  }._1qwrd2o0 {
7660
7782
  box-sizing: border-box;
7661
7783
  display: grid;
@@ -7886,6 +8008,7 @@
7886
8008
  }
7887
8009
  .q2igaw0:-webkit-autofill, .q2igaw0:autofill {
7888
8010
  box-shadow: inset 0 0 0 1px var(--_17h2n968y), inset 0 0 0 100px var(--_17h2n968x);
8011
+ -webkit-text-fill-color: var(--_17h2n962);
7889
8012
  }
7890
8013
  .q2igaw0:-webkit-autofill::first-line, .q2igaw0:autofill::first-line {
7891
8014
  font-family: var(--_17h2n969t);
@@ -7894,6 +8017,9 @@
7894
8017
  .q2igaw0:focus-visible {
7895
8018
  box-shadow: inset 0 0 0 2px var(--_17h2n9690), 0 1px 5px 0 hsla(0, 0%, 0%, 0.2), 0 3px 1px -2px hsla(0, 0%, 0%, 0.12), 0 2px 2px 0 hsla(0, 0%, 0%, 0.14);
7896
8019
  }
8020
+ .q2igaw0:-webkit-autofill:focus-visible, .q2igaw0:autofill:focus-visible {
8021
+ box-shadow: inset 0 0 0 2px var(--_17h2n9690), inset 0 0 0 100px var(--_17h2n968x), 0 1px 5px 0 hsla(0, 0%, 0%, 0.2), 0 3px 1px -2px hsla(0, 0%, 0%, 0.12), 0 2px 2px 0 hsla(0, 0%, 0%, 0.14);
8022
+ }
7897
8023
  .q2igaw0::placeholder {
7898
8024
  color: var(--_17h2n9693);
7899
8025
  }
@@ -7918,9 +8044,15 @@
7918
8044
  .q2igaw3 {
7919
8045
  box-shadow: inset 0 0 0 1px var(--_17h2n9695);
7920
8046
  }
8047
+ .q2igaw3:-webkit-autofill, .q2igaw3:autofill {
8048
+ box-shadow: inset 0 0 0 1px var(--_17h2n9695), inset 0 0 0 100px var(--_17h2n968x);
8049
+ }
7921
8050
  .q2igaw3:focus-visible {
7922
8051
  box-shadow: inset 0 0 0 2px var(--_17h2n9695), 0 1px 5px 0 hsla(0, 0%, 0%, 0.2), 0 3px 1px -2px hsla(0, 0%, 0%, 0.12), 0 2px 2px 0 hsla(0, 0%, 0%, 0.14);
7923
8052
  }
8053
+ .q2igaw3:-webkit-autofill:focus-visible, .q2igaw3:autofill:focus-visible {
8054
+ box-shadow: inset 0 0 0 2px var(--_17h2n9695), inset 0 0 0 100px var(--_17h2n968x), 0 1px 5px 0 hsla(0, 0%, 0%, 0.2), 0 3px 1px -2px hsla(0, 0%, 0%, 0.12), 0 2px 2px 0 hsla(0, 0%, 0%, 0.14);
8055
+ }
7924
8056
  .q2igaw4 {
7925
8057
  cursor: default;
7926
8058
  }
@@ -8018,4 +8150,28 @@
8018
8150
  .q2igawf:hover::after {
8019
8151
  background-color: var(--_17h2n9695);
8020
8152
  }
8153
+ }._1q0c5700 {
8154
+ display: flex;
8155
+ flex-direction: row;
8156
+ align-items: center;
8157
+ }
8158
+ ._1q0c5701 + * {
8159
+ margin-left: var(--_17h2n969u);
8160
+ }
8161
+ ._1q0c5702 {
8162
+ appearance: none;
8163
+ background: none;
8164
+ border: none;
8165
+ padding: 0;
8166
+ font: inherit;
8167
+ display: inline-flex;
8168
+ align-items: center;
8169
+ justify-content: center;
8170
+ border-radius: var(--_17h2n96av);
8171
+ color: inherit;
8172
+ cursor: pointer;
8173
+ }
8174
+ ._1q0c5702:focus-visible {
8175
+ outline: 2px solid var(--_17h2n968r);
8176
+ outline-offset: 1px;
8021
8177
  }/*$vite$:1*/
package/dist/index.cjs CHANGED
@@ -34,6 +34,7 @@ const require_Bubble = require("./components/Bubble/Bubble.cjs");
34
34
  const require_Bubble_vanilla = require("./components/Bubble/Bubble.vanilla.cjs");
35
35
  const require_ButtonSwitch = require("./components/ButtonSwitch/ButtonSwitch.cjs");
36
36
  const require_ButtonSwitch_vanilla = require("./components/ButtonSwitch/ButtonSwitch.vanilla.cjs");
37
+ const require_FieldContext = require("./components/Field/FieldContext.cjs");
37
38
  const require_Checkbox = require("./components/Checkbox/Checkbox.cjs");
38
39
  const require_Container = require("./components/Container/Container.cjs");
39
40
  const require_Container_vanilla = require("./components/Container/Container.vanilla.cjs");
@@ -49,6 +50,9 @@ const require_Panel = require("./components/Panel/Panel.cjs");
49
50
  const require_Panel_vanilla = require("./components/Panel/Panel.vanilla.cjs");
50
51
  const require_DropdownMenu = require("./components/DropdownMenu/DropdownMenu.cjs");
51
52
  const require_FaencyProvider = require("./components/FaencyProvider.cjs");
53
+ const require_VisuallyHidden = require("./components/VisuallyHidden/VisuallyHidden.cjs");
54
+ const require_Field = require("./components/Field/Field.cjs");
55
+ const require_Field_vanilla = require("./components/Field/Field.vanilla.cjs");
52
56
  const require_Grid = require("./components/Grid/Grid.cjs");
53
57
  const require_Grid_vanilla = require("./components/Grid/Grid.vanilla.cjs");
54
58
  const require_Heading = require("./components/Heading/Heading.cjs");
@@ -77,7 +81,6 @@ const require_Textarea_vanilla = require("./components/Textarea/Textarea.vanilla
77
81
  const require_Tooltip = require("./components/Tooltip/Tooltip.cjs");
78
82
  const require_TextField = require("./components/TextField/TextField.cjs");
79
83
  const require_TextField_vanilla = require("./components/TextField/TextField.vanilla.cjs");
80
- const require_VisuallyHidden = require("./components/VisuallyHidden/VisuallyHidden.cjs");
81
84
  let _radix_ui_react_aspect_ratio = require("@radix-ui/react-aspect-ratio");
82
85
  let _radix_ui_react_portal = require("@radix-ui/react-portal");
83
86
  exports.AccessibleIcon = require_AccessibleIcon.AccessibleIcon;
@@ -151,6 +154,8 @@ exports.DropdownMenuTrigger = require_DropdownMenu.DropdownMenuTrigger;
151
154
  exports.Elevation = require_Elevation.Elevation;
152
155
  exports.ElevationVanilla = require_Elevation_vanilla.ElevationVanilla;
153
156
  exports.FaencyProvider = require_FaencyProvider.FaencyProvider;
157
+ exports.Field = require_Field.Field;
158
+ exports.FieldVanilla = require_Field_vanilla.FieldVanilla;
154
159
  exports.Flex = require_Flex.Flex;
155
160
  exports.FlexVanilla = require_Flex_vanilla.FlexVanilla;
156
161
  exports.Grid = require_Grid.Grid;
@@ -251,6 +256,7 @@ exports.lightTheme = require_stitches_config.lightTheme;
251
256
  exports.panelStyles = require_Panel.panelStyles;
252
257
  exports.styled = require_stitches_config.styled;
253
258
  exports.useColorScheme = require_colorSchemeContext.useColorScheme;
259
+ exports.useFieldControl = require_FieldContext.useFieldControl;
254
260
  exports.useVanillaExtractTheme = require_themeContext.useVanillaExtractTheme;
255
261
  exports.vanillaDarkTheme = require_themes_css.darkTheme;
256
262
  exports.vanillaLightTheme = require_themes_css.lightTheme;