@nextui-org/react 1.0.1-alpha.52 → 1.0.1-alpha.56
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/cjs/button/button.js +10 -18
- package/cjs/card/card-body.d.ts +35 -0
- package/cjs/card/card-body.js +73 -0
- package/cjs/card/card-context.d.ts +8 -0
- package/cjs/card/card-context.js +20 -0
- package/cjs/card/card-footer.d.ts +25 -4
- package/cjs/card/card-footer.js +56 -8
- package/cjs/card/card-header.d.ts +23 -0
- package/cjs/card/card-header.js +54 -0
- package/cjs/card/card.d.ts +25 -12
- package/cjs/card/card.js +99 -36
- package/cjs/card/index.js +8 -4
- package/cjs/card/styles.d.ts +7 -8
- package/cjs/card/styles.js +30 -60
- package/cjs/collapse/collapse-context.d.ts +9 -0
- package/cjs/collapse/collapse-context.js +20 -0
- package/cjs/collapse/collapse-group.d.ts +32 -0
- package/cjs/collapse/collapse-group.js +111 -0
- package/cjs/collapse/collapse-icon.d.ts +3 -0
- package/cjs/collapse/collapse-icon.js +39 -0
- package/cjs/collapse/collapse.d.ts +39 -0
- package/cjs/collapse/collapse.js +174 -0
- package/cjs/collapse/index.d.ts +2 -0
- package/cjs/collapse/index.js +15 -0
- package/cjs/css-baseline/css-baseline.js +3 -3
- package/cjs/divider/divider.d.ts +8 -9
- package/cjs/divider/divider.js +9 -9
- package/cjs/image/image.d.ts +9 -8
- package/cjs/image/image.js +27 -17
- package/cjs/index.d.ts +2 -0
- package/cjs/index.js +11 -1
- package/cjs/input/input-icon-clear.js +1 -1
- package/cjs/modal/modal-close-button.js +1 -1
- package/cjs/progress/index.d.ts +2 -0
- package/cjs/progress/index.js +12 -0
- package/cjs/progress/progress.d.ts +60 -0
- package/cjs/progress/progress.js +117 -0
- package/cjs/progress/styles.d.ts +8 -0
- package/cjs/progress/styles.js +47 -0
- package/cjs/radio/radio.js +3 -4
- package/cjs/text/child.d.ts +3 -5
- package/cjs/text/child.js +10 -7
- package/cjs/text/text.d.ts +5 -5
- package/cjs/text/text.js +7 -7
- package/cjs/theme/dark.js +2 -1
- package/cjs/theme/default.js +2 -1
- package/cjs/tooltip/placement.d.ts +29 -0
- package/cjs/tooltip/{position.js → placement.js} +11 -11
- package/cjs/tooltip/tooltip-content.d.ts +2 -2
- package/cjs/tooltip/tooltip-content.js +5 -5
- package/cjs/tooltip/tooltip.d.ts +5 -5
- package/cjs/tooltip/tooltip.js +3 -3
- package/cjs/use-drip/index.d.ts +2 -0
- package/cjs/use-drip/index.js +12 -0
- package/cjs/use-drip/use-drip.d.ts +9 -0
- package/cjs/use-drip/use-drip.js +38 -0
- package/cjs/{shared → utils}/clear-icon.d.ts +0 -0
- package/cjs/{shared → utils}/clear-icon.js +1 -1
- package/cjs/utils/collections.d.ts +1 -0
- package/cjs/utils/collections.js +26 -2
- package/cjs/utils/css-transition.js +1 -1
- package/cjs/{button/button.drip.d.ts → utils/drip.d.ts} +6 -2
- package/cjs/{button/button.drip.js → utils/drip.js} +13 -10
- package/cjs/utils/expand.d.ts +18 -0
- package/cjs/utils/expand.js +97 -0
- package/cjs/utils/icons.js +60 -2
- package/cjs/utils/numbers.d.ts +8 -0
- package/cjs/utils/numbers.js +15 -0
- package/cjs/utils/prop-types.d.ts +7 -2
- package/cjs/utils/prop-types.js +14 -2
- package/collapse/package.json +6 -0
- package/esm/button/button.js +10 -19
- package/esm/card/card-body.d.ts +35 -0
- package/esm/card/card-body.js +52 -0
- package/esm/card/card-context.d.ts +8 -0
- package/esm/card/card-context.js +6 -0
- package/esm/card/card-footer.d.ts +25 -4
- package/esm/card/card-footer.js +48 -8
- package/esm/card/card-header.d.ts +23 -0
- package/esm/card/card-header.js +38 -0
- package/esm/card/card.d.ts +25 -12
- package/esm/card/card.js +95 -37
- package/esm/card/index.js +6 -4
- package/esm/card/styles.d.ts +7 -8
- package/esm/card/styles.js +25 -59
- package/esm/collapse/collapse-context.d.ts +9 -0
- package/esm/collapse/collapse-context.js +6 -0
- package/esm/collapse/collapse-group.d.ts +32 -0
- package/esm/collapse/collapse-group.js +87 -0
- package/esm/collapse/collapse-icon.d.ts +3 -0
- package/esm/collapse/collapse-icon.js +27 -0
- package/esm/collapse/collapse.d.ts +39 -0
- package/esm/collapse/collapse.js +150 -0
- package/esm/collapse/index.d.ts +2 -0
- package/esm/collapse/index.js +4 -0
- package/esm/css-baseline/css-baseline.js +3 -3
- package/esm/divider/divider.d.ts +8 -9
- package/esm/divider/divider.js +9 -9
- package/esm/image/image.d.ts +9 -8
- package/esm/image/image.js +27 -18
- package/esm/index.d.ts +2 -0
- package/esm/index.js +3 -1
- package/esm/input/input-icon-clear.js +1 -1
- package/esm/modal/modal-close-button.js +1 -1
- package/esm/progress/index.d.ts +2 -0
- package/esm/progress/index.js +2 -0
- package/esm/progress/progress.d.ts +60 -0
- package/esm/progress/progress.js +93 -0
- package/esm/progress/styles.d.ts +8 -0
- package/esm/progress/styles.js +36 -0
- package/esm/radio/radio.js +3 -4
- package/esm/text/child.d.ts +3 -5
- package/esm/text/child.js +9 -7
- package/esm/text/text.d.ts +5 -5
- package/esm/text/text.js +7 -7
- package/esm/theme/dark.js +2 -1
- package/esm/theme/default.js +2 -1
- package/esm/tooltip/placement.d.ts +29 -0
- package/esm/tooltip/{position.js → placement.js} +7 -7
- package/esm/tooltip/tooltip-content.d.ts +2 -2
- package/esm/tooltip/tooltip-content.js +5 -5
- package/esm/tooltip/tooltip.d.ts +5 -5
- package/esm/tooltip/tooltip.js +3 -3
- package/esm/use-drip/index.d.ts +2 -0
- package/esm/use-drip/index.js +2 -0
- package/esm/use-drip/use-drip.d.ts +9 -0
- package/esm/use-drip/use-drip.js +31 -0
- package/esm/{shared → utils}/clear-icon.d.ts +0 -0
- package/esm/{shared → utils}/clear-icon.js +1 -1
- package/esm/utils/collections.d.ts +1 -0
- package/esm/utils/collections.js +21 -0
- package/esm/utils/css-transition.js +1 -1
- package/esm/{button/button.drip.d.ts → utils/drip.d.ts} +6 -2
- package/esm/{button/button.drip.js → utils/drip.js} +13 -10
- package/esm/utils/expand.d.ts +18 -0
- package/esm/utils/expand.js +78 -0
- package/esm/utils/icons.js +52 -0
- package/esm/utils/numbers.d.ts +8 -0
- package/esm/utils/numbers.js +10 -0
- package/esm/utils/prop-types.d.ts +7 -2
- package/esm/utils/prop-types.js +12 -1
- package/package.json +1 -1
- package/progress/package.json +6 -0
- package/umd/nextui.js +1068 -259
- package/umd/nextui.min.js +1 -1
- package/use-drip/package.json +6 -0
- package/cjs/card/card-content.d.ts +0 -13
- package/cjs/card/card-content.js +0 -43
- package/cjs/tooltip/position.d.ts +0 -29
- package/esm/card/card-content.d.ts +0 -13
- package/esm/card/card-content.js +0 -28
- package/esm/tooltip/position.d.ts +0 -29
- package/shared/package.json +0 -6
package/esm/utils/collections.js
CHANGED
|
@@ -46,4 +46,25 @@ export const isBrowser = () => {
|
|
|
46
46
|
export const isMac = () => {
|
|
47
47
|
if (!isBrowser()) return false;
|
|
48
48
|
return navigator.platform.toUpperCase().indexOf('MAC') >= 0;
|
|
49
|
+
};
|
|
50
|
+
export const setChildrenIndex = (children, targetComponents = []) => {
|
|
51
|
+
if (React.Children.count(children) === 0) return [];
|
|
52
|
+
const allowAll = targetComponents.length === 0;
|
|
53
|
+
|
|
54
|
+
const clone = (child, props = {}) => /*#__PURE__*/React.cloneElement(child, props);
|
|
55
|
+
|
|
56
|
+
let index = 0;
|
|
57
|
+
return React.Children.map(children, item => {
|
|
58
|
+
if (! /*#__PURE__*/React.isValidElement(item)) return item;
|
|
59
|
+
index = index + 1;
|
|
60
|
+
if (allowAll) return clone(item, {
|
|
61
|
+
index
|
|
62
|
+
});
|
|
63
|
+
const isAllowed = targetComponents.find(child => child === item.type);
|
|
64
|
+
if (isAllowed) return clone(item, {
|
|
65
|
+
index
|
|
66
|
+
});
|
|
67
|
+
index = index - 1;
|
|
68
|
+
return item;
|
|
69
|
+
});
|
|
49
70
|
};
|
|
@@ -1,20 +1,24 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
interface Props {
|
|
3
|
+
visible: boolean;
|
|
3
4
|
x: number;
|
|
4
5
|
y: number;
|
|
5
6
|
onCompleted: () => void;
|
|
6
7
|
color?: string;
|
|
7
8
|
}
|
|
8
9
|
declare const defaultProps: {
|
|
10
|
+
visible: boolean;
|
|
9
11
|
x: number;
|
|
10
12
|
y: number;
|
|
11
13
|
};
|
|
12
|
-
export declare type
|
|
14
|
+
export declare type DripProps = Props & typeof defaultProps;
|
|
13
15
|
declare const _default: React.ComponentType<Partial<{
|
|
16
|
+
visible: boolean;
|
|
14
17
|
x: number;
|
|
15
18
|
y: number;
|
|
16
19
|
}> & Omit<Props & {
|
|
20
|
+
visible: boolean;
|
|
17
21
|
x: number;
|
|
18
22
|
y: number;
|
|
19
|
-
}, "x" | "y">>;
|
|
23
|
+
}, "visible" | "x" | "y">>;
|
|
20
24
|
export default _default;
|
|
@@ -4,11 +4,13 @@ import withDefaults from '../utils/with-defaults';
|
|
|
4
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
5
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
6
|
const defaultProps = {
|
|
7
|
+
visible: false,
|
|
7
8
|
x: 0,
|
|
8
9
|
y: 0
|
|
9
10
|
};
|
|
10
11
|
|
|
11
|
-
const
|
|
12
|
+
const Drip = ({
|
|
13
|
+
visible,
|
|
12
14
|
x,
|
|
13
15
|
y,
|
|
14
16
|
color,
|
|
@@ -26,10 +28,11 @@ const ButtonDrip = ({
|
|
|
26
28
|
dripRef.current.removeEventListener('animationend', onCompleted);
|
|
27
29
|
};
|
|
28
30
|
});
|
|
31
|
+
if (!visible) return null;
|
|
29
32
|
return /*#__PURE__*/_jsxs("div", {
|
|
30
33
|
ref: dripRef,
|
|
31
34
|
...props,
|
|
32
|
-
className: "jsx-
|
|
35
|
+
className: "jsx-1771680452" + " " + (props && props.className != null && props.className || "drip"),
|
|
33
36
|
children: [/*#__PURE__*/_jsx("svg", {
|
|
34
37
|
width: "20",
|
|
35
38
|
height: "20",
|
|
@@ -38,30 +41,30 @@ const ButtonDrip = ({
|
|
|
38
41
|
top,
|
|
39
42
|
left
|
|
40
43
|
},
|
|
41
|
-
className: "jsx-
|
|
44
|
+
className: "jsx-1771680452",
|
|
42
45
|
children: /*#__PURE__*/_jsx("g", {
|
|
43
46
|
stroke: "none",
|
|
44
47
|
strokeWidth: "1",
|
|
45
48
|
fill: "none",
|
|
46
49
|
fillRule: "evenodd",
|
|
47
|
-
className: "jsx-
|
|
50
|
+
className: "jsx-1771680452",
|
|
48
51
|
children: /*#__PURE__*/_jsx("g", {
|
|
49
52
|
fill: color,
|
|
50
|
-
className: "jsx-
|
|
53
|
+
className: "jsx-1771680452",
|
|
51
54
|
children: /*#__PURE__*/_jsx("rect", {
|
|
52
55
|
width: "100%",
|
|
53
56
|
height: "100%",
|
|
54
57
|
rx: "10",
|
|
55
|
-
className: "jsx-
|
|
58
|
+
className: "jsx-1771680452"
|
|
56
59
|
})
|
|
57
60
|
})
|
|
58
61
|
})
|
|
59
62
|
}), /*#__PURE__*/_jsx(_JSXStyle, {
|
|
60
|
-
id: "
|
|
61
|
-
children: ".drip.jsx-
|
|
63
|
+
id: "1771680452",
|
|
64
|
+
children: ".drip.jsx-1771680452{position:absolute;left:0;right:0;top:0;bottom:0;}svg.jsx-1771680452{position:absolute;-webkit-animation:350ms linear expand-jsx-1771680452;animation:350ms linear expand-jsx-1771680452;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;width:1rem;height:1rem;}@-webkit-keyframes expand-jsx-1771680452{0%{opacity:0;-webkit-transform:scale(0.25);-ms-transform:scale(0.25);transform:scale(0.25);}30%{opacity:1;}80%{opacity:0.5;}100%{-webkit-transform:scale(28);-ms-transform:scale(28);transform:scale(28);opacity:0;}}@keyframes expand-jsx-1771680452{0%{opacity:0;-webkit-transform:scale(0.25);-ms-transform:scale(0.25);transform:scale(0.25);}30%{opacity:1;}80%{opacity:0.5;}100%{-webkit-transform:scale(28);-ms-transform:scale(28);transform:scale(28);opacity:0;}}"
|
|
62
65
|
})]
|
|
63
66
|
});
|
|
64
67
|
};
|
|
65
68
|
|
|
66
|
-
const
|
|
67
|
-
export default withDefaults(
|
|
69
|
+
const MemoDrip = /*#__PURE__*/React.memo(Drip);
|
|
70
|
+
export default withDefaults(MemoDrip, defaultProps);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface Props {
|
|
3
|
+
isExpanded?: boolean;
|
|
4
|
+
animated?: boolean;
|
|
5
|
+
delay?: number;
|
|
6
|
+
}
|
|
7
|
+
declare const defaultProps: {
|
|
8
|
+
isExpanded: boolean;
|
|
9
|
+
animated: boolean;
|
|
10
|
+
delay: number;
|
|
11
|
+
};
|
|
12
|
+
export declare type ExpandProps = Props & typeof defaultProps;
|
|
13
|
+
declare const _default: React.ComponentType<Partial<{
|
|
14
|
+
isExpanded: boolean;
|
|
15
|
+
animated: boolean;
|
|
16
|
+
delay: number;
|
|
17
|
+
}> & Omit<React.PropsWithChildren<ExpandProps>, "animated" | "isExpanded" | "delay">>;
|
|
18
|
+
export default _default;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import _JSXStyle from "styled-jsx/style";
|
|
2
|
+
import React, { useEffect, useRef, useState } from 'react';
|
|
3
|
+
import withDefaults from '../utils/with-defaults';
|
|
4
|
+
import useRealShape from '../use-real-shape';
|
|
5
|
+
import clsx from './clsx';
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
|
+
const defaultProps = {
|
|
9
|
+
isExpanded: false,
|
|
10
|
+
animated: true,
|
|
11
|
+
delay: 200
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
const Expand = ({
|
|
15
|
+
isExpanded,
|
|
16
|
+
delay,
|
|
17
|
+
animated,
|
|
18
|
+
children
|
|
19
|
+
}) => {
|
|
20
|
+
const [height, setHeight] = useState(isExpanded ? 'auto' : '0');
|
|
21
|
+
const [selfExpanded, setSelfExpanded] = useState(isExpanded);
|
|
22
|
+
const contentRef = useRef(null);
|
|
23
|
+
const entryTimer = useRef();
|
|
24
|
+
const leaveTimer = useRef();
|
|
25
|
+
const resetTimer = useRef();
|
|
26
|
+
const [state, updateShape] = useRealShape(contentRef);
|
|
27
|
+
useEffect(() => setHeight(`${state.height}px`), [state.height]);
|
|
28
|
+
useEffect(() => {
|
|
29
|
+
if (isExpanded === selfExpanded) return; // show element or reset height.
|
|
30
|
+
// force an update once manually, even if the element does not change.
|
|
31
|
+
// (the height of the element might be "auto")
|
|
32
|
+
|
|
33
|
+
if (!isExpanded) {
|
|
34
|
+
updateShape();
|
|
35
|
+
setHeight(`${state.height}px`);
|
|
36
|
+
} // show expand animation
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
entryTimer.current = window.setTimeout(() => {
|
|
40
|
+
setSelfExpanded(isExpanded);
|
|
41
|
+
clearTimeout(entryTimer.current);
|
|
42
|
+
}, 30); // Reset height after animation
|
|
43
|
+
|
|
44
|
+
if (isExpanded) {
|
|
45
|
+
resetTimer.current = window.setTimeout(() => {
|
|
46
|
+
setHeight('auto');
|
|
47
|
+
clearTimeout(resetTimer.current);
|
|
48
|
+
}, delay);
|
|
49
|
+
} else {
|
|
50
|
+
leaveTimer.current = window.setTimeout(() => {
|
|
51
|
+
clearTimeout(leaveTimer.current);
|
|
52
|
+
}, delay / 2);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
return () => {
|
|
56
|
+
clearTimeout(entryTimer.current);
|
|
57
|
+
clearTimeout(leaveTimer.current);
|
|
58
|
+
clearTimeout(resetTimer.current);
|
|
59
|
+
};
|
|
60
|
+
}, [isExpanded]);
|
|
61
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
62
|
+
className: _JSXStyle.dynamic([["2028774268", [delay, delay * 1.5, height]]]) + " " + (clsx('container', {
|
|
63
|
+
expanded: selfExpanded,
|
|
64
|
+
animated
|
|
65
|
+
}) || ""),
|
|
66
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
67
|
+
ref: contentRef,
|
|
68
|
+
className: _JSXStyle.dynamic([["2028774268", [delay, delay * 1.5, height]]]) + " " + "content",
|
|
69
|
+
children: children
|
|
70
|
+
}), /*#__PURE__*/_jsx(_JSXStyle, {
|
|
71
|
+
id: "2028774268",
|
|
72
|
+
dynamic: [delay, delay * 1.5, height],
|
|
73
|
+
children: `.container.__jsx-style-dynamic-selector{padding:0;margin:0;height:0;opacity:0;overflow:hidden;}.animated.__jsx-style-dynamic-selector{-webkit-transition:height ${delay}ms ease 0ms, opacity ${delay * 1.5}ms ease 0ms;transition:height ${delay}ms ease 0ms, opacity ${delay * 1.5}ms ease 0ms;}.expanded.__jsx-style-dynamic-selector{height:${height};opacity:1;}`
|
|
74
|
+
})]
|
|
75
|
+
});
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
export default withDefaults(Expand, defaultProps);
|
package/esm/utils/icons.js
CHANGED
|
@@ -380,4 +380,56 @@ export const Activity = ({
|
|
|
380
380
|
})]
|
|
381
381
|
})
|
|
382
382
|
});
|
|
383
|
+
};
|
|
384
|
+
export const Plus = ({
|
|
385
|
+
theme,
|
|
386
|
+
fill,
|
|
387
|
+
size,
|
|
388
|
+
height,
|
|
389
|
+
width,
|
|
390
|
+
...props
|
|
391
|
+
}) => {
|
|
392
|
+
return /*#__PURE__*/_jsx("svg", {
|
|
393
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
394
|
+
width: size || width || 24,
|
|
395
|
+
height: size || height || 24,
|
|
396
|
+
viewBox: "0 0 24 24",
|
|
397
|
+
...props,
|
|
398
|
+
children: /*#__PURE__*/_jsxs("g", {
|
|
399
|
+
fill: "none",
|
|
400
|
+
stroke: fill || theme.palette.accents_3,
|
|
401
|
+
strokeLinecap: "round",
|
|
402
|
+
strokeLinejoin: "round",
|
|
403
|
+
strokeWidth: 1.5,
|
|
404
|
+
children: [/*#__PURE__*/_jsx("path", {
|
|
405
|
+
d: "M6 12h12"
|
|
406
|
+
}), /*#__PURE__*/_jsx("path", {
|
|
407
|
+
d: "M12 18V6"
|
|
408
|
+
})]
|
|
409
|
+
})
|
|
410
|
+
});
|
|
411
|
+
};
|
|
412
|
+
export const Minus = ({
|
|
413
|
+
theme,
|
|
414
|
+
fill,
|
|
415
|
+
size,
|
|
416
|
+
height,
|
|
417
|
+
width,
|
|
418
|
+
...props
|
|
419
|
+
}) => {
|
|
420
|
+
return /*#__PURE__*/_jsx("svg", {
|
|
421
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
422
|
+
width: size || width || 24,
|
|
423
|
+
height: size || height || 24,
|
|
424
|
+
viewBox: "0 0 24 24",
|
|
425
|
+
...props,
|
|
426
|
+
children: /*#__PURE__*/_jsx("path", {
|
|
427
|
+
d: "M6 12h12",
|
|
428
|
+
fill: "none",
|
|
429
|
+
stroke: fill || theme.palette.accents_3,
|
|
430
|
+
strokeLinecap: "round",
|
|
431
|
+
strokeLinejoin: "round",
|
|
432
|
+
strokeWidth: 1.5
|
|
433
|
+
})
|
|
434
|
+
});
|
|
383
435
|
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Convert a value to percentage based on lower and upper bound values
|
|
3
|
+
*
|
|
4
|
+
* @param value the value in number
|
|
5
|
+
* @param min the minimum value
|
|
6
|
+
* @param max the maximum value
|
|
7
|
+
*/
|
|
8
|
+
export declare function valueToPercent(value: number, min: number, max: number): number;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Convert a value to percentage based on lower and upper bound values
|
|
3
|
+
*
|
|
4
|
+
* @param value the value in number
|
|
5
|
+
* @param min the minimum value
|
|
6
|
+
* @param max the maximum value
|
|
7
|
+
*/
|
|
8
|
+
export function valueToPercent(value, min, max) {
|
|
9
|
+
return (value - min) * 100 / (max - min);
|
|
10
|
+
}
|
|
@@ -8,10 +8,13 @@ export declare const extraColors: ["default", "primary", "secondary", "success",
|
|
|
8
8
|
export declare const normalLoaders: ["default", "points", "points-opacity", "gradient", "spinner"];
|
|
9
9
|
export declare const normalWeights: ["light", "normal", "bold"];
|
|
10
10
|
export declare const textWeights: ["normal", "bold", "lighter", "bolder", "inherit", "initial", "revert", "unset"];
|
|
11
|
+
export declare const textTransforms: ["none", "capitalize", "uppercase", "lowercase", "full-width", "full-size-kana", "inherit", "initial", "revert", "unset"];
|
|
11
12
|
declare const themeTypes: ["dark", "light"];
|
|
12
13
|
declare const copyTypes: ["default", "slient", "prevent"];
|
|
13
14
|
declare const triggerTypes: ["hover", "click"];
|
|
14
|
-
declare const
|
|
15
|
+
declare const placement: ["top", "topStart", "topEnd", "left", "leftStart", "leftEnd", "bottom", "bottomStart", "bottomEnd", "right", "rightStart", "rightEnd"];
|
|
16
|
+
declare const position: ["static", "relative", "absolute", "fixed", "sticky", "inherit", "initial", "revert", "unset"];
|
|
17
|
+
declare const objectFit: ["contain", "cover", "fill", "none", "scale-down", "inherit", "initial", "revert", "unset"];
|
|
15
18
|
declare const dividerAlign: ["start", "center", "end", "left", "right"];
|
|
16
19
|
declare const justify: ["flex-start", "center", "flex-end", "space-between", "space-around", "space-evenly"];
|
|
17
20
|
declare const alignItems: ["flex-start", "flex-end", "center", "stretch", "baseline"];
|
|
@@ -30,15 +33,17 @@ export declare type Wrap = typeof wrap[number];
|
|
|
30
33
|
export declare type NormalSizes = typeof normalSizes[number];
|
|
31
34
|
export declare type NormalWeights = typeof normalWeights[number];
|
|
32
35
|
export declare type TextWeights = typeof textWeights[number] | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900;
|
|
36
|
+
export declare type TextTransforms = typeof textTransforms[number];
|
|
33
37
|
export declare type NormalColors = typeof normalColors[number];
|
|
34
38
|
export declare type SimpleColors = typeof simpleColors[number];
|
|
35
39
|
export declare type TooltipColors = typeof extendedColors[number];
|
|
36
40
|
export declare type NormalLoaders = typeof normalLoaders[number];
|
|
37
41
|
export declare type ThemeTypes = typeof themeTypes[number];
|
|
38
42
|
export declare type SnippetTypes = typeof extendedColors[number];
|
|
39
|
-
export declare type CardColors = typeof extraColors[number];
|
|
40
43
|
export declare type CopyTypes = typeof copyTypes[number];
|
|
44
|
+
export declare type ObjectFit = typeof objectFit[number];
|
|
41
45
|
export declare type TriggerTypes = typeof triggerTypes[number];
|
|
46
|
+
export declare type Placement = typeof placement[number];
|
|
42
47
|
export declare type Position = typeof position[number];
|
|
43
48
|
export declare type DividerAlign = typeof dividerAlign[number];
|
|
44
49
|
export declare type ContentPosition = typeof contentPosition[number];
|
package/esm/utils/prop-types.js
CHANGED
|
@@ -13,10 +13,21 @@ export const textWeights = tuple(
|
|
|
13
13
|
'lighter', 'bolder',
|
|
14
14
|
/* Global values */
|
|
15
15
|
'inherit', 'initial', 'revert', 'unset');
|
|
16
|
+
export const textTransforms = tuple(
|
|
17
|
+
/* Keyword values */
|
|
18
|
+
'none', 'capitalize', 'uppercase', 'lowercase', 'full-width', 'full-size-kana',
|
|
19
|
+
/* Global values */
|
|
20
|
+
'inherit', 'initial', 'revert', 'unset');
|
|
16
21
|
const themeTypes = tuple('dark', 'light');
|
|
17
22
|
const copyTypes = tuple('default', 'slient', 'prevent');
|
|
18
23
|
const triggerTypes = tuple('hover', 'click');
|
|
19
|
-
const
|
|
24
|
+
const placement = tuple('top', 'topStart', 'topEnd', 'left', 'leftStart', 'leftEnd', 'bottom', 'bottomStart', 'bottomEnd', 'right', 'rightStart', 'rightEnd');
|
|
25
|
+
const position = tuple('static', 'relative', 'absolute', 'fixed', 'sticky',
|
|
26
|
+
/* Global values */
|
|
27
|
+
'inherit', 'initial', 'revert', 'unset');
|
|
28
|
+
const objectFit = tuple('contain', 'cover', 'fill', 'none', 'scale-down',
|
|
29
|
+
/* Global values */
|
|
30
|
+
'inherit', 'initial', 'revert', 'unset');
|
|
20
31
|
const dividerAlign = tuple('start', 'center', 'end', 'left', 'right');
|
|
21
32
|
const justify = tuple('flex-start', 'center', 'flex-end', 'space-between', 'space-around', 'space-evenly');
|
|
22
33
|
const alignItems = tuple('flex-start', 'flex-end', 'center', 'stretch', 'baseline');
|
package/package.json
CHANGED