@atom-learning/components 5.4.4 → 5.5.0-beta.1
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/action-icon/ActionIcon.d.ts +1 -1
- package/dist/components/banner/Banner.d.ts +2 -2
- package/dist/components/banner/banner-regular/BannerRegular.d.ts +102 -469
- package/dist/components/banner/banner-regular/BannerRegularDismiss.d.ts +3 -3
- package/dist/components/banner/banner-slim/BannerSlim.d.ts +114 -481
- package/dist/components/banner/banner-slim/BannerSlimDismiss.d.ts +3 -3
- package/dist/components/button/Button.d.ts +1 -1
- package/dist/components/checkbox-field/CheckboxField.js +1 -1
- package/dist/components/checkbox-field/CheckboxField.js.map +1 -1
- package/dist/components/checkbox-group/CheckboxGroup.d.ts +90 -90
- package/dist/components/checkbox-tree/CheckboxTree.d.ts +344 -344
- package/dist/components/create-password-field/CreatePasswordField.d.ts +1 -1
- package/dist/components/create-password-field/CreatePasswordField.js +1 -1
- package/dist/components/create-password-field/CreatePasswordField.js.map +1 -1
- package/dist/components/data-table/DataTable.d.ts +110 -98
- package/dist/components/date-field/DateField.d.ts +1 -1
- package/dist/components/date-field/DateField.js +1 -1
- package/dist/components/date-field/DateField.js.map +1 -1
- package/dist/components/dialog/Dialog.d.ts +2 -2
- package/dist/components/dismissible/index.d.ts +2 -2
- package/dist/components/dismissible-group/index.d.ts +3 -3
- package/dist/components/field-wrapper/FieldWrapper.d.ts +3 -1
- package/dist/components/field-wrapper/FieldWrapper.js +1 -1
- package/dist/components/field-wrapper/FieldWrapper.js.map +1 -1
- package/dist/components/form/Form.d.ts +3 -2
- package/dist/components/form/Form.js +1 -1
- package/dist/components/form/Form.js.map +1 -1
- package/dist/components/form/index.d.ts +1 -0
- package/dist/components/form/useFormCustomContext.d.ts +7 -0
- package/dist/components/form/useFormCustomContext.js +2 -0
- package/dist/components/form/useFormCustomContext.js.map +1 -0
- package/dist/components/heading/Heading.d.ts +1 -0
- package/dist/components/heading/Heading.js +1 -1
- package/dist/components/heading/Heading.js.map +1 -1
- package/dist/components/input/Input.d.ts +3 -1
- package/dist/components/input/Input.js +1 -1
- package/dist/components/input/Input.js.map +1 -1
- package/dist/components/input-field/InputField.d.ts +1 -1
- package/dist/components/input-field/InputField.js +1 -1
- package/dist/components/input-field/InputField.js.map +1 -1
- package/dist/components/keyboard-shortcut/index.d.ts +2 -2
- package/dist/components/label/Label.d.ts +2 -1
- package/dist/components/label/Label.js +1 -1
- package/dist/components/label/Label.js.map +1 -1
- package/dist/components/navigation-menu-vertical/NavigationMenuVertical.d.ts +162 -162
- package/dist/components/number-input/NumberInput.d.ts +2 -1
- package/dist/components/number-input/NumberInput.js +1 -1
- package/dist/components/number-input/NumberInput.js.map +1 -1
- package/dist/components/number-input/NumberInputStepper.d.ts +756 -1
- package/dist/components/number-input/NumberInputStepper.js +1 -1
- package/dist/components/number-input/NumberInputStepper.js.map +1 -1
- package/dist/components/number-input-field/NumberInputField.d.ts +1 -1
- package/dist/components/number-input-field/NumberInputField.js +1 -1
- package/dist/components/number-input-field/NumberInputField.js.map +1 -1
- package/dist/components/pagination/PaginationNextButton.d.ts +3 -3
- package/dist/components/pagination/PaginationPopover.js +1 -1
- package/dist/components/pagination/PaginationPopover.js.map +1 -1
- package/dist/components/pagination/PaginationPreviousButton.d.ts +3 -3
- package/dist/components/password-field/PasswordField.d.ts +1 -1
- package/dist/components/password-field/PasswordField.js +1 -1
- package/dist/components/password-field/PasswordField.js.map +1 -1
- package/dist/components/radio-button-field/RadioButtonField.js +1 -1
- package/dist/components/radio-button-field/RadioButtonField.js.map +1 -1
- package/dist/components/search-field/SearchField.d.ts +1 -1
- package/dist/components/search-field/SearchField.js +1 -1
- package/dist/components/search-field/SearchField.js.map +1 -1
- package/dist/components/search-input/SearchInput.js +1 -1
- package/dist/components/search-input/SearchInput.js.map +1 -1
- package/dist/components/section-message/SectionMessage.d.ts +1 -1
- package/dist/components/segmented-control/SegmentedControl.d.ts +9 -9
- package/dist/components/select/Select.d.ts +1 -0
- package/dist/components/select/Select.js +1 -1
- package/dist/components/select/Select.js.map +1 -1
- package/dist/components/select-field/SelectField.d.ts +1 -1
- package/dist/components/select-field/SelectField.js +1 -1
- package/dist/components/select-field/SelectField.js.map +1 -1
- package/dist/components/side-bar/SideBarComponents.d.ts +1 -1
- package/dist/components/sortable/Handle.d.ts +3 -3
- package/dist/components/sortable/index.d.ts +3 -3
- package/dist/components/stepper/StepperStepLabel.d.ts +1 -1
- package/dist/components/textarea/Textarea.d.ts +1 -0
- package/dist/components/textarea/Textarea.js +1 -1
- package/dist/components/textarea/Textarea.js.map +1 -1
- package/dist/components/textarea-field/TextareaField.d.ts +1 -1
- package/dist/components/textarea-field/TextareaField.js +1 -1
- package/dist/components/textarea-field/TextareaField.js.map +1 -1
- package/dist/components/tile/Tile.d.ts +1 -0
- package/dist/components/tile/Tile.js +1 -1
- package/dist/components/tile/Tile.js.map +1 -1
- package/dist/components/tile-interactive/TileInteractive.d.ts +2 -1
- package/dist/components/tile-toggle-group/TileToggleGroupItem.d.ts +2 -1
- package/dist/components/toggle-group/index.d.ts +2 -2
- package/dist/components/top-bar/TopBar.d.ts +9 -7
- package/dist/components/top-bar/TopBar.js +1 -1
- package/dist/components/top-bar/TopBar.js.map +1 -1
- package/dist/components/tree/Tree.d.ts +243 -243
- package/dist/docgen.json +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -12,7 +12,7 @@ type CreatePasswordFieldProps = Override<React.ComponentProps<typeof PasswordInp
|
|
|
12
12
|
messageDirection?: CSS['flexDirection'];
|
|
13
13
|
}>;
|
|
14
14
|
export declare const CreatePasswordField: {
|
|
15
|
-
({ validate, defaultValidation, messageDirection, label, name, css, validation, ...remainingProps }: CreatePasswordFieldProps): React.JSX.Element;
|
|
15
|
+
({ validate, defaultValidation, messageDirection, label, name, css, validation, appearance, ...remainingProps }: CreatePasswordFieldProps): React.JSX.Element;
|
|
16
16
|
displayName: string;
|
|
17
17
|
};
|
|
18
18
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import E from"invariant";import*as a from"react";import{useFormContext as k}from"react-hook-form";import{throttle as B}from"throttle-debounce";import{Box as P}from"../box/Box.js";import{Flex as D}from"../flex/Flex.js";import{InlineMessage as I}from"../inline-message/InlineMessage.js";import{PasswordField as M}from"../password-field/PasswordField.js";const p=({validate:u,defaultValidation:f,messageDirection:v="row",label:b="Create a password",name:r="password",css:w,validation:y,appearance:C,...x})=>{var i;const{formState:o,control:n}=k(),[s,m]=a.useState(!1),[c,d]=a.useState(f),F=o.touched[r],g=((i=o.errors[r])==null?void 0:i.type)==="validate"||Object.values(c).every(e=>!e),l=a.useCallback(async e=>{const t=await u(e);return t?(E(typeof t=="object","The validate function must return an object"),d(t),Object.values(t).every(S=>S)):!1},[d]),h=a.useCallback(B(500,l),[l]),j=(e,t)=>e?"success":t?"neutral":"error",O=n.mode.isOnBlur&&(s||F)||n.mode.isOnSubmit&&(s||o.isSubmitted&&g);return a.createElement(P,{css:w},a.createElement(M,{label:b,name:r,onChange:e=>h(e.target.value),onBlur:()=>m(!1),onFocus:()=>m(!0),validation:{...y,validate:l},appearance:C,...x}),O&&a.createElement(D,{css:{mt:"$2",gap:"$2",flexWrap:"wrap",flexDirection:v}},Object.entries(c).map(([e,t])=>a.createElement(I,{key:e,theme:j(t,s)},e))))};p.displayName="CreatePasswordField";export{p as CreatePasswordField};
|
|
2
2
|
//# sourceMappingURL=CreatePasswordField.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CreatePasswordField.js","sources":["../../../src/components/create-password-field/CreatePasswordField.tsx"],"sourcesContent":["import invariant from 'invariant'\nimport * as React from 'react'\nimport { useFormContext } from 'react-hook-form'\nimport { throttle } from 'throttle-debounce'\n\nimport type { CSS } from '~/stitches'\nimport { Override } from '~/utilities'\n\nimport { Box } from '../box'\nimport { FieldElementWrapperProps } from '../field-wrapper'\nimport { Flex } from '../flex'\nimport { InlineMessage } from '../inline-message'\nimport { PasswordField } from '../password-field'\nimport { PasswordInput } from '../password-input'\n\ntype ValidationResult = Record<string, boolean>\n\ntype CreatePasswordFieldProps = Override<\n React.ComponentProps<typeof PasswordInput> & FieldElementWrapperProps,\n {\n label?: string\n name?: string\n validate: (\n password: string\n ) => Promise<ValidationResult | undefined> | ValidationResult\n defaultValidation: ValidationResult\n messageDirection?: CSS['flexDirection']\n }\n>\n\nexport const CreatePasswordField = ({\n validate,\n defaultValidation,\n messageDirection = 'row',\n label = 'Create a password',\n name = 'password',\n css,\n validation,\n ...remainingProps\n}: CreatePasswordFieldProps) => {\n const { formState } = useFormContext()\n const [isFocused, setIsFocused] = React.useState<boolean>(false)\n const [validationResult, setValidationResult] =\n React.useState<ValidationResult>(defaultValidation)\n\n const touched = formState.touched[name]\n const error
|
|
1
|
+
{"version":3,"file":"CreatePasswordField.js","sources":["../../../src/components/create-password-field/CreatePasswordField.tsx"],"sourcesContent":["import invariant from 'invariant'\nimport * as React from 'react'\nimport { useFormContext } from 'react-hook-form'\nimport { throttle } from 'throttle-debounce'\n\nimport type { CSS } from '~/stitches'\nimport { Override } from '~/utilities'\n\nimport { Box } from '../box'\nimport { FieldElementWrapperProps } from '../field-wrapper'\nimport { Flex } from '../flex'\nimport { InlineMessage } from '../inline-message'\nimport { PasswordField } from '../password-field'\nimport { PasswordInput } from '../password-input'\n\ntype ValidationResult = Record<string, boolean>\n\ntype CreatePasswordFieldProps = Override<\n React.ComponentProps<typeof PasswordInput> & FieldElementWrapperProps,\n {\n label?: string\n name?: string\n validate: (\n password: string\n ) => Promise<ValidationResult | undefined> | ValidationResult\n defaultValidation: ValidationResult\n messageDirection?: CSS['flexDirection']\n }\n>\n\nexport const CreatePasswordField = ({\n validate,\n defaultValidation,\n messageDirection = 'row',\n label = 'Create a password',\n name = 'password',\n css,\n validation,\n appearance,\n ...remainingProps\n}: CreatePasswordFieldProps) => {\n const { formState, control } = useFormContext()\n const [isFocused, setIsFocused] = React.useState<boolean>(false)\n const [validationResult, setValidationResult] =\n React.useState<ValidationResult>(defaultValidation)\n\n const touched: boolean = formState.touched[name]\n const error =\n formState.errors[name]?.type === 'validate' ||\n Object.values(validationResult).every((isValid) => !isValid)\n\n const validatePassword = React.useCallback(\n async (password: string) => {\n const result = await validate(password)\n\n if (result) {\n invariant(\n typeof result === 'object',\n 'The validate function must return an object'\n )\n\n setValidationResult(result)\n return Object.values(result).every((isValid) => isValid)\n }\n\n return false\n },\n [setValidationResult]\n )\n\n const handleChange = React.useCallback(throttle(500, validatePassword), [\n validatePassword\n ])\n\n const getMessageTheme = (result: boolean, isFocused: boolean) => {\n if (result) return 'success'\n\n return isFocused ? 'neutral' : 'error'\n }\n\n const showValidation: boolean =\n (control.mode.isOnBlur && (isFocused || touched)) ||\n (control.mode.isOnSubmit && (isFocused || (formState.isSubmitted && error)))\n\n return (\n <Box css={css}>\n <PasswordField\n label={label}\n name={name}\n onChange={(e) => handleChange(e.target.value)}\n onBlur={() => setIsFocused(false)}\n onFocus={() => setIsFocused(true)}\n validation={{ ...validation, validate: validatePassword }}\n appearance={appearance}\n {...remainingProps}\n />\n {showValidation && (\n <Flex\n css={{\n mt: '$2',\n gap: '$2',\n flexWrap: 'wrap',\n flexDirection: messageDirection\n }}\n >\n {Object.entries(validationResult).map(([message, result]) => (\n <InlineMessage\n key={message}\n theme={getMessageTheme(result, isFocused)}\n >\n {message}\n </InlineMessage>\n ))}\n </Flex>\n )}\n </Box>\n )\n}\n\nCreatePasswordField.displayName = 'CreatePasswordField'\n"],"names":["CreatePasswordField","validate","defaultValidation","messageDirection","label","name","css","validation","appearance","remainingProps","_a","formState","control","useFormContext","isFocused","setIsFocused","React","validationResult","setValidationResult","touched","error","isValid","validatePassword","password","result","invariant","handleChange","throttle","getMessageTheme","showValidation","Box","PasswordField","Flex","message","InlineMessage"],"mappings":"gWA8Ba,MAAAA,EAAsB,CAAC,CAClC,SAAAC,EACA,kBAAAC,EACA,iBAAAC,EAAmB,MACnB,MAAAC,EAAQ,oBACR,KAAAC,EAAO,WACP,IAAAC,EACA,WAAAC,EACA,WAAAC,KACGC,CACL,IAAgC,CAxChC,IAAAC,EAyCE,KAAM,CAAE,UAAAC,EAAW,QAAAC,CAAQ,EAAIC,EAAe,EACxC,CAACC,EAAWC,CAAY,EAAIC,EAAM,SAAkB,EAAK,EACzD,CAACC,EAAkBC,CAAmB,EAC1CF,EAAM,SAA2Bd,CAAiB,EAE9CiB,EAAmBR,EAAU,QAAQN,GACrCe,IACJV,EAAAC,EAAU,OAAON,KAAjB,KAAA,OAAAK,EAAwB,QAAS,YACjC,OAAO,OAAOO,CAAgB,EAAE,MAAOI,GAAY,CAACA,CAAO,EAEvDC,EAAmBN,EAAM,YAC7B,MAAOO,GAAqB,CAC1B,MAAMC,EAAS,MAAMvB,EAASsB,CAAQ,EAEtC,OAAIC,GACFC,EACE,OAAOD,GAAW,SAClB,6CACF,EAEAN,EAAoBM,CAAM,EACnB,OAAO,OAAOA,CAAM,EAAE,MAAOH,GAAYA,CAAO,GAGlD,EACT,EACA,CAACH,CAAmB,CACtB,EAEMQ,EAAeV,EAAM,YAAYW,EAAS,IAAKL,CAAgB,EAAG,CACtEA,CACF,CAAC,EAEKM,EAAkB,CAACJ,EAAiBV,IACpCU,EAAe,UAEZV,EAAY,UAAY,QAG3Be,EACHjB,EAAQ,KAAK,WAAaE,GAAaK,IACvCP,EAAQ,KAAK,aAAeE,GAAcH,EAAU,aAAeS,GAEtE,OACEJ,EAAA,cAACc,EAAA,CAAI,IAAKxB,CACRU,EAAAA,EAAA,cAACe,EAAA,CACC,MAAO3B,EACP,KAAMC,EACN,SAAW,GAAMqB,EAAa,EAAE,OAAO,KAAK,EAC5C,OAAQ,IAAMX,EAAa,EAAK,EAChC,QAAS,IAAMA,EAAa,EAAI,EAChC,WAAY,CAAE,GAAGR,EAAY,SAAUe,CAAiB,EACxD,WAAYd,EACX,GAAGC,CAAAA,CACN,EACCoB,GACCb,EAAA,cAACgB,EAAA,CACC,IAAK,CACH,GAAI,KACJ,IAAK,KACL,SAAU,OACV,cAAe7B,CACjB,CAAA,EAEC,OAAO,QAAQc,CAAgB,EAAE,IAAI,CAAC,CAACgB,EAAST,CAAM,IACrDR,EAAA,cAACkB,EAAA,CACC,IAAKD,EACL,MAAOL,EAAgBJ,EAAQV,CAAS,CAAA,EAEvCmB,CACH,CACD,CACH,CAEJ,CAEJ,EAEAjC,EAAoB,YAAc"}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
export declare const DataTable: (({ columns, data: dataProp, getAsyncData, defaultSort, initialState, disabledRows, enableRowSelection, onRowSelectionChange, children }: {
|
|
7
7
|
columns: any;
|
|
8
8
|
defaultSort?: import("./DataTable.types").TDefaultSort;
|
|
9
|
-
children:
|
|
9
|
+
children: React.ReactNode;
|
|
10
10
|
initialState?: import("./DataTable.types").InitialState;
|
|
11
11
|
disabledRows?: Record<string, boolean>;
|
|
12
12
|
enableRowSelection?: boolean | ((row: import("@tanstack/table-core").Row<unknown>) => boolean);
|
|
@@ -24,9 +24,9 @@ export declare const DataTable: (({ columns, data: dataProp, getAsyncData, defau
|
|
|
24
24
|
* you can build your own implementation with `useDataTable()` and the UI-only `Table` components.
|
|
25
25
|
*/
|
|
26
26
|
Body: ({ striped, ...props }: {
|
|
27
|
-
color?: string | undefined;
|
|
28
|
-
content?: string | undefined;
|
|
29
|
-
translate?: "yes" | "no" | undefined;
|
|
27
|
+
color?: string | undefined | undefined;
|
|
28
|
+
content?: string | undefined | undefined;
|
|
29
|
+
translate?: "yes" | "no" | undefined | undefined;
|
|
30
30
|
css?: import("@atom-learning/stitches-react/types/css-util").CSS<{
|
|
31
31
|
sm: string;
|
|
32
32
|
md: string;
|
|
@@ -383,105 +383,105 @@ export declare const DataTable: (({ columns, data: dataProp, getAsyncData, defau
|
|
|
383
383
|
marginBottom: string | number | import("@atom-learning/stitches-react/types/css-util").WithScaleValue<"space">;
|
|
384
384
|
};
|
|
385
385
|
}> | undefined;
|
|
386
|
-
prefix?: string | undefined;
|
|
387
|
-
slot?: string | undefined;
|
|
386
|
+
prefix?: string | undefined | undefined;
|
|
387
|
+
slot?: string | undefined | undefined;
|
|
388
388
|
style?: import("react").CSSProperties | undefined;
|
|
389
|
-
title?: string | undefined;
|
|
389
|
+
title?: string | undefined | undefined;
|
|
390
390
|
ref?: ((instance: HTMLTableSectionElement | null) => void) | import("react").RefObject<HTMLTableSectionElement> | null | undefined;
|
|
391
391
|
key?: import("react").Key | null | undefined;
|
|
392
|
-
defaultChecked?: boolean | undefined;
|
|
392
|
+
defaultChecked?: boolean | undefined | undefined;
|
|
393
393
|
defaultValue?: string | number | readonly string[] | undefined;
|
|
394
|
-
suppressContentEditableWarning?: boolean | undefined;
|
|
395
|
-
suppressHydrationWarning?: boolean | undefined;
|
|
396
|
-
accessKey?: string | undefined;
|
|
397
|
-
autoFocus?: boolean | undefined;
|
|
398
|
-
className?: string | undefined;
|
|
399
|
-
contentEditable?: (boolean | "true" | "false") |
|
|
400
|
-
contextMenu?: string | undefined;
|
|
401
|
-
dir?: string | undefined;
|
|
394
|
+
suppressContentEditableWarning?: boolean | undefined | undefined;
|
|
395
|
+
suppressHydrationWarning?: boolean | undefined | undefined;
|
|
396
|
+
accessKey?: string | undefined | undefined;
|
|
397
|
+
autoFocus?: boolean | undefined | undefined;
|
|
398
|
+
className?: string | undefined | undefined;
|
|
399
|
+
contentEditable?: "inherit" | (boolean | "true" | "false") | undefined;
|
|
400
|
+
contextMenu?: string | undefined | undefined;
|
|
401
|
+
dir?: string | undefined | undefined;
|
|
402
402
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
403
|
-
hidden?: boolean | undefined;
|
|
404
|
-
id?: string | undefined;
|
|
405
|
-
lang?: string | undefined;
|
|
406
|
-
nonce?: string | undefined;
|
|
407
|
-
placeholder?: string | undefined;
|
|
403
|
+
hidden?: boolean | undefined | undefined;
|
|
404
|
+
id?: string | undefined | undefined;
|
|
405
|
+
lang?: string | undefined | undefined;
|
|
406
|
+
nonce?: string | undefined | undefined;
|
|
407
|
+
placeholder?: string | undefined | undefined;
|
|
408
408
|
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
409
|
-
tabIndex?: number | undefined;
|
|
410
|
-
radioGroup?: string | undefined;
|
|
409
|
+
tabIndex?: number | undefined | undefined;
|
|
410
|
+
radioGroup?: string | undefined | undefined;
|
|
411
411
|
role?: import("react").AriaRole | undefined;
|
|
412
|
-
about?: string | undefined;
|
|
413
|
-
datatype?: string | undefined;
|
|
412
|
+
about?: string | undefined | undefined;
|
|
413
|
+
datatype?: string | undefined | undefined;
|
|
414
414
|
inlist?: any;
|
|
415
|
-
property?: string | undefined;
|
|
416
|
-
rel?: string | undefined;
|
|
417
|
-
resource?: string | undefined;
|
|
418
|
-
rev?: string | undefined;
|
|
419
|
-
typeof?: string | undefined;
|
|
420
|
-
vocab?: string | undefined;
|
|
421
|
-
autoCapitalize?: string | undefined;
|
|
422
|
-
autoCorrect?: string | undefined;
|
|
423
|
-
autoSave?: string | undefined;
|
|
424
|
-
itemProp?: string | undefined;
|
|
425
|
-
itemScope?: boolean | undefined;
|
|
426
|
-
itemType?: string | undefined;
|
|
427
|
-
itemID?: string | undefined;
|
|
428
|
-
itemRef?: string | undefined;
|
|
429
|
-
results?: number | undefined;
|
|
430
|
-
security?: string | undefined;
|
|
431
|
-
unselectable?: "on" | "off" | undefined;
|
|
432
|
-
inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined;
|
|
433
|
-
is?: string | undefined;
|
|
434
|
-
"aria-activedescendant"?: string | undefined;
|
|
415
|
+
property?: string | undefined | undefined;
|
|
416
|
+
rel?: string | undefined | undefined;
|
|
417
|
+
resource?: string | undefined | undefined;
|
|
418
|
+
rev?: string | undefined | undefined;
|
|
419
|
+
typeof?: string | undefined | undefined;
|
|
420
|
+
vocab?: string | undefined | undefined;
|
|
421
|
+
autoCapitalize?: string | undefined | undefined;
|
|
422
|
+
autoCorrect?: string | undefined | undefined;
|
|
423
|
+
autoSave?: string | undefined | undefined;
|
|
424
|
+
itemProp?: string | undefined | undefined;
|
|
425
|
+
itemScope?: boolean | undefined | undefined;
|
|
426
|
+
itemType?: string | undefined | undefined;
|
|
427
|
+
itemID?: string | undefined | undefined;
|
|
428
|
+
itemRef?: string | undefined | undefined;
|
|
429
|
+
results?: number | undefined | undefined;
|
|
430
|
+
security?: string | undefined | undefined;
|
|
431
|
+
unselectable?: "on" | "off" | undefined | undefined;
|
|
432
|
+
inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined | undefined;
|
|
433
|
+
is?: string | undefined | undefined;
|
|
434
|
+
"aria-activedescendant"?: string | undefined | undefined;
|
|
435
435
|
"aria-atomic"?: (boolean | "true" | "false") | undefined;
|
|
436
|
-
"aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined;
|
|
436
|
+
"aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined | undefined;
|
|
437
437
|
"aria-busy"?: (boolean | "true" | "false") | undefined;
|
|
438
|
-
"aria-checked"?: boolean | "false" | "mixed" | "true" | undefined;
|
|
439
|
-
"aria-colcount"?: number | undefined;
|
|
440
|
-
"aria-colindex"?: number | undefined;
|
|
441
|
-
"aria-colspan"?: number | undefined;
|
|
442
|
-
"aria-controls"?: string | undefined;
|
|
443
|
-
"aria-current"?: boolean | "false" | "true" | "page" | "step" | "location" | "date" | "time" | undefined;
|
|
444
|
-
"aria-describedby"?: string | undefined;
|
|
445
|
-
"aria-details"?: string | undefined;
|
|
438
|
+
"aria-checked"?: boolean | "false" | "mixed" | "true" | undefined | undefined;
|
|
439
|
+
"aria-colcount"?: number | undefined | undefined;
|
|
440
|
+
"aria-colindex"?: number | undefined | undefined;
|
|
441
|
+
"aria-colspan"?: number | undefined | undefined;
|
|
442
|
+
"aria-controls"?: string | undefined | undefined;
|
|
443
|
+
"aria-current"?: boolean | "false" | "true" | "page" | "step" | "location" | "date" | "time" | undefined | undefined;
|
|
444
|
+
"aria-describedby"?: string | undefined | undefined;
|
|
445
|
+
"aria-details"?: string | undefined | undefined;
|
|
446
446
|
"aria-disabled"?: (boolean | "true" | "false") | undefined;
|
|
447
|
-
"aria-dropeffect"?: "none" | "copy" | "execute" | "link" | "move" | "popup" | undefined;
|
|
448
|
-
"aria-errormessage"?: string | undefined;
|
|
447
|
+
"aria-dropeffect"?: "none" | "copy" | "execute" | "link" | "move" | "popup" | undefined | undefined;
|
|
448
|
+
"aria-errormessage"?: string | undefined | undefined;
|
|
449
449
|
"aria-expanded"?: (boolean | "true" | "false") | undefined;
|
|
450
|
-
"aria-flowto"?: string | undefined;
|
|
450
|
+
"aria-flowto"?: string | undefined | undefined;
|
|
451
451
|
"aria-grabbed"?: (boolean | "true" | "false") | undefined;
|
|
452
|
-
"aria-haspopup"?: boolean | "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog" | undefined;
|
|
452
|
+
"aria-haspopup"?: boolean | "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog" | undefined | undefined;
|
|
453
453
|
"aria-hidden"?: (boolean | "true" | "false") | undefined;
|
|
454
|
-
"aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined;
|
|
455
|
-
"aria-keyshortcuts"?: string | undefined;
|
|
456
|
-
"aria-label"?: string | undefined;
|
|
457
|
-
"aria-labelledby"?: string | undefined;
|
|
458
|
-
"aria-level"?: number | undefined;
|
|
459
|
-
"aria-live"?: "off" | "assertive" | "polite" | undefined;
|
|
454
|
+
"aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined | undefined;
|
|
455
|
+
"aria-keyshortcuts"?: string | undefined | undefined;
|
|
456
|
+
"aria-label"?: string | undefined | undefined;
|
|
457
|
+
"aria-labelledby"?: string | undefined | undefined;
|
|
458
|
+
"aria-level"?: number | undefined | undefined;
|
|
459
|
+
"aria-live"?: "off" | "assertive" | "polite" | undefined | undefined;
|
|
460
460
|
"aria-modal"?: (boolean | "true" | "false") | undefined;
|
|
461
461
|
"aria-multiline"?: (boolean | "true" | "false") | undefined;
|
|
462
462
|
"aria-multiselectable"?: (boolean | "true" | "false") | undefined;
|
|
463
|
-
"aria-orientation"?: "horizontal" | "vertical" | undefined;
|
|
464
|
-
"aria-owns"?: string | undefined;
|
|
465
|
-
"aria-placeholder"?: string | undefined;
|
|
466
|
-
"aria-posinset"?: number | undefined;
|
|
467
|
-
"aria-pressed"?: boolean | "false" | "mixed" | "true" | undefined;
|
|
463
|
+
"aria-orientation"?: "horizontal" | "vertical" | undefined | undefined;
|
|
464
|
+
"aria-owns"?: string | undefined | undefined;
|
|
465
|
+
"aria-placeholder"?: string | undefined | undefined;
|
|
466
|
+
"aria-posinset"?: number | undefined | undefined;
|
|
467
|
+
"aria-pressed"?: boolean | "false" | "mixed" | "true" | undefined | undefined;
|
|
468
468
|
"aria-readonly"?: (boolean | "true" | "false") | undefined;
|
|
469
|
-
"aria-relevant"?: "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text" | "text additions" | "text removals" | undefined;
|
|
469
|
+
"aria-relevant"?: "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text" | "text additions" | "text removals" | undefined | undefined;
|
|
470
470
|
"aria-required"?: (boolean | "true" | "false") | undefined;
|
|
471
|
-
"aria-roledescription"?: string | undefined;
|
|
472
|
-
"aria-rowcount"?: number | undefined;
|
|
473
|
-
"aria-rowindex"?: number | undefined;
|
|
474
|
-
"aria-rowspan"?: number | undefined;
|
|
471
|
+
"aria-roledescription"?: string | undefined | undefined;
|
|
472
|
+
"aria-rowcount"?: number | undefined | undefined;
|
|
473
|
+
"aria-rowindex"?: number | undefined | undefined;
|
|
474
|
+
"aria-rowspan"?: number | undefined | undefined;
|
|
475
475
|
"aria-selected"?: (boolean | "true" | "false") | undefined;
|
|
476
|
-
"aria-setsize"?: number | undefined;
|
|
477
|
-
"aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined;
|
|
478
|
-
"aria-valuemax"?: number | undefined;
|
|
479
|
-
"aria-valuemin"?: number | undefined;
|
|
480
|
-
"aria-valuenow"?: number | undefined;
|
|
481
|
-
"aria-valuetext"?: string | undefined;
|
|
476
|
+
"aria-setsize"?: number | undefined | undefined;
|
|
477
|
+
"aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined | undefined;
|
|
478
|
+
"aria-valuemax"?: number | undefined | undefined;
|
|
479
|
+
"aria-valuemin"?: number | undefined | undefined;
|
|
480
|
+
"aria-valuenow"?: number | undefined | undefined;
|
|
481
|
+
"aria-valuetext"?: string | undefined | undefined;
|
|
482
482
|
dangerouslySetInnerHTML?: {
|
|
483
483
|
__html: string | TrustedHTML;
|
|
484
|
-
} | undefined;
|
|
484
|
+
} | undefined | undefined;
|
|
485
485
|
onCopy?: import("react").ClipboardEventHandler<HTMLTableSectionElement> | undefined;
|
|
486
486
|
onCopyCapture?: import("react").ClipboardEventHandler<HTMLTableSectionElement> | undefined;
|
|
487
487
|
onCut?: import("react").ClipboardEventHandler<HTMLTableSectionElement> | undefined;
|
|
@@ -2170,10 +2170,10 @@ export declare const DataTable: (({ columns, data: dataProp, getAsyncData, defau
|
|
|
2170
2170
|
};
|
|
2171
2171
|
}> | undefined;
|
|
2172
2172
|
}, "size" | "as" | "type"> & {
|
|
2173
|
-
size:
|
|
2173
|
+
size: React.ComponentProps<typeof import("..").Text>["size"];
|
|
2174
2174
|
type?: "text" | "number" | "email" | "password" | "tel" | "url" | "search";
|
|
2175
2175
|
as?: never;
|
|
2176
|
-
}, "size" | "state"> & {
|
|
2176
|
+
}, "appearance" | "size" | "state"> & {
|
|
2177
2177
|
size?: "sm" | "md" | "lg" | "xl" | ({
|
|
2178
2178
|
"@sm"?: "sm" | "md" | "lg" | "xl" | undefined;
|
|
2179
2179
|
"@md"?: "sm" | "md" | "lg" | "xl" | undefined;
|
|
@@ -2198,6 +2198,18 @@ export declare const DataTable: (({ columns, data: dataProp, getAsyncData, defau
|
|
|
2198
2198
|
} & {
|
|
2199
2199
|
[x: string]: "error" | undefined;
|
|
2200
2200
|
}) | undefined;
|
|
2201
|
+
appearance?: "standard" | "modern" | ({
|
|
2202
|
+
"@sm"?: "standard" | "modern" | undefined;
|
|
2203
|
+
"@md"?: "standard" | "modern" | undefined;
|
|
2204
|
+
"@lg"?: "standard" | "modern" | undefined;
|
|
2205
|
+
"@xl"?: "standard" | "modern" | undefined;
|
|
2206
|
+
"@reducedMotion"?: "standard" | "modern" | undefined;
|
|
2207
|
+
"@allowMotion"?: "standard" | "modern" | undefined;
|
|
2208
|
+
"@hover"?: "standard" | "modern" | undefined;
|
|
2209
|
+
"@initial"?: "standard" | "modern" | undefined;
|
|
2210
|
+
} & {
|
|
2211
|
+
[x: string]: "standard" | "modern" | undefined;
|
|
2212
|
+
}) | undefined;
|
|
2201
2213
|
} & {
|
|
2202
2214
|
size?: "sm" | "md" | "lg";
|
|
2203
2215
|
css?: import("../..").CSS;
|
|
@@ -2205,7 +2217,7 @@ export declare const DataTable: (({ columns, data: dataProp, getAsyncData, defau
|
|
|
2205
2217
|
defaultValue?: string;
|
|
2206
2218
|
onValueChange?: (newValue: string) => void;
|
|
2207
2219
|
clearText?: string;
|
|
2208
|
-
onChange?: (e:
|
|
2220
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
2209
2221
|
} & {
|
|
2210
2222
|
label: string;
|
|
2211
2223
|
hideLabel?: boolean;
|
|
@@ -3381,7 +3393,7 @@ export declare const DataTable: (({ columns, data: dataProp, getAsyncData, defau
|
|
|
3381
3393
|
* If you need more customisation, you can compose your own implentation, `asyncDataState`
|
|
3382
3394
|
* can be retrieved from `useDataTable`
|
|
3383
3395
|
*/
|
|
3384
|
-
Loading: (props:
|
|
3396
|
+
Loading: (props: React.ComponentProps<import("@atom-learning/stitches-react/types/styled-component").StyledComponent<({ css, message, size, ...props }: {
|
|
3385
3397
|
message?: string;
|
|
3386
3398
|
size?: "sm" | "md" | "lg";
|
|
3387
3399
|
css?: import("../..").CSS;
|
|
@@ -3761,7 +3773,7 @@ export declare const DataTable: (({ columns, data: dataProp, getAsyncData, defau
|
|
|
3761
3773
|
*
|
|
3762
3774
|
*/
|
|
3763
3775
|
Error: ({ children }: {
|
|
3764
|
-
children: (retry?: import("./DataTable.types").DataTableContextType["runAsyncData"]) =>
|
|
3776
|
+
children: (retry?: import("./DataTable.types").DataTableContextType["runAsyncData"]) => React.ReactElement;
|
|
3765
3777
|
}) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | null;
|
|
3766
3778
|
/** Empty state implementation for `DataTable`.
|
|
3767
3779
|
*
|
|
@@ -4524,31 +4536,31 @@ export declare const DataTable: (({ columns, data: dataProp, getAsyncData, defau
|
|
|
4524
4536
|
checked: boolean | "indeterminate";
|
|
4525
4537
|
onCheckedChange: (value: boolean) => void;
|
|
4526
4538
|
label?: string;
|
|
4527
|
-
}) =>
|
|
4539
|
+
}) => React.ReactElement;
|
|
4528
4540
|
/** Empty state implementation for `DataTable`.
|
|
4529
4541
|
*
|
|
4530
4542
|
* Renders a checkbox on the header, allowing for individual selection/deselection of any selectable row
|
|
4531
4543
|
*/
|
|
4532
4544
|
BulkActions: (({ children, ...rest }: {
|
|
4533
4545
|
css?: import("../..").CSS;
|
|
4534
|
-
children:
|
|
4535
|
-
children:
|
|
4536
|
-
}) =>
|
|
4546
|
+
children: React.ReactElement<React.ComponentProps<({ children }: {
|
|
4547
|
+
children: React.ReactElement;
|
|
4548
|
+
}) => React.ReactElement | null>> | React.ReactElement<React.ComponentProps<({ cancelLabel, children }: {
|
|
4537
4549
|
cancelLabel?: string;
|
|
4538
|
-
children:
|
|
4539
|
-
}) => import("react").JSX.Element | null>> | [
|
|
4540
|
-
children:
|
|
4541
|
-
}) =>
|
|
4550
|
+
children: React.ReactNode;
|
|
4551
|
+
}) => import("react").JSX.Element | null>> | [React.ReactElement<React.ComponentProps<({ children }: {
|
|
4552
|
+
children: React.ReactElement;
|
|
4553
|
+
}) => React.ReactElement | null>>, React.ReactElement<React.ComponentProps<({ cancelLabel, children }: {
|
|
4542
4554
|
cancelLabel?: string;
|
|
4543
|
-
children:
|
|
4555
|
+
children: React.ReactNode;
|
|
4544
4556
|
}) => import("react").JSX.Element | null>>];
|
|
4545
4557
|
}) => import("react").JSX.Element) & {
|
|
4546
4558
|
DefaultActions: ({ children }: {
|
|
4547
|
-
children:
|
|
4548
|
-
}) =>
|
|
4559
|
+
children: React.ReactElement;
|
|
4560
|
+
}) => React.ReactElement | null;
|
|
4549
4561
|
SelectedRowActions: ({ cancelLabel, children }: {
|
|
4550
4562
|
cancelLabel?: string;
|
|
4551
|
-
children:
|
|
4563
|
+
children: React.ReactNode;
|
|
4552
4564
|
}) => import("react").JSX.Element | null;
|
|
4553
4565
|
};
|
|
4554
4566
|
};
|
|
@@ -3,7 +3,7 @@ import { DateInputProps } from '../../components/date-input';
|
|
|
3
3
|
import { FieldElementWrapperProps } from '../../components/field-wrapper';
|
|
4
4
|
type DateFieldProps = DateInputProps & FieldElementWrapperProps;
|
|
5
5
|
export declare const DateField: {
|
|
6
|
-
({ css, hideLabel, label, name, validation, prompt, description, ...remainingProps }: DateFieldProps): React.JSX.Element;
|
|
6
|
+
({ css, hideLabel, label, name, validation, prompt, description, appearance, ...remainingProps }: DateFieldProps): React.JSX.Element;
|
|
7
7
|
displayName: string;
|
|
8
8
|
};
|
|
9
9
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import*as i from"react";import{useFormContext as
|
|
1
|
+
import*as i from"react";import{useFormContext as F}from"react-hook-form";import{DateInput as b}from"../date-input/DateInput.js";import{FieldWrapper as g}from"../field-wrapper/FieldWrapper.js";import"../field-wrapper/InlineFieldWrapper.js";import"../form/Form.js";import{useFieldError as v}from"../form/useFieldError.js";import"../form/useFormCustomContext.js";const p=({css:m,hideLabel:l,label:d,name:e,validation:r,prompt:n,description:s,appearance:t,...c})=>{const{register:o,trigger:f}=F(),{error:a}=v(e),u=r?o(r):o;return i.createElement(g,{css:m,description:s,error:a,fieldId:e,hideLabel:l,label:d,prompt:n,required:Boolean(r==null?void 0:r.required),appearance:t},i.createElement(b,{id:e,name:e,ref:u,appearance:t,...a&&{state:"error"},...c,revalidate:f}))};p.displayName="DateField";export{p as DateField};
|
|
2
2
|
//# sourceMappingURL=DateField.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateField.js","sources":["../../../src/components/date-field/DateField.tsx"],"sourcesContent":["import * as React from 'react'\nimport { useFormContext } from 'react-hook-form'\n\nimport { DateInput, DateInputProps } from '~/components/date-input'\nimport {\n FieldElementWrapperProps,\n FieldWrapper\n} from '~/components/field-wrapper'\nimport { useFieldError } from '~/components/form'\n\ntype DateFieldProps = DateInputProps & FieldElementWrapperProps\n\nexport const DateField = ({\n css,\n hideLabel,\n label,\n name,\n validation,\n prompt,\n description,\n ...remainingProps\n}: DateFieldProps) => {\n const { register, trigger } = useFormContext()\n const { error } = useFieldError(name)\n const ref = validation ? register(validation) : register\n\n return (\n <FieldWrapper\n css={css}\n description={description}\n error={error}\n fieldId={name}\n hideLabel={hideLabel}\n label={label}\n prompt={prompt}\n required={Boolean(validation?.required)}\n >\n <DateInput\n id={name}\n name={name}\n ref={ref}\n {...(error && { state: 'error' })}\n {...remainingProps}\n revalidate={trigger}\n />\n </FieldWrapper>\n )\n}\n\nDateField.displayName = 'DateField'\n"],"names":["DateField","css","hideLabel","label","name","validation","prompt","description","remainingProps","register","trigger","useFormContext","error","useFieldError","ref","React","FieldWrapper","DateInput"],"mappings":"
|
|
1
|
+
{"version":3,"file":"DateField.js","sources":["../../../src/components/date-field/DateField.tsx"],"sourcesContent":["import * as React from 'react'\nimport { useFormContext } from 'react-hook-form'\n\nimport { DateInput, DateInputProps } from '~/components/date-input'\nimport {\n FieldElementWrapperProps,\n FieldWrapper\n} from '~/components/field-wrapper'\nimport { useFieldError } from '~/components/form'\n\ntype DateFieldProps = DateInputProps & FieldElementWrapperProps\n\nexport const DateField = ({\n css,\n hideLabel,\n label,\n name,\n validation,\n prompt,\n description,\n appearance,\n ...remainingProps\n}: DateFieldProps) => {\n const { register, trigger } = useFormContext()\n const { error } = useFieldError(name)\n const ref = validation ? register(validation) : register\n\n return (\n <FieldWrapper\n css={css}\n description={description}\n error={error}\n fieldId={name}\n hideLabel={hideLabel}\n label={label}\n prompt={prompt}\n required={Boolean(validation?.required)}\n appearance={appearance}\n >\n <DateInput\n id={name}\n name={name}\n ref={ref}\n appearance={appearance}\n {...(error && { state: 'error' })}\n {...remainingProps}\n revalidate={trigger}\n />\n </FieldWrapper>\n )\n}\n\nDateField.displayName = 'DateField'\n"],"names":["DateField","css","hideLabel","label","name","validation","prompt","description","appearance","remainingProps","register","trigger","useFormContext","error","useFieldError","ref","React","FieldWrapper","DateInput"],"mappings":"wWAYa,MAAAA,EAAY,CAAC,CACxB,IAAAC,EACA,UAAAC,EACA,MAAAC,EACA,KAAAC,EACA,WAAAC,EACA,OAAAC,EACA,YAAAC,EACA,WAAAC,KACGC,CACL,IAAsB,CACpB,KAAM,CAAE,SAAAC,EAAU,QAAAC,CAAQ,EAAIC,EAAe,EACvC,CAAE,MAAAC,CAAM,EAAIC,EAAcV,CAAI,EAC9BW,EAAMV,EAAaK,EAASL,CAAU,EAAIK,EAEhD,OACEM,EAAA,cAACC,EAAA,CACC,IAAKhB,EACL,YAAaM,EACb,MAAOM,EACP,QAAST,EACT,UAAWF,EACX,MAAOC,EACP,OAAQG,EACR,SAAU,QAAQD,GAAA,KAAA,OAAAA,EAAY,QAAQ,EACtC,WAAYG,CAAAA,EAEZQ,EAAA,cAACE,EAAA,CACC,GAAId,EACJ,KAAMA,EACN,IAAKW,EACL,WAAYP,EACX,GAAIK,GAAS,CAAE,MAAO,OAAQ,EAC9B,GAAGJ,EACJ,WAAYE,CAAAA,CACd,CACF,CAEJ,EAEAX,EAAU,YAAc"}
|
|
@@ -1824,8 +1824,8 @@ export declare const Dialog: import("@atom-learning/stitches-react/types/styled-
|
|
|
1824
1824
|
closeDialogText?: string;
|
|
1825
1825
|
showCloseButton?: boolean;
|
|
1826
1826
|
}) => import("react").JSX.Element;
|
|
1827
|
-
Heading: ({ css, ...props }:
|
|
1828
|
-
Footer: ({ css, ...props }:
|
|
1827
|
+
Heading: ({ css, ...props }: React.ComponentProps<typeof import("..").Heading>) => import("react").JSX.Element;
|
|
1828
|
+
Footer: ({ css, ...props }: React.ComponentProps<typeof import("..").Flex>) => import("react").JSX.Element;
|
|
1829
1829
|
Description: import("react").ForwardRefExoticComponent<import("@radix-ui/react-dialog").DialogDescriptionProps & import("react").RefAttributes<HTMLParagraphElement>>;
|
|
1830
1830
|
Title: import("react").ForwardRefExoticComponent<import("@radix-ui/react-dialog").DialogTitleProps & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
1831
1831
|
Trigger: import("react").ForwardRefExoticComponent<import("@radix-ui/react-dialog").DialogTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const Dismissible: {
|
|
2
|
-
({ disabled, dismissed, onDismiss, ...rest }:
|
|
2
|
+
({ disabled, dismissed, onDismiss, ...rest }: React.PropsWithChildren<import("./DismissibleRoot").IDismissibleRootInternalProps & import("./DismissibleRoot").IDismissibleRootProps>): import("react").JSX.Element;
|
|
3
3
|
displayName: string;
|
|
4
4
|
} & {
|
|
5
|
-
Trigger: ({ asChild, ...rest }:
|
|
5
|
+
Trigger: ({ asChild, ...rest }: React.PropsWithChildren<import("./DismissibleTrigger").IDismissibleTriggerProps>) => import("react").JSX.Element;
|
|
6
6
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare const DismissibleGroup: {
|
|
2
|
-
({ as: Component, disabled, onDismiss, ...rest }:
|
|
2
|
+
({ as: Component, disabled, onDismiss, ...rest }: React.PropsWithChildren<import("./DismissibleGroupRoot").IDismissibleGroupRootProps>): import("react").JSX.Element;
|
|
3
3
|
displayName: string;
|
|
4
4
|
} & {
|
|
5
|
-
Item: ({ children, value, disabled: itemDisabled, ...rest }:
|
|
6
|
-
Trigger: ({ asChild, ...rest }:
|
|
5
|
+
Item: ({ children, value, disabled: itemDisabled, ...rest }: React.PropsWithChildren<import("./DismissibleGroupItem").TDismissibleGroupItemProps>) => import("react").JSX.Element;
|
|
6
|
+
Trigger: ({ asChild, ...rest }: React.PropsWithChildren<import("../../components/dismissible/DismissibleTrigger").IDismissibleTriggerProps>) => import("react").JSX.Element;
|
|
7
7
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { ValidationOptions } from '../../components/form';
|
|
3
3
|
import type { CSS } from '../../stitches';
|
|
4
|
+
import { type LabelProps } from '../label/Label';
|
|
4
5
|
export type FieldWrapperProps = {
|
|
5
6
|
css?: CSS;
|
|
6
7
|
error?: string;
|
|
@@ -14,12 +15,13 @@ export type FieldWrapperProps = {
|
|
|
14
15
|
description?: string;
|
|
15
16
|
required?: boolean;
|
|
16
17
|
hideLabel?: boolean;
|
|
18
|
+
appearance?: LabelProps['appearance'];
|
|
17
19
|
};
|
|
18
20
|
export type FieldElementWrapperProps = Omit<FieldWrapperProps, 'fieldId'> & {
|
|
19
21
|
name: string;
|
|
20
22
|
validation?: ValidationOptions;
|
|
21
23
|
};
|
|
22
24
|
export declare const FieldWrapper: {
|
|
23
|
-
({ css, children, error, fieldId, label, prompt, description, required, hideLabel }: React.PropsWithChildren<FieldWrapperProps>): React.JSX.Element;
|
|
25
|
+
({ css, children, error, fieldId, label, prompt, description, required, hideLabel, appearance }: React.PropsWithChildren<FieldWrapperProps>): React.JSX.Element;
|
|
24
26
|
displayName: string;
|
|
25
27
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import*as
|
|
1
|
+
import*as f from"@radix-ui/react-visually-hidden";import*as r from"react";import{Box as b}from"../box/Box.js";import{Flex as u}from"../flex/Flex.js";import{InlineMessage as E}from"../inline-message/InlineMessage.js";import{Label as h}from"../label/Label.js";import{Link as k}from"../link/Link.js";import{Description as F}from"./FieldDescription.js";const o=({css:m,children:l,error:t,fieldId:n,label:a,prompt:e,description:i,required:s,hideLabel:p,appearance:c})=>{const d=p?f.Root:u;return r.createElement(b,{css:m},r.createElement(d,{css:{justifyContent:"space-between",alignItems:"center",mb:"$3"}},r.createElement(h,{htmlFor:n,required:s,appearance:c},a),e&&r.createElement(k,{href:e==null?void 0:e.link,onClick:e==null?void 0:e.onClick,size:"sm"},e.label)),i&&r.createElement(F,{css:{mb:"$3"}},i),l,t&&r.createElement(E,{css:{mt:"$2"}},t))};o.displayName="FieldWrapper";export{o as FieldWrapper};
|
|
2
2
|
//# sourceMappingURL=FieldWrapper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldWrapper.js","sources":["../../../src/components/field-wrapper/FieldWrapper.tsx"],"sourcesContent":["import * as VisuallyHidden from '@radix-ui/react-visually-hidden'\nimport * as React from 'react'\n\nimport { Box } from '~/components/box'\nimport { Flex } from '~/components/flex'\nimport { ValidationOptions } from '~/components/form'\nimport { InlineMessage } from '~/components/inline-message'\nimport { Label } from '~/components/label'\nimport { Link } from '~/components/link'\nimport type { CSS } from '~/stitches'\n\nimport { Description } from './FieldDescription'\n\nexport type FieldWrapperProps = {\n css?: CSS\n error?: string\n fieldId: string\n label: string\n prompt?: { link?: string; label: string; onClick?: () => void }\n description?: string\n required?: boolean\n hideLabel?: boolean\n}\n\nexport type FieldElementWrapperProps = Omit<FieldWrapperProps, 'fieldId'> & {\n name: string\n validation?: ValidationOptions\n}\n\nexport const FieldWrapper = ({\n css,\n children,\n error,\n fieldId,\n label,\n prompt,\n description,\n required,\n hideLabel\n}: React.PropsWithChildren<FieldWrapperProps>) => {\n const LabelContainer = hideLabel ? VisuallyHidden.Root : Flex\n\n return (\n <Box css={css}>\n <LabelContainer\n css={{\n justifyContent: 'space-between',\n alignItems: 'center',\n mb: '$3'\n }}\n >\n <Label htmlFor={fieldId} required={required}>\n {label}\n </Label>\n {prompt && (\n <Link href={prompt?.link} onClick={prompt?.onClick} size=\"sm\">\n {prompt.label}\n </Link>\n )}\n </LabelContainer>\n {description && (\n <Description css={{ mb: '$3' }}>{description}</Description>\n )}\n {children}\n {error && <InlineMessage css={{ mt: '$2' }}>{error}</InlineMessage>}\n </Box>\n )\n}\n\nFieldWrapper.displayName = 'FieldWrapper'\n"],"names":["FieldWrapper","css","children","error","fieldId","label","prompt","description","required","hideLabel","LabelContainer","VisuallyHidden","Flex","React","Box","Label","Link","Description","InlineMessage"],"mappings":"
|
|
1
|
+
{"version":3,"file":"FieldWrapper.js","sources":["../../../src/components/field-wrapper/FieldWrapper.tsx"],"sourcesContent":["import * as VisuallyHidden from '@radix-ui/react-visually-hidden'\nimport * as React from 'react'\n\nimport { Box } from '~/components/box'\nimport { Flex } from '~/components/flex'\nimport { ValidationOptions } from '~/components/form'\nimport { InlineMessage } from '~/components/inline-message'\nimport { Label } from '~/components/label'\nimport { Link } from '~/components/link'\nimport type { CSS } from '~/stitches'\n\nimport { Description } from './FieldDescription'\nimport { type LabelProps } from '../label/Label'\n\nexport type FieldWrapperProps = {\n css?: CSS\n error?: string\n fieldId: string\n label: string\n prompt?: { link?: string; label: string; onClick?: () => void }\n description?: string\n required?: boolean\n hideLabel?: boolean\n appearance?: LabelProps['appearance']\n}\n\nexport type FieldElementWrapperProps = Omit<FieldWrapperProps, 'fieldId'> & {\n name: string\n validation?: ValidationOptions\n}\n\nexport const FieldWrapper = ({\n css,\n children,\n error,\n fieldId,\n label,\n prompt,\n description,\n required,\n hideLabel,\n appearance\n}: React.PropsWithChildren<FieldWrapperProps>) => {\n const LabelContainer = hideLabel ? VisuallyHidden.Root : Flex\n\n return (\n <Box css={css}>\n <LabelContainer\n css={{\n justifyContent: 'space-between',\n alignItems: 'center',\n mb: '$3'\n }}\n >\n <Label htmlFor={fieldId} required={required} appearance={appearance}>\n {label}\n </Label>\n {prompt && (\n <Link href={prompt?.link} onClick={prompt?.onClick} size=\"sm\">\n {prompt.label}\n </Link>\n )}\n </LabelContainer>\n {description && (\n <Description css={{ mb: '$3' }}>{description}</Description>\n )}\n {children}\n {error && <InlineMessage css={{ mt: '$2' }}>{error}</InlineMessage>}\n </Box>\n )\n}\n\nFieldWrapper.displayName = 'FieldWrapper'\n"],"names":["FieldWrapper","css","children","error","fieldId","label","prompt","description","required","hideLabel","appearance","LabelContainer","VisuallyHidden","Flex","React","Box","Label","Link","Description","InlineMessage"],"mappings":"6VA+Ba,MAAAA,EAAe,CAAC,CAC3B,IAAAC,EACA,SAAAC,EACA,MAAAC,EACA,QAAAC,EACA,MAAAC,EACA,OAAAC,EACA,YAAAC,EACA,SAAAC,EACA,UAAAC,EACA,WAAAC,CACF,IAAkD,CAChD,MAAMC,EAAiBF,EAAYG,EAAe,KAAOC,EAEzD,OACEC,EAAA,cAACC,EAAA,CAAI,IAAKd,CAAAA,EACRa,EAAA,cAACH,EAAA,CACC,IAAK,CACH,eAAgB,gBAChB,WAAY,SACZ,GAAI,IACN,CAEAG,EAAAA,EAAA,cAACE,EAAA,CAAM,QAASZ,EAAS,SAAUI,EAAU,WAAYE,CAAAA,EACtDL,CACH,EACCC,GACCQ,EAAA,cAACG,EAAA,CAAK,KAAMX,GAAA,KAAAA,OAAAA,EAAQ,KAAM,QAASA,GAAA,KAAAA,OAAAA,EAAQ,QAAS,KAAK,IACtDA,EAAAA,EAAO,KACV,CAEJ,EACCC,GACCO,EAAA,cAACI,EAAA,CAAY,IAAK,CAAE,GAAI,IAAK,CAAIX,EAAAA,CAAY,EAE9CL,EACAC,GAASW,EAAA,cAACK,EAAA,CAAc,IAAK,CAAE,GAAI,IAAK,GAAIhB,CAAM,CACrD,CAEJ,EAEAH,EAAa,YAAc"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import type { DefaultValues, FieldValues, Mode, SubmitErrorHandler, SubmitHandler, UseFormMethods } from 'react-hook-form';
|
|
3
|
+
import { type FormCustomContextType } from './useFormCustomContext';
|
|
3
4
|
declare const StyledForm: import("@atom-learning/stitches-react/types/styled-component").StyledComponent<"form", {}, {
|
|
4
5
|
sm: string;
|
|
5
6
|
md: string;
|
|
@@ -373,7 +374,7 @@ interface FormProps<TFormData extends FieldValues> extends StyledFormProps {
|
|
|
373
374
|
children: React.ReactNode | ((methods: UseFormMethods<TFormData>) => React.ReactNode);
|
|
374
375
|
}
|
|
375
376
|
export declare const Form: {
|
|
376
|
-
<TFormData extends FieldValues>(props: FormProps<TFormData>): React.JSX.Element;
|
|
377
|
+
<TFormData extends FieldValues>(props: FormProps<TFormData> & FormCustomContextType): React.JSX.Element;
|
|
377
378
|
displayName: string;
|
|
378
379
|
};
|
|
379
380
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import r from"react";import{useForm as
|
|
1
|
+
import*as r from"react";import{useForm as f,FormProvider as p}from"react-hook-form";import{styled as s}from"../../stitches.js";import{FormCustomContext as c}from"./useFormCustomContext.js";const F=s("form",{}),t=m=>{const{children:e,defaultValues:a,validationMode:n="onBlur",onSubmit:l,onError:i,appearance:u,...d}=m,o=f({defaultValues:a,mode:n});return r.createElement(p,{...o},r.createElement(c.Provider,{value:{appearance:u}},r.createElement(F,{"aria-label":"form",onSubmit:o.handleSubmit(l,i),...d},typeof e=="function"?e(o):e)))};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 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
|
|
1
|
+
{"version":3,"file":"Form.js","sources":["../../../src/components/form/Form.tsx"],"sourcesContent":["import * as 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'\nimport {\n type FormCustomContextType,\n FormCustomContext\n} from './useFormCustomContext'\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> & FormCustomContextType\n) => {\n const {\n children,\n defaultValues,\n validationMode = 'onBlur',\n onSubmit,\n onError,\n appearance,\n ...rest\n } = props\n\n const methods = useForm<TFormData>({\n defaultValues,\n mode: validationMode\n })\n\n return (\n <FormProvider {...methods}>\n <FormCustomContext.Provider value={{ appearance }}>\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 </FormCustomContext.Provider>\n </FormProvider>\n )\n}\n\nForm.displayName = 'Form'\n"],"names":["StyledForm","styled","Form","props","children","defaultValues","validationMode","onSubmit","onError","appearance","rest","methods","useForm","React","FormProvider","FormCustomContext"],"mappings":"6LAiBA,MAAMA,EAAaC,EAAO,OAAQ,CAAE,CAAA,EAiBvBC,EACXC,GACG,CACH,KAAM,CACJ,SAAAC,EACA,cAAAC,EACA,eAAAC,EAAiB,SACjB,SAAAC,EACA,QAAAC,EACA,WAAAC,KACGC,CACL,EAAIP,EAEEQ,EAAUC,EAAmB,CACjC,cAAAP,EACA,KAAMC,CACR,CAAC,EAED,OACEO,EAAA,cAACC,EAAA,CAAc,GAAGH,GAChBE,EAAA,cAACE,EAAkB,SAAlB,CAA2B,MAAO,CAAE,WAAAN,CAAW,CAAA,EAC9CI,EAAA,cAACb,EAAA,CACC,aAAW,OACX,SAAUW,EAAQ,aAAaJ,EAAUC,CAAO,EAC/C,GAAGE,CAEH,EAAA,OAAON,GAAa,WAAaA,EAASO,CAAO,EAAIP,CACxD,CACF,CACF,CAEJ,EAEAF,EAAK,YAAc"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { InputField } from '../input-field';
|
|
3
|
+
export type FormCustomContextType = {
|
|
4
|
+
appearance?: React.ComponentProps<typeof InputField>['appearance'];
|
|
5
|
+
} | undefined;
|
|
6
|
+
export declare const FormCustomContext: React.Context<FormCustomContextType>;
|
|
7
|
+
export declare const useFormCustomContext: () => FormCustomContextType;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFormCustomContext.js","sources":["../../../src/components/form/useFormCustomContext.ts"],"sourcesContent":["import * as React from 'react'\nimport { InputField } from '../input-field'\n\nexport type FormCustomContextType =\n | {\n appearance?: React.ComponentProps<typeof InputField>['appearance']\n }\n | undefined\n\nexport const FormCustomContext = React.createContext<FormCustomContextType>({\n appearance: 'standard'\n})\n\nexport const useFormCustomContext = () => React.useContext(FormCustomContext)\n"],"names":["FormCustomContext","React","useFormCustomContext"],"mappings":"wBASa,MAAAA,EAAoBC,EAAM,cAAqC,CAC1E,WAAY,UACd,CAAC,EAEYC,EAAuB,IAAMD,EAAM,WAAWD,CAAiB"}
|
|
@@ -3,6 +3,7 @@ import type { Override } from '../../utilities';
|
|
|
3
3
|
export declare const StyledHeading: import("@atom-learning/stitches-react/types/styled-component").StyledComponent<"h2", {
|
|
4
4
|
size?: "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | undefined;
|
|
5
5
|
noCapsize?: boolean | "true" | undefined;
|
|
6
|
+
weight?: "bold" | "medium" | undefined;
|
|
6
7
|
}, {
|
|
7
8
|
sm: string;
|
|
8
9
|
md: string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import*as e from"react";import{styled as
|
|
1
|
+
import*as e from"react";import{styled as f}from"../../stitches.js";import"../../utilities/css-wrapper/CSSWrapper.js";import"../../utilities/no-overflow-wrapper/NoOverflowWrapper.js";import{capsize as i}from"../../utilities/style/capsize.js";import"color2k";import"../../utilities/style/keyframe-animations.js";const t=f("h2",{m:0,variants:{size:{xs:{fontFamily:"$body",fontSize:"$md",lineHeight:1.5,...i(.3864)},sm:{fontFamily:"$body",fontSize:"$lg",lineHeight:1.14,...i(.2078)},md:{fontFamily:"$body",fontSize:"$xl",lineHeight:1.14,...i(.2078)},lg:{fontFamily:"$display",fontSize:"$2xl",lineHeight:1.08,letterSpacing:"0.01em",...i(.1405,.2405)},xl:{fontFamily:"$display",fontSize:"$3xl",lineHeight:1.12,...i(.16,.26)},xxl:{fontFamily:"$display",fontSize:"$4xl",lineHeight:1,...i(.1,.2)}},noCapsize:{true:{"&::before, &::after":{display:"none !important"}}},weight:{medium:{fontWeight:500},bold:{fontWeight:700}}}}),o=e.forwardRef(({size:l="md",weight:n="bold",...m},a)=>e.createElement(t,{ref:a,size:l,weight:n,...m}));o.displayName="Heading";export{o as Heading,t as StyledHeading};
|
|
2
2
|
//# sourceMappingURL=Heading.js.map
|