@atom-learning/components 5.4.3 → 5.5.0-beta.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/banner/Banner.d.ts +2 -2
- package/dist/components/banner/banner-regular/BannerRegular.d.ts +92 -459
- package/dist/components/banner/banner-slim/BannerSlim.d.ts +92 -459
- 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/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/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/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/segmented-control/SegmentedControl.d.ts +376 -8
- package/dist/components/segmented-control/SegmentedControlItemList.d.ts +2 -1
- package/dist/components/segmented-control/SegmentedControlItemList.js +1 -1
- package/dist/components/segmented-control/SegmentedControlItemList.js.map +1 -1
- 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/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 +2 -1
- 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/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 t from"react";import{useFormContext as k}from"react-hook-form";import{throttle as P}from"throttle-debounce";import{Box as S}from"../box/Box.js";import{Flex as B}from"../flex/Flex.js";import{InlineMessage as D}from"../inline-message/InlineMessage.js";import{PasswordField as O}from"../password-field/PasswordField.js";const c=({validate:p,defaultValidation:d,messageDirection:u="row",label:f="Create a password",name:r="password",css:v,validation:b,appearance:w,...C})=>{var s;const{formState:l}=k(),[n,i]=t.useState(!1),[F,m]=t.useState(d),g=l.touched[r],h=((s=l.errors[r])==null?void 0:s.type)==="validate",o=t.useCallback(async e=>{const a=await p(e);return a?(E(typeof a=="object","The validate function must return an object"),m(a),Object.values(a).every(j=>j)):!1},[m]),x=t.useCallback(P(500,o),[o]),y=(e,a)=>e?"success":a?"neutral":"error";return t.createElement(S,{css:v},t.createElement(O,{label:f,name:r,onChange:e=>x(e.target.value),onBlur:()=>i(!1),onFocus:()=>i(!0),validation:{...b,validate:o},appearance:w,...C}),(g||n||h)&&t.createElement(B,{css:{mt:"$2",gap:"$2",flexWrap:"wrap",flexDirection:u}},Object.entries(F).map(([e,a])=>t.createElement(D,{key:e,theme:y(a,n)},e))))};c.displayName="CreatePasswordField";export{c 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 = formState.errors[name]?.type === 'validate'\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 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 {...remainingProps}\n />\n {(touched || isFocused || error) && (\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","remainingProps","_a","formState","useFormContext","isFocused","setIsFocused","React","validationResult","setValidationResult","touched","error","validatePassword","password","result","invariant","isValid","handleChange","throttle","getMessageTheme","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,KACGC,CACL,IAAgC,
|
|
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 } = 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 = formState.errors[name]?.type === 'validate'\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 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 {(touched || isFocused || error) && (\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","useFormContext","isFocused","setIsFocused","React","validationResult","setValidationResult","touched","error","validatePassword","password","result","invariant","isValid","handleChange","throttle","getMessageTheme","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,CAAU,EAAIC,EAAe,EAC/B,CAACC,EAAWC,CAAY,EAAIC,EAAM,SAAkB,EAAK,EACzD,CAACC,EAAkBC,CAAmB,EAC1CF,EAAM,SAA2Bb,CAAiB,EAE9CgB,EAAUP,EAAU,QAAQN,GAC5Bc,IAAQT,EAAAC,EAAU,OAAON,KAAjB,YAAAK,EAAwB,QAAS,WAEzCU,EAAmBL,EAAM,YAC7B,MAAOM,GAAqB,CAC1B,MAAMC,EAAS,MAAMrB,EAASoB,CAAQ,EAEtC,OAAIC,GACFC,EACE,OAAOD,GAAW,SAClB,6CACF,EAEAL,EAAoBK,CAAM,EACnB,OAAO,OAAOA,CAAM,EAAE,MAAOE,GAAYA,CAAO,GAGlD,EACT,EACA,CAACP,CAAmB,CACtB,EAEMQ,EAAeV,EAAM,YAAYW,EAAS,IAAKN,CAAgB,EAAG,CACtEA,CACF,CAAC,EAEKO,EAAkB,CAACL,EAAiBT,IACpCS,EAAe,UAEZT,EAAY,UAAY,QAGjC,OACEE,EAAA,cAACa,EAAA,CAAI,IAAKtB,CAAAA,EACRS,EAAA,cAACc,EAAA,CACC,MAAOzB,EACP,KAAMC,EACN,SAAW,GAAMoB,EAAa,EAAE,OAAO,KAAK,EAC5C,OAAQ,IAAMX,EAAa,EAAK,EAChC,QAAS,IAAMA,EAAa,EAAI,EAChC,WAAY,CAAE,GAAGP,EAAY,SAAUa,CAAiB,EACxD,WAAYZ,EACX,GAAGC,CACN,CAAA,GACES,GAAWL,GAAaM,IACxBJ,EAAA,cAACe,EAAA,CACC,IAAK,CACH,GAAI,KACJ,IAAK,KACL,SAAU,OACV,cAAe3B,CACjB,GAEC,OAAO,QAAQa,CAAgB,EAAE,IAAI,CAAC,CAACe,EAAST,CAAM,IACrDP,EAAA,cAACiB,EAAA,CACC,IAAKD,EACL,MAAOJ,EAAgBL,EAAQT,CAAS,CAEvCkB,EAAAA,CACH,CACD,CACH,CAEJ,CAEJ,EAEA/B,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";const p=({css:m,hideLabel:l,label:d,name:e,validation:r,prompt:n,description:s,appearance:t,...c})=>{const{register:a,trigger:f}=F(),{error:o}=v(e),u=r?a(r):a;return i.createElement(g,{css:m,description:s,error:o,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,...o&&{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":"gUAYa,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"}
|
|
@@ -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
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Heading.js","sources":["../../../src/components/heading/Heading.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { styled } from '~/stitches'\nimport type { Override } from '~/utilities'\nimport { capsize } from '~/utilities'\n\nexport const StyledHeading = styled('h2', {\n
|
|
1
|
+
{"version":3,"file":"Heading.js","sources":["../../../src/components/heading/Heading.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { styled } from '~/stitches'\nimport type { Override } from '~/utilities'\nimport { capsize } from '~/utilities'\n\nexport const StyledHeading = styled('h2', {\n m: 0,\n variants: {\n size: {\n xs: {\n fontFamily: '$body',\n fontSize: '$md',\n lineHeight: 1.5,\n ...capsize(0.3864)\n },\n sm: {\n fontFamily: '$body',\n fontSize: '$lg',\n lineHeight: 1.14,\n ...capsize(0.2078)\n },\n md: {\n fontFamily: '$body',\n fontSize: '$xl',\n lineHeight: 1.14,\n ...capsize(0.2078)\n },\n lg: {\n fontFamily: '$display',\n fontSize: '$2xl',\n lineHeight: 1.08,\n letterSpacing: '0.01em',\n ...capsize(0.1405, 0.2405)\n },\n xl: {\n fontFamily: '$display',\n fontSize: '$3xl',\n lineHeight: 1.12,\n ...capsize(0.16, 0.26)\n },\n xxl: {\n fontFamily: '$display',\n fontSize: '$4xl',\n lineHeight: 1,\n ...capsize(0.1, 0.2)\n }\n },\n noCapsize: {\n true: {\n '&::before, &::after': { display: 'none !important' }\n }\n },\n weight: {\n medium: { fontWeight: 500 },\n bold: { fontWeight: 700 }\n }\n }\n})\n\nexport type HeadingProps = Override<\n React.ComponentProps<typeof StyledHeading>,\n {\n as?:\n | 'h1'\n | 'h2'\n | 'h3'\n | 'h4'\n | 'h5'\n | 'h6'\n | React.ComponentType\n | React.ElementType\n }\n>\n\nexport const Heading: React.ForwardRefExoticComponent<HeadingProps> =\n React.forwardRef(\n ({ size = 'md', weight = 'bold', ...remainingProps }, ref) => (\n <StyledHeading\n ref={ref}\n size={size}\n weight={weight}\n {...remainingProps}\n />\n )\n )\n\nHeading.displayName = 'Heading'\n"],"names":["StyledHeading","styled","capsize","Heading","React","size","weight","remainingProps","ref"],"mappings":"4TAMaA,EAAgBC,EAAO,KAAM,CACxC,EAAG,EACH,SAAU,CACR,KAAM,CACJ,GAAI,CACF,WAAY,QACZ,SAAU,MACV,WAAY,IACZ,GAAGC,EAAQ,KAAM,CACnB,EACA,GAAI,CACF,WAAY,QACZ,SAAU,MACV,WAAY,KACZ,GAAGA,EAAQ,KAAM,CACnB,EACA,GAAI,CACF,WAAY,QACZ,SAAU,MACV,WAAY,KACZ,GAAGA,EAAQ,KAAM,CACnB,EACA,GAAI,CACF,WAAY,WACZ,SAAU,OACV,WAAY,KACZ,cAAe,SACf,GAAGA,EAAQ,MAAQ,KAAM,CAC3B,EACA,GAAI,CACF,WAAY,WACZ,SAAU,OACV,WAAY,KACZ,GAAGA,EAAQ,IAAM,GAAI,CACvB,EACA,IAAK,CACH,WAAY,WACZ,SAAU,OACV,WAAY,EACZ,GAAGA,EAAQ,GAAK,EAAG,CACrB,CACF,EACA,UAAW,CACT,KAAM,CACJ,sBAAuB,CAAE,QAAS,iBAAkB,CACtD,CACF,EACA,OAAQ,CACN,OAAQ,CAAE,WAAY,GAAI,EAC1B,KAAM,CAAE,WAAY,GAAI,CAC1B,CACF,CACF,CAAC,EAiBYC,EACXC,EAAM,WACJ,CAAC,CAAE,KAAAC,EAAO,KAAM,OAAAC,EAAS,UAAWC,CAAe,EAAGC,IACpDJ,EAAA,cAACJ,GACC,IAAKQ,EACL,KAAMH,EACN,OAAQC,EACP,GAAGC,EACN,CAEJ,EAEFJ,EAAQ,YAAc"}
|
|
@@ -370,6 +370,7 @@ export declare const InputBackground: import("@atom-learning/stitches-react/type
|
|
|
370
370
|
marginBottom: string | number | import("@atom-learning/stitches-react/types/css-util").WithScaleValue<"space">;
|
|
371
371
|
};
|
|
372
372
|
}>>, {
|
|
373
|
+
appearance?: "standard" | "modern" | undefined;
|
|
373
374
|
size?: "sm" | "md" | "lg" | "xl" | undefined;
|
|
374
375
|
disabled?: boolean | "true" | undefined;
|
|
375
376
|
state?: "error" | undefined;
|
|
@@ -1108,9 +1109,10 @@ export type InputTextProps = Omit<React.ComponentProps<typeof StyledInputText>,
|
|
|
1108
1109
|
};
|
|
1109
1110
|
export declare const InputText: React.ForwardRefExoticComponent<InputTextProps>;
|
|
1110
1111
|
type InputBackgroundProps = React.ComponentProps<typeof InputBackground>;
|
|
1111
|
-
export type InputProps = Omit<React.ComponentProps<typeof InputText>, 'size' | 'state'> & {
|
|
1112
|
+
export type InputProps = Omit<React.ComponentProps<typeof InputText>, 'size' | 'state' | 'appearance'> & {
|
|
1112
1113
|
size?: InputBackgroundProps['size'];
|
|
1113
1114
|
state?: InputBackgroundProps['state'];
|
|
1115
|
+
appearance?: InputBackgroundProps['appearance'];
|
|
1114
1116
|
};
|
|
1115
1117
|
export declare const Input: React.ForwardRefExoticComponent<InputProps>;
|
|
1116
1118
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import*as r from"react";import{styled as
|
|
1
|
+
import*as r from"react";import{styled as p}from"../../stitches.js";import"../../utilities/css-wrapper/CSSWrapper.js";import"../../utilities/no-overflow-wrapper/NoOverflowWrapper.js";import"color2k";import"../../utilities/style/keyframe-animations.js";import{overrideStitchesVariantValue as u}from"../../utilities/override-stitches-variant-value/overrideStitchesVariantValue.js";import{disabledStyle as b}from"../../utilities/style/disabledStyle.js";import{Flex as g}from"../flex/Flex.js";import{Text as h}from"../text/Text.js";const i=p(g,{border:"1px solid",color:"$grey1000",transition:"background 100ms ease-out, borderColor 100ms ease-out",width:"100%","&:focus-within":{borderColor:"$blue800"},"&::placeholder":{color:"$grey700",opacity:1},variants:{appearance:{standard:{background:"white",borderColor:"$grey800",borderRadius:"$0"},modern:{background:"$grey100",borderColor:"$grey100",borderRadius:"$1"}},size:{sm:{height:"$3"},md:{height:"$4"},lg:{height:"$5"},xl:{height:"$6"}},disabled:{true:b},state:{error:{borderColor:"$danger"}}}});i.displayName="InputBackground";const f=p.withConfig({shouldForwardStitchesProp:e=>["as"].includes(e)})(h,{appearance:"none",border:"none",background:"none",backgroundImage:"none",backgroundColor:"transparent",boxShadow:"none",boxSizing:"border-box","&:focus":{outline:"none"},px:"$3",size:"100%"}),x={sm:"sm",md:"md",lg:"md",xl:"lg"},m=r.forwardRef(({type:e="text",css:a,size:o,...n},t)=>{const s=r.useMemo(()=>u(o,d=>x[d]),[o]);return r.createElement(f,{ref:t,as:"input",type:e==="number"?"text":e,inputMode:e==="number"?"numeric":void 0,pattern:e==="number"?"[0-9]*":void 0,size:s,...n})});m.displayName="InputText";const l=r.forwardRef(({className:e,size:a="md",appearance:o="standard",state:n,disabled:t,css:s,...d},c)=>r.createElement(i,{size:a,appearance:o,disabled:t,state:n,css:s,className:e},r.createElement(m,{size:a,ref:c,disabled:t,...d})));l.displayName="Input";export{l as Input,i as InputBackground,m as InputText};
|
|
2
2
|
//# sourceMappingURL=Input.js.map
|