unifyedx-storybook-new 0.1.33 → 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
|
] })
|
|
@@ -42686,9 +42719,9 @@ const Tooltip = ({
|
|
|
42686
42719
|
// For external styling of the tooltip itself
|
|
42687
42720
|
...props
|
|
42688
42721
|
}) => {
|
|
42689
|
-
const tooltipId =
|
|
42722
|
+
const tooltipId = React__default.useId();
|
|
42690
42723
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
42691
|
-
|
|
42724
|
+
React__default.cloneElement(children, { "data-tooltip-id": tooltipId }),
|
|
42692
42725
|
/* @__PURE__ */ jsx(
|
|
42693
42726
|
M,
|
|
42694
42727
|
{
|
|
@@ -42944,7 +42977,7 @@ const OptionsMenu = ({
|
|
|
42944
42977
|
"button",
|
|
42945
42978
|
{
|
|
42946
42979
|
onClick: () => onSelect(option),
|
|
42947
|
-
className: `options-menu-item ${active ? "active" : ""}`,
|
|
42980
|
+
className: `options-menu-item ${active ? "active bg-gray-200 text-gray-900" : ""}`,
|
|
42948
42981
|
disabled: option.disabled,
|
|
42949
42982
|
children: [
|
|
42950
42983
|
option.icon && /* @__PURE__ */ jsx("span", { className: "item-icon", children: option.icon }),
|
|
@@ -42965,7 +42998,7 @@ function CheckIcon({
|
|
|
42965
42998
|
titleId,
|
|
42966
42999
|
...props
|
|
42967
43000
|
}, svgRef) {
|
|
42968
|
-
return /*#__PURE__*/React
|
|
43001
|
+
return /*#__PURE__*/React.createElement("svg", Object.assign({
|
|
42969
43002
|
xmlns: "http://www.w3.org/2000/svg",
|
|
42970
43003
|
viewBox: "0 0 24 24",
|
|
42971
43004
|
fill: "currentColor",
|
|
@@ -42973,22 +43006,22 @@ function CheckIcon({
|
|
|
42973
43006
|
"data-slot": "icon",
|
|
42974
43007
|
ref: svgRef,
|
|
42975
43008
|
"aria-labelledby": titleId
|
|
42976
|
-
}, props), title ? /*#__PURE__*/React
|
|
43009
|
+
}, props), title ? /*#__PURE__*/React.createElement("title", {
|
|
42977
43010
|
id: titleId
|
|
42978
|
-
}, title) : null, /*#__PURE__*/React
|
|
43011
|
+
}, title) : null, /*#__PURE__*/React.createElement("path", {
|
|
42979
43012
|
fillRule: "evenodd",
|
|
42980
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",
|
|
42981
43014
|
clipRule: "evenodd"
|
|
42982
43015
|
}));
|
|
42983
43016
|
}
|
|
42984
|
-
const ForwardRef$b = /*#__PURE__*/ React
|
|
43017
|
+
const ForwardRef$b = /*#__PURE__*/ React.forwardRef(CheckIcon);
|
|
42985
43018
|
|
|
42986
43019
|
function ChevronLeftIcon({
|
|
42987
43020
|
title,
|
|
42988
43021
|
titleId,
|
|
42989
43022
|
...props
|
|
42990
43023
|
}, svgRef) {
|
|
42991
|
-
return /*#__PURE__*/React
|
|
43024
|
+
return /*#__PURE__*/React.createElement("svg", Object.assign({
|
|
42992
43025
|
xmlns: "http://www.w3.org/2000/svg",
|
|
42993
43026
|
viewBox: "0 0 24 24",
|
|
42994
43027
|
fill: "currentColor",
|
|
@@ -42996,22 +43029,22 @@ function ChevronLeftIcon({
|
|
|
42996
43029
|
"data-slot": "icon",
|
|
42997
43030
|
ref: svgRef,
|
|
42998
43031
|
"aria-labelledby": titleId
|
|
42999
|
-
}, props), title ? /*#__PURE__*/React
|
|
43032
|
+
}, props), title ? /*#__PURE__*/React.createElement("title", {
|
|
43000
43033
|
id: titleId
|
|
43001
|
-
}, title) : null, /*#__PURE__*/React
|
|
43034
|
+
}, title) : null, /*#__PURE__*/React.createElement("path", {
|
|
43002
43035
|
fillRule: "evenodd",
|
|
43003
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",
|
|
43004
43037
|
clipRule: "evenodd"
|
|
43005
43038
|
}));
|
|
43006
43039
|
}
|
|
43007
|
-
const ForwardRef$a = /*#__PURE__*/ React
|
|
43040
|
+
const ForwardRef$a = /*#__PURE__*/ React.forwardRef(ChevronLeftIcon);
|
|
43008
43041
|
|
|
43009
43042
|
function ChevronUpDownIcon({
|
|
43010
43043
|
title,
|
|
43011
43044
|
titleId,
|
|
43012
43045
|
...props
|
|
43013
43046
|
}, svgRef) {
|
|
43014
|
-
return /*#__PURE__*/React
|
|
43047
|
+
return /*#__PURE__*/React.createElement("svg", Object.assign({
|
|
43015
43048
|
xmlns: "http://www.w3.org/2000/svg",
|
|
43016
43049
|
viewBox: "0 0 24 24",
|
|
43017
43050
|
fill: "currentColor",
|
|
@@ -43019,22 +43052,22 @@ function ChevronUpDownIcon({
|
|
|
43019
43052
|
"data-slot": "icon",
|
|
43020
43053
|
ref: svgRef,
|
|
43021
43054
|
"aria-labelledby": titleId
|
|
43022
|
-
}, props), title ? /*#__PURE__*/React
|
|
43055
|
+
}, props), title ? /*#__PURE__*/React.createElement("title", {
|
|
43023
43056
|
id: titleId
|
|
43024
|
-
}, title) : null, /*#__PURE__*/React
|
|
43057
|
+
}, title) : null, /*#__PURE__*/React.createElement("path", {
|
|
43025
43058
|
fillRule: "evenodd",
|
|
43026
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",
|
|
43027
43060
|
clipRule: "evenodd"
|
|
43028
43061
|
}));
|
|
43029
43062
|
}
|
|
43030
|
-
const ForwardRef$9 = /*#__PURE__*/ React
|
|
43063
|
+
const ForwardRef$9 = /*#__PURE__*/ React.forwardRef(ChevronUpDownIcon);
|
|
43031
43064
|
|
|
43032
43065
|
function EyeIcon({
|
|
43033
43066
|
title,
|
|
43034
43067
|
titleId,
|
|
43035
43068
|
...props
|
|
43036
43069
|
}, svgRef) {
|
|
43037
|
-
return /*#__PURE__*/React
|
|
43070
|
+
return /*#__PURE__*/React.createElement("svg", Object.assign({
|
|
43038
43071
|
xmlns: "http://www.w3.org/2000/svg",
|
|
43039
43072
|
viewBox: "0 0 24 24",
|
|
43040
43073
|
fill: "currentColor",
|
|
@@ -43042,24 +43075,24 @@ function EyeIcon({
|
|
|
43042
43075
|
"data-slot": "icon",
|
|
43043
43076
|
ref: svgRef,
|
|
43044
43077
|
"aria-labelledby": titleId
|
|
43045
|
-
}, props), title ? /*#__PURE__*/React
|
|
43078
|
+
}, props), title ? /*#__PURE__*/React.createElement("title", {
|
|
43046
43079
|
id: titleId
|
|
43047
|
-
}, title) : null, /*#__PURE__*/React
|
|
43080
|
+
}, title) : null, /*#__PURE__*/React.createElement("path", {
|
|
43048
43081
|
d: "M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z"
|
|
43049
|
-
}), /*#__PURE__*/React
|
|
43082
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
43050
43083
|
fillRule: "evenodd",
|
|
43051
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",
|
|
43052
43085
|
clipRule: "evenodd"
|
|
43053
43086
|
}));
|
|
43054
43087
|
}
|
|
43055
|
-
const ForwardRef$8 = /*#__PURE__*/ React
|
|
43088
|
+
const ForwardRef$8 = /*#__PURE__*/ React.forwardRef(EyeIcon);
|
|
43056
43089
|
|
|
43057
43090
|
function LinkIcon({
|
|
43058
43091
|
title,
|
|
43059
43092
|
titleId,
|
|
43060
43093
|
...props
|
|
43061
43094
|
}, svgRef) {
|
|
43062
|
-
return /*#__PURE__*/React
|
|
43095
|
+
return /*#__PURE__*/React.createElement("svg", Object.assign({
|
|
43063
43096
|
xmlns: "http://www.w3.org/2000/svg",
|
|
43064
43097
|
viewBox: "0 0 24 24",
|
|
43065
43098
|
fill: "currentColor",
|
|
@@ -43067,22 +43100,22 @@ function LinkIcon({
|
|
|
43067
43100
|
"data-slot": "icon",
|
|
43068
43101
|
ref: svgRef,
|
|
43069
43102
|
"aria-labelledby": titleId
|
|
43070
|
-
}, props), title ? /*#__PURE__*/React
|
|
43103
|
+
}, props), title ? /*#__PURE__*/React.createElement("title", {
|
|
43071
43104
|
id: titleId
|
|
43072
|
-
}, title) : null, /*#__PURE__*/React
|
|
43105
|
+
}, title) : null, /*#__PURE__*/React.createElement("path", {
|
|
43073
43106
|
fillRule: "evenodd",
|
|
43074
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",
|
|
43075
43108
|
clipRule: "evenodd"
|
|
43076
43109
|
}));
|
|
43077
43110
|
}
|
|
43078
|
-
const ForwardRef$7 = /*#__PURE__*/ React
|
|
43111
|
+
const ForwardRef$7 = /*#__PURE__*/ React.forwardRef(LinkIcon);
|
|
43079
43112
|
|
|
43080
43113
|
function PencilSquareIcon({
|
|
43081
43114
|
title,
|
|
43082
43115
|
titleId,
|
|
43083
43116
|
...props
|
|
43084
43117
|
}, svgRef) {
|
|
43085
|
-
return /*#__PURE__*/React
|
|
43118
|
+
return /*#__PURE__*/React.createElement("svg", Object.assign({
|
|
43086
43119
|
xmlns: "http://www.w3.org/2000/svg",
|
|
43087
43120
|
viewBox: "0 0 24 24",
|
|
43088
43121
|
fill: "currentColor",
|
|
@@ -43090,22 +43123,22 @@ function PencilSquareIcon({
|
|
|
43090
43123
|
"data-slot": "icon",
|
|
43091
43124
|
ref: svgRef,
|
|
43092
43125
|
"aria-labelledby": titleId
|
|
43093
|
-
}, props), title ? /*#__PURE__*/React
|
|
43126
|
+
}, props), title ? /*#__PURE__*/React.createElement("title", {
|
|
43094
43127
|
id: titleId
|
|
43095
|
-
}, title) : null, /*#__PURE__*/React
|
|
43128
|
+
}, title) : null, /*#__PURE__*/React.createElement("path", {
|
|
43096
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"
|
|
43097
|
-
}), /*#__PURE__*/React
|
|
43130
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
43098
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"
|
|
43099
43132
|
}));
|
|
43100
43133
|
}
|
|
43101
|
-
const ForwardRef$6 = /*#__PURE__*/ React
|
|
43134
|
+
const ForwardRef$6 = /*#__PURE__*/ React.forwardRef(PencilSquareIcon);
|
|
43102
43135
|
|
|
43103
43136
|
function ShieldCheckIcon({
|
|
43104
43137
|
title,
|
|
43105
43138
|
titleId,
|
|
43106
43139
|
...props
|
|
43107
43140
|
}, svgRef) {
|
|
43108
|
-
return /*#__PURE__*/React
|
|
43141
|
+
return /*#__PURE__*/React.createElement("svg", Object.assign({
|
|
43109
43142
|
xmlns: "http://www.w3.org/2000/svg",
|
|
43110
43143
|
viewBox: "0 0 24 24",
|
|
43111
43144
|
fill: "currentColor",
|
|
@@ -43113,22 +43146,22 @@ function ShieldCheckIcon({
|
|
|
43113
43146
|
"data-slot": "icon",
|
|
43114
43147
|
ref: svgRef,
|
|
43115
43148
|
"aria-labelledby": titleId
|
|
43116
|
-
}, props), title ? /*#__PURE__*/React
|
|
43149
|
+
}, props), title ? /*#__PURE__*/React.createElement("title", {
|
|
43117
43150
|
id: titleId
|
|
43118
|
-
}, title) : null, /*#__PURE__*/React
|
|
43151
|
+
}, title) : null, /*#__PURE__*/React.createElement("path", {
|
|
43119
43152
|
fillRule: "evenodd",
|
|
43120
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",
|
|
43121
43154
|
clipRule: "evenodd"
|
|
43122
43155
|
}));
|
|
43123
43156
|
}
|
|
43124
|
-
const ForwardRef$5 = /*#__PURE__*/ React
|
|
43157
|
+
const ForwardRef$5 = /*#__PURE__*/ React.forwardRef(ShieldCheckIcon);
|
|
43125
43158
|
|
|
43126
43159
|
function TrashIcon({
|
|
43127
43160
|
title,
|
|
43128
43161
|
titleId,
|
|
43129
43162
|
...props
|
|
43130
43163
|
}, svgRef) {
|
|
43131
|
-
return /*#__PURE__*/React
|
|
43164
|
+
return /*#__PURE__*/React.createElement("svg", Object.assign({
|
|
43132
43165
|
xmlns: "http://www.w3.org/2000/svg",
|
|
43133
43166
|
viewBox: "0 0 24 24",
|
|
43134
43167
|
fill: "currentColor",
|
|
@@ -43136,22 +43169,22 @@ function TrashIcon({
|
|
|
43136
43169
|
"data-slot": "icon",
|
|
43137
43170
|
ref: svgRef,
|
|
43138
43171
|
"aria-labelledby": titleId
|
|
43139
|
-
}, props), title ? /*#__PURE__*/React
|
|
43172
|
+
}, props), title ? /*#__PURE__*/React.createElement("title", {
|
|
43140
43173
|
id: titleId
|
|
43141
|
-
}, title) : null, /*#__PURE__*/React
|
|
43174
|
+
}, title) : null, /*#__PURE__*/React.createElement("path", {
|
|
43142
43175
|
fillRule: "evenodd",
|
|
43143
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",
|
|
43144
43177
|
clipRule: "evenodd"
|
|
43145
43178
|
}));
|
|
43146
43179
|
}
|
|
43147
|
-
const ForwardRef$4 = /*#__PURE__*/ React
|
|
43180
|
+
const ForwardRef$4 = /*#__PURE__*/ React.forwardRef(TrashIcon);
|
|
43148
43181
|
|
|
43149
43182
|
function UserCircleIcon({
|
|
43150
43183
|
title,
|
|
43151
43184
|
titleId,
|
|
43152
43185
|
...props
|
|
43153
43186
|
}, svgRef) {
|
|
43154
|
-
return /*#__PURE__*/React
|
|
43187
|
+
return /*#__PURE__*/React.createElement("svg", Object.assign({
|
|
43155
43188
|
xmlns: "http://www.w3.org/2000/svg",
|
|
43156
43189
|
viewBox: "0 0 24 24",
|
|
43157
43190
|
fill: "currentColor",
|
|
@@ -43159,22 +43192,22 @@ function UserCircleIcon({
|
|
|
43159
43192
|
"data-slot": "icon",
|
|
43160
43193
|
ref: svgRef,
|
|
43161
43194
|
"aria-labelledby": titleId
|
|
43162
|
-
}, props), title ? /*#__PURE__*/React
|
|
43195
|
+
}, props), title ? /*#__PURE__*/React.createElement("title", {
|
|
43163
43196
|
id: titleId
|
|
43164
|
-
}, title) : null, /*#__PURE__*/React
|
|
43197
|
+
}, title) : null, /*#__PURE__*/React.createElement("path", {
|
|
43165
43198
|
fillRule: "evenodd",
|
|
43166
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",
|
|
43167
43200
|
clipRule: "evenodd"
|
|
43168
43201
|
}));
|
|
43169
43202
|
}
|
|
43170
|
-
const ForwardRef$3 = /*#__PURE__*/ React
|
|
43203
|
+
const ForwardRef$3 = /*#__PURE__*/ React.forwardRef(UserCircleIcon);
|
|
43171
43204
|
|
|
43172
43205
|
function UserGroupIcon({
|
|
43173
43206
|
title,
|
|
43174
43207
|
titleId,
|
|
43175
43208
|
...props
|
|
43176
43209
|
}, svgRef) {
|
|
43177
|
-
return /*#__PURE__*/React
|
|
43210
|
+
return /*#__PURE__*/React.createElement("svg", Object.assign({
|
|
43178
43211
|
xmlns: "http://www.w3.org/2000/svg",
|
|
43179
43212
|
viewBox: "0 0 24 24",
|
|
43180
43213
|
fill: "currentColor",
|
|
@@ -43182,24 +43215,24 @@ function UserGroupIcon({
|
|
|
43182
43215
|
"data-slot": "icon",
|
|
43183
43216
|
ref: svgRef,
|
|
43184
43217
|
"aria-labelledby": titleId
|
|
43185
|
-
}, props), title ? /*#__PURE__*/React
|
|
43218
|
+
}, props), title ? /*#__PURE__*/React.createElement("title", {
|
|
43186
43219
|
id: titleId
|
|
43187
|
-
}, title) : null, /*#__PURE__*/React
|
|
43220
|
+
}, title) : null, /*#__PURE__*/React.createElement("path", {
|
|
43188
43221
|
fillRule: "evenodd",
|
|
43189
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",
|
|
43190
43223
|
clipRule: "evenodd"
|
|
43191
|
-
}), /*#__PURE__*/React
|
|
43224
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
43192
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"
|
|
43193
43226
|
}));
|
|
43194
43227
|
}
|
|
43195
|
-
const ForwardRef$2 = /*#__PURE__*/ React
|
|
43228
|
+
const ForwardRef$2 = /*#__PURE__*/ React.forwardRef(UserGroupIcon);
|
|
43196
43229
|
|
|
43197
43230
|
function UsersIcon({
|
|
43198
43231
|
title,
|
|
43199
43232
|
titleId,
|
|
43200
43233
|
...props
|
|
43201
43234
|
}, svgRef) {
|
|
43202
|
-
return /*#__PURE__*/React
|
|
43235
|
+
return /*#__PURE__*/React.createElement("svg", Object.assign({
|
|
43203
43236
|
xmlns: "http://www.w3.org/2000/svg",
|
|
43204
43237
|
viewBox: "0 0 24 24",
|
|
43205
43238
|
fill: "currentColor",
|
|
@@ -43207,20 +43240,20 @@ function UsersIcon({
|
|
|
43207
43240
|
"data-slot": "icon",
|
|
43208
43241
|
ref: svgRef,
|
|
43209
43242
|
"aria-labelledby": titleId
|
|
43210
|
-
}, props), title ? /*#__PURE__*/React
|
|
43243
|
+
}, props), title ? /*#__PURE__*/React.createElement("title", {
|
|
43211
43244
|
id: titleId
|
|
43212
|
-
}, title) : null, /*#__PURE__*/React
|
|
43245
|
+
}, title) : null, /*#__PURE__*/React.createElement("path", {
|
|
43213
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"
|
|
43214
43247
|
}));
|
|
43215
43248
|
}
|
|
43216
|
-
const ForwardRef$1 = /*#__PURE__*/ React
|
|
43249
|
+
const ForwardRef$1 = /*#__PURE__*/ React.forwardRef(UsersIcon);
|
|
43217
43250
|
|
|
43218
43251
|
function XMarkIcon({
|
|
43219
43252
|
title,
|
|
43220
43253
|
titleId,
|
|
43221
43254
|
...props
|
|
43222
43255
|
}, svgRef) {
|
|
43223
|
-
return /*#__PURE__*/React
|
|
43256
|
+
return /*#__PURE__*/React.createElement("svg", Object.assign({
|
|
43224
43257
|
xmlns: "http://www.w3.org/2000/svg",
|
|
43225
43258
|
viewBox: "0 0 24 24",
|
|
43226
43259
|
fill: "currentColor",
|
|
@@ -43228,15 +43261,15 @@ function XMarkIcon({
|
|
|
43228
43261
|
"data-slot": "icon",
|
|
43229
43262
|
ref: svgRef,
|
|
43230
43263
|
"aria-labelledby": titleId
|
|
43231
|
-
}, props), title ? /*#__PURE__*/React
|
|
43264
|
+
}, props), title ? /*#__PURE__*/React.createElement("title", {
|
|
43232
43265
|
id: titleId
|
|
43233
|
-
}, title) : null, /*#__PURE__*/React
|
|
43266
|
+
}, title) : null, /*#__PURE__*/React.createElement("path", {
|
|
43234
43267
|
fillRule: "evenodd",
|
|
43235
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",
|
|
43236
43269
|
clipRule: "evenodd"
|
|
43237
43270
|
}));
|
|
43238
43271
|
}
|
|
43239
|
-
const ForwardRef = /*#__PURE__*/ React
|
|
43272
|
+
const ForwardRef = /*#__PURE__*/ React.forwardRef(XMarkIcon);
|
|
43240
43273
|
|
|
43241
43274
|
var isCheckBoxInput = (element) => element.type === 'checkbox';
|
|
43242
43275
|
|
|
@@ -70506,8 +70539,8 @@ function MultiSelect({
|
|
|
70506
70539
|
value: option,
|
|
70507
70540
|
disabled: isDisabled,
|
|
70508
70541
|
className: ({ active }) => classNames(
|
|
70509
|
-
isDisabled ? "text-gray-400
|
|
70510
|
-
"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"
|
|
70511
70544
|
),
|
|
70512
70545
|
children: ({ selected: isSel, active }) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
70513
70546
|
/* @__PURE__ */ jsx(
|
|
@@ -70524,8 +70557,8 @@ function MultiSelect({
|
|
|
70524
70557
|
"span",
|
|
70525
70558
|
{
|
|
70526
70559
|
className: classNames(
|
|
70527
|
-
active ? "text-
|
|
70528
|
-
"absolute
|
|
70560
|
+
active ? " text-gray-900" : " text-gray-600",
|
|
70561
|
+
" absolute inset-y-0 right-0 flex items-center pr-4"
|
|
70529
70562
|
),
|
|
70530
70563
|
children: /* @__PURE__ */ jsx(Check, { className: "w-5 h-5", "aria-hidden": "true" })
|
|
70531
70564
|
}
|
|
@@ -70585,6 +70618,93 @@ MultiSelect.defaultProps = {
|
|
|
70585
70618
|
getOptionLabel: (o) => o.name
|
|
70586
70619
|
};
|
|
70587
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
|
+
|
|
70588
70708
|
// https://github.com/facebook/react/blob/master/packages/shared/ExecutionEnvironment.js
|
|
70589
70709
|
const canUseDOM = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined';
|
|
70590
70710
|
|
|
@@ -74747,5 +74867,5 @@ function TreeView({
|
|
|
74747
74867
|
] });
|
|
74748
74868
|
}
|
|
74749
74869
|
|
|
74750
|
-
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 };
|
|
74751
74871
|
//# sourceMappingURL=unifyedx-storybook-new.es.js.map
|