@activecollab/components 2.0.506 → 2.0.507
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/dist/cjs/components/ObjectFormModal/ObjectFormModal.js +117 -0
- package/dist/cjs/components/ObjectFormModal/ObjectFormModal.js.map +1 -0
- package/dist/cjs/components/ObjectFormModal/Styles.js +28 -0
- package/dist/cjs/components/ObjectFormModal/Styles.js.map +1 -0
- package/dist/cjs/components/ObjectFormModal/index.js +17 -0
- package/dist/cjs/components/ObjectFormModal/index.js.map +1 -0
- package/dist/cjs/components/PropertyList/PropertyList.js +27 -7
- package/dist/cjs/components/PropertyList/PropertyList.js.map +1 -1
- package/dist/cjs/components/PropertyList/Styles.js +38 -29
- package/dist/cjs/components/PropertyList/Styles.js.map +1 -1
- package/dist/cjs/components/index.js +11 -0
- package/dist/cjs/components/index.js.map +1 -1
- package/dist/cjs/hooks/useInputHours.js +6 -1
- package/dist/cjs/hooks/useInputHours.js.map +1 -1
- package/dist/cjs/hooks/useInputNumber.js +6 -1
- package/dist/cjs/hooks/useInputNumber.js.map +1 -1
- package/dist/esm/components/ObjectFormModal/ObjectFormModal.d.ts +24 -0
- package/dist/esm/components/ObjectFormModal/ObjectFormModal.d.ts.map +1 -0
- package/dist/esm/components/ObjectFormModal/ObjectFormModal.js +101 -0
- package/dist/esm/components/ObjectFormModal/ObjectFormModal.js.map +1 -0
- package/dist/esm/components/ObjectFormModal/Styles.d.ts +7 -0
- package/dist/esm/components/ObjectFormModal/Styles.d.ts.map +1 -0
- package/dist/esm/components/ObjectFormModal/Styles.js +15 -0
- package/dist/esm/components/ObjectFormModal/Styles.js.map +1 -0
- package/dist/esm/components/ObjectFormModal/index.d.ts +2 -0
- package/dist/esm/components/ObjectFormModal/index.d.ts.map +1 -0
- package/dist/esm/components/ObjectFormModal/index.js +2 -0
- package/dist/esm/components/ObjectFormModal/index.js.map +1 -0
- package/dist/esm/components/PropertyList/PropertyList.d.ts +5 -0
- package/dist/esm/components/PropertyList/PropertyList.d.ts.map +1 -1
- package/dist/esm/components/PropertyList/PropertyList.js +24 -6
- package/dist/esm/components/PropertyList/PropertyList.js.map +1 -1
- package/dist/esm/components/PropertyList/Styles.d.ts +4 -1
- package/dist/esm/components/PropertyList/Styles.d.ts.map +1 -1
- package/dist/esm/components/PropertyList/Styles.js +38 -29
- package/dist/esm/components/PropertyList/Styles.js.map +1 -1
- package/dist/esm/components/index.d.ts +1 -0
- package/dist/esm/components/index.d.ts.map +1 -1
- package/dist/esm/components/index.js +1 -0
- package/dist/esm/components/index.js.map +1 -1
- package/dist/esm/hooks/useInputHours.d.ts.map +1 -1
- package/dist/esm/hooks/useInputHours.js +6 -1
- package/dist/esm/hooks/useInputHours.js.map +1 -1
- package/dist/esm/hooks/useInputNumber.d.ts.map +1 -1
- package/dist/esm/hooks/useInputNumber.js +6 -1
- package/dist/esm/hooks/useInputNumber.js.map +1 -1
- package/dist/index.js +948 -799
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.ObjectFormModal = void 0;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
9
|
+
var _Styles = require("./Styles");
|
|
10
|
+
var _helpers = require("../../helpers");
|
|
11
|
+
var _utils = require("../../utils");
|
|
12
|
+
var _Styles2 = require("../Dialog/Styles");
|
|
13
|
+
var _useFluidHeightAnimation = require("../Dialog/useFluidHeightAnimation");
|
|
14
|
+
var _Icons = require("../Icons");
|
|
15
|
+
var _Modal = require("../Modal");
|
|
16
|
+
var _SlideFromTop = require("../Transitions/SlideFromTop");
|
|
17
|
+
var _excluded = ["children", "open", "onClose", "label", "size", "enableBackgroundClick", "disableCloseOnEsc", "disableFocusLock", "fill", "closeButton", "closeLabel", "className"];
|
|
18
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
19
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
20
|
+
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); }
|
|
21
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
22
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
23
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
24
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
25
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
26
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
27
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
28
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
29
|
+
// A sheet puts its content on a lower layer. The form modal always covers the page, the menu and the sheet.
|
|
30
|
+
var MODAL_LAYER = {
|
|
31
|
+
zIndex: _utils.layers.skyscraper
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
// Modal only treats a child as a transition when its props already carry `in`.
|
|
35
|
+
var ObjectFormModalSurface = function ObjectFormModalSurface(_ref) {
|
|
36
|
+
var _ref$in = _ref.in,
|
|
37
|
+
inProp = _ref$in === void 0 ? false : _ref$in,
|
|
38
|
+
onEnter = _ref.onEnter,
|
|
39
|
+
onExited = _ref.onExited,
|
|
40
|
+
children = _ref.children;
|
|
41
|
+
return /*#__PURE__*/_react.default.createElement(_Styles2.StyledDialogViewport, {
|
|
42
|
+
className: "c-object-form-modal-viewport"
|
|
43
|
+
}, /*#__PURE__*/_react.default.createElement(_SlideFromTop.SlideFromTop, {
|
|
44
|
+
in: inProp,
|
|
45
|
+
onEnter: onEnter,
|
|
46
|
+
onExited: onExited
|
|
47
|
+
}, children));
|
|
48
|
+
};
|
|
49
|
+
ObjectFormModalSurface.displayName = "ObjectFormModalSurface";
|
|
50
|
+
var ObjectFormModal = exports.ObjectFormModal = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, ref) {
|
|
51
|
+
var _dialogSizes$size;
|
|
52
|
+
var children = _ref2.children,
|
|
53
|
+
_ref2$open = _ref2.open,
|
|
54
|
+
open = _ref2$open === void 0 ? false : _ref2$open,
|
|
55
|
+
onClose = _ref2.onClose,
|
|
56
|
+
label = _ref2.label,
|
|
57
|
+
_ref2$size = _ref2.size,
|
|
58
|
+
size = _ref2$size === void 0 ? "s" : _ref2$size,
|
|
59
|
+
_ref2$enableBackgroun = _ref2.enableBackgroundClick,
|
|
60
|
+
enableBackgroundClick = _ref2$enableBackgroun === void 0 ? false : _ref2$enableBackgroun,
|
|
61
|
+
_ref2$disableCloseOnE = _ref2.disableCloseOnEsc,
|
|
62
|
+
disableCloseOnEsc = _ref2$disableCloseOnE === void 0 ? false : _ref2$disableCloseOnE,
|
|
63
|
+
_ref2$disableFocusLoc = _ref2.disableFocusLock,
|
|
64
|
+
disableFocusLock = _ref2$disableFocusLoc === void 0 ? false : _ref2$disableFocusLoc,
|
|
65
|
+
_ref2$fill = _ref2.fill,
|
|
66
|
+
fill = _ref2$fill === void 0 ? false : _ref2$fill,
|
|
67
|
+
_ref2$closeButton = _ref2.closeButton,
|
|
68
|
+
closeButton = _ref2$closeButton === void 0 ? false : _ref2$closeButton,
|
|
69
|
+
_ref2$closeLabel = _ref2.closeLabel,
|
|
70
|
+
closeLabel = _ref2$closeLabel === void 0 ? "Close" : _ref2$closeLabel,
|
|
71
|
+
className = _ref2.className,
|
|
72
|
+
rest = _objectWithoutProperties(_ref2, _excluded);
|
|
73
|
+
var _useState = (0, _react.useState)(null),
|
|
74
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
75
|
+
surfaceNode = _useState2[0],
|
|
76
|
+
setSurfaceNode = _useState2[1];
|
|
77
|
+
var setSurface = (0, _react.useCallback)(function (node) {
|
|
78
|
+
setSurfaceNode(node);
|
|
79
|
+
if (typeof ref === "function") {
|
|
80
|
+
ref(node);
|
|
81
|
+
} else if (ref) {
|
|
82
|
+
ref.current = node;
|
|
83
|
+
}
|
|
84
|
+
}, [ref]);
|
|
85
|
+
(0, _useFluidHeightAnimation.useFluidHeightAnimation)(surfaceNode, true);
|
|
86
|
+
return /*#__PURE__*/_react.default.createElement(_helpers.LayerContextProvider, {
|
|
87
|
+
value: MODAL_LAYER
|
|
88
|
+
}, /*#__PURE__*/_react.default.createElement(_Modal.Modal, {
|
|
89
|
+
open: open,
|
|
90
|
+
onClose: onClose,
|
|
91
|
+
disableBackgroundClick: !enableBackgroundClick,
|
|
92
|
+
disableCloseOnEsc: disableCloseOnEsc,
|
|
93
|
+
disableFocusLock: disableFocusLock,
|
|
94
|
+
overlayTimeout: {
|
|
95
|
+
enter: _SlideFromTop.SLIDE_FROM_TOP_ENTER,
|
|
96
|
+
exit: _SlideFromTop.SLIDE_FROM_TOP_EXIT
|
|
97
|
+
}
|
|
98
|
+
}, /*#__PURE__*/_react.default.createElement(ObjectFormModalSurface, {
|
|
99
|
+
in: open
|
|
100
|
+
}, /*#__PURE__*/_react.default.createElement(_Styles.StyledObjectFormModal, _extends({}, rest, {
|
|
101
|
+
ref: setSurface,
|
|
102
|
+
role: "dialog",
|
|
103
|
+
"aria-modal": "true",
|
|
104
|
+
"aria-label": label,
|
|
105
|
+
$maxWidth: (_dialogSizes$size = _Styles2.dialogSizes[size]) !== null && _dialogSizes$size !== void 0 ? _dialogSizes$size : _Styles2.dialogSizes.s,
|
|
106
|
+
$fill: fill || closeButton,
|
|
107
|
+
$closeButton: closeButton,
|
|
108
|
+
className: (0, _classnames.default)("c-object-form-modal", className)
|
|
109
|
+
}), closeButton ? /*#__PURE__*/_react.default.createElement(_Styles.StyledObjectFormModalClose, {
|
|
110
|
+
type: "button",
|
|
111
|
+
className: "c-object-form-modal-close",
|
|
112
|
+
"aria-label": closeLabel,
|
|
113
|
+
onClick: onClose
|
|
114
|
+
}, /*#__PURE__*/_react.default.createElement(_Icons.CancelCrossIcon, null)) : null, children))));
|
|
115
|
+
});
|
|
116
|
+
ObjectFormModal.displayName = "ObjectFormModal";
|
|
117
|
+
//# sourceMappingURL=ObjectFormModal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ObjectFormModal.js","names":["_react","_interopRequireWildcard","require","_classnames","_interopRequireDefault","_Styles","_helpers","_utils","_Styles2","_useFluidHeightAnimation","_Icons","_Modal","_SlideFromTop","_excluded","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","_extends","assign","bind","arguments","length","apply","_slicedToArray","_arrayWithHoles","_iterableToArrayLimit","_unsupportedIterableToArray","_nonIterableRest","TypeError","a","_arrayLikeToArray","toString","slice","constructor","name","Array","from","test","l","Symbol","iterator","u","next","done","push","value","return","isArray","_objectWithoutProperties","_objectWithoutPropertiesLoose","getOwnPropertySymbols","indexOf","propertyIsEnumerable","MODAL_LAYER","zIndex","layers","skyscraper","ObjectFormModalSurface","_ref","_ref$in","in","inProp","onEnter","onExited","children","createElement","StyledDialogViewport","className","SlideFromTop","displayName","ObjectFormModal","exports","forwardRef","_ref2","ref","_dialogSizes$size","_ref2$open","open","onClose","label","_ref2$size","size","_ref2$enableBackgroun","enableBackgroundClick","_ref2$disableCloseOnE","disableCloseOnEsc","_ref2$disableFocusLoc","disableFocusLock","_ref2$fill","fill","_ref2$closeButton","closeButton","_ref2$closeLabel","closeLabel","rest","_useState","useState","_useState2","surfaceNode","setSurfaceNode","setSurface","useCallback","node","current","useFluidHeightAnimation","LayerContextProvider","Modal","disableBackgroundClick","overlayTimeout","enter","SLIDE_FROM_TOP_ENTER","exit","SLIDE_FROM_TOP_EXIT","StyledObjectFormModal","role","$maxWidth","dialogSizes","s","$fill","$closeButton","classnames","StyledObjectFormModalClose","type","onClick","CancelCrossIcon"],"sources":["../../../../src/components/ObjectFormModal/ObjectFormModal.tsx"],"sourcesContent":["import React, {\n forwardRef,\n HTMLAttributes,\n PropsWithChildren,\n ReactElement,\n useCallback,\n useState,\n} from \"react\";\n\nimport classnames from \"classnames\";\n\nimport { StyledObjectFormModal, StyledObjectFormModalClose } from \"./Styles\";\nimport { LayerContextProvider } from \"../../helpers\";\nimport { layers } from \"../../utils\";\nimport {\n DialogSize,\n dialogSizes,\n StyledDialogViewport,\n} from \"../Dialog/Styles\";\nimport { useFluidHeightAnimation } from \"../Dialog/useFluidHeightAnimation\";\nimport { CancelCrossIcon } from \"../Icons\";\nimport { Modal } from \"../Modal\";\nimport {\n SlideFromTop,\n SLIDE_FROM_TOP_ENTER,\n SLIDE_FROM_TOP_EXIT,\n} from \"../Transitions/SlideFromTop\";\n\nexport interface ObjectFormModalProps extends HTMLAttributes<HTMLDivElement> {\n open?: boolean;\n onClose?: () => void;\n /** Accessible name of the modal, for example \"New Event\". The modal draws no title. */\n label: string;\n /** Width step, the same scale as Dialog. Every step is a max-width. */\n size?: DialogSize;\n /** A click outside keeps the modal open by default, so a form with text in it never closes by accident. */\n enableBackgroundClick?: boolean;\n disableCloseOnEsc?: boolean;\n disableFocusLock?: boolean;\n /** The surface becomes a column, so one part of the content can scroll in place of the modal. */\n fill?: boolean;\n /** A close button beside the top right corner. It turns `fill` on. */\n closeButton?: boolean;\n closeLabel?: string;\n className?: string;\n}\n\ninterface ObjectFormModalSurfaceProps {\n in?: boolean;\n onEnter?: () => void;\n onExited?: () => void;\n children: ReactElement;\n}\n\n// A sheet puts its content on a lower layer. The form modal always covers the page, the menu and the sheet.\nconst MODAL_LAYER = { zIndex: layers.skyscraper };\n\n// Modal only treats a child as a transition when its props already carry `in`.\nconst ObjectFormModalSurface = ({\n in: inProp = false,\n onEnter,\n onExited,\n children,\n}: ObjectFormModalSurfaceProps) => (\n <StyledDialogViewport className=\"c-object-form-modal-viewport\">\n <SlideFromTop in={inProp} onEnter={onEnter} onExited={onExited}>\n {children}\n </SlideFromTop>\n </StyledDialogViewport>\n);\n\nObjectFormModalSurface.displayName = \"ObjectFormModalSurface\";\n\nexport const ObjectFormModal = forwardRef<\n HTMLDivElement,\n PropsWithChildren<ObjectFormModalProps>\n>(\n (\n {\n children,\n open = false,\n onClose,\n label,\n size = \"s\",\n enableBackgroundClick = false,\n disableCloseOnEsc = false,\n disableFocusLock = false,\n fill = false,\n closeButton = false,\n closeLabel = \"Close\",\n className,\n ...rest\n },\n ref\n ) => {\n const [surfaceNode, setSurfaceNode] = useState<HTMLDivElement | null>(null);\n\n const setSurface = useCallback(\n (node: HTMLDivElement | null) => {\n setSurfaceNode(node);\n\n if (typeof ref === \"function\") {\n ref(node);\n } else if (ref) {\n ref.current = node;\n }\n },\n [ref]\n );\n\n useFluidHeightAnimation(surfaceNode, true);\n\n return (\n <LayerContextProvider value={MODAL_LAYER}>\n <Modal\n open={open}\n onClose={onClose}\n disableBackgroundClick={!enableBackgroundClick}\n disableCloseOnEsc={disableCloseOnEsc}\n disableFocusLock={disableFocusLock}\n overlayTimeout={{\n enter: SLIDE_FROM_TOP_ENTER,\n exit: SLIDE_FROM_TOP_EXIT,\n }}\n >\n <ObjectFormModalSurface in={open}>\n <StyledObjectFormModal\n {...rest}\n ref={setSurface}\n role=\"dialog\"\n aria-modal=\"true\"\n aria-label={label}\n $maxWidth={dialogSizes[size] ?? dialogSizes.s}\n $fill={fill || closeButton}\n $closeButton={closeButton}\n className={classnames(\"c-object-form-modal\", className)}\n >\n {closeButton ? (\n <StyledObjectFormModalClose\n type=\"button\"\n className=\"c-object-form-modal-close\"\n aria-label={closeLabel}\n onClick={onClose}\n >\n <CancelCrossIcon />\n </StyledObjectFormModalClose>\n ) : null}\n {children}\n </StyledObjectFormModal>\n </ObjectFormModalSurface>\n </Modal>\n </LayerContextProvider>\n );\n }\n);\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AA,CAAC7E,OAAA,CAAA6H,qBAAqB,EAAAhG,QAAA,KAChB6E,IAAI;IACRpB,GAAG,EAAE0B,UAAW;IAChBc,IAAI,EAAC,QAAQ;IACb,cAAW,MAAM;IACjB,cAAYnC,KAAM;IAClBoC,SAAS,GAAAxC,iBAAA,GAAEyC,oBAAW,CAACnC,IAAI,CAAC,cAAAN,iBAAA,cAAAA,iBAAA,GAAIyC,oBAAW,CAACC,CAAE;IAC9CC,KAAK,EAAE7B,IAAI,IAAIE,WAAY;IAC3B4B,YAAY,EAAE5B,WAAY;IAC1BxB,SAAS,EAAE,IAAAqD,mBAAU,EAAC,qBAAqB,EAAErD,SAAS;EAAE,IAEvDwB,WAAW,gBACV5G,MAAA,CAAAgB,OAAA,CAAAkE,aAAA,CAAC7E,OAAA,CAAAqI,0BAA0B;IACzBC,IAAI,EAAC,QAAQ;IACbvD,SAAS,EAAC,2BAA2B;IACrC,cAAY0B,UAAW;IACvB8B,OAAO,EAAE7C;EAAQ,gBAEjB/F,MAAA,CAAAgB,OAAA,CAAAkE,aAAA,CAACxE,MAAA,CAAAmI,eAAe,MAAE,CACQ,CAAC,GAC3B,IAAI,EACP5D,QACoB,CACD,CACnB,CACa,CAAC;AAE3B,CACF,CAAC;AAEDM,eAAe,CAACD,WAAW,GAAG,iBAAiB","ignoreList":[]}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.StyledObjectFormModalClose = exports.StyledObjectFormModal = void 0;
|
|
7
|
+
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
8
|
+
var _BoxSizingStyle = require("../BoxSizingStyle");
|
|
9
|
+
var _FontStyle = require("../FontStyle");
|
|
10
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
11
|
+
var MAX_HEIGHT = "95vh";
|
|
12
|
+
var StyledObjectFormModalClose = exports.StyledObjectFormModalClose = _styledComponents.default.button.withConfig({
|
|
13
|
+
displayName: "Styles__StyledObjectFormModalClose",
|
|
14
|
+
componentId: "sc-vysvjm-0"
|
|
15
|
+
})(["position:absolute;top:-1px;left:calc(100% + 8px);display:flex;align-items:center;justify-content:center;width:48px;height:48px;padding:0;cursor:pointer;background-color:var(--color-theme-200);border:1px solid var(--border-raised);box-shadow:var(--shadow-primary);border-radius:24px;&:hover{filter:brightness(1.1);}svg{width:24px;height:24px;fill:var(--color-theme-700);}"]);
|
|
16
|
+
StyledObjectFormModalClose.displayName = "StyledObjectFormModalClose";
|
|
17
|
+
var StyledObjectFormModal = exports.StyledObjectFormModal = _styledComponents.default.div.withConfig({
|
|
18
|
+
displayName: "Styles__StyledObjectFormModal",
|
|
19
|
+
componentId: "sc-vysvjm-1"
|
|
20
|
+
})(["flex:0 0 auto;pointer-events:auto;position:relative;width:100%;max-width:", "px;max-height:", ";padding:20px;overflow-y:auto;overscroll-behavior:contain;background-color:var(--color-theme-200);color:var(--color-theme-900);border:1px solid var(--border-raised);box-shadow:var(--shadow-primary);border-radius:24px;&[data-resizing]{overflow:hidden;}", " ", " ", " ", ""], function (props) {
|
|
21
|
+
return props.$maxWidth;
|
|
22
|
+
}, MAX_HEIGHT, function (props) {
|
|
23
|
+
return props.$fill && (0, _styledComponents.css)(["display:flex;flex-direction:column;> :not(.c-object-form-modal-close){min-height:0;}"]);
|
|
24
|
+
}, function (props) {
|
|
25
|
+
return props.$closeButton && (0, _styledComponents.css)(["&,&[data-resizing]{overflow:visible;}&[data-resizing] > :not(.c-object-form-modal-close){overflow:hidden;}"]);
|
|
26
|
+
}, _FontStyle.FontStyle, _BoxSizingStyle.BoxSizingStyle);
|
|
27
|
+
StyledObjectFormModal.displayName = "StyledObjectFormModal";
|
|
28
|
+
//# sourceMappingURL=Styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Styles.js","names":["_styledComponents","_interopRequireWildcard","require","_BoxSizingStyle","_FontStyle","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","MAX_HEIGHT","StyledObjectFormModalClose","exports","styled","button","withConfig","displayName","componentId","StyledObjectFormModal","div","props","$maxWidth","$fill","css","$closeButton","FontStyle","BoxSizingStyle"],"sources":["../../../../src/components/ObjectFormModal/Styles.ts"],"sourcesContent":["import styled, { css } from \"styled-components\";\n\nimport { BoxSizingStyle } from \"../BoxSizingStyle\";\nimport { FontStyle } from \"../FontStyle\";\n\nconst MAX_HEIGHT = \"95vh\";\n\nexport const StyledObjectFormModalClose = styled.button`\n position: absolute;\n top: -1px;\n left: calc(100% + 8px);\n display: flex;\n align-items: center;\n justify-content: center;\n width: 48px;\n height: 48px;\n padding: 0;\n cursor: pointer;\n background-color: var(--color-theme-200);\n border: 1px solid var(--border-raised);\n box-shadow: var(--shadow-primary);\n border-radius: 24px;\n\n &:hover {\n filter: brightness(1.1);\n }\n\n svg {\n width: 24px;\n height: 24px;\n fill: var(--color-theme-700);\n }\n`;\n\nStyledObjectFormModalClose.displayName = \"StyledObjectFormModalClose\";\n\nexport const StyledObjectFormModal = styled.div<{\n $maxWidth: number;\n $fill: boolean;\n $closeButton: boolean;\n}>`\n flex: 0 0 auto;\n pointer-events: auto;\n position: relative;\n width: 100%;\n max-width: ${(props) => props.$maxWidth}px;\n max-height: ${MAX_HEIGHT};\n padding: 20px;\n overflow-y: auto;\n overscroll-behavior: contain;\n background-color: var(--color-theme-200);\n color: var(--color-theme-900);\n border: 1px solid var(--border-raised);\n box-shadow: var(--shadow-primary);\n border-radius: 24px;\n\n &[data-resizing] {\n overflow: hidden;\n }\n\n ${(props) =>\n props.$fill &&\n css`\n display: flex;\n flex-direction: column;\n\n > :not(.c-object-form-modal-close) {\n min-height: 0;\n }\n `}\n\n /* The close button stands beside the surface, so the content clips in place of the surface. */\n ${(props) =>\n props.$closeButton &&\n css`\n &,\n &[data-resizing] {\n overflow: visible;\n }\n\n &[data-resizing] > :not(.c-object-form-modal-close) {\n overflow: hidden;\n }\n `}\n\n ${FontStyle}\n ${BoxSizingStyle}\n`;\n\nStyledObjectFormModal.displayName = \"StyledObjectFormModal\";\n"],"mappings":";;;;;;AAAA,IAAAA,iBAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,eAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAF,OAAA;AAAyC,SAAAD,wBAAAI,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAN,uBAAA,YAAAA,wBAAAI,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,cAAAM,EAAA,IAAAd,CAAA,gBAAAc,EAAA,OAAAC,cAAA,CAAAC,IAAA,CAAAhB,CAAA,EAAAc,EAAA,OAAAP,CAAA,IAAAD,CAAA,GAAAW,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAnB,CAAA,EAAAc,EAAA,OAAAP,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAM,EAAA,EAAAP,CAAA,IAAAC,CAAA,CAAAM,EAAA,IAAAd,CAAA,CAAAc,EAAA,WAAAN,CAAA,KAAAR,CAAA,EAAAC,CAAA;AAEzC,IAAMmB,UAAU,GAAG,MAAM;AAElB,IAAMC,0BAA0B,GAAAC,OAAA,CAAAD,0BAAA,GAAGE,yBAAM,CAACC,MAAM,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,0XAyBtD;AAEDN,0BAA0B,CAACK,WAAW,GAAG,4BAA4B;AAE9D,IAAME,qBAAqB,GAAAN,OAAA,CAAAM,qBAAA,GAAGL,yBAAM,CAACM,GAAG,CAAAJ,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,sXAShC,UAACG,KAAK;EAAA,OAAKA,KAAK,CAACC,SAAS;AAAA,GACzBX,UAAU,EActB,UAACU,KAAK;EAAA,OACNA,KAAK,CAACE,KAAK,QACXC,qBAAG,2FAOF;AAAA,GAGD,UAACH,KAAK;EAAA,OACNA,KAAK,CAACI,YAAY,QAClBD,qBAAG,iHASF;AAAA,GAEDE,oBAAS,EACTC,8BAAc,CACjB;AAEDR,qBAAqB,CAACF,WAAW,GAAG,uBAAuB","ignoreList":[]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _ObjectFormModal = require("./ObjectFormModal");
|
|
7
|
+
Object.keys(_ObjectFormModal).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _ObjectFormModal[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function get() {
|
|
13
|
+
return _ObjectFormModal[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["_ObjectFormModal","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get"],"sources":["../../../../src/components/ObjectFormModal/index.ts"],"sourcesContent":["export * from \"./ObjectFormModal\";\n"],"mappings":";;;;;AAAA,IAAAA,gBAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,gBAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,gBAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,IAAA;MAAA,OAAAT,gBAAA,CAAAK,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
|
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.usePropertyListLayout = exports.usePropertyListDensity = exports.PropertyListValue = exports.PropertyListToggle = exports.PropertyListRow = exports.PropertyListLayout = exports.PropertyListLabel = exports.PropertyListDivider = exports.PropertyListBranch = exports.PropertyListAdd = exports.PropertyList = void 0;
|
|
6
|
+
exports.usePropertyListLayout = exports.usePropertyListDisabled = exports.usePropertyListDensity = exports.PropertyListValue = exports.PropertyListToggle = exports.PropertyListRow = exports.PropertyListLayout = exports.PropertyListLabel = exports.PropertyListDivider = exports.PropertyListBranch = exports.PropertyListAdd = exports.PropertyList = void 0;
|
|
7
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
9
9
|
var _Styles = require("./Styles");
|
|
10
10
|
var _Icons = require("../Icons");
|
|
11
|
-
var _excluded = ["density", "className", "children"],
|
|
12
|
-
_excluded2 = ["icon", "label", "value", "action", "tone", "readOnly", "chevron", "className", "children"],
|
|
13
|
-
_excluded3 = ["expanded", "className", "children"],
|
|
11
|
+
var _excluded = ["density", "disabled", "className", "children"],
|
|
12
|
+
_excluded2 = ["icon", "label", "value", "action", "tone", "readOnly", "chevron", "disabled", "className", "children"],
|
|
13
|
+
_excluded3 = ["expanded", "disabled", "className", "children"],
|
|
14
14
|
_excluded4 = ["position"];
|
|
15
15
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
16
16
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
@@ -19,12 +19,16 @@ function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i
|
|
|
19
19
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
20
20
|
var DensityContext = /*#__PURE__*/(0, _react.createContext)("form");
|
|
21
21
|
var LayoutContext = /*#__PURE__*/(0, _react.createContext)("stacked");
|
|
22
|
+
var DisabledContext = /*#__PURE__*/(0, _react.createContext)(false);
|
|
22
23
|
var usePropertyListDensity = exports.usePropertyListDensity = function usePropertyListDensity() {
|
|
23
24
|
return (0, _react.useContext)(DensityContext);
|
|
24
25
|
};
|
|
25
26
|
var usePropertyListLayout = exports.usePropertyListLayout = function usePropertyListLayout() {
|
|
26
27
|
return (0, _react.useContext)(LayoutContext);
|
|
27
28
|
};
|
|
29
|
+
var usePropertyListDisabled = exports.usePropertyListDisabled = function usePropertyListDisabled() {
|
|
30
|
+
return (0, _react.useContext)(DisabledContext);
|
|
31
|
+
};
|
|
28
32
|
|
|
29
33
|
/** Sets the layout of the rows below it: one line each, or the three columns of a table. */
|
|
30
34
|
var PropertyListLayout = exports.PropertyListLayout = function PropertyListLayout(_ref) {
|
|
@@ -48,24 +52,30 @@ var PropertyListDivider = exports.PropertyListDivider = function PropertyListDiv
|
|
|
48
52
|
var PropertyList = exports.PropertyList = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, ref) {
|
|
49
53
|
var _ref2$density = _ref2.density,
|
|
50
54
|
density = _ref2$density === void 0 ? "form" : _ref2$density,
|
|
55
|
+
_ref2$disabled = _ref2.disabled,
|
|
56
|
+
disabled = _ref2$disabled === void 0 ? false : _ref2$disabled,
|
|
51
57
|
className = _ref2.className,
|
|
52
58
|
children = _ref2.children,
|
|
53
59
|
rest = _objectWithoutProperties(_ref2, _excluded);
|
|
54
60
|
var parts = _react.Children.toArray(children).filter(Boolean);
|
|
55
61
|
return /*#__PURE__*/_react.default.createElement(DensityContext.Provider, {
|
|
56
62
|
value: density
|
|
63
|
+
}, /*#__PURE__*/_react.default.createElement(DisabledContext.Provider, {
|
|
64
|
+
value: disabled
|
|
57
65
|
}, /*#__PURE__*/_react.default.createElement(_Styles.StyledPropertyList, _extends({}, rest, {
|
|
58
66
|
ref: ref,
|
|
59
67
|
variant: "raised",
|
|
60
68
|
radius: 20,
|
|
61
69
|
shadow: density === "page",
|
|
70
|
+
$disabled: disabled,
|
|
71
|
+
"aria-disabled": disabled || undefined,
|
|
62
72
|
className: (0, _classnames.default)("c-property-list", className)
|
|
63
73
|
}), parts.map(function (part, index) {
|
|
64
74
|
var _key;
|
|
65
75
|
return /*#__PURE__*/_react.default.createElement(_react.Fragment, {
|
|
66
76
|
key: (_key = part.key) !== null && _key !== void 0 ? _key : index
|
|
67
77
|
}, index > 0 ? /*#__PURE__*/_react.default.createElement(PropertyListDivider, null) : null, part);
|
|
68
|
-
})));
|
|
78
|
+
}))));
|
|
69
79
|
});
|
|
70
80
|
PropertyList.displayName = "PropertyList";
|
|
71
81
|
var PropertyListValue = exports.PropertyListValue = function PropertyListValue(_ref3) {
|
|
@@ -130,18 +140,25 @@ var PropertyListRow = exports.PropertyListRow = /*#__PURE__*/(0, _react.forwardR
|
|
|
130
140
|
readOnly = _ref6$readOnly === void 0 ? false : _ref6$readOnly,
|
|
131
141
|
_ref6$chevron = _ref6.chevron,
|
|
132
142
|
chevron = _ref6$chevron === void 0 ? true : _ref6$chevron,
|
|
143
|
+
_ref6$disabled = _ref6.disabled,
|
|
144
|
+
disabled = _ref6$disabled === void 0 ? false : _ref6$disabled,
|
|
133
145
|
className = _ref6.className,
|
|
134
146
|
children = _ref6.children,
|
|
135
147
|
rest = _objectWithoutProperties(_ref6, _excluded2);
|
|
148
|
+
var isDisabled = usePropertyListDisabled() || disabled;
|
|
136
149
|
var density = usePropertyListDensity();
|
|
137
150
|
var layout = usePropertyListLayout();
|
|
138
151
|
var caret = !readOnly && chevron ? /*#__PURE__*/_react.default.createElement(_Styles.StyledPropertyListChevron, null, /*#__PURE__*/_react.default.createElement(_Icons.ArrowDownSmallIcon, null)) : null;
|
|
139
152
|
return /*#__PURE__*/_react.default.createElement(_Styles.StyledPropertyListRow, _extends({}, rest, {
|
|
140
153
|
as: readOnly ? "div" : "button",
|
|
141
154
|
ref: ref
|
|
142
|
-
}, readOnly ?
|
|
143
|
-
|
|
155
|
+
}, readOnly ? {
|
|
156
|
+
"aria-disabled": isDisabled || undefined
|
|
157
|
+
} : {
|
|
158
|
+
type: "button",
|
|
159
|
+
disabled: isDisabled
|
|
144
160
|
}, {
|
|
161
|
+
$disabled: isDisabled,
|
|
145
162
|
$layout: layout,
|
|
146
163
|
$density: density,
|
|
147
164
|
$tone: tone,
|
|
@@ -160,12 +177,15 @@ PropertyListRow.displayName = "PropertyListRow";
|
|
|
160
177
|
var PropertyListToggle = exports.PropertyListToggle = /*#__PURE__*/(0, _react.forwardRef)(function (_ref7, ref) {
|
|
161
178
|
var _ref7$expanded = _ref7.expanded,
|
|
162
179
|
expanded = _ref7$expanded === void 0 ? false : _ref7$expanded,
|
|
180
|
+
disabled = _ref7.disabled,
|
|
163
181
|
className = _ref7.className,
|
|
164
182
|
children = _ref7.children,
|
|
165
183
|
rest = _objectWithoutProperties(_ref7, _excluded3);
|
|
184
|
+
var isDisabled = usePropertyListDisabled() || disabled;
|
|
166
185
|
return /*#__PURE__*/_react.default.createElement(_Styles.StyledPropertyListToggle, _extends({
|
|
167
186
|
type: "button"
|
|
168
187
|
}, rest, {
|
|
188
|
+
disabled: isDisabled,
|
|
169
189
|
ref: ref,
|
|
170
190
|
"aria-expanded": expanded,
|
|
171
191
|
className: (0, _classnames.default)("c-property-list__toggle", className)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PropertyList.js","names":["_react","_interopRequireWildcard","require","_classnames","_interopRequireDefault","_Styles","_Icons","_excluded","_excluded2","_excluded3","_excluded4","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","_extends","assign","bind","arguments","length","apply","_objectWithoutProperties","_objectWithoutPropertiesLoose","getOwnPropertySymbols","indexOf","propertyIsEnumerable","DensityContext","createContext","LayoutContext","usePropertyListDensity","exports","useContext","usePropertyListLayout","PropertyListLayout","_ref","_ref$value","value","children","createElement","Provider","PropertyListDivider","StyledPropertyListDivider","$layout","$density","className","PropertyList","forwardRef","_ref2","ref","_ref2$density","density","rest","parts","Children","toArray","filter","Boolean","StyledPropertyList","variant","radius","shadow","classnames","map","part","index","_key","Fragment","key","displayName","PropertyListValue","_ref3","_ref3$placeholder","placeholder","StyledPropertyListValue","forwardedAs","color","undefined","$placeholder","PropertyListAdd","_ref4","StyledPropertyListAddIcon","AddCrossTinyIcon","PropertyListLabel","_ref5","icon","label","layout","StyledPropertyListTableLabel","StyledPropertyListIcon","$size","$scale","StyledPropertyListLabelText","weight","PropertyListRow","_ref6","action","_ref6$tone","tone","_ref6$readOnly","readOnly","_ref6$chevron","chevron","caret","StyledPropertyListChevron","ArrowDownSmallIcon","StyledPropertyListRow","as","type","$tone","$clickable","StyledPropertyListTableValue","StyledPropertyListTableAction","PropertyListToggle","_ref7","_ref7$expanded","expanded","StyledPropertyListToggle","PropertyListBranch","_ref8","_ref8$position","position","StyledPropertyListBranch","StyledPropertyListBranchLine"],"sources":["../../../../src/components/PropertyList/PropertyList.tsx"],"sourcesContent":["import React, {\n ButtonHTMLAttributes,\n Children,\n Fragment,\n HTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n createContext,\n forwardRef,\n useContext,\n} from \"react\";\n\nimport classnames from \"classnames\";\n\nimport {\n PropertyListDensity,\n PropertyListLayoutName,\n PropertyListTone,\n StyledPropertyList,\n StyledPropertyListAddIcon,\n StyledPropertyListBranch,\n StyledPropertyListBranchLine,\n StyledPropertyListChevron,\n StyledPropertyListDivider,\n StyledPropertyListIcon,\n StyledPropertyListLabelText,\n StyledPropertyListRow,\n StyledPropertyListTableAction,\n StyledPropertyListTableLabel,\n StyledPropertyListTableValue,\n StyledPropertyListToggle,\n StyledPropertyListValue,\n} from \"./Styles\";\nimport { AddCrossTinyIcon, ArrowDownSmallIcon } from \"../Icons\";\n\nconst DensityContext = createContext<PropertyListDensity>(\"form\");\nconst LayoutContext = createContext<PropertyListLayoutName>(\"stacked\");\n\nexport const usePropertyListDensity = () => useContext(DensityContext);\nexport const usePropertyListLayout = () => useContext(LayoutContext);\n\n/** Sets the layout of the rows below it: one line each, or the three columns of a table. */\nexport const PropertyListLayout = ({\n value = \"stacked\",\n children,\n}: {\n value?: PropertyListLayoutName;\n children?: ReactNode;\n}) => <LayoutContext.Provider value={value}>{children}</LayoutContext.Provider>;\n\n/** The line between two rows. In a stacked list it starts where the label text starts. */\nexport const PropertyListDivider = () => (\n <StyledPropertyListDivider\n aria-hidden=\"true\"\n $layout={usePropertyListLayout()}\n $density={usePropertyListDensity()}\n className=\"c-property-list__divider\"\n />\n);\n\nexport interface IPropertyListProps extends HTMLAttributes<HTMLDivElement> {\n /** \"form\" for a compact list in a form, \"page\" for a list on a page, with a shadow. */\n density?: PropertyListDensity;\n}\n\nexport const PropertyList = forwardRef<HTMLDivElement, IPropertyListProps>(\n ({ density = \"form\", className, children, ...rest }, ref) => {\n const parts = Children.toArray(children).filter(Boolean);\n\n return (\n <DensityContext.Provider value={density}>\n <StyledPropertyList\n {...rest}\n ref={ref}\n variant=\"raised\"\n radius={20}\n shadow={density === \"page\"}\n className={classnames(\"c-property-list\", className)}\n >\n {parts.map((part, index) => (\n <Fragment key={(part as ReactElement).key ?? index}>\n {index > 0 ? <PropertyListDivider /> : null}\n {part}\n </Fragment>\n ))}\n </StyledPropertyList>\n </DensityContext.Provider>\n );\n }\n);\n\nPropertyList.displayName = \"PropertyList\";\n\nexport interface IPropertyListValueProps {\n /** A row with no value shows its text in the placeholder color. */\n placeholder?: boolean;\n className?: string;\n children?: ReactNode;\n}\n\nexport const PropertyListValue = ({\n placeholder = false,\n className,\n children,\n}: IPropertyListValueProps) => (\n <StyledPropertyListValue\n forwardedAs=\"span\"\n color={placeholder ? \"quaternary\" : undefined}\n $density={usePropertyListDensity()}\n $placeholder={placeholder}\n className={classnames(\"c-property-list__value\", className)}\n data-placeholder={placeholder || undefined}\n >\n {children}\n </StyledPropertyListValue>\n);\n\n/** The \"Add\" of a row: a placeholder with a plus where another row has its chevron. */\nexport const PropertyListAdd = ({ children }: { children?: ReactNode }) => (\n <>\n <PropertyListValue placeholder>{children}</PropertyListValue>\n <StyledPropertyListAddIcon>\n <AddCrossTinyIcon />\n </StyledPropertyListAddIcon>\n </>\n);\n\nexport interface IPropertyListLabelProps {\n icon?: ReactNode;\n label?: ReactNode;\n}\n\nexport const PropertyListLabel = ({ icon, label }: IPropertyListLabelProps) => {\n const density = usePropertyListDensity();\n const layout = usePropertyListLayout();\n\n if (layout === \"table\") {\n return (\n <StyledPropertyListTableLabel className=\"c-property-list__label\">\n <StyledPropertyListIcon $size={16} $scale>\n {icon}\n </StyledPropertyListIcon>\n <StyledPropertyListLabelText\n forwardedAs=\"span\"\n weight=\"medium\"\n $layout={layout}\n $density={density}\n >\n {label}\n </StyledPropertyListLabelText>\n </StyledPropertyListTableLabel>\n );\n }\n\n return (\n <>\n <StyledPropertyListIcon\n $size={density === \"page\" ? 28 : 24}\n $scale={false}\n >\n {icon}\n </StyledPropertyListIcon>\n <StyledPropertyListLabelText\n forwardedAs=\"span\"\n weight=\"medium\"\n $layout={layout}\n $density={density}\n className=\"c-property-list__label\"\n >\n {label}\n </StyledPropertyListLabelText>\n </>\n );\n};\n\nexport interface IPropertyListRowProps\n extends Omit<HTMLAttributes<HTMLElement>, \"children\"> {\n icon?: ReactNode;\n label?: ReactNode;\n value?: ReactNode;\n /** A control before the chevron. */\n action?: ReactNode;\n tone?: PropertyListTone;\n /** A read only row is plain text. A row that can change is one button. */\n readOnly?: boolean;\n chevron?: boolean;\n /** Replaces the label, the value and the action. */\n children?: ReactNode;\n}\n\nexport const PropertyListRow = forwardRef<HTMLElement, IPropertyListRowProps>(\n (\n {\n icon,\n label,\n value,\n action,\n tone = \"regular\",\n readOnly = false,\n chevron = true,\n className,\n children,\n ...rest\n },\n ref\n ) => {\n const density = usePropertyListDensity();\n const layout = usePropertyListLayout();\n const caret =\n !readOnly && chevron ? (\n <StyledPropertyListChevron>\n <ArrowDownSmallIcon />\n </StyledPropertyListChevron>\n ) : null;\n\n return (\n <StyledPropertyListRow\n {...rest}\n as={readOnly ? \"div\" : \"button\"}\n ref={ref as Ref<HTMLDivElement>}\n {...(readOnly ? null : { type: \"button\" })}\n $layout={layout}\n $density={density}\n $tone={tone}\n $clickable={!readOnly}\n className={classnames(\"c-property-list__row\", className)}\n >\n {children ??\n (layout === \"table\" ? (\n <>\n <PropertyListLabel icon={icon} label={label} />\n <StyledPropertyListTableValue>\n {value}\n </StyledPropertyListTableValue>\n <StyledPropertyListTableAction>\n {action}\n {caret}\n </StyledPropertyListTableAction>\n </>\n ) : (\n <>\n <PropertyListLabel icon={icon} label={label} />\n {value}\n {action}\n {caret}\n </>\n ))}\n </StyledPropertyListRow>\n );\n }\n);\n\nPropertyListRow.displayName = \"PropertyListRow\";\n\nexport interface IPropertyListToggleProps\n extends ButtonHTMLAttributes<HTMLButtonElement> {\n /** The rows that the toggle opens are on the screen. */\n expanded?: boolean;\n}\n\n/** The last row of a list: it opens and closes the rows with no value. */\nexport const PropertyListToggle = forwardRef<\n HTMLButtonElement,\n IPropertyListToggleProps\n>(({ expanded = false, className, children, ...rest }, ref) => (\n <StyledPropertyListToggle\n type=\"button\"\n {...rest}\n ref={ref}\n aria-expanded={expanded}\n className={classnames(\"c-property-list__toggle\", className)}\n >\n {children}\n </StyledPropertyListToggle>\n));\n\nPropertyListToggle.displayName = \"PropertyListToggle\";\n\nexport interface IPropertyListBranchProps\n extends HTMLAttributes<HTMLSpanElement> {\n /** \"middle\" continues the line to the next row of the branch. */\n position?: \"middle\" | \"last\";\n}\n\n/** The tree line before a row that belongs to the row above it. Its parent must be positioned. */\nexport const PropertyListBranch = ({\n position = \"last\",\n ...rest\n}: IPropertyListBranchProps) => (\n <>\n <StyledPropertyListBranch aria-hidden=\"true\" {...rest} />\n {position === \"middle\" ? (\n <StyledPropertyListBranchLine aria-hidden=\"true\" />\n ) : null}\n </>\n);\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAaA,IAAAC,WAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,I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AwB,EAAArG,QAAA;IACvB4F,IAAI,EAAC;EAAQ,GACTxD,IAAI;IACRH,GAAG,EAAEA,GAAI;IACT,iBAAemE,QAAS;IACxBvE,SAAS,EAAE,IAAAiB,mBAAU,EAAC,yBAAyB,EAAEjB,SAAS;EAAE,IAE3DP,QACuB,CAAC;AAAA,CAC5B,CAAC;AAEF2E,kBAAkB,CAAC5C,WAAW,GAAG,oBAAoB;AAQrD;AACO,IAAMiD,kBAAkB,GAAAvF,OAAA,CAAAuF,kBAAA,GAAG,SAArBA,kBAAkBA,CAAAC,KAAA;EAAA,IAAAC,cAAA,GAAAD,KAAA,CAC7BE,QAAQ;IAARA,QAAQ,GAAAD,cAAA,cAAG,MAAM,GAAAA,cAAA;IACdpE,IAAI,GAAA9B,wBAAA,CAAAiG,KAAA,EAAA5H,UAAA;EAAA,oBAEPV,MAAA,CAAAa,OAAA,CAAAyC,aAAA,CAAAtD,MAAA,CAAAa,OAAA,CAAAqE,QAAA,qBACElF,MAAA,CAAAa,OAAA,CAAAyC,aAAA,CAACjD,OAAA,CAAAoI,wBAAwB,EAAA1G,QAAA;IAAC,eAAY;EAAM,GAAKoC,IAAI,CAAG,CAAC,EACxDqE,QAAQ,KAAK,QAAQ,gBACpBxI,MAAA,CAAAa,OAAA,CAAAyC,aAAA,CAACjD,OAAA,CAAAqI,4BAA4B;IAAC,eAAY;EAAM,CAAE,CAAC,GACjD,IACJ,CAAC;AAAA,CACJ","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"PropertyList.js","names":["_react","_interopRequireWildcard","require","_classnames","_interopRequireDefault","_Styles","_Icons","_excluded","_excluded2","_excluded3","_excluded4","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","_extends","assign","bind","arguments","length","apply","_objectWithoutProperties","_objectWithoutPropertiesLoose","getOwnPropertySymbols","indexOf","propertyIsEnumerable","DensityContext","createContext","LayoutContext","DisabledContext","usePropertyListDensity","exports","useContext","usePropertyListLayout","usePropertyListDisabled","PropertyListLayout","_ref","_ref$value","value","children","createElement","Provider","PropertyListDivider","StyledPropertyListDivider","$layout","$density","className","PropertyList","forwardRef","_ref2","ref","_ref2$density","density","_ref2$disabled","disabled","rest","parts","Children","toArray","filter","Boolean","StyledPropertyList","variant","radius","shadow","$disabled","undefined","classnames","map","part","index","_key","Fragment","key","displayName","PropertyListValue","_ref3","_ref3$placeholder","placeholder","StyledPropertyListValue","forwardedAs","color","$placeholder","PropertyListAdd","_ref4","StyledPropertyListAddIcon","AddCrossTinyIcon","PropertyListLabel","_ref5","icon","label","layout","StyledPropertyListTableLabel","StyledPropertyListIcon","$size","$scale","StyledPropertyListLabelText","weight","PropertyListRow","_ref6","action","_ref6$tone","tone","_ref6$readOnly","readOnly","_ref6$chevron","chevron","_ref6$disabled","isDisabled","caret","StyledPropertyListChevron","ArrowDownSmallIcon","StyledPropertyListRow","as","type","$tone","$clickable","StyledPropertyListTableValue","StyledPropertyListTableAction","PropertyListToggle","_ref7","_ref7$expanded","expanded","StyledPropertyListToggle","PropertyListBranch","_ref8","_ref8$position","position","StyledPropertyListBranch","StyledPropertyListBranchLine"],"sources":["../../../../src/components/PropertyList/PropertyList.tsx"],"sourcesContent":["import React, {\n ButtonHTMLAttributes,\n Children,\n Fragment,\n HTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n createContext,\n forwardRef,\n useContext,\n} from \"react\";\n\nimport classnames from \"classnames\";\n\nimport {\n PropertyListDensity,\n PropertyListLayoutName,\n PropertyListTone,\n StyledPropertyList,\n StyledPropertyListAddIcon,\n StyledPropertyListBranch,\n StyledPropertyListBranchLine,\n StyledPropertyListChevron,\n StyledPropertyListDivider,\n StyledPropertyListIcon,\n StyledPropertyListLabelText,\n StyledPropertyListRow,\n StyledPropertyListTableAction,\n StyledPropertyListTableLabel,\n StyledPropertyListTableValue,\n StyledPropertyListToggle,\n StyledPropertyListValue,\n} from \"./Styles\";\nimport { AddCrossTinyIcon, ArrowDownSmallIcon } from \"../Icons\";\n\nconst DensityContext = createContext<PropertyListDensity>(\"form\");\nconst LayoutContext = createContext<PropertyListLayoutName>(\"stacked\");\nconst DisabledContext = createContext(false);\n\nexport const usePropertyListDensity = () => useContext(DensityContext);\nexport const usePropertyListLayout = () => useContext(LayoutContext);\nexport const usePropertyListDisabled = () => useContext(DisabledContext);\n\n/** Sets the layout of the rows below it: one line each, or the three columns of a table. */\nexport const PropertyListLayout = ({\n value = \"stacked\",\n children,\n}: {\n value?: PropertyListLayoutName;\n children?: ReactNode;\n}) => <LayoutContext.Provider value={value}>{children}</LayoutContext.Provider>;\n\n/** The line between two rows. In a stacked list it starts where the label text starts. */\nexport const PropertyListDivider = () => (\n <StyledPropertyListDivider\n aria-hidden=\"true\"\n $layout={usePropertyListLayout()}\n $density={usePropertyListDensity()}\n className=\"c-property-list__divider\"\n />\n);\n\nexport interface IPropertyListProps extends HTMLAttributes<HTMLDivElement> {\n /** \"form\" for a compact list in a form, \"page\" for a list on a page, with a shadow. */\n density?: PropertyListDensity;\n /** Every row of the list is dimmed and takes no click and no focus. */\n disabled?: boolean;\n}\n\nexport const PropertyList = forwardRef<HTMLDivElement, IPropertyListProps>(\n (\n { density = \"form\", disabled = false, className, children, ...rest },\n ref\n ) => {\n const parts = Children.toArray(children).filter(Boolean);\n\n return (\n <DensityContext.Provider value={density}>\n <DisabledContext.Provider value={disabled}>\n <StyledPropertyList\n {...rest}\n ref={ref}\n variant=\"raised\"\n radius={20}\n shadow={density === \"page\"}\n $disabled={disabled}\n aria-disabled={disabled || undefined}\n className={classnames(\"c-property-list\", className)}\n >\n {parts.map((part, index) => (\n <Fragment key={(part as ReactElement).key ?? index}>\n {index > 0 ? <PropertyListDivider /> : null}\n {part}\n </Fragment>\n ))}\n </StyledPropertyList>\n </DisabledContext.Provider>\n </DensityContext.Provider>\n );\n }\n);\n\nPropertyList.displayName = \"PropertyList\";\n\nexport interface IPropertyListValueProps {\n /** A row with no value shows its text in the placeholder color. */\n placeholder?: boolean;\n className?: string;\n children?: ReactNode;\n}\n\nexport const PropertyListValue = ({\n placeholder = false,\n className,\n children,\n}: IPropertyListValueProps) => (\n <StyledPropertyListValue\n forwardedAs=\"span\"\n color={placeholder ? \"quaternary\" : undefined}\n $density={usePropertyListDensity()}\n $placeholder={placeholder}\n className={classnames(\"c-property-list__value\", className)}\n data-placeholder={placeholder || undefined}\n >\n {children}\n </StyledPropertyListValue>\n);\n\n/** The \"Add\" of a row: a placeholder with a plus where another row has its chevron. */\nexport const PropertyListAdd = ({ children }: { children?: ReactNode }) => (\n <>\n <PropertyListValue placeholder>{children}</PropertyListValue>\n <StyledPropertyListAddIcon>\n <AddCrossTinyIcon />\n </StyledPropertyListAddIcon>\n </>\n);\n\nexport interface IPropertyListLabelProps {\n icon?: ReactNode;\n label?: ReactNode;\n}\n\nexport const PropertyListLabel = ({ icon, label }: IPropertyListLabelProps) => {\n const density = usePropertyListDensity();\n const layout = usePropertyListLayout();\n\n if (layout === \"table\") {\n return (\n <StyledPropertyListTableLabel className=\"c-property-list__label\">\n <StyledPropertyListIcon $size={16} $scale>\n {icon}\n </StyledPropertyListIcon>\n <StyledPropertyListLabelText\n forwardedAs=\"span\"\n weight=\"medium\"\n $layout={layout}\n $density={density}\n >\n {label}\n </StyledPropertyListLabelText>\n </StyledPropertyListTableLabel>\n );\n }\n\n return (\n <>\n <StyledPropertyListIcon\n $size={density === \"page\" ? 28 : 24}\n $scale={false}\n >\n {icon}\n </StyledPropertyListIcon>\n <StyledPropertyListLabelText\n forwardedAs=\"span\"\n weight=\"medium\"\n $layout={layout}\n $density={density}\n className=\"c-property-list__label\"\n >\n {label}\n </StyledPropertyListLabelText>\n </>\n );\n};\n\nexport interface IPropertyListRowProps\n extends Omit<HTMLAttributes<HTMLElement>, \"children\"> {\n icon?: ReactNode;\n label?: ReactNode;\n value?: ReactNode;\n /** A control before the chevron. */\n action?: ReactNode;\n tone?: PropertyListTone;\n /** A read only row is plain text. A row that can change is one button. */\n readOnly?: boolean;\n chevron?: boolean;\n /** Dimmed, with no click and no focus. A disabled list disables its rows. */\n disabled?: boolean;\n /** Replaces the label, the value and the action. */\n children?: ReactNode;\n}\n\nexport const PropertyListRow = forwardRef<HTMLElement, IPropertyListRowProps>(\n (\n {\n icon,\n label,\n value,\n action,\n tone = \"regular\",\n readOnly = false,\n chevron = true,\n disabled = false,\n className,\n children,\n ...rest\n },\n ref\n ) => {\n const isDisabled = usePropertyListDisabled() || disabled;\n const density = usePropertyListDensity();\n const layout = usePropertyListLayout();\n const caret =\n !readOnly && chevron ? (\n <StyledPropertyListChevron>\n <ArrowDownSmallIcon />\n </StyledPropertyListChevron>\n ) : null;\n\n return (\n <StyledPropertyListRow\n {...rest}\n as={readOnly ? \"div\" : \"button\"}\n ref={ref as Ref<HTMLDivElement>}\n {...(readOnly\n ? { \"aria-disabled\": isDisabled || undefined }\n : { type: \"button\", disabled: isDisabled })}\n $disabled={isDisabled}\n $layout={layout}\n $density={density}\n $tone={tone}\n $clickable={!readOnly}\n className={classnames(\"c-property-list__row\", className)}\n >\n {children ??\n (layout === \"table\" ? (\n <>\n <PropertyListLabel icon={icon} label={label} />\n <StyledPropertyListTableValue>\n {value}\n </StyledPropertyListTableValue>\n <StyledPropertyListTableAction>\n {action}\n {caret}\n </StyledPropertyListTableAction>\n </>\n ) : (\n <>\n <PropertyListLabel icon={icon} label={label} />\n {value}\n {action}\n {caret}\n </>\n ))}\n </StyledPropertyListRow>\n );\n }\n);\n\nPropertyListRow.displayName = \"PropertyListRow\";\n\nexport interface IPropertyListToggleProps\n extends ButtonHTMLAttributes<HTMLButtonElement> {\n /** The rows that the toggle opens are on the screen. */\n expanded?: boolean;\n}\n\n/** The last row of a list: it opens and closes the rows with no value. */\nexport const PropertyListToggle = forwardRef<\n HTMLButtonElement,\n IPropertyListToggleProps\n>(({ expanded = false, disabled, className, children, ...rest }, ref) => {\n const isDisabled = usePropertyListDisabled() || disabled;\n\n return (\n <StyledPropertyListToggle\n type=\"button\"\n {...rest}\n disabled={isDisabled}\n ref={ref}\n aria-expanded={expanded}\n className={classnames(\"c-property-list__toggle\", className)}\n >\n {children}\n </StyledPropertyListToggle>\n );\n});\n\nPropertyListToggle.displayName = \"PropertyListToggle\";\n\nexport interface IPropertyListBranchProps\n extends HTMLAttributes<HTMLSpanElement> {\n /** \"middle\" continues the line to the next row of the branch. */\n position?: \"middle\" | \"last\";\n}\n\n/** The tree line before a row that belongs to the row above it. Its parent must be positioned. */\nexport const PropertyListBranch = ({\n position = \"last\",\n ...rest\n}: IPropertyListBranchProps) => (\n <>\n <StyledPropertyListBranch aria-hidden=\"true\" {...rest} />\n {position === \"middle\" ? (\n <StyledPropertyListBranchLine aria-hidden=\"true\" />\n ) : null}\n </>\n);\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAaA,IAAAC,WAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,OAAA,GAAAH,OAAA;AAmBA,IAAAI,MAAA,GAAAJ,OAAA;AAAgE,IAAAK,SAAA;EAAAC,UAAA;EAAAC,UAAA;EAAAC,UAAA;AAAA,SAAAN,uBAAAO,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAV,wBAAAU,CAAA,EAAAG,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAd,uBAAA,YAAAA,wBAAAU,CAAA,EAAAG,CAAA,SAAAA,CAAA,IAAAH,CAAA,IAAAA,CAAA,CAAAC,UAAA,SAAAD,CAAA,MAAAO,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAR,OAAA,EAAAF,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAS,CAAA,MAAAF,CAAA,GAAAJ,CAAA,GAAAG,CAAA,GAAAD,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
|
var _Typography = require("../Typography");
|
|
10
10
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
11
|
+
var disabledSurface = "color-mix(in srgb, var(--surface-raised) 50%, transparent)";
|
|
11
12
|
var StyledPropertyList = exports.StyledPropertyList = (0, _styledComponents.default)(_Card.Card).withConfig({
|
|
12
13
|
displayName: "Styles__StyledPropertyList",
|
|
13
14
|
componentId: "sc-ssdfzo-0"
|
|
14
|
-
})(["display:flex;flex-direction:column;overflow:clip;"])
|
|
15
|
+
})(["display:flex;flex-direction:column;overflow:clip;", ""], function (_ref) {
|
|
16
|
+
var $disabled = _ref.$disabled;
|
|
17
|
+
return $disabled && (0, _styledComponents.css)(["&&{background-color:", ";}&&:hover{background-color:", ";}"], disabledSurface, disabledSurface);
|
|
18
|
+
});
|
|
15
19
|
var StyledPropertyListDivider = exports.StyledPropertyListDivider = _styledComponents.default.div.withConfig({
|
|
16
20
|
displayName: "Styles__StyledPropertyListDivider",
|
|
17
21
|
componentId: "sc-ssdfzo-1"
|
|
18
|
-
})(["flex-shrink:0;height:1px;background-color:var(--border-raised);", ""], function (
|
|
19
|
-
var $layout =
|
|
20
|
-
$density =
|
|
22
|
+
})(["flex-shrink:0;height:1px;background-color:var(--border-raised);", ""], function (_ref2) {
|
|
23
|
+
var $layout = _ref2.$layout,
|
|
24
|
+
$density = _ref2.$density;
|
|
21
25
|
return $layout === "stacked" && "margin-left: ".concat($density === "page" ? 44 : 46, "px;");
|
|
22
26
|
});
|
|
23
27
|
var highlight = "linear-gradient(var(--highlight-dark), var(--highlight-dark))";
|
|
24
28
|
var StyledPropertyListRow = exports.StyledPropertyListRow = _styledComponents.default.div.withConfig({
|
|
25
29
|
displayName: "Styles__StyledPropertyListRow",
|
|
26
30
|
componentId: "sc-ssdfzo-2"
|
|
27
|
-
})(["position:relative;width:100%;border:0;text-align:left;background-color:", ";", " ", ""], function (
|
|
28
|
-
var $tone =
|
|
31
|
+
})(["position:relative;width:100%;border:0;text-align:left;background-color:", ";", " ", " ", ""], function (_ref3) {
|
|
32
|
+
var $tone = _ref3.$tone;
|
|
29
33
|
return $tone === "alert" ? "var(--alert-surface-subtle)" : "transparent";
|
|
30
|
-
}, function (_ref3) {
|
|
31
|
-
var $layout = _ref3.$layout,
|
|
32
|
-
$density = _ref3.$density;
|
|
33
|
-
return $layout === "table" ? (0, _styledComponents.css)(["display:grid;grid-template-columns:185px minmax(0,1fr) auto;align-items:center;min-height:36px;padding:4px 12px;"]) : (0, _styledComponents.css)(["display:flex;align-items:center;gap:8px;min-height:", "px;padding:6px 12px;"], $density === "page" ? 44 : 40);
|
|
34
34
|
}, function (_ref4) {
|
|
35
|
-
var $
|
|
36
|
-
$
|
|
37
|
-
return $
|
|
35
|
+
var $layout = _ref4.$layout,
|
|
36
|
+
$density = _ref4.$density;
|
|
37
|
+
return $layout === "table" ? (0, _styledComponents.css)(["display:grid;grid-template-columns:185px minmax(0,1fr) auto;align-items:center;min-height:36px;padding:4px 12px;"]) : (0, _styledComponents.css)(["display:flex;align-items:center;gap:8px;min-height:", "px;padding:6px 12px;"], $density === "page" ? 44 : 40);
|
|
38
|
+
}, function (_ref5) {
|
|
39
|
+
var $disabled = _ref5.$disabled,
|
|
40
|
+
$density = _ref5.$density;
|
|
41
|
+
return $disabled && (0, _styledComponents.css)(["cursor:default;> *{opacity:0.4;}&& .c-property-list__value[data-placeholder]{color:", ";}"], $density === "page" ? "var(--muted-text)" : "var(--color-theme-800)");
|
|
42
|
+
}, function (_ref6) {
|
|
43
|
+
var $clickable = _ref6.$clickable,
|
|
44
|
+
$disabled = _ref6.$disabled,
|
|
45
|
+
$tone = _ref6.$tone;
|
|
46
|
+
return $clickable && !$disabled && (0, _styledComponents.css)(["cursor:pointer;&:hover,&[aria-expanded=\"true\"]{", "}"], $tone === "alert" ? "background-image: ".concat(highlight, ";") : "background-color: var(--color-theme-200);");
|
|
38
47
|
});
|
|
39
48
|
var StyledPropertyListTableLabel = exports.StyledPropertyListTableLabel = _styledComponents.default.span.withConfig({
|
|
40
49
|
displayName: "Styles__StyledPropertyListTableLabel",
|
|
@@ -43,34 +52,34 @@ var StyledPropertyListTableLabel = exports.StyledPropertyListTableLabel = _style
|
|
|
43
52
|
var StyledPropertyListIcon = exports.StyledPropertyListIcon = _styledComponents.default.span.withConfig({
|
|
44
53
|
displayName: "Styles__StyledPropertyListIcon",
|
|
45
54
|
componentId: "sc-ssdfzo-4"
|
|
46
|
-
})(["display:flex;flex-shrink:0;align-items:center;justify-content:center;width:", "px;height:", "px;& svg{fill:var(--color-theme-700);", "}"], function (
|
|
47
|
-
var $size =
|
|
55
|
+
})(["display:flex;flex-shrink:0;align-items:center;justify-content:center;width:", "px;height:", "px;& svg{fill:var(--color-theme-700);", "}"], function (_ref7) {
|
|
56
|
+
var $size = _ref7.$size;
|
|
48
57
|
return $size;
|
|
49
|
-
}, function (
|
|
50
|
-
var $size =
|
|
58
|
+
}, function (_ref8) {
|
|
59
|
+
var $size = _ref8.$size;
|
|
51
60
|
return $size;
|
|
52
|
-
}, function (
|
|
53
|
-
var $scale =
|
|
54
|
-
$size =
|
|
61
|
+
}, function (_ref9) {
|
|
62
|
+
var $scale = _ref9.$scale,
|
|
63
|
+
$size = _ref9.$size;
|
|
55
64
|
return $scale && "width: ".concat($size, "px; height: ").concat($size, "px;");
|
|
56
65
|
});
|
|
57
66
|
var StyledPropertyListLabelText = exports.StyledPropertyListLabelText = (0, _styledComponents.default)(_Typography.Body2).withConfig({
|
|
58
67
|
displayName: "Styles__StyledPropertyListLabelText",
|
|
59
68
|
componentId: "sc-ssdfzo-5"
|
|
60
|
-
})(["&&{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--color-theme-700);", "}"], function (
|
|
61
|
-
var $layout =
|
|
62
|
-
$density =
|
|
69
|
+
})(["&&{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--color-theme-700);", "}"], function (_ref0) {
|
|
70
|
+
var $layout = _ref0.$layout,
|
|
71
|
+
$density = _ref0.$density;
|
|
63
72
|
return $layout === "stacked" && (0, _styledComponents.css)(["flex:1 1 0%;", ""], $density === "page" ? "margin-left: -4px;" : "padding-left: 6px;");
|
|
64
73
|
});
|
|
65
74
|
var StyledPropertyListValue = exports.StyledPropertyListValue = (0, _styledComponents.default)(_Typography.Body2).withConfig({
|
|
66
75
|
displayName: "Styles__StyledPropertyListValue",
|
|
67
76
|
componentId: "sc-ssdfzo-6"
|
|
68
|
-
})(["&&{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:", ";", "}"], function (
|
|
69
|
-
var $density =
|
|
77
|
+
})(["&&{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:", ";", "}"], function (_ref1) {
|
|
78
|
+
var $density = _ref1.$density;
|
|
70
79
|
return $density === "page" ? "15px" : "calc(1em + 1px)";
|
|
71
|
-
}, function (
|
|
72
|
-
var $placeholder =
|
|
73
|
-
$density =
|
|
80
|
+
}, function (_ref10) {
|
|
81
|
+
var $placeholder = _ref10.$placeholder,
|
|
82
|
+
$density = _ref10.$density;
|
|
74
83
|
return !$placeholder && "color: ".concat($density === "page" ? "var(--muted-text)" : "var(--color-theme-800)", ";");
|
|
75
84
|
});
|
|
76
85
|
var StyledPropertyListAddIcon = exports.StyledPropertyListAddIcon = _styledComponents.default.span.withConfig({
|
|
@@ -92,7 +101,7 @@ var StyledPropertyListChevron = exports.StyledPropertyListChevron = _styledCompo
|
|
|
92
101
|
var StyledPropertyListToggle = exports.StyledPropertyListToggle = _styledComponents.default.button.withConfig({
|
|
93
102
|
displayName: "Styles__StyledPropertyListToggle",
|
|
94
103
|
componentId: "sc-ssdfzo-11"
|
|
95
|
-
})(["display:flex;align-items:center;width:100%;min-height:36px;padding:0 12px;border:0;background-color:transparent;color:var(--color-theme-600);font-size:13px;line-height:20px;text-align:left;cursor:pointer;&:hover,&:focus-visible{background-color:var(--color-theme-200);}"]);
|
|
104
|
+
})(["display:flex;align-items:center;width:100%;min-height:36px;padding:0 12px;border:0;background-color:transparent;color:var(--color-theme-600);font-size:13px;line-height:20px;text-align:left;cursor:pointer;&:hover,&:focus-visible{background-color:var(--color-theme-200);}&:disabled{cursor:default;opacity:0.4;background-color:transparent;}"]);
|
|
96
105
|
var StyledPropertyListBranch = exports.StyledPropertyListBranch = _styledComponents.default.span.withConfig({
|
|
97
106
|
displayName: "Styles__StyledPropertyListBranch",
|
|
98
107
|
componentId: "sc-ssdfzo-12"
|