@equinor/amplify-component-lib 12.0.6 → 13.0.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/atoms/hooks/useLocalStorage.d.ts +2 -2
- package/dist/atoms/hooks/useSelect.d.ts +3 -3
- package/dist/atoms/index.js +1 -1
- package/dist/deprecated/ExpandingIconButton/ExpandingIconButton.d.ts +2 -2
- package/dist/index.d.ts +2 -1
- package/dist/index.js +1 -1
- package/dist/molecules/Button/Button.d.ts +15 -7
- package/dist/molecules/Button/Button.js +1 -12
- package/dist/molecules/Button/Button.styles.js +88 -0
- package/dist/molecules/Button/Button.utils.js +1 -1
- package/dist/molecules/Button/IconButton/IconButton.d.ts +17 -0
- package/dist/molecules/Button/IconButton/IconButton.js +1 -0
- package/dist/molecules/Button/IconButton/IconButton.styles.js +69 -0
- package/dist/molecules/Button/tokens/danger.js +1 -0
- package/dist/molecules/Button/tokens/disabled.js +1 -0
- package/dist/molecules/Button/tokens/primary.js +1 -0
- package/dist/molecules/Button/tokens/tokens.js +1 -0
- package/dist/molecules/Button/types.d.ts +15 -0
- package/dist/molecules/Chip/Chip.d.ts +2 -2
- package/dist/molecules/DatePicker/DatePicker.d.ts +3 -3
- package/dist/molecules/DateRangePicker/DateRangePicker.d.ts +3 -3
- package/dist/molecules/Dialog/Dialog.d.ts +6 -5
- package/dist/molecules/Dialog/DialogAction.js +1 -1
- package/dist/molecules/EquinorLogo/EquinorLogo.d.ts +2 -2
- package/dist/molecules/FileUploadArea/FileUploadArea.js +1 -1
- package/dist/molecules/IconCell/IconCell.d.ts +2 -2
- package/dist/molecules/ListItem/ListItem.d.ts +2 -2
- package/dist/molecules/OptionalTooltip/OptionalTooltip.d.ts +4 -4
- package/dist/molecules/ProfileAvatar/ProfileAvatar.d.ts +2 -2
- package/dist/molecules/RichTextEditor/MenuBar/Table/TableColumn.js +1 -1
- package/dist/molecules/RichTextEditor/MenuBar/Table/TableMerge.js +1 -1
- package/dist/molecules/RichTextEditor/MenuBar/Table/TableRow.js +1 -1
- package/dist/molecules/RichTextEditor/MenuBar/Table/ToggleTable.js +1 -1
- package/dist/molecules/Search/Search.d.ts +2 -2
- package/dist/molecules/Select/ComboBox/ComboBox.d.ts +2 -2
- package/dist/molecules/Select/PersistentComboBox/PersistentComboBox.d.ts +2 -2
- package/dist/molecules/Select/Select.js +1 -1
- package/dist/molecules/Select/SingleSelect/SingleSelect.d.ts +2 -2
- package/dist/molecules/SelectionControls/Checkbox/Checkbox.d.ts +2 -2
- package/dist/molecules/SelectionControls/Radio/Radio.d.ts +2 -2
- package/dist/molecules/Skeleton/SkeletonBase/SkeletonBase.d.ts +2 -2
- package/dist/molecules/Stepper/Step/Step.js +1 -1
- package/dist/molecules/Stepper/Step/StepIcon.js +2 -2
- package/dist/molecules/Stepper/Stepper.d.ts +11 -0
- package/dist/molecules/Stepper/Stepper.js +1 -1
- package/dist/molecules/TableHeader/TableHeader.js +1 -1
- package/dist/molecules/TableHeader/TableHeader.utils.js +1 -1
- package/dist/molecules/TextField/TextField.js +3 -3
- package/dist/molecules/Toast/Toast.js +1 -1
- package/dist/molecules/index.d.ts +2 -1
- package/dist/molecules/index.js +1 -1
- package/dist/node_modules/@equinor/eds-utils/dist/esm/utils/templates/index.js +9 -0
- package/dist/organisms/ReleaseNote/ToggleExpanded.js +2 -2
- package/dist/organisms/SideBar/SideBar.d.ts +2 -2
- package/dist/organisms/SideSheet/SideSheet.d.ts +1 -0
- package/dist/organisms/SideSheet/SideSheet.js +1 -1
- package/dist/organisms/SideSheet/SideSheet.styles.js +9 -3
- package/dist/organisms/SideSheet/SideSheet.types.d.ts +4 -1
- package/dist/organisms/Status/Action.d.ts +2 -2
- package/dist/organisms/Status/Description.d.ts +2 -2
- package/dist/organisms/Status/MissingAccesses.d.ts +2 -2
- package/dist/organisms/Status/Title.d.ts +2 -2
- package/dist/organisms/Status/collections/BadRequest.d.ts +2 -2
- package/dist/organisms/Status/collections/GenericError.d.ts +2 -2
- package/dist/organisms/Status/collections/MissingPermissions.d.ts +2 -2
- package/dist/organisms/Status/collections/PageNotFound.d.ts +2 -2
- package/dist/organisms/Status/collections/ServerError.d.ts +2 -2
- package/dist/organisms/ToggleGroup/ToggleGroup.d.ts +2 -2
- package/dist/organisms/ToggleGroup/ToggleGroupOption.d.ts +2 -2
- package/dist/organisms/TopBar/Account/Account.js +1 -1
- package/dist/organisms/TopBar/Account/ImpersonateMenu/DeleteUser/DeleteUser.js +1 -1
- package/dist/organisms/TopBar/Actions.d.ts +2 -2
- package/dist/organisms/TopBar/FieldMenu/FieldMenu.d.ts +2 -2
- package/dist/organisms/TopBar/Notifications/NotificationProvider.d.ts +2 -2
- package/dist/organisms/TopBar/Resources/ReleaseNotesDialog/ReleaseNotesDialog.js +1 -1
- package/dist/providers/StepperProvider.js +1 -1
- package/dist/providers/SurveyProvider/SurveyDialog/SurveyDialog.js +1 -1
- package/dist/providers/SurveyProvider/SurveyDialog/SurveyQuestion/SurveyFreeTextQuestion.js +2 -2
- package/dist/providers/SurveyProvider/SurveyDialog/SurveyQuestion/SurveyLinearScaleQuestion.js +2 -2
- package/dist/providers/SurveyProvider/SurveyDialog/SurveyQuestion/SurveyMultipleChoiceQuestion.js +2 -2
- package/dist/providers/SurveyProvider/SurveyDialog/UmuxDialog.js +2 -2
- package/package.json +3 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react16 from "react";
|
|
2
2
|
import { TooltipProps } from "@equinor/eds-core-react";
|
|
3
3
|
import * as _floating_ui_utils0 from "@floating-ui/utils";
|
|
4
4
|
|
|
@@ -6,14 +6,14 @@ import * as _floating_ui_utils0 from "@floating-ui/utils";
|
|
|
6
6
|
type OptionalTooltipProps = {
|
|
7
7
|
textTransform?: string;
|
|
8
8
|
} & TooltipProps;
|
|
9
|
-
declare const OptionalTooltip:
|
|
9
|
+
declare const OptionalTooltip: react16.ForwardRefExoticComponent<{
|
|
10
10
|
textTransform?: string;
|
|
11
11
|
} & {
|
|
12
12
|
placement?: _floating_ui_utils0.Placement;
|
|
13
|
-
title?:
|
|
13
|
+
title?: react16.ReactNode;
|
|
14
14
|
children: React.ReactElement & React.RefAttributes<HTMLElement>;
|
|
15
15
|
enterDelay?: number;
|
|
16
16
|
portalContainer?: HTMLElement;
|
|
17
|
-
} & Omit<
|
|
17
|
+
} & Omit<react16.HTMLAttributes<HTMLDivElement>, "title"> & react16.RefAttributes<HTMLDivElement>>;
|
|
18
18
|
//#endregion
|
|
19
19
|
export { OptionalTooltip, OptionalTooltipProps };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react22 from "react";
|
|
2
2
|
|
|
3
3
|
//#region src/molecules/ProfileAvatar/ProfileAvatar.d.ts
|
|
4
4
|
interface ProfileAvatarProps {
|
|
@@ -7,6 +7,6 @@ interface ProfileAvatarProps {
|
|
|
7
7
|
size?: 'small' | 'small-medium' | 'medium' | 'large' | 'x-large' | number;
|
|
8
8
|
disabled?: boolean;
|
|
9
9
|
}
|
|
10
|
-
declare const ProfileAvatar:
|
|
10
|
+
declare const ProfileAvatar: react22.ForwardRefExoticComponent<ProfileAvatarProps & react22.RefAttributes<HTMLDivElement>>;
|
|
11
11
|
//#endregion
|
|
12
12
|
export { ProfileAvatar, ProfileAvatarProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{MenuSection as e}from"../MenuBar.styles.js";import{MenuButton as t}from"../MenuButton.js";import{amplify_table_add_column_left as n,amplify_table_add_column_right as r,amplify_table_remove_column as i}from"../../../../atoms/icons/wysiwyg.js";import{jsx as a,jsxs as o}from"react/jsx-runtime";const s=({editor:s})=>o(e,{children:[a(t,{tooltip:`Add column left`,icon:n,onClick:()=>s.chain().focus().addColumnBefore().run(),disabled:!s.can().addColumnBefore()}),a(t,{tooltip:`Add column right`,icon:r,onClick:()=>s.chain().focus().addColumnAfter().run(),disabled:!s.can().addColumnAfter()}),a(t,{tooltip:`Remove column`,icon:i,onClick:()=>s.chain().focus().deleteColumn().run(),disabled:!s.can().deleteColumn()})]});export{s as TableColumn};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{MenuSection as e}from"../MenuBar.styles.js";import{MenuButton as t}from"../MenuButton.js";import{amplify_table_merge_cells as n,amplify_table_split_cell as r}from"../../../../atoms/icons/wysiwyg.js";import{jsx as i,jsxs as a}from"react/jsx-runtime";const o=({editor:o})=>a(e,{children:[i(t,{tooltip:`Merge selected cells`,icon:n,onClick:()=>o.chain().focus().mergeCells().run(),disabled:!o.can().mergeCells()}),i(t,{tooltip:`Split selected cell`,icon:r,onClick:()=>o.chain().focus().splitCell().run(),disabled:!o.can().splitCell()})]});export{o as TableMerge};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{MenuSection as e}from"../MenuBar.styles.js";import{MenuButton as t}from"../MenuButton.js";import{amplify_table_add_row_above as n,amplify_table_add_row_below as r,amplify_table_remove_row as i}from"../../../../atoms/icons/wysiwyg.js";import{jsx as a,jsxs as o}from"react/jsx-runtime";const s=({editor:s})=>o(e,{children:[a(t,{tooltip:`Add row below`,icon:r,onClick:()=>s.chain().focus().addRowAfter().run(),disabled:!s.can().addRowAfter()}),a(t,{tooltip:`Add row above`,icon:n,onClick:()=>s.chain().focus().addRowBefore().run(),disabled:!s.can().addRowBefore()}),a(t,{tooltip:`Remove row`,icon:i,onClick:()=>s.chain().focus().deleteRow().run(),disabled:!s.can().deleteRow()})]});export{s as TableRow};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{MenuSection as e}from"../MenuBar.styles.js";import{MenuButton as t}from"../MenuButton.js";import{amplify_table_column_heading as n,amplify_table_row_heading as r}from"../../../../atoms/icons/wysiwyg.js";import{jsx as i,jsxs as a}from"react/jsx-runtime";const o=({editor:o})=>a(e,{children:[i(t,{tooltip:`Toggle header row`,icon:r,onClick:()=>o.chain().focus().toggleHeaderRow().run(),disabled:!o.can().toggleHeaderRow()}),i(t,{tooltip:`Toggle header column`,icon:n,onClick:()=>o.chain().focus().toggleHeaderColumn().run(),disabled:!o.can().toggleHeaderColumn()})]});export{o as ToggleTable};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react49 from "react";
|
|
2
2
|
import { SearchProps } from "@equinor/eds-core-react";
|
|
3
3
|
|
|
4
4
|
//#region src/molecules/Search/Search.d.ts
|
|
5
5
|
interface SearchProps$1 extends SearchProps {
|
|
6
6
|
lightBackground?: boolean;
|
|
7
7
|
}
|
|
8
|
-
declare const Search$1:
|
|
8
|
+
declare const Search$1: react49.ForwardRefExoticComponent<SearchProps$1 & react49.RefAttributes<HTMLInputElement>>;
|
|
9
9
|
//#endregion
|
|
10
10
|
export { Search$1 as Search };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CommonSelectProps, GroupedSelectProps, ListSelectProps, MultiSelectCommon, SelectOptionRequired } from "../Select.types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime2 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/molecules/Select/ComboBox/ComboBox.d.ts
|
|
5
5
|
type ComboBoxProps<T extends SelectOptionRequired> = CommonSelectProps<T> & MultiSelectCommon<T> & (ListSelectProps<T> | GroupedSelectProps<T>);
|
|
@@ -17,6 +17,6 @@ type ComboBoxProps<T extends SelectOptionRequired> = CommonSelectProps<T> & Mult
|
|
|
17
17
|
* @param showSelectedAsText - If values should be shown as "5/10 Selected", defaults to false
|
|
18
18
|
* @param customMenuItemComponent - Custom component to use for rendering menu item, defaults to a checkbox with label
|
|
19
19
|
*/
|
|
20
|
-
declare function ComboBox<T extends SelectOptionRequired>(props: ComboBoxProps<T>):
|
|
20
|
+
declare function ComboBox<T extends SelectOptionRequired>(props: ComboBoxProps<T>): react_jsx_runtime2.JSX.Element;
|
|
21
21
|
//#endregion
|
|
22
22
|
export { ComboBox, ComboBoxProps };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CommonSelectProps, GroupedSelectProps, ListSelectProps, MultiSelectCommon, PersistentSelectProps, SelectOptionRequired } from "../Select.types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime3 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/molecules/Select/PersistentComboBox/PersistentComboBox.d.ts
|
|
5
5
|
type PersistentComboBoxProps<T extends SelectOptionRequired> = CommonSelectProps<T> & MultiSelectCommon<T> & PersistentSelectProps & (GroupedSelectProps<T> | ListSelectProps<T>);
|
|
@@ -18,6 +18,6 @@ type PersistentComboBoxProps<T extends SelectOptionRequired> = CommonSelectProps
|
|
|
18
18
|
* @param customMenuItemComponent - Custom component to use for rendering menu item, defaults to a checkbox with label
|
|
19
19
|
* @param maxHeight - Max height of the persistent wrapper below the search field, optional
|
|
20
20
|
*/
|
|
21
|
-
declare function PersistentComboBox<T extends SelectOptionRequired>(props: PersistentComboBoxProps<T>):
|
|
21
|
+
declare function PersistentComboBox<T extends SelectOptionRequired>(props: PersistentComboBoxProps<T>): react_jsx_runtime3.JSX.Element;
|
|
22
22
|
//#endregion
|
|
23
23
|
export { PersistentComboBox, PersistentComboBoxProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useSelect as e}from"../../atoms/hooks/useSelect.js";import{
|
|
1
|
+
import{useSelect as e}from"../../atoms/hooks/useSelect.js";import{useOutsideClick as t}from"../../node_modules/@equinor/eds-utils/dist/esm/hooks/useOutsideClick.js";import{InputExplanation as n}from"../InputExplanation/InputExplanation.js";import{SelectItemSkeleton as r}from"./SelectItemSkeleton.js";import{LabelWrapper as i,PersistentComboBoxWrapper as a,PersistentStickyWrapper as o,StyledMenu as s}from"./Select.styles.js";import{GroupedSelectMenu as c}from"./GroupedSelectMenu.js";import{GroupedSelectPersistent as l}from"./GroupedSelectPersistent.js";import{ListSelectMenu as u}from"./ListSelectMenu.js";import{ListSelectPersistent as d}from"./ListSelectPersistent.js";import{SearchBar as f}from"./SearchBar.js";import{useMemo as p,useRef as m}from"react";import{Label as h}from"@equinor/eds-core-react";import{Fragment as g,jsx as _,jsxs as v}from"react/jsx-runtime";const y=y=>{let{clearable:ee=!0,loading:b=!1,disabled:x=!1,lightBackground:S=!1,underlineHighlight:C=!1,sortValues:w=!0,placeholder:T=`Select...`,label:E,meta:D,id:O=`amplify-combobox-${E}`,inDialog:k=!1,onSearchFilter:A,CustomMenuItemComponent:j,mode:M=`menu`,explanation:N,explanationPosition:P}=y,{handleOnAddItem:F,handleOnItemKeyDown:I,handleOnItemSelect:L,itemRefs:R,search:z,handleOnClose:B,open:V,handleOnClear:H,handleOnSearchChange:U,handleOnSearchKeyDown:W,handleToggleOpen:G,selectedValues:K,handleOnOpen:q,handleOnRemoveItem:J,searchRef:Y,tryingToRemoveItem:X}=e({...y,clearable:ee,loading:b,disabled:x,lightBackground:S,underlineHighlight:C,sortValues:w,placeholder:T}),Z=m(null),Q=m(null),$=p(()=>!!E||!!D,[E,D]);if(t(Q.current,e=>{k&&V&&e.target&&Z.current&&Q.current&&!Z.current.contains(e.target)&&!Q.current?.contains(e.target)&&B()}),M===`persistent`&&`value`in y&&y.value)throw Error(`You cannot use SingleSelect with persistent mode`);if(M===`persistent`){let e=`groups`in y&&y.groups?_(l,{...y,search:z,itemRefs:R,onItemSelect:L,onItemKeyDown:I,onSearchFilter:A,CustomMenuItemComponent:j}):_(d,{...y,search:z,itemRefs:R,onAddItem:y.onAddItem?F:void 0,onItemSelect:L,onItemKeyDown:I,onSearchFilter:A,CustomMenuItemComponent:j});return v(g,{children:[$&&_(h,{label:v(i,{children:[E,N&&_(n,{position:P,children:N})]}),meta:D,htmlFor:O,disabled:x}),v(a,{$maxHeight:y.mode===`persistent`&&y.maxHeight?y.maxHeight:void 0,$shouldShowLabel:$,children:[_(o,{children:_(f,{props:y,anchorRef:Z,search:z,searchRef:Y,open:V,selectedValues:K,handleOnOpen:q,handleToggleOpen:G,handleOnRemoveItem:J,tryingToRemoveItem:X,handleOnSearchChange:U,handleOnSearchKeyDown:W,handleOnClear:H})}),y.loading?v(g,{children:[_(r,{}),_(r,{}),_(r,{})]}):e]})]})}return v(`div`,{children:[$&&_(h,{label:v(i,{children:[E,N&&_(n,{position:P,children:N})]}),meta:D,htmlFor:O,disabled:x}),_(f,{props:y,anchorRef:Z,search:z,searchRef:Y,open:V,selectedValues:K,handleOnOpen:q,handleToggleOpen:G,handleOnRemoveItem:J,tryingToRemoveItem:X,handleOnSearchChange:U,handleOnSearchKeyDown:W,handleOnClear:H}),V&&_(s,{ref:Q,open:!0,id:`combobox-menu`,anchorEl:Z.current,onClose:B,placement:`bottom`,style:{width:`${Z.current?.clientWidth}px`,maxWidth:`${Z.current?.clientWidth}px`},children:`groups`in y&&y.groups?_(c,{...y,search:z,itemRefs:R,onItemSelect:L,onItemKeyDown:I,onSearchFilter:A,CustomMenuItemComponent:j}):_(u,{...y,search:z,itemRefs:R,onAddItem:y.onAddItem?F:void 0,onItemSelect:L,onItemKeyDown:I,onSearchFilter:A,CustomMenuItemComponent:j})},`select-menu-${z}`)]})};export{y as Select};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CommonSelectProps, GroupedSelectProps, ListSelectProps, SelectOptionRequired, SingleSelectCommon } from "../Select.types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime1 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/molecules/Select/SingleSelect/SingleSelect.d.ts
|
|
5
5
|
type SingleSelectProps<T extends SelectOptionRequired> = CommonSelectProps<T> & SingleSelectCommon<T> & (ListSelectProps<T> | GroupedSelectProps<T>);
|
|
@@ -15,6 +15,6 @@ type SingleSelectProps<T extends SelectOptionRequired> = CommonSelectProps<T> &
|
|
|
15
15
|
* @param onSearchFilter - Custom filter function for search, default is "item.label.match(new RegExp(searchValue, 'i'))"
|
|
16
16
|
* @param customMenuItemComponent - Custom component to use for rendering menu item, defaults to a checkbox with label
|
|
17
17
|
*/
|
|
18
|
-
declare function SingleSelect<T extends SelectOptionRequired>(props: SingleSelectProps<T>):
|
|
18
|
+
declare function SingleSelect<T extends SelectOptionRequired>(props: SingleSelectProps<T>): react_jsx_runtime1.JSX.Element;
|
|
19
19
|
//#endregion
|
|
20
20
|
export { SingleSelect, SingleSelectProps };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react155 from "react";
|
|
2
2
|
import { CheckboxProps } from "@equinor/eds-core-react";
|
|
3
3
|
|
|
4
4
|
//#region src/molecules/SelectionControls/Checkbox/Checkbox.d.ts
|
|
@@ -7,6 +7,6 @@ interface CheckboxProps$1 extends CheckboxProps {
|
|
|
7
7
|
outlined?: boolean;
|
|
8
8
|
error?: boolean;
|
|
9
9
|
}
|
|
10
|
-
declare const Checkbox$1:
|
|
10
|
+
declare const Checkbox$1: react155.ForwardRefExoticComponent<CheckboxProps$1 & react155.RefAttributes<HTMLInputElement>>;
|
|
11
11
|
//#endregion
|
|
12
12
|
export { Checkbox$1 as Checkbox, CheckboxProps$1 as CheckboxProps };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react157 from "react";
|
|
2
2
|
import { RadioProps } from "@equinor/eds-core-react";
|
|
3
3
|
|
|
4
4
|
//#region src/molecules/SelectionControls/Radio/Radio.d.ts
|
|
@@ -7,6 +7,6 @@ interface RadioProps$1 extends RadioProps {
|
|
|
7
7
|
outlined?: boolean;
|
|
8
8
|
error?: boolean;
|
|
9
9
|
}
|
|
10
|
-
declare const Radio$1:
|
|
10
|
+
declare const Radio$1: react157.ForwardRefExoticComponent<RadioProps$1 & react157.RefAttributes<HTMLInputElement>>;
|
|
11
11
|
//#endregion
|
|
12
12
|
export { Radio$1 as Radio, RadioProps$1 as RadioProps };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react51 from "react";
|
|
2
2
|
import * as styled_components8 from "styled-components";
|
|
3
3
|
import * as styled_components_dist_types4 from "styled-components/dist/types";
|
|
4
4
|
import * as styled_components_dist_models_Keyframes0 from "styled-components/dist/models/Keyframes";
|
|
@@ -8,6 +8,6 @@ declare const skeletonBaseloading: styled_components_dist_models_Keyframes0.defa
|
|
|
8
8
|
interface SkeletonBaseProps {
|
|
9
9
|
$offset?: number;
|
|
10
10
|
}
|
|
11
|
-
declare const SkeletonBase: styled_components_dist_types4.IStyledComponentBase<"web", styled_components8.FastOmit<styled_components8.FastOmit<
|
|
11
|
+
declare const SkeletonBase: styled_components_dist_types4.IStyledComponentBase<"web", styled_components8.FastOmit<styled_components8.FastOmit<react51.DetailedHTMLProps<react51.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$offset"> & SkeletonBaseProps, never> & Partial<Pick<styled_components8.FastOmit<react51.DetailedHTMLProps<react51.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$offset"> & SkeletonBaseProps, never>>> & string;
|
|
12
12
|
//#endregion
|
|
13
13
|
export { SkeletonBase, SkeletonBaseProps, skeletonBaseloading };
|
|
@@ -12,4 +12,4 @@ import{colors as e}from"../../../atoms/style/colors.js";import{spacings as t}fro
|
|
|
12
12
|
cursor: pointer;
|
|
13
13
|
}
|
|
14
14
|
`:``}
|
|
15
|
-
`,d=({index:t,onlyShowCurrentStepLabel:o=!1,children:s})=>{let{currentStep:
|
|
15
|
+
`,d=({index:t,onlyShowCurrentStepLabel:o=!1,children:s,allowJumpingAhead:d=!1})=>{let{currentStep:f,setCurrentStep:p,isStepAtIndexDisabled:m}=n(),h=m(t),g=i(()=>t<f?`body_short`:`body_short_bold`,[f,t,d]),_=i(()=>h||t>f&&!d?e.interactive.disabled__text.rgba:e.text.static_icons__default.rgba,[f,t,h,d]),v=i(()=>h?!1:!!(t<f||d&&t>f),[t,f,h,d]);return l(u,{"data-testid":`step`,$clickable:v,onClick:()=>{v&&p(t)},onKeyDown:e=>{v&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),p(t))},$disabled:h,"aria-disabled":!v,role:`button`,tabIndex:v?0:-1,children:[c(r,{index:t,disabled:h,allowJumpingAhead:d}),(!o||f===t)&&c(a,{variant:g,color:_,children:s})]})};export{d as default};
|
|
@@ -11,9 +11,9 @@ import{colors as e}from"../../../atoms/style/colors.js";import{shape as t}from".
|
|
|
11
11
|
> p {
|
|
12
12
|
// Ensure text icons are not squished
|
|
13
13
|
padding: 8px;
|
|
14
|
-
color: ${t=>t
|
|
14
|
+
color: ${({$filled:t,$outlined:n})=>t?e.text.static_icons__primary_white.rgba:n?e.interactive.primary__resting.rgba:e.interactive.disabled__text.rgba};
|
|
15
15
|
}
|
|
16
16
|
> svg {
|
|
17
17
|
transform: scale(0.9);
|
|
18
18
|
}
|
|
19
|
-
`,u=({index:t,disabled:a})=>{let{currentStep:
|
|
19
|
+
`,u=({index:t,disabled:a,allowJumpingAhead:u})=>{let{currentStep:d}=n();return a?o(r,{data:c,color:e.interactive.disabled__text.rgba}):t>d&&u?o(l,{$outlined:!0,children:o(i,{variant:`caption`,children:t+1})}):t>=d?o(l,{$filled:t===d,children:o(i,{variant:`caption`,children:t+1})}):o(l,{$outlined:!0,"data-testid":`wrapper`,children:o(r,{data:s,color:e.interactive.primary__resting.rgba})})};export{u as StepIcon};
|
|
@@ -1,9 +1,20 @@
|
|
|
1
1
|
import { FC } from "react";
|
|
2
2
|
|
|
3
3
|
//#region src/molecules/Stepper/Stepper.d.ts
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Props for the Stepper component
|
|
7
|
+
* @interface StepperProps
|
|
8
|
+
*/
|
|
4
9
|
interface StepperProps {
|
|
10
|
+
/** If true, only the current step's label is displayed, hiding others */
|
|
5
11
|
onlyShowCurrentStepLabel?: boolean;
|
|
12
|
+
/** Maximum width of the stepper container */
|
|
6
13
|
maxWidth?: string;
|
|
14
|
+
/** If true, hides the SubTitle content section below the stepper (used when steps provide `title` or `subSteps`) */
|
|
15
|
+
hideContent?: boolean;
|
|
16
|
+
/** If true, allows users to click on steps ahead of the current step to jump forward and renders those steps as interactive */
|
|
17
|
+
allowJumpingAhead?: boolean;
|
|
7
18
|
}
|
|
8
19
|
declare const Stepper: FC<StepperProps>;
|
|
9
20
|
//#endregion
|
|
@@ -13,4 +13,4 @@ import{spacings as e}from"../../atoms/style/spacings.js";import{useStepper as t}
|
|
|
13
13
|
${({$maxWidth:e})=>e?s`
|
|
14
14
|
max-width: ${e};
|
|
15
15
|
`:``}
|
|
16
|
-
`,f=({onlyShowCurrentStepLabel:e=!1,maxWidth:o})=>{let{steps:
|
|
16
|
+
`,f=({onlyShowCurrentStepLabel:e=!1,maxWidth:o,hideContent:s=!1,allowJumpingAhead:f=!1})=>{let{steps:p,currentStep:m}=t(),h=a(()=>{let t=[];return p.forEach((i,a)=>{t.push(c(n,{index:a,onlyShowCurrentStepLabel:e,allowJumpingAhead:f,children:i.label},`step-${a}`)),a!==p.length-1&&t.push(c(r,{done:m>a||f},`step-line-${a}`))}),t},[m,e,p,f]);return l(u,{children:[c(d,{$stepAmount:p.length,$maxWidth:o,"data-testid":`stepper-container`,children:h}),!s&&c(i,{})]})};export{f as Stepper};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{IconButton as e}from"../Button/IconButton/IconButton.js";import"../../atoms/enums/SpacingsMode.js";import{getLeadingIcon as t,getLeadingIconColor as n,getSortingIcon as r,getTextColor as i}from"./TableHeader.utils.js";import{ActionsWrapper as a,Container as o,Wrapper as s}from"./TableHeader.styles.js";import{Icon as c,Typography as l}from"@equinor/eds-core-react";import{jsx as u,jsxs as d}from"react/jsx-runtime";const f=({as:f=`th`,variant:p,onClick:m,sorting:h,leadingIcon:g,trailingAction:_,children:v})=>{let y=t({variant:p,leadingIcon:g});return u(s,{as:f,children:d(o,{$hasOnClick:!!m,$hasOnSort:!!h,$variant:p,onClick:e=>{m?m(e):h?.onSortClick?.(e)},children:[y&&u(c,{data:y,color:n({variant:p,onClick:m})}),u(l,{variant:`cell_header`,group:`table`,color:i({variant:p,onClick:m}),children:v}),(!!_||!!h)&&d(a,{children:[_&&u(e,{"data-spacings-mode":`compact`,variant:`ghost`,onClick:_.onClick,icon:_.icon}),h?.isSorting&&u(e,{icon:r(h.isSorting),className:`sort-button`,onClick:m?h.onSortClick:void 0,"data-spacings-mode":`compact`,variant:`ghost`})]})]})})};export{f as TableHeader};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{colors as e}from"../../atoms/style/colors.js";import{arrow_down as t,arrow_up as n,error_outlined as r,warning_outlined as i}from"@equinor/eds-icons";function a(e){if(e.leadingIcon)return e.leadingIcon;switch(e.variant){case`warning`:return i;case`error`:return r}}function o(t){switch(t.variant){case`warning`:return e.interactive.warning__text.rgba;case`error`:return e.interactive.danger__text.rgba}return t.onClick?e.interactive.primary__resting.rgba:e.text.static_icons__tertiary.rgba}function s(
|
|
1
|
+
import{colors as e}from"../../atoms/style/colors.js";import{arrow_down as t,arrow_up as n,error_outlined as r,warning_outlined as i}from"@equinor/eds-icons";function a(e){if(e.leadingIcon)return e.leadingIcon;switch(e.variant){case`warning`:return i;case`error`:return r}}function o(t){switch(t.variant){case`warning`:return e.interactive.warning__text.rgba;case`error`:return e.interactive.danger__text.rgba}return t.onClick?e.interactive.primary__resting.rgba:e.text.static_icons__tertiary.rgba}function s(e){switch(e){case`asc`:return n;case`desc`:return t}}function c(t){if(t.onClick)switch(t.variant){case`warning`:return e.interactive.warning__text.rgba;case`error`:return e.interactive.danger__text.rgba;default:return e.interactive.primary__resting.rgba}return e.text.static_icons__default.rgba}function l(t){switch(t.variant){case`warning`:return e.interactive.warning__highlight.rgba;case`error`:return e.interactive.danger__highlight.rgba;default:return e.interactive.primary__hover_alt.rgba}}function u(t){switch(t.variant){case`warning`:return e.interactive.warning__text.rgba;case`error`:return e.interactive.danger__text.rgba;default:return e.interactive.primary__hover.rgba}}export{u as getButtonHoverColor,l as getHoverColor,a as getLeadingIcon,o as getLeadingIconColor,s as getSortingIcon,c as getTextColor};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{animation as e}from"../../atoms/style/animation.js";import{VARIANT_COLORS as t,colors as n}from"../../atoms/style/colors.js";import{spacings as r}from"../../atoms/style/spacings.js";import{shape as i}from"../../atoms/style/index.js";import{getSkeletonHeight as a,getSkeletonTop as o}from"../../atoms/utils/skeleton.js";import{
|
|
1
|
+
import{animation as e}from"../../atoms/style/animation.js";import{VARIANT_COLORS as t,colors as n}from"../../atoms/style/colors.js";import{spacings as r}from"../../atoms/style/spacings.js";import{shape as i}from"../../atoms/style/index.js";import{getSkeletonHeight as a,getSkeletonTop as o}from"../../atoms/utils/skeleton.js";import{SkeletonBase as s}from"../Skeleton/SkeletonBase/SkeletonBase.js";import{InputExplanation as c}from"../InputExplanation/InputExplanation.js";import{useEffect as l,useRef as u,useState as d}from"react";import{TextField as f,Typography as p}from"@equinor/eds-core-react";import m,{css as h}from"styled-components";import{jsx as g,jsxs as _}from"react/jsx-runtime";const v=m.div`
|
|
2
2
|
position: relative;
|
|
3
3
|
height: fit-content;
|
|
4
4
|
input,
|
|
@@ -77,7 +77,7 @@ import{animation as e}from"../../atoms/style/animation.js";import{VARIANT_COLORS
|
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
79
|
`}
|
|
80
|
-
`,y=m(
|
|
80
|
+
`,y=m(s)`
|
|
81
81
|
position: absolute;
|
|
82
82
|
left: ${r.small};
|
|
83
83
|
border-radius: ${i.corners.borderRadius};
|
|
@@ -89,4 +89,4 @@ import{animation as e}from"../../atoms/style/animation.js";import{VARIANT_COLORS
|
|
|
89
89
|
display: flex;
|
|
90
90
|
gap: ${r.x_small};
|
|
91
91
|
align-items: center;
|
|
92
|
-
`,S=e=>{if(e.maxCharacters&&`type`in e&&e.type!==`text`)throw Error('`maxCharacters` prop is not supported for input types other than "text".');if(e.explanation&&!e.label)throw Error("`explanation` prop requires a `label` to be set on the TextField.");let i={...e,variant:e.variant===`dirty`?void 0:e.variant},
|
|
92
|
+
`,S=e=>{if(e.maxCharacters&&`type`in e&&e.type!==`text`)throw Error('`maxCharacters` prop is not supported for input types other than "text".');if(e.explanation&&!e.label)throw Error("`explanation` prop requires a `label` to be set on the TextField.");let i={...e,variant:e.variant===`dirty`?void 0:e.variant},s=e.loading?void 0:e.variant,p=o(e),m=a(e),h=u(`${Math.max(20,Math.random()*80)}%`),[S,C]=d(typeof e.value==`string`?e.value.length:0),[w,T]=d(0),E=e=>{if(e){let t=e.getBoundingClientRect().width;T(t)}},D=t=>{e.onChange&&e.onChange(t),e.maxCharacters&&C(t.target.value.length)};return l(()=>{typeof e.value==`string`&&e.maxCharacters&&e.value.length!==S&&C(e.value.length)},[S,e.maxCharacters,e.value]),_(v,{ref:t=>{if(!t||!e.maxCharacters)return;let n=t.querySelector(`input, textarea`);n&&C(n.value.length)},$variant:s,$disabled:e.loading?!1:e.disabled,$helperRightWidth:w,style:{marginBottom:!e.helperText&&e.maxCharacters?`calc(${r.small} + 1rem)`:0},children:[g(f,{...i,label:i.label?_(x,{children:[i.label,e.explanation&&g(c,{position:e.explanationPosition,children:e.explanation})]}):void 0,disabled:e.loading||e.disabled,onChange:D}),e.loading&&g(y,{className:`skeleton`,role:`progressbar`,style:{top:p,height:m,width:h.current}}),e.maxCharacters&&_(b,{ref:E,variant:`helper`,group:`input`,color:i.variant?t[i.variant]:n.text.static_icons__tertiary.rgba,style:{bottom:e.helperText?`0`:`calc((${r.small} + 1rem) * -1)`},children:[S,` / `,e.maxCharacters]})]})};export{S as TextField};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{colors as e}from"../../atoms/style/colors.js";import{Button as t}from"../Button/Button.js";import{
|
|
1
|
+
import{colors as e}from"../../atoms/style/colors.js";import{Button as t}from"../Button/Button.js";import{IconButton as n}from"../Button/IconButton/IconButton.js";import{getHeaderIcon as r}from"./Toast.utils.js";import{Container as i,DurationBar as a,Header as o}from"./Toast.styles.js";import{useEffect as s}from"react";import{Icon as c,Typography as l}from"@equinor/eds-core-react";import{jsx as u,jsxs as d}from"react/jsx-runtime";import{close as f}from"@equinor/eds-icons";const p=({title:p,icon:m,onClose:h,variant:g,description:_,action:v,duration:y,ref:b})=>{if(y!==void 0&&y<=0)throw Error(`Duration must be a positive number`);s(()=>{if(!y)return;let e=setTimeout(()=>{h()},y*1e3);return()=>clearTimeout(e)},[y,h]);let x=()=>{v?.onClick(),h()},S=r({icon:m,variant:g});return d(i,{ref:b,$variant:g,children:[d(o,{children:[S&&u(c,{data:S}),u(l,{variant:`h6`,color:e.text.static_icons__default.rgba,children:p}),u(n,{icon:f,variant:`ghost`,onClick:h})]}),_&&u(l,{variant:`body_long`,color:e.text.static_icons__secondary.rgba,children:_}),v&&u(t,{label:v.text,variant:`outlined`,onClick:x}),y&&u(a,{role:`progressbar`,$variant:g,$duration:y})]})};export{p as Toast};
|
|
@@ -7,7 +7,8 @@ import { AnimatedCheckmark } from "./AnimatedCheckmark/AnimatedCheckmark.js";
|
|
|
7
7
|
import { ApplicationIcon, ApplicationIconProps } from "./ApplicationIcon/ApplicationIcon.js";
|
|
8
8
|
import { Badge, BadgeProps } from "./Badge/Badge.js";
|
|
9
9
|
import { Banner, BannerProps } from "./Banner/Banner.js";
|
|
10
|
-
import { Button as Button$1, ButtonProps
|
|
10
|
+
import { Button as Button$1, ButtonProps } from "./Button/Button.js";
|
|
11
|
+
import { IconButton, IconButtonProps } from "./Button/IconButton/IconButton.js";
|
|
11
12
|
import { BaseChipProps, Chip as Chip$1 } from "./Chip/Chip.js";
|
|
12
13
|
import { Confetti } from "./Confetti/Confetti.js";
|
|
13
14
|
import { DatePicker as DatePicker$1, DatePickerProps as DatePickerProps$1 } from "./DatePicker/DatePicker.js";
|
package/dist/molecules/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./FullPageSpinner/FullPageSpinner.js";import"./RichTextEditor/RichTextEditor.types.js";import"./RichTextEditor/custom-extensions/AmplifyKit.js";import"./
|
|
1
|
+
import"./FullPageSpinner/FullPageSpinner.js";import"./RichTextEditor/RichTextEditor.types.js";import"./RichTextEditor/custom-extensions/AmplifyKit.js";import"./AnimatedCheckmark/AnimatedCheckmark.js";import"./ApplicationIcon/ApplicationIcon.js";import"./Badge/Badge.js";import"./Banner/Banner.js";import"./Button/Button.js";import"./Button/IconButton/IconButton.js";import"./Chip/Chip.js";import"./Confetti/Confetti.js";import"./Skeleton/SkeletonBase/SkeletonBase.js";import"./DatePicker/DatePicker.js";import"./DateRangePicker/DateRangePicker.js";import"./OptionalTooltip/OptionalTooltip.js";import"./Dialog/Dialog.js";import"./EquinorLogo/EquinorLogo.js";import"./FileProgress/FileProgress.js";import"./FileUploadArea/FileUploadArea.js";import"./IconCell/IconCell.types.js";import"./IconCell/IconCell.js";import"./InfoElement/InfoElement.js";import"./InformationalNotice/InformationalNotice.js";import"./ProfileAvatar/ProfileAvatar.js";import"./RichTextDisplay/RichTextDisplay.js";import"./RichTextEditor/MenuBar/Table/TableBar.js";import"./TextField/TextField.js";import"./RichTextEditor/MenuBar/MenuBar.js";import"./RichTextEditor/RichTextEditor.js";import"./RichTextEditor/index.js";import"./Tabs/Tabs.js";import"./Search/Search.js";import"./Skeleton/SkeletonGradient/SkeletonGradient.js";import"./Stepper/Stepper.js";import"./OptionDrawer/OptionDrawer.js";import"./Select/Select.styles.js";import"./Select/ComboBox/ComboBox.js";import"./Select/PersistentComboBox/PersistentComboBox.js";import"./Select/SingleSelect/SingleSelect.js";import"./Tag/Tag.js";import"./TableHeader/TableHeader.js";import"./FeedBackIcon/FeedBackIcon.js";import"./ListItem/ListItem.js";import"./SelectionControls/Checkbox/Checkbox.js";import"./SelectionControls/Radio/Radio.js";import"./SelectionControls/Switch/Switch.js";import"./Waves/Waves.js";import"./Toast/Toast.js";import{Accordion as e,Breadcrumbs as t,CircularProgress as n,Dialog as r,Divider as i,DotProgress as a,Icon as o,LinearProgress as s,Menu as c,Typography as l}from"@equinor/eds-core-react";export{e as Accordion,t as Breadcrumbs,n as CircularProgress,i as Divider,a as DotProgress,r as EDSDialog,o as Icon,s as LinearProgress,c as Menu,l as Typography};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import"styled-components";const e=(e,t)=>{if(!e)return``;let n=`
|
|
2
|
+
margin: 0;
|
|
3
|
+
color: ${e.color};
|
|
4
|
+
font-family: ${e.fontFamily};
|
|
5
|
+
font-size: ${e.fontSize};
|
|
6
|
+
font-weight: ${e.fontWeight};
|
|
7
|
+
line-height: ${e.lineHeight};
|
|
8
|
+
`;return e.fontStyle&&(n+=`\nfont-style: ${e.fontStyle};`),e.letterSpacing&&(n+=`\nletter-spacing: ${e.letterSpacing};`),e.textTransform&&(n+=`\ntext-transform: ${e.textTransform};`),e.textDecoration&&(n+=`\ntext-decoration: ${e.textDecoration};`),e.textAlign&&(n+=`\ntext-align: ${e.textAlign};`),e.fontFeature&&(n+=`\nfont-feature-settings: ${e.fontFeature};`),t&&(n+=`
|
|
9
|
+
cursor: pointer;`),n};export{e as typographyTemplate};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{colors as e}from"../../atoms/style/colors.js";import{spacings as t}from"../../atoms/style/spacings.js";import{Button as n}from"../../molecules/Button/Button.js";import
|
|
1
|
+
import{colors as e}from"../../atoms/style/colors.js";import{spacings as t}from"../../atoms/style/spacings.js";import{Button as n}from"../../molecules/Button/Button.js";import r from"styled-components";import{jsx as i}from"react/jsx-runtime";import{arrow_drop_down as a,arrow_drop_up as o}from"@equinor/eds-icons";const s=r.div`
|
|
2
2
|
position: absolute;
|
|
3
3
|
bottom: 0;
|
|
4
4
|
left: 0;
|
|
@@ -10,4 +10,4 @@ import{colors as e}from"../../atoms/style/colors.js";import{spacings as t}from".
|
|
|
10
10
|
${e.ui.background__default.rgba} 15%
|
|
11
11
|
);
|
|
12
12
|
width: 100%;
|
|
13
|
-
`,
|
|
13
|
+
`,c=({expanded:e,onToggleExpanded:t})=>i(s,{children:i(n,{label:`Show ${e?`less`:`more`}`,trailingIcon:e?o:a,variant:`ghost`,onClick:t})});export{c as ToggleExpanded};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react200 from "react";
|
|
2
2
|
import { HTMLAttributes, ReactNode } from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/organisms/SideBar/SideBar.d.ts
|
|
@@ -16,6 +16,6 @@ interface SideBarWithCreate extends SideBarProps {
|
|
|
16
16
|
createDisabled?: boolean;
|
|
17
17
|
createActive?: boolean;
|
|
18
18
|
}
|
|
19
|
-
declare const SideBar:
|
|
19
|
+
declare const SideBar: react200.ForwardRefExoticComponent<(SideBarWithCreate | BaseSideBar) & react200.RefAttributes<HTMLDivElement>>;
|
|
20
20
|
//#endregion
|
|
21
21
|
export { SideBar };
|
|
@@ -10,6 +10,7 @@ import { FC } from "react";
|
|
|
10
10
|
* @param title - Title to display in the header
|
|
11
11
|
* @param type - How the side sheet should be position, default is standard
|
|
12
12
|
* @param headerElements - Optional spot to put elements in the header, for example more action buttons
|
|
13
|
+
* @param width - Optional width override (number is treated as px)
|
|
13
14
|
* @param children - Content in the side sheet
|
|
14
15
|
*/
|
|
15
16
|
declare const SideSheet: FC<SideSheetProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{IconButton as e}from"../../molecules/Button/IconButton/IconButton.js";import{Header as t,ScrimWrapper as n,Sheet as r,Wrapper as i}from"./SideSheet.styles.js";import{Typography as a}from"@equinor/eds-core-react";import{jsx as o,jsxs as s}from"react/jsx-runtime";import{close as c}from"@equinor/eds-icons";import{AnimatePresence as l}from"motion/react";const u=({open:e,onClose:t,title:r,type:i=`standard`,headerElements:a,width:s,children:c,...l})=>`withScrim`in l&&l.withScrim?o(n,{"data-testid":`side-sheet-scrim`,onClick:e?t:void 0,$zIndex:l.zIndex,initial:{display:`none`,background:`rgba(111,111,111,0)`},animate:{background:e?`rgba(111,111,111,0.35)`:`rgba(111,111,111,0)`,display:e?`block`:`none`},children:o(d,{open:e,onClose:t,title:r,type:`modal`,headerElements:a,width:s,zIndex:l.zIndex,withScrim:!0,children:c})}):i===`modal`||i===`floating`?o(d,{open:e,onClose:t,title:r,type:i,headerElements:a,width:s,zIndex:`zIndex`in l?l.zIndex:void 0,children:c}):o(d,{open:e,onClose:t,title:r,type:i,headerElements:a,width:s,children:c});function d({open:n,onClose:u,title:d,type:f=`standard`,headerElements:p,width:m,children:h,...g}){return o(l,{children:n&&o(i,{"data-testid":`side-sheet-wrapper`,$type:f,$withShadow:!(`withScrim`in g&&g.withScrim),$zIndex:`zIndex`in g?g.zIndex:void 0,initial:{x:f===`standard`?void 0:`110%`,width:f===`standard`?0:void 0},animate:{x:f===`standard`?void 0:0,width:f===`standard`?`auto`:void 0},exit:{x:f===`standard`?void 0:`110%`,width:f===`standard`?0:void 0},transition:{bounce:.25},children:s(r,{$type:f,$width:m,children:[s(t,{children:[o(a,{variant:`h2`,children:d}),p&&o(`section`,{children:p}),o(e,{icon:c,"aria-label":`close side sheet`,variant:`ghost`,onClick:u,style:{gridColumn:3}})]}),h]})})})}export{u as SideSheet};
|
|
@@ -1,21 +1,27 @@
|
|
|
1
1
|
import{colors as e}from"../../atoms/style/colors.js";import{spacings as t}from"../../atoms/style/spacings.js";import{elevation as n,shape as r}from"../../atoms/style/index.js";import{css as i,styled as a}from"styled-components";import{motion as o}from"motion/react";const s=a(o.div)`
|
|
2
2
|
overflow: hidden;
|
|
3
|
-
${({$type:e,$withShadow:a})=>e===`standard`?``:e===`floating`?i`
|
|
3
|
+
${({$type:e,$withShadow:a,$zIndex:o})=>e===`standard`?``:e===`floating`?i`
|
|
4
4
|
position: fixed;
|
|
5
5
|
top: calc(64px + ${t.medium});
|
|
6
6
|
right: ${t.medium};
|
|
7
7
|
box-shadow: ${n.sticky};
|
|
8
8
|
border-radius: ${r.corners.borderRadius};
|
|
9
|
+
${o!==void 0&&i`
|
|
10
|
+
z-index: ${o};
|
|
11
|
+
`}
|
|
9
12
|
`:i`
|
|
10
13
|
position: fixed;
|
|
11
14
|
top: 64px;
|
|
12
15
|
right: 0;
|
|
13
16
|
box-shadow: ${a?n.above_scrim:`none`};
|
|
17
|
+
${o!==void 0&&i`
|
|
18
|
+
z-index: ${o};
|
|
19
|
+
`}
|
|
14
20
|
`}
|
|
15
21
|
`,c=a.div`
|
|
16
22
|
display: flex;
|
|
17
23
|
flex-direction: column;
|
|
18
|
-
width: 500px;
|
|
24
|
+
width: ${({$width:e})=>e===void 0?`500px`:`${e}px`};
|
|
19
25
|
background: ${e.ui.background__default.rgba};
|
|
20
26
|
${({$type:t})=>{if(t===`standard`)return i`
|
|
21
27
|
background: none;
|
|
@@ -35,5 +41,5 @@ import{colors as e}from"../../atoms/style/colors.js";import{spacings as t}from".
|
|
|
35
41
|
width: 100%;
|
|
36
42
|
overflow: hidden;
|
|
37
43
|
height: calc(100vh - 64px);
|
|
38
|
-
z-index:
|
|
44
|
+
z-index: ${({$zIndex:e})=>e??1e4};
|
|
39
45
|
`;export{l as Header,u as ScrimWrapper,c as Sheet,s as Wrapper};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactElement } from "react";
|
|
1
|
+
import { CSSProperties, ReactElement } from "react";
|
|
2
2
|
|
|
3
3
|
//#region src/organisms/SideSheet/SideSheet.types.d.ts
|
|
4
4
|
interface BaseSideSheetProps {
|
|
@@ -6,6 +6,7 @@ interface BaseSideSheetProps {
|
|
|
6
6
|
onClose: () => void;
|
|
7
7
|
title: string;
|
|
8
8
|
headerElements?: ReactElement | ReactElement[];
|
|
9
|
+
width?: number | undefined;
|
|
9
10
|
children: ReactElement | ReactElement[];
|
|
10
11
|
}
|
|
11
12
|
interface StandardSideSheetProps extends BaseSideSheetProps {
|
|
@@ -14,9 +15,11 @@ interface StandardSideSheetProps extends BaseSideSheetProps {
|
|
|
14
15
|
interface ModalSideSheetProps extends BaseSideSheetProps {
|
|
15
16
|
type: 'modal';
|
|
16
17
|
withScrim?: boolean;
|
|
18
|
+
zIndex?: CSSProperties['zIndex'];
|
|
17
19
|
}
|
|
18
20
|
interface FloatingSideSheetProps extends BaseSideSheetProps {
|
|
19
21
|
type: 'floating';
|
|
22
|
+
zIndex?: CSSProperties['zIndex'];
|
|
20
23
|
}
|
|
21
24
|
type SideSheetProps = StandardSideSheetProps | ModalSideSheetProps | FloatingSideSheetProps;
|
|
22
25
|
//#endregion
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react204 from "react";
|
|
2
2
|
|
|
3
3
|
//#region src/organisms/Status/Action.d.ts
|
|
4
4
|
interface ActionProps {
|
|
5
5
|
onClick: () => void;
|
|
6
6
|
buttonText?: string;
|
|
7
7
|
}
|
|
8
|
-
declare const Action:
|
|
8
|
+
declare const Action: react204.ForwardRefExoticComponent<ActionProps & react204.RefAttributes<HTMLButtonElement>>;
|
|
9
9
|
//#endregion
|
|
10
10
|
export { Action };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react206 from "react";
|
|
2
2
|
|
|
3
3
|
//#region src/organisms/Status/Description.d.ts
|
|
4
4
|
interface DescriptionProps {
|
|
5
5
|
text?: string;
|
|
6
6
|
}
|
|
7
|
-
declare const Description:
|
|
7
|
+
declare const Description: react206.ForwardRefExoticComponent<DescriptionProps & react206.RefAttributes<HTMLHeadingElement>>;
|
|
8
8
|
//#endregion
|
|
9
9
|
export { Description };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react208 from "react";
|
|
2
2
|
|
|
3
3
|
//#region src/organisms/Status/MissingAccesses.d.ts
|
|
4
4
|
interface AccessType {
|
|
@@ -9,6 +9,6 @@ interface MissingAccessesProps {
|
|
|
9
9
|
accesses?: AccessType[];
|
|
10
10
|
text?: string;
|
|
11
11
|
}
|
|
12
|
-
declare const MissingAccesses:
|
|
12
|
+
declare const MissingAccesses: react208.ForwardRefExoticComponent<MissingAccessesProps & react208.RefAttributes<HTMLDivElement>>;
|
|
13
13
|
//#endregion
|
|
14
14
|
export { MissingAccesses };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react202 from "react";
|
|
2
2
|
|
|
3
3
|
//#region src/organisms/Status/Title.d.ts
|
|
4
4
|
interface TitleProps {
|
|
5
5
|
title?: string;
|
|
6
6
|
}
|
|
7
|
-
declare const Title:
|
|
7
|
+
declare const Title: react202.ForwardRefExoticComponent<TitleProps & react202.RefAttributes<HTMLHeadingElement>>;
|
|
8
8
|
//#endregion
|
|
9
9
|
export { Title };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime11 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/organisms/Status/collections/BadRequest.d.ts
|
|
4
4
|
interface BadRequestProps {
|
|
@@ -12,6 +12,6 @@ declare const BadRequest: ({
|
|
|
12
12
|
redirectFallbackUrl,
|
|
13
13
|
onBackClick,
|
|
14
14
|
hideBackButton
|
|
15
|
-
}: BadRequestProps) =>
|
|
15
|
+
}: BadRequestProps) => react_jsx_runtime11.JSX.Element;
|
|
16
16
|
//#endregion
|
|
17
17
|
export { BadRequest };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime12 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/organisms/Status/collections/GenericError.d.ts
|
|
4
4
|
interface GenericErrorProps {
|
|
@@ -14,6 +14,6 @@ declare const GenericError: ({
|
|
|
14
14
|
redirectFallbackUrl,
|
|
15
15
|
onBackClick,
|
|
16
16
|
hideBackButton
|
|
17
|
-
}: GenericErrorProps) =>
|
|
17
|
+
}: GenericErrorProps) => react_jsx_runtime12.JSX.Element;
|
|
18
18
|
//#endregion
|
|
19
19
|
export { GenericError };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime8 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/organisms/Status/collections/MissingPermissions.d.ts
|
|
4
4
|
interface MissingPermissionsProps {
|
|
@@ -14,6 +14,6 @@ declare const MissingPermissions: ({
|
|
|
14
14
|
redirectFallbackUrl,
|
|
15
15
|
onBackClick,
|
|
16
16
|
hideBackButton
|
|
17
|
-
}: MissingPermissionsProps) =>
|
|
17
|
+
}: MissingPermissionsProps) => react_jsx_runtime8.JSX.Element;
|
|
18
18
|
//#endregion
|
|
19
19
|
export { MissingPermissions };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime9 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/organisms/Status/collections/PageNotFound.d.ts
|
|
4
4
|
interface PageNotFoundProps {
|
|
@@ -12,6 +12,6 @@ declare const PageNotFound: ({
|
|
|
12
12
|
redirectFallbackUrl,
|
|
13
13
|
onBackClick,
|
|
14
14
|
hideBackButton
|
|
15
|
-
}: PageNotFoundProps) =>
|
|
15
|
+
}: PageNotFoundProps) => react_jsx_runtime9.JSX.Element;
|
|
16
16
|
//#endregion
|
|
17
17
|
export { PageNotFound };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime10 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/organisms/Status/collections/ServerError.d.ts
|
|
4
4
|
interface ServerErrorProps {
|
|
@@ -12,6 +12,6 @@ declare const ServerError: ({
|
|
|
12
12
|
redirectFallbackUrl,
|
|
13
13
|
onBackClick,
|
|
14
14
|
hideBackButton
|
|
15
|
-
}: ServerErrorProps) =>
|
|
15
|
+
}: ServerErrorProps) => react_jsx_runtime10.JSX.Element;
|
|
16
16
|
//#endregion
|
|
17
17
|
export { ServerError };
|