@atom-learning/components 3.27.1 → 3.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/avatar/Avatar.d.ts +1 -1
- package/dist/components/badge/Badge.d.ts +1 -1
- package/dist/components/badge/BadgeIcon.d.ts +1 -1
- package/dist/components/banner/banner-regular/BannerRegular.d.ts +3 -3
- package/dist/components/banner/banner-slim/BannerSlim.d.ts +3 -3
- package/dist/components/checkbox-group/CheckboxGroup.d.ts +3 -3
- package/dist/components/checkbox-tree/CheckboxTree.d.ts +12 -12
- package/dist/components/chip-dismissible-group/ChipDismissibleGroupItem.d.ts +1 -1
- package/dist/components/chip-toggle-group/ChipToggleGroupItem.d.ts +1 -1
- package/dist/components/data-table/DataTable.d.ts +6 -6
- package/dist/components/form/Form.d.ts +11 -4
- package/dist/components/form/Form.js +1 -1
- package/dist/components/form/Form.js.map +1 -1
- package/dist/components/input/Input.d.ts +2 -753
- package/dist/components/input/Input.js.map +1 -1
- package/dist/components/navigation-menu-vertical/NavigationMenuVertical.d.ts +7 -7
- package/dist/components/navigation-menu-vertical/NavigationMenuVerticalIcon.d.ts +1 -1
- package/dist/components/section-message/SectionMessage.d.ts +1 -1
- package/dist/components/toast/Toast.d.ts +1 -1
- package/dist/components/tree/Tree.d.ts +11 -11
- package/dist/components/tree/TreeCollapsible.d.ts +1 -1
- package/dist/components/tree/TreeIcon.d.ts +1 -1
- package/dist/docgen.json +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/package.json +1 -2
- package/CHANGELOG.md +0 -208
- package/dist/components/form/Form.types.d.ts +0 -46
- package/dist/components/form/Form.types.js +0 -2
- package/dist/components/form/Form.types.js.map +0 -1
|
@@ -386,9 +386,6 @@ export declare const DataTable: (({ columns, data: dataProp, getAsyncData, defau
|
|
|
386
386
|
marginBottom: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
|
|
387
387
|
};
|
|
388
388
|
}> | undefined;
|
|
389
|
-
onBlur?: import("react").FocusEventHandler<HTMLTableSectionElement> | undefined;
|
|
390
|
-
onChange?: import("react").FormEventHandler<HTMLTableSectionElement> | undefined;
|
|
391
|
-
onSubmit?: import("react").FormEventHandler<HTMLTableSectionElement> | undefined;
|
|
392
389
|
slot?: string | undefined;
|
|
393
390
|
style?: import("react").CSSProperties | undefined;
|
|
394
391
|
title?: string | undefined;
|
|
@@ -498,7 +495,9 @@ export declare const DataTable: (({ columns, data: dataProp, getAsyncData, defau
|
|
|
498
495
|
onCompositionUpdateCapture?: import("react").CompositionEventHandler<HTMLTableSectionElement> | undefined;
|
|
499
496
|
onFocus?: import("react").FocusEventHandler<HTMLTableSectionElement> | undefined;
|
|
500
497
|
onFocusCapture?: import("react").FocusEventHandler<HTMLTableSectionElement> | undefined;
|
|
498
|
+
onBlur?: import("react").FocusEventHandler<HTMLTableSectionElement> | undefined;
|
|
501
499
|
onBlurCapture?: import("react").FocusEventHandler<HTMLTableSectionElement> | undefined;
|
|
500
|
+
onChange?: import("react").FormEventHandler<HTMLTableSectionElement> | undefined;
|
|
502
501
|
onChangeCapture?: import("react").FormEventHandler<HTMLTableSectionElement> | undefined;
|
|
503
502
|
onBeforeInput?: import("react").FormEventHandler<HTMLTableSectionElement> | undefined;
|
|
504
503
|
onBeforeInputCapture?: import("react").FormEventHandler<HTMLTableSectionElement> | undefined;
|
|
@@ -506,6 +505,7 @@ export declare const DataTable: (({ columns, data: dataProp, getAsyncData, defau
|
|
|
506
505
|
onInputCapture?: import("react").FormEventHandler<HTMLTableSectionElement> | undefined;
|
|
507
506
|
onReset?: import("react").FormEventHandler<HTMLTableSectionElement> | undefined;
|
|
508
507
|
onResetCapture?: import("react").FormEventHandler<HTMLTableSectionElement> | undefined;
|
|
508
|
+
onSubmit?: import("react").FormEventHandler<HTMLTableSectionElement> | undefined;
|
|
509
509
|
onSubmitCapture?: import("react").FormEventHandler<HTMLTableSectionElement> | undefined;
|
|
510
510
|
onInvalid?: import("react").FormEventHandler<HTMLTableSectionElement> | undefined;
|
|
511
511
|
onInvalidCapture?: import("react").FormEventHandler<HTMLTableSectionElement> | undefined;
|
|
@@ -1810,7 +1810,7 @@ export declare const DataTable: (({ columns, data: dataProp, getAsyncData, defau
|
|
|
1810
1810
|
*
|
|
1811
1811
|
* If you need more customisation options, you can compose your own implementation with our UI-only input components and `useDataTable`.
|
|
1812
1812
|
*/
|
|
1813
|
-
GlobalFilter: ({ onChange, label, hideLabel, ...props }:
|
|
1813
|
+
GlobalFilter: ({ onChange, label, hideLabel, ...props }: Omit<Omit<Omit<Pick<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "key" | keyof import("react").InputHTMLAttributes<HTMLInputElement>> & {
|
|
1814
1814
|
ref?: ((instance: HTMLInputElement | null) => void) | import("react").RefObject<HTMLInputElement> | null | undefined;
|
|
1815
1815
|
}, "css"> & import("@stitches/react/types/styled-component").TransformProps<{}, {
|
|
1816
1816
|
sm: string;
|
|
@@ -2195,7 +2195,7 @@ export declare const DataTable: (({ columns, data: dataProp, getAsyncData, defau
|
|
|
2195
2195
|
}) | undefined;
|
|
2196
2196
|
type?: "number" | "text" | "search" | "tel" | "url" | "email" | "password" | undefined;
|
|
2197
2197
|
as?: undefined;
|
|
2198
|
-
}, "
|
|
2198
|
+
}, "size" | "state"> & {
|
|
2199
2199
|
size?: "sm" | "md" | "lg" | "xl" | ({
|
|
2200
2200
|
"@sm"?: "sm" | "md" | "lg" | "xl" | undefined;
|
|
2201
2201
|
"@md"?: "sm" | "md" | "lg" | "xl" | undefined;
|
|
@@ -2220,7 +2220,7 @@ export declare const DataTable: (({ columns, data: dataProp, getAsyncData, defau
|
|
|
2220
2220
|
} & {
|
|
2221
2221
|
[x: string]: "error" | undefined;
|
|
2222
2222
|
}) | undefined;
|
|
2223
|
-
}
|
|
2223
|
+
} & {
|
|
2224
2224
|
size?: "sm" | "md" | "lg" | undefined;
|
|
2225
2225
|
css?: import("../..").CSS | undefined;
|
|
2226
2226
|
value?: string | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type {
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { DefaultValues, FieldValues, Mode, SubmitErrorHandler, SubmitHandler, UseFormMethods } from 'react-hook-form';
|
|
3
3
|
declare const StyledForm: import("@stitches/react/types/styled-component").StyledComponent<"form", {}, {
|
|
4
4
|
sm: string;
|
|
5
5
|
md: string;
|
|
@@ -367,9 +367,16 @@ declare const StyledForm: import("@stitches/react/types/styled-component").Style
|
|
|
367
367
|
marginBottom: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
|
|
368
368
|
};
|
|
369
369
|
}>>;
|
|
370
|
-
declare type
|
|
370
|
+
declare type StyledFormProps = Omit<React.ComponentPropsWithoutRef<typeof StyledForm>, 'onSubmit' | 'onError'>;
|
|
371
|
+
interface FormProps<TFormData extends FieldValues> extends StyledFormProps {
|
|
372
|
+
defaultValues?: DefaultValues<TFormData>;
|
|
373
|
+
validationMode?: Mode;
|
|
374
|
+
onSubmit: SubmitHandler<TFormData>;
|
|
375
|
+
onError?: SubmitErrorHandler<TFormData>;
|
|
376
|
+
children: React.ReactNode | ((methods: UseFormMethods<TFormData>) => React.ReactNode);
|
|
377
|
+
}
|
|
371
378
|
export declare const Form: {
|
|
372
|
-
|
|
379
|
+
<TFormData extends FieldValues>(props: FormProps<TFormData>): JSX.Element;
|
|
373
380
|
displayName: string;
|
|
374
381
|
};
|
|
375
382
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import r from"react";import{useForm as u,FormProvider as f}from"react-hook-form";import{styled as s}from"../../stitches.js";const c=s("form",{}),t=m=>{const{children:o,defaultValues:a,validationMode:l="onBlur",onSubmit:n,onError:i,...d}=m,e=u({defaultValues:a,mode:l});return r.createElement(f,{...e},r.createElement(c,{"aria-label":"form",onSubmit:e.handleSubmit(n,i),...d},typeof o=="function"?o(e):o))};t.displayName="Form";export{t as Form};
|
|
2
2
|
//# sourceMappingURL=Form.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Form.js","sources":["../../../src/components/form/Form.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"Form.js","sources":["../../../src/components/form/Form.tsx"],"sourcesContent":["import React from 'react'\nimport type {\n DefaultValues,\n FieldValues,\n Mode,\n SubmitErrorHandler,\n SubmitHandler,\n UseFormMethods\n} from 'react-hook-form'\nimport { FormProvider, useForm } from 'react-hook-form'\n\nimport { styled } from '~/stitches'\n\nconst StyledForm = styled('form', {})\n\ntype StyledFormProps = Omit<\n React.ComponentPropsWithoutRef<typeof StyledForm>,\n 'onSubmit' | 'onError'\n>\n\ninterface FormProps<TFormData extends FieldValues> extends StyledFormProps {\n defaultValues?: DefaultValues<TFormData>\n validationMode?: Mode\n onSubmit: SubmitHandler<TFormData>\n onError?: SubmitErrorHandler<TFormData>\n children:\n | React.ReactNode\n | ((methods: UseFormMethods<TFormData>) => React.ReactNode)\n}\n\nexport const Form = <TFormData extends FieldValues>(\n props: FormProps<TFormData>\n) => {\n const {\n children,\n defaultValues,\n validationMode = 'onBlur',\n onSubmit,\n onError,\n ...rest\n } = props\n\n const methods = useForm<TFormData>({\n defaultValues,\n mode: validationMode\n })\n\n return (\n <FormProvider {...methods}>\n <StyledForm\n aria-label=\"form\"\n onSubmit={methods.handleSubmit(onSubmit, onError)}\n {...rest}\n >\n {typeof children === 'function' ? children(methods) : children}\n </StyledForm>\n </FormProvider>\n )\n}\n\nForm.displayName = 'Form'\n"],"names":["StyledForm","styled","Form","props","children","defaultValues","validationMode","onSubmit","onError","rest","methods","useForm","React","FormProvider"],"mappings":"4HAaA,MAAMA,EAAaC,EAAO,OAAQ,CAAA,CAAE,EAiBvBC,EACXC,GACG,CACH,KAAM,CACJ,SAAAC,EACA,cAAAC,EACA,eAAAC,EAAiB,SACjB,SAAAC,EACA,QAAAC,KACGC,CACL,EAAIN,EAEEO,EAAUC,EAAmB,CACjC,cAAAN,EACA,KAAMC,CACR,CAAC,EAED,OACEM,EAAA,cAACC,EAAA,CAAc,GAAGH,CAAAA,EAChBE,EAAA,cAACZ,EAAA,CACC,aAAW,OACX,SAAUU,EAAQ,aAAaH,EAAUC,CAAO,EAC/C,GAAGC,GAEH,OAAOL,GAAa,WAAaA,EAASM,CAAO,EAAIN,CACxD,CACF,CAEJ,EAEAF,EAAK,YAAc"}
|