@flodesk/grain 11.64.0 → 11.66.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/components/arrange/index.js +24 -32
- package/es/components/autocomplete.js +24 -42
- package/es/components/autocomplete2.js +59 -85
- package/es/components/badge.js +10 -17
- package/es/components/box.js +64 -72
- package/es/components/button.js +16 -25
- package/es/components/card.js +53 -61
- package/es/components/checkbox.js +16 -26
- package/es/components/dropdown.js +1 -9
- package/es/components/flex/index.js +22 -30
- package/es/components/ghost-input.js +12 -24
- package/es/components/icon-button.js +14 -22
- package/es/components/icon-toggle.js +13 -23
- package/es/components/icon.js +9 -16
- package/es/components/link.js +8 -15
- package/es/components/modal.js +57 -72
- package/es/components/nav/index.js +29 -41
- package/es/components/pagination.js +15 -34
- package/es/components/popover.js +18 -25
- package/es/components/progress.js +9 -19
- package/es/components/radio.js +16 -26
- package/es/components/select.js +30 -59
- package/es/components/slider.js +13 -24
- package/es/components/spinner.js +8 -17
- package/es/components/stack.js +7 -14
- package/es/components/switch.js +11 -19
- package/es/components/tab.js +14 -23
- package/es/components/text/index.js +28 -38
- package/es/components/text-button.js +14 -23
- package/es/components/text-input.js +30 -43
- package/es/components/text-toggle.js +14 -23
- package/es/components/textarea.js +18 -30
- package/es/components/toast.js +1 -9
- package/es/components/tooltip.js +22 -37
- package/es/foundational/field.js +27 -38
- package/es/foundational/menu.js +33 -47
- package/es/hooks/useKeyPress.js +0 -5
- package/es/hooks/useMedia.js +0 -2
- package/es/hooks/useOnClickOutside.js +0 -1
- package/es/hooks/useWindowSize.js +0 -1
- package/es/icons/icon-align-center.js +1 -4
- package/es/icons/icon-align-left.js +1 -4
- package/es/icons/icon-align-right.js +1 -4
- package/es/icons/icon-apple.js +1 -4
- package/es/icons/icon-archive.js +1 -4
- package/es/icons/icon-arrow-down.js +1 -4
- package/es/icons/icon-arrow-left.js +1 -4
- package/es/icons/icon-arrow-right.js +1 -4
- package/es/icons/icon-arrow-up.js +1 -4
- package/es/icons/icon-at.js +1 -4
- package/es/icons/icon-bag.js +1 -4
- package/es/icons/icon-ball.js +1 -4
- package/es/icons/icon-bold.js +1 -4
- package/es/icons/icon-bolt-filled.js +1 -4
- package/es/icons/icon-bolt.js +1 -4
- package/es/icons/icon-branching.js +1 -4
- package/es/icons/icon-browser.js +1 -4
- package/es/icons/icon-bullet-list.js +1 -4
- package/es/icons/icon-car.js +1 -4
- package/es/icons/icon-chart.js +1 -4
- package/es/icons/icon-check.js +1 -4
- package/es/icons/icon-chevron-down.js +1 -4
- package/es/icons/icon-chevron-horizontal.js +1 -4
- package/es/icons/icon-chevron-left.js +1 -4
- package/es/icons/icon-chevron-right.js +1 -4
- package/es/icons/icon-chevron-up.js +1 -4
- package/es/icons/icon-chevron-vertical.js +1 -4
- package/es/icons/icon-clip.js +1 -4
- package/es/icons/icon-clock.js +1 -4
- package/es/icons/icon-column-and-rows.js +1 -4
- package/es/icons/icon-column-one.js +1 -4
- package/es/icons/icon-column-two.js +1 -4
- package/es/icons/icon-columns-and-row.js +1 -4
- package/es/icons/icon-columns.js +1 -4
- package/es/icons/icon-content-align-bottom.js +1 -4
- package/es/icons/icon-content-align-center.js +1 -4
- package/es/icons/icon-content-align-top.js +1 -4
- package/es/icons/icon-crop.js +1 -4
- package/es/icons/icon-cross.js +1 -4
- package/es/icons/icon-diamond.js +13 -0
- package/es/icons/icon-dog.js +1 -4
- package/es/icons/icon-download.js +1 -4
- package/es/icons/icon-drag.js +1 -4
- package/es/icons/icon-duplicate.js +1 -4
- package/es/icons/icon-ellipsis.js +1 -4
- package/es/icons/icon-exit.js +1 -4
- package/es/icons/icon-file.js +1 -4
- package/es/icons/icon-flag.js +1 -4
- package/es/icons/icon-folder-add.js +1 -4
- package/es/icons/icon-folder-move.js +1 -4
- package/es/icons/icon-folder-remove.js +1 -4
- package/es/icons/icon-folder.js +1 -4
- package/es/icons/icon-footer.js +1 -4
- package/es/icons/icon-gallery.js +1 -4
- package/es/icons/icon-gear.js +1 -4
- package/es/icons/icon-globe.js +1 -4
- package/es/icons/icon-grid.js +1 -4
- package/es/icons/icon-heart.js +1 -4
- package/es/icons/icon-hide.js +1 -4
- package/es/icons/icon-image.js +1 -4
- package/es/icons/icon-info.js +1 -4
- package/es/icons/icon-italic.js +1 -4
- package/es/icons/icon-layout-text-bottom.js +1 -4
- package/es/icons/icon-layout-text-left.js +1 -4
- package/es/icons/icon-layout-text-right.js +1 -4
- package/es/icons/icon-layout-text-top.js +1 -4
- package/es/icons/icon-letter-list.js +1 -4
- package/es/icons/icon-line-dashed.js +1 -4
- package/es/icons/icon-line.js +1 -4
- package/es/icons/icon-link.js +1 -4
- package/es/icons/icon-list.js +1 -4
- package/es/icons/icon-location.js +1 -4
- package/es/icons/icon-logo-instagram.js +1 -4
- package/es/icons/icon-mail.js +1 -4
- package/es/icons/icon-minus.js +1 -4
- package/es/icons/icon-monitor.js +1 -4
- package/es/icons/icon-network.js +1 -4
- package/es/icons/icon-number-list.js +1 -4
- package/es/icons/icon-pencil-ai.js +1 -4
- package/es/icons/icon-pencil.js +1 -4
- package/es/icons/icon-phone.js +1 -4
- package/es/icons/icon-play.js +1 -4
- package/es/icons/icon-plus.js +1 -4
- package/es/icons/icon-push-button.js +1 -4
- package/es/icons/icon-qr.js +1 -4
- package/es/icons/icon-question.js +1 -4
- package/es/icons/icon-redo.js +1 -4
- package/es/icons/icon-reset.js +1 -4
- package/es/icons/icon-row-and-columns.js +1 -4
- package/es/icons/icon-rows-and-column.js +1 -4
- package/es/icons/icon-rows.js +1 -4
- package/es/icons/icon-search.js +1 -4
- package/es/icons/icon-send.js +1 -4
- package/es/icons/icon-share.js +1 -4
- package/es/icons/icon-show.js +1 -4
- package/es/icons/icon-smile.js +1 -4
- package/es/icons/icon-spacer.js +1 -4
- package/es/icons/icon-square.js +1 -4
- package/es/icons/icon-star.js +13 -0
- package/es/icons/icon-stopwatch.js +1 -4
- package/es/icons/icon-strike.js +1 -4
- package/es/icons/icon-switch.js +1 -4
- package/es/icons/icon-symbols.js +1 -4
- package/es/icons/icon-tablet.js +1 -4
- package/es/icons/icon-text-align-center.js +1 -4
- package/es/icons/icon-text-align-left.js +1 -4
- package/es/icons/icon-text-align-right.js +1 -4
- package/es/icons/icon-text-justify.js +1 -4
- package/es/icons/icon-text.js +1 -4
- package/es/icons/icon-three-branches.js +1 -4
- package/es/icons/icon-trash.js +1 -4
- package/es/icons/icon-two-branches.js +1 -4
- package/es/icons/icon-type.js +1 -4
- package/es/icons/icon-underline.js +1 -4
- package/es/icons/icon-undo.js +1 -4
- package/es/icons/icon-upload.js +1 -4
- package/es/icons/index.js +3 -1
- package/es/styles/card.js +31 -19
- package/es/styles/utilities.js +0 -4
- package/es/styles/variables.js +1 -1
- package/es/types/components/modal.d.ts +2 -1
- package/es/types/components/text.d.ts +1 -1
- package/es/utilities/attributes.js +2 -7
- package/es/utilities/responsive.js +0 -14
- package/es/utilities/style-config.js +0 -3
- package/es/utilities/styles.js +0 -7
- package/es/variables/vars.js +6 -6
- package/package.json +1 -1
package/es/icons/icon-symbols.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
2
|
-
|
|
1
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
3
2
|
import * as React from 'react';
|
|
4
3
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
5
|
-
|
|
6
4
|
const IconSymbols = props => ___EmotionJSX("svg", _extends({
|
|
7
5
|
viewBox: "0 0 32 36",
|
|
8
6
|
fill: "none",
|
|
@@ -13,6 +11,5 @@ const IconSymbols = props => ___EmotionJSX("svg", _extends({
|
|
|
13
11
|
d: "M0 3.5A1.5 1.5 0 0 1 1.5 2h12a1.5 1.5 0 0 1 0 3h-12A1.5 1.5 0 0 1 0 3.5m0 4A1.5 1.5 0 0 1 1.5 6h12a1.5 1.5 0 0 1 0 3H9v6.5a1.5 1.5 0 0 1-3 0V9H1.5A1.5 1.5 0 0 1 0 7.5m25.646-5.233a1.5 1.5 0 0 1 1.38-.171l2.596.973A3.66 3.66 0 0 1 32 6.5a1.5 1.5 0 0 1-3 0 .66.66 0 0 0-.431-.622L28 5.665V13c0 1.394-.9 2.43-1.877 3.04-.997.623-2.282.96-3.623.96-1.34 0-2.626-.337-3.623-.96C17.9 15.43 17 14.394 17 13s.9-2.43 1.877-3.04C19.874 9.337 21.159 9 22.5 9a7.4 7.4 0 0 1 2.5.42V3.5a1.5 1.5 0 0 1 .646-1.233m-.703 10.6C25 12.95 25 12.99 25 13V13c0 .008 0 .049-.057.132a1.4 1.4 0 0 1-.41.364c-.45.281-1.165.504-2.033.504s-1.583-.223-2.033-.504a1.4 1.4 0 0 1-.41-.364C20 13.05 20 13.008 20 13s0-.049.057-.132c.062-.093.188-.225.41-.364.45-.281 1.165-.504 2.033-.504s1.583.223 2.033.504c.222.139.348.271.41.364M23 22a3 3 0 1 1-6 0 3 3 0 0 1 6 0m9 9a3 3 0 1 1-6 0 3 3 0 0 1 6 0m-.44-9.44a1.5 1.5 0 0 0-2.12-2.12l-12 12a1.5 1.5 0 0 0 2.12 2.12zM4 22.536c0-.295.24-.535.535-.535h1.91a.555.555 0 0 1 .361.976l-1.259 1.08-1.35-1.106A.54.54 0 0 1 4 22.535m4.759 2.719-.853.73 2.193 1.795 1.34-1.34a1.5 1.5 0 0 1 2.122 2.122l-1.128 1.128 2.017 1.65a1.5 1.5 0 0 1-1.9 2.322l-2.25-1.84-.86.861A4.5 4.5 0 0 1 6.256 34H3.555a3.555 3.555 0 0 1-2.314-6.254l1.993-1.708-.937-.766A3.535 3.535 0 0 1 4.535 19h1.91a3.555 3.555 0 0 1 2.314 6.254m-5.565 4.77 2.398-2.056 2.375 1.943-.649.65a1.5 1.5 0 0 1-1.06.439H3.554a.555.555 0 0 1-.361-.976",
|
|
14
12
|
clipRule: "evenodd"
|
|
15
13
|
}));
|
|
16
|
-
|
|
17
14
|
IconSymbols.viewBoxWidth = 32;
|
|
18
15
|
export default IconSymbols;
|
package/es/icons/icon-tablet.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
2
|
-
|
|
1
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
3
2
|
import * as React from 'react';
|
|
4
3
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
5
|
-
|
|
6
4
|
const IconTablet = props => ___EmotionJSX("svg", _extends({
|
|
7
5
|
viewBox: "0 0 28 36",
|
|
8
6
|
fill: "none",
|
|
@@ -13,6 +11,5 @@ const IconTablet = props => ___EmotionJSX("svg", _extends({
|
|
|
13
11
|
d: "M4.5 1A4.5 4.5 0 0 0 0 5.5v25A4.5 4.5 0 0 0 4.5 35h19a4.5 4.5 0 0 0 4.5-4.5v-25A4.5 4.5 0 0 0 23.5 1zM3 5.5A1.5 1.5 0 0 1 4.5 4h19A1.5 1.5 0 0 1 25 5.5v25a1.5 1.5 0 0 1-1.5 1.5h-19A1.5 1.5 0 0 1 3 30.5zM9.5 26a1.5 1.5 0 0 0 0 3h9a1.5 1.5 0 0 0 0-3h-9",
|
|
14
12
|
clipRule: "evenodd"
|
|
15
13
|
}));
|
|
16
|
-
|
|
17
14
|
IconTablet.viewBoxWidth = 28;
|
|
18
15
|
export default IconTablet;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
2
|
-
|
|
1
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
3
2
|
import * as React from 'react';
|
|
4
3
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
5
|
-
|
|
6
4
|
const IconTextAlignCenter = props => ___EmotionJSX("svg", _extends({
|
|
7
5
|
viewBox: "0 0 34 36",
|
|
8
6
|
fill: "none",
|
|
@@ -13,6 +11,5 @@ const IconTextAlignCenter = props => ___EmotionJSX("svg", _extends({
|
|
|
13
11
|
d: "M5 9.5A1.5 1.5 0 0 1 6.5 8h21a1.5 1.5 0 0 1 0 3h-21A1.5 1.5 0 0 1 5 9.5m4 17a1.5 1.5 0 0 1 1.5-1.5h13a1.5 1.5 0 0 1 0 3h-13A1.5 1.5 0 0 1 9 26.5m-7.5-10a1.5 1.5 0 0 0 0 3h31a1.5 1.5 0 0 0 0-3z",
|
|
14
12
|
clipRule: "evenodd"
|
|
15
13
|
}));
|
|
16
|
-
|
|
17
14
|
IconTextAlignCenter.viewBoxWidth = 34;
|
|
18
15
|
export default IconTextAlignCenter;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
2
|
-
|
|
1
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
3
2
|
import * as React from 'react';
|
|
4
3
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
5
|
-
|
|
6
4
|
const IconTextAlignLeft = props => ___EmotionJSX("svg", _extends({
|
|
7
5
|
viewBox: "0 0 34 36",
|
|
8
6
|
fill: "none",
|
|
@@ -13,6 +11,5 @@ const IconTextAlignLeft = props => ___EmotionJSX("svg", _extends({
|
|
|
13
11
|
d: "M0 9.5A1.5 1.5 0 0 1 1.5 8h21a1.5 1.5 0 0 1 0 3h-21A1.5 1.5 0 0 1 0 9.5m0 17A1.5 1.5 0 0 1 1.5 25h13a1.5 1.5 0 0 1 0 3h-13A1.5 1.5 0 0 1 0 26.5m1.5-10a1.5 1.5 0 0 0 0 3h31a1.5 1.5 0 0 0 0-3z",
|
|
14
12
|
clipRule: "evenodd"
|
|
15
13
|
}));
|
|
16
|
-
|
|
17
14
|
IconTextAlignLeft.viewBoxWidth = 34;
|
|
18
15
|
export default IconTextAlignLeft;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
2
|
-
|
|
1
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
3
2
|
import * as React from 'react';
|
|
4
3
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
5
|
-
|
|
6
4
|
const IconTextAlignRight = props => ___EmotionJSX("svg", _extends({
|
|
7
5
|
viewBox: "0 0 34 36",
|
|
8
6
|
fill: "none",
|
|
@@ -13,6 +11,5 @@ const IconTextAlignRight = props => ___EmotionJSX("svg", _extends({
|
|
|
13
11
|
d: "M10 9.5A1.5 1.5 0 0 1 11.5 8h21a1.5 1.5 0 0 1 0 3h-21A1.5 1.5 0 0 1 10 9.5m8 17a1.5 1.5 0 0 1 1.5-1.5h13a1.5 1.5 0 0 1 0 3h-13a1.5 1.5 0 0 1-1.5-1.5m-16.5-10a1.5 1.5 0 0 0 0 3h31a1.5 1.5 0 0 0 0-3z",
|
|
14
12
|
clipRule: "evenodd"
|
|
15
13
|
}));
|
|
16
|
-
|
|
17
14
|
IconTextAlignRight.viewBoxWidth = 34;
|
|
18
15
|
export default IconTextAlignRight;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
2
|
-
|
|
1
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
3
2
|
import * as React from 'react';
|
|
4
3
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
5
|
-
|
|
6
4
|
const IconTextJustify = props => ___EmotionJSX("svg", _extends({
|
|
7
5
|
viewBox: "0 0 34 36",
|
|
8
6
|
fill: "none",
|
|
@@ -13,6 +11,5 @@ const IconTextJustify = props => ___EmotionJSX("svg", _extends({
|
|
|
13
11
|
d: "M0 9.5A1.5 1.5 0 0 1 1.5 8h31a1.5 1.5 0 0 1 0 3h-31A1.5 1.5 0 0 1 0 9.5m0 17A1.5 1.5 0 0 1 1.5 25h31a1.5 1.5 0 0 1 0 3h-31A1.5 1.5 0 0 1 0 26.5m1.5-10a1.5 1.5 0 0 0 0 3h31a1.5 1.5 0 0 0 0-3z",
|
|
14
12
|
clipRule: "evenodd"
|
|
15
13
|
}));
|
|
16
|
-
|
|
17
14
|
IconTextJustify.viewBoxWidth = 34;
|
|
18
15
|
export default IconTextJustify;
|
package/es/icons/icon-text.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
2
|
-
|
|
1
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
3
2
|
import * as React from 'react';
|
|
4
3
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
5
|
-
|
|
6
4
|
const IconText = props => ___EmotionJSX("svg", _extends({
|
|
7
5
|
viewBox: "0 0 34 36",
|
|
8
6
|
fill: "none",
|
|
@@ -11,6 +9,5 @@ const IconText = props => ___EmotionJSX("svg", _extends({
|
|
|
11
9
|
fill: "currentColor",
|
|
12
10
|
d: "M14.5 25a1.5 1.5 0 0 1 0 3h-13a1.5 1.5 0 0 1 0-3zm18-8.5a1.5 1.5 0 0 1 0 3h-31a1.5 1.5 0 0 1 0-3zm.153-8.492a1.5 1.5 0 0 1 0 2.984L32.5 11h-31a1.5 1.5 0 0 1 0-3h31z"
|
|
13
11
|
}));
|
|
14
|
-
|
|
15
12
|
IconText.viewBoxWidth = 34;
|
|
16
13
|
export default IconText;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
2
|
-
|
|
1
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
3
2
|
import * as React from 'react';
|
|
4
3
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
5
|
-
|
|
6
4
|
const IconThreeBranches = props => ___EmotionJSX("svg", _extends({
|
|
7
5
|
viewBox: "0 0 32 36",
|
|
8
6
|
fill: "none",
|
|
@@ -11,6 +9,5 @@ const IconThreeBranches = props => ___EmotionJSX("svg", _extends({
|
|
|
11
9
|
fill: "currentColor",
|
|
12
10
|
d: "M16 8a1.5 1.5 0 0 1-1.5-1.5v-3a1.5 1.5 0 0 1 3 0v3A1.5 1.5 0 0 1 16 8m-.023 18a1.5 1.5 0 0 1-1.497-1.502l.01-6.492A7.47 7.47 0 0 1 9.997 19.5H6A1.5 1.5 0 0 0 4.5 21v3.493a1.5 1.5 0 0 1-3 0V21A4.5 4.5 0 0 1 6 16.5h3.998a4.5 4.5 0 0 0 4.5-4.486l.002-.519.008-.152a1.5 1.5 0 0 1 2.992.152l.002.519a4.5 4.5 0 0 0 4.5 4.486H26a4.5 4.5 0 0 1 4.5 4.5v3.493a1.5 1.5 0 0 1-3 0V21a1.5 1.5 0 0 0-1.5-1.5h-3.998a7.47 7.47 0 0 1-4.512-1.51l-.01 6.512A1.5 1.5 0 0 1 15.978 26M29 34a3 3 0 1 1 0-6 3 3 0 0 1 0 6m-13 0a3 3 0 1 1 0-6 3 3 0 0 1 0 6M3 34a3 3 0 1 1 0-6 3 3 0 0 1 0 6"
|
|
13
11
|
}));
|
|
14
|
-
|
|
15
12
|
IconThreeBranches.viewBoxWidth = 32;
|
|
16
13
|
export default IconThreeBranches;
|
package/es/icons/icon-trash.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
2
|
-
|
|
1
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
3
2
|
import * as React from 'react';
|
|
4
3
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
5
|
-
|
|
6
4
|
const IconTrash = props => ___EmotionJSX("svg", _extends({
|
|
7
5
|
viewBox: "0 0 32 36",
|
|
8
6
|
fill: "none",
|
|
@@ -13,6 +11,5 @@ const IconTrash = props => ___EmotionJSX("svg", _extends({
|
|
|
13
11
|
d: "M16 5a5.25 5.25 0 0 0-4.744 3h9.49A5.25 5.25 0 0 0 16 5m0-3a8.254 8.254 0 0 0-7.94 6H1.5a1.5 1.5 0 0 0 0 3H4.08l1.577 18.875A4.5 4.5 0 0 0 10.14 34h11.72a4.5 4.5 0 0 0 4.485-4.125L27.922 11H30.5a1.5 1.5 0 0 0 0-3h-6.56A8.254 8.254 0 0 0 16 2m8.912 9H7.09l1.555 18.625A1.5 1.5 0 0 0 10.14 31h11.72a1.5 1.5 0 0 0 1.495-1.375z",
|
|
14
12
|
clipRule: "evenodd"
|
|
15
13
|
}));
|
|
16
|
-
|
|
17
14
|
IconTrash.viewBoxWidth = 32;
|
|
18
15
|
export default IconTrash;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
2
|
-
|
|
1
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
3
2
|
import * as React from 'react';
|
|
4
3
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
5
|
-
|
|
6
4
|
const IconTwoBranches = props => ___EmotionJSX("svg", _extends({
|
|
7
5
|
viewBox: "0 0 32 36",
|
|
8
6
|
fill: "none",
|
|
@@ -11,6 +9,5 @@ const IconTwoBranches = props => ___EmotionJSX("svg", _extends({
|
|
|
11
9
|
fill: "currentColor",
|
|
12
10
|
d: "M16 8a1.5 1.5 0 0 1-1.5-1.5v-3a1.5 1.5 0 0 1 3 0v3A1.5 1.5 0 0 1 16 8M5.5 34A5.5 5.5 0 0 1 4 23.209V21a4.5 4.5 0 0 1 4.5-4.5h1.498a4.5 4.5 0 0 0 4.5-4.486l.002-.519a1.5 1.5 0 0 1 3 0l.002.519a4.5 4.5 0 0 0 4.5 4.486H23.5A4.5 4.5 0 0 1 28 21v2.209a5.5 5.5 0 1 1-3 0V21a1.5 1.5 0 0 0-1.5-1.5h-1.498A7.49 7.49 0 0 1 16 16.498 7.49 7.49 0 0 1 9.998 19.5H8.5A1.5 1.5 0 0 0 7 21v2.209A5.5 5.5 0 0 1 5.5 34m21-3a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5m-21 0a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5"
|
|
13
11
|
}));
|
|
14
|
-
|
|
15
12
|
IconTwoBranches.viewBoxWidth = 32;
|
|
16
13
|
export default IconTwoBranches;
|
package/es/icons/icon-type.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
2
|
-
|
|
1
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
3
2
|
import * as React from 'react';
|
|
4
3
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
5
|
-
|
|
6
4
|
const IconType = props => ___EmotionJSX("svg", _extends({
|
|
7
5
|
viewBox: "0 0 16 36",
|
|
8
6
|
fill: "none",
|
|
@@ -13,6 +11,5 @@ const IconType = props => ___EmotionJSX("svg", _extends({
|
|
|
13
11
|
d: "M0 4.5A1.5 1.5 0 0 1 1.5 3h13a1.5 1.5 0 0 1 0 3h-5v24h5a1.5 1.5 0 0 1 0 3h-13a1.5 1.5 0 0 1 0-3h5V6h-5A1.5 1.5 0 0 1 0 4.5",
|
|
14
12
|
clipRule: "evenodd"
|
|
15
13
|
}));
|
|
16
|
-
|
|
17
14
|
IconType.viewBoxWidth = 16;
|
|
18
15
|
export default IconType;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
2
|
-
|
|
1
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
3
2
|
import * as React from 'react';
|
|
4
3
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
5
|
-
|
|
6
4
|
const IconUnderline = props => ___EmotionJSX("svg", _extends({
|
|
7
5
|
viewBox: "0 0 32 36",
|
|
8
6
|
fill: "none",
|
|
@@ -13,6 +11,5 @@ const IconUnderline = props => ___EmotionJSX("svg", _extends({
|
|
|
13
11
|
d: "M16.0 25C21.0 25 25.0 21.0 25.0 16V3.5C25.0 2.7 25.7 2 26.5 2C27.3 2 28.0 2.7 28.0 3.5V16C28.0 22.6 22.6 28 16.0 28C9.4 28 4.0 22.6 4.0 16L4.0 3.5C4.0 2.7 4.7 2 5.5 2C6.3 2 7.0 2.7 7.0 3.5L7.0 16C7.0 21.0 11.0 25 16.0 25ZM1.5 34C0.7 34 0.0 33.3 0.0 32.5C0.0 31.7 0.7 31 1.5 31H30.5C31.3 31 32.0 31.7 32.0 32.5C32.0 33.3 31.3 34 30.5 34H1.5Z",
|
|
14
12
|
fill: "currentColor"
|
|
15
13
|
}));
|
|
16
|
-
|
|
17
14
|
IconUnderline.viewBoxWidth = 32;
|
|
18
15
|
export default IconUnderline;
|
package/es/icons/icon-undo.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
2
|
-
|
|
1
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
3
2
|
import * as React from 'react';
|
|
4
3
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
5
|
-
|
|
6
4
|
const IconUndo = props => ___EmotionJSX("svg", _extends({
|
|
7
5
|
viewBox: "0 0 32 36",
|
|
8
6
|
fill: "none",
|
|
@@ -13,6 +11,5 @@ const IconUndo = props => ___EmotionJSX("svg", _extends({
|
|
|
13
11
|
d: "M9.9 23.6C10.5 24.1 11.5 24.1 12.1 23.6C12.6 23.0 12.6 22.0 12.1 21.4L5.1 14.5H20.8C25.3 14.5 29 18.2 29 22.8C29 27.3 25.3 31 20.8 31L19.5 31C18.7 31 18 31.7 18 32.5C18 33.3 18.7 34 19.5 34L20.8 34C27.0 34 32 29.0 32 22.8C32 16.5 27.0 11.5 20.8 11.5H5.1L12.1 4.6C12.6 4.0 12.6 3.0 12.1 2.4C11.5 1.9 10.5 1.9 9.9 2.4L0.4 11.9C0.2 12.2 -7.4e-07 12.6 0 13.0C6.7e-08 13.4 0.2 13.8 0.4 14.1L9.9 23.6Z",
|
|
14
12
|
fill: "currentColor"
|
|
15
13
|
}));
|
|
16
|
-
|
|
17
14
|
IconUndo.viewBoxWidth = 32;
|
|
18
15
|
export default IconUndo;
|
package/es/icons/icon-upload.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
2
|
-
|
|
1
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
3
2
|
import * as React from 'react';
|
|
4
3
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
5
|
-
|
|
6
4
|
const IconUpload = props => ___EmotionJSX("svg", _extends({
|
|
7
5
|
viewBox: "0 0 32 36",
|
|
8
6
|
fill: "none",
|
|
@@ -13,6 +11,5 @@ const IconUpload = props => ___EmotionJSX("svg", _extends({
|
|
|
13
11
|
d: "M29.6 17.1C30.2 16.5 30.2 15.5 29.6 14.9L17.1 2.4C16.8 2.2 16.4 2 16.0 2C15.6 2 15.2 2.2 14.9 2.4L2.4 14.9C1.9 15.5 1.9 16.5 2.4 17.1C3.0 17.6 4.0 17.6 4.6 17.1L14.5 7.1L14.5 27.5C14.5 28.3 15.2 29.0 16.0 29.0C16.8 29.0 17.5 28.3 17.5 27.5L17.5 7.1L27.4 17.1C28.0 17.6 29.0 17.6 29.6 17.1ZM1.5 31C0.7 31 -3.6e-08 31.7 0 32.5C3.6e-08 33.3 0.7 34 1.5 34H30.5C31.3 34 32 33.3 32 32.5C32 31.7 31.3 31 30.5 31H1.5Z",
|
|
14
12
|
fill: "currentColor"
|
|
15
13
|
}));
|
|
16
|
-
|
|
17
14
|
IconUpload.viewBoxWidth = 32;
|
|
18
15
|
export default IconUpload;
|
package/es/icons/index.js
CHANGED
|
@@ -111,4 +111,6 @@ export { default as IconText } from './icon-text';
|
|
|
111
111
|
export { default as IconNetwork } from './icon-network';
|
|
112
112
|
export { default as IconBag } from './icon-bag';
|
|
113
113
|
export { default as IconTwoBranches } from './icon-two-branches';
|
|
114
|
-
export { default as IconThreeBranches } from './icon-three-branches';
|
|
114
|
+
export { default as IconThreeBranches } from './icon-three-branches';
|
|
115
|
+
export { default as IconDiamond } from './icon-diamond';
|
|
116
|
+
export { default as IconStar } from './icon-star';
|
package/es/styles/card.js
CHANGED
|
@@ -1,37 +1,49 @@
|
|
|
1
|
-
const
|
|
1
|
+
const bp1 = 120;
|
|
2
|
+
const bp2 = bp1 + 8 * 10;
|
|
3
|
+
const bp3 = bp2 + 8 * 15;
|
|
4
|
+
const bp4 = bp3 + 8 * 19;
|
|
5
|
+
const bp5 = bp4 + 8 * 22;
|
|
6
|
+
const bp6 = bp5 + 8 * 24;
|
|
2
7
|
export const cardRanges = [{
|
|
3
|
-
min:
|
|
4
|
-
max:
|
|
8
|
+
min: bp1,
|
|
9
|
+
max: bp2 - 1,
|
|
5
10
|
padding: 'm',
|
|
6
|
-
radius: 'm'
|
|
11
|
+
radius: 'm',
|
|
12
|
+
titleSize: 'l'
|
|
7
13
|
}, {
|
|
8
|
-
min:
|
|
9
|
-
max:
|
|
14
|
+
min: bp2,
|
|
15
|
+
max: bp3 - 1,
|
|
10
16
|
padding: 'l',
|
|
11
|
-
radius: 'm'
|
|
17
|
+
radius: 'm',
|
|
18
|
+
titleSize: 'l'
|
|
12
19
|
}, {
|
|
13
|
-
min:
|
|
14
|
-
max:
|
|
20
|
+
min: bp3,
|
|
21
|
+
max: bp4 - 1,
|
|
15
22
|
padding: 'l2',
|
|
16
|
-
radius: 'l'
|
|
23
|
+
radius: 'l',
|
|
24
|
+
titleSize: 'xl'
|
|
17
25
|
}, {
|
|
18
|
-
min:
|
|
19
|
-
max:
|
|
26
|
+
min: bp4,
|
|
27
|
+
max: bp5 - 1,
|
|
20
28
|
padding: 'xl',
|
|
21
|
-
radius: 'l'
|
|
29
|
+
radius: 'l',
|
|
30
|
+
titleSize: 'xl'
|
|
22
31
|
}, {
|
|
23
|
-
min:
|
|
24
|
-
max:
|
|
32
|
+
min: bp5,
|
|
33
|
+
max: bp6 - 1,
|
|
25
34
|
padding: 'xl2',
|
|
26
|
-
radius: 'l'
|
|
35
|
+
radius: 'l',
|
|
36
|
+
titleSize: 'xl'
|
|
27
37
|
}, {
|
|
28
|
-
min:
|
|
38
|
+
min: bp6,
|
|
29
39
|
max: 100000,
|
|
30
40
|
padding: 'xxl',
|
|
31
|
-
radius: 'l'
|
|
41
|
+
radius: 'l',
|
|
42
|
+
titleSize: 'xl'
|
|
32
43
|
}];
|
|
33
|
-
const fallback = "\n @supports not (container-type: inline-size) {\n .grn-card {\n --grn-card-radius: var(--grn-radius-".concat(cardRanges[2].radius, ");\n --grn-card-padding: var(--grn-space-").concat(cardRanges[2].padding, ");\n }\n }\n");
|
|
44
|
+
const fallback = "\n @supports not (container-type: inline-size) {\n .grn-card {\n --grn-card-radius: var(--grn-radius-".concat(cardRanges[2].radius, ");\n --grn-card-padding: var(--grn-space-").concat(cardRanges[2].padding, ");\n }\n }\n");
|
|
34
45
|
|
|
46
|
+
// prevents floating elements from rendering below other elements
|
|
35
47
|
const cardWithFloating = "\n .grn-card-container:has(.MenuCard) {\n position: relative;\n z-index: 1;\n }\n";
|
|
36
48
|
const card = "\n .grn-card-container { container-type: inline-size }\n\n .grn-card {\n --grn-card-radius: var(--grn-radius-".concat(cardRanges[0].radius, ");\n --grn-card-padding: var(--grn-space-").concat(cardRanges[0].padding, ");\n }\n\n ").concat(cardRanges.map(range => "\n @container (".concat(range.min, "px <= inline-size) {\n .grn-card {\n --grn-card-radius: var(--grn-radius-").concat(range.radius, ");\n --grn-card-padding: var(--grn-space-").concat(range.padding, ");\n }\n }\n ")).join(' '), "\n\n ").concat(fallback, "\n ").concat(cardWithFloating, "\n");
|
|
37
49
|
export default card;
|
package/es/styles/utilities.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import "core-js/modules/web.dom-collections.iterator.js";
|
|
2
2
|
import { styleConfig } from '../utilities';
|
|
3
3
|
import { propNameToShort } from '../utilities/style-config';
|
|
4
|
-
|
|
5
4
|
const generateUtilityClassDeclarations = propertySets => {
|
|
6
5
|
let css = '';
|
|
7
6
|
propertySets.forEach(set => {
|
|
@@ -19,7 +18,6 @@ const generateUtilityClassDeclarations = propertySets => {
|
|
|
19
18
|
});
|
|
20
19
|
return css;
|
|
21
20
|
};
|
|
22
|
-
|
|
23
21
|
const generateStyleClassDeclarations = (breakpoints, propertySets) => {
|
|
24
22
|
let css = '';
|
|
25
23
|
propertySets.forEach(set => {
|
|
@@ -31,7 +29,6 @@ const generateStyleClassDeclarations = (breakpoints, propertySets) => {
|
|
|
31
29
|
const declaration = "{".concat(property, ": var(").concat(cssVar, ")}");
|
|
32
30
|
if (!hasHover) css += "[style*=\"".concat(cssVar, ":\"] ").concat(declaration);
|
|
33
31
|
if (hasHover) css += "[style*=\"".concat(cssVar, ":\"]:hover ").concat(declaration);
|
|
34
|
-
|
|
35
32
|
if (set.isResponsive) {
|
|
36
33
|
const device = 'default';
|
|
37
34
|
css += "\n [style*=\"".concat(cssVar, "-").concat(device, "\"] {").concat(property, ": var(").concat(cssVar, "-").concat(device, ")}\n ");
|
|
@@ -45,7 +42,6 @@ const generateStyleClassDeclarations = (breakpoints, propertySets) => {
|
|
|
45
42
|
});
|
|
46
43
|
return css;
|
|
47
44
|
};
|
|
48
|
-
|
|
49
45
|
const {
|
|
50
46
|
spaceProps,
|
|
51
47
|
colorProps,
|
package/es/styles/variables.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const variables = "\n :root {\n --grn-unit: 8px;\n }\n\n :root {\n --grn-text-s: 12px;\n --grn-text-m: 14px;\n --grn-text-l: 18px;\n --grn-text-xl: 24px;\n --grn-text-xxl: 30px;\n }\n\n /* text size \u2715 ~1.2 */\n :root {\n --grn-icon-s: 14px;\n --grn-icon-m: 18px;\n --grn-icon-l: 22px;\n --grn-icon-xl: 28px;\n --grn-icon-xxl: 36px;\n }\n\n :root {\n --grn-weight-normal: 400;\n --grn-weight-medium: 500;\n }\n\n :root {\n --grn-space-xs: calc(var(--grn-unit) / 2);\n --grn-space-s: calc(var(--grn-unit) * 1);\n --grn-space-s2: calc(var(--grn-unit) * 1.5);\n --grn-space-m: calc(var(--grn-unit) * 2);\n --grn-space-l: calc(var(--grn-unit) * 3);\n --grn-space-l2: calc(var(--grn-unit) * 4);\n --grn-space-xl: calc(var(--grn-unit) * 5);\n --grn-space-xl2: calc(var(--grn-unit) * 6);\n --grn-space-xxl: calc(var(--grn-unit) * 7);\n }\n\n :root {\n --grn-radius-xs: 3px;\n --grn-radius-s: 6px;\n --grn-radius-m: 8px;\n --grn-radius-l: 10px;\n }\n\n [data-experiment-new-brand-radii=\"true\"] {\n --grn-radius-xs: 4px;\n --grn-radius-s: 8px;\n --grn-radius-m: 12px;\n --grn-radius-l: 16px;\n }\n\n :root {\n --grn-transition-slow: 400ms;\n --grn-transition-fast: 200ms;\n --grn-transition-xFast: 160ms;\n --grn-transition-xxFast: 80ms;\n }\n";
|
|
1
|
+
const variables = "\n :root {\n --grn-unit: 8px;\n }\n\n :root {\n --grn-text-s: 12px;\n --grn-text-m: 14px;\n --grn-text-l: 18px;\n --grn-text-xl: 24px;\n --grn-text-xxl: 30px;\n }\n\n /* text size \u2715 ~1.2 */\n :root {\n --grn-icon-s: 14px;\n --grn-icon-m: 18px;\n --grn-icon-l: 22px;\n --grn-icon-xl: 28px;\n --grn-icon-xxl: 36px;\n }\n\n :root {\n --grn-weight-normal: 400;\n --grn-weight-medium: 500;\n }\n\n :root {\n --grn-space-xs: calc(var(--grn-unit) / 2);\n --grn-space-s: calc(var(--grn-unit) * 1);\n --grn-space-s2: calc(var(--grn-unit) * 1.5);\n --grn-space-m: calc(var(--grn-unit) * 2);\n --grn-space-l: calc(var(--grn-unit) * 3);\n --grn-space-l2: calc(var(--grn-unit) * 4);\n --grn-space-xl: calc(var(--grn-unit) * 5);\n --grn-space-xl2: calc(var(--grn-unit) * 6);\n --grn-space-xxl: calc(var(--grn-unit) * 7);\n }\n\n :root {\n --grn-radius-xs: 3px;\n --grn-radius-s: 6px;\n --grn-radius-m: 8px;\n --grn-radius-l: 10px;\n }\n\n :root:has(body[data-experiment-squircle=\"true\"]) {\n --rr: 2.2;\n\n --grn-radius-xs: calc(3px * var(--rr));\n --grn-radius-s: calc(6px * var(--rr));\n --grn-radius-m: calc(8px * var(--rr));\n --grn-radius-l: calc(10px * var(--rr));\n }\n [data-experiment-squircle=\"true\"] * {\n corner-shape: squircle;\n }\n [data-experiment-squircle=\"true\"] .extgwng0,\n [data-experiment-squircle=\"true\"] .ez8kn7b1 {\n corner-shape: round !important;\n }\n\n\n [data-experiment-new-brand-radii=\"true\"] {\n --grn-radius-xs: 4px;\n --grn-radius-s: 8px;\n --grn-radius-m: 12px;\n --grn-radius-l: 16px;\n }\n\n :root {\n --grn-transition-slow: 400ms;\n --grn-transition-fast: 200ms;\n --grn-transition-xFast: 160ms;\n --grn-transition-xxFast: 80ms;\n }\n";
|
|
2
2
|
export default variables;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { FC, ForwardRefExoticComponent, RefAttributes, HTMLAttributes } from 'react';
|
|
2
|
-
import { DimensionPropType, RadiusPropType } from '../shared';
|
|
2
|
+
import { DimensionPropType, RadiusPropType, TextWrapType } from '../shared';
|
|
3
3
|
|
|
4
4
|
export interface ModalProps extends HTMLAttributes<HTMLDivElement> {
|
|
5
5
|
children?: React.ReactNode;
|
|
@@ -7,6 +7,7 @@ export interface ModalProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
7
7
|
onClose?: () => void;
|
|
8
8
|
hasCloseButton?: boolean;
|
|
9
9
|
title?: React.ReactNode;
|
|
10
|
+
titleWrap?: TextWrapType;
|
|
10
11
|
description?: React.ReactNode;
|
|
11
12
|
cardPadding?: DimensionPropType;
|
|
12
13
|
cardMaxWidth?: number | string | 'narrow' | 'medium' | 'wide';
|
|
@@ -22,7 +22,7 @@ export interface TextProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
22
22
|
align?: TextAlignType;
|
|
23
23
|
letterSpacing?: string;
|
|
24
24
|
textTransform?: TextTransformType;
|
|
25
|
-
|
|
25
|
+
wrap?: TextWrapType;
|
|
26
26
|
variant?: 'caps';
|
|
27
27
|
trimTop?: boolean;
|
|
28
28
|
trimBottom?: boolean;
|
|
@@ -2,7 +2,6 @@ import "core-js/modules/web.dom-collections.iterator.js";
|
|
|
2
2
|
import "core-js/modules/es.string.trim.js";
|
|
3
3
|
import { isObject } from './helpers';
|
|
4
4
|
import { propNameToShort, styleConfig } from './style-config';
|
|
5
|
-
|
|
6
5
|
const getValueWithBackup = value => {
|
|
7
6
|
const mediaQueries = {
|
|
8
7
|
'@media (max-width: 1169px)': 'tablet',
|
|
@@ -14,12 +13,10 @@ const getValueWithBackup = value => {
|
|
|
14
13
|
} else {
|
|
15
14
|
acc[key] = value[key];
|
|
16
15
|
}
|
|
17
|
-
|
|
18
16
|
return acc;
|
|
19
17
|
}, {});
|
|
20
18
|
return valueWithBackup;
|
|
21
19
|
};
|
|
22
|
-
|
|
23
20
|
export const generateStyleAttributes = _ref => {
|
|
24
21
|
let {
|
|
25
22
|
styleProps,
|
|
@@ -40,11 +37,8 @@ export const generateStyleAttributes = _ref => {
|
|
|
40
37
|
if (value === undefined || value === null) return;
|
|
41
38
|
const hasVariable = variableChecker && variableChecker(value);
|
|
42
39
|
if (hasVariable) return;
|
|
43
|
-
|
|
44
40
|
const processValue = val => valueTransformer ? valueTransformer(val) : val;
|
|
45
|
-
|
|
46
41
|
const propNameShort = propNameToShort(propName);
|
|
47
|
-
|
|
48
42
|
if (!isObject(value)) {
|
|
49
43
|
styles["--".concat(propNameShort)] = processValue(value);
|
|
50
44
|
} else {
|
|
@@ -61,8 +55,9 @@ export const generateStyleAttributes = _ref => {
|
|
|
61
55
|
};
|
|
62
56
|
export const generateClassNameAttributes = props => {
|
|
63
57
|
const classNames = [];
|
|
64
|
-
const styleConfigValues = Object.values(styleConfig);
|
|
58
|
+
const styleConfigValues = Object.values(styleConfig);
|
|
65
59
|
|
|
60
|
+
// Create a map for quick propName lookup
|
|
66
61
|
const styleConfigMap = new Map();
|
|
67
62
|
styleConfigValues.forEach(item => {
|
|
68
63
|
item.props.forEach(propItem => {
|
|
@@ -11,11 +11,9 @@ export const getMediaCss = (mediaQuery, property, value) => {
|
|
|
11
11
|
if (isNumber(val)) return u(val);
|
|
12
12
|
if (isString(val)) return val;
|
|
13
13
|
};
|
|
14
|
-
|
|
15
14
|
if (mediaQuery === 'default') {
|
|
16
15
|
return "".concat(property, ": ").concat(getValue(value), ";");
|
|
17
16
|
}
|
|
18
|
-
|
|
19
17
|
if (mediaQuery in mediaQueries) {
|
|
20
18
|
return "\n ".concat(mediaQueries[mediaQuery], " {\n ").concat(property, ": ").concat(getValue(value), ";\n }\n ");
|
|
21
19
|
} else {
|
|
@@ -27,10 +25,8 @@ export const mapObjToMedia = (property, obj, type) => {
|
|
|
27
25
|
if (type && value in vars[type]) {
|
|
28
26
|
return getCssVar(varInfo[type].name, value);
|
|
29
27
|
}
|
|
30
|
-
|
|
31
28
|
return value;
|
|
32
29
|
};
|
|
33
|
-
|
|
34
30
|
const declarations = Object.entries(obj).map(_ref => {
|
|
35
31
|
let [mediaQuery, value] = _ref;
|
|
36
32
|
return getMediaCss(mediaQuery, property, checkValueInVars(value));
|
|
@@ -49,52 +45,42 @@ export const getSpace = space => {
|
|
|
49
45
|
if (space in vars.spaces) {
|
|
50
46
|
return getCssVar(varInfo.spaces.name, space);
|
|
51
47
|
}
|
|
52
|
-
|
|
53
48
|
if (space === 0) return '0';
|
|
54
49
|
if (isString(space)) return space;
|
|
55
50
|
if (isNumber(space)) return u(space);
|
|
56
51
|
};
|
|
57
52
|
export const getResponsiveDimension = (property, dimension) => {
|
|
58
53
|
if (!dimension) return;
|
|
59
|
-
|
|
60
54
|
if (isObject(dimension)) {
|
|
61
55
|
return mapObjToMedia(property, dimension, varInfo.spaces.name);
|
|
62
56
|
}
|
|
63
|
-
|
|
64
57
|
return "".concat(property, ": ").concat(getDimension(dimension));
|
|
65
58
|
};
|
|
66
59
|
export const getResponsiveSpace = (property, space) => {
|
|
67
60
|
if (!space) return;
|
|
68
|
-
|
|
69
61
|
if (isObject(space)) {
|
|
70
62
|
return mapObjToMedia(property, space, varInfo.spaces.name);
|
|
71
63
|
}
|
|
72
|
-
|
|
73
64
|
return "".concat(property, ": ").concat(getSpace(space));
|
|
74
65
|
};
|
|
75
66
|
export const getTextSize = size => {
|
|
76
67
|
if (size in vars.texts) {
|
|
77
68
|
return getCssVar(varInfo.texts.name, size);
|
|
78
69
|
}
|
|
79
|
-
|
|
80
70
|
if (isString(size)) return size;
|
|
81
71
|
};
|
|
82
72
|
export const getResponsiveOneOf = (property, value) => {
|
|
83
73
|
if (!value) return;
|
|
84
|
-
|
|
85
74
|
if (isObject(value)) {
|
|
86
75
|
return mapObjToMedia(property, value);
|
|
87
76
|
}
|
|
88
|
-
|
|
89
77
|
return "".concat(property, ": ").concat(value);
|
|
90
78
|
};
|
|
91
79
|
export const getResponsiveTextSize = size => {
|
|
92
80
|
if (!size) return;
|
|
93
81
|
const property = 'font-size';
|
|
94
|
-
|
|
95
82
|
if (isObject(size)) {
|
|
96
83
|
return mapObjToMedia(property, size, varInfo.texts.name);
|
|
97
84
|
}
|
|
98
|
-
|
|
99
85
|
return "".concat(property, ": ").concat(getTextSize(size));
|
|
100
86
|
};
|
|
@@ -9,7 +9,6 @@ const radii = Object.keys(vars.radii);
|
|
|
9
9
|
const transitions = Object.keys(vars.transitions);
|
|
10
10
|
const sizes = Object.keys(vars.texts);
|
|
11
11
|
const weights = Object.keys(vars.weights);
|
|
12
|
-
|
|
13
12
|
const borderSideToStyle = side => {
|
|
14
13
|
if (side === 'all') return 'solid';
|
|
15
14
|
const borderConfig = {
|
|
@@ -23,7 +22,6 @@ const borderSideToStyle = side => {
|
|
|
23
22
|
const borderStyles = ['top', 'right', 'bottom', 'left'].map(s => borderConfig[side].includes(s) ? 'solid' : 'none');
|
|
24
23
|
return borderStyles.join(' ');
|
|
25
24
|
};
|
|
26
|
-
|
|
27
25
|
export const styleConfig = {
|
|
28
26
|
spaceProps: {
|
|
29
27
|
props: [{
|
|
@@ -370,7 +368,6 @@ export const styleConfig = {
|
|
|
370
368
|
propName: 'display',
|
|
371
369
|
property: 'display',
|
|
372
370
|
short: 'ds' // instead of 'd' to avoid conflict with _display.scss in frontend
|
|
373
|
-
|
|
374
371
|
}],
|
|
375
372
|
variables: textDisplays,
|
|
376
373
|
variableChecker: value => textDisplays.includes(value)
|
package/es/utilities/styles.js
CHANGED
|
@@ -6,7 +6,6 @@ export const getColor = color => {
|
|
|
6
6
|
if (color in vars.colors) {
|
|
7
7
|
return getCssVar(varInfo.colors.name, color);
|
|
8
8
|
}
|
|
9
|
-
|
|
10
9
|
return color;
|
|
11
10
|
};
|
|
12
11
|
export const isShadowVar = shadow => shadow in vars.shadows;
|
|
@@ -14,7 +13,6 @@ export const getShadow = shadow => {
|
|
|
14
13
|
if (isShadowVar(shadow)) {
|
|
15
14
|
return getCssVar(varInfo.shadows.name, shadow);
|
|
16
15
|
}
|
|
17
|
-
|
|
18
16
|
return shadow;
|
|
19
17
|
};
|
|
20
18
|
export const getWeight = weight => {
|
|
@@ -27,7 +25,6 @@ export const getRadius = radius => {
|
|
|
27
25
|
if (isRadiusVar(radius)) {
|
|
28
26
|
return getCssVar(varInfo.radii.name, radius);
|
|
29
27
|
}
|
|
30
|
-
|
|
31
28
|
if (radius === 0) return radius;
|
|
32
29
|
if (isString(radius)) return radius;
|
|
33
30
|
if (isNumber(radius)) return u(radius);
|
|
@@ -37,14 +34,12 @@ export const getTransition = transition => {
|
|
|
37
34
|
if (transition in vars.transitions) {
|
|
38
35
|
return getCssVar(varInfo.transitions.name, transition);
|
|
39
36
|
}
|
|
40
|
-
|
|
41
37
|
return transition;
|
|
42
38
|
};
|
|
43
39
|
export const getIconSize = size => {
|
|
44
40
|
if (size in vars.icons) {
|
|
45
41
|
return getCssVar(varInfo.icons.name, size);
|
|
46
42
|
}
|
|
47
|
-
|
|
48
43
|
return getDimension(size);
|
|
49
44
|
};
|
|
50
45
|
export const getBorder = function (borderSide) {
|
|
@@ -60,11 +55,9 @@ export const getBorder = function (borderSide) {
|
|
|
60
55
|
right: ["right"]
|
|
61
56
|
};
|
|
62
57
|
const value = "".concat(getDimension(borderWidth), " solid ").concat(getColor(borderColor));
|
|
63
|
-
|
|
64
58
|
const getSide = side => {
|
|
65
59
|
return side ? "border-".concat(side) : "border";
|
|
66
60
|
};
|
|
67
|
-
|
|
68
61
|
if (borderSide in sidesObj) {
|
|
69
62
|
return sidesObj[borderSide].map(side => "".concat(getSide(side), ": ").concat(value)).join(';');
|
|
70
63
|
}
|
package/es/variables/vars.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
function _objectSpread(
|
|
4
|
-
|
|
5
|
-
function
|
|
6
|
-
|
|
1
|
+
import "core-js/modules/es.symbol.description.js";
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
7
|
import { colors } from './colors';
|
|
8
8
|
export const grnPrefix = '--grn-';
|
|
9
9
|
export const vars = {
|