@heymantle/litho 0.0.6 → 0.0.8
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/Grid.js +20 -6
- package/dist/cjs/components/Modal.js +4 -2
- package/dist/cjs/stories/Grid.stories.js +14 -14
- package/dist/esm/components/Grid.js +20 -6
- package/dist/esm/components/Modal.js +4 -2
- package/dist/esm/stories/Grid.stories.js +14 -14
- package/dist/types/components/Grid.d.ts +2 -2
- package/dist/types/components/Grid.d.ts.map +1 -1
- package/dist/types/components/Modal.d.ts +2 -0
- package/dist/types/components/Modal.d.ts.map +1 -1
- package/index.css +2 -0
- package/package.json +1 -1
|
@@ -60,6 +60,14 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
60
60
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
61
61
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
62
62
|
}
|
|
63
|
+
// Map semantic gap values to numeric Tailwind values
|
|
64
|
+
var gapMap = {
|
|
65
|
+
none: "0",
|
|
66
|
+
xs: "1",
|
|
67
|
+
sm: "2",
|
|
68
|
+
md: "4",
|
|
69
|
+
lg: "8"
|
|
70
|
+
};
|
|
63
71
|
var styles = (0, _tailwindvariants.tv)({
|
|
64
72
|
base: "Litho-Grid grid",
|
|
65
73
|
variants: {
|
|
@@ -83,18 +91,18 @@ var styles = (0, _tailwindvariants.tv)({
|
|
|
83
91
|
});
|
|
84
92
|
/**
|
|
85
93
|
* Tailwind-based Grid component with customizable columns, gaps, alignment, and justification.
|
|
86
|
-
*
|
|
94
|
+
*
|
|
87
95
|
* @param {object} [props={}] - Props for the Grid component.
|
|
88
96
|
* @param {React.ReactNode} [props.children] - Content to render inside the Grid.
|
|
89
97
|
* @param {number|object} [props.columns] - Defines the number of columns in the grid. Can be a single number or an object with breakpoints as keys.
|
|
90
|
-
* @param {number|object} [props.gap] - Defines the gap between grid items. Can be a
|
|
98
|
+
* @param {(number|'none'|'xs'|'sm'|'md'|'lg'|object)} [props.gap] - Defines the gap between grid items. Can be a number, semantic value ('none', 'xs', 'sm', 'md', 'lg'), or an object with breakpoints as keys. Semantic values: 'none' (0), 'xs' (1), 'sm' (2), 'md' (4), 'lg' (8).
|
|
91
99
|
* @param {"stretch"|"start"|"end"|"center"} [props.justify="stretch"] - Horizontal alignment of the grid items.
|
|
92
100
|
* @param {"stretch"|"start"|"end"|"center"} [props.align="stretch"] - Vertical alignment of the grid items.
|
|
93
101
|
* @param {string} [props.className] - Additional class names to apply to the grid.
|
|
94
102
|
* @returns {JSX.Element} A div element representing the grid container.
|
|
95
103
|
*/ function Grid() {
|
|
96
104
|
var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
97
|
-
var children = props.children, columns = props.columns,
|
|
105
|
+
var children = props.children, columns = props.columns, _props_gap = props.gap, gap = _props_gap === void 0 ? "md" : _props_gap, _props_justify = props.justify, justify = _props_justify === void 0 ? "stretch" : _props_justify, _props_align = props.align, align = _props_align === void 0 ? "stretch" : _props_align, className = props.className;
|
|
98
106
|
var columnClasses;
|
|
99
107
|
var gapClasses;
|
|
100
108
|
if ((typeof columns === "undefined" ? "undefined" : _type_of(columns)) === "object") {
|
|
@@ -107,11 +115,17 @@ var styles = (0, _tailwindvariants.tv)({
|
|
|
107
115
|
}
|
|
108
116
|
if ((typeof gap === "undefined" ? "undefined" : _type_of(gap)) === "object") {
|
|
109
117
|
gapClasses = Object.entries(gap).map(function(param) {
|
|
110
|
-
var _param = _sliced_to_array(param, 2), breakpoint = _param[0],
|
|
111
|
-
|
|
118
|
+
var _param = _sliced_to_array(param, 2), breakpoint = _param[0], value = _param[1];
|
|
119
|
+
// Convert semantic values to numeric values
|
|
120
|
+
var numericValue = gapMap[value] || value;
|
|
121
|
+
return breakpoint === "default" || breakpoint === "xs" ? "gap-".concat(numericValue) : "@".concat(breakpoint, ":gap-").concat(numericValue);
|
|
112
122
|
}).join(" ");
|
|
123
|
+
} else if (gap !== undefined) {
|
|
124
|
+
// Convert semantic values to numeric values
|
|
125
|
+
var numericGap = gapMap[gap] || gap;
|
|
126
|
+
gapClasses = "gap-".concat(numericGap);
|
|
113
127
|
} else {
|
|
114
|
-
gapClasses = "
|
|
128
|
+
gapClasses = "";
|
|
115
129
|
}
|
|
116
130
|
var classes = styles({
|
|
117
131
|
align: align,
|
|
@@ -199,10 +199,11 @@ var sectionStyles = (0, _tailwindvariants.tv)({
|
|
|
199
199
|
* @param {React.ReactNode} [props.leftAccessory] - Left accessory content in the footer.
|
|
200
200
|
* @param {boolean} [props.hideCloseButton=false] - Whether to hide the close button.
|
|
201
201
|
* @param {number} [props.zIndexOverride=1000] - The z-index of the modal.
|
|
202
|
+
* @param {boolean} [props.autoFocusFirstInput=true] - Whether to focus the first input when the modal opens.
|
|
202
203
|
* @returns {React.ReactPortal|null} The rendered modal component or null if not open.
|
|
203
204
|
*/ function Modal() {
|
|
204
205
|
var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
205
|
-
var children = props.children, title = props.title, subtitle = props.subtitle, open = props.open, onClose = props.onClose, sectioned = props.sectioned, primaryAction = props.primaryAction, secondaryAction = props.secondaryAction, _props_secondaryActions = props.secondaryActions, secondaryActions = _props_secondaryActions === void 0 ? [] : _props_secondaryActions, destructiveAction = props.destructiveAction, loading = props.loading, _props_size = props.size, size = _props_size === void 0 ? "default" : _props_size, leftAccessory = props.leftAccessory, _props_hideCloseButton = props.hideCloseButton, hideCloseButton = _props_hideCloseButton === void 0 ? false : _props_hideCloseButton, backAction = props.backAction, zIndexOverride = props.zIndexOverride;
|
|
206
|
+
var children = props.children, title = props.title, subtitle = props.subtitle, open = props.open, onClose = props.onClose, sectioned = props.sectioned, primaryAction = props.primaryAction, secondaryAction = props.secondaryAction, _props_secondaryActions = props.secondaryActions, secondaryActions = _props_secondaryActions === void 0 ? [] : _props_secondaryActions, destructiveAction = props.destructiveAction, loading = props.loading, _props_size = props.size, size = _props_size === void 0 ? "default" : _props_size, leftAccessory = props.leftAccessory, _props_hideCloseButton = props.hideCloseButton, hideCloseButton = _props_hideCloseButton === void 0 ? false : _props_hideCloseButton, backAction = props.backAction, zIndexOverride = props.zIndexOverride, _props_autoFocusFirstInput = props.autoFocusFirstInput, autoFocusFirstInput = _props_autoFocusFirstInput === void 0 ? true : _props_autoFocusFirstInput;
|
|
206
207
|
var setModalIsOpen = (0, _Frame.useFrame)().setModalIsOpen;
|
|
207
208
|
var modalContentRef = (0, _react.useRef)(null);
|
|
208
209
|
var hasChildren = !!children;
|
|
@@ -244,11 +245,12 @@ var sectionStyles = (0, _tailwindvariants.tv)({
|
|
|
244
245
|
]);
|
|
245
246
|
// Focus first input when modal opens
|
|
246
247
|
(0, _react.useLayoutEffect)(function() {
|
|
247
|
-
if (open && container && modalContentRef.current) {
|
|
248
|
+
if (autoFocusFirstInput && open && container && modalContentRef.current) {
|
|
248
249
|
var focusable = modalContentRef.current.querySelector('input:not([type="hidden"]), select, textarea');
|
|
249
250
|
if (focusable) focusable.focus();
|
|
250
251
|
}
|
|
251
252
|
}, [
|
|
253
|
+
autoFocusFirstInput,
|
|
252
254
|
open,
|
|
253
255
|
container
|
|
254
256
|
]);
|
|
@@ -251,7 +251,7 @@ var DifferentColumns = {
|
|
|
251
251
|
}),
|
|
252
252
|
/*#__PURE__*/ (0, _jsxruntime.jsxs)(_Grid.default, {
|
|
253
253
|
columns: 2,
|
|
254
|
-
gap:
|
|
254
|
+
gap: "md",
|
|
255
255
|
children: [
|
|
256
256
|
/*#__PURE__*/ (0, _jsxruntime.jsx)(_Card.default, {
|
|
257
257
|
padded: true,
|
|
@@ -289,7 +289,7 @@ var DifferentColumns = {
|
|
|
289
289
|
}),
|
|
290
290
|
/*#__PURE__*/ (0, _jsxruntime.jsxs)(_Grid.default, {
|
|
291
291
|
columns: 4,
|
|
292
|
-
gap:
|
|
292
|
+
gap: "md",
|
|
293
293
|
children: [
|
|
294
294
|
/*#__PURE__*/ (0, _jsxruntime.jsx)(_Card.default, {
|
|
295
295
|
padded: true,
|
|
@@ -327,7 +327,7 @@ var DifferentColumns = {
|
|
|
327
327
|
}),
|
|
328
328
|
/*#__PURE__*/ (0, _jsxruntime.jsxs)(_Grid.default, {
|
|
329
329
|
columns: 6,
|
|
330
|
-
gap:
|
|
330
|
+
gap: "sm",
|
|
331
331
|
children: [
|
|
332
332
|
/*#__PURE__*/ (0, _jsxruntime.jsx)(_Card.default, {
|
|
333
333
|
padded: true,
|
|
@@ -387,7 +387,7 @@ var WithColumnSpan = {
|
|
|
387
387
|
render: function() {
|
|
388
388
|
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_Grid.default, {
|
|
389
389
|
columns: 4,
|
|
390
|
-
gap:
|
|
390
|
+
gap: "md",
|
|
391
391
|
children: [
|
|
392
392
|
/*#__PURE__*/ (0, _jsxruntime.jsx)(_Grid.default.Cell, {
|
|
393
393
|
columnSpan: 2,
|
|
@@ -470,7 +470,7 @@ var GapSizes = {
|
|
|
470
470
|
}),
|
|
471
471
|
/*#__PURE__*/ (0, _jsxruntime.jsxs)(_Grid.default, {
|
|
472
472
|
columns: 3,
|
|
473
|
-
gap:
|
|
473
|
+
gap: "none",
|
|
474
474
|
children: [
|
|
475
475
|
/*#__PURE__*/ (0, _jsxruntime.jsx)(_Card.default, {
|
|
476
476
|
padded: true,
|
|
@@ -502,7 +502,7 @@ var GapSizes = {
|
|
|
502
502
|
}),
|
|
503
503
|
/*#__PURE__*/ (0, _jsxruntime.jsxs)(_Grid.default, {
|
|
504
504
|
columns: 3,
|
|
505
|
-
gap:
|
|
505
|
+
gap: "sm",
|
|
506
506
|
children: [
|
|
507
507
|
/*#__PURE__*/ (0, _jsxruntime.jsx)(_Card.default, {
|
|
508
508
|
padded: true,
|
|
@@ -534,7 +534,7 @@ var GapSizes = {
|
|
|
534
534
|
}),
|
|
535
535
|
/*#__PURE__*/ (0, _jsxruntime.jsxs)(_Grid.default, {
|
|
536
536
|
columns: 3,
|
|
537
|
-
gap:
|
|
537
|
+
gap: "lg",
|
|
538
538
|
children: [
|
|
539
539
|
/*#__PURE__*/ (0, _jsxruntime.jsx)(_Card.default, {
|
|
540
540
|
padded: true,
|
|
@@ -590,7 +590,7 @@ var Alignment = {
|
|
|
590
590
|
borderColor: "border-subdued",
|
|
591
591
|
children: /*#__PURE__*/ (0, _jsxruntime.jsxs)(_Grid.default, {
|
|
592
592
|
columns: 3,
|
|
593
|
-
gap:
|
|
593
|
+
gap: "md",
|
|
594
594
|
justify: "center",
|
|
595
595
|
align: "center",
|
|
596
596
|
children: [
|
|
@@ -630,7 +630,7 @@ var Alignment = {
|
|
|
630
630
|
borderColor: "border-subdued",
|
|
631
631
|
children: /*#__PURE__*/ (0, _jsxruntime.jsxs)(_Grid.default, {
|
|
632
632
|
columns: 3,
|
|
633
|
-
gap:
|
|
633
|
+
gap: "md",
|
|
634
634
|
justify: "start",
|
|
635
635
|
align: "end",
|
|
636
636
|
children: [
|
|
@@ -716,7 +716,7 @@ var ProductCatalog = {
|
|
|
716
716
|
padded: true,
|
|
717
717
|
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_Grid.default, {
|
|
718
718
|
columns: 3,
|
|
719
|
-
gap:
|
|
719
|
+
gap: "md",
|
|
720
720
|
children: products.map(function(product, index) {
|
|
721
721
|
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_Card.default, {
|
|
722
722
|
padded: true,
|
|
@@ -777,7 +777,7 @@ var DashboardLayout = {
|
|
|
777
777
|
children: [
|
|
778
778
|
/*#__PURE__*/ (0, _jsxruntime.jsxs)(_Grid.default, {
|
|
779
779
|
columns: 4,
|
|
780
|
-
gap:
|
|
780
|
+
gap: "md",
|
|
781
781
|
children: [
|
|
782
782
|
/*#__PURE__*/ (0, _jsxruntime.jsxs)(_Card.default, {
|
|
783
783
|
padded: true,
|
|
@@ -855,7 +855,7 @@ var DashboardLayout = {
|
|
|
855
855
|
}),
|
|
856
856
|
/*#__PURE__*/ (0, _jsxruntime.jsxs)(_Grid.default, {
|
|
857
857
|
columns: 3,
|
|
858
|
-
gap:
|
|
858
|
+
gap: "md",
|
|
859
859
|
children: [
|
|
860
860
|
/*#__PURE__*/ (0, _jsxruntime.jsx)(_Grid.default.Cell, {
|
|
861
861
|
columnSpan: 2,
|
|
@@ -957,7 +957,7 @@ var TeamDirectory = {
|
|
|
957
957
|
padded: true,
|
|
958
958
|
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_Grid.default, {
|
|
959
959
|
columns: 4,
|
|
960
|
-
gap:
|
|
960
|
+
gap: "md",
|
|
961
961
|
children: team.map(function(member, index) {
|
|
962
962
|
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_Card.default, {
|
|
963
963
|
padded: true,
|
|
@@ -1026,7 +1026,7 @@ var ImageGallery = {
|
|
|
1026
1026
|
padded: true,
|
|
1027
1027
|
children: /*#__PURE__*/ (0, _jsxruntime.jsxs)(_Grid.default, {
|
|
1028
1028
|
columns: 4,
|
|
1029
|
-
gap:
|
|
1029
|
+
gap: "sm",
|
|
1030
1030
|
children: [
|
|
1031
1031
|
/*#__PURE__*/ (0, _jsxruntime.jsx)(_Grid.default.Cell, {
|
|
1032
1032
|
columnSpan: 2,
|
|
@@ -50,6 +50,14 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
50
50
|
}
|
|
51
51
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
52
52
|
import { tv } from "tailwind-variants";
|
|
53
|
+
// Map semantic gap values to numeric Tailwind values
|
|
54
|
+
var gapMap = {
|
|
55
|
+
none: "0",
|
|
56
|
+
xs: "1",
|
|
57
|
+
sm: "2",
|
|
58
|
+
md: "4",
|
|
59
|
+
lg: "8"
|
|
60
|
+
};
|
|
53
61
|
var styles = tv({
|
|
54
62
|
base: "Litho-Grid grid",
|
|
55
63
|
variants: {
|
|
@@ -73,18 +81,18 @@ var styles = tv({
|
|
|
73
81
|
});
|
|
74
82
|
/**
|
|
75
83
|
* Tailwind-based Grid component with customizable columns, gaps, alignment, and justification.
|
|
76
|
-
*
|
|
84
|
+
*
|
|
77
85
|
* @param {object} [props={}] - Props for the Grid component.
|
|
78
86
|
* @param {React.ReactNode} [props.children] - Content to render inside the Grid.
|
|
79
87
|
* @param {number|object} [props.columns] - Defines the number of columns in the grid. Can be a single number or an object with breakpoints as keys.
|
|
80
|
-
* @param {number|object} [props.gap] - Defines the gap between grid items. Can be a
|
|
88
|
+
* @param {(number|'none'|'xs'|'sm'|'md'|'lg'|object)} [props.gap] - Defines the gap between grid items. Can be a number, semantic value ('none', 'xs', 'sm', 'md', 'lg'), or an object with breakpoints as keys. Semantic values: 'none' (0), 'xs' (1), 'sm' (2), 'md' (4), 'lg' (8).
|
|
81
89
|
* @param {"stretch"|"start"|"end"|"center"} [props.justify="stretch"] - Horizontal alignment of the grid items.
|
|
82
90
|
* @param {"stretch"|"start"|"end"|"center"} [props.align="stretch"] - Vertical alignment of the grid items.
|
|
83
91
|
* @param {string} [props.className] - Additional class names to apply to the grid.
|
|
84
92
|
* @returns {JSX.Element} A div element representing the grid container.
|
|
85
93
|
*/ function Grid() {
|
|
86
94
|
var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
87
|
-
var children = props.children, columns = props.columns,
|
|
95
|
+
var children = props.children, columns = props.columns, _props_gap = props.gap, gap = _props_gap === void 0 ? "md" : _props_gap, _props_justify = props.justify, justify = _props_justify === void 0 ? "stretch" : _props_justify, _props_align = props.align, align = _props_align === void 0 ? "stretch" : _props_align, className = props.className;
|
|
88
96
|
var columnClasses;
|
|
89
97
|
var gapClasses;
|
|
90
98
|
if ((typeof columns === "undefined" ? "undefined" : _type_of(columns)) === "object") {
|
|
@@ -97,11 +105,17 @@ var styles = tv({
|
|
|
97
105
|
}
|
|
98
106
|
if ((typeof gap === "undefined" ? "undefined" : _type_of(gap)) === "object") {
|
|
99
107
|
gapClasses = Object.entries(gap).map(function(param) {
|
|
100
|
-
var _param = _sliced_to_array(param, 2), breakpoint = _param[0],
|
|
101
|
-
|
|
108
|
+
var _param = _sliced_to_array(param, 2), breakpoint = _param[0], value = _param[1];
|
|
109
|
+
// Convert semantic values to numeric values
|
|
110
|
+
var numericValue = gapMap[value] || value;
|
|
111
|
+
return breakpoint === "default" || breakpoint === "xs" ? "gap-".concat(numericValue) : "@".concat(breakpoint, ":gap-").concat(numericValue);
|
|
102
112
|
}).join(" ");
|
|
113
|
+
} else if (gap !== undefined) {
|
|
114
|
+
// Convert semantic values to numeric values
|
|
115
|
+
var numericGap = gapMap[gap] || gap;
|
|
116
|
+
gapClasses = "gap-".concat(numericGap);
|
|
103
117
|
} else {
|
|
104
|
-
gapClasses = "
|
|
118
|
+
gapClasses = "";
|
|
105
119
|
}
|
|
106
120
|
var classes = styles({
|
|
107
121
|
align: align,
|
|
@@ -135,10 +135,11 @@ var sectionStyles = tv({
|
|
|
135
135
|
* @param {React.ReactNode} [props.leftAccessory] - Left accessory content in the footer.
|
|
136
136
|
* @param {boolean} [props.hideCloseButton=false] - Whether to hide the close button.
|
|
137
137
|
* @param {number} [props.zIndexOverride=1000] - The z-index of the modal.
|
|
138
|
+
* @param {boolean} [props.autoFocusFirstInput=true] - Whether to focus the first input when the modal opens.
|
|
138
139
|
* @returns {React.ReactPortal|null} The rendered modal component or null if not open.
|
|
139
140
|
*/ function Modal() {
|
|
140
141
|
var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
141
|
-
var children = props.children, title = props.title, subtitle = props.subtitle, open = props.open, onClose = props.onClose, sectioned = props.sectioned, primaryAction = props.primaryAction, secondaryAction = props.secondaryAction, _props_secondaryActions = props.secondaryActions, secondaryActions = _props_secondaryActions === void 0 ? [] : _props_secondaryActions, destructiveAction = props.destructiveAction, loading = props.loading, _props_size = props.size, size = _props_size === void 0 ? "default" : _props_size, leftAccessory = props.leftAccessory, _props_hideCloseButton = props.hideCloseButton, hideCloseButton = _props_hideCloseButton === void 0 ? false : _props_hideCloseButton, backAction = props.backAction, zIndexOverride = props.zIndexOverride;
|
|
142
|
+
var children = props.children, title = props.title, subtitle = props.subtitle, open = props.open, onClose = props.onClose, sectioned = props.sectioned, primaryAction = props.primaryAction, secondaryAction = props.secondaryAction, _props_secondaryActions = props.secondaryActions, secondaryActions = _props_secondaryActions === void 0 ? [] : _props_secondaryActions, destructiveAction = props.destructiveAction, loading = props.loading, _props_size = props.size, size = _props_size === void 0 ? "default" : _props_size, leftAccessory = props.leftAccessory, _props_hideCloseButton = props.hideCloseButton, hideCloseButton = _props_hideCloseButton === void 0 ? false : _props_hideCloseButton, backAction = props.backAction, zIndexOverride = props.zIndexOverride, _props_autoFocusFirstInput = props.autoFocusFirstInput, autoFocusFirstInput = _props_autoFocusFirstInput === void 0 ? true : _props_autoFocusFirstInput;
|
|
142
143
|
var setModalIsOpen = useFrame().setModalIsOpen;
|
|
143
144
|
var modalContentRef = useRef(null);
|
|
144
145
|
var hasChildren = !!children;
|
|
@@ -180,11 +181,12 @@ var sectionStyles = tv({
|
|
|
180
181
|
]);
|
|
181
182
|
// Focus first input when modal opens
|
|
182
183
|
useLayoutEffect(function() {
|
|
183
|
-
if (open && container && modalContentRef.current) {
|
|
184
|
+
if (autoFocusFirstInput && open && container && modalContentRef.current) {
|
|
184
185
|
var focusable = modalContentRef.current.querySelector('input:not([type="hidden"]), select, textarea');
|
|
185
186
|
if (focusable) focusable.focus();
|
|
186
187
|
}
|
|
187
188
|
}, [
|
|
189
|
+
autoFocusFirstInput,
|
|
188
190
|
open,
|
|
189
191
|
container
|
|
190
192
|
]);
|
|
@@ -204,7 +204,7 @@ export var DifferentColumns = {
|
|
|
204
204
|
}),
|
|
205
205
|
/*#__PURE__*/ _jsxs(Grid, {
|
|
206
206
|
columns: 2,
|
|
207
|
-
gap:
|
|
207
|
+
gap: "md",
|
|
208
208
|
children: [
|
|
209
209
|
/*#__PURE__*/ _jsx(Card, {
|
|
210
210
|
padded: true,
|
|
@@ -242,7 +242,7 @@ export var DifferentColumns = {
|
|
|
242
242
|
}),
|
|
243
243
|
/*#__PURE__*/ _jsxs(Grid, {
|
|
244
244
|
columns: 4,
|
|
245
|
-
gap:
|
|
245
|
+
gap: "md",
|
|
246
246
|
children: [
|
|
247
247
|
/*#__PURE__*/ _jsx(Card, {
|
|
248
248
|
padded: true,
|
|
@@ -280,7 +280,7 @@ export var DifferentColumns = {
|
|
|
280
280
|
}),
|
|
281
281
|
/*#__PURE__*/ _jsxs(Grid, {
|
|
282
282
|
columns: 6,
|
|
283
|
-
gap:
|
|
283
|
+
gap: "sm",
|
|
284
284
|
children: [
|
|
285
285
|
/*#__PURE__*/ _jsx(Card, {
|
|
286
286
|
padded: true,
|
|
@@ -340,7 +340,7 @@ export var WithColumnSpan = {
|
|
|
340
340
|
render: function() {
|
|
341
341
|
return /*#__PURE__*/ _jsxs(Grid, {
|
|
342
342
|
columns: 4,
|
|
343
|
-
gap:
|
|
343
|
+
gap: "md",
|
|
344
344
|
children: [
|
|
345
345
|
/*#__PURE__*/ _jsx(Grid.Cell, {
|
|
346
346
|
columnSpan: 2,
|
|
@@ -423,7 +423,7 @@ export var GapSizes = {
|
|
|
423
423
|
}),
|
|
424
424
|
/*#__PURE__*/ _jsxs(Grid, {
|
|
425
425
|
columns: 3,
|
|
426
|
-
gap:
|
|
426
|
+
gap: "none",
|
|
427
427
|
children: [
|
|
428
428
|
/*#__PURE__*/ _jsx(Card, {
|
|
429
429
|
padded: true,
|
|
@@ -455,7 +455,7 @@ export var GapSizes = {
|
|
|
455
455
|
}),
|
|
456
456
|
/*#__PURE__*/ _jsxs(Grid, {
|
|
457
457
|
columns: 3,
|
|
458
|
-
gap:
|
|
458
|
+
gap: "sm",
|
|
459
459
|
children: [
|
|
460
460
|
/*#__PURE__*/ _jsx(Card, {
|
|
461
461
|
padded: true,
|
|
@@ -487,7 +487,7 @@ export var GapSizes = {
|
|
|
487
487
|
}),
|
|
488
488
|
/*#__PURE__*/ _jsxs(Grid, {
|
|
489
489
|
columns: 3,
|
|
490
|
-
gap:
|
|
490
|
+
gap: "lg",
|
|
491
491
|
children: [
|
|
492
492
|
/*#__PURE__*/ _jsx(Card, {
|
|
493
493
|
padded: true,
|
|
@@ -543,7 +543,7 @@ export var Alignment = {
|
|
|
543
543
|
borderColor: "border-subdued",
|
|
544
544
|
children: /*#__PURE__*/ _jsxs(Grid, {
|
|
545
545
|
columns: 3,
|
|
546
|
-
gap:
|
|
546
|
+
gap: "md",
|
|
547
547
|
justify: "center",
|
|
548
548
|
align: "center",
|
|
549
549
|
children: [
|
|
@@ -583,7 +583,7 @@ export var Alignment = {
|
|
|
583
583
|
borderColor: "border-subdued",
|
|
584
584
|
children: /*#__PURE__*/ _jsxs(Grid, {
|
|
585
585
|
columns: 3,
|
|
586
|
-
gap:
|
|
586
|
+
gap: "md",
|
|
587
587
|
justify: "start",
|
|
588
588
|
align: "end",
|
|
589
589
|
children: [
|
|
@@ -669,7 +669,7 @@ export var ProductCatalog = {
|
|
|
669
669
|
padded: true,
|
|
670
670
|
children: /*#__PURE__*/ _jsx(Grid, {
|
|
671
671
|
columns: 3,
|
|
672
|
-
gap:
|
|
672
|
+
gap: "md",
|
|
673
673
|
children: products.map(function(product, index) {
|
|
674
674
|
return /*#__PURE__*/ _jsx(Card, {
|
|
675
675
|
padded: true,
|
|
@@ -730,7 +730,7 @@ export var DashboardLayout = {
|
|
|
730
730
|
children: [
|
|
731
731
|
/*#__PURE__*/ _jsxs(Grid, {
|
|
732
732
|
columns: 4,
|
|
733
|
-
gap:
|
|
733
|
+
gap: "md",
|
|
734
734
|
children: [
|
|
735
735
|
/*#__PURE__*/ _jsxs(Card, {
|
|
736
736
|
padded: true,
|
|
@@ -808,7 +808,7 @@ export var DashboardLayout = {
|
|
|
808
808
|
}),
|
|
809
809
|
/*#__PURE__*/ _jsxs(Grid, {
|
|
810
810
|
columns: 3,
|
|
811
|
-
gap:
|
|
811
|
+
gap: "md",
|
|
812
812
|
children: [
|
|
813
813
|
/*#__PURE__*/ _jsx(Grid.Cell, {
|
|
814
814
|
columnSpan: 2,
|
|
@@ -910,7 +910,7 @@ export var TeamDirectory = {
|
|
|
910
910
|
padded: true,
|
|
911
911
|
children: /*#__PURE__*/ _jsx(Grid, {
|
|
912
912
|
columns: 4,
|
|
913
|
-
gap:
|
|
913
|
+
gap: "md",
|
|
914
914
|
children: team.map(function(member, index) {
|
|
915
915
|
return /*#__PURE__*/ _jsx(Card, {
|
|
916
916
|
padded: true,
|
|
@@ -979,7 +979,7 @@ export var ImageGallery = {
|
|
|
979
979
|
padded: true,
|
|
980
980
|
children: /*#__PURE__*/ _jsxs(Grid, {
|
|
981
981
|
columns: 4,
|
|
982
|
-
gap:
|
|
982
|
+
gap: "sm",
|
|
983
983
|
children: [
|
|
984
984
|
/*#__PURE__*/ _jsx(Grid.Cell, {
|
|
985
985
|
columnSpan: 2,
|
|
@@ -5,7 +5,7 @@ export default Grid;
|
|
|
5
5
|
* @param {object} [props={}] - Props for the Grid component.
|
|
6
6
|
* @param {React.ReactNode} [props.children] - Content to render inside the Grid.
|
|
7
7
|
* @param {number|object} [props.columns] - Defines the number of columns in the grid. Can be a single number or an object with breakpoints as keys.
|
|
8
|
-
* @param {number|object} [props.gap] - Defines the gap between grid items. Can be a
|
|
8
|
+
* @param {(number|'none'|'xs'|'sm'|'md'|'lg'|object)} [props.gap] - Defines the gap between grid items. Can be a number, semantic value ('none', 'xs', 'sm', 'md', 'lg'), or an object with breakpoints as keys. Semantic values: 'none' (0), 'xs' (1), 'sm' (2), 'md' (4), 'lg' (8).
|
|
9
9
|
* @param {"stretch"|"start"|"end"|"center"} [props.justify="stretch"] - Horizontal alignment of the grid items.
|
|
10
10
|
* @param {"stretch"|"start"|"end"|"center"} [props.align="stretch"] - Vertical alignment of the grid items.
|
|
11
11
|
* @param {string} [props.className] - Additional class names to apply to the grid.
|
|
@@ -14,7 +14,7 @@ export default Grid;
|
|
|
14
14
|
declare function Grid(props?: {
|
|
15
15
|
children?: React.ReactNode;
|
|
16
16
|
columns?: number | object;
|
|
17
|
-
gap?: number | object;
|
|
17
|
+
gap?: (number | "none" | "xs" | "sm" | "md" | "lg" | object);
|
|
18
18
|
justify?: "stretch" | "start" | "end" | "center";
|
|
19
19
|
align?: "stretch" | "start" | "end" | "center";
|
|
20
20
|
className?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Grid.d.ts","sourceRoot":"","sources":["../../../components/Grid.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"Grid.d.ts","sourceRoot":"","sources":["../../../components/Grid.js"],"names":[],"mappings":";AAiCA;;;;;;;;;;;GAWG;AACH,8BARG;IAAgC,QAAQ,GAAhC,KAAK,CAAC,SAAS;IACO,OAAO,GAA7B,MAAM,GAAC,MAAM;IACsC,GAAG,GAAtD,CAAC,MAAM,GAAC,MAAM,GAAC,IAAI,GAAC,IAAI,GAAC,IAAI,GAAC,IAAI,GAAC,MAAM,CAAC;IACD,OAAO,GAAhD,SAAS,GAAC,OAAO,GAAC,KAAK,GAAC,QAAQ;IACS,KAAK,GAA9C,SAAS,GAAC,OAAO,GAAC,KAAK,GAAC,QAAQ;IACjB,SAAS,GAAxB,MAAM;CACd,GAAU,GAAG,CAAC,OAAO,CAiDvB;;;;AAED;;;;;;;;GAQG;AACH,8BALG;IAA8B,UAAU,GAAhC,MAAM,GAAC,MAAM;IACW,QAAQ,GAAhC,KAAK,CAAC,SAAS;IACA,SAAS,GAAxB,MAAM;CACd,GAAU,GAAG,CAAC,OAAO,CAwBvB"}
|
|
@@ -28,6 +28,7 @@ import React from "react";
|
|
|
28
28
|
* @param {React.ReactNode} [props.leftAccessory] - Left accessory content in the footer.
|
|
29
29
|
* @param {boolean} [props.hideCloseButton=false] - Whether to hide the close button.
|
|
30
30
|
* @param {number} [props.zIndexOverride=1000] - The z-index of the modal.
|
|
31
|
+
* @param {boolean} [props.autoFocusFirstInput=true] - Whether to focus the first input when the modal opens.
|
|
31
32
|
* @returns {React.ReactPortal|null} The rendered modal component or null if not open.
|
|
32
33
|
*/
|
|
33
34
|
declare function Modal(props?: {
|
|
@@ -56,6 +57,7 @@ declare function Modal(props?: {
|
|
|
56
57
|
leftAccessory?: React.ReactNode;
|
|
57
58
|
hideCloseButton?: boolean;
|
|
58
59
|
zIndexOverride?: number;
|
|
60
|
+
autoFocusFirstInput?: boolean;
|
|
59
61
|
}): React.ReactPortal | null;
|
|
60
62
|
declare namespace Modal {
|
|
61
63
|
export { Section };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../../components/Modal.js"],"names":[],"mappings":"AAaA,kDAAiD;;kBAVkC,OAAO;AAgE1F
|
|
1
|
+
{"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../../components/Modal.js"],"names":[],"mappings":"AAaA,kDAAiD;;kBAVkC,OAAO;AAgE1F;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,+BA3BG;IAAgC,QAAQ,GAAhC,KAAK,CAAC,SAAS;IACA,KAAK,GAApB,MAAM;IACS,QAAQ,GAAvB,MAAM;IACU,IAAI,GAApB,OAAO;IACU,OAAO;IACR,SAAS,GAAzB,OAAO;IACQ,aAAa,GACpC;QAAqC,OAAO,GAApC,MAAM;QACyB,QAAQ;QACT,OAAO,GAArC,OAAO;QACuB,QAAQ,GAAtC,OAAO;QACuB,WAAW,GAAzC,OAAO;KACf;IAAuB,eAAe,GACtC;QAAuC,OAAO,GAAtC,MAAM;QAC2B,QAAQ;QACT,QAAQ,GAAxC,OAAO;KACf;IAAyB,gBAAgB,GAAjC,KAAQ;IACO,iBAAiB;IAChB,OAAO,GAAvB,OAAO;IACQ,IAAI,GAAnB,MAAM;IACkB,aAAa,GAArC,KAAK,CAAC,SAAS;IACC,eAAe,GAA/B,OAAO;IACQ,cAAc,GAA7B,MAAM;IACU,mBAAmB,GAAnC,OAAO;CACf,GAAU,KAAK,CAAC,WAAW,GAAC,IAAI,CAsMlC;;;;AAED;;;;;;;GAOG;AAEH,iCALG;IAAgC,QAAQ,GAAhC,KAAK,CAAC,SAAS;IACC,KAAK,GAArB,OAAO;CACf,GAAU,GAAG,CAAC,OAAO,CA0EvB"}
|
package/index.css
CHANGED
|
@@ -572,6 +572,8 @@
|
|
|
572
572
|
--color-edge-alt-default: rgba(238, 238, 242, 0.21);
|
|
573
573
|
--color-edge-alt-subdued: rgba(238, 238, 242, 0.12);
|
|
574
574
|
|
|
575
|
+
--color-brand-chat: #42331d;
|
|
576
|
+
|
|
575
577
|
--color-tint-1: rgba(0, 0, 0, 0.08);
|
|
576
578
|
--color-tint-2: rgba(0, 0, 0, 0.11);
|
|
577
579
|
--color-tint-3: rgba(0, 0, 0, 0.14);
|
package/package.json
CHANGED