@heymantle/litho 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/Autocomplete.js +23 -12
- package/dist/cjs/components/Button.js +44 -6
- package/dist/cjs/components/Card.js +1 -0
- package/dist/cjs/components/ColorField.js +2 -2
- package/dist/cjs/components/EmptyState.js +2 -2
- package/dist/cjs/components/Filters.js +4 -3
- package/dist/cjs/components/Frame.js +9 -9
- package/dist/cjs/components/HorizontalStack.js +9 -2
- package/dist/cjs/components/Icon.js +1 -0
- package/dist/cjs/components/List.js +3 -3
- package/dist/cjs/components/Pane.js +61 -17
- package/dist/cjs/components/Stack.js +223 -0
- package/dist/cjs/components/Table.js +1 -1
- package/dist/cjs/components/Tabs.js +41 -11
- package/dist/cjs/components/VerticalStack.js +8 -2
- package/dist/cjs/index.js +4 -0
- package/dist/cjs/stories/ActionList.stories.js +1 -1
- package/dist/cjs/stories/Autocomplete.stories.js +20 -17
- package/dist/cjs/stories/Box.stories.js +14 -12
- package/dist/cjs/stories/ButtonGroup.stories.js +5 -5
- package/dist/cjs/stories/Card.stories.js +8 -8
- package/dist/cjs/stories/Checkbox.stories.js +3 -3
- package/dist/cjs/stories/ChoiceList.stories.js +13 -12
- package/dist/cjs/stories/Collapsible.stories.js +51 -39
- package/dist/cjs/stories/ColorField.stories.js +23 -19
- package/dist/cjs/stories/ContextualSaveBar.stories.js +15 -14
- package/dist/cjs/stories/DatePicker.stories.js +3 -3
- package/dist/cjs/stories/Divider.stories.js +64 -57
- package/dist/cjs/stories/DropZone.stories.js +25 -20
- package/dist/cjs/stories/Filters.stories.js +62 -60
- package/dist/cjs/stories/FooterHelp.stories.js +36 -31
- package/dist/cjs/stories/Form.stories.js +23 -20
- package/dist/cjs/stories/Grid.stories.js +58 -58
- package/dist/cjs/stories/Icon.stories.js +31 -28
- package/dist/cjs/stories/Image.stories.js +36 -36
- package/dist/cjs/stories/InlineError.stories.js +35 -34
- package/dist/cjs/stories/Label.stories.js +59 -59
- package/dist/cjs/stories/Layout.stories.js +44 -42
- package/dist/cjs/stories/LayoutSection.stories.js +114 -106
- package/dist/cjs/stories/Link.stories.js +14 -12
- package/dist/cjs/stories/List.stories.js +67 -50
- package/dist/cjs/stories/Listbox.stories.js +26 -22
- package/dist/cjs/stories/Loading.stories.js +59 -50
- package/dist/cjs/stories/Modal.stories.js +7 -7
- package/dist/cjs/stories/Page.stories.js +38 -29
- package/dist/cjs/stories/Pane.stories.js +135 -120
- package/dist/cjs/stories/Popover.stories.js +12 -8
- package/dist/cjs/stories/PopoverManager.stories.js +91 -83
- package/dist/cjs/stories/ProgressBar.stories.js +61 -54
- package/dist/cjs/stories/RadioButtonCard.stories.js +21 -21
- package/dist/cjs/stories/RangeSlider.stories.js +44 -40
- package/dist/cjs/stories/ResourceList.stories.js +46 -37
- package/dist/cjs/stories/SkeletonText.stories.js +23 -22
- package/dist/cjs/stories/Spinner.stories.js +46 -39
- package/dist/cjs/stories/Stack.stories.js +1397 -0
- package/dist/cjs/stories/Tabs.stories.js +1 -2
- package/dist/cjs/stories/Tag.stories.js +44 -36
- package/dist/cjs/stories/Thumbnail.stories.js +42 -38
- package/dist/cjs/stories/TimePicker.stories.js +33 -32
- package/dist/cjs/stories/Tip.stories.js +21 -21
- package/dist/cjs/stories/TopBar.stories.js +7 -5
- package/dist/esm/components/Autocomplete.js +23 -12
- package/dist/esm/components/Button.js +44 -6
- package/dist/esm/components/Card.js +1 -0
- package/dist/esm/components/ColorField.js +2 -2
- package/dist/esm/components/EmptyState.js +2 -2
- package/dist/esm/components/Filters.js +4 -3
- package/dist/esm/components/Frame.js +9 -9
- package/dist/esm/components/HorizontalStack.js +9 -2
- package/dist/esm/components/Icon.js +1 -0
- package/dist/esm/components/List.js +3 -3
- package/dist/esm/components/Pane.js +62 -18
- package/dist/esm/components/Stack.js +213 -0
- package/dist/esm/components/Table.js +1 -1
- package/dist/esm/components/Tabs.js +41 -11
- package/dist/esm/components/VerticalStack.js +8 -2
- package/dist/esm/index.js +1 -0
- package/dist/esm/stories/ActionList.stories.js +1 -1
- package/dist/esm/stories/Autocomplete.stories.js +20 -17
- package/dist/esm/stories/Box.stories.js +14 -12
- package/dist/esm/stories/ButtonGroup.stories.js +5 -5
- package/dist/esm/stories/Card.stories.js +8 -8
- package/dist/esm/stories/Checkbox.stories.js +3 -3
- package/dist/esm/stories/ChoiceList.stories.js +13 -12
- package/dist/esm/stories/Collapsible.stories.js +51 -39
- package/dist/esm/stories/ColorField.stories.js +23 -19
- package/dist/esm/stories/ContextualSaveBar.stories.js +15 -14
- package/dist/esm/stories/DatePicker.stories.js +3 -3
- package/dist/esm/stories/Divider.stories.js +64 -57
- package/dist/esm/stories/DropZone.stories.js +25 -20
- package/dist/esm/stories/Filters.stories.js +62 -60
- package/dist/esm/stories/FooterHelp.stories.js +36 -31
- package/dist/esm/stories/Form.stories.js +23 -20
- package/dist/esm/stories/Grid.stories.js +58 -58
- package/dist/esm/stories/Icon.stories.js +31 -28
- package/dist/esm/stories/Image.stories.js +36 -36
- package/dist/esm/stories/InlineError.stories.js +27 -26
- package/dist/esm/stories/Label.stories.js +59 -59
- package/dist/esm/stories/Layout.stories.js +44 -42
- package/dist/esm/stories/LayoutSection.stories.js +114 -106
- package/dist/esm/stories/Link.stories.js +14 -12
- package/dist/esm/stories/List.stories.js +67 -50
- package/dist/esm/stories/Listbox.stories.js +12 -8
- package/dist/esm/stories/Loading.stories.js +59 -50
- package/dist/esm/stories/Modal.stories.js +7 -7
- package/dist/esm/stories/Page.stories.js +7 -3
- package/dist/esm/stories/Pane.stories.js +95 -80
- package/dist/esm/stories/Popover.stories.js +12 -8
- package/dist/esm/stories/PopoverManager.stories.js +91 -83
- package/dist/esm/stories/ProgressBar.stories.js +61 -54
- package/dist/esm/stories/RadioButtonCard.stories.js +21 -21
- package/dist/esm/stories/RangeSlider.stories.js +34 -30
- package/dist/esm/stories/ResourceList.stories.js +46 -37
- package/dist/esm/stories/SkeletonText.stories.js +23 -22
- package/dist/esm/stories/Spinner.stories.js +40 -33
- package/dist/esm/stories/Stack.stories.js +1338 -0
- package/dist/esm/stories/Tabs.stories.js +1 -2
- package/dist/esm/stories/Tag.stories.js +27 -19
- package/dist/esm/stories/Thumbnail.stories.js +42 -38
- package/dist/esm/stories/TimePicker.stories.js +33 -32
- package/dist/esm/stories/Tip.stories.js +21 -21
- package/dist/esm/stories/TopBar.stories.js +7 -5
- package/dist/types/components/Autocomplete.d.ts +34 -29
- package/dist/types/components/Autocomplete.d.ts.map +1 -1
- package/dist/types/components/Button.d.ts +10 -0
- package/dist/types/components/Button.d.ts.map +1 -1
- package/dist/types/components/Card.d.ts +2 -0
- package/dist/types/components/Card.d.ts.map +1 -1
- package/dist/types/components/EmptyState.d.ts.map +1 -1
- package/dist/types/components/Filters.d.ts +3 -1
- package/dist/types/components/Filters.d.ts.map +1 -1
- package/dist/types/components/Frame.d.ts +3 -3
- package/dist/types/components/Frame.d.ts.map +1 -1
- package/dist/types/components/HorizontalStack.d.ts +2 -2
- package/dist/types/components/HorizontalStack.d.ts.map +1 -1
- package/dist/types/components/Icon.d.ts.map +1 -1
- package/dist/types/components/Pane.d.ts.map +1 -1
- package/dist/types/components/Stack.d.ts +49 -0
- package/dist/types/components/Stack.d.ts.map +1 -0
- package/dist/types/components/Tabs.d.ts +2 -0
- package/dist/types/components/Tabs.d.ts.map +1 -1
- package/dist/types/components/VerticalStack.d.ts +2 -2
- package/dist/types/components/VerticalStack.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/index.css +11 -0
- package/package.json +2 -2
|
@@ -3,8 +3,7 @@ import Box from "../components/Box.js";
|
|
|
3
3
|
import Text from "../components/Text.js";
|
|
4
4
|
import Button from "../components/Button.js";
|
|
5
5
|
import Card from "../components/Card.js";
|
|
6
|
-
import
|
|
7
|
-
import VerticalStack from "../components/VerticalStack.js";
|
|
6
|
+
import Stack from "../components/Stack.js";
|
|
8
7
|
import { transformStorySource } from "../utilities/transformers.js";
|
|
9
8
|
export default {
|
|
10
9
|
title: "Litho/Box",
|
|
@@ -309,8 +308,8 @@ export var Default = {
|
|
|
309
308
|
};
|
|
310
309
|
export var WithPadding = {
|
|
311
310
|
render: function() {
|
|
312
|
-
return /*#__PURE__*/ _jsxs(
|
|
313
|
-
gap: "
|
|
311
|
+
return /*#__PURE__*/ _jsxs(Stack, {
|
|
312
|
+
gap: "sm",
|
|
314
313
|
children: [
|
|
315
314
|
/*#__PURE__*/ _jsx(Box, {
|
|
316
315
|
padding: "2",
|
|
@@ -373,8 +372,8 @@ export var AsymmetricPadding = {
|
|
|
373
372
|
};
|
|
374
373
|
export var WithBorders = {
|
|
375
374
|
render: function() {
|
|
376
|
-
return /*#__PURE__*/ _jsxs(
|
|
377
|
-
gap: "
|
|
375
|
+
return /*#__PURE__*/ _jsxs(Stack, {
|
|
376
|
+
gap: "sm",
|
|
378
377
|
children: [
|
|
379
378
|
/*#__PURE__*/ _jsx(Box, {
|
|
380
379
|
padding: "4",
|
|
@@ -416,8 +415,9 @@ export var WithBorders = {
|
|
|
416
415
|
};
|
|
417
416
|
export var BorderRadius = {
|
|
418
417
|
render: function() {
|
|
419
|
-
return /*#__PURE__*/ _jsxs(
|
|
420
|
-
|
|
418
|
+
return /*#__PURE__*/ _jsxs(Stack, {
|
|
419
|
+
horizontal: true,
|
|
420
|
+
gap: "sm",
|
|
421
421
|
children: [
|
|
422
422
|
/*#__PURE__*/ _jsx(Box, {
|
|
423
423
|
padding: "4",
|
|
@@ -486,8 +486,9 @@ export var LayoutExample = {
|
|
|
486
486
|
})
|
|
487
487
|
}),
|
|
488
488
|
/*#__PURE__*/ _jsx(Box, {
|
|
489
|
-
children: /*#__PURE__*/ _jsxs(
|
|
490
|
-
|
|
489
|
+
children: /*#__PURE__*/ _jsxs(Stack, {
|
|
490
|
+
horizontal: true,
|
|
491
|
+
gap: "sm",
|
|
491
492
|
children: [
|
|
492
493
|
/*#__PURE__*/ _jsx(Button, {
|
|
493
494
|
primary: true,
|
|
@@ -515,8 +516,9 @@ export var LayoutExample = {
|
|
|
515
516
|
};
|
|
516
517
|
export var OverflowBehavior = {
|
|
517
518
|
render: function() {
|
|
518
|
-
return /*#__PURE__*/ _jsxs(
|
|
519
|
-
|
|
519
|
+
return /*#__PURE__*/ _jsxs(Stack, {
|
|
520
|
+
horizontal: true,
|
|
521
|
+
gap: "sm",
|
|
520
522
|
children: [
|
|
521
523
|
/*#__PURE__*/ _jsx(Box, {
|
|
522
524
|
padding: "4",
|
|
@@ -50,7 +50,7 @@ import ButtonGroup from "../components/ButtonGroup.js";
|
|
|
50
50
|
import Button from "../components/Button.js";
|
|
51
51
|
import { SaveMinor, UndoMajor, RedoMajor } from "@shopify/polaris-icons";
|
|
52
52
|
import { transformStorySource } from "../utilities/transformers.js";
|
|
53
|
-
import
|
|
53
|
+
import Stack from "../components/Stack.js";
|
|
54
54
|
import TextField from "../components/TextField.js";
|
|
55
55
|
import Card from "../components/Card.js";
|
|
56
56
|
import Box from "../components/Box.js";
|
|
@@ -221,8 +221,8 @@ export var MixedVariants = {
|
|
|
221
221
|
};
|
|
222
222
|
export var FormActions = {
|
|
223
223
|
render: function() {
|
|
224
|
-
return /*#__PURE__*/ _jsxs(
|
|
225
|
-
gap: "
|
|
224
|
+
return /*#__PURE__*/ _jsxs(Stack, {
|
|
225
|
+
gap: "sm",
|
|
226
226
|
children: [
|
|
227
227
|
/*#__PURE__*/ _jsx(Box, {
|
|
228
228
|
paddingBlockEnd: "4",
|
|
@@ -233,8 +233,8 @@ export var FormActions = {
|
|
|
233
233
|
}),
|
|
234
234
|
/*#__PURE__*/ _jsx(Card, {
|
|
235
235
|
padded: true,
|
|
236
|
-
children: /*#__PURE__*/ _jsxs(
|
|
237
|
-
gap: "
|
|
236
|
+
children: /*#__PURE__*/ _jsxs(Stack, {
|
|
237
|
+
gap: "sm",
|
|
238
238
|
children: [
|
|
239
239
|
/*#__PURE__*/ _jsx(TextField, {
|
|
240
240
|
label: "Sample Form Field",
|
|
@@ -2,8 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import Card from "../components/Card.js";
|
|
3
3
|
import Text from "../components/Text.js";
|
|
4
4
|
import Button from "../components/Button.js";
|
|
5
|
-
import
|
|
6
|
-
import HorizontalStack from "../components/HorizontalStack.js";
|
|
5
|
+
import Stack from "../components/Stack.js";
|
|
7
6
|
export default {
|
|
8
7
|
title: "Litho/Card",
|
|
9
8
|
component: Card,
|
|
@@ -203,11 +202,11 @@ export var Complex = {
|
|
|
203
202
|
highlighted: true,
|
|
204
203
|
tooltip: "This is a tooltip",
|
|
205
204
|
tooltipPreferredPosition: "below",
|
|
206
|
-
children: /*#__PURE__*/ _jsxs(
|
|
207
|
-
gap: "
|
|
205
|
+
children: /*#__PURE__*/ _jsxs(Stack, {
|
|
206
|
+
gap: "md",
|
|
208
207
|
children: [
|
|
209
|
-
/*#__PURE__*/ _jsxs(
|
|
210
|
-
gap: "
|
|
208
|
+
/*#__PURE__*/ _jsxs(Stack, {
|
|
209
|
+
gap: "sm",
|
|
211
210
|
children: [
|
|
212
211
|
/*#__PURE__*/ _jsx(Text, {
|
|
213
212
|
variant: "bodyMd",
|
|
@@ -220,8 +219,9 @@ export var Complex = {
|
|
|
220
219
|
})
|
|
221
220
|
]
|
|
222
221
|
}),
|
|
223
|
-
/*#__PURE__*/ _jsxs(
|
|
224
|
-
|
|
222
|
+
/*#__PURE__*/ _jsxs(Stack, {
|
|
223
|
+
horizontal: true,
|
|
224
|
+
gap: "xs",
|
|
225
225
|
children: [
|
|
226
226
|
/*#__PURE__*/ _jsx(Button, {
|
|
227
227
|
size: "small",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import Card from "../components/Card.js";
|
|
3
3
|
import Checkbox from "../components/Checkbox.js";
|
|
4
|
-
import
|
|
4
|
+
import Stack from "../components/Stack.js";
|
|
5
5
|
import { transformStorySource } from "../utilities/transformers.js";
|
|
6
6
|
export default {
|
|
7
7
|
title: 'Litho/Checkbox',
|
|
@@ -165,8 +165,8 @@ export var LabelHidden = {
|
|
|
165
165
|
};
|
|
166
166
|
export var MultipleCheckboxes = {
|
|
167
167
|
render: function() {
|
|
168
|
-
return /*#__PURE__*/ _jsxs(
|
|
169
|
-
gap: "
|
|
168
|
+
return /*#__PURE__*/ _jsxs(Stack, {
|
|
169
|
+
gap: "xs",
|
|
170
170
|
children: [
|
|
171
171
|
/*#__PURE__*/ _jsx(Checkbox, {
|
|
172
172
|
label: "Option 1",
|
|
@@ -103,8 +103,7 @@ import Text from "../components/Text.js";
|
|
|
103
103
|
import Card from "../components/Card.js";
|
|
104
104
|
import Button from "../components/Button.js";
|
|
105
105
|
import { transformStorySource } from "../utilities/transformers.js";
|
|
106
|
-
import
|
|
107
|
-
import HorizontalStack from "../components/HorizontalStack.js";
|
|
106
|
+
import Stack from "../components/Stack.js";
|
|
108
107
|
import Badge from "../components/Badge.js";
|
|
109
108
|
export default {
|
|
110
109
|
title: "Litho/ChoiceList",
|
|
@@ -483,15 +482,16 @@ export var ProductCategories = {
|
|
|
483
482
|
onChange: setSelectedCategories,
|
|
484
483
|
allowMultiple: true
|
|
485
484
|
}),
|
|
486
|
-
/*#__PURE__*/ _jsxs(
|
|
487
|
-
gap: "
|
|
485
|
+
/*#__PURE__*/ _jsxs(Stack, {
|
|
486
|
+
gap: "xs",
|
|
488
487
|
children: [
|
|
489
488
|
/*#__PURE__*/ _jsx(Text, {
|
|
490
489
|
variant: "headingSm",
|
|
491
490
|
children: "Selected: "
|
|
492
491
|
}),
|
|
493
|
-
/*#__PURE__*/ _jsx(
|
|
494
|
-
|
|
492
|
+
/*#__PURE__*/ _jsx(Stack, {
|
|
493
|
+
horizontal: true,
|
|
494
|
+
gap: "xs",
|
|
495
495
|
children: selectedCategories.map(function(category) {
|
|
496
496
|
return /*#__PURE__*/ _jsx(Badge, {
|
|
497
497
|
children: category
|
|
@@ -550,8 +550,8 @@ export var SubscriptionPlan = {
|
|
|
550
550
|
}),
|
|
551
551
|
/*#__PURE__*/ _jsx(Card.Section, {
|
|
552
552
|
subdued: true,
|
|
553
|
-
children: /*#__PURE__*/ _jsxs(
|
|
554
|
-
gap: "
|
|
553
|
+
children: /*#__PURE__*/ _jsxs(Stack, {
|
|
554
|
+
gap: "sm",
|
|
555
555
|
children: [
|
|
556
556
|
/*#__PURE__*/ _jsx(Text, {
|
|
557
557
|
variant: "headingSm",
|
|
@@ -590,8 +590,8 @@ export var SurveyForm = {
|
|
|
590
590
|
title: "Product Feedback Survey",
|
|
591
591
|
children: [
|
|
592
592
|
/*#__PURE__*/ _jsx(Card.Section, {
|
|
593
|
-
children: /*#__PURE__*/ _jsxs(
|
|
594
|
-
gap: "
|
|
593
|
+
children: /*#__PURE__*/ _jsxs(Stack, {
|
|
594
|
+
gap: "sm",
|
|
595
595
|
children: [
|
|
596
596
|
/*#__PURE__*/ _jsx(ChoiceList, {
|
|
597
597
|
title: "How satisfied are you with our product?",
|
|
@@ -690,8 +690,9 @@ export var SurveyForm = {
|
|
|
690
690
|
}),
|
|
691
691
|
/*#__PURE__*/ _jsx(Card.Section, {
|
|
692
692
|
subdued: true,
|
|
693
|
-
children: /*#__PURE__*/ _jsxs(
|
|
694
|
-
|
|
693
|
+
children: /*#__PURE__*/ _jsxs(Stack, {
|
|
694
|
+
horizontal: true,
|
|
695
|
+
gap: "xs",
|
|
695
696
|
children: [
|
|
696
697
|
/*#__PURE__*/ _jsx(Button, {
|
|
697
698
|
primary: true,
|
|
@@ -99,12 +99,11 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
99
99
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
100
100
|
import { useState } from "react";
|
|
101
101
|
import Collapsible from "../components/Collapsible.js";
|
|
102
|
+
import Stack from "../components/Stack.js";
|
|
102
103
|
import Text from "../components/Text.js";
|
|
103
104
|
import Card from "../components/Card.js";
|
|
104
105
|
import Button from "../components/Button.js";
|
|
105
106
|
import List from "../components/List.js";
|
|
106
|
-
import VerticalStack from "../components/VerticalStack.js";
|
|
107
|
-
import HorizontalStack from "../components/HorizontalStack.js";
|
|
108
107
|
import Box from "../components/Box.js";
|
|
109
108
|
import { transformStorySource } from "../utilities/transformers.js";
|
|
110
109
|
export default {
|
|
@@ -143,8 +142,8 @@ export default {
|
|
|
143
142
|
export var Default = {
|
|
144
143
|
render: function(args) {
|
|
145
144
|
var _useState = _sliced_to_array(useState(args.open), 2), open = _useState[0], setOpen = _useState[1];
|
|
146
|
-
return /*#__PURE__*/ _jsxs(
|
|
147
|
-
gap: "
|
|
145
|
+
return /*#__PURE__*/ _jsxs(Stack, {
|
|
146
|
+
gap: "md",
|
|
148
147
|
children: [
|
|
149
148
|
/*#__PURE__*/ _jsxs(Button, {
|
|
150
149
|
onClick: function() {
|
|
@@ -187,7 +186,8 @@ export var WithCard = {
|
|
|
187
186
|
padding: "4",
|
|
188
187
|
borderBlockEndWidth: "025",
|
|
189
188
|
borderColor: "border",
|
|
190
|
-
children: /*#__PURE__*/ _jsxs(
|
|
189
|
+
children: /*#__PURE__*/ _jsxs(Stack, {
|
|
190
|
+
horizontal: true,
|
|
191
191
|
align: "space-between",
|
|
192
192
|
blockAlign: "center",
|
|
193
193
|
children: [
|
|
@@ -286,8 +286,8 @@ export var FAQ = {
|
|
|
286
286
|
}
|
|
287
287
|
setOpenItems(newOpenItems);
|
|
288
288
|
};
|
|
289
|
-
return /*#__PURE__*/ _jsxs(
|
|
290
|
-
gap: "
|
|
289
|
+
return /*#__PURE__*/ _jsxs(Stack, {
|
|
290
|
+
gap: "md",
|
|
291
291
|
children: [
|
|
292
292
|
/*#__PURE__*/ _jsx(Box, {
|
|
293
293
|
paddingBlockEnd: "4",
|
|
@@ -383,8 +383,8 @@ export var AccordionGroup = {
|
|
|
383
383
|
return /*#__PURE__*/ _jsx(Card, {
|
|
384
384
|
title: "Product Information",
|
|
385
385
|
padded: true,
|
|
386
|
-
children: /*#__PURE__*/ _jsx(
|
|
387
|
-
gap: "
|
|
386
|
+
children: /*#__PURE__*/ _jsx(Stack, {
|
|
387
|
+
gap: "sm",
|
|
388
388
|
children: sections.map(function(section) {
|
|
389
389
|
return /*#__PURE__*/ _jsxs(Box, {
|
|
390
390
|
children: [
|
|
@@ -531,8 +531,9 @@ export var NestedCollapsible = {
|
|
|
531
531
|
borderStyle: 'dashed'
|
|
532
532
|
},
|
|
533
533
|
children: [
|
|
534
|
-
/*#__PURE__*/ _jsxs(
|
|
535
|
-
|
|
534
|
+
/*#__PURE__*/ _jsxs(Stack, {
|
|
535
|
+
horizontal: true,
|
|
536
|
+
gap: "sm",
|
|
536
537
|
blockAlign: "center",
|
|
537
538
|
paddingBlockEnd: "1",
|
|
538
539
|
children: [
|
|
@@ -544,8 +545,9 @@ export var NestedCollapsible = {
|
|
|
544
545
|
})
|
|
545
546
|
]
|
|
546
547
|
}),
|
|
547
|
-
/*#__PURE__*/ _jsxs(
|
|
548
|
-
|
|
548
|
+
/*#__PURE__*/ _jsxs(Stack, {
|
|
549
|
+
horizontal: true,
|
|
550
|
+
gap: "sm",
|
|
549
551
|
blockAlign: "center",
|
|
550
552
|
paddingBlockEnd: "1",
|
|
551
553
|
children: [
|
|
@@ -557,8 +559,9 @@ export var NestedCollapsible = {
|
|
|
557
559
|
})
|
|
558
560
|
]
|
|
559
561
|
}),
|
|
560
|
-
/*#__PURE__*/ _jsxs(
|
|
561
|
-
|
|
562
|
+
/*#__PURE__*/ _jsxs(Stack, {
|
|
563
|
+
horizontal: true,
|
|
564
|
+
gap: "sm",
|
|
562
565
|
blockAlign: "center",
|
|
563
566
|
paddingBlockEnd: "1",
|
|
564
567
|
children: [
|
|
@@ -603,8 +606,9 @@ export var NestedCollapsible = {
|
|
|
603
606
|
borderStyle: 'dashed'
|
|
604
607
|
},
|
|
605
608
|
children: [
|
|
606
|
-
/*#__PURE__*/ _jsxs(
|
|
607
|
-
|
|
609
|
+
/*#__PURE__*/ _jsxs(Stack, {
|
|
610
|
+
horizontal: true,
|
|
611
|
+
gap: "sm",
|
|
608
612
|
blockAlign: "center",
|
|
609
613
|
paddingBlockEnd: "1",
|
|
610
614
|
children: [
|
|
@@ -616,8 +620,9 @@ export var NestedCollapsible = {
|
|
|
616
620
|
})
|
|
617
621
|
]
|
|
618
622
|
}),
|
|
619
|
-
/*#__PURE__*/ _jsxs(
|
|
620
|
-
|
|
623
|
+
/*#__PURE__*/ _jsxs(Stack, {
|
|
624
|
+
horizontal: true,
|
|
625
|
+
gap: "sm",
|
|
621
626
|
blockAlign: "center",
|
|
622
627
|
paddingBlockEnd: "1",
|
|
623
628
|
children: [
|
|
@@ -632,8 +637,9 @@ export var NestedCollapsible = {
|
|
|
632
637
|
]
|
|
633
638
|
})
|
|
634
639
|
}),
|
|
635
|
-
/*#__PURE__*/ _jsxs(
|
|
636
|
-
|
|
640
|
+
/*#__PURE__*/ _jsxs(Stack, {
|
|
641
|
+
horizontal: true,
|
|
642
|
+
gap: "sm",
|
|
637
643
|
blockAlign: "center",
|
|
638
644
|
paddingBlockEnd: "1",
|
|
639
645
|
children: [
|
|
@@ -681,18 +687,19 @@ export var AdvancedSettings = {
|
|
|
681
687
|
return /*#__PURE__*/ _jsx(Card, {
|
|
682
688
|
title: "Application Settings",
|
|
683
689
|
padded: true,
|
|
684
|
-
children: /*#__PURE__*/ _jsxs(
|
|
685
|
-
gap: "
|
|
690
|
+
children: /*#__PURE__*/ _jsxs(Stack, {
|
|
691
|
+
gap: "md",
|
|
686
692
|
children: [
|
|
687
|
-
/*#__PURE__*/ _jsxs(
|
|
688
|
-
gap: "
|
|
693
|
+
/*#__PURE__*/ _jsxs(Stack, {
|
|
694
|
+
gap: "md",
|
|
689
695
|
children: [
|
|
690
696
|
/*#__PURE__*/ _jsx(Text, {
|
|
691
697
|
variant: "headingSm",
|
|
692
698
|
children: "Basic Settings"
|
|
693
699
|
}),
|
|
694
|
-
/*#__PURE__*/ _jsxs(
|
|
695
|
-
|
|
700
|
+
/*#__PURE__*/ _jsxs(Stack, {
|
|
701
|
+
horizontal: true,
|
|
702
|
+
gap: "sm",
|
|
696
703
|
blockAlign: "center",
|
|
697
704
|
as: "label",
|
|
698
705
|
children: [
|
|
@@ -708,8 +715,9 @@ export var AdvancedSettings = {
|
|
|
708
715
|
})
|
|
709
716
|
]
|
|
710
717
|
}),
|
|
711
|
-
/*#__PURE__*/ _jsxs(
|
|
712
|
-
|
|
718
|
+
/*#__PURE__*/ _jsxs(Stack, {
|
|
719
|
+
horizontal: true,
|
|
720
|
+
gap: "sm",
|
|
713
721
|
blockAlign: "center",
|
|
714
722
|
as: "label",
|
|
715
723
|
children: [
|
|
@@ -759,15 +767,16 @@ export var AdvancedSettings = {
|
|
|
759
767
|
padding: "4",
|
|
760
768
|
background: "subdued",
|
|
761
769
|
borderRadius: "default",
|
|
762
|
-
children: /*#__PURE__*/ _jsxs(
|
|
763
|
-
gap: "
|
|
770
|
+
children: /*#__PURE__*/ _jsxs(Stack, {
|
|
771
|
+
gap: "md",
|
|
764
772
|
children: [
|
|
765
773
|
/*#__PURE__*/ _jsx(Text, {
|
|
766
774
|
tone: "subdued",
|
|
767
775
|
children: "⚠️ Caution: These settings can affect application performance"
|
|
768
776
|
}),
|
|
769
|
-
/*#__PURE__*/ _jsxs(
|
|
770
|
-
|
|
777
|
+
/*#__PURE__*/ _jsxs(Stack, {
|
|
778
|
+
horizontal: true,
|
|
779
|
+
gap: "sm",
|
|
771
780
|
blockAlign: "center",
|
|
772
781
|
as: "label",
|
|
773
782
|
children: [
|
|
@@ -783,8 +792,9 @@ export var AdvancedSettings = {
|
|
|
783
792
|
})
|
|
784
793
|
]
|
|
785
794
|
}),
|
|
786
|
-
/*#__PURE__*/ _jsxs(
|
|
787
|
-
|
|
795
|
+
/*#__PURE__*/ _jsxs(Stack, {
|
|
796
|
+
horizontal: true,
|
|
797
|
+
gap: "sm",
|
|
788
798
|
blockAlign: "center",
|
|
789
799
|
children: [
|
|
790
800
|
/*#__PURE__*/ _jsx(Text, {
|
|
@@ -805,8 +815,9 @@ export var AdvancedSettings = {
|
|
|
805
815
|
})
|
|
806
816
|
]
|
|
807
817
|
}),
|
|
808
|
-
/*#__PURE__*/ _jsxs(
|
|
809
|
-
|
|
818
|
+
/*#__PURE__*/ _jsxs(Stack, {
|
|
819
|
+
horizontal: true,
|
|
820
|
+
gap: "sm",
|
|
810
821
|
blockAlign: "center",
|
|
811
822
|
children: [
|
|
812
823
|
/*#__PURE__*/ _jsx(Text, {
|
|
@@ -837,8 +848,9 @@ export var AdvancedSettings = {
|
|
|
837
848
|
paddingBlockStart: "4",
|
|
838
849
|
borderBlockStartWidth: "025",
|
|
839
850
|
borderColor: "border",
|
|
840
|
-
children: /*#__PURE__*/ _jsxs(
|
|
841
|
-
|
|
851
|
+
children: /*#__PURE__*/ _jsxs(Stack, {
|
|
852
|
+
horizontal: true,
|
|
853
|
+
gap: "sm",
|
|
842
854
|
children: [
|
|
843
855
|
/*#__PURE__*/ _jsx(Button, {
|
|
844
856
|
primary: true,
|
|
@@ -99,11 +99,10 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
99
99
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
100
100
|
import { useState } from "react";
|
|
101
101
|
import ColorField from "../components/ColorField.js";
|
|
102
|
+
import Stack from "../components/Stack.js";
|
|
102
103
|
import Text from "../components/Text.js";
|
|
103
104
|
import Card from "../components/Card.js";
|
|
104
105
|
import Button from "../components/Button.js";
|
|
105
|
-
import VerticalStack from "../components/VerticalStack.js";
|
|
106
|
-
import HorizontalStack from "../components/HorizontalStack.js";
|
|
107
106
|
import Box from "../components/Box.js";
|
|
108
107
|
import Grid from "../components/Grid.js";
|
|
109
108
|
import { transformStorySource } from "../utilities/transformers.js";
|
|
@@ -244,8 +243,8 @@ export var MultipleColorFields = {
|
|
|
244
243
|
padded: true,
|
|
245
244
|
maxInlineSize: "400",
|
|
246
245
|
children: [
|
|
247
|
-
/*#__PURE__*/ _jsxs(
|
|
248
|
-
gap: "
|
|
246
|
+
/*#__PURE__*/ _jsxs(Stack, {
|
|
247
|
+
gap: "md",
|
|
249
248
|
children: [
|
|
250
249
|
/*#__PURE__*/ _jsx(ColorField, {
|
|
251
250
|
label: "Primary Color",
|
|
@@ -358,16 +357,17 @@ export var DesignSystemColors = {
|
|
|
358
357
|
info: "#17a2b8"
|
|
359
358
|
});
|
|
360
359
|
};
|
|
361
|
-
return /*#__PURE__*/ _jsxs(
|
|
362
|
-
|
|
360
|
+
return /*#__PURE__*/ _jsxs(Stack, {
|
|
361
|
+
horizontal: true,
|
|
362
|
+
gap: "lg",
|
|
363
363
|
children: [
|
|
364
364
|
/*#__PURE__*/ _jsxs(Card, {
|
|
365
365
|
title: "Design System Colors",
|
|
366
366
|
padded: true,
|
|
367
367
|
maxInlineSize: "350",
|
|
368
368
|
children: [
|
|
369
|
-
/*#__PURE__*/ _jsxs(
|
|
370
|
-
gap: "
|
|
369
|
+
/*#__PURE__*/ _jsxs(Stack, {
|
|
370
|
+
gap: "md",
|
|
371
371
|
children: [
|
|
372
372
|
/*#__PURE__*/ _jsx(ColorField, {
|
|
373
373
|
label: "Primary",
|
|
@@ -427,8 +427,8 @@ export var DesignSystemColors = {
|
|
|
427
427
|
style: {
|
|
428
428
|
flex: 1
|
|
429
429
|
},
|
|
430
|
-
children: /*#__PURE__*/ _jsxs(
|
|
431
|
-
gap: "
|
|
430
|
+
children: /*#__PURE__*/ _jsxs(Stack, {
|
|
431
|
+
gap: "md",
|
|
432
432
|
children: [
|
|
433
433
|
/*#__PURE__*/ _jsx(Box, {
|
|
434
434
|
padding: "4",
|
|
@@ -568,16 +568,17 @@ export var ProductCustomization = {
|
|
|
568
568
|
return _object_spread_props(_object_spread({}, prev), _define_property({}, part, color));
|
|
569
569
|
});
|
|
570
570
|
};
|
|
571
|
-
return /*#__PURE__*/ _jsxs(
|
|
572
|
-
|
|
571
|
+
return /*#__PURE__*/ _jsxs(Stack, {
|
|
572
|
+
horizontal: true,
|
|
573
|
+
gap: "lg",
|
|
573
574
|
children: [
|
|
574
575
|
/*#__PURE__*/ _jsxs(Card, {
|
|
575
576
|
title: "Customize Your Sunglasses",
|
|
576
577
|
padded: true,
|
|
577
578
|
maxInlineSize: "300",
|
|
578
579
|
children: [
|
|
579
|
-
/*#__PURE__*/ _jsxs(
|
|
580
|
-
gap: "
|
|
580
|
+
/*#__PURE__*/ _jsxs(Stack, {
|
|
581
|
+
gap: "md",
|
|
581
582
|
children: [
|
|
582
583
|
/*#__PURE__*/ _jsx(ColorField, {
|
|
583
584
|
label: "Frame Color",
|
|
@@ -635,8 +636,8 @@ export var ProductCustomization = {
|
|
|
635
636
|
}),
|
|
636
637
|
/*#__PURE__*/ _jsx(Box, {
|
|
637
638
|
paddingBlockStart: "2",
|
|
638
|
-
children: /*#__PURE__*/ _jsxs(
|
|
639
|
-
gap: "
|
|
639
|
+
children: /*#__PURE__*/ _jsxs(Stack, {
|
|
640
|
+
gap: "xs",
|
|
640
641
|
children: [
|
|
641
642
|
/*#__PURE__*/ _jsxs(Text, {
|
|
642
643
|
variant: "bodySm",
|
|
@@ -673,7 +674,8 @@ export var ProductCustomization = {
|
|
|
673
674
|
flex: 1
|
|
674
675
|
},
|
|
675
676
|
children: [
|
|
676
|
-
/*#__PURE__*/ _jsx(
|
|
677
|
+
/*#__PURE__*/ _jsx(Stack, {
|
|
678
|
+
horizontal: true,
|
|
677
679
|
align: "center",
|
|
678
680
|
blockAlign: "center",
|
|
679
681
|
style: {
|
|
@@ -798,7 +800,8 @@ export var ResponsiveBehavior = {
|
|
|
798
800
|
onChange: setColor
|
|
799
801
|
})
|
|
800
802
|
}),
|
|
801
|
-
/*#__PURE__*/ _jsx(
|
|
803
|
+
/*#__PURE__*/ _jsx(Stack, {
|
|
804
|
+
horizontal: true,
|
|
802
805
|
align: "center",
|
|
803
806
|
children: /*#__PURE__*/ _jsx(ColorField, {
|
|
804
807
|
label: "Center Positioned",
|
|
@@ -807,7 +810,8 @@ export var ResponsiveBehavior = {
|
|
|
807
810
|
onChange: setColor
|
|
808
811
|
})
|
|
809
812
|
}),
|
|
810
|
-
/*#__PURE__*/ _jsx(
|
|
813
|
+
/*#__PURE__*/ _jsx(Stack, {
|
|
814
|
+
horizontal: true,
|
|
811
815
|
align: "end",
|
|
812
816
|
children: /*#__PURE__*/ _jsx(ColorField, {
|
|
813
817
|
label: "Right Aligned",
|
|
@@ -219,6 +219,7 @@ function _ts_generator(thisArg, body) {
|
|
|
219
219
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
220
220
|
import { useState } from "react";
|
|
221
221
|
import ContextualSaveBar from "../components/ContextualSaveBar.js";
|
|
222
|
+
import Stack from "../components/Stack.js";
|
|
222
223
|
import Text from "../components/Text.js";
|
|
223
224
|
import Card from "../components/Card.js";
|
|
224
225
|
import Button from "../components/Button.js";
|
|
@@ -226,8 +227,6 @@ import TextField from "../components/TextField.js";
|
|
|
226
227
|
import Page from "../components/Page.js";
|
|
227
228
|
import Frame from "../components/Frame.js";
|
|
228
229
|
import AppProvider from "../components/AppProvider.js";
|
|
229
|
-
import VerticalStack from "../components/VerticalStack.js";
|
|
230
|
-
import HorizontalStack from "../components/HorizontalStack.js";
|
|
231
230
|
import Box from "../components/Box.js";
|
|
232
231
|
import { transformStorySource } from "../utilities/transformers.js";
|
|
233
232
|
export default {
|
|
@@ -343,8 +342,8 @@ export var Default = {
|
|
|
343
342
|
/*#__PURE__*/ _jsx(Card, {
|
|
344
343
|
title: "Product Information",
|
|
345
344
|
padded: true,
|
|
346
|
-
children: /*#__PURE__*/ _jsxs(
|
|
347
|
-
gap: "
|
|
345
|
+
children: /*#__PURE__*/ _jsxs(Stack, {
|
|
346
|
+
gap: "md",
|
|
348
347
|
children: [
|
|
349
348
|
/*#__PURE__*/ _jsx(TextField, {
|
|
350
349
|
label: "Product Title",
|
|
@@ -502,19 +501,20 @@ export var CustomMessages = {
|
|
|
502
501
|
content: "Discard changes"
|
|
503
502
|
}
|
|
504
503
|
}),
|
|
505
|
-
/*#__PURE__*/ _jsx(
|
|
506
|
-
gap: "
|
|
504
|
+
/*#__PURE__*/ _jsx(Stack, {
|
|
505
|
+
gap: "lg",
|
|
507
506
|
children: scenarios.map(function(scenario) {
|
|
508
507
|
return /*#__PURE__*/ _jsxs(Card, {
|
|
509
508
|
title: scenario.title,
|
|
510
509
|
padded: true,
|
|
511
510
|
children: [
|
|
512
|
-
/*#__PURE__*/ _jsx(
|
|
513
|
-
gap: "
|
|
511
|
+
/*#__PURE__*/ _jsx(Stack, {
|
|
512
|
+
gap: "md",
|
|
514
513
|
children: scenario.fields.map(function(field) {
|
|
515
514
|
return /*#__PURE__*/ _jsx(Box, {
|
|
516
|
-
children: field.type === "checkbox" ? /*#__PURE__*/ _jsxs(
|
|
517
|
-
|
|
515
|
+
children: field.type === "checkbox" ? /*#__PURE__*/ _jsxs(Stack, {
|
|
516
|
+
horizontal: true,
|
|
517
|
+
gap: "sm",
|
|
518
518
|
blockAlign: "center",
|
|
519
519
|
as: "label",
|
|
520
520
|
children: [
|
|
@@ -710,8 +710,9 @@ export var LoadingStates = {
|
|
|
710
710
|
}),
|
|
711
711
|
/*#__PURE__*/ _jsx(Box, {
|
|
712
712
|
paddingBlockStart: "2",
|
|
713
|
-
children: /*#__PURE__*/ _jsxs(
|
|
714
|
-
|
|
713
|
+
children: /*#__PURE__*/ _jsxs(Stack, {
|
|
714
|
+
horizontal: true,
|
|
715
|
+
gap: "md",
|
|
715
716
|
children: [
|
|
716
717
|
/*#__PURE__*/ _jsx(Button, {
|
|
717
718
|
onClick: function() {
|
|
@@ -810,8 +811,8 @@ export var DisabledActions = {
|
|
|
810
811
|
/*#__PURE__*/ _jsx(Card, {
|
|
811
812
|
title: "Article Creation",
|
|
812
813
|
padded: true,
|
|
813
|
-
children: /*#__PURE__*/ _jsxs(
|
|
814
|
-
gap: "
|
|
814
|
+
children: /*#__PURE__*/ _jsxs(Stack, {
|
|
815
|
+
gap: "md",
|
|
815
816
|
children: [
|
|
816
817
|
/*#__PURE__*/ _jsx(TextField, {
|
|
817
818
|
label: "Title *",
|