@salutejs/plasma-new-hope 0.320.1-canary.1917.14487866851.0 → 0.320.1-canary.1921.14492825856.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/cjs/components/Checkbox/Checkbox.js +18 -3
- package/cjs/components/Checkbox/Checkbox.js.map +1 -1
- package/cjs/components/Checkbox/IconsSvg.js +39 -0
- package/cjs/components/Checkbox/IconsSvg.js.map +1 -1
- package/cjs/components/Combobox/ComboboxNew/Combobox.js +5 -1
- package/cjs/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
- package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +4 -2
- package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js.map +1 -1
- package/cjs/components/Radiobox/Radiobox.js.map +1 -1
- package/cjs/components/Select/Select.js +5 -1
- package/cjs/components/Select/Select.js.map +1 -1
- package/cjs/components/Select/ui/Inner/ui/Item/Item.js +4 -2
- package/cjs/components/Select/ui/Inner/ui/Item/Item.js.map +1 -1
- package/cjs/components/Sheet/Sheet.css +5 -5
- package/cjs/components/Sheet/Sheet.js +9 -2
- package/cjs/components/Sheet/Sheet.js.map +1 -1
- package/cjs/components/Sheet/Sheet.styles.js +17 -17
- package/cjs/components/Sheet/Sheet.styles.js.map +1 -1
- package/cjs/components/Sheet/{Sheet.styles_o73i75.css → Sheet.styles_fnrgwh.css} +1 -1
- package/cjs/components/Sheet/Sheet.tokens.js +2 -1
- package/cjs/components/Sheet/Sheet.tokens.js.map +1 -1
- package/cjs/components/Sheet/variations/_handlePlacement/base.js +9 -0
- package/cjs/components/Sheet/variations/_handlePlacement/base.js.map +1 -0
- package/cjs/components/Sheet/variations/_handlePlacement/base_x642ct.css +1 -0
- package/cjs/components/Table/Table.css +12 -12
- package/cjs/components/Table/Table.js +8 -0
- package/cjs/components/Table/Table.js.map +1 -1
- package/cjs/components/Table/Table.styles.js +9 -9
- package/cjs/components/Table/Table.styles.js.map +1 -1
- package/cjs/components/Table/{Table.styles_as90a.css → Table.styles_sl2dfn.css} +1 -1
- package/cjs/components/Table/Table.tokens.js +3 -0
- package/cjs/components/Table/Table.tokens.js.map +1 -1
- package/cjs/components/Table/ui/Cell/Cell.css +12 -12
- package/cjs/components/Table/ui/EditableCell/EditableCell.css +12 -12
- package/cjs/components/Table/ui/HeadCell/HeadCell.css +12 -12
- package/cjs/components/Table/ui/HeadCell/ui/Filter/Filter.css +12 -12
- package/cjs/components/Toast/ToastNew/ToastNew.css +32 -0
- package/cjs/components/Toast/ToastNew/ToastNew.js +120 -0
- package/cjs/components/Toast/ToastNew/ToastNew.js.map +1 -0
- package/cjs/components/Toast/ToastNew/ToastNew.styles.js +53 -0
- package/cjs/components/Toast/ToastNew/ToastNew.styles.js.map +1 -0
- package/cjs/components/Toast/ToastNew/ToastNew.styles_4c92hd.css +4 -0
- package/cjs/components/Toast/ToastNew/ToastNew.tokens.js +27 -0
- package/cjs/components/Toast/ToastNew/ToastNew.tokens.js.map +1 -0
- package/cjs/index.css +21 -16
- package/cjs/index.js +6 -0
- package/cjs/index.js.map +1 -1
- package/emotion/cjs/components/Checkbox/Checkbox.js +18 -3
- package/emotion/cjs/components/Checkbox/IconsSvg.js +38 -1
- package/emotion/cjs/components/Combobox/ComboboxNew/Combobox.js +5 -1
- package/emotion/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +4 -2
- package/emotion/cjs/components/Select/Select.js +5 -1
- package/emotion/cjs/components/Select/ui/Inner/ui/Item/Item.js +4 -2
- package/emotion/cjs/components/Sheet/Sheet.js +9 -2
- package/emotion/cjs/components/Sheet/Sheet.styles.js +6 -6
- package/emotion/cjs/components/Sheet/Sheet.tokens.js +2 -1
- package/emotion/cjs/components/Sheet/variations/_handlePlacement/base.js +8 -0
- package/emotion/cjs/components/Sheet/variations/_handlePlacement/tokens.json +1 -0
- package/emotion/cjs/components/Table/Table.js +8 -0
- package/emotion/cjs/components/Table/Table.styles.js +12 -12
- package/emotion/cjs/components/Table/Table.tokens.js +3 -0
- package/emotion/cjs/components/Toast/ToastNew/ToastNew.js +121 -0
- package/emotion/cjs/components/Toast/ToastNew/ToastNew.styles.js +33 -0
- package/emotion/cjs/components/Toast/ToastNew/ToastNew.tokens.js +27 -0
- package/emotion/cjs/components/Toast/ToastNew/ToastNew.types.js +5 -0
- package/emotion/cjs/components/Toast/ToastNew/index.js +31 -0
- package/emotion/cjs/examples/plasma_b2c/components/Checkbox/Checkbox.js +6 -3
- package/emotion/cjs/examples/plasma_b2c/components/Checkbox/Checkbox.outline.config.js +13 -13
- package/emotion/cjs/examples/plasma_b2c/components/Checkbox/Checkbox.stories.tsx +6 -0
- package/emotion/cjs/examples/plasma_b2c/components/Radiobox/Radiobox.js +3 -3
- package/emotion/cjs/examples/plasma_b2c/components/Sheet/Sheet.config.js +7 -2
- package/emotion/cjs/examples/plasma_b2c/components/Sheet/Sheet.stories.tsx +24 -3
- package/emotion/cjs/examples/plasma_b2c/components/Table/Table.config.js +5 -5
- package/emotion/cjs/examples/plasma_b2c/components/Toast/Toast.stories.tsx +1 -1
- package/emotion/cjs/examples/plasma_b2c/components/ToastNew/Toast.config.js +25 -0
- package/emotion/cjs/examples/plasma_b2c/components/ToastNew/ToastNew.js +17 -0
- package/emotion/cjs/examples/plasma_b2c/components/ToastNew/ToastNew.stories.tsx +90 -0
- package/emotion/cjs/examples/plasma_web/components/Checkbox/Checkbox.js +3 -3
- package/emotion/cjs/examples/plasma_web/components/Radiobox/Radiobox.js +3 -3
- package/emotion/cjs/examples/plasma_web/components/Sheet/Sheet.config.js +5 -1
- package/emotion/cjs/examples/plasma_web/components/Sheet/Sheet.stories.tsx +24 -3
- package/emotion/cjs/examples/plasma_web/components/Table/Table.config.js +5 -5
- package/emotion/cjs/index.js +11 -0
- package/emotion/es/components/Checkbox/Checkbox.js +19 -4
- package/emotion/es/components/Checkbox/IconsSvg.js +37 -0
- package/emotion/es/components/Combobox/ComboboxNew/Combobox.js +5 -1
- package/emotion/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +4 -2
- package/emotion/es/components/Select/Select.js +5 -1
- package/emotion/es/components/Select/ui/Inner/ui/Item/Item.js +4 -2
- package/emotion/es/components/Sheet/Sheet.js +9 -2
- package/emotion/es/components/Sheet/Sheet.styles.js +6 -6
- package/emotion/es/components/Sheet/Sheet.tokens.js +2 -1
- package/emotion/es/components/Sheet/variations/_handlePlacement/base.js +2 -0
- package/emotion/es/components/Sheet/variations/_handlePlacement/tokens.json +1 -0
- package/emotion/es/components/Table/Table.js +8 -0
- package/emotion/es/components/Table/Table.styles.js +12 -12
- package/emotion/es/components/Table/Table.tokens.js +3 -0
- package/emotion/es/components/Toast/ToastNew/ToastNew.js +113 -0
- package/emotion/es/components/Toast/ToastNew/ToastNew.styles.js +26 -0
- package/emotion/es/components/Toast/ToastNew/ToastNew.tokens.js +21 -0
- package/emotion/es/components/Toast/ToastNew/ToastNew.types.js +1 -0
- package/emotion/es/components/Toast/ToastNew/index.js +2 -0
- package/emotion/es/examples/plasma_b2c/components/Checkbox/Checkbox.js +5 -2
- package/emotion/es/examples/plasma_b2c/components/Checkbox/Checkbox.outline.config.js +13 -13
- package/emotion/es/examples/plasma_b2c/components/Checkbox/Checkbox.stories.tsx +6 -0
- package/emotion/es/examples/plasma_b2c/components/Radiobox/Radiobox.js +2 -2
- package/emotion/es/examples/plasma_b2c/components/Sheet/Sheet.config.js +7 -2
- package/emotion/es/examples/plasma_b2c/components/Sheet/Sheet.stories.tsx +24 -3
- package/emotion/es/examples/plasma_b2c/components/Table/Table.config.js +5 -5
- package/emotion/es/examples/plasma_b2c/components/Toast/Toast.stories.tsx +1 -1
- package/emotion/es/examples/plasma_b2c/components/ToastNew/Toast.config.js +19 -0
- package/emotion/es/examples/plasma_b2c/components/ToastNew/ToastNew.js +6 -0
- package/emotion/es/examples/plasma_b2c/components/ToastNew/ToastNew.stories.tsx +90 -0
- package/emotion/es/examples/plasma_web/components/Checkbox/Checkbox.js +2 -2
- package/emotion/es/examples/plasma_web/components/Radiobox/Radiobox.js +2 -2
- package/emotion/es/examples/plasma_web/components/Sheet/Sheet.config.js +5 -1
- package/emotion/es/examples/plasma_web/components/Sheet/Sheet.stories.tsx +24 -3
- package/emotion/es/examples/plasma_web/components/Table/Table.config.js +5 -5
- package/emotion/es/index.js +2 -1
- package/es/components/Checkbox/Checkbox.js +19 -4
- package/es/components/Checkbox/Checkbox.js.map +1 -1
- package/es/components/Checkbox/IconsSvg.js +38 -1
- package/es/components/Checkbox/IconsSvg.js.map +1 -1
- package/es/components/Combobox/ComboboxNew/Combobox.js +5 -1
- package/es/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
- package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +4 -2
- package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js.map +1 -1
- package/es/components/Radiobox/Radiobox.js.map +1 -1
- package/es/components/Select/Select.js +5 -1
- package/es/components/Select/Select.js.map +1 -1
- package/es/components/Select/ui/Inner/ui/Item/Item.js +4 -2
- package/es/components/Select/ui/Inner/ui/Item/Item.js.map +1 -1
- package/es/components/Sheet/Sheet.css +5 -5
- package/es/components/Sheet/Sheet.js +9 -2
- package/es/components/Sheet/Sheet.js.map +1 -1
- package/es/components/Sheet/Sheet.styles.js +17 -17
- package/es/components/Sheet/Sheet.styles.js.map +1 -1
- package/es/components/Sheet/{Sheet.styles_o73i75.css → Sheet.styles_fnrgwh.css} +1 -1
- package/es/components/Sheet/Sheet.tokens.js +2 -1
- package/es/components/Sheet/Sheet.tokens.js.map +1 -1
- package/es/components/Sheet/variations/_handlePlacement/base.js +5 -0
- package/es/components/Sheet/variations/_handlePlacement/base.js.map +1 -0
- package/es/components/Sheet/variations/_handlePlacement/base_x642ct.css +1 -0
- package/es/components/Table/Table.css +12 -12
- package/es/components/Table/Table.js +8 -0
- package/es/components/Table/Table.js.map +1 -1
- package/es/components/Table/Table.styles.js +9 -9
- package/es/components/Table/Table.styles.js.map +1 -1
- package/es/components/Table/{Table.styles_as90a.css → Table.styles_sl2dfn.css} +1 -1
- package/es/components/Table/Table.tokens.js +3 -0
- package/es/components/Table/Table.tokens.js.map +1 -1
- package/es/components/Table/ui/Cell/Cell.css +12 -12
- package/es/components/Table/ui/EditableCell/EditableCell.css +12 -12
- package/es/components/Table/ui/HeadCell/HeadCell.css +12 -12
- package/es/components/Table/ui/HeadCell/ui/Filter/Filter.css +12 -12
- package/es/components/Toast/ToastNew/ToastNew.css +32 -0
- package/es/components/Toast/ToastNew/ToastNew.js +109 -0
- package/es/components/Toast/ToastNew/ToastNew.js.map +1 -0
- package/es/components/Toast/ToastNew/ToastNew.styles.js +46 -0
- package/es/components/Toast/ToastNew/ToastNew.styles.js.map +1 -0
- package/es/components/Toast/ToastNew/ToastNew.styles_4c92hd.css +4 -0
- package/es/components/Toast/ToastNew/ToastNew.tokens.js +23 -0
- package/es/components/Toast/ToastNew/ToastNew.tokens.js.map +1 -0
- package/es/index.css +21 -16
- package/es/index.js +2 -0
- package/es/index.js.map +1 -1
- package/package.json +6 -5
- package/styled-components/cjs/components/Checkbox/Checkbox.js +18 -3
- package/styled-components/cjs/components/Checkbox/IconsSvg.js +38 -1
- package/styled-components/cjs/components/Combobox/ComboboxNew/Combobox.js +5 -1
- package/styled-components/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +4 -2
- package/styled-components/cjs/components/Select/Select.js +5 -1
- package/styled-components/cjs/components/Select/ui/Inner/ui/Item/Item.js +4 -2
- package/styled-components/cjs/components/Sheet/Sheet.js +9 -2
- package/styled-components/cjs/components/Sheet/Sheet.styles.js +1 -1
- package/styled-components/cjs/components/Sheet/Sheet.tokens.js +2 -1
- package/styled-components/cjs/components/Sheet/variations/_handlePlacement/base.js +8 -0
- package/styled-components/cjs/components/Sheet/variations/_handlePlacement/tokens.json +1 -0
- package/styled-components/cjs/components/Table/Table.js +8 -0
- package/styled-components/cjs/components/Table/Table.styles.js +1 -1
- package/styled-components/cjs/components/Table/Table.tokens.js +3 -0
- package/styled-components/cjs/components/Toast/ToastNew/ToastNew.js +121 -0
- package/styled-components/cjs/components/Toast/ToastNew/ToastNew.styles.js +33 -0
- package/styled-components/cjs/components/Toast/ToastNew/ToastNew.tokens.js +27 -0
- package/styled-components/cjs/components/Toast/ToastNew/ToastNew.types.js +5 -0
- package/styled-components/cjs/components/Toast/ToastNew/index.js +31 -0
- package/styled-components/cjs/examples/plasma_b2c/components/Checkbox/Checkbox.js +6 -3
- package/styled-components/cjs/examples/plasma_b2c/components/Checkbox/Checkbox.outline.config.js +2 -2
- package/styled-components/cjs/examples/plasma_b2c/components/Checkbox/Checkbox.stories.tsx +6 -0
- package/styled-components/cjs/examples/plasma_b2c/components/Radiobox/Radiobox.js +3 -3
- package/styled-components/cjs/examples/plasma_b2c/components/Sheet/Sheet.config.js +6 -1
- package/styled-components/cjs/examples/plasma_b2c/components/Sheet/Sheet.stories.tsx +24 -3
- package/styled-components/cjs/examples/plasma_b2c/components/Table/Table.config.js +3 -3
- package/styled-components/cjs/examples/plasma_b2c/components/Toast/Toast.stories.tsx +1 -1
- package/styled-components/cjs/examples/plasma_b2c/components/ToastNew/Toast.config.js +25 -0
- package/styled-components/cjs/examples/plasma_b2c/components/ToastNew/ToastNew.js +17 -0
- package/styled-components/cjs/examples/plasma_b2c/components/ToastNew/ToastNew.stories.tsx +90 -0
- package/styled-components/cjs/examples/plasma_web/components/Checkbox/Checkbox.js +3 -3
- package/styled-components/cjs/examples/plasma_web/components/Radiobox/Radiobox.js +3 -3
- package/styled-components/cjs/examples/plasma_web/components/Sheet/Sheet.config.js +4 -0
- package/styled-components/cjs/examples/plasma_web/components/Sheet/Sheet.stories.tsx +24 -3
- package/styled-components/cjs/examples/plasma_web/components/Table/Table.config.js +3 -3
- package/styled-components/cjs/index.js +11 -0
- package/styled-components/es/components/Checkbox/Checkbox.js +19 -4
- package/styled-components/es/components/Checkbox/IconsSvg.js +37 -0
- package/styled-components/es/components/Combobox/ComboboxNew/Combobox.js +5 -1
- package/styled-components/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +4 -2
- package/styled-components/es/components/Select/Select.js +5 -1
- package/styled-components/es/components/Select/ui/Inner/ui/Item/Item.js +4 -2
- package/styled-components/es/components/Sheet/Sheet.js +9 -2
- package/styled-components/es/components/Sheet/Sheet.styles.js +1 -1
- package/styled-components/es/components/Sheet/Sheet.tokens.js +2 -1
- package/styled-components/es/components/Sheet/variations/_handlePlacement/base.js +2 -0
- package/styled-components/es/components/Sheet/variations/_handlePlacement/tokens.json +1 -0
- package/styled-components/es/components/Table/Table.js +8 -0
- package/styled-components/es/components/Table/Table.styles.js +1 -1
- package/styled-components/es/components/Table/Table.tokens.js +3 -0
- package/styled-components/es/components/Toast/ToastNew/ToastNew.js +113 -0
- package/styled-components/es/components/Toast/ToastNew/ToastNew.styles.js +25 -0
- package/styled-components/es/components/Toast/ToastNew/ToastNew.tokens.js +21 -0
- package/styled-components/es/components/Toast/ToastNew/ToastNew.types.js +1 -0
- package/styled-components/es/components/Toast/ToastNew/index.js +2 -0
- package/styled-components/es/examples/plasma_b2c/components/Checkbox/Checkbox.js +5 -2
- package/styled-components/es/examples/plasma_b2c/components/Checkbox/Checkbox.outline.config.js +2 -2
- package/styled-components/es/examples/plasma_b2c/components/Checkbox/Checkbox.stories.tsx +6 -0
- package/styled-components/es/examples/plasma_b2c/components/Radiobox/Radiobox.js +2 -2
- package/styled-components/es/examples/plasma_b2c/components/Sheet/Sheet.config.js +6 -1
- package/styled-components/es/examples/plasma_b2c/components/Sheet/Sheet.stories.tsx +24 -3
- package/styled-components/es/examples/plasma_b2c/components/Table/Table.config.js +3 -3
- package/styled-components/es/examples/plasma_b2c/components/Toast/Toast.stories.tsx +1 -1
- package/styled-components/es/examples/plasma_b2c/components/ToastNew/Toast.config.js +19 -0
- package/styled-components/es/examples/plasma_b2c/components/ToastNew/ToastNew.js +6 -0
- package/styled-components/es/examples/plasma_b2c/components/ToastNew/ToastNew.stories.tsx +90 -0
- package/styled-components/es/examples/plasma_web/components/Checkbox/Checkbox.js +2 -2
- package/styled-components/es/examples/plasma_web/components/Radiobox/Radiobox.js +2 -2
- package/styled-components/es/examples/plasma_web/components/Sheet/Sheet.config.js +4 -0
- package/styled-components/es/examples/plasma_web/components/Sheet/Sheet.stories.tsx +24 -3
- package/styled-components/es/examples/plasma_web/components/Table/Table.config.js +3 -3
- package/styled-components/es/index.js +2 -1
- package/types/components/Checkbox/Checkbox.d.ts.map +1 -1
- package/types/components/Checkbox/Checkbox.types.d.ts +1 -0
- package/types/components/Checkbox/Checkbox.types.d.ts.map +1 -1
- package/types/components/Checkbox/IconsSvg.d.ts +2 -0
- package/types/components/Checkbox/IconsSvg.d.ts.map +1 -1
- package/types/components/Combobox/ComboboxNew/Combobox.d.ts.map +1 -1
- package/types/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.d.ts.map +1 -1
- package/types/components/Radiobox/Radiobox.d.ts +3 -3
- package/types/components/Radiobox/Radiobox.d.ts.map +1 -1
- package/types/components/Select/Select.d.ts.map +1 -1
- package/types/components/Select/ui/Inner/ui/Item/Item.d.ts.map +1 -1
- package/types/components/Sheet/Sheet.d.ts +4 -0
- package/types/components/Sheet/Sheet.d.ts.map +1 -1
- package/types/components/Sheet/Sheet.styles.d.ts.map +1 -1
- package/types/components/Sheet/Sheet.tokens.d.ts +1 -0
- package/types/components/Sheet/Sheet.tokens.d.ts.map +1 -1
- package/types/components/Sheet/Sheet.types.d.ts +4 -0
- package/types/components/Sheet/Sheet.types.d.ts.map +1 -1
- package/types/components/Sheet/variations/_handlePlacement/base.d.ts +2 -0
- package/types/components/Sheet/variations/_handlePlacement/base.d.ts.map +1 -0
- package/types/components/Table/Table.d.ts.map +1 -1
- package/types/components/Table/Table.tokens.d.ts +3 -0
- package/types/components/Table/Table.tokens.d.ts.map +1 -1
- package/types/components/Toast/ToastNew/ToastNew.d.ts +28 -0
- package/types/components/Toast/ToastNew/ToastNew.d.ts.map +1 -0
- package/types/components/Toast/ToastNew/ToastNew.styles.d.ts +51 -0
- package/types/components/Toast/ToastNew/ToastNew.styles.d.ts.map +1 -0
- package/types/components/Toast/ToastNew/ToastNew.tokens.d.ts +22 -0
- package/types/components/Toast/ToastNew/ToastNew.tokens.d.ts.map +1 -0
- package/types/components/Toast/ToastNew/ToastNew.types.d.ts +65 -0
- package/types/components/Toast/ToastNew/ToastNew.types.d.ts.map +1 -0
- package/types/components/Toast/ToastNew/index.d.ts +4 -0
- package/types/components/Toast/ToastNew/index.d.ts.map +1 -0
- package/types/index.d.ts +1 -0
- package/types/index.d.ts.map +1 -1
@@ -92,19 +92,27 @@ export var tableRoot = function tableRoot(Root) {
|
|
92
92
|
return [].concat(_toConsumableArray(enableSelection ? [{
|
93
93
|
id: SELECT_COLUMN_ID,
|
94
94
|
header: function header(_ref2) {
|
95
|
+
var _checkboxAppearance;
|
95
96
|
var table = _ref2.table;
|
96
97
|
return /*#__PURE__*/React.createElement(StyledCheckbox, {
|
97
98
|
checked: table.getIsSomeRowsSelected() || table.getIsAllRowsSelected(),
|
98
99
|
indeterminate: table.getIsSomeRowsSelected(),
|
99
100
|
onChange: table.getToggleAllRowsSelectedHandler()
|
101
|
+
// eslint-disable-next-line no-underscore-dangle
|
102
|
+
,
|
103
|
+
appearance: (_checkboxAppearance = props._checkboxAppearance) !== null && _checkboxAppearance !== void 0 ? _checkboxAppearance : 'default'
|
100
104
|
});
|
101
105
|
},
|
102
106
|
cell: function cell(_ref3) {
|
107
|
+
var _checkboxAppearance2;
|
103
108
|
var row = _ref3.row;
|
104
109
|
return /*#__PURE__*/React.createElement(StyledCheckbox, {
|
105
110
|
checked: row.getIsSelected(),
|
106
111
|
indeterminate: row.getIsSomeSelected(),
|
107
112
|
onChange: row.getToggleSelectedHandler()
|
113
|
+
// eslint-disable-next-line no-underscore-dangle
|
114
|
+
,
|
115
|
+
appearance: (_checkboxAppearance2 = props._checkboxAppearance) !== null && _checkboxAppearance2 !== void 0 ? _checkboxAppearance2 : 'default'
|
108
116
|
});
|
109
117
|
},
|
110
118
|
enableResizing: false
|
@@ -63,7 +63,7 @@ export var Th = /*#__PURE__*/styled.th.withConfig({
|
|
63
63
|
}, Resizer);
|
64
64
|
export var StyledCheckbox = /*#__PURE__*/styled(Checkbox).withConfig({
|
65
65
|
componentId: "plasma-new-hope__sc-1nklm7n-6"
|
66
|
-
})(["", ":var(", ");", ":var(", ");", ":var(
|
66
|
+
})(["", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");", ":var(", ");"], checkboxTokens.triggerSize, tokens.checkboxTriggerSize, checkboxTokens.triggerBorderRadius, tokens.checkboxTriggerBorderRadius, checkboxTokens.fillColor, tokens.checkboxFillColor, checkboxTokens.iconColor, tokens.checkboxTriggerIconColor, checkboxTokens.triggerBorderCheckedColor, tokens.checkboxTriggerBorderCheckedColor, checkboxTokens.triggerBorderWidth, tokens.checkboxTriggerBorderWidth, checkboxTokens.triggerBorderColor, tokens.checkboxTriggerBorderColor);
|
67
67
|
export var StyledDivider = /*#__PURE__*/styled(Divider).withConfig({
|
68
68
|
componentId: "plasma-new-hope__sc-1nklm7n-7"
|
69
69
|
})(["", ":0.0625rem;", ":var(--surface-transparent-tertiary);", ":0.0625rem;"], dividerTokens.baseSideSize, dividerTokens.background, dividerTokens.borderRadius);
|
@@ -22,6 +22,9 @@ export var tableTokens = {
|
|
22
22
|
checkboxTriggerBorderCheckedColor: '--plasma-table-checkbox-trigger-border-checked-color',
|
23
23
|
checkboxTriggerBorderRadius: '--plasma-table-checkbox-trigger-border-radius',
|
24
24
|
checkboxTriggerBorderWidth: '--plasma-table-checkbox-trigger-border-width',
|
25
|
+
checkboxTriggerBorderColor: '--plasma-table-checkbox-trigger-border-color',
|
26
|
+
checkboxFillColor: '--plasma-table-checkbox-fill-color',
|
27
|
+
checkboxTriggerIconColor: '--plasma-table-checkbox-trigger-icon-color',
|
25
28
|
editableCellIconGap: '--plasma-table-editable-cell-icon-gap',
|
26
29
|
editableCellIconButtonWidth: '--plasma-table-editable-cell-icon-button-width',
|
27
30
|
editableCellIconButtonHeight: '--plasma-table-editable-cell-icon-button-height',
|
@@ -0,0 +1,113 @@
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
2
|
+
var _excluded = ["hasClose", "view", "size", "pilled", "contentLeft", "width", "textColor", "position", "duration", "gap", "onCloseButtonClick"];
|
3
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
4
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
5
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
6
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
7
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
8
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
9
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
10
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
11
|
+
import React, { forwardRef } from 'react';
|
12
|
+
import toast, { Toaster, resolveValue } from 'react-hot-toast';
|
13
|
+
import { tokens } from "../Toast.tokens";
|
14
|
+
import { IconCrossThin } from "../../_Icon/Icons/IconCrossThin";
|
15
|
+
import { base, Toast, CloseIconWrapper, StyledContentLeft } from "./ToastNew.styles";
|
16
|
+
export var toastContainerRoot = function toastContainerRoot(Root) {
|
17
|
+
return /*#__PURE__*/forwardRef(function (props, ref) {
|
18
|
+
var _props$hasClose = props.hasClose,
|
19
|
+
hasClose = _props$hasClose === void 0 ? true : _props$hasClose,
|
20
|
+
view = props.view,
|
21
|
+
size = props.size,
|
22
|
+
pilled = props.pilled,
|
23
|
+
contentLeft = props.contentLeft,
|
24
|
+
width = props.width,
|
25
|
+
textColor = props.textColor,
|
26
|
+
_props$position = props.position,
|
27
|
+
position = _props$position === void 0 ? 'bottom-center' : _props$position,
|
28
|
+
_props$duration = props.duration,
|
29
|
+
duration = _props$duration === void 0 ? Infinity : _props$duration,
|
30
|
+
gap = props.gap,
|
31
|
+
onCloseButtonClick = props.onCloseButtonClick,
|
32
|
+
rest = _objectWithoutProperties(props, _excluded);
|
33
|
+
return /*#__PURE__*/React.createElement(Root, _extends({
|
34
|
+
ref: ref,
|
35
|
+
view: view,
|
36
|
+
size: size,
|
37
|
+
pilled: pilled
|
38
|
+
}, rest), /*#__PURE__*/React.createElement(Toaster, {
|
39
|
+
gutter: gap,
|
40
|
+
toastOptions: {
|
41
|
+
duration: duration,
|
42
|
+
position: position
|
43
|
+
}
|
44
|
+
}, function (options) {
|
45
|
+
var _options$plasmaOption, _options$plasmaOption2, _options$plasmaOption3, _options$plasmaOption4, _options$plasmaOption5, _options$plasmaOption6, _options$plasmaOption7, _options$plasmaOption8, _options$plasmaOption9, _options$plasmaOption10;
|
46
|
+
return /*#__PURE__*/React.createElement(Root, {
|
47
|
+
view: (_options$plasmaOption = options.plasmaOptions) === null || _options$plasmaOption === void 0 ? void 0 : _options$plasmaOption.view,
|
48
|
+
size: (_options$plasmaOption2 = options.plasmaOptions) === null || _options$plasmaOption2 === void 0 ? void 0 : _options$plasmaOption2.size,
|
49
|
+
pilled: (_options$plasmaOption3 = options.plasmaOptions) === null || _options$plasmaOption3 === void 0 ? void 0 : _options$plasmaOption3.pilled
|
50
|
+
}, /*#__PURE__*/React.createElement(Toast, {
|
51
|
+
style: {
|
52
|
+
opacity: options.visible ? 1 : 0
|
53
|
+
},
|
54
|
+
width: ((_options$plasmaOption4 = options.plasmaOptions) === null || _options$plasmaOption4 === void 0 ? void 0 : _options$plasmaOption4.width) || width,
|
55
|
+
textColor: ((_options$plasmaOption5 = options.plasmaOptions) === null || _options$plasmaOption5 === void 0 ? void 0 : _options$plasmaOption5.textColor) || textColor
|
56
|
+
}, (((_options$plasmaOption6 = options.plasmaOptions) === null || _options$plasmaOption6 === void 0 ? void 0 : _options$plasmaOption6.contentLeft) || contentLeft) && /*#__PURE__*/React.createElement(StyledContentLeft, null, ((_options$plasmaOption7 = options.plasmaOptions) === null || _options$plasmaOption7 === void 0 ? void 0 : _options$plasmaOption7.contentLeft) || contentLeft), resolveValue(options.message, options), (((_options$plasmaOption8 = options.plasmaOptions) === null || _options$plasmaOption8 === void 0 ? void 0 : _options$plasmaOption8.hasClose) || ((_options$plasmaOption9 = (_options$plasmaOption10 = options.plasmaOptions) === null || _options$plasmaOption10 === void 0 ? void 0 : _options$plasmaOption10.hasClose) !== null && _options$plasmaOption9 !== void 0 ? _options$plasmaOption9 : hasClose)) && /*#__PURE__*/React.createElement(CloseIconWrapper, {
|
57
|
+
view: "clear",
|
58
|
+
size: "s",
|
59
|
+
stretching: "fixed",
|
60
|
+
onClick: function onClick() {
|
61
|
+
if (onCloseButtonClick) {
|
62
|
+
onCloseButtonClick();
|
63
|
+
}
|
64
|
+
toast.dismiss(options.id);
|
65
|
+
}
|
66
|
+
}, /*#__PURE__*/React.createElement(IconCrossThin, {
|
67
|
+
size: "s",
|
68
|
+
color: "inherit",
|
69
|
+
sizeCustomProperty: tokens.closeIconSize
|
70
|
+
}))));
|
71
|
+
}));
|
72
|
+
});
|
73
|
+
};
|
74
|
+
export var showToast = function showToast(text, options) {
|
75
|
+
toast(text, _objectSpread(_objectSpread(_objectSpread({}, options !== null && options !== void 0 && options.position ? {
|
76
|
+
position: options === null || options === void 0 ? void 0 : options.position
|
77
|
+
} : undefined), options !== null && options !== void 0 && options.duration ? {
|
78
|
+
duration: options === null || options === void 0 ? void 0 : options.duration
|
79
|
+
} : undefined), {}, {
|
80
|
+
// @ts-ignore
|
81
|
+
plasmaOptions: {
|
82
|
+
view: options === null || options === void 0 ? void 0 : options.view,
|
83
|
+
size: options === null || options === void 0 ? void 0 : options.size,
|
84
|
+
pilled: options === null || options === void 0 ? void 0 : options.pilled,
|
85
|
+
contentLeft: options === null || options === void 0 ? void 0 : options.contentLeft,
|
86
|
+
hasClose: options === null || options === void 0 ? void 0 : options.hasClose,
|
87
|
+
width: options === null || options === void 0 ? void 0 : options.width,
|
88
|
+
textColor: options === null || options === void 0 ? void 0 : options.textColor
|
89
|
+
}
|
90
|
+
}));
|
91
|
+
};
|
92
|
+
export var toastContainerConfig = {
|
93
|
+
name: 'ToastContainer',
|
94
|
+
tag: 'div',
|
95
|
+
layout: toastContainerRoot,
|
96
|
+
base: base,
|
97
|
+
variations: {
|
98
|
+
view: {
|
99
|
+
css: ''
|
100
|
+
},
|
101
|
+
size: {
|
102
|
+
css: ''
|
103
|
+
},
|
104
|
+
pilled: {
|
105
|
+
css: '',
|
106
|
+
attrs: true
|
107
|
+
}
|
108
|
+
},
|
109
|
+
defaults: {
|
110
|
+
view: 'default',
|
111
|
+
size: 'm'
|
112
|
+
}
|
113
|
+
};
|
@@ -0,0 +1,25 @@
|
|
1
|
+
var _templateObject;
|
2
|
+
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
3
|
+
import { css } from 'styled-components';
|
4
|
+
import styled from 'styled-components';
|
5
|
+
import { component, mergeConfig } from "../../../engines";
|
6
|
+
import { buttonConfig } from "../../Button";
|
7
|
+
import { tokens } from "./ToastNew.tokens";
|
8
|
+
var mergedButtonConfig = /*#__PURE__*/mergeConfig(buttonConfig);
|
9
|
+
var Button = /*#__PURE__*/component(mergedButtonConfig);
|
10
|
+
export var base = /*#__PURE__*/css(_templateObject || (_templateObject = /*#__PURE__*/_taggedTemplateLiteral([""])));
|
11
|
+
export var Toast = /*#__PURE__*/styled.div.withConfig({
|
12
|
+
componentId: "plasma-new-hope__sc-ifj8bd-0"
|
13
|
+
})(["display:flex;align-items:center;background:var(", ");color:", ";padding:var(", ");border-radius:var(", ");max-width:var(", ");width:", ";font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");"], tokens.background, function (_ref) {
|
14
|
+
var textColor = _ref.textColor;
|
15
|
+
return textColor || "var(".concat(tokens.color, ")");
|
16
|
+
}, tokens.padding, tokens.borderRadius, tokens.maxWidth, function (_ref2) {
|
17
|
+
var width = _ref2.width;
|
18
|
+
return width || 'auto';
|
19
|
+
}, tokens.fontFamily, tokens.fontSize, tokens.fontStyle, tokens.fontWeight, tokens.letterSpacing, tokens.lineHeight);
|
20
|
+
export var CloseIconWrapper = /*#__PURE__*/styled(Button).withConfig({
|
21
|
+
componentId: "plasma-new-hope__sc-ifj8bd-1"
|
22
|
+
})(["height:var(", ");margin:var(", ");color:var(", ");:hover{color:var(", ");}"], tokens.closeIconButtonSize, tokens.closeIconMargin, tokens.closeIconColor, tokens.closeIconColorOnHover);
|
23
|
+
export var StyledContentLeft = /*#__PURE__*/styled.div.withConfig({
|
24
|
+
componentId: "plasma-new-hope__sc-ifj8bd-2"
|
25
|
+
})(["margin:var(", ");color:var(", ");line-height:0;"], tokens.contentLeftMargin, tokens.contentLeftColor);
|
@@ -0,0 +1,21 @@
|
|
1
|
+
export var classes = {};
|
2
|
+
export var tokens = {
|
3
|
+
background: '--plasma-toast-background',
|
4
|
+
color: '--plasma-toast-color',
|
5
|
+
padding: '--plasma-toast-padding',
|
6
|
+
borderRadius: '--plasma-toast-border-radius',
|
7
|
+
maxWidth: '--plasma-toast-max-width',
|
8
|
+
fontFamily: '--plasma-toast-font-family',
|
9
|
+
fontSize: '--plasma-toast-font-size',
|
10
|
+
fontStyle: '--plasma-toast-font-style',
|
11
|
+
fontWeight: '--plasma-toast-font-weight',
|
12
|
+
letterSpacing: '--plasma-toast-letter-spacing',
|
13
|
+
lineHeight: '--plasma-toast-line-height',
|
14
|
+
contentLeftMargin: '--plasma-toast-content-left-margin',
|
15
|
+
contentLeftColor: '--plasma-toast-content-left-color',
|
16
|
+
closeIconMargin: '--plasma-toast-close-icon-margin',
|
17
|
+
closeIconColor: '--plasma-toast-close-icon-color',
|
18
|
+
closeIconColorOnHover: '--plasma-toast-close-icon-color-on-hover',
|
19
|
+
closeIconSize: '--plasma-toast-close-icon-size',
|
20
|
+
closeIconButtonSize: '--plasma-toast-close-icon-button-size'
|
21
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -4,10 +4,13 @@ import { createConditionalComponent } from "../../../../utils/createConditionalC
|
|
4
4
|
import { config } from "./Checkbox.config";
|
5
5
|
import { config as outlineConfig } from "./Checkbox.outline.config";
|
6
6
|
var mergedConfigDefault = /*#__PURE__*/mergeConfig(checkboxConfig, config);
|
7
|
-
export var
|
7
|
+
export var CheckboxDefault = /*#__PURE__*/component(mergedConfigDefault);
|
8
8
|
var mergedConfigOutline = /*#__PURE__*/mergeConfig(checkboxConfig, outlineConfig);
|
9
9
|
export var CheckboxOutline = /*#__PURE__*/component(mergedConfigOutline);
|
10
|
-
|
10
|
+
/**
|
11
|
+
* Флажок или чекбокс. Позволяет пользователю управлять параметром с двумя состояниями — ☑ включено и ☐ отключено.
|
12
|
+
*/
|
13
|
+
export var Checkbox = /*#__PURE__*/createConditionalComponent(CheckboxDefault, [{
|
11
14
|
conditions: {
|
12
15
|
prop: 'appearance',
|
13
16
|
value: 'outline'
|
package/styled-components/es/examples/plasma_b2c/components/Checkbox/Checkbox.outline.config.js
CHANGED
@@ -17,7 +17,7 @@ export var config = {
|
|
17
17
|
* Вид контрола.
|
18
18
|
*/
|
19
19
|
view: {
|
20
|
-
accent: /*#__PURE__*/css(["", ":transparent;", ":var(--
|
20
|
+
accent: /*#__PURE__*/css(["", ":transparent;", ":var(--outline-accent);", ":var(--text-primary);", ":var(--outline-transparent-tertiary);", ":transparent;", ":var(--text-secondary);", ":var(--outline-accent);"], checkboxTokens.fillColor, checkboxTokens.iconColor, checkboxTokens.labelColor, checkboxTokens.descriptionColor, checkboxTokens.triggerBackgroundColor, checkboxTokens.triggerBorderColor, checkboxTokens.triggerBorderCheckedColor),
|
21
21
|
// deprecated
|
22
22
|
"default": /*#__PURE__*/css(["", ":transparent;", ":var(--text-primary);", ":var(--text-primary);", ":var(--text-secondary);", ":transparent;", ":var(--text-secondary);", ":var(--text-primary);"], checkboxTokens.fillColor, checkboxTokens.iconColor, checkboxTokens.labelColor, checkboxTokens.descriptionColor, checkboxTokens.triggerBackgroundColor, checkboxTokens.triggerBorderColor, checkboxTokens.triggerBorderCheckedColor),
|
23
23
|
// deprecated
|
@@ -30,7 +30,7 @@ export var config = {
|
|
30
30
|
positive: /*#__PURE__*/css(["", ":transparent;", ":var(--text-positive);", ":var(--text-primary);", ":var(--text-secondary);", ":transparent;", ":var(--text-secondary);", ":var(--text-positive);"], checkboxTokens.fillColor, checkboxTokens.iconColor, checkboxTokens.labelColor, checkboxTokens.descriptionColor, checkboxTokens.triggerBackgroundColor, checkboxTokens.triggerBorderColor, checkboxTokens.triggerBorderCheckedColor),
|
31
31
|
// deprecated
|
32
32
|
warning: /*#__PURE__*/css(["", ":transparent;", ":var(--text-warning);", ":var(--text-primary);", ":var(--text-secondary);", ":transparent;", ":var(--text-secondary);", ":var(--text-warning);"], checkboxTokens.fillColor, checkboxTokens.iconColor, checkboxTokens.labelColor, checkboxTokens.descriptionColor, checkboxTokens.triggerBackgroundColor, checkboxTokens.triggerBorderColor, checkboxTokens.triggerBorderCheckedColor),
|
33
|
-
negative: /*#__PURE__*/css(["", ":transparent;", ":var(--
|
33
|
+
negative: /*#__PURE__*/css(["", ":transparent;", ":var(--outline-negative);", ":var(--text-primary);", ":var(--text-secondary);", ":transparent;", ":var(--outline-negative);", ":var(--outline-negative);"], checkboxTokens.fillColor, checkboxTokens.iconColor, checkboxTokens.labelColor, checkboxTokens.descriptionColor, checkboxTokens.triggerBackgroundColor, checkboxTokens.triggerBorderColor, checkboxTokens.triggerBorderCheckedColor)
|
34
34
|
},
|
35
35
|
disabled: {
|
36
36
|
"true": /*#__PURE__*/css(["", ":0.4;"], checkboxTokens.disabledOpacity)
|
@@ -35,6 +35,11 @@ const meta: Meta<typeof Checkbox> = {
|
|
35
35
|
type: 'radio',
|
36
36
|
},
|
37
37
|
},
|
38
|
+
indeterminate: {
|
39
|
+
control: {
|
40
|
+
type: 'boolean',
|
41
|
+
},
|
42
|
+
},
|
38
43
|
},
|
39
44
|
args: {
|
40
45
|
view: 'accent',
|
@@ -42,6 +47,7 @@ const meta: Meta<typeof Checkbox> = {
|
|
42
47
|
disabled: false,
|
43
48
|
focused: true,
|
44
49
|
appearance: 'default',
|
50
|
+
indeterminate: false,
|
45
51
|
},
|
46
52
|
};
|
47
53
|
|
@@ -4,10 +4,10 @@ import { createConditionalComponent } from "../../../../utils/createConditionalC
|
|
4
4
|
import { config } from "./Radiobox.config";
|
5
5
|
import { config as outlineConfig } from "./Radiobox.outline.config";
|
6
6
|
var mergedConfigDefault = /*#__PURE__*/mergeConfig(radioboxConfig, config);
|
7
|
-
export var
|
7
|
+
export var RadioboxDefault = /*#__PURE__*/component(mergedConfigDefault);
|
8
8
|
var mergedConfigOutline = /*#__PURE__*/mergeConfig(radioboxConfig, outlineConfig);
|
9
9
|
export var RadioboxOutline = /*#__PURE__*/component(mergedConfigOutline);
|
10
|
-
export var Radiobox = /*#__PURE__*/createConditionalComponent(
|
10
|
+
export var Radiobox = /*#__PURE__*/createConditionalComponent(RadioboxDefault, [{
|
11
11
|
conditions: {
|
12
12
|
prop: 'appearance',
|
13
13
|
value: 'outline'
|
@@ -2,11 +2,16 @@ import { css } from 'styled-components';
|
|
2
2
|
import { sheetTokens } from "../../../../components/Sheet";
|
3
3
|
export var config = {
|
4
4
|
defaults: {
|
5
|
-
view: 'default'
|
5
|
+
view: 'default',
|
6
|
+
handlePlacement: 'outer'
|
6
7
|
},
|
7
8
|
variations: {
|
8
9
|
view: {
|
9
10
|
"default": /*#__PURE__*/css(["", ":var(--overlay-soft);", ":var(--overlay-blur);", ":var(--surface-solid-card);", ":var(--surface-solid-tertiary);"], sheetTokens.sheetOverlayColor, sheetTokens.sheetOverlayWithBlurColor, sheetTokens.contentBackgroundColor, sheetTokens.handleBackgroundColor)
|
11
|
+
},
|
12
|
+
handlePlacement: {
|
13
|
+
inner: /*#__PURE__*/css(["", ":-2.375rem;"], sheetTokens.handleMarginTop),
|
14
|
+
outer: /*#__PURE__*/css(["", ":-1.375rem;"], sheetTokens.handleMarginTop)
|
10
15
|
}
|
11
16
|
}
|
12
17
|
};
|
@@ -10,8 +10,16 @@ import { Body } from '../../../typography/components/Body/Body';
|
|
10
10
|
import { Sheet } from './Sheet';
|
11
11
|
|
12
12
|
const meta: Meta<typeof Sheet> = {
|
13
|
-
title: 'b2c/Overlay/
|
13
|
+
title: 'b2c/Overlay/Sheet',
|
14
14
|
decorators: [WithTheme],
|
15
|
+
argTypes: {
|
16
|
+
handlePlacement: {
|
17
|
+
options: ['inner', 'outer'],
|
18
|
+
control: {
|
19
|
+
type: 'inline-radio',
|
20
|
+
},
|
21
|
+
},
|
22
|
+
},
|
15
23
|
args: {
|
16
24
|
withBlur: false,
|
17
25
|
withOverlay: true,
|
@@ -19,6 +27,8 @@ const meta: Meta<typeof Sheet> = {
|
|
19
27
|
hasHandle: true,
|
20
28
|
isHeaderFixed: false,
|
21
29
|
isFooterFixed: false,
|
30
|
+
handlePlacement: 'outer',
|
31
|
+
fullScreen: false,
|
22
32
|
},
|
23
33
|
};
|
24
34
|
|
@@ -29,10 +39,18 @@ type StorySheetProps = ComponentProps<typeof Sheet> & {
|
|
29
39
|
storyHasFooter: boolean;
|
30
40
|
};
|
31
41
|
|
42
|
+
type StorySheetPropsExtension = StorySheetProps & {
|
43
|
+
fullScreen: boolean;
|
44
|
+
};
|
45
|
+
|
32
46
|
const StyledBody = styled(Body)`
|
33
47
|
padding-bottom: 300px;
|
34
48
|
`;
|
35
49
|
|
50
|
+
const StyledBodyFullScreen = styled(Body)`
|
51
|
+
height: calc(100vh - 10rem);
|
52
|
+
`;
|
53
|
+
|
36
54
|
const StoryDefault = ({
|
37
55
|
withOverlay,
|
38
56
|
withTransition,
|
@@ -42,7 +60,9 @@ const StoryDefault = ({
|
|
42
60
|
isHeaderFixed,
|
43
61
|
hasHandle,
|
44
62
|
withBlur,
|
45
|
-
|
63
|
+
handlePlacement,
|
64
|
+
fullScreen,
|
65
|
+
}: StorySheetPropsExtension) => {
|
46
66
|
const [opened, setOpened] = useState(false);
|
47
67
|
|
48
68
|
return (
|
@@ -50,6 +70,7 @@ const StoryDefault = ({
|
|
50
70
|
<Button onClick={() => setOpened(true)}>Открыть</Button>
|
51
71
|
<Sheet
|
52
72
|
opened={opened}
|
73
|
+
handlePlacement={handlePlacement}
|
53
74
|
withOverlay={withOverlay}
|
54
75
|
withTransition={withTransition}
|
55
76
|
onClose={() => setOpened(false)}
|
@@ -72,7 +93,7 @@ const StoryDefault = ({
|
|
72
93
|
}
|
73
94
|
isFooterFixed={isFooterFixed}
|
74
95
|
>
|
75
|
-
<StyledBody>body</StyledBody>
|
96
|
+
{fullScreen ? <StyledBodyFullScreen>body</StyledBodyFullScreen> : <StyledBody>body</StyledBody>}
|
76
97
|
</Sheet>
|
77
98
|
</>
|
78
99
|
);
|
@@ -11,9 +11,9 @@ export var config = {
|
|
11
11
|
clear: /*#__PURE__*/css(["", ":transparent;"], tokens.borderColor)
|
12
12
|
},
|
13
13
|
size: {
|
14
|
-
l: /*#__PURE__*/css(["", ":var(--plasma-typo-body-l-font-family);", ":var(--plasma-typo-body-l-font-size);", ":var(--plasma-typo-body-l-font-style);", ":var(--plasma-typo-body-l-font-weight);", ":var(--plasma-typo-body-l-letter-spacing);", ":var(--plasma-typo-body-l-line-height);", ":3.125rem;", ":3.125rem;", ":0.375rem 1rem;", ":0.375rem 1rem;", ":0.125rem;", ":transparent;", ":1.25rem;", ":0.375rem;", ":0.5rem;", ":3rem;", ":100%;", ":0.25rem;", ":0.875rem;", ":0 0.75rem;", ":var(--surface-transparent-tertiary);", ":0.75rem 0;", ":0.375rem 1rem;", ":2.5rem;", ":var(--plasma-typo-body-s-font-family);", ":var(--plasma-typo-body-s-font-size);", ":var(--plasma-typo-body-s-font-style);", ":var(--plasma-typo-body-s-bold-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);", ":0.125rem;", ":0.875rem;", ":1.5rem;", ":0.75rem 0.875rem;", ":0.75rem;", ":0 0.375rem 0 0;", ":1.5rem;", ":0;", ":var(--plasma-typo-body-m-font-family);", ":var(--plasma-typo-body-m-font-size);", ":var(--plasma-typo-body-m-font-style);", ":var(--plasma-typo-body-m-font-weight);", ":var(--plasma-typo-body-m-letter-spacing);", ":var(--plasma-typo-body-m-line-height);", ":1.25rem;", ":0.375rem;", ":0.125rem;", ":transparent;", ":0.5rem 1rem;", ":0.5rem;", ":var(--plasma-typo-body-s-font-family);", ":var(--plasma-typo-body-s-font-size);", ":var(--plasma-typo-body-s-font-style);", ":var(--plasma-typo-body-s-bold-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);"], tokens.fontFamily, tokens.fontSize, tokens.fontStyle, tokens.fontWeight, tokens.letterSpacing, tokens.lineHeight, tokens.headerRowHeight, tokens.rowHeight, tokens.cellPadding, tokens.checkboxCellPadding, tokens.checkboxTriggerBorderWidth, tokens.checkboxTriggerBorderCheckedColor, tokens.checkboxTriggerSize, tokens.checkboxTriggerBorderRadius, tokens.editableCellIconGap, tokens.editableCellIconButtonWidth, tokens.editableCellIconButtonHeight, tokens.editableCellPadding, tokens.editableCellInputBorderRadius, tokens.editableCellInputPadding, tokens.editableCellInputBackground, tokens.filterCheckboxPadding, tokens.filterDividerMargin, tokens.buttonHeight, tokens.buttonFontFamily, tokens.buttonFontSize, tokens.buttonFontStyle, tokens.buttonFontWeight, tokens.buttonLetterSpacing, tokens.buttonLineHeight, tokens.selectPadding, tokens.selectBorderRadius, tokens.selectItemHeight, tokens.selectItemPadding, tokens.selectItemBorderRadius, tokens.selectItemIconMargin, tokens.selectItemIconSize, tokens.selectCellPadding, tokens.selectCellTitleFontFamily, tokens.selectCellTitleFontSize, tokens.selectCellTitleFontStyle, tokens.selectCellTitleFontWeight, tokens.selectCellTitleLetterSpacing, tokens.selectCellTitleLineHeight, tokens.selectCheckboxTriggerSize, tokens.selectCheckboxTriggerBorderRadius, tokens.selectCheckboxTriggerBorderWidth, tokens.selectCheckboxTriggerBorderCheckedColor, tokens.selectControlPanelPadding, tokens.selectControlPanelGap, tokens.linkButtonFontFamily, tokens.linkButtonFontSize, tokens.linkButtonFontStyle, tokens.linkButtonFontWeight, tokens.linkButtonLetterSpacing, tokens.linkButtonLineHeight),
|
15
|
-
m: /*#__PURE__*/css(["", ":var(--plasma-typo-body-m-font-family);", ":var(--plasma-typo-body-m-font-size);", ":var(--plasma-typo-body-m-font-style);", ":var(--plasma-typo-body-m-font-weight);", ":var(--plasma-typo-body-m-letter-spacing);", ":var(--plasma-typo-body-m-line-height);", ":2.75rem;", ":2.75rem;", ":0.25rem 0.875rem;", ":0.25rem 0.75rem;", ":0.125rem;", ":transparent;", ":1.25rem;", ":0.375rem;", ":0.375rem;", ":2.5rem;", ":100%;", ":0.25rem;", ":0.625rem;", ":0 0.625rem;", ":var(--surface-transparent-tertiary);", ":0.5rem 0;", ":0.375rem 0.875rem;", ":2rem;", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-bold-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);", ":0.125rem;", ":0.75rem;", ":1.5rem;", ":0.5rem 0.625rem;", ":0.625rem;", ":0 0.375rem 0 0;", ":1.5rem;", ":0;", ":var(--plasma-typo-body-s-font-family);", ":var(--plasma-typo-body-s-font-size);", ":var(--plasma-typo-body-s-font-style);", ":var(--plasma-typo-body-s-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);", ":1.25rem;", ":0.375rem;", ":0.125rem;", ":transparent;", ":0.25rem 0.875rem;", ":0.625rem;", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-bold-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);"], tokens.fontFamily, tokens.fontSize, tokens.fontStyle, tokens.fontWeight, tokens.letterSpacing, tokens.lineHeight, tokens.headerRowHeight, tokens.rowHeight, tokens.cellPadding, tokens.checkboxCellPadding, tokens.checkboxTriggerBorderWidth, tokens.checkboxTriggerBorderCheckedColor, tokens.checkboxTriggerSize, tokens.checkboxTriggerBorderRadius, tokens.editableCellIconGap, tokens.editableCellIconButtonWidth, tokens.editableCellIconButtonHeight, tokens.editableCellPadding, tokens.editableCellInputBorderRadius, tokens.editableCellInputPadding, tokens.editableCellInputBackground, tokens.filterCheckboxPadding, tokens.filterDividerMargin, tokens.buttonHeight, tokens.buttonFontFamily, tokens.buttonFontSize, tokens.buttonFontStyle, tokens.buttonFontWeight, tokens.buttonLetterSpacing, tokens.buttonLineHeight, tokens.selectPadding, tokens.selectBorderRadius, tokens.selectItemHeight, tokens.selectItemPadding, tokens.selectItemBorderRadius, tokens.selectItemIconMargin, tokens.selectItemIconSize, tokens.selectCellPadding, tokens.selectCellTitleFontFamily, tokens.selectCellTitleFontSize, tokens.selectCellTitleFontStyle, tokens.selectCellTitleFontWeight, tokens.selectCellTitleLetterSpacing, tokens.selectCellTitleLineHeight, tokens.selectCheckboxTriggerSize, tokens.selectCheckboxTriggerBorderRadius, tokens.selectCheckboxTriggerBorderWidth, tokens.selectCheckboxTriggerBorderCheckedColor, tokens.selectControlPanelPadding, tokens.selectControlPanelGap, tokens.linkButtonFontFamily, tokens.linkButtonFontSize, tokens.linkButtonFontStyle, tokens.linkButtonFontWeight, tokens.linkButtonLetterSpacing, tokens.linkButtonLineHeight),
|
16
|
-
s: /*#__PURE__*/css(["", ":var(--plasma-typo-body-s-font-family);", ":var(--plasma-typo-body-s-font-size);", ":var(--plasma-typo-body-s-font-style);", ":var(--plasma-typo-body-s-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);", ":2.125rem;", ":2.125rem;", ":0.125rem 0.5rem;", ":0.125rem 0.625rem;", ":0.125rem;", ":transparent;", ":0.875rem;", ":0.25rem;", ":0.25rem;", ":2rem;", ":100%;", ":0.125rem;", ":0.5rem;", ":0 0.375rem;", ":var(--surface-transparent-tertiary);", ":0.5rem 0;", ":0.25rem 0.625rem;", ":1.5rem;", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-bold-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);", ":0.125rem;", ":0.625rem;", ":1rem;", ":0.5rem;", ":0.5rem;", ":0 0.25rem 0 0;", ":1rem;", ":0;", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);", ":0.875rem;", ":0.25rem;", ":0.125rem;", ":transparent;", ":0.25rem 0.625rem;", ":0.25rem;", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-bold-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);"], tokens.fontFamily, tokens.fontSize, tokens.fontStyle, tokens.fontWeight, tokens.letterSpacing, tokens.lineHeight, tokens.headerRowHeight, tokens.rowHeight, tokens.cellPadding, tokens.checkboxCellPadding, tokens.checkboxTriggerBorderWidth, tokens.checkboxTriggerBorderCheckedColor, tokens.checkboxTriggerSize, tokens.checkboxTriggerBorderRadius, tokens.editableCellIconGap, tokens.editableCellIconButtonWidth, tokens.editableCellIconButtonHeight, tokens.editableCellPadding, tokens.editableCellInputBorderRadius, tokens.editableCellInputPadding, tokens.editableCellInputBackground, tokens.filterCheckboxPadding, tokens.filterDividerMargin, tokens.buttonHeight, tokens.buttonFontFamily, tokens.buttonFontSize, tokens.buttonFontStyle, tokens.buttonFontWeight, tokens.buttonLetterSpacing, tokens.buttonLineHeight, tokens.selectPadding, tokens.selectBorderRadius, tokens.selectItemHeight, tokens.selectItemPadding, tokens.selectItemBorderRadius, tokens.selectItemIconMargin, tokens.selectItemIconSize, tokens.selectCellPadding, tokens.selectCellTitleFontFamily, tokens.selectCellTitleFontSize, tokens.selectCellTitleFontStyle, tokens.selectCellTitleFontWeight, tokens.selectCellTitleLetterSpacing, tokens.selectCellTitleLineHeight, tokens.selectCheckboxTriggerSize, tokens.selectCheckboxTriggerBorderRadius, tokens.selectCheckboxTriggerBorderWidth, tokens.selectCheckboxTriggerBorderCheckedColor, tokens.selectControlPanelPadding, tokens.selectControlPanelGap, tokens.linkButtonFontFamily, tokens.linkButtonFontSize, tokens.linkButtonFontStyle, tokens.linkButtonFontWeight, tokens.linkButtonLetterSpacing, tokens.linkButtonLineHeight)
|
14
|
+
l: /*#__PURE__*/css(["", ":var(--plasma-typo-body-l-font-family);", ":var(--plasma-typo-body-l-font-size);", ":var(--plasma-typo-body-l-font-style);", ":var(--plasma-typo-body-l-font-weight);", ":var(--plasma-typo-body-l-letter-spacing);", ":var(--plasma-typo-body-l-line-height);", ":3.125rem;", ":3.125rem;", ":0.375rem 1rem;", ":0.375rem 1rem;", ":0.125rem;", ":transparent;", ":1.25rem;", ":0.375rem;", ":var(--text-secondary);", ":var(--text-accent);", ":var(--on-dark-text-primary);", ":0.5rem;", ":3rem;", ":100%;", ":0.25rem;", ":0.875rem;", ":0 0.75rem;", ":var(--surface-transparent-tertiary);", ":0.75rem 0;", ":0.375rem 1rem;", ":2.5rem;", ":var(--plasma-typo-body-s-font-family);", ":var(--plasma-typo-body-s-font-size);", ":var(--plasma-typo-body-s-font-style);", ":var(--plasma-typo-body-s-bold-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);", ":0.125rem;", ":0.875rem;", ":1.5rem;", ":0.75rem 0.875rem;", ":0.75rem;", ":0 0.375rem 0 0;", ":1.5rem;", ":0;", ":var(--plasma-typo-body-m-font-family);", ":var(--plasma-typo-body-m-font-size);", ":var(--plasma-typo-body-m-font-style);", ":var(--plasma-typo-body-m-font-weight);", ":var(--plasma-typo-body-m-letter-spacing);", ":var(--plasma-typo-body-m-line-height);", ":1.25rem;", ":0.375rem;", ":0.125rem;", ":transparent;", ":0.5rem 1rem;", ":0.5rem;", ":var(--plasma-typo-body-s-font-family);", ":var(--plasma-typo-body-s-font-size);", ":var(--plasma-typo-body-s-font-style);", ":var(--plasma-typo-body-s-bold-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);"], tokens.fontFamily, tokens.fontSize, tokens.fontStyle, tokens.fontWeight, tokens.letterSpacing, tokens.lineHeight, tokens.headerRowHeight, tokens.rowHeight, tokens.cellPadding, tokens.checkboxCellPadding, tokens.checkboxTriggerBorderWidth, tokens.checkboxTriggerBorderCheckedColor, tokens.checkboxTriggerSize, tokens.checkboxTriggerBorderRadius, tokens.checkboxTriggerBorderColor, tokens.checkboxFillColor, tokens.checkboxTriggerIconColor, tokens.editableCellIconGap, tokens.editableCellIconButtonWidth, tokens.editableCellIconButtonHeight, tokens.editableCellPadding, tokens.editableCellInputBorderRadius, tokens.editableCellInputPadding, tokens.editableCellInputBackground, tokens.filterCheckboxPadding, tokens.filterDividerMargin, tokens.buttonHeight, tokens.buttonFontFamily, tokens.buttonFontSize, tokens.buttonFontStyle, tokens.buttonFontWeight, tokens.buttonLetterSpacing, tokens.buttonLineHeight, tokens.selectPadding, tokens.selectBorderRadius, tokens.selectItemHeight, tokens.selectItemPadding, tokens.selectItemBorderRadius, tokens.selectItemIconMargin, tokens.selectItemIconSize, tokens.selectCellPadding, tokens.selectCellTitleFontFamily, tokens.selectCellTitleFontSize, tokens.selectCellTitleFontStyle, tokens.selectCellTitleFontWeight, tokens.selectCellTitleLetterSpacing, tokens.selectCellTitleLineHeight, tokens.selectCheckboxTriggerSize, tokens.selectCheckboxTriggerBorderRadius, tokens.selectCheckboxTriggerBorderWidth, tokens.selectCheckboxTriggerBorderCheckedColor, tokens.selectControlPanelPadding, tokens.selectControlPanelGap, tokens.linkButtonFontFamily, tokens.linkButtonFontSize, tokens.linkButtonFontStyle, tokens.linkButtonFontWeight, tokens.linkButtonLetterSpacing, tokens.linkButtonLineHeight),
|
15
|
+
m: /*#__PURE__*/css(["", ":var(--plasma-typo-body-m-font-family);", ":var(--plasma-typo-body-m-font-size);", ":var(--plasma-typo-body-m-font-style);", ":var(--plasma-typo-body-m-font-weight);", ":var(--plasma-typo-body-m-letter-spacing);", ":var(--plasma-typo-body-m-line-height);", ":2.75rem;", ":2.75rem;", ":0.25rem 0.875rem;", ":0.25rem 0.75rem;", ":0.125rem;", ":transparent;", ":1.25rem;", ":0.375rem;", ":var(--text-secondary);", ":var(--text-accent);", ":var(--on-dark-text-primary);", ":0.375rem;", ":2.5rem;", ":100%;", ":0.25rem;", ":0.625rem;", ":0 0.625rem;", ":var(--surface-transparent-tertiary);", ":0.5rem 0;", ":0.375rem 0.875rem;", ":2rem;", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-bold-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);", ":0.125rem;", ":0.75rem;", ":1.5rem;", ":0.5rem 0.625rem;", ":0.625rem;", ":0 0.375rem 0 0;", ":1.5rem;", ":0;", ":var(--plasma-typo-body-s-font-family);", ":var(--plasma-typo-body-s-font-size);", ":var(--plasma-typo-body-s-font-style);", ":var(--plasma-typo-body-s-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);", ":1.25rem;", ":0.375rem;", ":0.125rem;", ":transparent;", ":0.25rem 0.875rem;", ":0.625rem;", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-bold-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);"], tokens.fontFamily, tokens.fontSize, tokens.fontStyle, tokens.fontWeight, tokens.letterSpacing, tokens.lineHeight, tokens.headerRowHeight, tokens.rowHeight, tokens.cellPadding, tokens.checkboxCellPadding, tokens.checkboxTriggerBorderWidth, tokens.checkboxTriggerBorderCheckedColor, tokens.checkboxTriggerSize, tokens.checkboxTriggerBorderRadius, tokens.checkboxTriggerBorderColor, tokens.checkboxFillColor, tokens.checkboxTriggerIconColor, tokens.editableCellIconGap, tokens.editableCellIconButtonWidth, tokens.editableCellIconButtonHeight, tokens.editableCellPadding, tokens.editableCellInputBorderRadius, tokens.editableCellInputPadding, tokens.editableCellInputBackground, tokens.filterCheckboxPadding, tokens.filterDividerMargin, tokens.buttonHeight, tokens.buttonFontFamily, tokens.buttonFontSize, tokens.buttonFontStyle, tokens.buttonFontWeight, tokens.buttonLetterSpacing, tokens.buttonLineHeight, tokens.selectPadding, tokens.selectBorderRadius, tokens.selectItemHeight, tokens.selectItemPadding, tokens.selectItemBorderRadius, tokens.selectItemIconMargin, tokens.selectItemIconSize, tokens.selectCellPadding, tokens.selectCellTitleFontFamily, tokens.selectCellTitleFontSize, tokens.selectCellTitleFontStyle, tokens.selectCellTitleFontWeight, tokens.selectCellTitleLetterSpacing, tokens.selectCellTitleLineHeight, tokens.selectCheckboxTriggerSize, tokens.selectCheckboxTriggerBorderRadius, tokens.selectCheckboxTriggerBorderWidth, tokens.selectCheckboxTriggerBorderCheckedColor, tokens.selectControlPanelPadding, tokens.selectControlPanelGap, tokens.linkButtonFontFamily, tokens.linkButtonFontSize, tokens.linkButtonFontStyle, tokens.linkButtonFontWeight, tokens.linkButtonLetterSpacing, tokens.linkButtonLineHeight),
|
16
|
+
s: /*#__PURE__*/css(["", ":var(--plasma-typo-body-s-font-family);", ":var(--plasma-typo-body-s-font-size);", ":var(--plasma-typo-body-s-font-style);", ":var(--plasma-typo-body-s-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);", ":2.125rem;", ":2.125rem;", ":0.125rem 0.5rem;", ":0.125rem 0.625rem;", ":0.125rem;", ":transparent;", ":0.875rem;", ":0.25rem;", ":var(--text-secondary);", ":var(--text-accent);", ":var(--on-dark-text-primary);", ":0.25rem;", ":2rem;", ":100%;", ":0.125rem;", ":0.5rem;", ":0 0.375rem;", ":var(--surface-transparent-tertiary);", ":0.5rem 0;", ":0.25rem 0.625rem;", ":1.5rem;", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-bold-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);", ":0.125rem;", ":0.625rem;", ":1rem;", ":0.5rem;", ":0.5rem;", ":0 0.25rem 0 0;", ":1rem;", ":0;", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);", ":0.875rem;", ":0.25rem;", ":0.125rem;", ":transparent;", ":0.25rem 0.625rem;", ":0.25rem;", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-bold-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);"], tokens.fontFamily, tokens.fontSize, tokens.fontStyle, tokens.fontWeight, tokens.letterSpacing, tokens.lineHeight, tokens.headerRowHeight, tokens.rowHeight, tokens.cellPadding, tokens.checkboxCellPadding, tokens.checkboxTriggerBorderWidth, tokens.checkboxTriggerBorderCheckedColor, tokens.checkboxTriggerSize, tokens.checkboxTriggerBorderRadius, tokens.checkboxTriggerBorderColor, tokens.checkboxFillColor, tokens.checkboxTriggerIconColor, tokens.editableCellIconGap, tokens.editableCellIconButtonWidth, tokens.editableCellIconButtonHeight, tokens.editableCellPadding, tokens.editableCellInputBorderRadius, tokens.editableCellInputPadding, tokens.editableCellInputBackground, tokens.filterCheckboxPadding, tokens.filterDividerMargin, tokens.buttonHeight, tokens.buttonFontFamily, tokens.buttonFontSize, tokens.buttonFontStyle, tokens.buttonFontWeight, tokens.buttonLetterSpacing, tokens.buttonLineHeight, tokens.selectPadding, tokens.selectBorderRadius, tokens.selectItemHeight, tokens.selectItemPadding, tokens.selectItemBorderRadius, tokens.selectItemIconMargin, tokens.selectItemIconSize, tokens.selectCellPadding, tokens.selectCellTitleFontFamily, tokens.selectCellTitleFontSize, tokens.selectCellTitleFontStyle, tokens.selectCellTitleFontWeight, tokens.selectCellTitleLetterSpacing, tokens.selectCellTitleLineHeight, tokens.selectCheckboxTriggerSize, tokens.selectCheckboxTriggerBorderRadius, tokens.selectCheckboxTriggerBorderWidth, tokens.selectCheckboxTriggerBorderCheckedColor, tokens.selectControlPanelPadding, tokens.selectControlPanelGap, tokens.linkButtonFontFamily, tokens.linkButtonFontSize, tokens.linkButtonFontStyle, tokens.linkButtonFontWeight, tokens.linkButtonLetterSpacing, tokens.linkButtonLineHeight)
|
17
17
|
}
|
18
18
|
}
|
19
19
|
};
|
@@ -17,7 +17,7 @@ const views = ['default', 'positive', 'negative'];
|
|
17
17
|
const closeIconTypes = ['default', 'thin'];
|
18
18
|
|
19
19
|
const meta: Meta<typeof ToastController> = {
|
20
|
-
title: 'b2c/Overlay/Toast',
|
20
|
+
title: 'b2c/Overlay/Toast (Legacy)',
|
21
21
|
decorators: [WithTheme],
|
22
22
|
argTypes: {
|
23
23
|
view: {
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import { css } from 'styled-components';
|
2
|
+
import { toastNewTokens as toastTokens } from "../../../../components/Toast/ToastNew";
|
3
|
+
export var config = {
|
4
|
+
defaults: {
|
5
|
+
view: 'default',
|
6
|
+
size: 'm'
|
7
|
+
},
|
8
|
+
variations: {
|
9
|
+
view: {
|
10
|
+
"default": /*#__PURE__*/css(["", ":var(--text-primary);", ":var(--surface-solid-card-brightness);", ":var(--text-secondary);", ":var(--text-secondary);"], toastTokens.color, toastTokens.background, toastTokens.closeIconColor, toastTokens.closeIconColorOnHover)
|
11
|
+
},
|
12
|
+
size: {
|
13
|
+
m: /*#__PURE__*/css(["", ":0.75rem;", ":calc(100vw - 5rem);", ":0.5625rem 0.75rem;", ":1rem;", ":1rem;", ":-0.0625rem -0.25rem -0.0625rem 0.5rem;", ":-0.0625rem 0.375rem -0.0625rem -0.125rem;", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);"], toastTokens.borderRadius, toastTokens.maxWidth, toastTokens.padding, toastTokens.closeIconSize, toastTokens.closeIconButtonSize, toastTokens.closeIconMargin, toastTokens.contentLeftMargin, toastTokens.fontFamily, toastTokens.fontSize, toastTokens.fontStyle, toastTokens.fontWeight, toastTokens.letterSpacing, toastTokens.lineHeight)
|
14
|
+
},
|
15
|
+
pilled: {
|
16
|
+
"true": /*#__PURE__*/css(["", ":1.5rem;", ":-0.0625rem 0.375rem -0.0625rem -0.25rem;", ":-0.0625rem -0.25rem -0.0625rem 0.375rem;"], toastTokens.borderRadius, toastTokens.contentLeftMargin, toastTokens.closeIconMargin)
|
17
|
+
}
|
18
|
+
}
|
19
|
+
};
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import { toastContainerConfig, showToast } from "../../../../components/Toast/ToastNew";
|
2
|
+
import { component, mergeConfig } from "../../../../engines";
|
3
|
+
import { config } from "./Toast.config";
|
4
|
+
var mergedConfig = /*#__PURE__*/mergeConfig(toastContainerConfig, config);
|
5
|
+
export var ToastContainer = /*#__PURE__*/component(mergedConfig);
|
6
|
+
export { showToast };
|
@@ -0,0 +1,90 @@
|
|
1
|
+
import React, { ComponentProps } from 'react';
|
2
|
+
import type { StoryObj, Meta } from '@storybook/react';
|
3
|
+
|
4
|
+
import { WithTheme } from '../../../_helpers';
|
5
|
+
import { IconDone } from '../../../../components/_Icon';
|
6
|
+
import { Button } from '../Button/Button';
|
7
|
+
|
8
|
+
import { ToastContainer, showToast } from './ToastNew';
|
9
|
+
|
10
|
+
const views = ['default'];
|
11
|
+
const sizes = ['m'];
|
12
|
+
const positions = ['top-left', 'top-center', 'top-right', 'bottom-left', 'bottom-center', 'bottom-right'];
|
13
|
+
|
14
|
+
const meta: Meta<typeof ToastContainer> = {
|
15
|
+
title: 'b2c/Overlay/Toast',
|
16
|
+
component: ToastContainer,
|
17
|
+
decorators: [WithTheme],
|
18
|
+
argTypes: {
|
19
|
+
view: {
|
20
|
+
options: views,
|
21
|
+
control: {
|
22
|
+
type: 'select',
|
23
|
+
},
|
24
|
+
},
|
25
|
+
size: {
|
26
|
+
options: sizes,
|
27
|
+
control: {
|
28
|
+
type: 'select',
|
29
|
+
},
|
30
|
+
},
|
31
|
+
pilled: {
|
32
|
+
control: { type: 'boolean' },
|
33
|
+
},
|
34
|
+
hasClose: {
|
35
|
+
control: { type: 'boolean' },
|
36
|
+
},
|
37
|
+
enableContentLeft: {
|
38
|
+
control: { type: 'boolean' },
|
39
|
+
},
|
40
|
+
width: {
|
41
|
+
control: { type: 'text' },
|
42
|
+
},
|
43
|
+
textColor: {
|
44
|
+
control: { type: 'text' },
|
45
|
+
},
|
46
|
+
duration: {
|
47
|
+
control: { type: 'number' },
|
48
|
+
},
|
49
|
+
position: {
|
50
|
+
options: positions,
|
51
|
+
control: {
|
52
|
+
type: 'select',
|
53
|
+
},
|
54
|
+
},
|
55
|
+
gap: {
|
56
|
+
control: { type: 'number' },
|
57
|
+
},
|
58
|
+
},
|
59
|
+
};
|
60
|
+
|
61
|
+
export default meta;
|
62
|
+
|
63
|
+
type StoryPropsDefault = ComponentProps<typeof ToastContainer> & {
|
64
|
+
enableContentLeft?: boolean;
|
65
|
+
};
|
66
|
+
|
67
|
+
const StoryDefault = (args: StoryPropsDefault) => {
|
68
|
+
const handleShowToast = () => {
|
69
|
+
showToast('Текст всплывающего уведомления');
|
70
|
+
};
|
71
|
+
|
72
|
+
return (
|
73
|
+
<div>
|
74
|
+
<ToastContainer {...args} contentLeft={args.enableContentLeft && <IconDone size="xs" color="inherit" />} />
|
75
|
+
|
76
|
+
<Button onClick={handleShowToast}>Показать тост</Button>
|
77
|
+
</div>
|
78
|
+
);
|
79
|
+
};
|
80
|
+
|
81
|
+
export const Default: StoryObj<StoryPropsDefault> = {
|
82
|
+
args: {
|
83
|
+
view: 'default',
|
84
|
+
size: 'm',
|
85
|
+
pilled: false,
|
86
|
+
hasClose: true,
|
87
|
+
enableContentLeft: true,
|
88
|
+
},
|
89
|
+
render: StoryDefault,
|
90
|
+
};
|
@@ -4,10 +4,10 @@ import { createConditionalComponent } from "../../../../utils/createConditionalC
|
|
4
4
|
import { config } from "./Checkbox.config";
|
5
5
|
import { config as outlineConfig } from "./Checkbox.outline.config";
|
6
6
|
var mergedConfigDefault = /*#__PURE__*/mergeConfig(checkboxConfig, config);
|
7
|
-
export var
|
7
|
+
export var CheckboxDefault = /*#__PURE__*/component(mergedConfigDefault);
|
8
8
|
var mergedConfigOutline = /*#__PURE__*/mergeConfig(checkboxConfig, outlineConfig);
|
9
9
|
export var CheckboxOutline = /*#__PURE__*/component(mergedConfigOutline);
|
10
|
-
export var Checkbox = /*#__PURE__*/createConditionalComponent(
|
10
|
+
export var Checkbox = /*#__PURE__*/createConditionalComponent(CheckboxDefault, [{
|
11
11
|
conditions: {
|
12
12
|
prop: 'appearance',
|
13
13
|
value: 'outline'
|
@@ -4,10 +4,10 @@ import { createConditionalComponent } from "../../../../utils/createConditionalC
|
|
4
4
|
import { config } from "./Radiobox.config";
|
5
5
|
import { config as outlineConfig } from "./Radiobox.outline.config";
|
6
6
|
var mergedConfigDefault = /*#__PURE__*/mergeConfig(radioboxConfig, config);
|
7
|
-
export var
|
7
|
+
export var RadioboxDefault = /*#__PURE__*/component(mergedConfigDefault);
|
8
8
|
var mergedConfigOutline = /*#__PURE__*/mergeConfig(radioboxConfig, outlineConfig);
|
9
9
|
export var RadioboxOutline = /*#__PURE__*/component(mergedConfigOutline);
|
10
|
-
export var Radiobox = /*#__PURE__*/createConditionalComponent(
|
10
|
+
export var Radiobox = /*#__PURE__*/createConditionalComponent(RadioboxDefault, [{
|
11
11
|
conditions: {
|
12
12
|
prop: 'appearance',
|
13
13
|
value: 'outline'
|
@@ -7,6 +7,10 @@ export var config = {
|
|
7
7
|
variations: {
|
8
8
|
view: {
|
9
9
|
"default": /*#__PURE__*/css(["", ":var(--overlay-soft);", ":var(--overlay-blur);", ":var(--surface-solid-card);", ":var(--surface-solid-tertiary);"], sheetTokens.sheetOverlayColor, sheetTokens.sheetOverlayWithBlurColor, sheetTokens.contentBackgroundColor, sheetTokens.handleBackgroundColor)
|
10
|
+
},
|
11
|
+
handlePlacement: {
|
12
|
+
inner: /*#__PURE__*/css(["", ":-2.375rem;"], sheetTokens.handleMarginTop),
|
13
|
+
outer: /*#__PURE__*/css(["", ":-1.375rem;"], sheetTokens.handleMarginTop)
|
10
14
|
}
|
11
15
|
}
|
12
16
|
};
|