unifyedx-storybook-new 0.1.32 → 0.1.34
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import require$$1, { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
2
|
-
import * as React
|
|
2
|
+
import * as React from 'react';
|
|
3
3
|
import React__default, { forwardRef, createElement, useState, useMemo, useId as useId$1, createContext, useContext, useCallback, useRef, useLayoutEffect, useEffect, Fragment as Fragment$1, useImperativeHandle, memo, useReducer } from 'react';
|
|
4
|
-
import { Popover as Popover$1, PopoverButton, PopoverPanel, Transition, Dialog, TransitionChild, DialogPanel, DialogTitle, TabGroup, TabList, Tab, TabPanels, RadioGroup as RadioGroup$1, Listbox, ListboxButton, ListboxOptions, ListboxOption, SwitchGroup, Switch, Menu as Menu$1, MenuButton, Portal, MenuItems, MenuItem } from '@headlessui/react';
|
|
4
|
+
import { Popover as Popover$1, PopoverButton, PopoverPanel, Transition, Dialog, TransitionChild, DialogPanel, DialogTitle, TabGroup, TabList, Tab, TabPanels, RadioGroup as RadioGroup$1, Listbox, ListboxButton, ListboxOptions, ListboxOption, SwitchGroup, Switch, Menu as Menu$1, MenuButton, Portal, MenuItems, MenuItem, DialogBackdrop } from '@headlessui/react';
|
|
5
5
|
import { motion, AnimatePresence } from 'framer-motion';
|
|
6
6
|
import { useFloating, offset as offset$2, flip as flip$2, shift as shift$2, autoUpdate as autoUpdate$1, useClick, useDismiss, useInteractions, FloatingPortal } from '@floating-ui/react';
|
|
7
7
|
import { unstable_batchedUpdates, createPortal } from 'react-dom';
|
|
@@ -600,11 +600,37 @@ var classnamesExports = requireClassnames();
|
|
|
600
600
|
const classNames$1 = /*@__PURE__*/getDefaultExportFromCjs(classnamesExports);
|
|
601
601
|
|
|
602
602
|
// Helper function to generate a random pastel color
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
603
|
+
|
|
604
|
+
const fnv1a = (str) => {
|
|
605
|
+
let h = 0x811c9dc5;
|
|
606
|
+
for (let i = 0; i < str.length; i++) {
|
|
607
|
+
h ^= str.charCodeAt(i);
|
|
608
|
+
h += (h << 1) + (h << 4) + (h << 7) + (h << 8) + (h << 24); // *16777619
|
|
609
|
+
}
|
|
610
|
+
// >>> 0 to force unsigned
|
|
611
|
+
return h >>> 0;
|
|
612
|
+
};
|
|
613
|
+
|
|
614
|
+
const generatePastelColor = (word) => {
|
|
615
|
+
console.log(word, 'checking word');
|
|
616
|
+
const w = (word ?? "").trim().toLowerCase();
|
|
617
|
+
|
|
618
|
+
// Pull out any trailing number (e.g., "Unifyed3" -> 3)
|
|
619
|
+
const suffixNum = parseInt((w.match(/\d+$/) ?? [0])[0], 10) || 0;
|
|
620
|
+
|
|
621
|
+
// Base hash
|
|
622
|
+
const hash = fnv1a(w);
|
|
623
|
+
|
|
624
|
+
// Distribute across channels and offset by numeric suffix
|
|
625
|
+
const hue = (hash % 360 + 37 * suffixNum) % 360; // 37 is coprime with 360
|
|
626
|
+
const sat = 55 + ((hash >>> 8) % 20); // 55–74%
|
|
627
|
+
const lightText = 30 + ((hash >>> 16) % 10); // 30–39% (text)
|
|
628
|
+
const lightBg = 86 + ((hash >>> 24) % 8); // 86–93% (pastel bg)
|
|
629
|
+
|
|
630
|
+
const backgroundColor = `hsl(${hue}, ${sat}%, ${lightBg}%)`;
|
|
631
|
+
const color = `hsl(${hue}, ${sat}%, ${lightText}%)`;
|
|
632
|
+
|
|
633
|
+
return { bg: backgroundColor, text: color };
|
|
608
634
|
};
|
|
609
635
|
|
|
610
636
|
const getInitials = (name = "") => {
|
|
@@ -623,7 +649,7 @@ const Avatar = ({
|
|
|
623
649
|
...props
|
|
624
650
|
}) => {
|
|
625
651
|
const [hasError, setHasError] = useState(false);
|
|
626
|
-
const randomColors = useMemo(() => generatePastelColor(), []);
|
|
652
|
+
const randomColors = useMemo(() => generatePastelColor(name), []);
|
|
627
653
|
const showImage = src && !hasError;
|
|
628
654
|
const showInitials = !showImage && name;
|
|
629
655
|
const showIcon = !showImage && !name;
|
|
@@ -39656,25 +39682,32 @@ const GenericFilter = ({
|
|
|
39656
39682
|
) }),
|
|
39657
39683
|
/* @__PURE__ */ jsxs("div", { className: "filter-footer", children: [
|
|
39658
39684
|
/* @__PURE__ */ jsx(
|
|
39659
|
-
|
|
39685
|
+
UnifyedCoreButton,
|
|
39660
39686
|
{
|
|
39661
|
-
|
|
39687
|
+
"data-testid": "cancel-button",
|
|
39688
|
+
label: "Cancel",
|
|
39689
|
+
loader: false,
|
|
39690
|
+
ariaLabel: "Cancel Button",
|
|
39662
39691
|
onClick: onClose,
|
|
39663
|
-
|
|
39664
|
-
children: "Cancel"
|
|
39692
|
+
category: "secondary"
|
|
39665
39693
|
}
|
|
39666
39694
|
),
|
|
39667
|
-
/* @__PURE__ */
|
|
39668
|
-
|
|
39695
|
+
/* @__PURE__ */ jsx(
|
|
39696
|
+
UnifyedCoreButton,
|
|
39669
39697
|
{
|
|
39670
|
-
|
|
39671
|
-
disabled: !formik.dirty,
|
|
39672
|
-
className: "filter-button apply",
|
|
39673
|
-
children: [
|
|
39698
|
+
label: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
39674
39699
|
"Apply Filters",
|
|
39675
39700
|
" ",
|
|
39676
39701
|
activeFilterCount > 0 ? `(${activeFilterCount})` : ""
|
|
39677
|
-
]
|
|
39702
|
+
] }),
|
|
39703
|
+
loader: false,
|
|
39704
|
+
type: "submit",
|
|
39705
|
+
ariaLabel: "Apply Filter",
|
|
39706
|
+
className: "p-3 primaryButton !w-[70px]",
|
|
39707
|
+
"data-testid": "apply-filter",
|
|
39708
|
+
onClick: () => primaryAction?.onSubmit(),
|
|
39709
|
+
category: "primary",
|
|
39710
|
+
disabled: !formik.dirty
|
|
39678
39711
|
}
|
|
39679
39712
|
)
|
|
39680
39713
|
] })
|
|
@@ -39746,8 +39779,10 @@ const Modal = ({
|
|
|
39746
39779
|
// For the description/body content
|
|
39747
39780
|
primaryButtonText = "Confirm",
|
|
39748
39781
|
secondaryButtonText = "Cancel",
|
|
39749
|
-
variant = "info"
|
|
39782
|
+
variant = "info",
|
|
39750
39783
|
// 'info', 'warning', 'delete'
|
|
39784
|
+
loading = false,
|
|
39785
|
+
buttonProps = {}
|
|
39751
39786
|
}) => {
|
|
39752
39787
|
const config = variantConfig[variant] || variantConfig.info;
|
|
39753
39788
|
const Icon = config.icon;
|
|
@@ -39802,7 +39837,8 @@ const Modal = ({
|
|
|
39802
39837
|
UnifyedCoreButton,
|
|
39803
39838
|
{
|
|
39804
39839
|
onClick: handlePrimaryClick,
|
|
39805
|
-
label: primaryButtonText
|
|
39840
|
+
label: primaryButtonText,
|
|
39841
|
+
...buttonProps
|
|
39806
39842
|
}
|
|
39807
39843
|
)
|
|
39808
39844
|
] })
|
|
@@ -42683,9 +42719,9 @@ const Tooltip = ({
|
|
|
42683
42719
|
// For external styling of the tooltip itself
|
|
42684
42720
|
...props
|
|
42685
42721
|
}) => {
|
|
42686
|
-
const tooltipId =
|
|
42722
|
+
const tooltipId = React__default.useId();
|
|
42687
42723
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
42688
|
-
|
|
42724
|
+
React__default.cloneElement(children, { "data-tooltip-id": tooltipId }),
|
|
42689
42725
|
/* @__PURE__ */ jsx(
|
|
42690
42726
|
M,
|
|
42691
42727
|
{
|
|
@@ -42941,7 +42977,7 @@ const OptionsMenu = ({
|
|
|
42941
42977
|
"button",
|
|
42942
42978
|
{
|
|
42943
42979
|
onClick: () => onSelect(option),
|
|
42944
|
-
className: `options-menu-item ${active ? "active" : ""}`,
|
|
42980
|
+
className: `options-menu-item ${active ? "active bg-gray-200 text-gray-900" : ""}`,
|
|
42945
42981
|
disabled: option.disabled,
|
|
42946
42982
|
children: [
|
|
42947
42983
|
option.icon && /* @__PURE__ */ jsx("span", { className: "item-icon", children: option.icon }),
|
|
@@ -42962,7 +42998,7 @@ function CheckIcon({
|
|
|
42962
42998
|
titleId,
|
|
42963
42999
|
...props
|
|
42964
43000
|
}, svgRef) {
|
|
42965
|
-
return /*#__PURE__*/React
|
|
43001
|
+
return /*#__PURE__*/React.createElement("svg", Object.assign({
|
|
42966
43002
|
xmlns: "http://www.w3.org/2000/svg",
|
|
42967
43003
|
viewBox: "0 0 24 24",
|
|
42968
43004
|
fill: "currentColor",
|
|
@@ -42970,22 +43006,22 @@ function CheckIcon({
|
|
|
42970
43006
|
"data-slot": "icon",
|
|
42971
43007
|
ref: svgRef,
|
|
42972
43008
|
"aria-labelledby": titleId
|
|
42973
|
-
}, props), title ? /*#__PURE__*/React
|
|
43009
|
+
}, props), title ? /*#__PURE__*/React.createElement("title", {
|
|
42974
43010
|
id: titleId
|
|
42975
|
-
}, title) : null, /*#__PURE__*/React
|
|
43011
|
+
}, title) : null, /*#__PURE__*/React.createElement("path", {
|
|
42976
43012
|
fillRule: "evenodd",
|
|
42977
43013
|
d: "M19.916 4.626a.75.75 0 0 1 .208 1.04l-9 13.5a.75.75 0 0 1-1.154.114l-6-6a.75.75 0 0 1 1.06-1.06l5.353 5.353 8.493-12.74a.75.75 0 0 1 1.04-.207Z",
|
|
42978
43014
|
clipRule: "evenodd"
|
|
42979
43015
|
}));
|
|
42980
43016
|
}
|
|
42981
|
-
const ForwardRef$b = /*#__PURE__*/ React
|
|
43017
|
+
const ForwardRef$b = /*#__PURE__*/ React.forwardRef(CheckIcon);
|
|
42982
43018
|
|
|
42983
43019
|
function ChevronLeftIcon({
|
|
42984
43020
|
title,
|
|
42985
43021
|
titleId,
|
|
42986
43022
|
...props
|
|
42987
43023
|
}, svgRef) {
|
|
42988
|
-
return /*#__PURE__*/React
|
|
43024
|
+
return /*#__PURE__*/React.createElement("svg", Object.assign({
|
|
42989
43025
|
xmlns: "http://www.w3.org/2000/svg",
|
|
42990
43026
|
viewBox: "0 0 24 24",
|
|
42991
43027
|
fill: "currentColor",
|
|
@@ -42993,22 +43029,22 @@ function ChevronLeftIcon({
|
|
|
42993
43029
|
"data-slot": "icon",
|
|
42994
43030
|
ref: svgRef,
|
|
42995
43031
|
"aria-labelledby": titleId
|
|
42996
|
-
}, props), title ? /*#__PURE__*/React
|
|
43032
|
+
}, props), title ? /*#__PURE__*/React.createElement("title", {
|
|
42997
43033
|
id: titleId
|
|
42998
|
-
}, title) : null, /*#__PURE__*/React
|
|
43034
|
+
}, title) : null, /*#__PURE__*/React.createElement("path", {
|
|
42999
43035
|
fillRule: "evenodd",
|
|
43000
43036
|
d: "M7.72 12.53a.75.75 0 0 1 0-1.06l7.5-7.5a.75.75 0 1 1 1.06 1.06L9.31 12l6.97 6.97a.75.75 0 1 1-1.06 1.06l-7.5-7.5Z",
|
|
43001
43037
|
clipRule: "evenodd"
|
|
43002
43038
|
}));
|
|
43003
43039
|
}
|
|
43004
|
-
const ForwardRef$a = /*#__PURE__*/ React
|
|
43040
|
+
const ForwardRef$a = /*#__PURE__*/ React.forwardRef(ChevronLeftIcon);
|
|
43005
43041
|
|
|
43006
43042
|
function ChevronUpDownIcon({
|
|
43007
43043
|
title,
|
|
43008
43044
|
titleId,
|
|
43009
43045
|
...props
|
|
43010
43046
|
}, svgRef) {
|
|
43011
|
-
return /*#__PURE__*/React
|
|
43047
|
+
return /*#__PURE__*/React.createElement("svg", Object.assign({
|
|
43012
43048
|
xmlns: "http://www.w3.org/2000/svg",
|
|
43013
43049
|
viewBox: "0 0 24 24",
|
|
43014
43050
|
fill: "currentColor",
|
|
@@ -43016,22 +43052,22 @@ function ChevronUpDownIcon({
|
|
|
43016
43052
|
"data-slot": "icon",
|
|
43017
43053
|
ref: svgRef,
|
|
43018
43054
|
"aria-labelledby": titleId
|
|
43019
|
-
}, props), title ? /*#__PURE__*/React
|
|
43055
|
+
}, props), title ? /*#__PURE__*/React.createElement("title", {
|
|
43020
43056
|
id: titleId
|
|
43021
|
-
}, title) : null, /*#__PURE__*/React
|
|
43057
|
+
}, title) : null, /*#__PURE__*/React.createElement("path", {
|
|
43022
43058
|
fillRule: "evenodd",
|
|
43023
43059
|
d: "M11.47 4.72a.75.75 0 0 1 1.06 0l3.75 3.75a.75.75 0 0 1-1.06 1.06L12 6.31 8.78 9.53a.75.75 0 0 1-1.06-1.06l3.75-3.75Zm-3.75 9.75a.75.75 0 0 1 1.06 0L12 17.69l3.22-3.22a.75.75 0 1 1 1.06 1.06l-3.75 3.75a.75.75 0 0 1-1.06 0l-3.75-3.75a.75.75 0 0 1 0-1.06Z",
|
|
43024
43060
|
clipRule: "evenodd"
|
|
43025
43061
|
}));
|
|
43026
43062
|
}
|
|
43027
|
-
const ForwardRef$9 = /*#__PURE__*/ React
|
|
43063
|
+
const ForwardRef$9 = /*#__PURE__*/ React.forwardRef(ChevronUpDownIcon);
|
|
43028
43064
|
|
|
43029
43065
|
function EyeIcon({
|
|
43030
43066
|
title,
|
|
43031
43067
|
titleId,
|
|
43032
43068
|
...props
|
|
43033
43069
|
}, svgRef) {
|
|
43034
|
-
return /*#__PURE__*/React
|
|
43070
|
+
return /*#__PURE__*/React.createElement("svg", Object.assign({
|
|
43035
43071
|
xmlns: "http://www.w3.org/2000/svg",
|
|
43036
43072
|
viewBox: "0 0 24 24",
|
|
43037
43073
|
fill: "currentColor",
|
|
@@ -43039,24 +43075,24 @@ function EyeIcon({
|
|
|
43039
43075
|
"data-slot": "icon",
|
|
43040
43076
|
ref: svgRef,
|
|
43041
43077
|
"aria-labelledby": titleId
|
|
43042
|
-
}, props), title ? /*#__PURE__*/React
|
|
43078
|
+
}, props), title ? /*#__PURE__*/React.createElement("title", {
|
|
43043
43079
|
id: titleId
|
|
43044
|
-
}, title) : null, /*#__PURE__*/React
|
|
43080
|
+
}, title) : null, /*#__PURE__*/React.createElement("path", {
|
|
43045
43081
|
d: "M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z"
|
|
43046
|
-
}), /*#__PURE__*/React
|
|
43082
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
43047
43083
|
fillRule: "evenodd",
|
|
43048
43084
|
d: "M1.323 11.447C2.811 6.976 7.028 3.75 12.001 3.75c4.97 0 9.185 3.223 10.675 7.69.12.362.12.752 0 1.113-1.487 4.471-5.705 7.697-10.677 7.697-4.97 0-9.186-3.223-10.675-7.69a1.762 1.762 0 0 1 0-1.113ZM17.25 12a5.25 5.25 0 1 1-10.5 0 5.25 5.25 0 0 1 10.5 0Z",
|
|
43049
43085
|
clipRule: "evenodd"
|
|
43050
43086
|
}));
|
|
43051
43087
|
}
|
|
43052
|
-
const ForwardRef$8 = /*#__PURE__*/ React
|
|
43088
|
+
const ForwardRef$8 = /*#__PURE__*/ React.forwardRef(EyeIcon);
|
|
43053
43089
|
|
|
43054
43090
|
function LinkIcon({
|
|
43055
43091
|
title,
|
|
43056
43092
|
titleId,
|
|
43057
43093
|
...props
|
|
43058
43094
|
}, svgRef) {
|
|
43059
|
-
return /*#__PURE__*/React
|
|
43095
|
+
return /*#__PURE__*/React.createElement("svg", Object.assign({
|
|
43060
43096
|
xmlns: "http://www.w3.org/2000/svg",
|
|
43061
43097
|
viewBox: "0 0 24 24",
|
|
43062
43098
|
fill: "currentColor",
|
|
@@ -43064,22 +43100,22 @@ function LinkIcon({
|
|
|
43064
43100
|
"data-slot": "icon",
|
|
43065
43101
|
ref: svgRef,
|
|
43066
43102
|
"aria-labelledby": titleId
|
|
43067
|
-
}, props), title ? /*#__PURE__*/React
|
|
43103
|
+
}, props), title ? /*#__PURE__*/React.createElement("title", {
|
|
43068
43104
|
id: titleId
|
|
43069
|
-
}, title) : null, /*#__PURE__*/React
|
|
43105
|
+
}, title) : null, /*#__PURE__*/React.createElement("path", {
|
|
43070
43106
|
fillRule: "evenodd",
|
|
43071
43107
|
d: "M19.902 4.098a3.75 3.75 0 0 0-5.304 0l-4.5 4.5a3.75 3.75 0 0 0 1.035 6.037.75.75 0 0 1-.646 1.353 5.25 5.25 0 0 1-1.449-8.45l4.5-4.5a5.25 5.25 0 1 1 7.424 7.424l-1.757 1.757a.75.75 0 1 1-1.06-1.06l1.757-1.757a3.75 3.75 0 0 0 0-5.304Zm-7.389 4.267a.75.75 0 0 1 1-.353 5.25 5.25 0 0 1 1.449 8.45l-4.5 4.5a5.25 5.25 0 1 1-7.424-7.424l1.757-1.757a.75.75 0 1 1 1.06 1.06l-1.757 1.757a3.75 3.75 0 1 0 5.304 5.304l4.5-4.5a3.75 3.75 0 0 0-1.035-6.037.75.75 0 0 1-.354-1Z",
|
|
43072
43108
|
clipRule: "evenodd"
|
|
43073
43109
|
}));
|
|
43074
43110
|
}
|
|
43075
|
-
const ForwardRef$7 = /*#__PURE__*/ React
|
|
43111
|
+
const ForwardRef$7 = /*#__PURE__*/ React.forwardRef(LinkIcon);
|
|
43076
43112
|
|
|
43077
43113
|
function PencilSquareIcon({
|
|
43078
43114
|
title,
|
|
43079
43115
|
titleId,
|
|
43080
43116
|
...props
|
|
43081
43117
|
}, svgRef) {
|
|
43082
|
-
return /*#__PURE__*/React
|
|
43118
|
+
return /*#__PURE__*/React.createElement("svg", Object.assign({
|
|
43083
43119
|
xmlns: "http://www.w3.org/2000/svg",
|
|
43084
43120
|
viewBox: "0 0 24 24",
|
|
43085
43121
|
fill: "currentColor",
|
|
@@ -43087,22 +43123,22 @@ function PencilSquareIcon({
|
|
|
43087
43123
|
"data-slot": "icon",
|
|
43088
43124
|
ref: svgRef,
|
|
43089
43125
|
"aria-labelledby": titleId
|
|
43090
|
-
}, props), title ? /*#__PURE__*/React
|
|
43126
|
+
}, props), title ? /*#__PURE__*/React.createElement("title", {
|
|
43091
43127
|
id: titleId
|
|
43092
|
-
}, title) : null, /*#__PURE__*/React
|
|
43128
|
+
}, title) : null, /*#__PURE__*/React.createElement("path", {
|
|
43093
43129
|
d: "M21.731 2.269a2.625 2.625 0 0 0-3.712 0l-1.157 1.157 3.712 3.712 1.157-1.157a2.625 2.625 0 0 0 0-3.712ZM19.513 8.199l-3.712-3.712-8.4 8.4a5.25 5.25 0 0 0-1.32 2.214l-.8 2.685a.75.75 0 0 0 .933.933l2.685-.8a5.25 5.25 0 0 0 2.214-1.32l8.4-8.4Z"
|
|
43094
|
-
}), /*#__PURE__*/React
|
|
43130
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
43095
43131
|
d: "M5.25 5.25a3 3 0 0 0-3 3v10.5a3 3 0 0 0 3 3h10.5a3 3 0 0 0 3-3V13.5a.75.75 0 0 0-1.5 0v5.25a1.5 1.5 0 0 1-1.5 1.5H5.25a1.5 1.5 0 0 1-1.5-1.5V8.25a1.5 1.5 0 0 1 1.5-1.5h5.25a.75.75 0 0 0 0-1.5H5.25Z"
|
|
43096
43132
|
}));
|
|
43097
43133
|
}
|
|
43098
|
-
const ForwardRef$6 = /*#__PURE__*/ React
|
|
43134
|
+
const ForwardRef$6 = /*#__PURE__*/ React.forwardRef(PencilSquareIcon);
|
|
43099
43135
|
|
|
43100
43136
|
function ShieldCheckIcon({
|
|
43101
43137
|
title,
|
|
43102
43138
|
titleId,
|
|
43103
43139
|
...props
|
|
43104
43140
|
}, svgRef) {
|
|
43105
|
-
return /*#__PURE__*/React
|
|
43141
|
+
return /*#__PURE__*/React.createElement("svg", Object.assign({
|
|
43106
43142
|
xmlns: "http://www.w3.org/2000/svg",
|
|
43107
43143
|
viewBox: "0 0 24 24",
|
|
43108
43144
|
fill: "currentColor",
|
|
@@ -43110,22 +43146,22 @@ function ShieldCheckIcon({
|
|
|
43110
43146
|
"data-slot": "icon",
|
|
43111
43147
|
ref: svgRef,
|
|
43112
43148
|
"aria-labelledby": titleId
|
|
43113
|
-
}, props), title ? /*#__PURE__*/React
|
|
43149
|
+
}, props), title ? /*#__PURE__*/React.createElement("title", {
|
|
43114
43150
|
id: titleId
|
|
43115
|
-
}, title) : null, /*#__PURE__*/React
|
|
43151
|
+
}, title) : null, /*#__PURE__*/React.createElement("path", {
|
|
43116
43152
|
fillRule: "evenodd",
|
|
43117
43153
|
d: "M12.516 2.17a.75.75 0 0 0-1.032 0 11.209 11.209 0 0 1-7.877 3.08.75.75 0 0 0-.722.515A12.74 12.74 0 0 0 2.25 9.75c0 5.942 4.064 10.933 9.563 12.348a.749.749 0 0 0 .374 0c5.499-1.415 9.563-6.406 9.563-12.348 0-1.39-.223-2.73-.635-3.985a.75.75 0 0 0-.722-.516l-.143.001c-2.996 0-5.717-1.17-7.734-3.08Zm3.094 8.016a.75.75 0 1 0-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 0 0-1.06 1.06l2.25 2.25a.75.75 0 0 0 1.14-.094l3.75-5.25Z",
|
|
43118
43154
|
clipRule: "evenodd"
|
|
43119
43155
|
}));
|
|
43120
43156
|
}
|
|
43121
|
-
const ForwardRef$5 = /*#__PURE__*/ React
|
|
43157
|
+
const ForwardRef$5 = /*#__PURE__*/ React.forwardRef(ShieldCheckIcon);
|
|
43122
43158
|
|
|
43123
43159
|
function TrashIcon({
|
|
43124
43160
|
title,
|
|
43125
43161
|
titleId,
|
|
43126
43162
|
...props
|
|
43127
43163
|
}, svgRef) {
|
|
43128
|
-
return /*#__PURE__*/React
|
|
43164
|
+
return /*#__PURE__*/React.createElement("svg", Object.assign({
|
|
43129
43165
|
xmlns: "http://www.w3.org/2000/svg",
|
|
43130
43166
|
viewBox: "0 0 24 24",
|
|
43131
43167
|
fill: "currentColor",
|
|
@@ -43133,22 +43169,22 @@ function TrashIcon({
|
|
|
43133
43169
|
"data-slot": "icon",
|
|
43134
43170
|
ref: svgRef,
|
|
43135
43171
|
"aria-labelledby": titleId
|
|
43136
|
-
}, props), title ? /*#__PURE__*/React
|
|
43172
|
+
}, props), title ? /*#__PURE__*/React.createElement("title", {
|
|
43137
43173
|
id: titleId
|
|
43138
|
-
}, title) : null, /*#__PURE__*/React
|
|
43174
|
+
}, title) : null, /*#__PURE__*/React.createElement("path", {
|
|
43139
43175
|
fillRule: "evenodd",
|
|
43140
43176
|
d: "M16.5 4.478v.227a48.816 48.816 0 0 1 3.878.512.75.75 0 1 1-.256 1.478l-.209-.035-1.005 13.07a3 3 0 0 1-2.991 2.77H8.084a3 3 0 0 1-2.991-2.77L4.087 6.66l-.209.035a.75.75 0 0 1-.256-1.478A48.567 48.567 0 0 1 7.5 4.705v-.227c0-1.564 1.213-2.9 2.816-2.951a52.662 52.662 0 0 1 3.369 0c1.603.051 2.815 1.387 2.815 2.951Zm-6.136-1.452a51.196 51.196 0 0 1 3.273 0C14.39 3.05 15 3.684 15 4.478v.113a49.488 49.488 0 0 0-6 0v-.113c0-.794.609-1.428 1.364-1.452Zm-.355 5.945a.75.75 0 1 0-1.5.058l.347 9a.75.75 0 1 0 1.499-.058l-.346-9Zm5.48.058a.75.75 0 1 0-1.498-.058l-.347 9a.75.75 0 0 0 1.5.058l.345-9Z",
|
|
43141
43177
|
clipRule: "evenodd"
|
|
43142
43178
|
}));
|
|
43143
43179
|
}
|
|
43144
|
-
const ForwardRef$4 = /*#__PURE__*/ React
|
|
43180
|
+
const ForwardRef$4 = /*#__PURE__*/ React.forwardRef(TrashIcon);
|
|
43145
43181
|
|
|
43146
43182
|
function UserCircleIcon({
|
|
43147
43183
|
title,
|
|
43148
43184
|
titleId,
|
|
43149
43185
|
...props
|
|
43150
43186
|
}, svgRef) {
|
|
43151
|
-
return /*#__PURE__*/React
|
|
43187
|
+
return /*#__PURE__*/React.createElement("svg", Object.assign({
|
|
43152
43188
|
xmlns: "http://www.w3.org/2000/svg",
|
|
43153
43189
|
viewBox: "0 0 24 24",
|
|
43154
43190
|
fill: "currentColor",
|
|
@@ -43156,22 +43192,22 @@ function UserCircleIcon({
|
|
|
43156
43192
|
"data-slot": "icon",
|
|
43157
43193
|
ref: svgRef,
|
|
43158
43194
|
"aria-labelledby": titleId
|
|
43159
|
-
}, props), title ? /*#__PURE__*/React
|
|
43195
|
+
}, props), title ? /*#__PURE__*/React.createElement("title", {
|
|
43160
43196
|
id: titleId
|
|
43161
|
-
}, title) : null, /*#__PURE__*/React
|
|
43197
|
+
}, title) : null, /*#__PURE__*/React.createElement("path", {
|
|
43162
43198
|
fillRule: "evenodd",
|
|
43163
43199
|
d: "M18.685 19.097A9.723 9.723 0 0 0 21.75 12c0-5.385-4.365-9.75-9.75-9.75S2.25 6.615 2.25 12a9.723 9.723 0 0 0 3.065 7.097A9.716 9.716 0 0 0 12 21.75a9.716 9.716 0 0 0 6.685-2.653Zm-12.54-1.285A7.486 7.486 0 0 1 12 15a7.486 7.486 0 0 1 5.855 2.812A8.224 8.224 0 0 1 12 20.25a8.224 8.224 0 0 1-5.855-2.438ZM15.75 9a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0Z",
|
|
43164
43200
|
clipRule: "evenodd"
|
|
43165
43201
|
}));
|
|
43166
43202
|
}
|
|
43167
|
-
const ForwardRef$3 = /*#__PURE__*/ React
|
|
43203
|
+
const ForwardRef$3 = /*#__PURE__*/ React.forwardRef(UserCircleIcon);
|
|
43168
43204
|
|
|
43169
43205
|
function UserGroupIcon({
|
|
43170
43206
|
title,
|
|
43171
43207
|
titleId,
|
|
43172
43208
|
...props
|
|
43173
43209
|
}, svgRef) {
|
|
43174
|
-
return /*#__PURE__*/React
|
|
43210
|
+
return /*#__PURE__*/React.createElement("svg", Object.assign({
|
|
43175
43211
|
xmlns: "http://www.w3.org/2000/svg",
|
|
43176
43212
|
viewBox: "0 0 24 24",
|
|
43177
43213
|
fill: "currentColor",
|
|
@@ -43179,24 +43215,24 @@ function UserGroupIcon({
|
|
|
43179
43215
|
"data-slot": "icon",
|
|
43180
43216
|
ref: svgRef,
|
|
43181
43217
|
"aria-labelledby": titleId
|
|
43182
|
-
}, props), title ? /*#__PURE__*/React
|
|
43218
|
+
}, props), title ? /*#__PURE__*/React.createElement("title", {
|
|
43183
43219
|
id: titleId
|
|
43184
|
-
}, title) : null, /*#__PURE__*/React
|
|
43220
|
+
}, title) : null, /*#__PURE__*/React.createElement("path", {
|
|
43185
43221
|
fillRule: "evenodd",
|
|
43186
43222
|
d: "M8.25 6.75a3.75 3.75 0 1 1 7.5 0 3.75 3.75 0 0 1-7.5 0ZM15.75 9.75a3 3 0 1 1 6 0 3 3 0 0 1-6 0ZM2.25 9.75a3 3 0 1 1 6 0 3 3 0 0 1-6 0ZM6.31 15.117A6.745 6.745 0 0 1 12 12a6.745 6.745 0 0 1 6.709 7.498.75.75 0 0 1-.372.568A12.696 12.696 0 0 1 12 21.75c-2.305 0-4.47-.612-6.337-1.684a.75.75 0 0 1-.372-.568 6.787 6.787 0 0 1 1.019-4.38Z",
|
|
43187
43223
|
clipRule: "evenodd"
|
|
43188
|
-
}), /*#__PURE__*/React
|
|
43224
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
43189
43225
|
d: "M5.082 14.254a8.287 8.287 0 0 0-1.308 5.135 9.687 9.687 0 0 1-1.764-.44l-.115-.04a.563.563 0 0 1-.373-.487l-.01-.121a3.75 3.75 0 0 1 3.57-4.047ZM20.226 19.389a8.287 8.287 0 0 0-1.308-5.135 3.75 3.75 0 0 1 3.57 4.047l-.01.121a.563.563 0 0 1-.373.486l-.115.04c-.567.2-1.156.349-1.764.441Z"
|
|
43190
43226
|
}));
|
|
43191
43227
|
}
|
|
43192
|
-
const ForwardRef$2 = /*#__PURE__*/ React
|
|
43228
|
+
const ForwardRef$2 = /*#__PURE__*/ React.forwardRef(UserGroupIcon);
|
|
43193
43229
|
|
|
43194
43230
|
function UsersIcon({
|
|
43195
43231
|
title,
|
|
43196
43232
|
titleId,
|
|
43197
43233
|
...props
|
|
43198
43234
|
}, svgRef) {
|
|
43199
|
-
return /*#__PURE__*/React
|
|
43235
|
+
return /*#__PURE__*/React.createElement("svg", Object.assign({
|
|
43200
43236
|
xmlns: "http://www.w3.org/2000/svg",
|
|
43201
43237
|
viewBox: "0 0 24 24",
|
|
43202
43238
|
fill: "currentColor",
|
|
@@ -43204,20 +43240,20 @@ function UsersIcon({
|
|
|
43204
43240
|
"data-slot": "icon",
|
|
43205
43241
|
ref: svgRef,
|
|
43206
43242
|
"aria-labelledby": titleId
|
|
43207
|
-
}, props), title ? /*#__PURE__*/React
|
|
43243
|
+
}, props), title ? /*#__PURE__*/React.createElement("title", {
|
|
43208
43244
|
id: titleId
|
|
43209
|
-
}, title) : null, /*#__PURE__*/React
|
|
43245
|
+
}, title) : null, /*#__PURE__*/React.createElement("path", {
|
|
43210
43246
|
d: "M4.5 6.375a4.125 4.125 0 1 1 8.25 0 4.125 4.125 0 0 1-8.25 0ZM14.25 8.625a3.375 3.375 0 1 1 6.75 0 3.375 3.375 0 0 1-6.75 0ZM1.5 19.125a7.125 7.125 0 0 1 14.25 0v.003l-.001.119a.75.75 0 0 1-.363.63 13.067 13.067 0 0 1-6.761 1.873c-2.472 0-4.786-.684-6.76-1.873a.75.75 0 0 1-.364-.63l-.001-.122ZM17.25 19.128l-.001.144a2.25 2.25 0 0 1-.233.96 10.088 10.088 0 0 0 5.06-1.01.75.75 0 0 0 .42-.643 4.875 4.875 0 0 0-6.957-4.611 8.586 8.586 0 0 1 1.71 5.157v.003Z"
|
|
43211
43247
|
}));
|
|
43212
43248
|
}
|
|
43213
|
-
const ForwardRef$1 = /*#__PURE__*/ React
|
|
43249
|
+
const ForwardRef$1 = /*#__PURE__*/ React.forwardRef(UsersIcon);
|
|
43214
43250
|
|
|
43215
43251
|
function XMarkIcon({
|
|
43216
43252
|
title,
|
|
43217
43253
|
titleId,
|
|
43218
43254
|
...props
|
|
43219
43255
|
}, svgRef) {
|
|
43220
|
-
return /*#__PURE__*/React
|
|
43256
|
+
return /*#__PURE__*/React.createElement("svg", Object.assign({
|
|
43221
43257
|
xmlns: "http://www.w3.org/2000/svg",
|
|
43222
43258
|
viewBox: "0 0 24 24",
|
|
43223
43259
|
fill: "currentColor",
|
|
@@ -43225,15 +43261,15 @@ function XMarkIcon({
|
|
|
43225
43261
|
"data-slot": "icon",
|
|
43226
43262
|
ref: svgRef,
|
|
43227
43263
|
"aria-labelledby": titleId
|
|
43228
|
-
}, props), title ? /*#__PURE__*/React
|
|
43264
|
+
}, props), title ? /*#__PURE__*/React.createElement("title", {
|
|
43229
43265
|
id: titleId
|
|
43230
|
-
}, title) : null, /*#__PURE__*/React
|
|
43266
|
+
}, title) : null, /*#__PURE__*/React.createElement("path", {
|
|
43231
43267
|
fillRule: "evenodd",
|
|
43232
43268
|
d: "M5.47 5.47a.75.75 0 0 1 1.06 0L12 10.94l5.47-5.47a.75.75 0 1 1 1.06 1.06L13.06 12l5.47 5.47a.75.75 0 1 1-1.06 1.06L12 13.06l-5.47 5.47a.75.75 0 0 1-1.06-1.06L10.94 12 5.47 6.53a.75.75 0 0 1 0-1.06Z",
|
|
43233
43269
|
clipRule: "evenodd"
|
|
43234
43270
|
}));
|
|
43235
43271
|
}
|
|
43236
|
-
const ForwardRef = /*#__PURE__*/ React
|
|
43272
|
+
const ForwardRef = /*#__PURE__*/ React.forwardRef(XMarkIcon);
|
|
43237
43273
|
|
|
43238
43274
|
var isCheckBoxInput = (element) => element.type === 'checkbox';
|
|
43239
43275
|
|
|
@@ -70503,8 +70539,8 @@ function MultiSelect({
|
|
|
70503
70539
|
value: option,
|
|
70504
70540
|
disabled: isDisabled,
|
|
70505
70541
|
className: ({ active }) => classNames(
|
|
70506
|
-
isDisabled ? "text-gray-400
|
|
70507
|
-
"relative
|
|
70542
|
+
isDisabled ? " text-gray-400 bg-white cursor-not-allowed" : active ? " bg-gray-200 text-gray-900" : " text-gray-900",
|
|
70543
|
+
" relative cursor-default select-none py-2 pl-3 pr-9"
|
|
70508
70544
|
),
|
|
70509
70545
|
children: ({ selected: isSel, active }) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
70510
70546
|
/* @__PURE__ */ jsx(
|
|
@@ -70521,8 +70557,8 @@ function MultiSelect({
|
|
|
70521
70557
|
"span",
|
|
70522
70558
|
{
|
|
70523
70559
|
className: classNames(
|
|
70524
|
-
active ? "text-
|
|
70525
|
-
"absolute
|
|
70560
|
+
active ? " text-gray-900" : " text-gray-600",
|
|
70561
|
+
" absolute inset-y-0 right-0 flex items-center pr-4"
|
|
70526
70562
|
),
|
|
70527
70563
|
children: /* @__PURE__ */ jsx(Check, { className: "w-5 h-5", "aria-hidden": "true" })
|
|
70528
70564
|
}
|
|
@@ -70582,6 +70618,93 @@ MultiSelect.defaultProps = {
|
|
|
70582
70618
|
getOptionLabel: (o) => o.name
|
|
70583
70619
|
};
|
|
70584
70620
|
|
|
70621
|
+
const CustomDialog = ({
|
|
70622
|
+
isOpen = false,
|
|
70623
|
+
setIsOpen,
|
|
70624
|
+
content,
|
|
70625
|
+
header = { title: "", customHeader: null, isCrossShow: true },
|
|
70626
|
+
footer = { show: true, customFooter: null },
|
|
70627
|
+
primaryAction = { onSubmit: null, label: "Save", loader: false, disabled: false },
|
|
70628
|
+
secondaryAction = { onCancel: null, label: "Cancel" },
|
|
70629
|
+
dialogPanelClass = ""
|
|
70630
|
+
}) => {
|
|
70631
|
+
const handleBackdropClick = (e) => {
|
|
70632
|
+
if (e.target === e.currentTarget) {
|
|
70633
|
+
setIsOpen(false);
|
|
70634
|
+
}
|
|
70635
|
+
};
|
|
70636
|
+
const handleContentClick = (e) => {
|
|
70637
|
+
e.stopPropagation();
|
|
70638
|
+
};
|
|
70639
|
+
return /* @__PURE__ */ jsxs(
|
|
70640
|
+
Dialog,
|
|
70641
|
+
{
|
|
70642
|
+
open: isOpen,
|
|
70643
|
+
onClose: () => setIsOpen(false),
|
|
70644
|
+
className: "relative z-50 overflow-y-auto",
|
|
70645
|
+
children: [
|
|
70646
|
+
/* @__PURE__ */ jsx(
|
|
70647
|
+
DialogBackdrop,
|
|
70648
|
+
{
|
|
70649
|
+
className: "fixed inset-0 bg-black/30",
|
|
70650
|
+
onClick: handleBackdropClick
|
|
70651
|
+
}
|
|
70652
|
+
),
|
|
70653
|
+
/* @__PURE__ */ jsx("div", { className: "fixed inset-0 overflow-y-auto", children: /* @__PURE__ */ jsx("div", { className: "flex min-h-full items-center justify-center p-4", children: /* @__PURE__ */ jsxs(
|
|
70654
|
+
DialogPanel,
|
|
70655
|
+
{
|
|
70656
|
+
className: `${dialogPanelClass} relative bg-white align-middle w-full lg:w-[36rem] mx-5 lg:mx-0 transform overflow-hidden rounded-2xl text-left shadow-xl lg:min-w-[36rem] md:min-w-96 transition-all`,
|
|
70657
|
+
onClick: handleContentClick,
|
|
70658
|
+
children: [
|
|
70659
|
+
/* @__PURE__ */ jsxs("div", { className: "flex justify-between items-center border-b border-gray-200 p-6 flex-shrink-0", children: [
|
|
70660
|
+
header?.customHeader && header.customHeader,
|
|
70661
|
+
header?.title && !header?.customHeader && /* @__PURE__ */ jsx(DialogTitle, { className: "text-lg font-bold", children: header?.title }),
|
|
70662
|
+
header?.isCrossShow && /* @__PURE__ */ jsx("button", { onClick: () => setIsOpen(false), className: "p-2", children: /* @__PURE__ */ jsx(X, { className: "w-5 h-5" }) })
|
|
70663
|
+
] }),
|
|
70664
|
+
/* @__PURE__ */ jsx(
|
|
70665
|
+
"div",
|
|
70666
|
+
{
|
|
70667
|
+
className: "px-5 mb-5",
|
|
70668
|
+
onClick: handleContentClick,
|
|
70669
|
+
children: content
|
|
70670
|
+
}
|
|
70671
|
+
),
|
|
70672
|
+
footer?.show && !footer?.customFooter && /* @__PURE__ */ jsxs("div", { className: "border-t flex justify-end border-gray-200 p-6 flex-shrink-0", children: [
|
|
70673
|
+
secondaryAction?.onCancel && /* @__PURE__ */ jsx(
|
|
70674
|
+
UnifyedCoreButton,
|
|
70675
|
+
{
|
|
70676
|
+
"data-testid": "cancel-button",
|
|
70677
|
+
label: secondaryAction?.label,
|
|
70678
|
+
loader: false,
|
|
70679
|
+
ariaLabel: "Cancel Button",
|
|
70680
|
+
className: "p-3 mr-3 secondaryButton !w-[70px]",
|
|
70681
|
+
onClick: () => secondaryAction?.onCancel(),
|
|
70682
|
+
category: "secondary"
|
|
70683
|
+
}
|
|
70684
|
+
),
|
|
70685
|
+
primaryAction?.onSubmit && /* @__PURE__ */ jsx(
|
|
70686
|
+
UnifyedCoreButton,
|
|
70687
|
+
{
|
|
70688
|
+
label: primaryAction?.label,
|
|
70689
|
+
loader: primaryAction?.loader,
|
|
70690
|
+
ariaLabel: primaryAction?.label,
|
|
70691
|
+
className: "p-3 primaryButton !w-[70px]",
|
|
70692
|
+
"data-testid": "edit-comment-btn",
|
|
70693
|
+
onClick: () => primaryAction?.onSubmit(),
|
|
70694
|
+
category: "primary",
|
|
70695
|
+
disabled: primaryAction.disabled
|
|
70696
|
+
}
|
|
70697
|
+
)
|
|
70698
|
+
] }),
|
|
70699
|
+
footer?.show && footer?.customFooter && footer?.customFooter
|
|
70700
|
+
]
|
|
70701
|
+
}
|
|
70702
|
+
) }) })
|
|
70703
|
+
]
|
|
70704
|
+
}
|
|
70705
|
+
);
|
|
70706
|
+
};
|
|
70707
|
+
|
|
70585
70708
|
// https://github.com/facebook/react/blob/master/packages/shared/ExecutionEnvironment.js
|
|
70586
70709
|
const canUseDOM = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined';
|
|
70587
70710
|
|
|
@@ -74744,5 +74867,5 @@ function TreeView({
|
|
|
74744
74867
|
] });
|
|
74745
74868
|
}
|
|
74746
74869
|
|
|
74747
|
-
export { AddUserGroupsRolesModal, Avatar, AvatarGroup, Badge, Breadcrumbs, Button$1 as Button, Checkbox, DatePicker, DateRangePicker$1 as DateRangePicker, FileUploadModal, FullScreenLoader, GenericFilter, Input, Modal, MultiSelect, OptionsMenu, PageHeader, PageLayout, Pagination, RadioGroup, SearchBar, Select, Sidebar, Spinner, Textarea, ToggleSwitch, Tooltip, TreeView, UnifyedCoreButton, WizardModal, adGroupsListSearchApi, axiosDelete, axiosGet, axiosPatch, axiosPost, axiosPut, cookies$1 as cookies, createHttpClient, directoryPermissionsApi, filePermissionsApi, gateWayUrl, gatewayBase, getBaseUrl, getSnapshot, http, localStore, myDriveGatewayBaseV2, provisioningBase, rbacBase, searchRolesApi, sessionStore, userSearchBase };
|
|
74870
|
+
export { AddUserGroupsRolesModal, Avatar, AvatarGroup, Badge, Breadcrumbs, Button$1 as Button, Checkbox, CustomDialog, DatePicker, DateRangePicker$1 as DateRangePicker, FileUploadModal, FullScreenLoader, GenericFilter, Input, Modal, MultiSelect, OptionsMenu, PageHeader, PageLayout, Pagination, RadioGroup, SearchBar, Select, Sidebar, Spinner, Textarea, ToggleSwitch, Tooltip, TreeView, UnifyedCoreButton, WizardModal, adGroupsListSearchApi, axiosDelete, axiosGet, axiosPatch, axiosPost, axiosPut, cookies$1 as cookies, createHttpClient, directoryPermissionsApi, filePermissionsApi, gateWayUrl, gatewayBase, getBaseUrl, getSnapshot, http, localStore, myDriveGatewayBaseV2, provisioningBase, rbacBase, searchRolesApi, sessionStore, userSearchBase };
|
|
74748
74871
|
//# sourceMappingURL=unifyedx-storybook-new.es.js.map
|