@artsy/palette 44.0.1 → 44.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/elements/AutocompleteInput/AutocompleteInput.story.d.ts +105 -6
- package/dist/elements/AutocompleteInput/AutocompleteInput.story.js +78 -365
- package/dist/elements/AutocompleteInput/AutocompleteInput.story.js.map +1 -1
- package/dist/elements/Avatar/Avatar.story.d.ts +74 -5
- package/dist/elements/Avatar/Avatar.story.js +69 -85
- package/dist/elements/Avatar/Avatar.story.js.map +1 -1
- package/dist/elements/Banner/Banner.story.d.ts +53 -2
- package/dist/elements/Banner/Banner.story.js +55 -24
- package/dist/elements/Banner/Banner.story.js.map +1 -1
- package/dist/elements/BaseTabs/BaseTabs.story.d.ts +45 -20
- package/dist/elements/BaseTabs/BaseTabs.story.js +99 -154
- package/dist/elements/BaseTabs/BaseTabs.story.js.map +1 -1
- package/dist/elements/BorderedRadio/BorderedRadio.story.d.ts +30 -1
- package/dist/elements/BorderedRadio/BorderedRadio.story.js +92 -19
- package/dist/elements/BorderedRadio/BorderedRadio.story.js.map +1 -1
- package/dist/elements/Box/Box.story.d.ts +35 -1
- package/dist/elements/Box/Box.story.js +54 -28
- package/dist/elements/Box/Box.story.js.map +1 -1
- package/dist/elements/Breadcrumbs/Breadcrumbs.story.d.ts +27 -1
- package/dist/elements/Breadcrumbs/Breadcrumbs.story.js +43 -26
- package/dist/elements/Breadcrumbs/Breadcrumbs.story.js.map +1 -1
- package/dist/elements/Button/Button.story.d.ts +132 -19
- package/dist/elements/Button/Button.story.js +133 -228
- package/dist/elements/Button/Button.story.js.map +1 -1
- package/dist/elements/CSSGrid/CSSGrid.story.d.ts +35 -10
- package/dist/elements/CSSGrid/CSSGrid.story.js +57 -20
- package/dist/elements/CSSGrid/CSSGrid.story.js.map +1 -1
- package/dist/elements/Cards/Cards.story.d.ts +56 -14
- package/dist/elements/Cards/Cards.story.js +65 -55
- package/dist/elements/Cards/Cards.story.js.map +1 -1
- package/dist/elements/Carousel/Carousel.story.d.ts +135 -48
- package/dist/elements/Carousel/Carousel.story.js +399 -303
- package/dist/elements/Carousel/Carousel.story.js.map +1 -1
- package/dist/elements/CarouselBar/CarouselBar.story.d.ts +37 -2
- package/dist/elements/CarouselBar/CarouselBar.story.js +38 -19
- package/dist/elements/CarouselBar/CarouselBar.story.js.map +1 -1
- package/dist/elements/Checkbox/Check.story.d.ts +75 -2
- package/dist/elements/Checkbox/Check.story.js +77 -32
- package/dist/elements/Checkbox/Check.story.js.map +1 -1
- package/dist/elements/Checkbox/Checkbox.story.d.ts +79 -3
- package/dist/elements/Checkbox/Checkbox.story.js +81 -79
- package/dist/elements/Checkbox/Checkbox.story.js.map +1 -1
- package/dist/elements/Clickable/Clickable.story.d.ts +50 -5
- package/dist/elements/Clickable/Clickable.story.js +52 -58
- package/dist/elements/Clickable/Clickable.story.js.map +1 -1
- package/dist/elements/Drawer/Drawer.story.d.ts +36 -2
- package/dist/elements/Drawer/Drawer.story.js +42 -9
- package/dist/elements/Drawer/Drawer.story.js.map +1 -1
- package/dist/elements/Dropdown/Dropdown.story.d.ts +53 -18
- package/dist/elements/Dropdown/Dropdown.story.js +244 -237
- package/dist/elements/Dropdown/Dropdown.story.js.map +1 -1
- package/dist/elements/EntityHeader/EntityHeader.story.d.ts +245 -1
- package/dist/elements/EntityHeader/EntityHeader.story.js +209 -76
- package/dist/elements/EntityHeader/EntityHeader.story.js.map +1 -1
- package/dist/elements/Expandable/Expandable.story.d.ts +54 -2
- package/dist/elements/Expandable/Expandable.story.js +76 -65
- package/dist/elements/Expandable/Expandable.story.js.map +1 -1
- package/dist/elements/FilterSelect/FilterSelect.story.d.ts +153 -2
- package/dist/elements/FilterSelect/FilterSelect.story.js +159 -62
- package/dist/elements/FilterSelect/FilterSelect.story.js.map +1 -1
- package/dist/elements/FullBleed/FullBleed.story.d.ts +30 -1
- package/dist/elements/FullBleed/FullBleed.story.js +44 -21
- package/dist/elements/FullBleed/FullBleed.story.js.map +1 -1
- package/dist/elements/GridColumns/GridColumns.story.d.ts +47 -9
- package/dist/elements/GridColumns/GridColumns.story.js +188 -204
- package/dist/elements/GridColumns/GridColumns.story.js.map +1 -1
- package/dist/elements/HTML/HTML.story.d.ts +56 -9
- package/dist/elements/HTML/HTML.story.js +56 -28
- package/dist/elements/HTML/HTML.story.js.map +1 -1
- package/dist/elements/HorizontalOverflow/HorizontalOverflow.story.d.ts +52 -2
- package/dist/elements/HorizontalOverflow/HorizontalOverflow.story.js +83 -46
- package/dist/elements/HorizontalOverflow/HorizontalOverflow.story.js.map +1 -1
- package/dist/elements/Image/Image.story.d.ts +56 -17
- package/dist/elements/Image/Image.story.js +106 -88
- package/dist/elements/Image/Image.story.js.map +1 -1
- package/dist/elements/Input/Input.story.d.ts +111 -6
- package/dist/elements/Input/Input.story.js +108 -106
- package/dist/elements/Input/Input.story.js.map +1 -1
- package/dist/elements/Join/Join.d.ts +1 -2
- package/dist/elements/Join/Join.js.map +1 -1
- package/dist/elements/Join/Join.story.d.ts +55 -10
- package/dist/elements/Join/Join.story.js +122 -58
- package/dist/elements/Join/Join.story.js.map +1 -1
- package/dist/elements/Label/Label.story.d.ts +44 -2
- package/dist/elements/Label/Label.story.js +68 -24
- package/dist/elements/Label/Label.story.js.map +1 -1
- package/dist/elements/LabeledInput/LabeledInput.story.d.ts +50 -3
- package/dist/elements/LabeledInput/LabeledInput.story.js +62 -68
- package/dist/elements/LabeledInput/LabeledInput.story.js.map +1 -1
- package/dist/elements/Marquee/Marquee.story.d.ts +57 -1
- package/dist/elements/Marquee/Marquee.story.js +82 -20
- package/dist/elements/Marquee/Marquee.story.js.map +1 -1
- package/dist/elements/Message/Message.story.d.ts +56 -1
- package/dist/elements/Message/Message.story.js +84 -25
- package/dist/elements/Message/Message.story.js.map +1 -1
- package/dist/elements/Modal/ModalBase.story.d.ts +53 -4
- package/dist/elements/Modal/ModalBase.story.js +78 -33
- package/dist/elements/Modal/ModalBase.story.js.map +1 -1
- package/dist/elements/ModalDialog/ModalDialog.story.d.ts +58 -1
- package/dist/elements/ModalDialog/ModalDialog.story.js +93 -144
- package/dist/elements/ModalDialog/ModalDialog.story.js.map +1 -1
- package/dist/elements/ModalDialog/ModalDialogContent.story.d.ts +112 -1
- package/dist/elements/ModalDialog/ModalDialogContent.story.js +190 -65
- package/dist/elements/ModalDialog/ModalDialogContent.story.js.map +1 -1
- package/dist/elements/MultiSelect/MultiSelect.d.ts +1 -1
- package/dist/elements/MultiSelect/MultiSelect.js +4 -0
- package/dist/elements/MultiSelect/MultiSelect.js.map +1 -1
- package/dist/elements/MultiSelect/MultiSelect.story.d.ts +120 -2
- package/dist/elements/MultiSelect/MultiSelect.story.js +122 -44
- package/dist/elements/MultiSelect/MultiSelect.story.js.map +1 -1
- package/dist/elements/Pagination/Pagination.story.d.ts +88 -4
- package/dist/elements/Pagination/Pagination.story.js +64 -23
- package/dist/elements/Pagination/Pagination.story.js.map +1 -1
- package/dist/elements/PasswordInput/PasswordInput.story.d.ts +54 -2
- package/dist/elements/PasswordInput/PasswordInput.story.js +54 -16
- package/dist/elements/PasswordInput/PasswordInput.story.js.map +1 -1
- package/dist/elements/Pill/Pill.story.d.ts +114 -9
- package/dist/elements/Pill/Pill.story.js +282 -169
- package/dist/elements/Pill/Pill.story.js.map +1 -1
- package/dist/elements/Popover/Popover.story.d.ts +162 -13
- package/dist/elements/Popover/Popover.story.js +351 -190
- package/dist/elements/Popover/Popover.story.js.map +1 -1
- package/dist/elements/ProgressBar/ProgressBar.story.d.ts +43 -7
- package/dist/elements/ProgressBar/ProgressBar.story.js +73 -35
- package/dist/elements/ProgressBar/ProgressBar.story.js.map +1 -1
- package/dist/elements/ProgressDots/ProgressDots.story.d.ts +69 -7
- package/dist/elements/ProgressDots/ProgressDots.story.js +108 -41
- package/dist/elements/ProgressDots/ProgressDots.story.js.map +1 -1
- package/dist/elements/Radio/Radio.story.d.ts +103 -2
- package/dist/elements/Radio/Radio.story.js +112 -57
- package/dist/elements/Radio/Radio.story.js.map +1 -1
- package/dist/elements/RadioGroup/RadioGroup.story.d.ts +104 -5
- package/dist/elements/RadioGroup/RadioGroup.story.js +183 -65
- package/dist/elements/RadioGroup/RadioGroup.story.js.map +1 -1
- package/dist/elements/Range/Range.story.d.ts +89 -8
- package/dist/elements/Range/Range.story.js +170 -94
- package/dist/elements/Range/Range.story.js.map +1 -1
- package/dist/elements/ReadMore/ReadMore.story.d.ts +85 -25
- package/dist/elements/ReadMore/ReadMore.story.js +123 -80
- package/dist/elements/ReadMore/ReadMore.story.js.map +1 -1
- package/dist/elements/ResponsiveBox/ResponsiveBox.story.d.ts +40 -5
- package/dist/elements/ResponsiveBox/ResponsiveBox.story.js +87 -51
- package/dist/elements/ResponsiveBox/ResponsiveBox.story.js.map +1 -1
- package/dist/elements/Select/Select.story.d.ts +260 -2
- package/dist/elements/Select/Select.story.js +216 -48
- package/dist/elements/Select/Select.story.js.map +1 -1
- package/dist/elements/SelectInput/SelectInput.story.d.ts +304 -3
- package/dist/elements/SelectInput/SelectInput.story.js +347 -99
- package/dist/elements/SelectInput/SelectInput.story.js.map +1 -1
- package/dist/elements/SelectInput/SelectInputList.story.d.ts +31 -1
- package/dist/elements/SelectInput/SelectInputList.story.js +35 -164
- package/dist/elements/SelectInput/SelectInputList.story.js.map +1 -1
- package/dist/elements/Separator/Separator.story.d.ts +64 -2
- package/dist/elements/Separator/Separator.story.js +65 -18
- package/dist/elements/Separator/Separator.story.js.map +1 -1
- package/dist/elements/Shelf/Shelf.story.d.ts +140 -8
- package/dist/elements/Shelf/Shelf.story.js +224 -56
- package/dist/elements/Shelf/Shelf.story.js.map +1 -1
- package/dist/elements/ShowMore/ShowMore.story.d.ts +46 -4
- package/dist/elements/ShowMore/ShowMore.story.js +102 -48
- package/dist/elements/ShowMore/ShowMore.story.js.map +1 -1
- package/dist/elements/Skeleton/Skeleton.story.d.ts +68 -4
- package/dist/elements/Skeleton/Skeleton.story.js +84 -58
- package/dist/elements/Skeleton/Skeleton.story.js.map +1 -1
- package/dist/elements/Skip/Skip.story.d.ts +50 -11
- package/dist/elements/Skip/Skip.story.js +69 -31
- package/dist/elements/Skip/Skip.story.js.map +1 -1
- package/dist/elements/Spacer/Spacer.story.d.ts +39 -4
- package/dist/elements/Spacer/Spacer.story.js +53 -51
- package/dist/elements/Spacer/Spacer.story.js.map +1 -1
- package/dist/elements/Spinner/Spinner.story.d.ts +47 -7
- package/dist/elements/Spinner/Spinner.story.js +47 -27
- package/dist/elements/Spinner/Spinner.story.js.map +1 -1
- package/dist/elements/Stack/Stack.story.d.ts +45 -1
- package/dist/elements/Stack/Stack.story.js +81 -33
- package/dist/elements/Stack/Stack.story.js.map +1 -1
- package/dist/elements/StackableBorderBox/StackableBorderBox.story.d.ts +24 -1
- package/dist/elements/StackableBorderBox/StackableBorderBox.story.js +28 -9
- package/dist/elements/StackableBorderBox/StackableBorderBox.story.js.map +1 -1
- package/dist/elements/Stepper/Stepper.story.d.ts +99 -2
- package/dist/elements/Stepper/Stepper.story.js +166 -64
- package/dist/elements/Stepper/Stepper.story.js.map +1 -1
- package/dist/elements/Sup/Sup.story.d.ts +47 -1
- package/dist/elements/Sup/Sup.story.js +57 -15
- package/dist/elements/Sup/Sup.story.js.map +1 -1
- package/dist/elements/Swiper/Swiper.story.d.ts +32 -45
- package/dist/elements/Swiper/Swiper.story.js +234 -235
- package/dist/elements/Swiper/Swiper.story.js.map +1 -1
- package/dist/elements/Tabs/Tabs.story.d.ts +41 -18
- package/dist/elements/Tabs/Tabs.story.js +255 -238
- package/dist/elements/Tabs/Tabs.story.js.map +1 -1
- package/dist/elements/Text/Text.story.d.ts +117 -5
- package/dist/elements/Text/Text.story.js +119 -97
- package/dist/elements/Text/Text.story.js.map +1 -1
- package/dist/elements/TextArea/TextArea.story.d.ts +45 -2
- package/dist/elements/TextArea/TextArea.story.js +106 -49
- package/dist/elements/TextArea/TextArea.story.js.map +1 -1
- package/dist/elements/Toasts/Toast.story.d.ts +91 -2
- package/dist/elements/Toasts/Toast.story.js +90 -24
- package/dist/elements/Toasts/Toast.story.js.map +1 -1
- package/dist/elements/Toasts/Toasts.story.d.ts +13 -1
- package/dist/elements/Toasts/Toasts.story.js +78 -64
- package/dist/elements/Toasts/Toasts.story.js.map +1 -1
- package/dist/elements/Toggle/Toggle.story.d.ts +66 -2
- package/dist/elements/Toggle/Toggle.story.js +97 -41
- package/dist/elements/Toggle/Toggle.story.js.map +1 -1
- package/dist/elements/Tooltip/Tooltip.story.d.ts +53 -19
- package/dist/elements/Tooltip/Tooltip.story.js +201 -212
- package/dist/elements/Tooltip/Tooltip.story.js.map +1 -1
- package/dist/utils/storybookBlocklist.d.ts +6 -0
- package/dist/utils/storybookBlocklist.js +47 -0
- package/dist/utils/storybookBlocklist.js.map +1 -0
- package/package.json +3 -2
|
@@ -1,121 +1,123 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
|
-
exports.default = exports.
|
|
8
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
-
var _storybookStates = require("storybook-states");
|
|
10
|
-
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
11
|
-
var _Button = require("../Button");
|
|
6
|
+
exports.default = exports.WithTitle = exports.WithMaxLength = exports.WithError = exports.WithDescription = exports.WithCounter = exports.RequiredField = exports.LongTitle = exports.HoverState = exports.FocusState = exports.EmailInput = exports.Disabled = exports.CustomWidth = exports.CustomHeight = exports.Basic = exports.ActiveState = void 0;
|
|
12
7
|
var _Input = require("./Input");
|
|
13
|
-
|
|
14
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
15
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
16
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
17
|
-
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."); }
|
|
18
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
19
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
20
|
-
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
21
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
8
|
+
var _storybookBlocklist = require("../../utils/storybookBlocklist");
|
|
22
9
|
var _default = exports.default = {
|
|
23
|
-
title: "Components/Input"
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
required: true
|
|
52
|
-
}, {
|
|
53
|
-
title: "Your offer",
|
|
54
|
-
maxLength: 50
|
|
55
|
-
}, {
|
|
56
|
-
title: "Your offer",
|
|
57
|
-
required: true,
|
|
58
|
-
maxLength: 50,
|
|
59
|
-
showCounter: true
|
|
60
|
-
}, {
|
|
61
|
-
title: "Your offer",
|
|
62
|
-
description: "This is my description"
|
|
63
|
-
}, {
|
|
64
|
-
width: "50%"
|
|
65
|
-
}]
|
|
66
|
-
}, /*#__PURE__*/_react.default.createElement(_Input.Input, {
|
|
67
|
-
placeholder: "Start typing\u2026"
|
|
68
|
-
}));
|
|
69
|
-
};
|
|
70
|
-
Default.displayName = "Default";
|
|
71
|
-
var StyledInput = (0, _styledComponents.default)(_Input.Input).withConfig({
|
|
72
|
-
displayName: "Inputstory__StyledInput",
|
|
73
|
-
componentId: "sc-f9xdyp-0"
|
|
74
|
-
})(["border:1px solid red;> input{border:2px solid green;}"]);
|
|
75
|
-
var Styled = exports.Styled = function Styled() {
|
|
76
|
-
return /*#__PURE__*/_react.default.createElement(StyledInput, {
|
|
77
|
-
placeholder: "style should target container div"
|
|
78
|
-
});
|
|
79
|
-
};
|
|
80
|
-
Styled.displayName = "Styled";
|
|
81
|
-
var Required = exports.Required = function Required() {
|
|
82
|
-
return /*#__PURE__*/_react.default.createElement("form", null, /*#__PURE__*/_react.default.createElement(_Input.Input, {
|
|
83
|
-
title: "Example",
|
|
10
|
+
title: "Components/Input",
|
|
11
|
+
component: _Input.Input,
|
|
12
|
+
tags: ["autodocs"],
|
|
13
|
+
parameters: {
|
|
14
|
+
docs: {
|
|
15
|
+
description: {
|
|
16
|
+
component: "Input component provides a text input field with built-in validation, error states, and accessibility features. Supports titles, placeholders, required fields, and character limits."
|
|
17
|
+
},
|
|
18
|
+
controls: {
|
|
19
|
+
exclude: _storybookBlocklist.STORYBOOK_PROPS_BLOCKLIST
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
var Basic = exports.Basic = {
|
|
25
|
+
args: {
|
|
26
|
+
placeholder: "Enter text here"
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
var WithTitle = exports.WithTitle = {
|
|
30
|
+
args: {
|
|
31
|
+
title: "Your Name",
|
|
32
|
+
placeholder: "Enter your name"
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
var RequiredField = exports.RequiredField = {
|
|
36
|
+
args: {
|
|
37
|
+
title: "Email Address",
|
|
84
38
|
required: true,
|
|
85
|
-
placeholder: "
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
|
|
39
|
+
placeholder: "Enter your email"
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
var WithError = exports.WithError = {
|
|
43
|
+
args: {
|
|
44
|
+
title: "Your Offer",
|
|
45
|
+
error: "This field is required",
|
|
46
|
+
value: "Invalid input"
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
var Disabled = exports.Disabled = {
|
|
50
|
+
args: {
|
|
51
|
+
title: "Disabled Input",
|
|
52
|
+
disabled: true,
|
|
53
|
+
value: "Cannot edit this"
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
var WithMaxLength = exports.WithMaxLength = {
|
|
57
|
+
args: {
|
|
58
|
+
title: "Short Message",
|
|
59
|
+
maxLength: 50,
|
|
60
|
+
placeholder: "Maximum 50 characters"
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
var WithDescription = exports.WithDescription = {
|
|
64
|
+
args: {
|
|
65
|
+
title: "Your Offer",
|
|
66
|
+
description: "This is my description",
|
|
67
|
+
placeholder: "Start typing..."
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
var WithCounter = exports.WithCounter = {
|
|
71
|
+
args: {
|
|
72
|
+
title: "Your Offer",
|
|
89
73
|
required: true,
|
|
90
|
-
placeholder: "Requires a valid email",
|
|
91
|
-
type: "email"
|
|
92
|
-
}), /*#__PURE__*/_react.default.createElement(_Button.Button, {
|
|
93
|
-
mt: 1
|
|
94
|
-
}, "Submit"));
|
|
95
|
-
};
|
|
96
|
-
Required.displayName = "Required";
|
|
97
|
-
var WithState = exports.WithState = function WithState() {
|
|
98
|
-
var _useState = (0, _react.useState)(""),
|
|
99
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
100
|
-
value = _useState2[0],
|
|
101
|
-
setValue = _useState2[1];
|
|
102
|
-
return /*#__PURE__*/_react.default.createElement(_Input.Input, {
|
|
103
|
-
title: "Example",
|
|
104
|
-
value: value,
|
|
105
|
-
onChange: function onChange(e) {
|
|
106
|
-
return setValue(e.currentTarget.value);
|
|
107
|
-
},
|
|
108
|
-
placeholder: "Start typing\u2026",
|
|
109
74
|
maxLength: 50,
|
|
110
|
-
showCounter: true
|
|
111
|
-
|
|
75
|
+
showCounter: true,
|
|
76
|
+
placeholder: "Start typing..."
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
var LongTitle = exports.LongTitle = {
|
|
80
|
+
args: {
|
|
81
|
+
title: "Your offer with a really really long title",
|
|
82
|
+
placeholder: "Start typing..."
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
var CustomWidth = exports.CustomWidth = {
|
|
86
|
+
args: {
|
|
87
|
+
width: "50%",
|
|
88
|
+
placeholder: "Start typing..."
|
|
89
|
+
}
|
|
112
90
|
};
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
91
|
+
var EmailInput = exports.EmailInput = {
|
|
92
|
+
args: {
|
|
93
|
+
title: "Email",
|
|
94
|
+
type: "email",
|
|
95
|
+
required: true,
|
|
96
|
+
placeholder: "Enter your email address"
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
var CustomHeight = exports.CustomHeight = {
|
|
100
|
+
args: {
|
|
116
101
|
height: 40,
|
|
117
102
|
placeholder: "Input is 40px in height"
|
|
118
|
-
}
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
var FocusState = exports.FocusState = {
|
|
106
|
+
args: {
|
|
107
|
+
focus: true,
|
|
108
|
+
placeholder: "This input is focused"
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
var HoverState = exports.HoverState = {
|
|
112
|
+
args: {
|
|
113
|
+
hover: true,
|
|
114
|
+
placeholder: "This input is hovered"
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
var ActiveState = exports.ActiveState = {
|
|
118
|
+
args: {
|
|
119
|
+
active: true,
|
|
120
|
+
placeholder: "This input is active"
|
|
121
|
+
}
|
|
119
122
|
};
|
|
120
|
-
CustomHeight.displayName = "CustomHeight";
|
|
121
123
|
//# sourceMappingURL=Input.story.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.story.js","names":["
|
|
1
|
+
{"version":3,"file":"Input.story.js","names":["_Input","require","_storybookBlocklist","_default","exports","default","title","component","Input","tags","parameters","docs","description","controls","exclude","STORYBOOK_PROPS_BLOCKLIST","Basic","args","placeholder","WithTitle","RequiredField","required","WithError","error","value","Disabled","disabled","WithMaxLength","maxLength","WithDescription","WithCounter","showCounter","LongTitle","CustomWidth","width","EmailInput","type","CustomHeight","height","FocusState","focus","HoverState","hover","ActiveState","active"],"sources":["../../../src/elements/Input/Input.story.tsx"],"sourcesContent":["import { Input } from \"./Input\"\nimport { STORYBOOK_PROPS_BLOCKLIST } from \"../../utils/storybookBlocklist\"\n\nexport default {\n title: \"Components/Input\",\n component: Input,\n tags: [\"autodocs\"],\n parameters: {\n docs: {\n description: {\n component:\n \"Input component provides a text input field with built-in validation, error states, and accessibility features. Supports titles, placeholders, required fields, and character limits.\",\n },\n controls: {\n exclude: STORYBOOK_PROPS_BLOCKLIST,\n },\n },\n },\n}\n\nexport const Basic = {\n args: {\n placeholder: \"Enter text here\",\n },\n}\n\nexport const WithTitle = {\n args: {\n title: \"Your Name\",\n placeholder: \"Enter your name\",\n },\n}\n\nexport const RequiredField = {\n args: {\n title: \"Email Address\",\n required: true,\n placeholder: \"Enter your email\",\n },\n}\n\nexport const WithError = {\n args: {\n title: \"Your Offer\",\n error: \"This field is required\",\n value: \"Invalid input\",\n },\n}\n\nexport const Disabled = {\n args: {\n title: \"Disabled Input\",\n disabled: true,\n value: \"Cannot edit this\",\n },\n}\n\nexport const WithMaxLength = {\n args: {\n title: \"Short Message\",\n maxLength: 50,\n placeholder: \"Maximum 50 characters\",\n },\n}\n\nexport const WithDescription = {\n args: {\n title: \"Your Offer\",\n description: \"This is my description\",\n placeholder: \"Start typing...\",\n },\n}\n\nexport const WithCounter = {\n args: {\n title: \"Your Offer\",\n required: true,\n maxLength: 50,\n showCounter: true,\n placeholder: \"Start typing...\",\n },\n}\n\nexport const LongTitle = {\n args: {\n title: \"Your offer with a really really long title\",\n placeholder: \"Start typing...\",\n },\n}\n\nexport const CustomWidth = {\n args: {\n width: \"50%\",\n placeholder: \"Start typing...\",\n },\n}\n\nexport const EmailInput = {\n args: {\n title: \"Email\",\n type: \"email\",\n required: true,\n placeholder: \"Enter your email address\",\n },\n}\n\nexport const CustomHeight = {\n args: {\n height: 40,\n placeholder: \"Input is 40px in height\",\n },\n}\n\nexport const FocusState = {\n args: {\n focus: true,\n placeholder: \"This input is focused\",\n },\n}\n\nexport const HoverState = {\n args: {\n hover: true,\n placeholder: \"This input is hovered\",\n },\n}\n\nexport const ActiveState = {\n args: {\n active: true,\n placeholder: \"This input is active\",\n },\n}\n"],"mappings":"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"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
interface JoinProps {
|
|
2
|
+
export interface JoinProps {
|
|
3
3
|
separator: React.ReactElement<any>;
|
|
4
4
|
}
|
|
5
5
|
/**
|
|
@@ -23,4 +23,3 @@ interface JoinProps {
|
|
|
23
23
|
* <child3/>
|
|
24
24
|
*/
|
|
25
25
|
export declare const Join: React.FC<React.PropsWithChildren<JoinProps>>;
|
|
26
|
-
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Join.js","names":["_react","_interopRequireDefault","require","_flattenChildren","obj","__esModule","default","Join","exports","_ref","separator","children","elements","flattenChildren","createElement","Fragment","reduce","acc","element","currentIndex","push","React","cloneElement","key","concat","length"],"sources":["../../../src/elements/Join/Join.tsx"],"sourcesContent":["import React from \"react\"\nimport { flattenChildren } from \"../../helpers/flattenChildren\"\n\
|
|
1
|
+
{"version":3,"file":"Join.js","names":["_react","_interopRequireDefault","require","_flattenChildren","obj","__esModule","default","Join","exports","_ref","separator","children","elements","flattenChildren","createElement","Fragment","reduce","acc","element","currentIndex","push","React","cloneElement","key","concat","length"],"sources":["../../../src/elements/Join/Join.tsx"],"sourcesContent":["import React from \"react\"\nimport { flattenChildren } from \"../../helpers/flattenChildren\"\n\nexport interface JoinProps {\n separator: React.ReactElement<any>\n}\n\n/**\n * `Join` is a higher order component that renders a separator component\n * between each of `Join`'s direct children.\n *\n * @example\n *\n * <Join separator={<SomeComponent/>}>\n * <child1/>\n * <child2/>\n * <child3/>\n * </Join>\n *\n * which renders\n *\n * <child1/>\n * <SomeComponent/>\n * <child2/>\n * <SomeComponent/>\n * <child3/>\n */\nexport const Join: React.FC<React.PropsWithChildren<JoinProps>> = ({\n separator,\n children,\n}) => {\n const elements = flattenChildren(children)\n\n return (\n <>\n {elements.reduce((acc, element, currentIndex) => {\n acc.push(\n // @ts-expect-error MIGRATE_STRICT_MODE\n React.cloneElement(element, {\n key: `join-${currentIndex}`,\n })\n )\n\n if (currentIndex !== elements.length - 1) {\n acc.push(\n // @ts-expect-error MIGRATE_STRICT_MODE\n separator &&\n React.cloneElement(separator, {\n key: `join-sep-${currentIndex}`,\n })\n )\n }\n\n return acc\n }, [])}\n </>\n )\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,gBAAA,GAAAD,OAAA;AAA+D,SAAAD,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAM/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,IAAMG,IAAkD,GAAAC,OAAA,CAAAD,IAAA,GAAG,SAArDA,IAAkDA,CAAAE,IAAA,EAGzD;EAAA,IAFJC,SAAS,GAAAD,IAAA,CAATC,SAAS;IACTC,QAAQ,GAAAF,IAAA,CAARE,QAAQ;EAER,IAAMC,QAAQ,GAAG,IAAAC,gCAAe,EAACF,QAAQ,CAAC;EAE1C,oBACEX,MAAA,CAAAM,OAAA,CAAAQ,aAAA,CAAAd,MAAA,CAAAM,OAAA,CAAAS,QAAA,QACGH,QAAQ,CAACI,MAAM,CAAC,UAACC,GAAG,EAAEC,OAAO,EAAEC,YAAY,EAAK;IAC/CF,GAAG,CAACG,IAAI;IAAA;IACN;IACAC,cAAK,CAACC,YAAY,CAACJ,OAAO,EAAE;MAC1BK,GAAG,UAAAC,MAAA,CAAUL,YAAY;IAC3B,CAAC,CAAC,CACH;IAED,IAAIA,YAAY,KAAKP,QAAQ,CAACa,MAAM,GAAG,CAAC,EAAE;MACxCR,GAAG,CAACG,IAAI;MACN;MACAV,SAAS,iBACPW,cAAK,CAACC,YAAY,CAACZ,SAAS,EAAE;QAC5Ba,GAAG,cAAAC,MAAA,CAAcL,YAAY;MAC/B,CAAC,CAAC,CACL;IACH;IAEA,OAAOF,GAAG;EACZ,CAAC,EAAE,EAAE,CAAC,CACL;AAEP,CAAC"}
|
|
@@ -1,24 +1,69 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
declare const _default: {
|
|
3
|
+
component: React.FC<React.PropsWithChildren<import("./Join").JoinProps>>;
|
|
3
4
|
title: string;
|
|
5
|
+
tags: string[];
|
|
6
|
+
parameters: {
|
|
7
|
+
docs: {
|
|
8
|
+
description: {
|
|
9
|
+
component: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
controls: {
|
|
13
|
+
exclude: string[];
|
|
14
|
+
};
|
|
15
|
+
};
|
|
4
16
|
};
|
|
5
17
|
export default _default;
|
|
6
18
|
export declare const WithMultipleComponents: {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
19
|
+
args: {
|
|
20
|
+
separator: React.JSX.Element;
|
|
21
|
+
children: React.JSX.Element[];
|
|
22
|
+
};
|
|
23
|
+
parameters: {
|
|
24
|
+
docs: {
|
|
25
|
+
description: {
|
|
26
|
+
story: string;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
10
29
|
};
|
|
11
30
|
};
|
|
12
31
|
export declare const WithOneComponent: {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
32
|
+
args: {
|
|
33
|
+
separator: React.JSX.Element;
|
|
34
|
+
children: React.JSX.Element;
|
|
35
|
+
};
|
|
36
|
+
parameters: {
|
|
37
|
+
docs: {
|
|
38
|
+
description: {
|
|
39
|
+
story: string;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
16
42
|
};
|
|
17
43
|
};
|
|
18
44
|
export declare const WithSomeOfTheChildrenEmpty: {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
45
|
+
args: {
|
|
46
|
+
separator: React.JSX.Element;
|
|
47
|
+
children: React.JSX.Element[];
|
|
48
|
+
};
|
|
49
|
+
parameters: {
|
|
50
|
+
docs: {
|
|
51
|
+
description: {
|
|
52
|
+
story: string;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
export declare const WithNestedChildren: {
|
|
58
|
+
args: {
|
|
59
|
+
separator: React.JSX.Element;
|
|
60
|
+
children: React.JSX.Element[];
|
|
61
|
+
};
|
|
62
|
+
parameters: {
|
|
63
|
+
docs: {
|
|
64
|
+
description: {
|
|
65
|
+
story: string;
|
|
66
|
+
};
|
|
67
|
+
};
|
|
22
68
|
};
|
|
23
69
|
};
|
|
24
|
-
export declare const WithNestedChildren: () => React.JSX.Element;
|
|
@@ -10,6 +10,7 @@ var _Box = require("../Box");
|
|
|
10
10
|
var _Separator = require("../Separator");
|
|
11
11
|
var _Text = require("../Text");
|
|
12
12
|
var _Join = require("./Join");
|
|
13
|
+
var _storybookBlocklist = require("../../utils/storybookBlocklist");
|
|
13
14
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
14
15
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
15
16
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
@@ -85,75 +86,138 @@ var NonBlankComponent = /*#__PURE__*/function (_Component2) {
|
|
|
85
86
|
}(_react.Component);
|
|
86
87
|
NonBlankComponent.displayName = "NonBlankComponent";
|
|
87
88
|
var _default = exports.default = {
|
|
88
|
-
|
|
89
|
+
component: _Join.Join,
|
|
90
|
+
title: "Components/Join",
|
|
91
|
+
tags: ["autodocs"],
|
|
92
|
+
parameters: {
|
|
93
|
+
docs: {
|
|
94
|
+
description: {
|
|
95
|
+
component: "A utility component that joins child elements with a separator, filtering out null/undefined children."
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
controls: {
|
|
99
|
+
exclude: _storybookBlocklist.STORYBOOK_PROPS_BLOCKLIST
|
|
100
|
+
}
|
|
101
|
+
}
|
|
89
102
|
};
|
|
90
|
-
var WithMultipleComponents = exports.WithMultipleComponents =
|
|
91
|
-
|
|
103
|
+
var WithMultipleComponents = exports.WithMultipleComponents = {
|
|
104
|
+
args: {
|
|
92
105
|
separator: /*#__PURE__*/_react.default.createElement(_Separator.Separator, {
|
|
93
106
|
my: 1
|
|
94
|
-
})
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
107
|
+
}),
|
|
108
|
+
children: [/*#__PURE__*/_react.default.createElement(_Text.Text, {
|
|
109
|
+
key: "1",
|
|
110
|
+
variant: "sm-display"
|
|
111
|
+
}, "First in the list"), /*#__PURE__*/_react.default.createElement(_Text.Text, {
|
|
112
|
+
key: "2",
|
|
113
|
+
variant: "sm-display"
|
|
114
|
+
}, "Second in the list")]
|
|
115
|
+
},
|
|
116
|
+
parameters: {
|
|
117
|
+
docs: {
|
|
118
|
+
description: {
|
|
119
|
+
story: "Join component with multiple children separated by a separator."
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
104
123
|
};
|
|
105
|
-
var WithOneComponent = exports.WithOneComponent =
|
|
106
|
-
|
|
124
|
+
var WithOneComponent = exports.WithOneComponent = {
|
|
125
|
+
args: {
|
|
107
126
|
separator: /*#__PURE__*/_react.default.createElement(_Separator.Separator, {
|
|
108
127
|
my: 1
|
|
109
|
-
})
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
128
|
+
}),
|
|
129
|
+
children: /*#__PURE__*/_react.default.createElement(_Text.Text, {
|
|
130
|
+
variant: "sm-display"
|
|
131
|
+
}, "Only one component here")
|
|
132
|
+
},
|
|
133
|
+
parameters: {
|
|
134
|
+
docs: {
|
|
135
|
+
description: {
|
|
136
|
+
story: "Join component with a single child (no separator shown)."
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
117
140
|
};
|
|
118
|
-
var WithSomeOfTheChildrenEmpty = exports.WithSomeOfTheChildrenEmpty =
|
|
119
|
-
|
|
141
|
+
var WithSomeOfTheChildrenEmpty = exports.WithSomeOfTheChildrenEmpty = {
|
|
142
|
+
args: {
|
|
120
143
|
separator: /*#__PURE__*/_react.default.createElement(_Separator.Separator, {
|
|
121
144
|
my: 1
|
|
122
|
-
})
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
145
|
+
}),
|
|
146
|
+
children: [/*#__PURE__*/_react.default.createElement(_Text.Text, {
|
|
147
|
+
key: "1",
|
|
148
|
+
variant: "sm-display"
|
|
149
|
+
}, "First in the list"), /*#__PURE__*/_react.default.createElement(BlankFunction, {
|
|
150
|
+
key: "2"
|
|
151
|
+
}), /*#__PURE__*/_react.default.createElement(NonBlankFunction, {
|
|
152
|
+
key: "3"
|
|
153
|
+
}), /*#__PURE__*/_react.default.createElement(BlankFC, {
|
|
154
|
+
key: "4"
|
|
155
|
+
}), /*#__PURE__*/_react.default.createElement(NonBlankFC, {
|
|
156
|
+
key: "5"
|
|
157
|
+
}), /*#__PURE__*/_react.default.createElement(BlankComponent, {
|
|
158
|
+
key: "6"
|
|
159
|
+
}), /*#__PURE__*/_react.default.createElement(NonBlankComponent, {
|
|
160
|
+
key: "7"
|
|
161
|
+
}), /*#__PURE__*/_react.default.createElement(_Box.Box, {
|
|
162
|
+
key: "8",
|
|
163
|
+
m: "2"
|
|
164
|
+
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
165
|
+
key: "9"
|
|
166
|
+
}, /*#__PURE__*/_react.default.createElement(_Text.Text, {
|
|
167
|
+
variant: "sm-display"
|
|
168
|
+
}, "Some div with the content")), /*#__PURE__*/_react.default.createElement("div", {
|
|
169
|
+
key: "10"
|
|
170
|
+
}), /*#__PURE__*/_react.default.createElement(_Text.Text, {
|
|
171
|
+
key: "11",
|
|
172
|
+
variant: "sm-display"
|
|
173
|
+
}, "Another box with content"), /*#__PURE__*/_react.default.createElement("div", {
|
|
174
|
+
key: "12"
|
|
175
|
+
})]
|
|
176
|
+
},
|
|
177
|
+
parameters: {
|
|
178
|
+
docs: {
|
|
179
|
+
description: {
|
|
180
|
+
story: "Join component that filters out null/empty children and only shows separators between visible content."
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
136
184
|
};
|
|
137
|
-
var WithNestedChildren = exports.WithNestedChildren =
|
|
138
|
-
|
|
185
|
+
var WithNestedChildren = exports.WithNestedChildren = {
|
|
186
|
+
args: {
|
|
139
187
|
separator: /*#__PURE__*/_react.default.createElement(_Separator.Separator, {
|
|
140
188
|
my: 1
|
|
141
|
-
})
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
189
|
+
}),
|
|
190
|
+
children: [/*#__PURE__*/_react.default.createElement(_Text.Text, {
|
|
191
|
+
key: "1",
|
|
192
|
+
variant: "sm-display"
|
|
193
|
+
}, "First in the list"), /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_Text.Text, {
|
|
194
|
+
key: "2",
|
|
195
|
+
variant: "sm-display"
|
|
196
|
+
}, "Second in the list"), ",", /*#__PURE__*/_react.default.createElement(_Text.Text, {
|
|
197
|
+
key: "3",
|
|
198
|
+
variant: "sm-display"
|
|
199
|
+
}, "Third in the list"), ",", /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_Text.Text, {
|
|
200
|
+
key: "4",
|
|
201
|
+
variant: "sm-display"
|
|
202
|
+
}, "Fourth in the list"), ",", /*#__PURE__*/_react.default.createElement(_Text.Text, {
|
|
203
|
+
key: "5",
|
|
204
|
+
variant: "sm-display"
|
|
205
|
+
}, "Fifth in the list"), ","), ",", /*#__PURE__*/_react.default.createElement(_Box.Box, {
|
|
206
|
+
key: "6"
|
|
207
|
+
}, /*#__PURE__*/_react.default.createElement(_Text.Text, {
|
|
208
|
+
variant: "sm-display"
|
|
209
|
+
}, "These two lines"), /*#__PURE__*/_react.default.createElement(_Text.Text, {
|
|
210
|
+
variant: "sm-display"
|
|
211
|
+
}, "Are grouped")), ",", /*#__PURE__*/_react.default.createElement(_Text.Text, {
|
|
212
|
+
key: "7"
|
|
213
|
+
}, "End of list"), ",")]
|
|
214
|
+
},
|
|
215
|
+
parameters: {
|
|
216
|
+
docs: {
|
|
217
|
+
description: {
|
|
218
|
+
story: "Join component with nested children and groups, showing separators only between visible content."
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
}
|
|
157
222
|
};
|
|
158
|
-
WithNestedChildren.displayName = "WithNestedChildren";
|
|
159
223
|
//# sourceMappingURL=Join.story.js.map
|