@manafishrov/ui 1.0.3 → 1.0.5

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 (29) hide show
  1. package/dist/Theme.js +6 -6
  2. package/dist/Theme.js.map +1 -1
  3. package/dist/components/form/CheckboxField.js.map +1 -1
  4. package/dist/components/form/DatePickerField.js.map +1 -1
  5. package/dist/components/form/Form.js.map +1 -1
  6. package/dist/components/form/NumberInputField.js.map +1 -1
  7. package/dist/components/form/PasswordInputField.js.map +1 -1
  8. package/dist/components/form/RadioGroupField.js.map +1 -1
  9. package/dist/components/form/SelectField.js.map +1 -1
  10. package/dist/components/form/SubmitButton.js.map +1 -1
  11. package/dist/components/form/SwitchField.js.map +1 -1
  12. package/dist/components/form/TextInputField.js.map +1 -1
  13. package/dist/components/form/TextareaField.js.map +1 -1
  14. package/dist/components/sidebar/SidebarDesktop.js +17 -17
  15. package/dist/components/sidebar/SidebarDesktop.js.map +1 -1
  16. package/package.json +1 -1
  17. package/src/Theme.tsx +2 -2
  18. package/src/components/form/CheckboxField.tsx +9 -19
  19. package/src/components/form/DatePickerField.tsx +11 -21
  20. package/src/components/form/Form.tsx +16 -16
  21. package/src/components/form/NumberInputField.tsx +10 -16
  22. package/src/components/form/PasswordInputField.tsx +11 -21
  23. package/src/components/form/RadioGroupField.tsx +6 -16
  24. package/src/components/form/SelectField.tsx +13 -23
  25. package/src/components/form/SubmitButton.tsx +6 -12
  26. package/src/components/form/SwitchField.tsx +9 -19
  27. package/src/components/form/TextInputField.tsx +9 -15
  28. package/src/components/form/TextareaField.tsx +9 -15
  29. package/src/components/sidebar/SidebarDesktop.tsx +2 -2
package/dist/Theme.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { createComponent as f } from "solid-js/web";
2
2
  import { createSignal as c, onMount as y, createEffect as h, on as i, createContext as E, useContext as b } from "solid-js";
3
- const l = E(), v = "theme", m = "(prefers-color-scheme: dark)", d = () => typeof globalThis.matchMedia != "function" ? "light" : globalThis.matchMedia(m).matches ? "dark" : "light", S = (e, t) => {
4
- if (globalThis.localStorage === void 0)
3
+ const l = E(), S = "theme", m = "(prefers-color-scheme: dark)", g = () => typeof globalThis.matchMedia != "function" ? "light" : globalThis.matchMedia(m).matches ? "dark" : "light", v = (e, t) => {
4
+ if (!("localStorage" in globalThis))
5
5
  return t;
6
6
  const o = globalThis.localStorage.getItem(e);
7
7
  return o === "light" || o === "dark" || o === "system" ? o : t;
@@ -12,7 +12,7 @@ const l = E(), v = "theme", m = "(prefers-color-scheme: dark)", d = () => typeof
12
12
  }, C = (e) => {
13
13
  if (typeof globalThis.matchMedia != "function")
14
14
  return () => {
15
- e(d());
15
+ e(g());
16
16
  };
17
17
  const t = globalThis.matchMedia(m), o = (n) => {
18
18
  e(n.matches ? "dark" : "light");
@@ -21,11 +21,11 @@ const l = E(), v = "theme", m = "(prefers-color-scheme: dark)", d = () => typeof
21
21
  t.removeEventListener("change", o);
22
22
  };
23
23
  }, L = (e) => {
24
- const t = () => e.storageKey ?? v, o = () => e.defaultTheme ?? "system", [n, s] = c(e.theme ?? S(t(), o())), [g, u] = c(d()), T = (r) => {
25
- s(r), globalThis.localStorage !== void 0 && globalThis.localStorage.setItem(t(), r);
24
+ const t = () => e.storageKey ?? S, o = () => e.defaultTheme ?? "system", [n, s] = c(e.theme ?? v(t(), o())), [d, u] = c(g()), T = (r) => {
25
+ s(r), "localStorage" in globalThis && globalThis.localStorage.setItem(t(), r);
26
26
  }, a = () => {
27
27
  const r = n();
28
- return r === "system" ? g() : r;
28
+ return r === "system" ? d() : r;
29
29
  };
30
30
  return y(() => C(u)), h(i(() => e.theme, (r) => {
31
31
  typeof r == "string" && s(r);
package/dist/Theme.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Theme.js","sources":["../src/Theme.tsx"],"sourcesContent":["import type { Component, JSXElement } from 'solid-js';\n\nexport type Theme = 'light' | 'dark' | 'system';\n\nexport type ThemeProviderProps = {\n theme?: Theme;\n defaultTheme?: Theme;\n storageKey?: string;\n children: JSXElement;\n};\n\ntype ThemeContextValue = {\n theme: () => Theme;\n setTheme: (theme: Theme) => void;\n resolvedTheme: () => 'light' | 'dark';\n};\n\nconst ThemeContext = createContext<ThemeContextValue>();\nconst DEFAULT_STORAGE_KEY = 'theme';\nconst DARK_THEME_QUERY = '(prefers-color-scheme: dark)';\n\nconst getSystemTheme = (): 'light' | 'dark' => {\n if (typeof globalThis.matchMedia !== 'function') {\n return 'light';\n }\n return globalThis.matchMedia(DARK_THEME_QUERY).matches ? 'dark' : 'light';\n};\n\nconst readStoredTheme = (storageKey: string, defaultTheme: Theme): Theme => {\n if (globalThis.localStorage === undefined) {\n return defaultTheme;\n }\n const stored = globalThis.localStorage.getItem(storageKey);\n if (stored === 'light' || stored === 'dark' || stored === 'system') {\n return stored;\n }\n return defaultTheme;\n};\n\nconst applyRootThemeClass = (resolvedTheme: () => 'light' | 'dark'): void => {\n createEffect(\n on(resolvedTheme, (resolved) => {\n const root = document.documentElement;\n root.classList.toggle('dark', resolved === 'dark');\n }),\n );\n};\n\nconst createSystemThemeListener = (\n setSystemTheme: (theme: 'light' | 'dark') => void,\n): (() => void) => {\n if (typeof globalThis.matchMedia !== 'function') {\n return (): void => {\n setSystemTheme(getSystemTheme());\n };\n }\n const mediaQuery = globalThis.matchMedia(DARK_THEME_QUERY);\n const handleChange = (mediaQueryEvent: MediaQueryListEvent): void => {\n setSystemTheme(mediaQueryEvent.matches ? 'dark' : 'light');\n };\n mediaQuery.addEventListener('change', handleChange);\n return (): void => {\n mediaQuery.removeEventListener('change', handleChange);\n };\n};\n\nexport const ThemeProvider: Component<ThemeProviderProps> = (props) => {\n const storageKey = (): string => props.storageKey ?? DEFAULT_STORAGE_KEY;\n const fallbackTheme = (): Theme => props.defaultTheme ?? 'system';\n const [theme, setThemeState] = createSignal<Theme>(\n props.theme ?? readStoredTheme(storageKey(), fallbackTheme()),\n );\n const [systemTheme, setSystemTheme] = createSignal<'light' | 'dark'>(getSystemTheme());\n\n const setTheme = (newTheme: Theme): void => {\n setThemeState(newTheme);\n if (globalThis.localStorage !== undefined) {\n globalThis.localStorage.setItem(storageKey(), newTheme);\n }\n };\n\n const resolvedTheme = (): 'light' | 'dark' => {\n const current = theme();\n return current === 'system' ? systemTheme() : current;\n };\n\n onMount(() => createSystemThemeListener(setSystemTheme));\n\n createEffect(\n on(\n () => props.theme,\n (propTheme) => {\n if (typeof propTheme === 'string') {\n setThemeState(propTheme);\n }\n },\n ),\n );\n applyRootThemeClass(resolvedTheme);\n\n return (\n <ThemeContext.Provider value={{ theme, setTheme, resolvedTheme }}>\n {props.children}\n </ThemeContext.Provider>\n );\n};\n\nexport const useTheme = (): ThemeContextValue => {\n const context = useContext(ThemeContext);\n if (!context) {\n throw new Error('useTheme must be used within a ThemeProvider');\n }\n return context;\n};\n"],"names":["ThemeContext","createContext","DEFAULT_STORAGE_KEY","DARK_THEME_QUERY","getSystemTheme","globalThis","matchMedia","matches","readStoredTheme","storageKey","defaultTheme","localStorage","undefined","stored","getItem","applyRootThemeClass","resolvedTheme","createEffect","on","resolved","root","document","documentElement","classList","toggle","createSystemThemeListener","setSystemTheme","mediaQuery","handleChange","mediaQueryEvent","addEventListener","removeEventListener","ThemeProvider","props","fallbackTheme","theme","setThemeState","createSignal","systemTheme","setTheme","newTheme","setItem","current","onMount","propTheme","_$createComponent","Provider","value","children","useTheme","context","useContext","Error"],"mappings":";;AAiBA,MAAMA,IAAeC,EAAAA,GACfC,IAAsB,SACtBC,IAAmB,gCAEnBC,IAAiBA,MACjB,OAAOC,WAAWC,cAAe,aAC5B,UAEFD,WAAWC,WAAWH,CAAgB,EAAEI,UAAU,SAAS,SAG9DC,IAAkBA,CAACC,GAAoBC,MAA+B;AAC1E,MAAIL,WAAWM,iBAAiBC;AAC9B,WAAOF;AAET,QAAMG,IAASR,WAAWM,aAAaG,QAAQL,CAAU;AACzD,SAAII,MAAW,WAAWA,MAAW,UAAUA,MAAW,WACjDA,IAE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EAE3B,CACF,CACF,GACA7B,EAAoBC,CAAa,GAEjC6B,EACG7C,EAAa8C,UAAQ;AAAA,IAACC,OAAO;AAAA,MAAEZ,OAAAA;AAAAA,MAAOI,UAAAA;AAAAA,MAAUvB,eAAAA;AAAAA,IAAAA;AAAAA,IAAe,IAAAgC,WAAA;AAAA,aAC7Df,EAAMe;AAAAA,IAAQ;AAAA,EAAA,CAAA;AAGrB,GAEaC,IAAWA,MAAyB;AAC/C,QAAMC,IAAUC,EAAWnD,CAAY;AACvC,MAAI,CAACkD;AACH,UAAM,IAAIE,MAAM,8CAA8C;AAEhE,SAAOF;AACT;"}
1
+ {"version":3,"file":"Theme.js","sources":["../src/Theme.tsx"],"sourcesContent":["import type { Component, JSXElement } from 'solid-js';\n\nexport type Theme = 'light' | 'dark' | 'system';\n\nexport type ThemeProviderProps = {\n theme?: Theme;\n defaultTheme?: Theme;\n storageKey?: string;\n children: JSXElement;\n};\n\ntype ThemeContextValue = {\n theme: () => Theme;\n setTheme: (theme: Theme) => void;\n resolvedTheme: () => 'light' | 'dark';\n};\n\nconst ThemeContext = createContext<ThemeContextValue>();\nconst DEFAULT_STORAGE_KEY = 'theme';\nconst DARK_THEME_QUERY = '(prefers-color-scheme: dark)';\n\nconst getSystemTheme = (): 'light' | 'dark' => {\n if (typeof globalThis.matchMedia !== 'function') {\n return 'light';\n }\n return globalThis.matchMedia(DARK_THEME_QUERY).matches ? 'dark' : 'light';\n};\n\nconst readStoredTheme = (storageKey: string, defaultTheme: Theme): Theme => {\n if (!('localStorage' in globalThis)) {\n return defaultTheme;\n }\n const stored = globalThis.localStorage.getItem(storageKey);\n if (stored === 'light' || stored === 'dark' || stored === 'system') {\n return stored;\n }\n return defaultTheme;\n};\n\nconst applyRootThemeClass = (resolvedTheme: () => 'light' | 'dark'): void => {\n createEffect(\n on(resolvedTheme, (resolved) => {\n const root = document.documentElement;\n root.classList.toggle('dark', resolved === 'dark');\n }),\n );\n};\n\nconst createSystemThemeListener = (\n setSystemTheme: (theme: 'light' | 'dark') => void,\n): (() => void) => {\n if (typeof globalThis.matchMedia !== 'function') {\n return (): void => {\n setSystemTheme(getSystemTheme());\n };\n }\n const mediaQuery = globalThis.matchMedia(DARK_THEME_QUERY);\n const handleChange = (mediaQueryEvent: MediaQueryListEvent): void => {\n setSystemTheme(mediaQueryEvent.matches ? 'dark' : 'light');\n };\n mediaQuery.addEventListener('change', handleChange);\n return (): void => {\n mediaQuery.removeEventListener('change', handleChange);\n };\n};\n\nexport const ThemeProvider: Component<ThemeProviderProps> = (props) => {\n const storageKey = (): string => props.storageKey ?? DEFAULT_STORAGE_KEY;\n const fallbackTheme = (): Theme => props.defaultTheme ?? 'system';\n const [theme, setThemeState] = createSignal<Theme>(\n props.theme ?? readStoredTheme(storageKey(), fallbackTheme()),\n );\n const [systemTheme, setSystemTheme] = createSignal<'light' | 'dark'>(getSystemTheme());\n\n const setTheme = (newTheme: Theme): void => {\n setThemeState(newTheme);\n if ('localStorage' in globalThis) {\n globalThis.localStorage.setItem(storageKey(), newTheme);\n }\n };\n\n const resolvedTheme = (): 'light' | 'dark' => {\n const current = theme();\n return current === 'system' ? systemTheme() : current;\n };\n\n onMount(() => createSystemThemeListener(setSystemTheme));\n\n createEffect(\n on(\n () => props.theme,\n (propTheme) => {\n if (typeof propTheme === 'string') {\n setThemeState(propTheme);\n }\n },\n ),\n );\n applyRootThemeClass(resolvedTheme);\n\n return (\n <ThemeContext.Provider value={{ theme, setTheme, resolvedTheme }}>\n {props.children}\n </ThemeContext.Provider>\n );\n};\n\nexport const useTheme = (): ThemeContextValue => {\n const context = useContext(ThemeContext);\n if (!context) {\n throw new Error('useTheme must be used within a ThemeProvider');\n }\n return context;\n};\n"],"names":["ThemeContext","createContext","DEFAULT_STORAGE_KEY","DARK_THEME_QUERY","getSystemTheme","globalThis","matchMedia","matches","readStoredTheme","storageKey","defaultTheme","stored","localStorage","getItem","applyRootThemeClass","resolvedTheme","createEffect","on","resolved","root","document","documentElement","classList","toggle","createSystemThemeListener","setSystemTheme","mediaQuery","handleChange","mediaQueryEvent","addEventListener","removeEventListener","ThemeProvider","props","fallbackTheme","theme","setThemeState","createSignal","systemTheme","setTheme","newTheme","setItem","current","onMount","propTheme","_$createComponent","Provider","value","children","useTheme","context","useContext","Error"],"mappings":";;AAiBA,MAAMA,IAAeC,EAAAA,GACfC,IAAsB,SACtBC,IAAmB,gCAEnBC,IAAiBA,MACjB,OAAOC,WAAWC,cAAe,aAC5B,UAEFD,WAAWC,WAAWH,CAAgB,EAAEI,UAAU,SAAS,SAG9DC,IAAkBA,CAACC,GAAoBC,MAA+B;AAC1E,MAAI,EAAE,kBAAkBL;AACtB,WAAOK;AAET,QAAMC,IAASN,WAAWO,aAAaC,QAAQJ,CAAU;AACzD,SAAIE,MAAW,WAAWA,MAAW,UAAUA,MAAW,WACjDA,IAEFD;AACT,GAEMI,IAAsBA,CAACC,MAAgD;AAC3EC,EAAAA,EACEC,EAAGF,GAAgBG,CAAAA,MAAa;AAE9BC,IADaC,SAASC,gBACjBC,UAAUC,OAAO,QAAQL,MAAa,MAAM;AAAA,EACnD,CAAC,CACH;AACF,GAEMM,IAA4BA,CAChCC,MACiB;AACjB,MAAI,OAAOpB,WAAWC,cAAe;AACnC,WAAO,MAAY;AACjBmB,MAAAA,EAAerB,GAAgB;AAAA,IACjC;AAEF,QAAMsB,IAAarB,WAAWC,WAAWH,CAAgB,GACnDwB,IAAeA,CAACC,MAA+C;AACnEH,IAAAA,EAAeG,EAAgBrB,UAAU,SAAS,OAAO;AAAA,EAC3D;AACAmB,SAAAA,EAAWG,iBAAiB,UAAUF,CAAY,GAC3C,MAAY;AACjBD,IAAAA,EAAWI,oBAAoB,UAAUH,CAAY;AAAA,EACvD;AACF,GAEaI,IAAgDC,CAAAA,MAAU;AACrE,QAAMvB,IAAaA,MAAcuB,EAAMvB,cAAcP,GAC/C+B,IAAgBA,MAAaD,EAAMtB,gBAAgB,UACnD,CAACwB,GAAOC,CAAa,IAAIC,EAC7BJ,EAAME,SAAS1B,EAAgBC,KAAcwB,EAAAA,CAAe,CAC9D,GACM,CAACI,GAAaZ,CAAc,IAAIW,EAA+BhC,GAAgB,GAE/EkC,IAAWA,CAACC,MAA0B;AAC1CJ,IAAAA,EAAcI,CAAQ,GAClB,kBAAkBlC,cACpBA,WAAWO,aAAa4B,QAAQ/B,EAAAA,GAAc8B,CAAQ;AAAA,EAE1D,GAEMxB,IAAgBA,MAAwB;AAC5C,UAAM0B,IAAUP,EAAAA;AAChB,WAAOO,MAAY,WAAWJ,EAAAA,IAAgBI;AAAAA,EAChD;AAEAC,SAAAA,EAAQ,MAAMlB,EAA0BC,CAAc,CAAC,GAEvDT,EACEC,EACE,MAAMe,EAAME,OACXS,CAAAA,MAAc;AACb,IAAI,OAAOA,KAAc,YACvBR,EAAcQ,CAAS;AAAA,EAE3B,CACF,CACF,GACA7B,EAAoBC,CAAa,GAEjC6B,EACG5C,EAAa6C,UAAQ;AAAA,IAACC,OAAO;AAAA,MAAEZ,OAAAA;AAAAA,MAAOI,UAAAA;AAAAA,MAAUvB,eAAAA;AAAAA,IAAAA;AAAAA,IAAe,IAAAgC,WAAA;AAAA,aAC7Df,EAAMe;AAAAA,IAAQ;AAAA,EAAA,CAAA;AAGrB,GAEaC,IAAWA,MAAyB;AAC/C,QAAMC,IAAUC,EAAWlD,CAAY;AACvC,MAAI,CAACiD;AACH,UAAM,IAAIE,MAAM,8CAA8C;AAEhE,SAAOF;AACT;"}
@@ -1 +1 @@
1
- {"version":3,"file":"CheckboxField.js","sources":["../../../src/components/form/CheckboxField.tsx"],"sourcesContent":["import type { Component, ComponentProps, JSX } from \"solid-js\";\n\nimport {\n Checkbox,\n CheckboxControl,\n CheckboxIndicator,\n CheckboxLabel,\n} from \"@/components/Checkbox\";\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldError,\n} from \"@/components/Field\";\n\nimport { useFieldContext } from \"./context\";\n\nexport type CheckboxFieldProps = ComponentProps<typeof Checkbox> & {\n description?: string;\n label?: JSX.Element;\n};\n\nexport const CheckboxField: Component<CheckboxFieldProps> = (props) => {\n const field = useFieldContext<boolean>();\n const [local, others] = splitProps(props, [\n \"description\",\n \"label\",\n \"required\",\n \"disabled\",\n \"readOnly\",\n ]);\n\n return (\n <Field\n invalid={field().state.meta.errors.length > 0}\n required={local.required ?? false}\n disabled={local.disabled ?? false}\n readOnly={local.readOnly ?? false}\n >\n <FieldContent>\n <Checkbox\n checked={field().state.value}\n onCheckedChange={(details) => {\n field().handleChange(Boolean(details.checked));\n }}\n onBlur={() => {\n field().handleBlur();\n }}\n invalid={field().state.meta.errors.length > 0}\n disabled={local.disabled ?? false}\n readOnly={local.readOnly ?? false}\n required={local.required ?? false}\n {...others}\n >\n <CheckboxControl>\n <CheckboxIndicator />\n </CheckboxControl>\n <CheckboxLabel>{local.label}</CheckboxLabel>\n </Checkbox>\n <FieldError errors={field().state.meta.errors} />\n <FieldDescription>{local.description}</FieldDescription>\n </FieldContent>\n </Field>\n );\n};\n"],"names":["CheckboxField","props","field","useFieldContext","local","others","splitProps","_$createComponent","Field","invalid","state","meta","errors","length","required","disabled","readOnly","children","FieldContent","Checkbox","_$mergeProps","checked","value","onCheckedChange","details","handleChange","Boolean","onBlur","handleBlur","CheckboxControl","CheckboxIndicator","CheckboxLabel","label","FieldError","FieldDescription","description"],"mappings":";;;;;AAsBO,MAAMA,IAAgDC,CAAAA,MAAU;AACrE,QAAMC,IAAQC,EAAAA,GACR,CAACC,GAAOC,CAAM,IAAIC,EAAWL,GAAO,CACxC,eACA,SACA,YACA,YACA,UAAU,CACX;AAED,SAAAM,EACGC,GAAK;AAAA,IAAA,IACJC,UAAO;AAAA,aAAEP,EAAAA,EAAQQ,MAAMC,KAAKC,OAAOC,SAAS;AAAA,IAAC;AAAA,IAAA,IAC7CC,WAAQ;AAAA,aAAEV,EAAMU,YAAY;AAAA,IAAK;AAAA,IAAA,IACjCC,WAAQ;AAAA,aAAEX,EAAMW,YAAY;AAAA,IAAK;AAAA,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B,WAAA;AAAA,qBAAEb,EAAM+B;AAAAA,YAAW;AAAA,UAAA,CAAA,CAAA;AAAA,QAAA;AAAA,MAAA,CAAA;AAAA,IAAA;AAAA,EAAA,CAAA;AAI5C;"}
1
+ {"version":3,"file":"CheckboxField.js","sources":["../../../src/components/form/CheckboxField.tsx"],"sourcesContent":["import type { Component, ComponentProps, JSX } from 'solid-js';\n\nimport { Checkbox, CheckboxControl, CheckboxIndicator, CheckboxLabel } from '@/components/Checkbox';\nimport { Field, FieldContent, FieldDescription, FieldError } from '@/components/Field';\n\nimport { useFieldContext } from './context';\n\nexport type CheckboxFieldProps = ComponentProps<typeof Checkbox> & {\n description?: string;\n label?: JSX.Element;\n};\n\nexport const CheckboxField: Component<CheckboxFieldProps> = (props) => {\n const field = useFieldContext<boolean>();\n const [local, others] = splitProps(props, [\n 'description',\n 'label',\n 'required',\n 'disabled',\n 'readOnly',\n ]);\n\n return (\n <Field\n invalid={field().state.meta.errors.length > 0}\n required={local.required ?? false}\n disabled={local.disabled ?? false}\n readOnly={local.readOnly ?? false}\n >\n <FieldContent>\n <Checkbox\n checked={field().state.value}\n onCheckedChange={(details) => {\n field().handleChange(Boolean(details.checked));\n }}\n onBlur={() => {\n field().handleBlur();\n }}\n invalid={field().state.meta.errors.length > 0}\n disabled={local.disabled ?? false}\n readOnly={local.readOnly ?? false}\n required={local.required ?? false}\n {...others}\n >\n <CheckboxControl>\n <CheckboxIndicator />\n </CheckboxControl>\n <CheckboxLabel>{local.label}</CheckboxLabel>\n </Checkbox>\n <FieldError errors={field().state.meta.errors} />\n <FieldDescription>{local.description}</FieldDescription>\n </FieldContent>\n </Field>\n );\n};\n"],"names":["CheckboxField","props","field","useFieldContext","local","others","splitProps","_$createComponent","Field","invalid","state","meta","errors","length","required","disabled","readOnly","children","FieldContent","Checkbox","_$mergeProps","checked","value","onCheckedChange","details","handleChange","Boolean","onBlur","handleBlur","CheckboxControl","CheckboxIndicator","CheckboxLabel","label","FieldError","FieldDescription","description"],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AAAA,gBAAA,IAAAZ,WAAA;AAAA,yBAAAV,EACbuB,GAAiB,EAAA;AAAA,gBAAA;AAAA,cAAA,CAAA,GAAAvB,EAEnBwB,GAAa;AAAA,gBAAA,IAAAd,WAAA;AAAA,yBAAEb,EAAM4B;AAAAA,gBAAK;AAAA,cAAA,CAAA,CAAA;AAAA,YAAA;AAAA,UAAA,CAAA,CAAA,GAAAzB,EAE5B0B,GAAU;AAAA,YAAA,IAACrB,SAAM;AAAA,qBAAEV,EAAAA,EAAQQ,MAAMC,KAAKC;AAAAA,YAAM;AAAA,UAAA,CAAA,GAAAL,EAC5C2B,GAAgB;AAAA,YAAA,IAAAjB,WAAA;AAAA,qBAAEb,EAAM+B;AAAAA,YAAW;AAAA,UAAA,CAAA,CAAA;AAAA,QAAA;AAAA,MAAA,CAAA;AAAA,IAAA;AAAA,EAAA,CAAA;AAI5C;"}
@@ -1 +1 @@
1
- {"version":3,"file":"DatePickerField.js","sources":["../../../src/components/form/DatePickerField.tsx"],"sourcesContent":["import type {\n DatePickerInputProps,\n DatePickerRootProps,\n DateValue,\n} from \"@ark-ui/solid\";\nimport type { Component } from \"solid-js\";\n\nimport {\n DatePicker,\n DatePickerContent,\n DatePickerControl,\n DatePickerInput,\n DatePickerPositioner,\n DatePickerTrigger,\n DatePickerViews,\n} from \"@/components/DatePicker\";\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldError,\n FieldLabel,\n} from \"@/components/Field\";\n\nimport { useFieldContext } from \"./context\";\n\nexport type DatePickerFieldProps = DatePickerRootProps & {\n label?: string;\n description?: string;\n};\n\nconst DatePickerInputGroup: Component<DatePickerInputProps> = (props) => (\n <>\n <DatePickerControl>\n <DatePickerInput {...props} />\n <DatePickerTrigger />\n </DatePickerControl>\n <DatePickerPositioner>\n <DatePickerContent>\n <DatePickerViews />\n </DatePickerContent>\n </DatePickerPositioner>\n </>\n);\n\nconst DATE_PICKER_FIELD_PROPS = [\n \"label\",\n \"description\",\n \"required\",\n \"disabled\",\n \"readOnly\",\n \"placeholder\",\n] as const;\n\nexport const DatePickerField: Component<DatePickerFieldProps> = (props) => {\n const field = useFieldContext<DateValue[]>();\n const [local, others] = splitProps(props, DATE_PICKER_FIELD_PROPS);\n\n return (\n <Field\n invalid={field().state.meta.errors.length > 0}\n disabled={local.disabled ?? false}\n readOnly={local.readOnly ?? false}\n required={local.required ?? false}\n >\n <FieldLabel>{local.label}</FieldLabel>\n <FieldContent>\n <DatePicker\n value={field().state.value}\n onValueChange={(details) => {\n field().handleChange(details.value);\n }}\n onBlur={() => {\n field().handleBlur();\n }}\n invalid={field().state.meta.errors.length > 0}\n disabled={local.disabled ?? false}\n readOnly={local.readOnly ?? false}\n {...others}\n >\n <DatePickerInputGroup placeholder={local.placeholder} />\n </DatePicker>\n <FieldError errors={field().state.meta.errors} />\n <FieldDescription>{local.description}</FieldDescription>\n </FieldContent>\n </Field>\n );\n};\n"],"names":["DatePickerInputGroup","props","_$createComponent","DatePickerControl","children","DatePickerInput","DatePickerTrigger","DatePickerPositioner","DatePickerContent","DatePickerViews","DATE_PICKER_FIELD_PROPS","DatePickerField","field","useFieldContext","local","others","splitProps","Field","invalid","state","meta","errors","length","disabled","readOnly","required","FieldLabel","label","FieldContent","DatePicker","_$mergeProps","value","onValueChange","details","handleChange","onBlur","handleBlur","placeholder","FieldError","FieldDescription","description"],"mappings":";;;;;AA+BA,MAAMA,IAAyDC,CAAAA,MAAK,CAAAC,EAE/DC,GAAiB;AAAA,EAAA,IAAAC,WAAA;AAAA,WAAA,CAAAF,EACfG,GAAoBJ,CAAK,GAAAC,EACzBI,GAAiB,CAAA,CAAA,CAAA;AAAA,EAAA;AAAA,CAAA,GAAAJ,EAEnBK,GAAoB;AAAA,EAAA,IAAAH,WAAA;AAAA,WAAAF,EAClBM,GAAiB;AAAA,MAAA,IAAAJ,WAAA;AAAA,eAAAF,EACfO,GAAe,EAAA;AAAA,MAAA;AAAA,IAAA,CAAA;AAAA,EAAA;AAAA,CAAA,CAAA,G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BAAAF,EAETF,GAAoB;AAAA,gBAAA,IAACqC,cAAW;AAAA,yBAAEvB,EAAMuB;AAAAA,gBAAW;AAAA,cAAA,CAAA;AAAA,YAAA;AAAA,UAAA,CAAA,CAAA,GAAAnC,EAErDoC,GAAU;AAAA,YAAA,IAACjB,SAAM;AAAA,qBAAET,EAAAA,EAAQO,MAAMC,KAAKC;AAAAA,YAAM;AAAA,UAAA,CAAA,GAAAnB,EAC5CqC,GAAgB;AAAA,YAAA,IAAAnC,WAAA;AAAA,qBAAEU,EAAM0B;AAAAA,YAAW;AAAA,UAAA,CAAA,CAAA;AAAA,QAAA;AAAA,MAAA,CAAA,CAAA;AAAA,IAAA;AAAA,EAAA,CAAA;AAI5C;"}
1
+ {"version":3,"file":"DatePickerField.js","sources":["../../../src/components/form/DatePickerField.tsx"],"sourcesContent":["import type { DatePickerInputProps, DatePickerRootProps, DateValue } from '@ark-ui/solid';\nimport type { Component } from 'solid-js';\n\nimport {\n DatePicker,\n DatePickerContent,\n DatePickerControl,\n DatePickerInput,\n DatePickerPositioner,\n DatePickerTrigger,\n DatePickerViews,\n} from '@/components/DatePicker';\nimport { Field, FieldContent, FieldDescription, FieldError, FieldLabel } from '@/components/Field';\n\nimport { useFieldContext } from './context';\n\nexport type DatePickerFieldProps = DatePickerRootProps & {\n label?: string;\n description?: string;\n};\n\nconst DatePickerInputGroup: Component<DatePickerInputProps> = (props) => (\n <>\n <DatePickerControl>\n <DatePickerInput {...props} />\n <DatePickerTrigger />\n </DatePickerControl>\n <DatePickerPositioner>\n <DatePickerContent>\n <DatePickerViews />\n </DatePickerContent>\n </DatePickerPositioner>\n </>\n);\n\nconst DATE_PICKER_FIELD_PROPS = [\n 'label',\n 'description',\n 'required',\n 'disabled',\n 'readOnly',\n 'placeholder',\n] as const;\n\nexport const DatePickerField: Component<DatePickerFieldProps> = (props) => {\n const field = useFieldContext<DateValue[]>();\n const [local, others] = splitProps(props, DATE_PICKER_FIELD_PROPS);\n\n return (\n <Field\n invalid={field().state.meta.errors.length > 0}\n disabled={local.disabled ?? false}\n readOnly={local.readOnly ?? false}\n required={local.required ?? false}\n >\n <FieldLabel>{local.label}</FieldLabel>\n <FieldContent>\n <DatePicker\n value={field().state.value}\n onValueChange={(details) => {\n field().handleChange(details.value);\n }}\n onBlur={() => {\n field().handleBlur();\n }}\n invalid={field().state.meta.errors.length > 0}\n disabled={local.disabled ?? false}\n readOnly={local.readOnly ?? false}\n {...others}\n >\n <DatePickerInputGroup placeholder={local.placeholder} />\n </DatePicker>\n <FieldError errors={field().state.meta.errors} />\n <FieldDescription>{local.description}</FieldDescription>\n </FieldContent>\n </Field>\n );\n};\n"],"names":["DatePickerInputGroup","props","_$createComponent","DatePickerControl","children","DatePickerInput","DatePickerTrigger","DatePickerPositioner","DatePickerContent","DatePickerViews","DATE_PICKER_FIELD_PROPS","DatePickerField","field","useFieldContext","local","others","splitProps","Field","invalid","state","meta","errors","length","disabled","readOnly","required","FieldLabel","label","FieldContent","DatePicker","_$mergeProps","value","onValueChange","details","handleChange","onBlur","handleBlur","placeholder","FieldError","FieldDescription","description"],"mappings":";;;;;AAqBA,MAAMA,IAAyDC,CAAAA,MAAK,CAAAC,EAE/DC,GAAiB;AAAA,EAAA,IAAAC,WAAA;AAAA,WAAA,CAAAF,EACfG,GAAoBJ,CAAK,GAAAC,EACzBI,GAAiB,CAAA,CAAA,CAAA;AAAA,EAAA;AAAA,CAAA,GAAAJ,EAEnBK,GAAoB;AAAA,EAAA,IAAAH,WAAA;AAAA,WAAAF,EAClBM,GAAiB;AAAA,MAAA,IAAAJ,WAAA;AAAA,eAAAF,EACfO,GAAe,EAAA;AAAA,MAAA;AAAA,IAAA,CAAA;AAAA,EAAA;AAAA,CAAA,CAAA,GAMlBC,IAA0B,CAC9B,SACA,eACA,YACA,YACA,YACA,aAAa,GAGFC,IAAoDV,CAAAA,MAAU;AACzE,QAAMW,IAAQC,EAAAA,GACR,CAACC,GAAOC,CAAM,IAAIC,EAAWf,GAAOS,CAA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AAU;AAAA,YAAA,IAACjB,SAAM;AAAA,qBAAET,EAAAA,EAAQO,MAAMC,KAAKC;AAAAA,YAAM;AAAA,UAAA,CAAA,GAAAnB,EAC5CqC,GAAgB;AAAA,YAAA,IAAAnC,WAAA;AAAA,qBAAEU,EAAM0B;AAAAA,YAAW;AAAA,UAAA,CAAA,CAAA;AAAA,QAAA;AAAA,MAAA,CAAA,CAAA;AAAA,IAAA;AAAA,EAAA,CAAA;AAI5C;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Form.js","sources":["../../../src/components/form/Form.tsx"],"sourcesContent":["import { createFormHook } from \"@tanstack/solid-form\";\n\nimport { CheckboxField } from \"./CheckboxField\";\nimport { ComboboxField } from \"./ComboboxField\";\nimport { formContext, fieldContext } from \"./context\";\nimport { DatePickerField } from \"./DatePickerField\";\nimport { NumberInputField } from \"./NumberInputField\";\nimport { PasswordInputField } from \"./PasswordInputField\";\nimport { PinInputField } from \"./PinInputField\";\nimport { RadioGroupField } from \"./RadioGroupField\";\nimport { SelectField } from \"./SelectField\";\nimport { SliderField } from \"./SliderField\";\nimport { SubmitButton } from \"./SubmitButton\";\nimport { SwitchField } from \"./SwitchField\";\nimport { TagsInputField } from \"./TagsInputField\";\nimport { TextareaField } from \"./TextareaField\";\nimport { TextInputField } from \"./TextInputField\";\n\nexport const { useAppForm, withForm, withFieldGroup } = createFormHook({\n formContext,\n fieldContext,\n fieldComponents: {\n CheckboxField,\n ComboboxField,\n DatePickerField,\n NumberInputField,\n PasswordInputField,\n PinInputField,\n RadioGroupField,\n SelectField,\n SliderField,\n SwitchField,\n TagsInputField,\n TextInputField,\n TextareaField,\n },\n formComponents: {\n SubmitButton,\n },\n});\n"],"names":["useAppForm","withForm","withFieldGroup","createFormHook","formContext","fieldContext","fieldComponents","CheckboxField","ComboboxField","DatePickerField","NumberInputField","PasswordInputField","PinInputField","RadioGroupField","SelectField","SliderField","SwitchField","TagsInputField","TextInputField","TextareaField","formComponents","SubmitButton"],"mappings":";;;;;;;;;;;;;;;;AAkBO,MAAM;AAAA,EAAEA,YAAAA;AAAAA,EAAYC,UAAAA;AAAAA,EAAUC,gBAAAA;AAAe,IAAIC,EAAe;AAAA,EACrEC,aAAAA;AAAAA,EACAC,cAAAA;AAAAA,EACAC,iBAAiB;AAAA,IACfC,eAAAA;AAAAA,IACAC,eAAAA;AAAAA,IACAC,iBAAAA;AAAAA,IACAC,kBAAAA;AAAAA,IACAC,oBAAAA;AAAAA,IACAC,eAAAA;AAAAA,IACAC,iBAAAA;AAAAA,IACAC,aAAAA;AAAAA,IACAC,aAAAA;AAAAA,IACAC,aAAAA;AAAAA,IACAC,gBAAAA;AAAAA,IACAC,gBAAAA;AAAAA,IACAC,eAAAA;AAAAA,EAAAA;AAAAA,EAEFC,gBAAgB;AAAA,IACdC,cAAAA;AAAAA,EAAAA;AAEJ,CAAC;"}
1
+ {"version":3,"file":"Form.js","sources":["../../../src/components/form/Form.tsx"],"sourcesContent":["import { createFormHook } from '@tanstack/solid-form';\n\nimport { CheckboxField } from './CheckboxField';\nimport { ComboboxField } from './ComboboxField';\nimport { formContext, fieldContext } from './context';\nimport { DatePickerField } from './DatePickerField';\nimport { NumberInputField } from './NumberInputField';\nimport { PasswordInputField } from './PasswordInputField';\nimport { PinInputField } from './PinInputField';\nimport { RadioGroupField } from './RadioGroupField';\nimport { SelectField } from './SelectField';\nimport { SliderField } from './SliderField';\nimport { SubmitButton } from './SubmitButton';\nimport { SwitchField } from './SwitchField';\nimport { TagsInputField } from './TagsInputField';\nimport { TextareaField } from './TextareaField';\nimport { TextInputField } from './TextInputField';\n\nexport const { useAppForm, withForm, withFieldGroup } = createFormHook({\n formContext,\n fieldContext,\n fieldComponents: {\n CheckboxField,\n ComboboxField,\n DatePickerField,\n NumberInputField,\n PasswordInputField,\n PinInputField,\n RadioGroupField,\n SelectField,\n SliderField,\n SwitchField,\n TagsInputField,\n TextInputField,\n TextareaField,\n },\n formComponents: {\n SubmitButton,\n },\n});\n"],"names":["useAppForm","withForm","withFieldGroup","createFormHook","formContext","fieldContext","fieldComponents","CheckboxField","ComboboxField","DatePickerField","NumberInputField","PasswordInputField","PinInputField","RadioGroupField","SelectField","SliderField","SwitchField","TagsInputField","TextInputField","TextareaField","formComponents","SubmitButton"],"mappings":";;;;;;;;;;;;;;;;AAkBO,MAAM;AAAA,EAAEA,YAAAA;AAAAA,EAAYC,UAAAA;AAAAA,EAAUC,gBAAAA;AAAe,IAAIC,EAAe;AAAA,EACrEC,aAAAA;AAAAA,EACAC,cAAAA;AAAAA,EACAC,iBAAiB;AAAA,IACfC,eAAAA;AAAAA,IACAC,eAAAA;AAAAA,IACAC,iBAAAA;AAAAA,IACAC,kBAAAA;AAAAA,IACAC,oBAAAA;AAAAA,IACAC,eAAAA;AAAAA,IACAC,iBAAAA;AAAAA,IACAC,aAAAA;AAAAA,IACAC,aAAAA;AAAAA,IACAC,aAAAA;AAAAA,IACAC,gBAAAA;AAAAA,IACAC,gBAAAA;AAAAA,IACAC,eAAAA;AAAAA,EAAAA;AAAAA,EAEFC,gBAAgB;AAAA,IACdC,cAAAA;AAAAA,EAAAA;AAEJ,CAAC;"}
@@ -1 +1 @@
1
- {"version":3,"file":"NumberInputField.js","sources":["../../../src/components/form/NumberInputField.tsx"],"sourcesContent":["import type { Component, ComponentProps } from \"solid-js\";\n\nimport {\n Field,\n FieldLabel,\n FieldContent,\n FieldError,\n FieldDescription,\n} from \"@/components/Field\";\nimport {\n NumberInput,\n NumberInputControl,\n NumberInputInput,\n NumberInputTriggers,\n} from \"@/components/NumberInput\";\n\nimport { useFieldContext } from \"./context\";\n\nexport type NumberInputFieldProps = ComponentProps<typeof NumberInput> & {\n label?: string;\n description?: string;\n triggers?: boolean;\n};\n\nexport const NumberInputField: Component<NumberInputFieldProps> = (props) => {\n const field = useFieldContext<number>();\n const [local, others] = splitProps(props, [\n \"label\",\n \"description\",\n \"required\",\n \"disabled\",\n \"readOnly\",\n \"triggers\",\n ]);\n\n return (\n <Field\n invalid={field().state.meta.errors.length > 0}\n required={local.required ?? false}\n disabled={local.disabled ?? false}\n readOnly={local.readOnly ?? false}\n >\n <FieldLabel>{local.label}</FieldLabel>\n <FieldContent>\n <NumberInput\n value={String(field().state.value)}\n onValueChange={(details) => {\n field().handleChange(details.valueAsNumber);\n }}\n onBlur={() => {\n field().handleBlur();\n }}\n invalid={field().state.meta.errors.length > 0}\n disabled={local.disabled ?? false}\n readOnly={local.readOnly ?? false}\n required={local.required ?? false}\n {...others}\n >\n <NumberInputControl>\n <NumberInputInput />\n <Show when={local.triggers !== false}>\n <NumberInputTriggers />\n </Show>\n </NumberInputControl>\n </NumberInput>\n <FieldError errors={field().state.meta.errors} />\n <FieldDescription>{local.description}</FieldDescription>\n </FieldContent>\n </Field>\n );\n};\n"],"names":["NumberInputField","props","field","useFieldContext","local","others","splitProps","_$createComponent","Field","invalid","state","meta","errors","length","required","disabled","readOnly","children","FieldLabel","label","FieldContent","NumberInput","_$mergeProps","value","String","onValueChange","details","handleChange","valueAsNumber","onBlur","handleBlur","NumberInputControl","NumberInputInput","_$Show","when","triggers","NumberInputTriggers","FieldError","FieldDescription","description"],"mappings":";;;;;AAwBO,MAAMA,IAAsDC,CAAAA,MAAU;AAC3E,QAAMC,IAAQC,EAAAA,GACR,CAACC,GAAOC,CAAM,IAAIC,EAAWL,GAAO,CACxC,SACA,eACA,YACA,YACA,YACA,UAAU,CACX;AAED,SAAAM,EACGC,GAAK;AAAA,IAAA,IACJC,UAAO;AAAA,aAAEP,EAAAA,EAAQQ,MAAMC,KAAKC,OAAOC,SAAS;AAAA,IAAC;AAAA,IAAA,IAC7CC,WAAQ;AAAA,aAAEV,EAAMU,YAAY;AAAA,IAAK;AAAA,IAAA,IACjCC,WAAQ;AAAA,aAAEX,EAAMW,YAAY;AAAA,IAAK;AAAA,IAAA,IACjCC,WAAQ;AAAA,aAAEZ,EAAMY,YAAY;AAAA,IAAK;AAAA,IAAA,IAAAC,WAAA;AAAA,aAAA,CAAAV,EAEhCW,GAA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AAM;AAAA,UAAA,CAAA,GAAAL,EAC5C+B,GAAgB;AAAA,YAAA,IAAArB,WAAA;AAAA,qBAAEb,EAAMmC;AAAAA,YAAW;AAAA,UAAA,CAAA,CAAA;AAAA,QAAA;AAAA,MAAA,CAAA,CAAA;AAAA,IAAA;AAAA,EAAA,CAAA;AAI5C;"}
1
+ {"version":3,"file":"NumberInputField.js","sources":["../../../src/components/form/NumberInputField.tsx"],"sourcesContent":["import type { Component, ComponentProps } from 'solid-js';\n\nimport { Field, FieldLabel, FieldContent, FieldError, FieldDescription } from '@/components/Field';\nimport {\n NumberInput,\n NumberInputControl,\n NumberInputInput,\n NumberInputTriggers,\n} from '@/components/NumberInput';\n\nimport { useFieldContext } from './context';\n\nexport type NumberInputFieldProps = ComponentProps<typeof NumberInput> & {\n label?: string;\n description?: string;\n triggers?: boolean;\n};\n\nexport const NumberInputField: Component<NumberInputFieldProps> = (props) => {\n const field = useFieldContext<number>();\n const [local, others] = splitProps(props, [\n 'label',\n 'description',\n 'required',\n 'disabled',\n 'readOnly',\n 'triggers',\n ]);\n\n return (\n <Field\n invalid={field().state.meta.errors.length > 0}\n required={local.required ?? false}\n disabled={local.disabled ?? false}\n readOnly={local.readOnly ?? false}\n >\n <FieldLabel>{local.label}</FieldLabel>\n <FieldContent>\n <NumberInput\n value={String(field().state.value)}\n onValueChange={(details) => {\n field().handleChange(details.valueAsNumber);\n }}\n onBlur={() => {\n field().handleBlur();\n }}\n invalid={field().state.meta.errors.length > 0}\n disabled={local.disabled ?? false}\n readOnly={local.readOnly ?? false}\n required={local.required ?? false}\n {...others}\n >\n <NumberInputControl>\n <NumberInputInput />\n <Show when={local.triggers !== false}>\n <NumberInputTriggers />\n </Show>\n </NumberInputControl>\n </NumberInput>\n <FieldError errors={field().state.meta.errors} />\n <FieldDescription>{local.description}</FieldDescription>\n </FieldContent>\n </Field>\n );\n};\n"],"names":["NumberInputField","props","field","useFieldContext","local","others","splitProps","_$createComponent","Field","invalid","state","meta","errors","length","required","disabled","readOnly","children","FieldLabel","label","FieldContent","NumberInput","_$mergeProps","value","String","onValueChange","details","handleChange","valueAsNumber","onBlur","handleBlur","NumberInputControl","NumberInputInput","_$Show","when","triggers","NumberInputTriggers","FieldError","FieldDescription","description"],"mappings":";;;;;AAkBO,MAAMA,IAAsDC,CAAAA,MAAU;AAC3E,QAAMC,IAAQC,EAAAA,GACR,CAACC,GAAOC,CAAM,IAAIC,EAAWL,GAAO,CACxC,SACA,eACA,YACA,YACA,YACA,UAAU,CACX;AAED,SAAAM,EACGC,GAAK;AAAA,IAAA,IACJC,UAAO;AAAA,aAAEP,EAAAA,EAAQQ,MAAMC,KAAKC,OAAOC,SAAS;AAAA,IAAC;AAAA,IAAA,IAC7CC,WAAQ;AAAA,aAAEV,EAAMU,YAAY;AAAA,IAAK;AAAA,IAAA,IACjCC,WAAQ;AAAA,aAAEX,EAAMW,YAAY;AAAA,IAAK;AAAA,IAAA,IACjCC,WAAQ;AAAA,aAAEZ,EAAMY,YAAY;AAAA,IAAK;AAAA,IAAA,IAAAC,WAAA;AAAA,aAAA,CAAAV,EAEhCW,GAAU;AAAA,QAAA,IAAAD,WAAA;AAAA,iBAAEb,EAAMe;AAAAA,QAAK;AAAA,MAAA,CAAA,GAAAZ,EACvBa,GAAY;AAAA,QAAA,IAAAH,WAAA;AAAA,iBAAA,CAAAV,EACVc,GAAWC,EAAA;AAAA,YAAA,IACVC,QAAK;AAAA,qBAAEC,OAAOtB,IAAQQ,MAAMa,KAAK;AAAA,YAAC;AAAA,YAClCE,eAAgBC,CAAAA,MAAY;AAC1BxB,cAAAA,IAAQyB,aAAaD,EAAQE,aAAa;AAAA,YAC5C;AAAA,YACAC,QAAQA,MAAM;AACZ3B,cAAAA,EAAAA,EAAQ4B,WAAAA;AAAAA,YACV;AAAA,YAAC,IACDrB,UAAO;AAAA,qBAAEP,EAAAA,EAAQQ,MAAMC,KAAKC,OAAOC,SAAS;AAAA,YAAC;AAAA,YAAA,IAC7CE,WAAQ;AAAA,qBAAEX,EAAMW,YAAY;AAAA,YAAK;AAAA,YAAA,IACjCC,WAAQ;AAAA,qBAAEZ,EAAMY,YAAY;AAAA,YAAK;AAAA,YAAA,IACjCF,WAAQ;AAAA,qBAAEV,EAAMU,YAAY;AAAA,YAAK;AAAA,UAAA,GAC7BT,GAAM;AAAA,YAAA,IAAAY,WAAA;AAAA,qBAAAV,EAETwB,GAAkB;AAAA,gBAAA,IAAAd,WAAA;AAAA,yBAAA,CAAAV,EAChByB,GAAgB,CAAA,CAAA,GAAAzB,EAChB0B,GAAI;AAAA,oBAAA,IAACC,OAAI;AAAA,6BAAE9B,EAAM+B,aAAa;AAAA,oBAAK;AAAA,oBAAA,IAAAlB,WAAA;AAAA,6BAAAV,EACjC6B,GAAmB,EAAA;AAAA,oBAAA;AAAA,kBAAA,CAAA,CAAA;AAAA,gBAAA;AAAA,cAAA,CAAA;AAAA,YAAA;AAAA,UAAA,CAAA,CAAA,GAAA7B,EAIzB8B,GAAU;AAAA,YAAA,IAACzB,SAAM;AAAA,qBAAEV,EAAAA,EAAQQ,MAAMC,KAAKC;AAAAA,YAAM;AAAA,UAAA,CAAA,GAAAL,EAC5C+B,GAAgB;AAAA,YAAA,IAAArB,WAAA;AAAA,qBAAEb,EAAMmC;AAAAA,YAAW;AAAA,UAAA,CAAA,CAAA;AAAA,QAAA;AAAA,MAAA,CAAA,CAAA;AAAA,IAAA;AAAA,EAAA,CAAA;AAI5C;"}
@@ -1 +1 @@
1
- {"version":3,"file":"PasswordInputField.js","sources":["../../../src/components/form/PasswordInputField.tsx"],"sourcesContent":["import { splitProps, type Component, type ComponentProps } from \"solid-js\";\n\nimport {\n Field,\n FieldLabel,\n FieldContent,\n FieldError,\n FieldDescription,\n} from \"@/components/Field\";\nimport {\n PasswordInput,\n PasswordInputControl,\n PasswordInputInput,\n PasswordInputVisibilityTrigger,\n PasswordInputIndicator,\n} from \"@/components/PasswordInput\";\n\nimport { useFieldContext } from \"./context\";\n\nexport type PasswordInputFieldProps = ComponentProps<\n typeof PasswordInputInput\n> & {\n label?: string;\n description?: string;\n};\n\nexport const PasswordInputField: Component<PasswordInputFieldProps> = (\n props,\n) => {\n const field = useFieldContext<string>();\n const [local, others] = splitProps(props, [\n \"label\",\n \"description\",\n \"required\",\n \"disabled\",\n \"readOnly\",\n ]);\n\n return (\n <Field\n invalid={field().state.meta.errors.length > 0}\n required={local.required ?? false}\n disabled={local.disabled ?? false}\n readOnly={local.readOnly ?? false}\n >\n <FieldLabel>{local.label}</FieldLabel>\n <FieldContent>\n <PasswordInput\n invalid={field().state.meta.errors.length > 0}\n disabled={local.disabled ?? false}\n readOnly={local.readOnly ?? false}\n required={local.required ?? false}\n >\n <PasswordInputControl>\n <PasswordInputInput\n value={field().state.value}\n onInput={(event) => {\n field().handleChange(event.target.value);\n }}\n onBlur={() => {\n field().handleBlur();\n }}\n {...others}\n />\n <PasswordInputVisibilityTrigger>\n <PasswordInputIndicator />\n </PasswordInputVisibilityTrigger>\n </PasswordInputControl>\n </PasswordInput>\n <FieldError errors={field().state.meta.errors} />\n <FieldDescription>{local.description}</FieldDescription>\n </FieldContent>\n </Field>\n );\n};\n"],"names":["PasswordInputField","props","field","useFieldContext","local","others","splitProps","_$createComponent","Field","invalid","state","meta","errors","length","required","disabled","readOnly","children","FieldLabel","label","FieldContent","PasswordInput","PasswordInputControl","PasswordInputInput","_$mergeProps","value","onInput","event","handleChange","target","onBlur","handleBlur","PasswordInputVisibilityTrigger","PasswordInputIndicator","FieldError","FieldDescription","description"],"mappings":";;;;;AA0BO,MAAMA,IACXC,CAAAA,MACG;AACH,QAAMC,IAAQC,EAAAA,GACR,CAACC,GAAOC,CAAM,IAAIC,EAAWL,GAAO,CACxC,SACA,eACA,YACA,YACA,UAAU,CACX;AAED,SAAAM,EACGC,GAAK;AAAA,IAAA,IACJC,UAAO;AAAA,aAAEP,EAAAA,EAAQQ,MAAMC,KAAKC,OAAOC,SAAS;AAAA,IAAC;AAAA,IAAA,IAC7CC,WAA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,CAAA;AAAA,gBAAA;AAAA,cAAA,CAAA;AAAA,YAAA;AAAA,UAAA,CAAA,GAAA1B,EAI5B2B,GAAU;AAAA,YAAA,IAACtB,SAAM;AAAA,qBAAEV,EAAAA,EAAQQ,MAAMC,KAAKC;AAAAA,YAAM;AAAA,UAAA,CAAA,GAAAL,EAC5C4B,GAAgB;AAAA,YAAA,IAAAlB,WAAA;AAAA,qBAAEb,EAAMgC;AAAAA,YAAW;AAAA,UAAA,CAAA,CAAA;AAAA,QAAA;AAAA,MAAA,CAAA,CAAA;AAAA,IAAA;AAAA,EAAA,CAAA;AAI5C;"}
1
+ {"version":3,"file":"PasswordInputField.js","sources":["../../../src/components/form/PasswordInputField.tsx"],"sourcesContent":["import { splitProps, type Component, type ComponentProps } from 'solid-js';\n\nimport { Field, FieldLabel, FieldContent, FieldError, FieldDescription } from '@/components/Field';\nimport {\n PasswordInput,\n PasswordInputControl,\n PasswordInputInput,\n PasswordInputVisibilityTrigger,\n PasswordInputIndicator,\n} from '@/components/PasswordInput';\n\nimport { useFieldContext } from './context';\n\nexport type PasswordInputFieldProps = ComponentProps<typeof PasswordInputInput> & {\n label?: string;\n description?: string;\n};\n\nexport const PasswordInputField: Component<PasswordInputFieldProps> = (props) => {\n const field = useFieldContext<string>();\n const [local, others] = splitProps(props, [\n 'label',\n 'description',\n 'required',\n 'disabled',\n 'readOnly',\n ]);\n\n return (\n <Field\n invalid={field().state.meta.errors.length > 0}\n required={local.required ?? false}\n disabled={local.disabled ?? false}\n readOnly={local.readOnly ?? false}\n >\n <FieldLabel>{local.label}</FieldLabel>\n <FieldContent>\n <PasswordInput\n invalid={field().state.meta.errors.length > 0}\n disabled={local.disabled ?? false}\n readOnly={local.readOnly ?? false}\n required={local.required ?? false}\n >\n <PasswordInputControl>\n <PasswordInputInput\n value={field().state.value}\n onInput={(event) => {\n field().handleChange(event.target.value);\n }}\n onBlur={() => {\n field().handleBlur();\n }}\n {...others}\n />\n <PasswordInputVisibilityTrigger>\n <PasswordInputIndicator />\n </PasswordInputVisibilityTrigger>\n </PasswordInputControl>\n </PasswordInput>\n <FieldError errors={field().state.meta.errors} />\n <FieldDescription>{local.description}</FieldDescription>\n </FieldContent>\n </Field>\n );\n};\n"],"names":["PasswordInputField","props","field","useFieldContext","local","others","splitProps","_$createComponent","Field","invalid","state","meta","errors","length","required","disabled","readOnly","children","FieldLabel","label","FieldContent","PasswordInput","PasswordInputControl","PasswordInputInput","_$mergeProps","value","onInput","event","handleChange","target","onBlur","handleBlur","PasswordInputVisibilityTrigger","PasswordInputIndicator","FieldError","FieldDescription","description"],"mappings":";;;;;AAkBO,MAAMA,IAA0DC,CAAAA,MAAU;AAC/E,QAAMC,IAAQC,EAAAA,GACR,CAACC,GAAOC,CAAM,IAAIC,EAAWL,GAAO,CACxC,SACA,eACA,YACA,YACA,UAAU,CACX;AAED,SAAAM,EACGC,GAAK;AAAA,IAAA,IACJC,UAAO;AAAA,aAAEP,EAAAA,EAAQQ,MAAMC,KAAKC,OAAOC,SAAS;AAAA,IAAC;AAAA,IAAA,IAC7CC,WAAQ;AAAA,aAAEV,EAAMU,YAAY;AAAA,IAAK;AAAA,IAAA,IACjCC,WAAQ;AAAA,aAAEX,EAAMW,YAAY;AAAA,IAAK;AAAA,IAAA,IACjCC,WAAQ;AAAA,aAAEZ,EAAMY,YAAY;AAAA,IAAK;AAAA,IAAA,IAAAC,WAAA;AAAA,aAAA,CAAAV,EAEhCW,GAAU;AAAA,QAAA,IAAAD,WAAA;AAAA,iBAAEb,EAAMe;AAAAA,QAAK;AAAA,MAAA,CAAA,GAAAZ,EACvBa,GAAY;AAAA,QAAA,IAAAH,WAAA;AAAA,iBAAA,CAAAV,EACVc,GAAa;AAAA,YAAA,IACZZ,UAAO;AAAA,qBAAEP,EAAAA,EAAQQ,MAAMC,KAAKC,OAAOC,SAAS;AAAA,YAAC;AAAA,YAAA,IAC7CE,WAAQ;AAAA,qBAAEX,EAAMW,YAAY;AAAA,YAAK;AAAA,YAAA,IACjCC,WAAQ;AAAA,qBAAEZ,EAAMY,YAAY;AAAA,YAAK;AAAA,YAAA,IACjCF,WAAQ;AAAA,qBAAEV,EAAMU,YAAY;AAAA,YAAK;AAAA,YAAA,IAAAG,WAAA;AAAA,qBAAAV,EAEhCe,GAAoB;AAAA,gBAAA,IAAAL,WAAA;AAAA,yBAAA,CAAAV,EAClBgB,GAAkBC,EAAA;AAAA,oBAAA,IACjBC,QAAK;AAAA,6BAAEvB,EAAAA,EAAQQ,MAAMe;AAAAA,oBAAK;AAAA,oBAC1BC,SAAUC,CAAAA,MAAU;AAClBzB,sBAAAA,EAAAA,EAAQ0B,aAAaD,EAAME,OAAOJ,KAAK;AAAA,oBACzC;AAAA,oBACAK,QAAQA,MAAM;AACZ5B,sBAAAA,EAAAA,EAAQ6B,WAAAA;AAAAA,oBACV;AAAA,kBAAA,GACI1B,CAAM,CAAA,GAAAE,EAEXyB,GAA8B;AAAA,oBAAA,IAAAf,WAAA;AAAA,6BAAAV,EAC5B0B,GAAsB,EAAA;AAAA,oBAAA;AAAA,kBAAA,CAAA,CAAA;AAAA,gBAAA;AAAA,cAAA,CAAA;AAAA,YAAA;AAAA,UAAA,CAAA,GAAA1B,EAI5B2B,GAAU;AAAA,YAAA,IAACtB,SAAM;AAAA,qBAAEV,EAAAA,EAAQQ,MAAMC,KAAKC;AAAAA,YAAM;AAAA,UAAA,CAAA,GAAAL,EAC5C4B,GAAgB;AAAA,YAAA,IAAAlB,WAAA;AAAA,qBAAEb,EAAMgC;AAAAA,YAAW;AAAA,UAAA,CAAA,CAAA;AAAA,QAAA;AAAA,MAAA,CAAA,CAAA;AAAA,IAAA;AAAA,EAAA,CAAA;AAI5C;"}
@@ -1 +1 @@
1
- {"version":3,"file":"RadioGroupField.js","sources":["../../../src/components/form/RadioGroupField.tsx"],"sourcesContent":["import type { Component, ComponentProps } from \"solid-js\";\n\nimport {\n Field,\n FieldContent,\n FieldError,\n FieldDescription,\n} from \"@/components/Field\";\nimport { RadioGroup } from \"@/components/RadioGroup\";\n\nimport { useFieldContext } from \"./context\";\n\nexport type RadioGroupFieldProps = ComponentProps<typeof RadioGroup> & {\n label?: string;\n description?: string;\n};\n\nexport const RadioGroupField: Component<RadioGroupFieldProps> = (props) => {\n const field = useFieldContext<string>();\n const [local, others] = splitProps(props, [\n \"description\",\n \"required\",\n \"disabled\",\n \"readOnly\",\n ]);\n\n return (\n <Field\n invalid={field().state.meta.errors.length > 0}\n required={local.required ?? false}\n disabled={local.disabled ?? false}\n readOnly={local.readOnly ?? false}\n >\n <FieldContent>\n <RadioGroup\n value={field().state.value}\n onValueChange={(details) => {\n field().handleChange(details.value ?? \"\");\n }}\n onBlur={() => {\n field().handleBlur();\n }}\n invalid={field().state.meta.errors.length > 0}\n disabled={local.disabled ?? false}\n readOnly={local.readOnly ?? false}\n required={local.required ?? false}\n {...others}\n />\n <FieldError errors={field().state.meta.errors} />\n <FieldDescription>{local.description}</FieldDescription>\n </FieldContent>\n </Field>\n );\n};\n"],"names":["RadioGroupField","props","field","useFieldContext","local","others","splitProps","_$createComponent","Field","invalid","state","meta","errors","length","required","disabled","readOnly","children","FieldContent","RadioGroup","_$mergeProps","value","onValueChange","details","handleChange","onBlur","handleBlur","FieldError","FieldDescription","description"],"mappings":";;;;;AAiBO,MAAMA,IAAoDC,CAAAA,MAAU;AACzE,QAAMC,IAAQC,EAAAA,GACR,CAACC,GAAOC,CAAM,IAAIC,EAAWL,GAAO,CACxC,eACA,YACA,YACA,UAAU,CACX;AAED,SAAAM,EACGC,GAAK;AAAA,IAAA,IACJC,UAAO;AAAA,aAAEP,EAAAA,EAAQQ,MAAMC,KAAKC,OAAOC,SAAS;AAAA,IAAC;AAAA,IAAA,IAC7CC,WAAQ;AAAA,aAAEV,EAAMU,YAAY;AAAA,IAAK;AAAA,IAAA,IACjCC,WAAQ;AAAA,aAAEX,EAAMW,YAAY;AAAA,IAAK;AAAA,IAAA,IACjCC,WAAQ;AAAA,aAAEZ,EAAMY,YAAY;AAAA,IAAK;AAAA,IAAA,IAAAC,WAAA;AAAA,aAAAV,EAEhCW,GAAY;AAAA,QAAA,IAAAD,WAAA;AAAA,iBAAA,CAAAV,EACVY,GAAUC,EAAA;AAAA,YAAA,IACTC,QAAK;AAAA,qBAAEnB,EAAAA,EAAQQ,MAAMW;AAAAA,YAAK;AAAA,YAC1BC,eAAgBC,CAAAA,MAAY;AAC1BrB,cAAAA,EAAAA,EAAQsB,aAAaD,EAAQF,SAAS,EAAE;AAAA,YAC1C;AAAA,YACAI,QAAQA,MAAM;AACZvB,cAAAA,EAAAA,EAAQwB,WAAAA;AAAAA,YACV;AAAA,YAAC,IACDjB,UAAO;AAAA,qBAAEP,EAAAA,EAAQQ,MAAMC,KAAKC,OAAOC,SAAS;AAAA,YAAC;AAAA,YAAA,IAC7CE,WAAQ;AAAA,qBAAEX,EAAMW,YAAY;AAAA,YAAK;AAAA,YAAA,IACjCC,WAAQ;AAAA,qBAAEZ,EAAMY,YAAY;AAAA,YAAK;AAAA,YAAA,IACjCF,WAAQ;AAAA,qBAAEV,EAAMU,YAAY;AAAA,YAAK;AAAA,UAAA,GAC7BT,CAAM,CAAA,GAAAE,EAEXoB,GAAU;AAAA,YAAA,IAACf,SAAM;AAAA,qBAAEV,EAAAA,EAAQQ,MAAMC,KAAKC;AAAAA,YAAM;AAAA,UAAA,CAAA,GAAAL,EAC5CqB,GAAgB;AAAA,YAAA,IAAAX,WAAA;AAAA,qBAAEb,EAAMyB;AAAAA,YAAW;AAAA,UAAA,CAAA,CAAA;AAAA,QAAA;AAAA,MAAA,CAAA;AAAA,IAAA;AAAA,EAAA,CAAA;AAI5C;"}
1
+ {"version":3,"file":"RadioGroupField.js","sources":["../../../src/components/form/RadioGroupField.tsx"],"sourcesContent":["import type { Component, ComponentProps } from 'solid-js';\n\nimport { Field, FieldContent, FieldError, FieldDescription } from '@/components/Field';\nimport { RadioGroup } from '@/components/RadioGroup';\n\nimport { useFieldContext } from './context';\n\nexport type RadioGroupFieldProps = ComponentProps<typeof RadioGroup> & {\n label?: string;\n description?: string;\n};\n\nexport const RadioGroupField: Component<RadioGroupFieldProps> = (props) => {\n const field = useFieldContext<string>();\n const [local, others] = splitProps(props, ['description', 'required', 'disabled', 'readOnly']);\n\n return (\n <Field\n invalid={field().state.meta.errors.length > 0}\n required={local.required ?? false}\n disabled={local.disabled ?? false}\n readOnly={local.readOnly ?? false}\n >\n <FieldContent>\n <RadioGroup\n value={field().state.value}\n onValueChange={(details) => {\n field().handleChange(details.value ?? '');\n }}\n onBlur={() => {\n field().handleBlur();\n }}\n invalid={field().state.meta.errors.length > 0}\n disabled={local.disabled ?? false}\n readOnly={local.readOnly ?? false}\n required={local.required ?? false}\n {...others}\n />\n <FieldError errors={field().state.meta.errors} />\n <FieldDescription>{local.description}</FieldDescription>\n </FieldContent>\n </Field>\n );\n};\n"],"names":["RadioGroupField","props","field","useFieldContext","local","others","splitProps","_$createComponent","Field","invalid","state","meta","errors","length","required","disabled","readOnly","children","FieldContent","RadioGroup","_$mergeProps","value","onValueChange","details","handleChange","onBlur","handleBlur","FieldError","FieldDescription","description"],"mappings":";;;;;AAYO,MAAMA,IAAoDC,CAAAA,MAAU;AACzE,QAAMC,IAAQC,EAAAA,GACR,CAACC,GAAOC,CAAM,IAAIC,EAAWL,GAAO,CAAC,eAAe,YAAY,YAAY,UAAU,CAAC;AAE7F,SAAAM,EACGC,GAAK;AAAA,IAAA,IACJC,UAAO;AAAA,aAAEP,EAAAA,EAAQQ,MAAMC,KAAKC,OAAOC,SAAS;AAAA,IAAC;AAAA,IAAA,IAC7CC,WAAQ;AAAA,aAAEV,EAAMU,YAAY;AAAA,IAAK;AAAA,IAAA,IACjCC,WAAQ;AAAA,aAAEX,EAAMW,YAAY;AAAA,IAAK;AAAA,IAAA,IACjCC,WAAQ;AAAA,aAAEZ,EAAMY,YAAY;AAAA,IAAK;AAAA,IAAA,IAAAC,WAAA;AAAA,aAAAV,EAEhCW,GAAY;AAAA,QAAA,IAAAD,WAAA;AAAA,iBAAA,CAAAV,EACVY,GAAUC,EAAA;AAAA,YAAA,IACTC,QAAK;AAAA,qBAAEnB,EAAAA,EAAQQ,MAAMW;AAAAA,YAAK;AAAA,YAC1BC,eAAgBC,CAAAA,MAAY;AAC1BrB,cAAAA,EAAAA,EAAQsB,aAAaD,EAAQF,SAAS,EAAE;AAAA,YAC1C;AAAA,YACAI,QAAQA,MAAM;AACZvB,cAAAA,EAAAA,EAAQwB,WAAAA;AAAAA,YACV;AAAA,YAAC,IACDjB,UAAO;AAAA,qBAAEP,EAAAA,EAAQQ,MAAMC,KAAKC,OAAOC,SAAS;AAAA,YAAC;AAAA,YAAA,IAC7CE,WAAQ;AAAA,qBAAEX,EAAMW,YAAY;AAAA,YAAK;AAAA,YAAA,IACjCC,WAAQ;AAAA,qBAAEZ,EAAMY,YAAY;AAAA,YAAK;AAAA,YAAA,IACjCF,WAAQ;AAAA,qBAAEV,EAAMU,YAAY;AAAA,YAAK;AAAA,UAAA,GAC7BT,CAAM,CAAA,GAAAE,EAEXoB,GAAU;AAAA,YAAA,IAACf,SAAM;AAAA,qBAAEV,EAAAA,EAAQQ,MAAMC,KAAKC;AAAAA,YAAM;AAAA,UAAA,CAAA,GAAAL,EAC5CqB,GAAgB;AAAA,YAAA,IAAAX,WAAA;AAAA,qBAAEb,EAAMyB;AAAAA,YAAW;AAAA,UAAA,CAAA,CAAA;AAAA,QAAA;AAAA,MAAA,CAAA;AAAA,IAAA;AAAA,EAAA,CAAA;AAI5C;"}
@@ -1 +1 @@
1
- {"version":3,"file":"SelectField.js","sources":["../../../src/components/form/SelectField.tsx"],"sourcesContent":["import type { Component, ComponentProps, JSX } from \"solid-js\";\n\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldError,\n FieldLabel,\n} from \"@/components/Field\";\nimport {\n Select,\n SelectContent,\n SelectControl,\n SelectPositioner,\n SelectTrigger,\n SelectValue,\n} from \"@/components/Select\";\n\nimport { useFieldContext } from \"./context\";\n\nconst SelectInput: Component<{ placeholder: string; children: JSX.Element }> = (\n props,\n) => (\n <>\n <SelectControl>\n <SelectTrigger>\n <SelectValue placeholder={props.placeholder} />\n </SelectTrigger>\n </SelectControl>\n <SelectPositioner>\n <SelectContent>{props.children}</SelectContent>\n </SelectPositioner>\n </>\n);\n\nexport type SelectFieldProps = ComponentProps<typeof Select> & {\n label?: string;\n description?: string;\n placeholder?: string;\n};\n\nexport const SelectField: Component<SelectFieldProps> = (props) => {\n const field = useFieldContext<string[]>();\n const [local, others] = splitProps(props, [\n \"label\",\n \"description\",\n \"required\",\n \"disabled\",\n \"readOnly\",\n \"placeholder\",\n \"children\",\n ]);\n\n return (\n <Field\n invalid={field().state.meta.errors.length > 0}\n disabled={local.disabled ?? false}\n readOnly={local.readOnly ?? false}\n required={local.required ?? false}\n >\n <FieldLabel>{local.label}</FieldLabel>\n <FieldContent>\n <Select\n value={field().state.value}\n onValueChange={(details) => {\n field().handleChange(details.value);\n }}\n onBlur={() => {\n field().handleBlur();\n }}\n invalid={field().state.meta.errors.length > 0}\n disabled={local.disabled ?? false}\n readOnly={local.readOnly ?? false}\n {...others}\n >\n <SelectInput placeholder={local.placeholder ?? \"\"}>\n {local.children}\n </SelectInput>\n </Select>\n <FieldError errors={field().state.meta.errors} />\n <FieldDescription>{local.description}</FieldDescription>\n </FieldContent>\n </Field>\n );\n};\n"],"names":["SelectInput","props","_$createComponent","SelectControl","children","SelectTrigger","SelectValue","placeholder","SelectPositioner","SelectContent","SelectField","field","useFieldContext","local","others","splitProps","Field","invalid","state","meta","errors","length","disabled","readOnly","required","FieldLabel","label","FieldContent","Select","_$mergeProps","value","onValueChange","details","handleChange","onBlur","handleBlur","FieldError","FieldDescription","description"],"mappings":";;;;;AAoBA,MAAMA,IACJC,CAAAA,MAAK,CAAAC,EAGFC,GAAa;AAAA,EAAA,IAAAC,WAAA;AAAA,WAAAF,EACXG,GAAa;AAAA,MAAA,IAAAD,WAAA;AAAA,eAAAF,EACXI,GAAW;AAAA,UAAA,IAACC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AAC,IACDlB,UAAO;AAAA,qBAAEN,EAAAA,EAAQO,MAAMC,KAAKC,OAAOC,SAAS;AAAA,YAAC;AAAA,YAAA,IAC7CC,WAAQ;AAAA,qBAAET,EAAMS,YAAY;AAAA,YAAK;AAAA,YAAA,IACjCC,WAAQ;AAAA,qBAAEV,EAAMU,YAAY;AAAA,YAAK;AAAA,UAAA,GAC7BT,GAAM;AAAA,YAAA,IAAAV,WAAA;AAAA,qBAAAF,EAETF,GAAW;AAAA,gBAAA,IAACO,cAAW;AAAA,yBAAEM,EAAMN,eAAe;AAAA,gBAAE;AAAA,gBAAA,IAAAH,WAAA;AAAA,yBAC9CS,EAAMT;AAAAA,gBAAQ;AAAA,cAAA,CAAA;AAAA,YAAA;AAAA,UAAA,CAAA,CAAA,GAAAF,EAGlBkC,GAAU;AAAA,YAAA,IAAChB,SAAM;AAAA,qBAAET,EAAAA,EAAQO,MAAMC,KAAKC;AAAAA,YAAM;AAAA,UAAA,CAAA,GAAAlB,EAC5CmC,GAAgB;AAAA,YAAA,IAAAjC,WAAA;AAAA,qBAAES,EAAMyB;AAAAA,YAAW;AAAA,UAAA,CAAA,CAAA;AAAA,QAAA;AAAA,MAAA,CAAA,CAAA;AAAA,IAAA;AAAA,EAAA,CAAA;AAI5C;"}
1
+ {"version":3,"file":"SelectField.js","sources":["../../../src/components/form/SelectField.tsx"],"sourcesContent":["import type { Component, ComponentProps, JSX } from 'solid-js';\n\nimport { Field, FieldContent, FieldDescription, FieldError, FieldLabel } from '@/components/Field';\nimport {\n Select,\n SelectContent,\n SelectControl,\n SelectPositioner,\n SelectTrigger,\n SelectValue,\n} from '@/components/Select';\n\nimport { useFieldContext } from './context';\n\nconst SelectInput: Component<{ placeholder: string; children: JSX.Element }> = (props) => (\n <>\n <SelectControl>\n <SelectTrigger>\n <SelectValue placeholder={props.placeholder} />\n </SelectTrigger>\n </SelectControl>\n <SelectPositioner>\n <SelectContent>{props.children}</SelectContent>\n </SelectPositioner>\n </>\n);\n\nexport type SelectFieldProps = ComponentProps<typeof Select> & {\n label?: string;\n description?: string;\n placeholder?: string;\n};\n\nexport const SelectField: Component<SelectFieldProps> = (props) => {\n const field = useFieldContext<string[]>();\n const [local, others] = splitProps(props, [\n 'label',\n 'description',\n 'required',\n 'disabled',\n 'readOnly',\n 'placeholder',\n 'children',\n ]);\n\n return (\n <Field\n invalid={field().state.meta.errors.length > 0}\n disabled={local.disabled ?? false}\n readOnly={local.readOnly ?? false}\n required={local.required ?? false}\n >\n <FieldLabel>{local.label}</FieldLabel>\n <FieldContent>\n <Select\n value={field().state.value}\n onValueChange={(details) => {\n field().handleChange(details.value);\n }}\n onBlur={() => {\n field().handleBlur();\n }}\n invalid={field().state.meta.errors.length > 0}\n disabled={local.disabled ?? false}\n readOnly={local.readOnly ?? false}\n {...others}\n >\n <SelectInput placeholder={local.placeholder ?? ''}>{local.children}</SelectInput>\n </Select>\n <FieldError errors={field().state.meta.errors} />\n <FieldDescription>{local.description}</FieldDescription>\n </FieldContent>\n </Field>\n );\n};\n"],"names":["SelectInput","props","_$createComponent","SelectControl","children","SelectTrigger","SelectValue","placeholder","SelectPositioner","SelectContent","SelectField","field","useFieldContext","local","others","splitProps","Field","invalid","state","meta","errors","length","disabled","readOnly","required","FieldLabel","label","FieldContent","Select","_$mergeProps","value","onValueChange","details","handleChange","onBlur","handleBlur","FieldError","FieldDescription","description"],"mappings":";;;;;AAcA,MAAMA,IAA0EC,CAAAA,MAAK,CAAAC,EAEhFC,GAAa;AAAA,EAAA,IAAAC,WAAA;AAAA,WAAAF,EACXG,GAAa;AAAA,MAAA,IAAAD,WAAA;AAAA,eAAAF,EACXI,GAAW;AAAA,UAAA,IAACC,cAAW;AAAA,mBAAEN,EAAMM;AAAAA,UAAW;AAAA,QAAA,CAAA;AAAA,MAAA;AAAA,IAAA,CAAA;AAAA,EAAA;AAAA,CAAA,GAAAL,EAG9CM,GAAgB;AAAA,EAAA,IAAAJ,WAAA;AAAA,WAAAF,EACdO,GAAa;AAA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,EAAMU,YAAY;AAAA,YAAK;AAAA,UAAA,GAC7BT,GAAM;AAAA,YAAA,IAAAV,WAAA;AAAA,qBAAAF,EAETF,GAAW;AAAA,gBAAA,IAACO,cAAW;AAAA,yBAAEM,EAAMN,eAAe;AAAA,gBAAE;AAAA,gBAAA,IAAAH,WAAA;AAAA,yBAAGS,EAAMT;AAAAA,gBAAQ;AAAA,cAAA,CAAA;AAAA,YAAA;AAAA,UAAA,CAAA,CAAA,GAAAF,EAEnEkC,GAAU;AAAA,YAAA,IAAChB,SAAM;AAAA,qBAAET,EAAAA,EAAQO,MAAMC,KAAKC;AAAAA,YAAM;AAAA,UAAA,CAAA,GAAAlB,EAC5CmC,GAAgB;AAAA,YAAA,IAAAjC,WAAA;AAAA,qBAAES,EAAMyB;AAAAA,YAAW;AAAA,UAAA,CAAA,CAAA;AAAA,QAAA;AAAA,MAAA,CAAA,CAAA;AAAA,IAAA;AAAA,EAAA,CAAA;AAI5C;"}
@@ -1 +1 @@
1
- {"version":3,"file":"SubmitButton.js","sources":["../../../src/components/form/SubmitButton.tsx"],"sourcesContent":["import type { Component, ComponentProps } from \"solid-js\";\n\nimport { Button } from \"@/components/Button\";\n\nimport { useFormContext } from \"./context\";\n\nexport type SubmitButtonProps = ComponentProps<typeof Button> & {\n loading?: boolean;\n};\n\nexport const SubmitButton: Component<SubmitButtonProps> = (props) => {\n const form = useFormContext();\n const [local, others] = splitProps(props, [\n \"children\",\n \"loading\",\n \"disabled\",\n ]);\n\n const isLoading = (): boolean =>\n form.state.isSubmitting ||\n form.state.isValidating ||\n (local.loading ?? false);\n\n return (\n <Button\n type=\"submit\"\n loading={isLoading()}\n disabled={local.disabled ?? !form.state.canSubmit}\n {...others}\n >\n {local.children}\n </Button>\n );\n};\n"],"names":["SubmitButton","props","form","useFormContext","local","others","splitProps","isLoading","state","isSubmitting","isValidating","loading","_$createComponent","Button","_$mergeProps","type","disabled","canSubmit","children"],"mappings":";;;;AAUO,MAAMA,IAA8CC,CAAAA,MAAU;AACnE,QAAMC,IAAOC,EAAAA,GACP,CAACC,GAAOC,CAAM,IAAIC,EAAWL,GAAO,CACxC,YACA,WACA,UAAU,CACX,GAEKM,IAAYA,MAChBL,EAAKM,MAAMC,gBACXP,EAAKM,MAAME,iBACVN,EAAMO,WAAW;AAEpB,SAAAC,EACGC,GAAMC,EAAA;AAAA,IACLC,MAAI;AAAA,IAAA,IACJJ,UAAO;AAAA,aAAEJ,EAAAA;AAAAA,IAAW;AAAA,IAAA,IACpBS,WAAQ;AAAA,aAAEZ,EAAMY,YAAY,CAACd,EAAKM,MAAMS;AAAAA,IAAS;AAAA,EAAA,GAC7CZ,GAAM;AAAA,IAAA,IAAAa,WAAA;AAAA,aAETd,EAAMc;AAAAA,IAAQ;AAAA,EAAA,CAAA,CAAA;AAGrB;"}
1
+ {"version":3,"file":"SubmitButton.js","sources":["../../../src/components/form/SubmitButton.tsx"],"sourcesContent":["import type { Component, ComponentProps } from 'solid-js';\n\nimport { Button } from '@/components/Button';\n\nimport { useFormContext } from './context';\n\nexport type SubmitButtonProps = ComponentProps<typeof Button> & {\n loading?: boolean;\n};\n\nexport const SubmitButton: Component<SubmitButtonProps> = (props) => {\n const form = useFormContext();\n const [local, others] = splitProps(props, ['children', 'loading', 'disabled']);\n\n const isLoading = (): boolean =>\n form.state.isSubmitting || form.state.isValidating || (local.loading ?? false);\n\n return (\n <Button\n type='submit'\n loading={isLoading()}\n disabled={local.disabled ?? !form.state.canSubmit}\n {...others}\n >\n {local.children}\n </Button>\n );\n};\n"],"names":["SubmitButton","props","form","useFormContext","local","others","splitProps","isLoading","state","isSubmitting","isValidating","loading","_$createComponent","Button","_$mergeProps","type","disabled","canSubmit","children"],"mappings":";;;;AAUO,MAAMA,IAA8CC,CAAAA,MAAU;AACnE,QAAMC,IAAOC,EAAAA,GACP,CAACC,GAAOC,CAAM,IAAIC,EAAWL,GAAO,CAAC,YAAY,WAAW,UAAU,CAAC,GAEvEM,IAAYA,MAChBL,EAAKM,MAAMC,gBAAgBP,EAAKM,MAAME,iBAAiBN,EAAMO,WAAW;AAE1E,SAAAC,EACGC,GAAMC,EAAA;AAAA,IACLC,MAAI;AAAA,IAAA,IACJJ,UAAO;AAAA,aAAEJ,EAAAA;AAAAA,IAAW;AAAA,IAAA,IACpBS,WAAQ;AAAA,aAAEZ,EAAMY,YAAY,CAACd,EAAKM,MAAMS;AAAAA,IAAS;AAAA,EAAA,GAC7CZ,GAAM;AAAA,IAAA,IAAAa,WAAA;AAAA,aAETd,EAAMc;AAAAA,IAAQ;AAAA,EAAA,CAAA,CAAA;AAGrB;"}
@@ -1 +1 @@
1
- {"version":3,"file":"SwitchField.js","sources":["../../../src/components/form/SwitchField.tsx"],"sourcesContent":["import type { Component, ComponentProps, JSX } from \"solid-js\";\n\nimport {\n Field,\n FieldContent,\n FieldDescription,\n FieldError,\n} from \"@/components/Field\";\nimport {\n Switch,\n SwitchControl,\n SwitchLabel,\n SwitchThumb,\n} from \"@/components/Switch\";\n\nimport { useFieldContext } from \"./context\";\n\nexport type SwitchFieldProps = ComponentProps<typeof Switch> & {\n description?: string;\n label?: JSX.Element;\n};\n\nexport const SwitchField: Component<SwitchFieldProps> = (props) => {\n const field = useFieldContext<boolean>();\n const [local, others] = splitProps(props, [\n \"description\",\n \"label\",\n \"required\",\n \"disabled\",\n \"readOnly\",\n ]);\n\n return (\n <Field\n invalid={field().state.meta.errors.length > 0}\n required={local.required ?? false}\n disabled={local.disabled ?? false}\n readOnly={local.readOnly ?? false}\n >\n <FieldContent>\n <Switch\n checked={field().state.value}\n onCheckedChange={(details) => {\n field().handleChange(Boolean(details.checked));\n }}\n onBlur={() => {\n field().handleBlur();\n }}\n invalid={field().state.meta.errors.length > 0}\n disabled={local.disabled ?? false}\n readOnly={local.readOnly ?? false}\n required={local.required ?? false}\n {...others}\n >\n <SwitchControl>\n <SwitchThumb />\n </SwitchControl>\n <SwitchLabel>{local.label}</SwitchLabel>\n </Switch>\n <FieldError errors={field().state.meta.errors} />\n <FieldDescription>{local.description}</FieldDescription>\n </FieldContent>\n </Field>\n );\n};\n"],"names":["SwitchField","props","field","useFieldContext","local","others","splitProps","_$createComponent","Field","invalid","state","meta","errors","length","required","disabled","readOnly","children","FieldContent","Switch","_$mergeProps","checked","value","onCheckedChange","details","handleChange","Boolean","onBlur","handleBlur","SwitchControl","SwitchThumb","SwitchLabel","label","FieldError","FieldDescription","description"],"mappings":";;;;;AAsBO,MAAMA,IAA4CC,CAAAA,MAAU;AACjE,QAAMC,IAAQC,EAAAA,GACR,CAACC,GAAOC,CAAM,IAAIC,EAAWL,GAAO,CACxC,eACA,SACA,YACA,YACA,UAAU,CACX;AAED,SAAAM,EACGC,GAAK;AAAA,IAAA,IACJC,UAAO;AAAA,aAAEP,EAAAA,EAAQQ,MAAMC,KAAKC,OAAOC,SAAS;AAAA,IAAC;AAAA,IAAA,IAC7CC,WAAQ;AAAA,aAAEV,EAAMU,YAAY;AAAA,IAAK;AAAA,IAAA,IACjCC,WAAQ;AAAA,aAAEX,EAAMW,YAAY;AAAA,IAAK;AAAA,IAAA,IACjCC,WAAQ;AAAA,aAAEZ,EAAMY,YAAY;AAAA,IAAK;AAAA,IAAA,IAAAC,WAAA;AAAA,aAAAV,EAEhCW,GAAY;AAAA,QAAA,IAAAD,WAAA;AAAA,iBAAA,CAAAV,EACVY,GAAMC,EAAA;AAAA,YAAA,IACLC,UAAO;AAAA,qBAAEnB,EAAAA,EAAQQ,MAAMY;AAAAA,YAAK;AAAA,YAC5BC,iBAAkBC,CAAAA,MAAY;AAC5BtB,cAAAA,EAAAA,EAAQuB,aAAaC,EAAQF,EAAQH,OAAQ;AAAA,YAC/C;AAAA,YACAM,QAAQA,MAAM;AACZzB,cAAAA,EAAAA,EAAQ0B,WAAAA;AAAAA,YACV;AAAA,YAAC,IACDnB,UAAO;AAAA,qBAAEP,EAAAA,EAAQQ,MAAMC,KAAKC,OAAOC,SAAS;AAAA,YAAC;AAAA,YAAA,IAC7CE,WAAQ;AAAA,qBAAEX,EAAMW,YAAY;AAAA,YAAK;AAAA,YAAA,IACjCC,WAAQ;AAAA,qBAAEZ,EAAMY,YAAY;AAAA,YAAK;AAAA,YAAA,IACjCF,WAAQ;AAAA,qBAAEV,EAAMU,YAAY;AAAA,YAAK;AAAA,UAAA,GAC7BT,GAAM;AAAA,YAAA,IAAAY,WAAA;AAAA,qBAAA,CAAAV,EAETsB,GAAa;AAAA,gBAAA,IAAAZ,WAAA;AAAA,yBAAAV,EACXuB,GAAW,EAAA;AAAA,gBAAA;AAAA,cAAA,CAAA,GAAAvB,EAEbwB,GAAW;AAAA,gBAAA,IAAAd,WAAA;AAAA,yBAAEb,EAAM4B;AAAAA,gBAAK;AAAA,cAAA,CAAA,CAAA;AAAA,YAAA;AAAA,UAAA,CAAA,CAAA,GAAAzB,EAE1B0B,GAAU;AAAA,YAAA,IAACrB,SAAM;AAAA,qBAAEV,EAAAA,EAAQQ,MAAMC,KAAKC;AAAAA,YAAM;AAAA,UAAA,CAAA,GAAAL,EAC5C2B,GAAgB;AAAA,YAAA,IAAAjB,WAAA;AAAA,qBAAEb,EAAM+B;AAAAA,YAAW;AAAA,UAAA,CAAA,CAAA;AAAA,QAAA;AAAA,MAAA,CAAA;AAAA,IAAA;AAAA,EAAA,CAAA;AAI5C;"}
1
+ {"version":3,"file":"SwitchField.js","sources":["../../../src/components/form/SwitchField.tsx"],"sourcesContent":["import type { Component, ComponentProps, JSX } from 'solid-js';\n\nimport { Field, FieldContent, FieldDescription, FieldError } from '@/components/Field';\nimport { Switch, SwitchControl, SwitchLabel, SwitchThumb } from '@/components/Switch';\n\nimport { useFieldContext } from './context';\n\nexport type SwitchFieldProps = ComponentProps<typeof Switch> & {\n description?: string;\n label?: JSX.Element;\n};\n\nexport const SwitchField: Component<SwitchFieldProps> = (props) => {\n const field = useFieldContext<boolean>();\n const [local, others] = splitProps(props, [\n 'description',\n 'label',\n 'required',\n 'disabled',\n 'readOnly',\n ]);\n\n return (\n <Field\n invalid={field().state.meta.errors.length > 0}\n required={local.required ?? false}\n disabled={local.disabled ?? false}\n readOnly={local.readOnly ?? false}\n >\n <FieldContent>\n <Switch\n checked={field().state.value}\n onCheckedChange={(details) => {\n field().handleChange(Boolean(details.checked));\n }}\n onBlur={() => {\n field().handleBlur();\n }}\n invalid={field().state.meta.errors.length > 0}\n disabled={local.disabled ?? false}\n readOnly={local.readOnly ?? false}\n required={local.required ?? false}\n {...others}\n >\n <SwitchControl>\n <SwitchThumb />\n </SwitchControl>\n <SwitchLabel>{local.label}</SwitchLabel>\n </Switch>\n <FieldError errors={field().state.meta.errors} />\n <FieldDescription>{local.description}</FieldDescription>\n </FieldContent>\n </Field>\n );\n};\n"],"names":["SwitchField","props","field","useFieldContext","local","others","splitProps","_$createComponent","Field","invalid","state","meta","errors","length","required","disabled","readOnly","children","FieldContent","Switch","_$mergeProps","checked","value","onCheckedChange","details","handleChange","Boolean","onBlur","handleBlur","SwitchControl","SwitchThumb","SwitchLabel","label","FieldError","FieldDescription","description"],"mappings":";;;;;AAYO,MAAMA,IAA4CC,CAAAA,MAAU;AACjE,QAAMC,IAAQC,EAAAA,GACR,CAACC,GAAOC,CAAM,IAAIC,EAAWL,GAAO,CACxC,eACA,SACA,YACA,YACA,UAAU,CACX;AAED,SAAAM,EACGC,GAAK;AAAA,IAAA,IACJC,UAAO;AAAA,aAAEP,EAAAA,EAAQQ,MAAMC,KAAKC,OAAOC,SAAS;AAAA,IAAC;AAAA,IAAA,IAC7CC,WAAQ;AAAA,aAAEV,EAAMU,YAAY;AAAA,IAAK;AAAA,IAAA,IACjCC,WAAQ;AAAA,aAAEX,EAAMW,YAAY;AAAA,IAAK;AAAA,IAAA,IACjCC,WAAQ;AAAA,aAAEZ,EAAMY,YAAY;AAAA,IAAK;AAAA,IAAA,IAAAC,WAAA;AAAA,aAAAV,EAEhCW,GAAY;AAAA,QAAA,IAAAD,WAAA;AAAA,iBAAA,CAAAV,EACVY,GAAMC,EAAA;AAAA,YAAA,IACLC,UAAO;AA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],"sourcesContent":["import { type Component, type ComponentProps, splitProps } from \"solid-js\";\n\nimport {\n Field,\n FieldLabel,\n FieldContent,\n FieldError,\n FieldDescription,\n} from \"@/components/Field\";\nimport { TextInputControl, TextInputInput } from \"@/components/TextInput\";\n\nimport { useFieldContext } from \"./context\";\n\nexport type TextInputFieldProps = ComponentProps<typeof TextInputInput> & {\n label?: string;\n description?: string;\n};\n\nexport const TextInputField: Component<TextInputFieldProps> = (props) => {\n const field = useFieldContext<string>();\n const [local, others] = splitProps(props, [\n \"label\",\n \"description\",\n \"required\",\n \"disabled\",\n \"readOnly\",\n ]);\n\n return (\n <Field\n invalid={field().state.meta.errors.length > 0}\n disabled={local.disabled ?? false}\n readOnly={local.readOnly ?? false}\n required={local.required ?? false}\n >\n <FieldLabel>{local.label}</FieldLabel>\n <FieldContent>\n <TextInputControl>\n <TextInputInput\n value={field().state.value}\n onInput={(event) => {\n field().handleChange(event.target.value);\n }}\n onBlur={() => {\n field().handleBlur();\n }}\n {...others}\n />\n </TextInputControl>\n <FieldError errors={field().state.meta.errors} />\n <FieldDescription>{local.description}</FieldDescription>\n </FieldContent>\n </Field>\n );\n};\n"],"names":["TextInputField","props","field","useFieldContext","local","others","splitProps","_$createComponent","Field","invalid","state","meta","errors","length","disabled","readOnly","required","children","FieldLabel","label","FieldContent","TextInputControl","TextInputInput","_$mergeProps","value","onInput","event","handleChange","target","onBlur","handleBlur","FieldError","FieldDescription","description"],"mappings":";;;;;AAkBO,MAAMA,IAAkDC,CAAAA,MAAU;AACvE,QAAMC,IAAQC,EAAAA,GACR,CAACC,GAAOC,CAAM,IAAIC,EAAWL,GAAO,CACxC,SACA,eACA,YACA,YACA,UAAU,CACX;AAED,SAAAM,EACGC,GAAK;AAAA,IAAA,IACJC,UAAO;AAAA,aAAEP,EAAAA,EAAQQ,MAAMC,KAAKC,OAAOC,SAAS;AAAA,IAAC;AAAA,IAAA,IAC7CC,WAAQ;AAAA,aAAEV,EAAMU,YAAY;AAAA,IAAK;AAAA,IAAA,IACjCC,WAAQ;AAAA,aAAEX,EAAMW,YAAY;AAAA,IAAK;AAAA,IAAA,IACjCC,WAAQ;AAAA,aAAEZ,EAAMY,YAAY;AAAA,IAAK;AAAA,IAAA,IAAAC,WAAA;AAAA,aAAA,CAAAV,EAEhCW,GAAU;AAAA,QAAA,IAAAD,WAAA;AAAA,iBAAEb,EAAMe;AAAAA,QAAK;AAAA,MAAA,CAAA,GAAAZ,EACvBa,GAAY;AAAA,QAAA,IAAAH,WAAA;AAAA,iBAAA,CAAAV,EACVc,GAAgB;AAAA,YAAA,IAAAJ,WAAA;AAAA,qBAAAV,EACde,GAAcC,EAAA;AAAA,gBAAA,IACbC,QAAK;AAAA,yBAAEtB,EAAAA,EAAQQ,MAAMc;AAAAA,gBAAK;AAAA,gBAC1BC,SAAUC,CAAAA,MAAU;AAClBxB,kBAAAA,EAAAA,EAAQyB,aAAaD,EAAME,OAAOJ,KAAK;AAAA,gBACzC;AAAA,gBACAK,QAAQA,MAAM;AACZ3B,kBAAAA,EAAAA,EAAQ4B,WAAAA;AAAAA,gBACV;AAAA,cAAA,GACIzB,CAAM,CAAA;AAAA,YAAA;AAAA,UAAA,CAAA,GAAAE,EAGbwB,GAAU;AAAA,YAAA,IAACnB,SAAM;AAAA,qBAAEV,EAAAA,EAAQQ,MAAMC,KAAKC;AAAAA,YAAM;AAAA,UAAA,CAAA,GAAAL,EAC5CyB,GAAgB;AAAA,YAAA,IAAAf,WAAA;AAAA,qBAAEb,EAAM6B;AAAAA,YAAW;AAAA,UAAA,CAAA,CAAA;AAAA,QAAA;AAAA,MAAA,CAAA,CAAA;AAAA,IAAA;AAAA,EAAA,CAAA;AAI5C;"}
1
+ {"version":3,"file":"TextInputField.js","sources":["../../../src/components/form/TextInputField.tsx"],"sourcesContent":["import { type Component, type ComponentProps, splitProps } from 'solid-js';\n\nimport { Field, FieldLabel, FieldContent, FieldError, FieldDescription } from '@/components/Field';\nimport { TextInputControl, TextInputInput } from '@/components/TextInput';\n\nimport { useFieldContext } from './context';\n\nexport type TextInputFieldProps = ComponentProps<typeof TextInputInput> & {\n label?: string;\n description?: string;\n};\n\nexport const TextInputField: Component<TextInputFieldProps> = (props) => {\n const field = useFieldContext<string>();\n const [local, others] = splitProps(props, [\n 'label',\n 'description',\n 'required',\n 'disabled',\n 'readOnly',\n ]);\n\n return (\n <Field\n invalid={field().state.meta.errors.length > 0}\n disabled={local.disabled ?? false}\n readOnly={local.readOnly ?? false}\n required={local.required ?? false}\n >\n <FieldLabel>{local.label}</FieldLabel>\n <FieldContent>\n <TextInputControl>\n <TextInputInput\n value={field().state.value}\n onInput={(event) => {\n field().handleChange(event.target.value);\n }}\n onBlur={() => {\n field().handleBlur();\n }}\n {...others}\n />\n </TextInputControl>\n <FieldError errors={field().state.meta.errors} />\n <FieldDescription>{local.description}</FieldDescription>\n </FieldContent>\n </Field>\n );\n};\n"],"names":["TextInputField","props","field","useFieldContext","local","others","splitProps","_$createComponent","Field","invalid","state","meta","errors","length","disabled","readOnly","required","children","FieldLabel","label","FieldContent","TextInputControl","TextInputInput","_$mergeProps","value","onInput","event","handleChange","target","onBlur","handleBlur","FieldError","FieldDescription","description"],"mappings":";;;;;AAYO,MAAMA,IAAkDC,CAAAA,MAAU;AACvE,QAAMC,IAAQC,EAAAA,GACR,CAACC,GAAOC,CAAM,IAAIC,EAAWL,GAAO,CACxC,SACA,eACA,YACA,YACA,UAAU,CACX;AAED,SAAAM,EACGC,GAAK;AAAA,IAAA,IACJC,UAAO;AAAA,aAAEP,EAAAA,EAAQQ,MAAMC,KAAKC,OAAOC,SAAS;AAAA,IAAC;AAAA,IAAA,IAC7CC,WAAQ;AAAA,aAAEV,EAAMU,YAAY;AAAA,IAAK;AAAA,IAAA,IACjCC,WAAQ;AAAA,aAAEX,EAAMW,YAAY;AAAA,IAAK;AAAA,IAAA,IACjCC,WAAQ;AAAA,aAAEZ,EAAMY,YAAY;AAAA,IAAK;AAAA,IAAA,IAAAC,WAAA;AAAA,aAAA,CAAAV,EAEhCW,GAAU;AAAA,QAAA,IAAAD,WAAA;AAAA,iBAAEb,EAAMe;AAAAA,QAAK;AAAA,MAAA,CAAA,GAAAZ,EACvBa,GAAY;AAAA,QAAA,IAAAH,WAAA;AAAA,iBAAA,CAAAV,EACVc,GAAgB;AAAA,YAAA,IAAAJ,WAAA;AAAA,qBAAAV,EACde,GAAcC,EAAA;AAAA,gBAAA,IACbC,QAAK;AAAA,yBAAEtB,EAAAA,EAAQQ,MAAMc;AAAAA,gBAAK;AAAA,gBAC1BC,SAAUC,CAAAA,MAAU;AAClBxB,kBAAAA,EAAAA,EAAQyB,aAAaD,EAAME,OAAOJ,KAAK;AAAA,gBACzC;AAAA,gBACAK,QAAQA,MAAM;AACZ3B,kBAAAA,EAAAA,EAAQ4B,WAAAA;AAAAA,gBACV;AAAA,cAAA,GACIzB,CAAM,CAAA;AAAA,YAAA;AAAA,UAAA,CAAA,GAAAE,EAGbwB,GAAU;AAAA,YAAA,IAACnB,SAAM;AAAA,qBAAEV,EAAAA,EAAQQ,MAAMC,KAAKC;AAAAA,YAAM;AAAA,UAAA,CAAA,GAAAL,EAC5CyB,GAAgB;AAAA,YAAA,IAAAf,WAAA;AAAA,qBAAEb,EAAM6B;AAAAA,YAAW;AAAA,UAAA,CAAA,CAAA;AAAA,QAAA;AAAA,MAAA,CAAA,CAAA;AAAA,IAAA;AAAA,EAAA,CAAA;AAI5C;"}
@@ -1 +1 @@
1
- {"version":3,"file":"TextareaField.js","sources":["../../../src/components/form/TextareaField.tsx"],"sourcesContent":["import type { Component, ComponentProps } from \"solid-js\";\n\nimport {\n Field,\n FieldLabel,\n FieldContent,\n FieldError,\n FieldDescription,\n} from \"@/components/Field\";\nimport { TextInputControl, TextInputArea } from \"@/components/TextInput\";\n\nimport { useFieldContext } from \"./context\";\n\nexport type TextareaFieldProps = ComponentProps<typeof TextInputArea> & {\n label?: string;\n description?: string;\n};\n\nexport const TextareaField: Component<TextareaFieldProps> = (props) => {\n const field = useFieldContext<string>();\n const [local, others] = splitProps(props, [\n \"label\",\n \"description\",\n \"required\",\n \"disabled\",\n \"readOnly\",\n ]);\n\n return (\n <Field\n invalid={field().state.meta.errors.length > 0}\n disabled={local.disabled ?? false}\n readOnly={local.readOnly ?? false}\n required={local.required ?? false}\n >\n <FieldLabel>{local.label}</FieldLabel>\n <FieldContent>\n <TextInputControl>\n <TextInputArea\n value={field().state.value}\n onInput={(event) => {\n field().handleChange(event.target.value);\n }}\n onBlur={() => {\n field().handleBlur();\n }}\n {...others}\n />\n </TextInputControl>\n <FieldError errors={field().state.meta.errors} />\n <FieldDescription>{local.description}</FieldDescription>\n </FieldContent>\n </Field>\n );\n};\n"],"names":["TextareaField","props","field","useFieldContext","local","others","splitProps","_$createComponent","Field","invalid","state","meta","errors","length","disabled","readOnly","required","children","FieldLabel","label","FieldContent","TextInputControl","TextInputArea","_$mergeProps","value","onInput","event","handleChange","target","onBlur","handleBlur","FieldError","FieldDescription","description"],"mappings":";;;;;AAkBO,MAAMA,IAAgDC,CAAAA,MAAU;AACrE,QAAMC,IAAQC,EAAAA,GACR,CAACC,GAAOC,CAAM,IAAIC,EAAWL,GAAO,CACxC,SACA,eACA,YACA,YACA,UAAU,CACX;AAED,SAAAM,EACGC,GAAK;AAAA,IAAA,IACJC,UAAO;AAAA,aAAEP,EAAAA,EAAQQ,MAAMC,KAAKC,OAAOC,SAAS;AAAA,IAAC;AAAA,IAAA,IAC7CC,WAAQ;AAAA,aAAEV,EAAMU,YAAY;AAAA,IAAK;AAAA,IAAA,IACjCC,WAAQ;AAAA,aAAEX,EAAMW,YAAY;AAAA,IAAK;AAAA,IAAA,IACjCC,WAAQ;AAAA,aAAEZ,EAAMY,YAAY;AAAA,IAAK;AAAA,IAAA,IAAAC,WAAA;AAAA,aAAA,CAAAV,EAEhCW,GAAU;AAAA,QAAA,IAAAD,WAAA;AAAA,iBAAEb,EAAMe;AAAAA,QAAK;AAAA,MAAA,CAAA,GAAAZ,EACvBa,GAAY;AAAA,QAAA,IAAAH,WAAA;AAAA,iBAAA,CAAAV,EACVc,GAAgB;AAAA,YAAA,IAAAJ,WAAA;AAAA,qBAAAV,EACde,GAAaC,EAAA;AAAA,gBAAA,IACZC,QAAK;AAAA,yBAAEtB,EAAAA,EAAQQ,MAAMc;AAAAA,gBAAK;AAAA,gBAC1BC,SAAUC,CAAAA,MAAU;AAClBxB,kBAAAA,EAAAA,EAAQyB,aAAaD,EAAME,OAAOJ,KAAK;AAAA,gBACzC;AAAA,gBACAK,QAAQA,MAAM;AACZ3B,kBAAAA,EAAAA,EAAQ4B,WAAAA;AAAAA,gBACV;AAAA,cAAA,GACIzB,CAAM,CAAA;AAAA,YAAA;AAAA,UAAA,CAAA,GAAAE,EAGbwB,GAAU;AAAA,YAAA,IAACnB,SAAM;AAAA,qBAAEV,EAAAA,EAAQQ,MAAMC,KAAKC;AAAAA,YAAM;AAAA,UAAA,CAAA,GAAAL,EAC5CyB,GAAgB;AAAA,YAAA,IAAAf,WAAA;AAAA,qBAAEb,EAAM6B;AAAAA,YAAW;AAAA,UAAA,CAAA,CAAA;AAAA,QAAA;AAAA,MAAA,CAAA,CAAA;AAAA,IAAA;AAAA,EAAA,CAAA;AAI5C;"}
1
+ {"version":3,"file":"TextareaField.js","sources":["../../../src/components/form/TextareaField.tsx"],"sourcesContent":["import type { Component, ComponentProps } from 'solid-js';\n\nimport { Field, FieldLabel, FieldContent, FieldError, FieldDescription } from '@/components/Field';\nimport { TextInputControl, TextInputArea } from '@/components/TextInput';\n\nimport { useFieldContext } from './context';\n\nexport type TextareaFieldProps = ComponentProps<typeof TextInputArea> & {\n label?: string;\n description?: string;\n};\n\nexport const TextareaField: Component<TextareaFieldProps> = (props) => {\n const field = useFieldContext<string>();\n const [local, others] = splitProps(props, [\n 'label',\n 'description',\n 'required',\n 'disabled',\n 'readOnly',\n ]);\n\n return (\n <Field\n invalid={field().state.meta.errors.length > 0}\n disabled={local.disabled ?? false}\n readOnly={local.readOnly ?? false}\n required={local.required ?? false}\n >\n <FieldLabel>{local.label}</FieldLabel>\n <FieldContent>\n <TextInputControl>\n <TextInputArea\n value={field().state.value}\n onInput={(event) => {\n field().handleChange(event.target.value);\n }}\n onBlur={() => {\n field().handleBlur();\n }}\n {...others}\n />\n </TextInputControl>\n <FieldError errors={field().state.meta.errors} />\n <FieldDescription>{local.description}</FieldDescription>\n </FieldContent>\n </Field>\n );\n};\n"],"names":["TextareaField","props","field","useFieldContext","local","others","splitProps","_$createComponent","Field","invalid","state","meta","errors","length","disabled","readOnly","required","children","FieldLabel","label","FieldContent","TextInputControl","TextInputArea","_$mergeProps","value","onInput","event","handleChange","target","onBlur","handleBlur","FieldError","FieldDescription","description"],"mappings":";;;;;AAYO,MAAMA,IAAgDC,CAAAA,MAAU;AACrE,QAAMC,IAAQC,EAAAA,GACR,CAACC,GAAOC,CAAM,IAAIC,EAAWL,GAAO,CACxC,SACA,eACA,YACA,YACA,UAAU,CACX;AAED,SAAAM,EACGC,GAAK;AAAA,IAAA,IACJC,UAAO;AAAA,aAAEP,EAAAA,EAAQQ,MAAMC,KAAKC,OAAOC,SAAS;AAAA,IAAC;AAAA,IAAA,IAC7CC,WAAQ;AAAA,aAAEV,EAAMU,YAAY;AAAA,IAAK;AAAA,IAAA,IACjCC,WAAQ;AAAA,aAAEX,EAAMW,YAAY;AAAA,IAAK;AAAA,IAAA,IACjCC,WAAQ;AAAA,aAAEZ,EAAMY,YAAY;AAAA,IAAK;AAAA,IAAA,IAAAC,WAAA;AAAA,aAAA,CAAAV,EAEhCW,GAAU;AAAA,QAAA,IAAAD,WAAA;AAAA,iBAAEb,EAAMe;AAAAA,QAAK;AAAA,MAAA,CAAA,GAAAZ,EACvBa,GAAY;AAAA,QAAA,IAAAH,WAAA;AAAA,iBAAA,CAAAV,EACVc,GAAgB;AAAA,YAAA,IAAAJ,WAAA;AAAA,qBAAAV,EACde,GAAaC,EAAA;AAAA,gBAAA,IACZC,QAAK;AAAA,yBAAEtB,EAAAA,EAAQQ,MAAMc;AAAAA,gBAAK;AAAA,gBAC1BC,SAAUC,CAAAA,MAAU;AAClBxB,kBAAAA,EAAAA,EAAQyB,aAAaD,EAAME,OAAOJ,KAAK;AAAA,gBACzC;AAAA,gBACAK,QAAQA,MAAM;AACZ3B,kBAAAA,EAAAA,EAAQ4B,WAAAA;AAAAA,gBACV;AAAA,cAAA,GACIzB,CAAM,CAAA;AAAA,YAAA;AAAA,UAAA,CAAA,GAAAE,EAGbwB,GAAU;AAAA,YAAA,IAACnB,SAAM;AAAA,qBAAEV,EAAAA,EAAQQ,MAAMC,KAAKC;AAAAA,YAAM;AAAA,UAAA,CAAA,GAAAL,EAC5CyB,GAAgB;AAAA,YAAA,IAAAf,WAAA;AAAA,qBAAEb,EAAM6B;AAAAA,YAAW;AAAA,UAAA,CAAA,CAAA;AAAA,QAAA;AAAA,MAAA,CAAA,CAAA;AAAA,IAAA;AAAA,EAAA,CAAA;AAI5C;"}
@@ -1,25 +1,25 @@
1
- import { template as g, insert as b, createComponent as w, mergeProps as p, effect as m, setAttribute as s, className as x, spread as C } from "solid-js/web";
2
- import { cn as f } from "../../node_modules/.bun/tailwind-variants@3.2.2_e7cab99c1b720a38/node_modules/tailwind-variants/dist/index.js";
1
+ import { template as b, insert as g, createComponent as m, mergeProps as f, effect as w, setAttribute as d, className as x, spread as C } from "solid-js/web";
2
+ import { cn as p } from "../../node_modules/.bun/tailwind-variants@3.2.2_e7cab99c1b720a38/node_modules/tailwind-variants/dist/index.js";
3
3
  import { useSidebar as k } from "./context.js";
4
4
  import { splitProps as u } from "solid-js";
5
- var S = /* @__PURE__ */ g('<div data-slot=sidebar-container><div data-sidebar=sidebar data-slot=sidebar-inner class="group-data-[variant=floating]:shadow-sm flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border">'), z = /* @__PURE__ */ g('<div class="group peer md:block hidden text-sidebar-foreground"data-slot=sidebar><div data-slot=sidebar-gap>');
6
- const D = (d) => {
7
- const [i, a] = u(d, ["variant", "side", "class", "children"]);
5
+ var S = /* @__PURE__ */ b('<div data-slot=sidebar-container><div data-sidebar=sidebar data-slot=sidebar-inner class="group-data-[variant=floating]:shadow-sm flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border">'), z = /* @__PURE__ */ b('<div class="group peer md:block hidden text-sidebar-foreground"data-slot=sidebar><div data-slot=sidebar-gap>');
6
+ const D = (s) => {
7
+ const [e, a] = u(s, ["variant", "side", "class", "children"]);
8
8
  return (() => {
9
- var e = S(), r = e.firstChild;
10
- return C(e, p({
9
+ var i = S(), r = i.firstChild;
10
+ return C(i, f({
11
11
  get class() {
12
- return f("inset-y-0 md:flex fixed z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear", i.side === "left" ? "left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]" : "right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]", i.variant === "floating" || i.variant === "inset" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+var(--spacing(4))+2px)]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l", i.class);
12
+ return p("inset-y-0 md:flex fixed z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear", e.side === "left" ? "left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]" : "right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]", e.variant === "floating" || e.variant === "inset" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+1rem+2px)]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l", e.class);
13
13
  }
14
- }, a), !1, !0), b(r, () => i.children), e;
14
+ }, a), !1, !0), g(r, () => e.children), i;
15
15
  })();
16
- }, _ = (d) => {
16
+ }, _ = (s) => {
17
17
  const {
18
- state: i
19
- } = k(), [a, e] = u(d, ["side", "variant", "collapsible", "class", "children"]);
18
+ state: e
19
+ } = k(), [a, i] = u(s, ["side", "variant", "collapsible", "class", "children"]);
20
20
  return (() => {
21
21
  var r = z(), h = r.firstChild;
22
- return b(r, w(D, p({
22
+ return g(r, m(D, f({
23
23
  get variant() {
24
24
  return a.variant ?? "sidebar";
25
25
  },
@@ -29,13 +29,13 @@ const D = (d) => {
29
29
  get class() {
30
30
  return a.class;
31
31
  }
32
- }, e, {
32
+ }, i, {
33
33
  get children() {
34
34
  return a.children;
35
35
  }
36
- })), null), m((t) => {
37
- var l = i(), o = i() === "collapsed" ? a.collapsible ?? "offcanvas" : "", n = a.variant ?? "sidebar", c = a.side ?? "left", v = f("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear", "group-data-[collapsible=offcanvas]:w-0", "group-data-[side=right]:rotate-180", a.variant === "floating" || a.variant === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+var(--spacing(4)))]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon)");
38
- return l !== t.e && s(r, "data-state", t.e = l), o !== t.t && s(r, "data-collapsible", t.t = o), n !== t.a && s(r, "data-variant", t.a = n), c !== t.o && s(r, "data-side", t.o = c), v !== t.i && x(h, t.i = v), t;
36
+ })), null), w((t) => {
37
+ var l = e(), o = e() === "collapsed" ? a.collapsible ?? "offcanvas" : "", n = a.variant ?? "sidebar", c = a.side ?? "left", v = p("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear", "group-data-[collapsible=offcanvas]:w-0", "group-data-[side=right]:rotate-180", a.variant === "floating" || a.variant === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+1rem)]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon)");
38
+ return l !== t.e && d(r, "data-state", t.e = l), o !== t.t && d(r, "data-collapsible", t.t = o), n !== t.a && d(r, "data-variant", t.a = n), c !== t.o && d(r, "data-side", t.o = c), v !== t.i && x(h, t.i = v), t;
39
39
  }, {
40
40
  e: void 0,
41
41
  t: void 0,
@@ -1 +1 @@
1
- {"version":3,"file":"SidebarDesktop.js","sources":["../../../src/components/sidebar/SidebarDesktop.tsx"],"sourcesContent":["import type { Component, ComponentProps, JSXElement } from 'solid-js';\n\nimport { cn } from 'tailwind-variants';\n\nimport type { SidebarProps } from './Sidebar';\n\nimport { useSidebar } from './context';\n\ntype SidebarDesktopContainerProps = ComponentProps<'div'> & {\n variant: string;\n side: string;\n children: JSXElement;\n};\n\nconst SidebarDesktopContainer: Component<SidebarDesktopContainerProps> = (props) => {\n const [local, others] = splitProps(props, ['variant', 'side', 'class', 'children']);\n return (\n <div\n data-slot='sidebar-container'\n class={cn(\n 'inset-y-0 md:flex fixed z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear',\n local.side === 'left'\n ? 'left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]'\n : 'right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]',\n local.variant === 'floating' || local.variant === 'inset'\n ? 'p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+var(--spacing(4))+2px)]'\n : 'group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l',\n local.class,\n )}\n {...others}\n >\n <div\n data-sidebar='sidebar'\n data-slot='sidebar-inner'\n class='group-data-[variant=floating]:shadow-sm flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border'\n >\n {local.children}\n </div>\n </div>\n );\n};\n\nexport const SidebarDesktop: Component<SidebarProps> = (props) => {\n const { state } = useSidebar();\n const [local, others] = splitProps(props, [\n 'side',\n 'variant',\n 'collapsible',\n 'class',\n 'children',\n ]);\n\n return (\n <div\n class='group peer md:block hidden text-sidebar-foreground'\n data-state={state()}\n data-collapsible={state() === 'collapsed' ? (local.collapsible ?? 'offcanvas') : ''}\n data-variant={local.variant ?? 'sidebar'}\n data-side={local.side ?? 'left'}\n data-slot='sidebar'\n >\n <div\n data-slot='sidebar-gap'\n class={cn(\n 'relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear',\n 'group-data-[collapsible=offcanvas]:w-0',\n 'group-data-[side=right]:rotate-180',\n local.variant === 'floating' || local.variant === 'inset'\n ? 'group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+var(--spacing(4)))]'\n : 'group-data-[collapsible=icon]:w-(--sidebar-width-icon)',\n )}\n />\n <SidebarDesktopContainer\n variant={local.variant ?? 'sidebar'}\n side={local.side ?? 'left'}\n class={local.class}\n {...others}\n >\n {local.children}\n </SidebarDesktopContainer>\n </div>\n );\n};\n"],"names":["SidebarDesktopContainer","props","local","others","splitProps","_el$","_tmpl$","_el$2","firstChild","_$spread","_$mergeProps","cn","side","variant","class","_$insert","children","SidebarDesktop","state","useSidebar","_el$3","_tmpl$2","_el$4","_$createComponent","_$effect","_p$","_v$","_v$2","collapsible","_v$3","_v$4","_v$5","e","_$setAttribute","t","a","o","i","_$className","undefined"],"mappings":";;;;;AAcA,MAAMA,IAAoEC,CAAAA,MAAU;AAClF,QAAM,CAACC,GAAOC,CAAM,IAAIC,EAAWH,GAAO,CAAC,WAAW,QAAQ,SAAS,UAAU,CAAC;AAClF,UAAA,MAAA;AAAA,QAAAI,IAAAC,EAAAA,GAAAC,IAAAF,EAAAG;AAAAC,WAAAA,EAAAJ,GAAAK,EAAA;AAAA,MAAA,IAAA,QAAA;AAAA,eAGWC,EACL,wHACAT,EAAMU,SAAS,SACX,mFACA,oFACJV,EAAMW,YAAY,cAAcX,EAAMW,YAAY,UAC9C,gGACA,2HACJX,EAAMY,KACR;AAAA,MAAC;AAAA,IAAA,GACGX,CAAM,GAAA,IAAA,EA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CAAA,GAAAC,MAAAN,EAAAY,KAAAC,EAAAhB,GAAAG,EAAAY,IAAAN,CAAA,GAAAN;AAAAA,IAAA,GAAA;AAAA,MAAAO,GAAAO;AAAAA,MAAAL,GAAAK;AAAAA,MAAAJ,GAAAI;AAAAA,MAAAH,GAAAG;AAAAA,MAAAF,GAAAE;AAAAA,IAAAA,CAAA,GAAAnB;AAAAA,EAAA,GAAA;AAYT;"}
1
+ {"version":3,"file":"SidebarDesktop.js","sources":["../../../src/components/sidebar/SidebarDesktop.tsx"],"sourcesContent":["import type { Component, ComponentProps, JSXElement } from 'solid-js';\n\nimport { cn } from 'tailwind-variants';\n\nimport type { SidebarProps } from './Sidebar';\n\nimport { useSidebar } from './context';\n\ntype SidebarDesktopContainerProps = ComponentProps<'div'> & {\n variant: string;\n side: string;\n children: JSXElement;\n};\n\nconst SidebarDesktopContainer: Component<SidebarDesktopContainerProps> = (props) => {\n const [local, others] = splitProps(props, ['variant', 'side', 'class', 'children']);\n return (\n <div\n data-slot='sidebar-container'\n class={cn(\n 'inset-y-0 md:flex fixed z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear',\n local.side === 'left'\n ? 'left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]'\n : 'right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]',\n local.variant === 'floating' || local.variant === 'inset'\n ? 'p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+1rem+2px)]'\n : 'group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l',\n local.class,\n )}\n {...others}\n >\n <div\n data-sidebar='sidebar'\n data-slot='sidebar-inner'\n class='group-data-[variant=floating]:shadow-sm flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border'\n >\n {local.children}\n </div>\n </div>\n );\n};\n\nexport const SidebarDesktop: Component<SidebarProps> = (props) => {\n const { state } = useSidebar();\n const [local, others] = splitProps(props, [\n 'side',\n 'variant',\n 'collapsible',\n 'class',\n 'children',\n ]);\n\n return (\n <div\n class='group peer md:block hidden text-sidebar-foreground'\n data-state={state()}\n data-collapsible={state() === 'collapsed' ? (local.collapsible ?? 'offcanvas') : ''}\n data-variant={local.variant ?? 'sidebar'}\n data-side={local.side ?? 'left'}\n data-slot='sidebar'\n >\n <div\n data-slot='sidebar-gap'\n class={cn(\n 'relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear',\n 'group-data-[collapsible=offcanvas]:w-0',\n 'group-data-[side=right]:rotate-180',\n local.variant === 'floating' || local.variant === 'inset'\n ? 'group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+1rem)]'\n : 'group-data-[collapsible=icon]:w-(--sidebar-width-icon)',\n )}\n />\n <SidebarDesktopContainer\n variant={local.variant ?? 'sidebar'}\n side={local.side ?? 'left'}\n class={local.class}\n {...others}\n >\n {local.children}\n </SidebarDesktopContainer>\n </div>\n );\n};\n"],"names":["SidebarDesktopContainer","props","local","others","splitProps","_el$","_tmpl$","_el$2","firstChild","_$spread","_$mergeProps","cn","side","variant","class","_$insert","children","SidebarDesktop","state","useSidebar","_el$3","_tmpl$2","_el$4","_$createComponent","_$effect","_p$","_v$","_v$2","collapsible","_v$3","_v$4","_v$5","e","_$setAttribute","t","a","o","i","_$className","undefined"],"mappings":";;;;;AAcA,MAAMA,IAAoEC,CAAAA,MAAU;AAClF,QAAM,CAACC,GAAOC,CAAM,IAAIC,EAAWH,GAAO,CAAC,WAAW,QAAQ,SAAS,UAAU,CAAC;AAClF,UAAA,MAAA;AAAA,QAAAI,IAAAC,EAAAA,GAAAC,IAAAF,EAAAG;AAAAC,WAAAA,EAAAJ,GAAAK,EAAA;AAAA,MAAA,IAAA,QAAA;AAAA,eAGWC,EACL,wHACAT,EAAMU,SAAS,SACX,mFACA,oFACJV,EAAMW,YAAY,cAAcX,EAAM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BAAAK,EAAAU,IAAAN,CAAA,GAAAC,MAAAL,EAAAW,KAAAH,EAAAb,GAAA,aAAAK,EAAAW,IAAAN,CAAA,GAAAC,MAAAN,EAAAY,KAAAC,EAAAhB,GAAAG,EAAAY,IAAAN,CAAA,GAAAN;AAAAA,IAAA,GAAA;AAAA,MAAAO,GAAAO;AAAAA,MAAAL,GAAAK;AAAAA,MAAAJ,GAAAI;AAAAA,MAAAH,GAAAG;AAAAA,MAAAF,GAAAE;AAAAA,IAAAA,CAAA,GAAAnB;AAAAA,EAAA,GAAA;AAYT;"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package",
3
3
  "name": "@manafishrov/ui",
4
- "version": "1.0.3",
4
+ "version": "1.0.5",
5
5
  "description": "Styled component library for Manafish interfaces ",
6
6
  "license": "AGPL-3.0-or-later",
7
7
  "repository": {
package/src/Theme.tsx CHANGED
@@ -27,7 +27,7 @@ const getSystemTheme = (): 'light' | 'dark' => {
27
27
  };
28
28
 
29
29
  const readStoredTheme = (storageKey: string, defaultTheme: Theme): Theme => {
30
- if (globalThis.localStorage === undefined) {
30
+ if (!('localStorage' in globalThis)) {
31
31
  return defaultTheme;
32
32
  }
33
33
  const stored = globalThis.localStorage.getItem(storageKey);
@@ -74,7 +74,7 @@ export const ThemeProvider: Component<ThemeProviderProps> = (props) => {
74
74
 
75
75
  const setTheme = (newTheme: Theme): void => {
76
76
  setThemeState(newTheme);
77
- if (globalThis.localStorage !== undefined) {
77
+ if ('localStorage' in globalThis) {
78
78
  globalThis.localStorage.setItem(storageKey(), newTheme);
79
79
  }
80
80
  };
@@ -1,19 +1,9 @@
1
- import type { Component, ComponentProps, JSX } from "solid-js";
1
+ import type { Component, ComponentProps, JSX } from 'solid-js';
2
2
 
3
- import {
4
- Checkbox,
5
- CheckboxControl,
6
- CheckboxIndicator,
7
- CheckboxLabel,
8
- } from "@/components/Checkbox";
9
- import {
10
- Field,
11
- FieldContent,
12
- FieldDescription,
13
- FieldError,
14
- } from "@/components/Field";
3
+ import { Checkbox, CheckboxControl, CheckboxIndicator, CheckboxLabel } from '@/components/Checkbox';
4
+ import { Field, FieldContent, FieldDescription, FieldError } from '@/components/Field';
15
5
 
16
- import { useFieldContext } from "./context";
6
+ import { useFieldContext } from './context';
17
7
 
18
8
  export type CheckboxFieldProps = ComponentProps<typeof Checkbox> & {
19
9
  description?: string;
@@ -23,11 +13,11 @@ export type CheckboxFieldProps = ComponentProps<typeof Checkbox> & {
23
13
  export const CheckboxField: Component<CheckboxFieldProps> = (props) => {
24
14
  const field = useFieldContext<boolean>();
25
15
  const [local, others] = splitProps(props, [
26
- "description",
27
- "label",
28
- "required",
29
- "disabled",
30
- "readOnly",
16
+ 'description',
17
+ 'label',
18
+ 'required',
19
+ 'disabled',
20
+ 'readOnly',
31
21
  ]);
32
22
 
33
23
  return (
@@ -1,9 +1,5 @@
1
- import type {
2
- DatePickerInputProps,
3
- DatePickerRootProps,
4
- DateValue,
5
- } from "@ark-ui/solid";
6
- import type { Component } from "solid-js";
1
+ import type { DatePickerInputProps, DatePickerRootProps, DateValue } from '@ark-ui/solid';
2
+ import type { Component } from 'solid-js';
7
3
 
8
4
  import {
9
5
  DatePicker,
@@ -13,16 +9,10 @@ import {
13
9
  DatePickerPositioner,
14
10
  DatePickerTrigger,
15
11
  DatePickerViews,
16
- } from "@/components/DatePicker";
17
- import {
18
- Field,
19
- FieldContent,
20
- FieldDescription,
21
- FieldError,
22
- FieldLabel,
23
- } from "@/components/Field";
12
+ } from '@/components/DatePicker';
13
+ import { Field, FieldContent, FieldDescription, FieldError, FieldLabel } from '@/components/Field';
24
14
 
25
- import { useFieldContext } from "./context";
15
+ import { useFieldContext } from './context';
26
16
 
27
17
  export type DatePickerFieldProps = DatePickerRootProps & {
28
18
  label?: string;
@@ -44,12 +34,12 @@ const DatePickerInputGroup: Component<DatePickerInputProps> = (props) => (
44
34
  );
45
35
 
46
36
  const DATE_PICKER_FIELD_PROPS = [
47
- "label",
48
- "description",
49
- "required",
50
- "disabled",
51
- "readOnly",
52
- "placeholder",
37
+ 'label',
38
+ 'description',
39
+ 'required',
40
+ 'disabled',
41
+ 'readOnly',
42
+ 'placeholder',
53
43
  ] as const;
54
44
 
55
45
  export const DatePickerField: Component<DatePickerFieldProps> = (props) => {
@@ -1,20 +1,20 @@
1
- import { createFormHook } from "@tanstack/solid-form";
1
+ import { createFormHook } from '@tanstack/solid-form';
2
2
 
3
- import { CheckboxField } from "./CheckboxField";
4
- import { ComboboxField } from "./ComboboxField";
5
- import { formContext, fieldContext } from "./context";
6
- import { DatePickerField } from "./DatePickerField";
7
- import { NumberInputField } from "./NumberInputField";
8
- import { PasswordInputField } from "./PasswordInputField";
9
- import { PinInputField } from "./PinInputField";
10
- import { RadioGroupField } from "./RadioGroupField";
11
- import { SelectField } from "./SelectField";
12
- import { SliderField } from "./SliderField";
13
- import { SubmitButton } from "./SubmitButton";
14
- import { SwitchField } from "./SwitchField";
15
- import { TagsInputField } from "./TagsInputField";
16
- import { TextareaField } from "./TextareaField";
17
- import { TextInputField } from "./TextInputField";
3
+ import { CheckboxField } from './CheckboxField';
4
+ import { ComboboxField } from './ComboboxField';
5
+ import { formContext, fieldContext } from './context';
6
+ import { DatePickerField } from './DatePickerField';
7
+ import { NumberInputField } from './NumberInputField';
8
+ import { PasswordInputField } from './PasswordInputField';
9
+ import { PinInputField } from './PinInputField';
10
+ import { RadioGroupField } from './RadioGroupField';
11
+ import { SelectField } from './SelectField';
12
+ import { SliderField } from './SliderField';
13
+ import { SubmitButton } from './SubmitButton';
14
+ import { SwitchField } from './SwitchField';
15
+ import { TagsInputField } from './TagsInputField';
16
+ import { TextareaField } from './TextareaField';
17
+ import { TextInputField } from './TextInputField';
18
18
 
19
19
  export const { useAppForm, withForm, withFieldGroup } = createFormHook({
20
20
  formContext,
@@ -1,20 +1,14 @@
1
- import type { Component, ComponentProps } from "solid-js";
1
+ import type { Component, ComponentProps } from 'solid-js';
2
2
 
3
- import {
4
- Field,
5
- FieldLabel,
6
- FieldContent,
7
- FieldError,
8
- FieldDescription,
9
- } from "@/components/Field";
3
+ import { Field, FieldLabel, FieldContent, FieldError, FieldDescription } from '@/components/Field';
10
4
  import {
11
5
  NumberInput,
12
6
  NumberInputControl,
13
7
  NumberInputInput,
14
8
  NumberInputTriggers,
15
- } from "@/components/NumberInput";
9
+ } from '@/components/NumberInput';
16
10
 
17
- import { useFieldContext } from "./context";
11
+ import { useFieldContext } from './context';
18
12
 
19
13
  export type NumberInputFieldProps = ComponentProps<typeof NumberInput> & {
20
14
  label?: string;
@@ -25,12 +19,12 @@ export type NumberInputFieldProps = ComponentProps<typeof NumberInput> & {
25
19
  export const NumberInputField: Component<NumberInputFieldProps> = (props) => {
26
20
  const field = useFieldContext<number>();
27
21
  const [local, others] = splitProps(props, [
28
- "label",
29
- "description",
30
- "required",
31
- "disabled",
32
- "readOnly",
33
- "triggers",
22
+ 'label',
23
+ 'description',
24
+ 'required',
25
+ 'disabled',
26
+ 'readOnly',
27
+ 'triggers',
34
28
  ]);
35
29
 
36
30
  return (
@@ -1,39 +1,29 @@
1
- import { splitProps, type Component, type ComponentProps } from "solid-js";
1
+ import { splitProps, type Component, type ComponentProps } from 'solid-js';
2
2
 
3
- import {
4
- Field,
5
- FieldLabel,
6
- FieldContent,
7
- FieldError,
8
- FieldDescription,
9
- } from "@/components/Field";
3
+ import { Field, FieldLabel, FieldContent, FieldError, FieldDescription } from '@/components/Field';
10
4
  import {
11
5
  PasswordInput,
12
6
  PasswordInputControl,
13
7
  PasswordInputInput,
14
8
  PasswordInputVisibilityTrigger,
15
9
  PasswordInputIndicator,
16
- } from "@/components/PasswordInput";
10
+ } from '@/components/PasswordInput';
17
11
 
18
- import { useFieldContext } from "./context";
12
+ import { useFieldContext } from './context';
19
13
 
20
- export type PasswordInputFieldProps = ComponentProps<
21
- typeof PasswordInputInput
22
- > & {
14
+ export type PasswordInputFieldProps = ComponentProps<typeof PasswordInputInput> & {
23
15
  label?: string;
24
16
  description?: string;
25
17
  };
26
18
 
27
- export const PasswordInputField: Component<PasswordInputFieldProps> = (
28
- props,
29
- ) => {
19
+ export const PasswordInputField: Component<PasswordInputFieldProps> = (props) => {
30
20
  const field = useFieldContext<string>();
31
21
  const [local, others] = splitProps(props, [
32
- "label",
33
- "description",
34
- "required",
35
- "disabled",
36
- "readOnly",
22
+ 'label',
23
+ 'description',
24
+ 'required',
25
+ 'disabled',
26
+ 'readOnly',
37
27
  ]);
38
28
 
39
29
  return (
@@ -1,14 +1,9 @@
1
- import type { Component, ComponentProps } from "solid-js";
1
+ import type { Component, ComponentProps } from 'solid-js';
2
2
 
3
- import {
4
- Field,
5
- FieldContent,
6
- FieldError,
7
- FieldDescription,
8
- } from "@/components/Field";
9
- import { RadioGroup } from "@/components/RadioGroup";
3
+ import { Field, FieldContent, FieldError, FieldDescription } from '@/components/Field';
4
+ import { RadioGroup } from '@/components/RadioGroup';
10
5
 
11
- import { useFieldContext } from "./context";
6
+ import { useFieldContext } from './context';
12
7
 
13
8
  export type RadioGroupFieldProps = ComponentProps<typeof RadioGroup> & {
14
9
  label?: string;
@@ -17,12 +12,7 @@ export type RadioGroupFieldProps = ComponentProps<typeof RadioGroup> & {
17
12
 
18
13
  export const RadioGroupField: Component<RadioGroupFieldProps> = (props) => {
19
14
  const field = useFieldContext<string>();
20
- const [local, others] = splitProps(props, [
21
- "description",
22
- "required",
23
- "disabled",
24
- "readOnly",
25
- ]);
15
+ const [local, others] = splitProps(props, ['description', 'required', 'disabled', 'readOnly']);
26
16
 
27
17
  return (
28
18
  <Field
@@ -35,7 +25,7 @@ export const RadioGroupField: Component<RadioGroupFieldProps> = (props) => {
35
25
  <RadioGroup
36
26
  value={field().state.value}
37
27
  onValueChange={(details) => {
38
- field().handleChange(details.value ?? "");
28
+ field().handleChange(details.value ?? '');
39
29
  }}
40
30
  onBlur={() => {
41
31
  field().handleBlur();
@@ -1,12 +1,6 @@
1
- import type { Component, ComponentProps, JSX } from "solid-js";
1
+ import type { Component, ComponentProps, JSX } from 'solid-js';
2
2
 
3
- import {
4
- Field,
5
- FieldContent,
6
- FieldDescription,
7
- FieldError,
8
- FieldLabel,
9
- } from "@/components/Field";
3
+ import { Field, FieldContent, FieldDescription, FieldError, FieldLabel } from '@/components/Field';
10
4
  import {
11
5
  Select,
12
6
  SelectContent,
@@ -14,13 +8,11 @@ import {
14
8
  SelectPositioner,
15
9
  SelectTrigger,
16
10
  SelectValue,
17
- } from "@/components/Select";
11
+ } from '@/components/Select';
18
12
 
19
- import { useFieldContext } from "./context";
13
+ import { useFieldContext } from './context';
20
14
 
21
- const SelectInput: Component<{ placeholder: string; children: JSX.Element }> = (
22
- props,
23
- ) => (
15
+ const SelectInput: Component<{ placeholder: string; children: JSX.Element }> = (props) => (
24
16
  <>
25
17
  <SelectControl>
26
18
  <SelectTrigger>
@@ -42,13 +34,13 @@ export type SelectFieldProps = ComponentProps<typeof Select> & {
42
34
  export const SelectField: Component<SelectFieldProps> = (props) => {
43
35
  const field = useFieldContext<string[]>();
44
36
  const [local, others] = splitProps(props, [
45
- "label",
46
- "description",
47
- "required",
48
- "disabled",
49
- "readOnly",
50
- "placeholder",
51
- "children",
37
+ 'label',
38
+ 'description',
39
+ 'required',
40
+ 'disabled',
41
+ 'readOnly',
42
+ 'placeholder',
43
+ 'children',
52
44
  ]);
53
45
 
54
46
  return (
@@ -73,9 +65,7 @@ export const SelectField: Component<SelectFieldProps> = (props) => {
73
65
  readOnly={local.readOnly ?? false}
74
66
  {...others}
75
67
  >
76
- <SelectInput placeholder={local.placeholder ?? ""}>
77
- {local.children}
78
- </SelectInput>
68
+ <SelectInput placeholder={local.placeholder ?? ''}>{local.children}</SelectInput>
79
69
  </Select>
80
70
  <FieldError errors={field().state.meta.errors} />
81
71
  <FieldDescription>{local.description}</FieldDescription>
@@ -1,8 +1,8 @@
1
- import type { Component, ComponentProps } from "solid-js";
1
+ import type { Component, ComponentProps } from 'solid-js';
2
2
 
3
- import { Button } from "@/components/Button";
3
+ import { Button } from '@/components/Button';
4
4
 
5
- import { useFormContext } from "./context";
5
+ import { useFormContext } from './context';
6
6
 
7
7
  export type SubmitButtonProps = ComponentProps<typeof Button> & {
8
8
  loading?: boolean;
@@ -10,20 +10,14 @@ export type SubmitButtonProps = ComponentProps<typeof Button> & {
10
10
 
11
11
  export const SubmitButton: Component<SubmitButtonProps> = (props) => {
12
12
  const form = useFormContext();
13
- const [local, others] = splitProps(props, [
14
- "children",
15
- "loading",
16
- "disabled",
17
- ]);
13
+ const [local, others] = splitProps(props, ['children', 'loading', 'disabled']);
18
14
 
19
15
  const isLoading = (): boolean =>
20
- form.state.isSubmitting ||
21
- form.state.isValidating ||
22
- (local.loading ?? false);
16
+ form.state.isSubmitting || form.state.isValidating || (local.loading ?? false);
23
17
 
24
18
  return (
25
19
  <Button
26
- type="submit"
20
+ type='submit'
27
21
  loading={isLoading()}
28
22
  disabled={local.disabled ?? !form.state.canSubmit}
29
23
  {...others}
@@ -1,19 +1,9 @@
1
- import type { Component, ComponentProps, JSX } from "solid-js";
1
+ import type { Component, ComponentProps, JSX } from 'solid-js';
2
2
 
3
- import {
4
- Field,
5
- FieldContent,
6
- FieldDescription,
7
- FieldError,
8
- } from "@/components/Field";
9
- import {
10
- Switch,
11
- SwitchControl,
12
- SwitchLabel,
13
- SwitchThumb,
14
- } from "@/components/Switch";
3
+ import { Field, FieldContent, FieldDescription, FieldError } from '@/components/Field';
4
+ import { Switch, SwitchControl, SwitchLabel, SwitchThumb } from '@/components/Switch';
15
5
 
16
- import { useFieldContext } from "./context";
6
+ import { useFieldContext } from './context';
17
7
 
18
8
  export type SwitchFieldProps = ComponentProps<typeof Switch> & {
19
9
  description?: string;
@@ -23,11 +13,11 @@ export type SwitchFieldProps = ComponentProps<typeof Switch> & {
23
13
  export const SwitchField: Component<SwitchFieldProps> = (props) => {
24
14
  const field = useFieldContext<boolean>();
25
15
  const [local, others] = splitProps(props, [
26
- "description",
27
- "label",
28
- "required",
29
- "disabled",
30
- "readOnly",
16
+ 'description',
17
+ 'label',
18
+ 'required',
19
+ 'disabled',
20
+ 'readOnly',
31
21
  ]);
32
22
 
33
23
  return (
@@ -1,15 +1,9 @@
1
- import { type Component, type ComponentProps, splitProps } from "solid-js";
1
+ import { type Component, type ComponentProps, splitProps } from 'solid-js';
2
2
 
3
- import {
4
- Field,
5
- FieldLabel,
6
- FieldContent,
7
- FieldError,
8
- FieldDescription,
9
- } from "@/components/Field";
10
- import { TextInputControl, TextInputInput } from "@/components/TextInput";
3
+ import { Field, FieldLabel, FieldContent, FieldError, FieldDescription } from '@/components/Field';
4
+ import { TextInputControl, TextInputInput } from '@/components/TextInput';
11
5
 
12
- import { useFieldContext } from "./context";
6
+ import { useFieldContext } from './context';
13
7
 
14
8
  export type TextInputFieldProps = ComponentProps<typeof TextInputInput> & {
15
9
  label?: string;
@@ -19,11 +13,11 @@ export type TextInputFieldProps = ComponentProps<typeof TextInputInput> & {
19
13
  export const TextInputField: Component<TextInputFieldProps> = (props) => {
20
14
  const field = useFieldContext<string>();
21
15
  const [local, others] = splitProps(props, [
22
- "label",
23
- "description",
24
- "required",
25
- "disabled",
26
- "readOnly",
16
+ 'label',
17
+ 'description',
18
+ 'required',
19
+ 'disabled',
20
+ 'readOnly',
27
21
  ]);
28
22
 
29
23
  return (
@@ -1,15 +1,9 @@
1
- import type { Component, ComponentProps } from "solid-js";
1
+ import type { Component, ComponentProps } from 'solid-js';
2
2
 
3
- import {
4
- Field,
5
- FieldLabel,
6
- FieldContent,
7
- FieldError,
8
- FieldDescription,
9
- } from "@/components/Field";
10
- import { TextInputControl, TextInputArea } from "@/components/TextInput";
3
+ import { Field, FieldLabel, FieldContent, FieldError, FieldDescription } from '@/components/Field';
4
+ import { TextInputControl, TextInputArea } from '@/components/TextInput';
11
5
 
12
- import { useFieldContext } from "./context";
6
+ import { useFieldContext } from './context';
13
7
 
14
8
  export type TextareaFieldProps = ComponentProps<typeof TextInputArea> & {
15
9
  label?: string;
@@ -19,11 +13,11 @@ export type TextareaFieldProps = ComponentProps<typeof TextInputArea> & {
19
13
  export const TextareaField: Component<TextareaFieldProps> = (props) => {
20
14
  const field = useFieldContext<string>();
21
15
  const [local, others] = splitProps(props, [
22
- "label",
23
- "description",
24
- "required",
25
- "disabled",
26
- "readOnly",
16
+ 'label',
17
+ 'description',
18
+ 'required',
19
+ 'disabled',
20
+ 'readOnly',
27
21
  ]);
28
22
 
29
23
  return (
@@ -23,7 +23,7 @@ const SidebarDesktopContainer: Component<SidebarDesktopContainerProps> = (props)
23
23
  ? 'left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]'
24
24
  : 'right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]',
25
25
  local.variant === 'floating' || local.variant === 'inset'
26
- ? 'p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+var(--spacing(4))+2px)]'
26
+ ? 'p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+1rem+2px)]'
27
27
  : 'group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l',
28
28
  local.class,
29
29
  )}
@@ -66,7 +66,7 @@ export const SidebarDesktop: Component<SidebarProps> = (props) => {
66
66
  'group-data-[collapsible=offcanvas]:w-0',
67
67
  'group-data-[side=right]:rotate-180',
68
68
  local.variant === 'floating' || local.variant === 'inset'
69
- ? 'group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+var(--spacing(4)))]'
69
+ ? 'group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+1rem)]'
70
70
  : 'group-data-[collapsible=icon]:w-(--sidebar-width-icon)',
71
71
  )}
72
72
  />