@react-fabric/core 1.0.0-beta.3 → 1.0.0-beta.5
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/css/index.js +2 -2
- package/dist/cjs/components/animations/Animations.js +1 -1
- package/dist/cjs/components/button/Button.module.css +1 -1
- package/dist/cjs/components/chip/Chip.js +2 -2
- package/dist/cjs/components/chip/Chip.module.css +1 -1
- package/dist/cjs/components/menu/MenuItem.js +1 -1
- package/dist/cjs/core/aside/Aside.js +4 -2
- package/dist/cjs/index.js +1 -0
- package/dist/cjs/overlays/alert/Alert.js +38 -13
- package/dist/cjs/types/icons.js +2 -0
- package/dist/esm/components/animations/Animations.js +1 -1
- package/dist/esm/components/button/Button.module.css +1 -1
- package/dist/esm/components/chip/Chip.js +2 -2
- package/dist/esm/components/chip/Chip.module.css +1 -1
- package/dist/esm/components/menu/MenuItem.js +1 -1
- package/dist/esm/core/aside/Aside.js +4 -2
- package/dist/esm/index.js +1 -0
- package/dist/esm/overlays/alert/Alert.js +27 -2
- package/dist/esm/types/icons.js +2 -0
- package/dist/types/core/aside/Aside.d.ts +7 -3
- package/dist/types/overlays/alert/Alert.d.ts +9 -1
- package/dist/types/overlays/modal/Modal.d.ts +1 -1
- package/dist/types/types/icons.d.ts +2 -0
- package/package.json +3 -3
- package/src/components/animations/Animations.tsx +1 -1
- package/src/components/button/Button.module.css +1 -1
- package/src/components/chip/Chip.module.css +1 -1
- package/src/components/chip/Chip.tsx +2 -4
- package/src/core/aside/Aside.tsx +15 -3
- package/src/overlays/alert/Alert.tsx +25 -1
- package/src/overlays/modal/Modal.tsx +1 -1
- package/src/types/icons.ts +5 -0
package/css/index.js
CHANGED
|
@@ -190,7 +190,7 @@ module.exports = plugin(
|
|
|
190
190
|
cardpulse: {
|
|
191
191
|
"50%": { opacity: 0.5 },
|
|
192
192
|
},
|
|
193
|
-
|
|
193
|
+
bgprogress: {
|
|
194
194
|
"0%": {
|
|
195
195
|
"background-position-x": 0,
|
|
196
196
|
},
|
|
@@ -201,7 +201,7 @@ module.exports = plugin(
|
|
|
201
201
|
},
|
|
202
202
|
animation: {
|
|
203
203
|
pulse: "cardpulse 2s cubic-bezier(.4,0,.6,1) infinite",
|
|
204
|
-
progress: "
|
|
204
|
+
progress: "bgprogress 750ms linear infinite",
|
|
205
205
|
},
|
|
206
206
|
aspectRatio: {
|
|
207
207
|
screen: "4 / 3",
|
|
@@ -58,7 +58,7 @@ var AnimationIndicator = function AnimationIndicator(_ref) {
|
|
|
58
58
|
};
|
|
59
59
|
var AnimationBars = function AnimationBars(_ref2) {
|
|
60
60
|
var _ref2$color = _ref2.color,
|
|
61
|
-
color = _ref2$color === void 0 ? "tint
|
|
61
|
+
color = _ref2$color === void 0 ? "tint" : _ref2$color,
|
|
62
62
|
_ref2$size = _ref2.size,
|
|
63
63
|
size = _ref2$size === void 0 ? "2rem" : _ref2$size;
|
|
64
64
|
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer comp{.buttonWrapper{--color:theme(colors.primary.500);border-radius:var(--rounding);font-size:1rem;& .button{background-color:var(--bg);background-image:var(--click-gradient);border-radius:inherit;color:var(--text);outline:1px solid var(--outline);&.spinOnHover:hover .buttonIcon{& :global{animation:spin 2s linear infinite}}&>*{pointer-events:none}&:not(:disabled) input[type=file]{pointer-events:auto;&::-webkit-file-upload-button{cursor:pointer;inset:0;position:absolute}}}& .rounded{border-radius:9999px}& .buttonLabel{line-height:1;order:1;padding:.5em 1em;&+.altIcon{margin-inline-start:-1em}}& .buttonChild{line-height:1;order:1;padding:.5em}& .buttonIcon{font-size:1.125em;padding:.3889em}& :global(.hotkey-label){align-self:center;order:3}& .altIcon{align-self:center;order:4;padding:.125em .5em}& [data-ref=badge]{align-self:center;margin-inline-end:.5em;order:2}}.buttonGroup{&>.buttonWrapper{flex:0 1 1em}&:not(.flex)+&:not(.flex){margin-inline-start:.5rem}}}@layer util{.buttonWrapper{&[data-size=xs]{font-size:.625rem}&[data-size=sm]{font-size:.875rem}&[data-size=md]{font-size:1.125rem}&[data-size=lg]{font-size:1.25rem}&[data-size=xl]{font-size:1.5rem}}.button{--bg:color-mix(in lab,var(--fabric-bg) 99%,var(--tint));--outline:color-mix(in lab,var(--bg) 90%,var(--fabric-text));--text:color-mix(in lab,var(--color) 80%,var(--fabric-text));--bg-hover:color-mix(in lab,var(--color) 18%,var(--fabric-bg));--bg-click:color-mix(in lab,var(--color) 25%,var(--fabric-bg));--bg-active:color-mix(in lab,var(--color) 36%,var(--fabric-bg));&[data-color=accent]{--color:theme(colors.accent.500)}&[data-color=info]{--color:theme(colors.info.500)}&[data-color=danger]{--color:theme(colors.danger.500)}&[data-color=success]{--color:theme(colors.success.500)}&[data-color=warning]{--color:theme(colors.warning.500)}&[data-variant=outline]{--outline:var(--color)}&[data-variant=solid]{--outline:var(--color);--bg:color-mix(in lab,var(--color) 96%,var(--fabric-text));--text:theme(colors.white);--bg-hover:color-mix(in lab,var(--color) 90%,var(--fabric-bg));--bg-click:color-mix(in lab,var(--color) 80%,theme(colors.black));--bg-active:color-mix(in lab,var(--color) 70%,theme(colors.black));& :global(.hotkey-label){background-color:theme(backgroundColor.dark/30%);color:theme(colors.white/70%)}}&[data-variant=link]{--bg:transparent;--outline:transparent;background-image:none;box-shadow:none}&[data-color=invert]{--bg:theme(backgroundColor.invert);--text:color-mix(in lab,var(--color) 90%,theme(textColor.invert));--bg-hover:color-mix(in lab,var(--color) 15%,theme(backgroundColor.invert));--bg-click:color-mix(in lab,var(--color) 35%,theme(backgroundColor.invert))}}.buttonIcon[data-align=start]{order:0;&+.buttonLabel[data-colored-icon=false]{margin-inline-start:-1em}}.buttonIcon[data-align=end]{order:2;&~.buttonLabel[data-colored-icon=false]{margin-inline-end:-1em}}}@layer var{.buttonWrapper{height:unset;padding:unset;&[data-disabled=true]{cursor:not-allowed;& .button{background-image:var(--active-gradient);opacity:.5;pointer-events:none}}&[data-loading=true]{cursor:wait;& .button{background-image:var(--progress-gradient);background-size:1em 1em;pointer-events:none;& :global{animation:
|
|
1
|
+
@layer comp{.buttonWrapper{--color:theme(colors.primary.500);border-radius:var(--rounding);font-size:1rem;& .button{background-color:var(--bg);background-image:var(--click-gradient);border-radius:inherit;color:var(--text);outline:1px solid var(--outline);&.spinOnHover:hover .buttonIcon{& :global{animation:spin 2s linear infinite}}&>*{pointer-events:none}&:not(:disabled) input[type=file]{pointer-events:auto;&::-webkit-file-upload-button{cursor:pointer;inset:0;position:absolute}}}& .rounded{border-radius:9999px}& .buttonLabel{line-height:1;order:1;padding:.5em 1em;&+.altIcon{margin-inline-start:-1em}}& .buttonChild{line-height:1;order:1;padding:.5em}& .buttonIcon{font-size:1.125em;padding:.3889em}& :global(.hotkey-label){align-self:center;order:3}& .altIcon{align-self:center;order:4;padding:.125em .5em}& [data-ref=badge]{align-self:center;margin-inline-end:.5em;order:2}}.buttonGroup{&>.buttonWrapper{flex:0 1 1em}&:not(.flex)+&:not(.flex){margin-inline-start:.5rem}}}@layer util{.buttonWrapper{&[data-size=xs]{font-size:.625rem}&[data-size=sm]{font-size:.875rem}&[data-size=md]{font-size:1.125rem}&[data-size=lg]{font-size:1.25rem}&[data-size=xl]{font-size:1.5rem}}.button{--bg:color-mix(in lab,var(--fabric-bg) 99%,var(--tint));--outline:color-mix(in lab,var(--bg) 90%,var(--fabric-text));--text:color-mix(in lab,var(--color) 80%,var(--fabric-text));--bg-hover:color-mix(in lab,var(--color) 18%,var(--fabric-bg));--bg-click:color-mix(in lab,var(--color) 25%,var(--fabric-bg));--bg-active:color-mix(in lab,var(--color) 36%,var(--fabric-bg));&[data-color=accent]{--color:theme(colors.accent.500)}&[data-color=info]{--color:theme(colors.info.500)}&[data-color=danger]{--color:theme(colors.danger.500)}&[data-color=success]{--color:theme(colors.success.500)}&[data-color=warning]{--color:theme(colors.warning.500)}&[data-variant=outline]{--outline:var(--color)}&[data-variant=solid]{--outline:var(--color);--bg:color-mix(in lab,var(--color) 96%,var(--fabric-text));--text:theme(colors.white);--bg-hover:color-mix(in lab,var(--color) 90%,var(--fabric-bg));--bg-click:color-mix(in lab,var(--color) 80%,theme(colors.black));--bg-active:color-mix(in lab,var(--color) 70%,theme(colors.black));& :global(.hotkey-label){background-color:theme(backgroundColor.dark/30%);color:theme(colors.white/70%)}}&[data-variant=link]{--bg:transparent;--outline:transparent;background-image:none;box-shadow:none}&[data-color=invert]{--bg:theme(backgroundColor.invert);--text:color-mix(in lab,var(--color) 90%,theme(textColor.invert));--bg-hover:color-mix(in lab,var(--color) 15%,theme(backgroundColor.invert));--bg-click:color-mix(in lab,var(--color) 35%,theme(backgroundColor.invert))}}.buttonIcon[data-align=start]{order:0;&+.buttonLabel[data-colored-icon=false]{margin-inline-start:-1em}}.buttonIcon[data-align=end]{order:2;&~.buttonLabel[data-colored-icon=false]{margin-inline-end:-1em}}}@layer var{.buttonWrapper{height:unset;padding:unset;&[data-disabled=true]{cursor:not-allowed;& .button{background-image:var(--active-gradient);opacity:.5;pointer-events:none}}&[data-loading=true]{cursor:wait;& .button{background-image:var(--progress-gradient);background-size:1em 1em;pointer-events:none;& :global{animation:bgprogress .75s linear infinite}}& .button:not([data-variant=solid]){background-color:color-mix(in lab,var(--color) 15%,var(--fabric-bg))}}&:global(.btn-dashed)>.button{color:theme(colors.tint.600);outline:1px dashed theme(colors.tint.600);&[data-invalid=true]{background-color:theme(colors.danger.100);color:theme(colors.danger.600);outline:1px dashed theme(colors.danger.600)}}}.button{--tw-ring-color:var(--color);&:hover{background-color:var(--bg-hover)}&:active{background-color:var(--bg-click);background-image:var(--active-gradient);.buttonIcon,.buttonLabel{transform:translateY(1px)}}&[data-active=true],&[data-checked=true],&[data-dropdown-open=true]{background-color:var(--bg-active);background-image:none}&[data-active=true],&[data-dropdown-open=true]{pointer-events:none}}.buttonGroup{&>.buttonWrapper{margin:0;& .button[data-variant=link]{--outline:theme(backgroundColor.base)}}&:not(.vertical){&>:not(:first-child){&:before{border-inline-start:.5px solid theme(borderColor.base);content:"";inset-block:5%;inset-inline-start:-.5px;position:absolute}}&.separator>:not(:first-child){margin-inline-start:2px;&:before{inset-inline-start:-1.5px}}&>:not(:last-child) .button{border-end-end-radius:0;border-start-end-radius:0}&>:not(:first-child) .button{border-end-start-radius:0;border-start-start-radius:0}}&.vertical{&>:not(:first-child){&:before{border-block-start:.5px solid theme(borderColor.base);content:"";inset-block-start:-.5px;inset-inline:5%;position:absolute}}&.separator>:not(:first-child){margin-block-start:1px;&:before{inset-block-start:-1px}}&>:not(:last-child) .button{border-end-end-radius:0;border-end-start-radius:0}&>:not(:first-child) .button{border-start-end-radius:0;border-start-start-radius:0}}}}
|
|
@@ -66,7 +66,7 @@ var Chip = function Chip(_ref) {
|
|
|
66
66
|
return /*#__PURE__*/jsxRuntime.jsxs(E, _objectSpread(_objectSpread({
|
|
67
67
|
ref: ref,
|
|
68
68
|
role: "term",
|
|
69
|
-
className: classNames(Chip_module.chip, className, color && getColor.getColorClass(color), "select-none inline-flex flex-nowrap items-center max-w-72 text-sm
|
|
69
|
+
className: classNames(Chip_module.chip, className, color && getColor.getColorClass(color), "select-none inline-flex flex-nowrap items-center max-w-72 text-sm rounded", rounded && "rounded-full", !!onClick && Chip_module.clickable, disabled && Chip_module.disabled),
|
|
70
70
|
style: styles,
|
|
71
71
|
"data-variant": variant,
|
|
72
72
|
"data-inner-clickable": !!onClick,
|
|
@@ -80,7 +80,7 @@ var Chip = function Chip(_ref) {
|
|
|
80
80
|
color: iconColor,
|
|
81
81
|
rtlFlip: rtlFlip
|
|
82
82
|
}), children && /*#__PURE__*/jsxRuntime.jsx("label", {
|
|
83
|
-
className: classNames(Chip_module.chipLabel, "
|
|
83
|
+
className: classNames(Chip_module.chipLabel, "truncate"),
|
|
84
84
|
children: children
|
|
85
85
|
}), onRemove && /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
86
86
|
role: "none",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer comp{.chip{--blank-gradient:linear-gradient(180deg,#00000005 0%,#0000 10%);background-image:var(--blank-gradient);color:theme(colors.tint.500);outline:1px solid color-mix(in lab,currentcolor 20%,var(--fabric-bg));outline-offset:-1px;&>.chipLabel{padding
|
|
1
|
+
@layer comp{.chip{--blank-gradient:linear-gradient(180deg,#00000005 0%,#0000 10%);background-image:var(--blank-gradient);color:theme(colors.tint.500);outline:1px solid color-mix(in lab,currentcolor 20%,var(--fabric-bg));outline-offset:-1px;&>.chipLabel{padding:0 .5em}&>.chipIcon{&+.chipLabel{margin-inline-start:-.5em}}&.clickable{background-image:var(--click-gradient);cursor:pointer;&.disabled{opacity:.5;pointer-events:none}}}}@layer var{.chip{background-color:color-mix(in lab,currentcolor 10%,var(--fabric-bg));height:unset;padding:unset;&[data-variant=outline]{box-shadow:0 0 2px color-mix(in lab,currentcolor 50%,var(--tint)) inset;outline-color:color-mix(in lab,currentcolor 50%,var(--fabric-bg))}>*{color:color-mix(in lab,currentcolor 50%,var(--fabric-text))}&.clickable{&:hover{background-color:color-mix(in lab,currentcolor 20%,var(--fabric-bg))}&:active,&[data-dropdown-open=true]{background-color:color-mix(in lab,currentcolor 15%,var(--fabric-bg));background-image:var(--active-gradient)}&[data-dropdown-open=true]{pointer-events:none}}&[data-variant=solid]{background-color:color-mix(in lab,currentcolor 35%,var(--fabric-bg));outline-color:color-mix(in lab,currentcolor 50%,var(--fabric-bg));&>*{color:color-mix(in lab,currentcolor 5%,var(--fabric-text))}&.clickable{&:hover{background-color:color-mix(in lab,currentcolor 45%,var(--fabric-bg))}&:active,&[data-dropdown-open=true]{background-color:color-mix(in lab,currentcolor 30%,var(--fabric-bg))}}}}}
|
|
@@ -7,10 +7,10 @@ var utilities = require('@react-fabric/utilities');
|
|
|
7
7
|
var classNames = require('classnames');
|
|
8
8
|
var react$1 = require('react');
|
|
9
9
|
var HotKeyLabel = require('../../hotkeys/HotKeyLabel.js');
|
|
10
|
+
require('@babel/runtime/helpers/slicedToArray');
|
|
10
11
|
require('react-i18next');
|
|
11
12
|
require('../../hooks/useEffectDebugger.js');
|
|
12
13
|
var jsxRuntime = require('react/jsx-runtime');
|
|
13
|
-
require('@babel/runtime/helpers/slicedToArray');
|
|
14
14
|
require('../../hotkeys/HotKeyWrapper.js');
|
|
15
15
|
var Tooltip = require('../../overlays/tooltip/Tooltip.js');
|
|
16
16
|
var Badge = require('../badge/Badge.js');
|
|
@@ -26,6 +26,8 @@ var Aside = function Aside(_ref) {
|
|
|
26
26
|
iconBg = _ref.iconBg,
|
|
27
27
|
iconColor = _ref.iconColor,
|
|
28
28
|
rtlFlip = _ref.rtlFlip,
|
|
29
|
+
className = _ref.className,
|
|
30
|
+
bodyClassName = _ref.bodyClassName,
|
|
29
31
|
headerClassName = _ref.headerClassName,
|
|
30
32
|
resizeable = _ref.resizeable,
|
|
31
33
|
flyout = _ref.flyout,
|
|
@@ -101,7 +103,7 @@ var Aside = function Aside(_ref) {
|
|
|
101
103
|
};
|
|
102
104
|
}, [width, minWidth, maxWidth]);
|
|
103
105
|
return /*#__PURE__*/jsxRuntime.jsxs("aside", {
|
|
104
|
-
className: classNames(Aside_module.aside, "overflow-hidden grid"),
|
|
106
|
+
className: classNames(Aside_module.aside, className, "overflow-hidden grid"),
|
|
105
107
|
"data-align": align,
|
|
106
108
|
"data-flyout": peek,
|
|
107
109
|
"data-collapsed": isCollapsed,
|
|
@@ -138,7 +140,7 @@ var Aside = function Aside(_ref) {
|
|
|
138
140
|
}), /*#__PURE__*/jsxRuntime.jsx("section", {
|
|
139
141
|
ref: elementRef,
|
|
140
142
|
"data-ref": "asideBody",
|
|
141
|
-
className: classNames(Aside_module.asideBody, "overflow-hidden grid"),
|
|
143
|
+
className: classNames(Aside_module.asideBody, bodyClassName, "overflow-hidden grid"),
|
|
142
144
|
style: isCollapsed ? widthStyles : undefined,
|
|
143
145
|
children: /*#__PURE__*/jsxRuntime.jsx(ErrorBoundary.ErrorBoundary, {
|
|
144
146
|
children: children
|
package/dist/cjs/index.js
CHANGED
|
@@ -44,6 +44,7 @@ var ThemeProvider = require('./core/theme/ThemeProvider.js');
|
|
|
44
44
|
var Viewport = require('./core/viewport/Viewport.js');
|
|
45
45
|
var index = require('./i18n/index.js');
|
|
46
46
|
require('@babel/runtime/helpers/defineProperty');
|
|
47
|
+
require('@babel/runtime/helpers/slicedToArray');
|
|
47
48
|
require('@floating-ui/react');
|
|
48
49
|
require('classnames');
|
|
49
50
|
require('react');
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
4
|
-
var
|
|
4
|
+
var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
|
|
5
|
+
var react$1 = require('@floating-ui/react');
|
|
5
6
|
var classNames = require('classnames');
|
|
6
|
-
var react
|
|
7
|
+
var react = require('react');
|
|
7
8
|
var reactI18next = require('react-i18next');
|
|
8
9
|
var Animations = require('../../components/animations/Animations.js');
|
|
9
10
|
var Button = require('../../components/button/Button.js');
|
|
@@ -28,10 +29,16 @@ var Alert = function Alert(_ref) {
|
|
|
28
29
|
onClose = _ref.onClose,
|
|
29
30
|
type = _ref.type,
|
|
30
31
|
okLabel = _ref.okLabel,
|
|
31
|
-
cancelLabel = _ref.cancelLabel
|
|
32
|
+
cancelLabel = _ref.cancelLabel,
|
|
33
|
+
placeholder = _ref.placeholder,
|
|
34
|
+
defaultValue = _ref.defaultValue;
|
|
32
35
|
var _useTranslation = reactI18next.useTranslation("core"),
|
|
33
36
|
t = _useTranslation.t;
|
|
34
|
-
var
|
|
37
|
+
var _useState = react.useState(defaultValue),
|
|
38
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
39
|
+
value = _useState2[0],
|
|
40
|
+
setValue = _useState2[1];
|
|
41
|
+
var _useFloating = react$1.useFloating({
|
|
35
42
|
open: true,
|
|
36
43
|
onOpenChange: function onOpenChange() {
|
|
37
44
|
handleClose(false);
|
|
@@ -39,16 +46,16 @@ var Alert = function Alert(_ref) {
|
|
|
39
46
|
}),
|
|
40
47
|
refs = _useFloating.refs,
|
|
41
48
|
context = _useFloating.context;
|
|
42
|
-
var dismiss = react.useDismiss(context, {
|
|
49
|
+
var dismiss = react$1.useDismiss(context, {
|
|
43
50
|
outsidePressEvent: "mousedown",
|
|
44
51
|
escapeKey: true
|
|
45
52
|
});
|
|
46
|
-
var role = react.useRole(context);
|
|
53
|
+
var role = react$1.useRole(context);
|
|
47
54
|
|
|
48
55
|
// Merge all the interactions into prop getters
|
|
49
|
-
var _useInteractions = react.useInteractions([dismiss, role]),
|
|
56
|
+
var _useInteractions = react$1.useInteractions([dismiss, role]),
|
|
50
57
|
getFloatingProps = _useInteractions.getFloatingProps;
|
|
51
|
-
var iconType = react
|
|
58
|
+
var iconType = react.useMemo(function () {
|
|
52
59
|
if (icon) return /*#__PURE__*/jsxRuntime.jsx(Icon.Icon, {
|
|
53
60
|
icon: icon,
|
|
54
61
|
size: "md",
|
|
@@ -78,25 +85,25 @@ var Alert = function Alert(_ref) {
|
|
|
78
85
|
});
|
|
79
86
|
}
|
|
80
87
|
}, [color, type, icon]);
|
|
81
|
-
var handleClose = react
|
|
88
|
+
var handleClose = react.useCallback(function (ret) {
|
|
82
89
|
refs.floating.current && (refs.floating.current.dataset.show = "false");
|
|
83
90
|
setTimeout(function () {
|
|
84
91
|
onClose(ret);
|
|
85
92
|
}, 250);
|
|
86
93
|
}, [onClose]);
|
|
87
|
-
react
|
|
94
|
+
react.useLayoutEffect(function () {
|
|
88
95
|
setTimeout(function () {
|
|
89
96
|
return refs.floating.current && (refs.floating.current.dataset.show = "true");
|
|
90
97
|
}, 100);
|
|
91
98
|
}, []);
|
|
92
|
-
return /*#__PURE__*/jsxRuntime.jsx(react.FloatingPortal, {
|
|
93
|
-
children: /*#__PURE__*/jsxRuntime.jsx(react.FloatingOverlay, {
|
|
99
|
+
return /*#__PURE__*/jsxRuntime.jsx(react$1.FloatingPortal, {
|
|
100
|
+
children: /*#__PURE__*/jsxRuntime.jsx(react$1.FloatingOverlay, {
|
|
94
101
|
lockScroll: true,
|
|
95
102
|
style: {
|
|
96
103
|
zIndex: "var(--z-overlay-mask)"
|
|
97
104
|
},
|
|
98
105
|
className: "bg-base/50 backdrop-blur-sm grid place-items-center",
|
|
99
|
-
children: /*#__PURE__*/jsxRuntime.jsx(react.FloatingFocusManager, {
|
|
106
|
+
children: /*#__PURE__*/jsxRuntime.jsx(react$1.FloatingFocusManager, {
|
|
100
107
|
context: context,
|
|
101
108
|
children: /*#__PURE__*/jsxRuntime.jsxs("dialog", _objectSpread(_objectSpread({
|
|
102
109
|
role: "alertdialog",
|
|
@@ -112,6 +119,24 @@ var Alert = function Alert(_ref) {
|
|
|
112
119
|
}), /*#__PURE__*/jsxRuntime.jsx("p", {
|
|
113
120
|
className: "area-[message] py-4",
|
|
114
121
|
children: message
|
|
122
|
+
}), type === "prompt" && /*#__PURE__*/jsxRuntime.jsx("input", {
|
|
123
|
+
value: value,
|
|
124
|
+
placeholder: placeholder,
|
|
125
|
+
className: classNames("border rounded focus:border-primary-500"),
|
|
126
|
+
ref: function ref(e) {
|
|
127
|
+
return e != null && setTimeout(function () {
|
|
128
|
+
return e.focus();
|
|
129
|
+
}, 100);
|
|
130
|
+
},
|
|
131
|
+
onBlur: function onBlur(e) {
|
|
132
|
+
return e.target.focus();
|
|
133
|
+
},
|
|
134
|
+
onChange: function onChange(e) {
|
|
135
|
+
return setValue(e.target.value);
|
|
136
|
+
},
|
|
137
|
+
onKeyDown: function onKeyDown(e) {
|
|
138
|
+
return e.key === "Enter" && handleClose(value);
|
|
139
|
+
}
|
|
115
140
|
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
116
141
|
className: "flex gap-1 justify-center flex-nowrap pt-2 area-[actions]",
|
|
117
142
|
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
package/dist/cjs/types/icons.js
CHANGED
|
@@ -52,6 +52,8 @@ exports.CoreIcons = void 0;
|
|
|
52
52
|
_CoreIcons.caretUp = "M7,15L12,10L17,15H7Z";
|
|
53
53
|
_CoreIcons.expand = "M5 2c-0.828 0-1.58 0.337-2.121 0.879s-0.879 1.293-0.879 2.121v14c0 0.828 0.337 1.58 0.879 2.121s1.293 0.879 2.121 0.879h14c0.828 0 1.58-0.337 2.121-0.879s0.879-1.293 0.879-2.121v-14c0-0.828-0.337-1.58-0.879-2.121s-1.293-0.879-2.121-0.879zM5 4h14c0.276 0 0.525 0.111 0.707 0.293s0.293 0.431 0.293 0.707v14c0 0.276-0.111 0.525-0.293 0.707s-0.431 0.293-0.707 0.293h-14c-0.276 0-0.525-0.111-0.707-0.293s-0.293-0.431-0.293-0.707v-14c0-0.276 0.111-0.525 0.293-0.707s0.431-0.293 0.707-0.293zM8 13h3v3c0 0.552 0.448 1 1 1s1-0.448 1-1v-3h3c0.552 0 1-0.448 1-1s-0.448-1-1-1h-3v-3c0-0.552-0.448-1-1-1s-1 0.448-1 1v3h-3c-0.552 0-1 0.448-1 1s0.448 1 1 1z";
|
|
54
54
|
_CoreIcons.collapse = "M5 2c-0.828 0-1.58 0.337-2.121 0.879s-0.879 1.293-0.879 2.121v14c0 0.828 0.337 1.58 0.879 2.121s1.293 0.879 2.121 0.879h14c0.828 0 1.58-0.337 2.121-0.879s0.879-1.293 0.879-2.121v-14c0-0.828-0.337-1.58-0.879-2.121s-1.293-0.879-2.121-0.879zM5 4h14c0.276 0 0.525 0.111 0.707 0.293s0.293 0.431 0.293 0.707v14c0 0.276-0.111 0.525-0.293 0.707s-0.431 0.293-0.707 0.293h-14c-0.276 0-0.525-0.111-0.707-0.293s-0.293-0.431-0.293-0.707v-14c0-0.276 0.111-0.525 0.293-0.707s0.431-0.293 0.707-0.293zM8 13h8c0.552 0 1-0.448 1-1s-0.448-1-1-1h-8c-0.552 0-1 0.448-1 1s0.448 1 1 1z";
|
|
55
|
+
_CoreIcons.expandActive = "M17,13H13V17H11V13H7V11H11V7H13V11H17M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3Z";
|
|
56
|
+
_CoreIcons.collapseActive = "M17,13H7V11H17M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3Z";
|
|
55
57
|
_CoreIcons.expandAll = "M5.293 16.707l6 6c0.391 0.391 1.024 0.391 1.414 0l6-6c0.391-0.391 0.391-1.024 0-1.414s-1.024-0.391-1.414 0l-5.293 5.293-5.293-5.293c-0.391-0.391-1.024-0.391-1.414 0s-0.391 1.024 0 1.414zM18.707 7.293l-6-6c-0.391-0.391-1.024-0.391-1.414 0l-6 6c-0.391 0.391-0.391 1.024 0 1.414s1.024 0.391 1.414 0l5.293-5.293 5.293 5.293c0.391 0.391 1.024 0.391 1.414 0s0.391-1.024 0-1.414z";
|
|
56
58
|
_CoreIcons.colapseAll = "M18.707 21.293l-6-6c-0.391-0.391-1.024-0.391-1.414 0l-6 6c-0.391 0.391-0.391 1.024 0 1.414s1.024 0.391 1.414 0l5.293-5.293 5.293 5.293c0.391 0.391 1.024 0.391 1.414 0s0.391-1.024 0-1.414zM5.293 2.707l6 6c0.391 0.391 1.024 0.391 1.414 0l6-6c0.391-0.391 0.391-1.024 0-1.414s-1.024-0.391-1.414 0l-5.293 5.293-5.293-5.293c-0.391-0.391-1.024-0.391-1.414 0s-0.391 1.024 0 1.414z";
|
|
57
59
|
_CoreIcons.folderClosed = "M20,18H4V8H20M20,6H12L10,4H4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V8C22,6.89 21.1,6 20,6Z";
|
|
@@ -58,7 +58,7 @@ var AnimationIndicator = function AnimationIndicator(_ref) {
|
|
|
58
58
|
};
|
|
59
59
|
var AnimationBars = function AnimationBars(_ref2) {
|
|
60
60
|
var _ref2$color = _ref2.color,
|
|
61
|
-
color = _ref2$color === void 0 ? "tint
|
|
61
|
+
color = _ref2$color === void 0 ? "tint" : _ref2$color,
|
|
62
62
|
_ref2$size = _ref2.size,
|
|
63
63
|
size = _ref2$size === void 0 ? "2rem" : _ref2$size;
|
|
64
64
|
return /*#__PURE__*/jsx("div", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer comp{.buttonWrapper{--color:theme(colors.primary.500);border-radius:var(--rounding);font-size:1rem;& .button{background-color:var(--bg);background-image:var(--click-gradient);border-radius:inherit;color:var(--text);outline:1px solid var(--outline);&.spinOnHover:hover .buttonIcon{& :global{animation:spin 2s linear infinite}}&>*{pointer-events:none}&:not(:disabled) input[type=file]{pointer-events:auto;&::-webkit-file-upload-button{cursor:pointer;inset:0;position:absolute}}}& .rounded{border-radius:9999px}& .buttonLabel{line-height:1;order:1;padding:.5em 1em;&+.altIcon{margin-inline-start:-1em}}& .buttonChild{line-height:1;order:1;padding:.5em}& .buttonIcon{font-size:1.125em;padding:.3889em}& :global(.hotkey-label){align-self:center;order:3}& .altIcon{align-self:center;order:4;padding:.125em .5em}& [data-ref=badge]{align-self:center;margin-inline-end:.5em;order:2}}.buttonGroup{&>.buttonWrapper{flex:0 1 1em}&:not(.flex)+&:not(.flex){margin-inline-start:.5rem}}}@layer util{.buttonWrapper{&[data-size=xs]{font-size:.625rem}&[data-size=sm]{font-size:.875rem}&[data-size=md]{font-size:1.125rem}&[data-size=lg]{font-size:1.25rem}&[data-size=xl]{font-size:1.5rem}}.button{--bg:color-mix(in lab,var(--fabric-bg) 99%,var(--tint));--outline:color-mix(in lab,var(--bg) 90%,var(--fabric-text));--text:color-mix(in lab,var(--color) 80%,var(--fabric-text));--bg-hover:color-mix(in lab,var(--color) 18%,var(--fabric-bg));--bg-click:color-mix(in lab,var(--color) 25%,var(--fabric-bg));--bg-active:color-mix(in lab,var(--color) 36%,var(--fabric-bg));&[data-color=accent]{--color:theme(colors.accent.500)}&[data-color=info]{--color:theme(colors.info.500)}&[data-color=danger]{--color:theme(colors.danger.500)}&[data-color=success]{--color:theme(colors.success.500)}&[data-color=warning]{--color:theme(colors.warning.500)}&[data-variant=outline]{--outline:var(--color)}&[data-variant=solid]{--outline:var(--color);--bg:color-mix(in lab,var(--color) 96%,var(--fabric-text));--text:theme(colors.white);--bg-hover:color-mix(in lab,var(--color) 90%,var(--fabric-bg));--bg-click:color-mix(in lab,var(--color) 80%,theme(colors.black));--bg-active:color-mix(in lab,var(--color) 70%,theme(colors.black));& :global(.hotkey-label){background-color:theme(backgroundColor.dark/30%);color:theme(colors.white/70%)}}&[data-variant=link]{--bg:transparent;--outline:transparent;background-image:none;box-shadow:none}&[data-color=invert]{--bg:theme(backgroundColor.invert);--text:color-mix(in lab,var(--color) 90%,theme(textColor.invert));--bg-hover:color-mix(in lab,var(--color) 15%,theme(backgroundColor.invert));--bg-click:color-mix(in lab,var(--color) 35%,theme(backgroundColor.invert))}}.buttonIcon[data-align=start]{order:0;&+.buttonLabel[data-colored-icon=false]{margin-inline-start:-1em}}.buttonIcon[data-align=end]{order:2;&~.buttonLabel[data-colored-icon=false]{margin-inline-end:-1em}}}@layer var{.buttonWrapper{height:unset;padding:unset;&[data-disabled=true]{cursor:not-allowed;& .button{background-image:var(--active-gradient);opacity:.5;pointer-events:none}}&[data-loading=true]{cursor:wait;& .button{background-image:var(--progress-gradient);background-size:1em 1em;pointer-events:none;& :global{animation:
|
|
1
|
+
@layer comp{.buttonWrapper{--color:theme(colors.primary.500);border-radius:var(--rounding);font-size:1rem;& .button{background-color:var(--bg);background-image:var(--click-gradient);border-radius:inherit;color:var(--text);outline:1px solid var(--outline);&.spinOnHover:hover .buttonIcon{& :global{animation:spin 2s linear infinite}}&>*{pointer-events:none}&:not(:disabled) input[type=file]{pointer-events:auto;&::-webkit-file-upload-button{cursor:pointer;inset:0;position:absolute}}}& .rounded{border-radius:9999px}& .buttonLabel{line-height:1;order:1;padding:.5em 1em;&+.altIcon{margin-inline-start:-1em}}& .buttonChild{line-height:1;order:1;padding:.5em}& .buttonIcon{font-size:1.125em;padding:.3889em}& :global(.hotkey-label){align-self:center;order:3}& .altIcon{align-self:center;order:4;padding:.125em .5em}& [data-ref=badge]{align-self:center;margin-inline-end:.5em;order:2}}.buttonGroup{&>.buttonWrapper{flex:0 1 1em}&:not(.flex)+&:not(.flex){margin-inline-start:.5rem}}}@layer util{.buttonWrapper{&[data-size=xs]{font-size:.625rem}&[data-size=sm]{font-size:.875rem}&[data-size=md]{font-size:1.125rem}&[data-size=lg]{font-size:1.25rem}&[data-size=xl]{font-size:1.5rem}}.button{--bg:color-mix(in lab,var(--fabric-bg) 99%,var(--tint));--outline:color-mix(in lab,var(--bg) 90%,var(--fabric-text));--text:color-mix(in lab,var(--color) 80%,var(--fabric-text));--bg-hover:color-mix(in lab,var(--color) 18%,var(--fabric-bg));--bg-click:color-mix(in lab,var(--color) 25%,var(--fabric-bg));--bg-active:color-mix(in lab,var(--color) 36%,var(--fabric-bg));&[data-color=accent]{--color:theme(colors.accent.500)}&[data-color=info]{--color:theme(colors.info.500)}&[data-color=danger]{--color:theme(colors.danger.500)}&[data-color=success]{--color:theme(colors.success.500)}&[data-color=warning]{--color:theme(colors.warning.500)}&[data-variant=outline]{--outline:var(--color)}&[data-variant=solid]{--outline:var(--color);--bg:color-mix(in lab,var(--color) 96%,var(--fabric-text));--text:theme(colors.white);--bg-hover:color-mix(in lab,var(--color) 90%,var(--fabric-bg));--bg-click:color-mix(in lab,var(--color) 80%,theme(colors.black));--bg-active:color-mix(in lab,var(--color) 70%,theme(colors.black));& :global(.hotkey-label){background-color:theme(backgroundColor.dark/30%);color:theme(colors.white/70%)}}&[data-variant=link]{--bg:transparent;--outline:transparent;background-image:none;box-shadow:none}&[data-color=invert]{--bg:theme(backgroundColor.invert);--text:color-mix(in lab,var(--color) 90%,theme(textColor.invert));--bg-hover:color-mix(in lab,var(--color) 15%,theme(backgroundColor.invert));--bg-click:color-mix(in lab,var(--color) 35%,theme(backgroundColor.invert))}}.buttonIcon[data-align=start]{order:0;&+.buttonLabel[data-colored-icon=false]{margin-inline-start:-1em}}.buttonIcon[data-align=end]{order:2;&~.buttonLabel[data-colored-icon=false]{margin-inline-end:-1em}}}@layer var{.buttonWrapper{height:unset;padding:unset;&[data-disabled=true]{cursor:not-allowed;& .button{background-image:var(--active-gradient);opacity:.5;pointer-events:none}}&[data-loading=true]{cursor:wait;& .button{background-image:var(--progress-gradient);background-size:1em 1em;pointer-events:none;& :global{animation:bgprogress .75s linear infinite}}& .button:not([data-variant=solid]){background-color:color-mix(in lab,var(--color) 15%,var(--fabric-bg))}}&:global(.btn-dashed)>.button{color:theme(colors.tint.600);outline:1px dashed theme(colors.tint.600);&[data-invalid=true]{background-color:theme(colors.danger.100);color:theme(colors.danger.600);outline:1px dashed theme(colors.danger.600)}}}.button{--tw-ring-color:var(--color);&:hover{background-color:var(--bg-hover)}&:active{background-color:var(--bg-click);background-image:var(--active-gradient);.buttonIcon,.buttonLabel{transform:translateY(1px)}}&[data-active=true],&[data-checked=true],&[data-dropdown-open=true]{background-color:var(--bg-active);background-image:none}&[data-active=true],&[data-dropdown-open=true]{pointer-events:none}}.buttonGroup{&>.buttonWrapper{margin:0;& .button[data-variant=link]{--outline:theme(backgroundColor.base)}}&:not(.vertical){&>:not(:first-child){&:before{border-inline-start:.5px solid theme(borderColor.base);content:"";inset-block:5%;inset-inline-start:-.5px;position:absolute}}&.separator>:not(:first-child){margin-inline-start:2px;&:before{inset-inline-start:-1.5px}}&>:not(:last-child) .button{border-end-end-radius:0;border-start-end-radius:0}&>:not(:first-child) .button{border-end-start-radius:0;border-start-start-radius:0}}&.vertical{&>:not(:first-child){&:before{border-block-start:.5px solid theme(borderColor.base);content:"";inset-block-start:-.5px;inset-inline:5%;position:absolute}}&.separator>:not(:first-child){margin-block-start:1px;&:before{inset-block-start:-1px}}&>:not(:last-child) .button{border-end-end-radius:0;border-end-start-radius:0}&>:not(:first-child) .button{border-start-end-radius:0;border-start-start-radius:0}}}}
|
|
@@ -66,7 +66,7 @@ var Chip = function Chip(_ref) {
|
|
|
66
66
|
return /*#__PURE__*/jsxs(E, _objectSpread(_objectSpread({
|
|
67
67
|
ref: ref,
|
|
68
68
|
role: "term",
|
|
69
|
-
className: classNames(classes.chip, className, color && getColorClass(color), "select-none inline-flex flex-nowrap items-center max-w-72 text-sm
|
|
69
|
+
className: classNames(classes.chip, className, color && getColorClass(color), "select-none inline-flex flex-nowrap items-center max-w-72 text-sm rounded", rounded && "rounded-full", !!onClick && classes.clickable, disabled && classes.disabled),
|
|
70
70
|
style: styles,
|
|
71
71
|
"data-variant": variant,
|
|
72
72
|
"data-inner-clickable": !!onClick,
|
|
@@ -80,7 +80,7 @@ var Chip = function Chip(_ref) {
|
|
|
80
80
|
color: iconColor,
|
|
81
81
|
rtlFlip: rtlFlip
|
|
82
82
|
}), children && /*#__PURE__*/jsx("label", {
|
|
83
|
-
className: classNames(classes.chipLabel, "
|
|
83
|
+
className: classNames(classes.chipLabel, "truncate"),
|
|
84
84
|
children: children
|
|
85
85
|
}), onRemove && /*#__PURE__*/jsx("span", {
|
|
86
86
|
role: "none",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer comp{.chip{--blank-gradient:linear-gradient(180deg,#00000005 0%,#0000 10%);background-image:var(--blank-gradient);color:theme(colors.tint.500);outline:1px solid color-mix(in lab,currentcolor 20%,var(--fabric-bg));outline-offset:-1px;&>.chipLabel{padding
|
|
1
|
+
@layer comp{.chip{--blank-gradient:linear-gradient(180deg,#00000005 0%,#0000 10%);background-image:var(--blank-gradient);color:theme(colors.tint.500);outline:1px solid color-mix(in lab,currentcolor 20%,var(--fabric-bg));outline-offset:-1px;&>.chipLabel{padding:0 .5em}&>.chipIcon{&+.chipLabel{margin-inline-start:-.5em}}&.clickable{background-image:var(--click-gradient);cursor:pointer;&.disabled{opacity:.5;pointer-events:none}}}}@layer var{.chip{background-color:color-mix(in lab,currentcolor 10%,var(--fabric-bg));height:unset;padding:unset;&[data-variant=outline]{box-shadow:0 0 2px color-mix(in lab,currentcolor 50%,var(--tint)) inset;outline-color:color-mix(in lab,currentcolor 50%,var(--fabric-bg))}>*{color:color-mix(in lab,currentcolor 50%,var(--fabric-text))}&.clickable{&:hover{background-color:color-mix(in lab,currentcolor 20%,var(--fabric-bg))}&:active,&[data-dropdown-open=true]{background-color:color-mix(in lab,currentcolor 15%,var(--fabric-bg));background-image:var(--active-gradient)}&[data-dropdown-open=true]{pointer-events:none}}&[data-variant=solid]{background-color:color-mix(in lab,currentcolor 35%,var(--fabric-bg));outline-color:color-mix(in lab,currentcolor 50%,var(--fabric-bg));&>*{color:color-mix(in lab,currentcolor 5%,var(--fabric-text))}&.clickable{&:hover{background-color:color-mix(in lab,currentcolor 45%,var(--fabric-bg))}&:active,&[data-dropdown-open=true]{background-color:color-mix(in lab,currentcolor 30%,var(--fabric-bg))}}}}}
|
|
@@ -7,10 +7,10 @@ import { iconToken } from '@react-fabric/utilities';
|
|
|
7
7
|
import classNames from 'classnames';
|
|
8
8
|
import { useMemo, useCallback, Fragment } from 'react';
|
|
9
9
|
import { HotKeyLabel } from '../../hotkeys/HotKeyLabel.js';
|
|
10
|
+
import '@babel/runtime/helpers/slicedToArray';
|
|
10
11
|
import 'react-i18next';
|
|
11
12
|
import '../../hooks/useEffectDebugger.js';
|
|
12
13
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
13
|
-
import '@babel/runtime/helpers/slicedToArray';
|
|
14
14
|
import '../../hotkeys/HotKeyWrapper.js';
|
|
15
15
|
import { Tooltip } from '../../overlays/tooltip/Tooltip.js';
|
|
16
16
|
import { getBadgeProps, Badge } from '../badge/Badge.js';
|
|
@@ -26,6 +26,8 @@ var Aside = function Aside(_ref) {
|
|
|
26
26
|
iconBg = _ref.iconBg,
|
|
27
27
|
iconColor = _ref.iconColor,
|
|
28
28
|
rtlFlip = _ref.rtlFlip,
|
|
29
|
+
className = _ref.className,
|
|
30
|
+
bodyClassName = _ref.bodyClassName,
|
|
29
31
|
headerClassName = _ref.headerClassName,
|
|
30
32
|
resizeable = _ref.resizeable,
|
|
31
33
|
flyout = _ref.flyout,
|
|
@@ -101,7 +103,7 @@ var Aside = function Aside(_ref) {
|
|
|
101
103
|
};
|
|
102
104
|
}, [width, minWidth, maxWidth]);
|
|
103
105
|
return /*#__PURE__*/jsxs("aside", {
|
|
104
|
-
className: classNames(classes.aside, "overflow-hidden grid"),
|
|
106
|
+
className: classNames(classes.aside, className, "overflow-hidden grid"),
|
|
105
107
|
"data-align": align,
|
|
106
108
|
"data-flyout": peek,
|
|
107
109
|
"data-collapsed": isCollapsed,
|
|
@@ -138,7 +140,7 @@ var Aside = function Aside(_ref) {
|
|
|
138
140
|
}), /*#__PURE__*/jsx("section", {
|
|
139
141
|
ref: elementRef,
|
|
140
142
|
"data-ref": "asideBody",
|
|
141
|
-
className: classNames(classes.asideBody, "overflow-hidden grid"),
|
|
143
|
+
className: classNames(classes.asideBody, bodyClassName, "overflow-hidden grid"),
|
|
142
144
|
style: isCollapsed ? widthStyles : undefined,
|
|
143
145
|
children: /*#__PURE__*/jsx(ErrorBoundary, {
|
|
144
146
|
children: children
|
package/dist/esm/index.js
CHANGED
|
@@ -44,6 +44,7 @@ export { ThemeProvider } from './core/theme/ThemeProvider.js';
|
|
|
44
44
|
export { Viewport } from './core/viewport/Viewport.js';
|
|
45
45
|
export { addTranslationBundle } from './i18n/index.js';
|
|
46
46
|
import '@babel/runtime/helpers/defineProperty';
|
|
47
|
+
import '@babel/runtime/helpers/slicedToArray';
|
|
47
48
|
import '@floating-ui/react';
|
|
48
49
|
import 'classnames';
|
|
49
50
|
import 'react';
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
4
|
+
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
4
5
|
import { useFloating, useDismiss, useRole, useInteractions, FloatingPortal, FloatingOverlay, FloatingFocusManager } from '@floating-ui/react';
|
|
5
6
|
import classNames from 'classnames';
|
|
6
|
-
import { useMemo, useCallback, useLayoutEffect } from 'react';
|
|
7
|
+
import { useState, useMemo, useCallback, useLayoutEffect } from 'react';
|
|
7
8
|
import { useTranslation } from 'react-i18next';
|
|
8
9
|
import { AnimationIndicator } from '../../components/animations/Animations.js';
|
|
9
10
|
import { Button } from '../../components/button/Button.js';
|
|
@@ -28,9 +29,15 @@ var Alert = function Alert(_ref) {
|
|
|
28
29
|
onClose = _ref.onClose,
|
|
29
30
|
type = _ref.type,
|
|
30
31
|
okLabel = _ref.okLabel,
|
|
31
|
-
cancelLabel = _ref.cancelLabel
|
|
32
|
+
cancelLabel = _ref.cancelLabel,
|
|
33
|
+
placeholder = _ref.placeholder,
|
|
34
|
+
defaultValue = _ref.defaultValue;
|
|
32
35
|
var _useTranslation = useTranslation("core"),
|
|
33
36
|
t = _useTranslation.t;
|
|
37
|
+
var _useState = useState(defaultValue),
|
|
38
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
39
|
+
value = _useState2[0],
|
|
40
|
+
setValue = _useState2[1];
|
|
34
41
|
var _useFloating = useFloating({
|
|
35
42
|
open: true,
|
|
36
43
|
onOpenChange: function onOpenChange() {
|
|
@@ -112,6 +119,24 @@ var Alert = function Alert(_ref) {
|
|
|
112
119
|
}), /*#__PURE__*/jsx("p", {
|
|
113
120
|
className: "area-[message] py-4",
|
|
114
121
|
children: message
|
|
122
|
+
}), type === "prompt" && /*#__PURE__*/jsx("input", {
|
|
123
|
+
value: value,
|
|
124
|
+
placeholder: placeholder,
|
|
125
|
+
className: classNames("border rounded focus:border-primary-500"),
|
|
126
|
+
ref: function ref(e) {
|
|
127
|
+
return e != null && setTimeout(function () {
|
|
128
|
+
return e.focus();
|
|
129
|
+
}, 100);
|
|
130
|
+
},
|
|
131
|
+
onBlur: function onBlur(e) {
|
|
132
|
+
return e.target.focus();
|
|
133
|
+
},
|
|
134
|
+
onChange: function onChange(e) {
|
|
135
|
+
return setValue(e.target.value);
|
|
136
|
+
},
|
|
137
|
+
onKeyDown: function onKeyDown(e) {
|
|
138
|
+
return e.key === "Enter" && handleClose(value);
|
|
139
|
+
}
|
|
115
140
|
}), /*#__PURE__*/jsxs("div", {
|
|
116
141
|
className: "flex gap-1 justify-center flex-nowrap pt-2 area-[actions]",
|
|
117
142
|
children: [/*#__PURE__*/jsx("div", {
|
package/dist/esm/types/icons.js
CHANGED
|
@@ -52,6 +52,8 @@ var CoreIcons;
|
|
|
52
52
|
_CoreIcons.caretUp = "M7,15L12,10L17,15H7Z";
|
|
53
53
|
_CoreIcons.expand = "M5 2c-0.828 0-1.58 0.337-2.121 0.879s-0.879 1.293-0.879 2.121v14c0 0.828 0.337 1.58 0.879 2.121s1.293 0.879 2.121 0.879h14c0.828 0 1.58-0.337 2.121-0.879s0.879-1.293 0.879-2.121v-14c0-0.828-0.337-1.58-0.879-2.121s-1.293-0.879-2.121-0.879zM5 4h14c0.276 0 0.525 0.111 0.707 0.293s0.293 0.431 0.293 0.707v14c0 0.276-0.111 0.525-0.293 0.707s-0.431 0.293-0.707 0.293h-14c-0.276 0-0.525-0.111-0.707-0.293s-0.293-0.431-0.293-0.707v-14c0-0.276 0.111-0.525 0.293-0.707s0.431-0.293 0.707-0.293zM8 13h3v3c0 0.552 0.448 1 1 1s1-0.448 1-1v-3h3c0.552 0 1-0.448 1-1s-0.448-1-1-1h-3v-3c0-0.552-0.448-1-1-1s-1 0.448-1 1v3h-3c-0.552 0-1 0.448-1 1s0.448 1 1 1z";
|
|
54
54
|
_CoreIcons.collapse = "M5 2c-0.828 0-1.58 0.337-2.121 0.879s-0.879 1.293-0.879 2.121v14c0 0.828 0.337 1.58 0.879 2.121s1.293 0.879 2.121 0.879h14c0.828 0 1.58-0.337 2.121-0.879s0.879-1.293 0.879-2.121v-14c0-0.828-0.337-1.58-0.879-2.121s-1.293-0.879-2.121-0.879zM5 4h14c0.276 0 0.525 0.111 0.707 0.293s0.293 0.431 0.293 0.707v14c0 0.276-0.111 0.525-0.293 0.707s-0.431 0.293-0.707 0.293h-14c-0.276 0-0.525-0.111-0.707-0.293s-0.293-0.431-0.293-0.707v-14c0-0.276 0.111-0.525 0.293-0.707s0.431-0.293 0.707-0.293zM8 13h8c0.552 0 1-0.448 1-1s-0.448-1-1-1h-8c-0.552 0-1 0.448-1 1s0.448 1 1 1z";
|
|
55
|
+
_CoreIcons.expandActive = "M17,13H13V17H11V13H7V11H11V7H13V11H17M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3Z";
|
|
56
|
+
_CoreIcons.collapseActive = "M17,13H7V11H17M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3Z";
|
|
55
57
|
_CoreIcons.expandAll = "M5.293 16.707l6 6c0.391 0.391 1.024 0.391 1.414 0l6-6c0.391-0.391 0.391-1.024 0-1.414s-1.024-0.391-1.414 0l-5.293 5.293-5.293-5.293c-0.391-0.391-1.024-0.391-1.414 0s-0.391 1.024 0 1.414zM18.707 7.293l-6-6c-0.391-0.391-1.024-0.391-1.414 0l-6 6c-0.391 0.391-0.391 1.024 0 1.414s1.024 0.391 1.414 0l5.293-5.293 5.293 5.293c0.391 0.391 1.024 0.391 1.414 0s0.391-1.024 0-1.414z";
|
|
56
58
|
_CoreIcons.colapseAll = "M18.707 21.293l-6-6c-0.391-0.391-1.024-0.391-1.414 0l-6 6c-0.391 0.391-0.391 1.024 0 1.414s1.024 0.391 1.414 0l5.293-5.293 5.293 5.293c0.391 0.391 1.024 0.391 1.414 0s0.391-1.024 0-1.414zM5.293 2.707l6 6c0.391 0.391 1.024 0.391 1.414 0l6-6c0.391-0.391 0.391-1.024 0-1.414s-1.024-0.391-1.414 0l-5.293 5.293-5.293-5.293c-0.391-0.391-1.024-0.391-1.414 0s-0.391 1.024 0 1.414z";
|
|
57
59
|
_CoreIcons.folderClosed = "M20,18H4V8H20M20,6H12L10,4H4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V8C22,6.89 21.1,6 20,6Z";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
|
-
import { type ChildrenProp, type CollapseProps, type Elements, type IconProps, type TestProps } from "../../types";
|
|
3
|
-
export interface AsideProps extends IconProps, ChildrenProp, CollapseProps, TestProps {
|
|
2
|
+
import { type ChildrenProp, type CollapseProps, type CssProp, type Elements, type IconProps, type TestProps } from "../../types";
|
|
3
|
+
export interface AsideProps extends IconProps, ChildrenProp, CollapseProps, CssProp, TestProps {
|
|
4
4
|
/**
|
|
5
5
|
* page title
|
|
6
6
|
*/
|
|
@@ -17,6 +17,10 @@ export interface AsideProps extends IconProps, ChildrenProp, CollapseProps, Test
|
|
|
17
17
|
* header class
|
|
18
18
|
*/
|
|
19
19
|
headerClassName?: string;
|
|
20
|
+
/**
|
|
21
|
+
* header class
|
|
22
|
+
*/
|
|
23
|
+
bodyClassName?: string;
|
|
20
24
|
/**
|
|
21
25
|
* show loading indicator
|
|
22
26
|
*/
|
|
@@ -49,4 +53,4 @@ export interface AsideProps extends IconProps, ChildrenProp, CollapseProps, Test
|
|
|
49
53
|
/**
|
|
50
54
|
* Side panel
|
|
51
55
|
*/
|
|
52
|
-
export declare const Aside: ({ children, title, icon, iconBg, iconColor, rtlFlip, headerClassName, resizeable, flyout, onFlyout, collapsed, collapsable, onCollapse, actions, loading, align, width: wd, minWidth, maxWidth, "data-testid": testId, "data-test-value": testValue, }: AsideProps) => import("react/jsx-runtime").JSX.Element;
|
|
56
|
+
export declare const Aside: ({ children, title, icon, iconBg, iconColor, rtlFlip, className, bodyClassName, headerClassName, resizeable, flyout, onFlyout, collapsed, collapsable, onCollapse, actions, loading, align, width: wd, minWidth, maxWidth, "data-testid": testId, "data-test-value": testValue, }: AsideProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -29,5 +29,13 @@ export interface AlertProps extends Omit<IconProps, "iconBg" | "iconColor"> {
|
|
|
29
29
|
* cancel label
|
|
30
30
|
*/
|
|
31
31
|
cancelLabel?: string;
|
|
32
|
+
/**
|
|
33
|
+
* placeholder for prompt
|
|
34
|
+
*/
|
|
35
|
+
placeholder?: string;
|
|
36
|
+
/**
|
|
37
|
+
* default value for prompt
|
|
38
|
+
*/
|
|
39
|
+
defaultValue?: string;
|
|
32
40
|
}
|
|
33
|
-
export declare const Alert: ({ title, message, color, icon, rtlFlip, actions, onClose, type, okLabel, cancelLabel, }: AlertProps) => import("react/jsx-runtime").JSX.Element;
|
|
41
|
+
export declare const Alert: ({ title, message, color, icon, rtlFlip, actions, onClose, type, okLabel, cancelLabel, placeholder, defaultValue, }: AlertProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -44,7 +44,7 @@ export interface ModalProps extends AriaProps, TestProps, IconProps, ChildrenPro
|
|
|
44
44
|
/**
|
|
45
45
|
* close handler
|
|
46
46
|
*/
|
|
47
|
-
onClose
|
|
47
|
+
onClose?: (...args: AnyObject) => void;
|
|
48
48
|
/**
|
|
49
49
|
* before close handler, return false to prevent close
|
|
50
50
|
*/
|
|
@@ -34,6 +34,8 @@ export declare namespace CoreIcons {
|
|
|
34
34
|
const caretUp = "M7,15L12,10L17,15H7Z";
|
|
35
35
|
const expand = "M5 2c-0.828 0-1.58 0.337-2.121 0.879s-0.879 1.293-0.879 2.121v14c0 0.828 0.337 1.58 0.879 2.121s1.293 0.879 2.121 0.879h14c0.828 0 1.58-0.337 2.121-0.879s0.879-1.293 0.879-2.121v-14c0-0.828-0.337-1.58-0.879-2.121s-1.293-0.879-2.121-0.879zM5 4h14c0.276 0 0.525 0.111 0.707 0.293s0.293 0.431 0.293 0.707v14c0 0.276-0.111 0.525-0.293 0.707s-0.431 0.293-0.707 0.293h-14c-0.276 0-0.525-0.111-0.707-0.293s-0.293-0.431-0.293-0.707v-14c0-0.276 0.111-0.525 0.293-0.707s0.431-0.293 0.707-0.293zM8 13h3v3c0 0.552 0.448 1 1 1s1-0.448 1-1v-3h3c0.552 0 1-0.448 1-1s-0.448-1-1-1h-3v-3c0-0.552-0.448-1-1-1s-1 0.448-1 1v3h-3c-0.552 0-1 0.448-1 1s0.448 1 1 1z";
|
|
36
36
|
const collapse = "M5 2c-0.828 0-1.58 0.337-2.121 0.879s-0.879 1.293-0.879 2.121v14c0 0.828 0.337 1.58 0.879 2.121s1.293 0.879 2.121 0.879h14c0.828 0 1.58-0.337 2.121-0.879s0.879-1.293 0.879-2.121v-14c0-0.828-0.337-1.58-0.879-2.121s-1.293-0.879-2.121-0.879zM5 4h14c0.276 0 0.525 0.111 0.707 0.293s0.293 0.431 0.293 0.707v14c0 0.276-0.111 0.525-0.293 0.707s-0.431 0.293-0.707 0.293h-14c-0.276 0-0.525-0.111-0.707-0.293s-0.293-0.431-0.293-0.707v-14c0-0.276 0.111-0.525 0.293-0.707s0.431-0.293 0.707-0.293zM8 13h8c0.552 0 1-0.448 1-1s-0.448-1-1-1h-8c-0.552 0-1 0.448-1 1s0.448 1 1 1z";
|
|
37
|
+
const expandActive = "M17,13H13V17H11V13H7V11H11V7H13V11H17M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3Z";
|
|
38
|
+
const collapseActive = "M17,13H7V11H17M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3Z";
|
|
37
39
|
const expandAll = "M5.293 16.707l6 6c0.391 0.391 1.024 0.391 1.414 0l6-6c0.391-0.391 0.391-1.024 0-1.414s-1.024-0.391-1.414 0l-5.293 5.293-5.293-5.293c-0.391-0.391-1.024-0.391-1.414 0s-0.391 1.024 0 1.414zM18.707 7.293l-6-6c-0.391-0.391-1.024-0.391-1.414 0l-6 6c-0.391 0.391-0.391 1.024 0 1.414s1.024 0.391 1.414 0l5.293-5.293 5.293 5.293c0.391 0.391 1.024 0.391 1.414 0s0.391-1.024 0-1.414z";
|
|
38
40
|
const colapseAll = "M18.707 21.293l-6-6c-0.391-0.391-1.024-0.391-1.414 0l-6 6c-0.391 0.391-0.391 1.024 0 1.414s1.024 0.391 1.414 0l5.293-5.293 5.293 5.293c0.391 0.391 1.024 0.391 1.414 0s0.391-1.024 0-1.414zM5.293 2.707l6 6c0.391 0.391 1.024 0.391 1.414 0l6-6c0.391-0.391 0.391-1.024 0-1.414s-1.024-0.391-1.414 0l-5.293 5.293-5.293-5.293c-0.391-0.391-1.024-0.391-1.414 0s-0.391 1.024 0 1.414z";
|
|
39
41
|
const folderClosed = "M20,18H4V8H20M20,6H12L10,4H4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V8C22,6.89 21.1,6 20,6Z";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-fabric/core",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.5",
|
|
4
4
|
"description": "RUF: Core package",
|
|
5
5
|
"author": "Adarsh Pastakia <adarshpastakia@outlook.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@floating-ui/react": "^0.26.24",
|
|
39
|
-
"@react-fabric/utilities": "^1.0.0-beta.
|
|
39
|
+
"@react-fabric/utilities": "^1.0.0-beta.5",
|
|
40
40
|
"@tailwindcss/container-queries": "^0.1.1",
|
|
41
41
|
"@tailwindcss/forms": "^0.5.7",
|
|
42
42
|
"@tailwindcss/typography": "^0.5.13",
|
|
@@ -56,5 +56,5 @@
|
|
|
56
56
|
"node": ">=18.12.0",
|
|
57
57
|
"npm": ">=8.19.0"
|
|
58
58
|
},
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "7d4a7ed1ea9890652826bef58d01c31280d761c8"
|
|
60
60
|
}
|
|
@@ -156,7 +156,7 @@ export const Chip = <Tag extends React.ElementType = "div">({
|
|
|
156
156
|
classes.chip,
|
|
157
157
|
className,
|
|
158
158
|
color && getColorClass(color),
|
|
159
|
-
"select-none inline-flex flex-nowrap items-center max-w-72 text-sm
|
|
159
|
+
"select-none inline-flex flex-nowrap items-center max-w-72 text-sm rounded",
|
|
160
160
|
rounded && "rounded-full",
|
|
161
161
|
!!onClick && classes.clickable,
|
|
162
162
|
disabled && classes.disabled,
|
|
@@ -178,9 +178,7 @@ export const Chip = <Tag extends React.ElementType = "div">({
|
|
|
178
178
|
/>
|
|
179
179
|
)}
|
|
180
180
|
{children && (
|
|
181
|
-
<label
|
|
182
|
-
className={classNames(classes.chipLabel, "leading-none truncate")}
|
|
183
|
-
>
|
|
181
|
+
<label className={classNames(classes.chipLabel, "truncate")}>
|
|
184
182
|
{children}
|
|
185
183
|
</label>
|
|
186
184
|
)}
|
package/src/core/aside/Aside.tsx
CHANGED
|
@@ -23,12 +23,12 @@
|
|
|
23
23
|
|
|
24
24
|
import classNames from "classnames";
|
|
25
25
|
import {
|
|
26
|
-
type ReactNode,
|
|
27
26
|
useCallback,
|
|
28
27
|
useEffect,
|
|
29
28
|
useMemo,
|
|
30
29
|
useRef,
|
|
31
30
|
useState,
|
|
31
|
+
type ReactNode,
|
|
32
32
|
} from "react";
|
|
33
33
|
import { Loading } from "../../components/animations/Animations";
|
|
34
34
|
import { Icon } from "../../components/icon/Icon";
|
|
@@ -38,6 +38,7 @@ import { useResize } from "../../hooks/useResize";
|
|
|
38
38
|
import {
|
|
39
39
|
type ChildrenProp,
|
|
40
40
|
type CollapseProps,
|
|
41
|
+
type CssProp,
|
|
41
42
|
type Elements,
|
|
42
43
|
type IconProps,
|
|
43
44
|
type TestProps,
|
|
@@ -50,6 +51,7 @@ export interface AsideProps
|
|
|
50
51
|
extends IconProps,
|
|
51
52
|
ChildrenProp,
|
|
52
53
|
CollapseProps,
|
|
54
|
+
CssProp,
|
|
53
55
|
TestProps {
|
|
54
56
|
/**
|
|
55
57
|
* page title
|
|
@@ -67,6 +69,10 @@ export interface AsideProps
|
|
|
67
69
|
* header class
|
|
68
70
|
*/
|
|
69
71
|
headerClassName?: string;
|
|
72
|
+
/**
|
|
73
|
+
* header class
|
|
74
|
+
*/
|
|
75
|
+
bodyClassName?: string;
|
|
70
76
|
|
|
71
77
|
/**
|
|
72
78
|
* show loading indicator
|
|
@@ -109,6 +115,8 @@ export const Aside = ({
|
|
|
109
115
|
iconBg,
|
|
110
116
|
iconColor,
|
|
111
117
|
rtlFlip,
|
|
118
|
+
className,
|
|
119
|
+
bodyClassName,
|
|
112
120
|
headerClassName,
|
|
113
121
|
resizeable,
|
|
114
122
|
flyout,
|
|
@@ -189,7 +197,7 @@ export const Aside = ({
|
|
|
189
197
|
|
|
190
198
|
return (
|
|
191
199
|
<aside
|
|
192
|
-
className={classNames(classes.aside, "overflow-hidden grid")}
|
|
200
|
+
className={classNames(classes.aside, className, "overflow-hidden grid")}
|
|
193
201
|
data-align={align}
|
|
194
202
|
data-flyout={peek}
|
|
195
203
|
data-collapsed={isCollapsed}
|
|
@@ -250,7 +258,11 @@ export const Aside = ({
|
|
|
250
258
|
<section
|
|
251
259
|
ref={elementRef}
|
|
252
260
|
data-ref="asideBody"
|
|
253
|
-
className={classNames(
|
|
261
|
+
className={classNames(
|
|
262
|
+
classes.asideBody,
|
|
263
|
+
bodyClassName,
|
|
264
|
+
"overflow-hidden grid",
|
|
265
|
+
)}
|
|
254
266
|
style={isCollapsed ? widthStyles : undefined}
|
|
255
267
|
>
|
|
256
268
|
<ErrorBoundary>{children}</ErrorBoundary>
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
useRole,
|
|
32
32
|
} from "@floating-ui/react";
|
|
33
33
|
import classNames from "classnames";
|
|
34
|
-
import { useCallback, useLayoutEffect, useMemo } from "react";
|
|
34
|
+
import { useCallback, useLayoutEffect, useMemo, useState } from "react";
|
|
35
35
|
import { useTranslation } from "react-i18next";
|
|
36
36
|
import { AnimationIndicator } from "../../components/animations/Animations";
|
|
37
37
|
import { Button } from "../../components/button/Button";
|
|
@@ -71,6 +71,14 @@ export interface AlertProps extends Omit<IconProps, "iconBg" | "iconColor"> {
|
|
|
71
71
|
* cancel label
|
|
72
72
|
*/
|
|
73
73
|
cancelLabel?: string;
|
|
74
|
+
/**
|
|
75
|
+
* placeholder for prompt
|
|
76
|
+
*/
|
|
77
|
+
placeholder?: string;
|
|
78
|
+
/**
|
|
79
|
+
* default value for prompt
|
|
80
|
+
*/
|
|
81
|
+
defaultValue?: string;
|
|
74
82
|
}
|
|
75
83
|
|
|
76
84
|
export const Alert = ({
|
|
@@ -85,8 +93,11 @@ export const Alert = ({
|
|
|
85
93
|
type,
|
|
86
94
|
okLabel,
|
|
87
95
|
cancelLabel,
|
|
96
|
+
placeholder,
|
|
97
|
+
defaultValue,
|
|
88
98
|
}: AlertProps) => {
|
|
89
99
|
const { t } = useTranslation("core");
|
|
100
|
+
const [value, setValue] = useState(defaultValue);
|
|
90
101
|
const { refs, context } = useFloating({
|
|
91
102
|
open: true,
|
|
92
103
|
onOpenChange: () => {
|
|
@@ -181,6 +192,19 @@ export const Alert = ({
|
|
|
181
192
|
|
|
182
193
|
<Title className="font-medium area-[title]">{title}</Title>
|
|
183
194
|
<p className="area-[message] py-4">{message}</p>
|
|
195
|
+
{type === "prompt" && (
|
|
196
|
+
<input
|
|
197
|
+
value={value}
|
|
198
|
+
placeholder={placeholder}
|
|
199
|
+
className={classNames(
|
|
200
|
+
"border rounded focus:border-primary-500",
|
|
201
|
+
)}
|
|
202
|
+
ref={(e) => e != null && setTimeout(() => e.focus(), 100)}
|
|
203
|
+
onBlur={(e) => e.target.focus()}
|
|
204
|
+
onChange={(e) => setValue(e.target.value)}
|
|
205
|
+
onKeyDown={(e) => e.key === "Enter" && handleClose(value)}
|
|
206
|
+
/>
|
|
207
|
+
)}
|
|
184
208
|
<div className="flex gap-1 justify-center flex-nowrap pt-2 area-[actions]">
|
|
185
209
|
<div
|
|
186
210
|
className="contents"
|
package/src/types/icons.ts
CHANGED
|
@@ -90,6 +90,11 @@ export module CoreIcons {
|
|
|
90
90
|
export const collapse =
|
|
91
91
|
"M5 2c-0.828 0-1.58 0.337-2.121 0.879s-0.879 1.293-0.879 2.121v14c0 0.828 0.337 1.58 0.879 2.121s1.293 0.879 2.121 0.879h14c0.828 0 1.58-0.337 2.121-0.879s0.879-1.293 0.879-2.121v-14c0-0.828-0.337-1.58-0.879-2.121s-1.293-0.879-2.121-0.879zM5 4h14c0.276 0 0.525 0.111 0.707 0.293s0.293 0.431 0.293 0.707v14c0 0.276-0.111 0.525-0.293 0.707s-0.431 0.293-0.707 0.293h-14c-0.276 0-0.525-0.111-0.707-0.293s-0.293-0.431-0.293-0.707v-14c0-0.276 0.111-0.525 0.293-0.707s0.431-0.293 0.707-0.293zM8 13h8c0.552 0 1-0.448 1-1s-0.448-1-1-1h-8c-0.552 0-1 0.448-1 1s0.448 1 1 1z";
|
|
92
92
|
|
|
93
|
+
export const expandActive =
|
|
94
|
+
"M17,13H13V17H11V13H7V11H11V7H13V11H17M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3Z";
|
|
95
|
+
export const collapseActive =
|
|
96
|
+
"M17,13H7V11H17M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3Z";
|
|
97
|
+
|
|
93
98
|
export const expandAll =
|
|
94
99
|
"M5.293 16.707l6 6c0.391 0.391 1.024 0.391 1.414 0l6-6c0.391-0.391 0.391-1.024 0-1.414s-1.024-0.391-1.414 0l-5.293 5.293-5.293-5.293c-0.391-0.391-1.024-0.391-1.414 0s-0.391 1.024 0 1.414zM18.707 7.293l-6-6c-0.391-0.391-1.024-0.391-1.414 0l-6 6c-0.391 0.391-0.391 1.024 0 1.414s1.024 0.391 1.414 0l5.293-5.293 5.293 5.293c0.391 0.391 1.024 0.391 1.414 0s0.391-1.024 0-1.414z";
|
|
95
100
|
export const colapseAll =
|