@salutejs/plasma-new-hope 0.194.0-canary.1558.11852073996.0 → 0.194.0-canary.1560.11855728487.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (146) hide show
  1. package/cjs/components/Modal/Modal.css +0 -6
  2. package/cjs/components/Modal/Modal.js +13 -27
  3. package/cjs/components/Modal/Modal.js.map +1 -1
  4. package/cjs/components/Modal/Modal.tokens.js +1 -7
  5. package/cjs/components/Modal/Modal.tokens.js.map +1 -1
  6. package/cjs/components/Switch/Switch.css +2 -2
  7. package/cjs/components/Switch/Switch.tokens.js +7 -1
  8. package/cjs/components/Switch/Switch.tokens.js.map +1 -1
  9. package/cjs/components/Switch/_toggleSize/base.js +1 -1
  10. package/cjs/components/Switch/_toggleSize/base.js.map +1 -1
  11. package/cjs/components/Switch/_toggleSize/base_38anc0.css +1 -0
  12. package/cjs/components/Switch/_view/base.js +1 -1
  13. package/cjs/components/Switch/_view/base.js.map +1 -1
  14. package/cjs/components/Switch/_view/base_15atbyp.css +1 -0
  15. package/cjs/index.css +2 -6
  16. package/emotion/cjs/components/Modal/Modal.js +12 -26
  17. package/emotion/cjs/components/Modal/Modal.template-doc.mdx +0 -47
  18. package/emotion/cjs/components/Modal/Modal.tokens.js +1 -7
  19. package/emotion/cjs/components/Switch/Switch.tokens.js +7 -1
  20. package/emotion/cjs/components/Switch/_toggleSize/base.js +1 -1
  21. package/emotion/cjs/components/Switch/_view/base.js +1 -1
  22. package/emotion/cjs/examples/plasma_b2c/components/Modal/Modal.config.js +1 -1
  23. package/emotion/cjs/examples/plasma_b2c/components/Modal/Modal.stories.tsx +1 -90
  24. package/emotion/cjs/examples/plasma_b2c/components/Switch/Switch.config.js +8 -8
  25. package/emotion/cjs/examples/plasma_b2c/components/Switch/Switch.js +5 -2
  26. package/emotion/cjs/examples/plasma_b2c/components/Switch/Switch.outline.config.js +37 -0
  27. package/emotion/cjs/examples/plasma_b2c/components/Switch/Switch.stories.tsx +33 -1
  28. package/emotion/cjs/examples/plasma_web/components/Modal/Modal.config.js +1 -1
  29. package/emotion/cjs/examples/plasma_web/components/Modal/Modal.stories.tsx +1 -90
  30. package/emotion/cjs/examples/plasma_web/components/Switch/Switch.config.js +8 -8
  31. package/emotion/cjs/examples/plasma_web/components/Switch/Switch.js +5 -2
  32. package/emotion/cjs/examples/plasma_web/components/Switch/Switch.outline.config.js +37 -0
  33. package/emotion/cjs/examples/plasma_web/components/Switch/Switch.stories.tsx +33 -1
  34. package/emotion/es/components/Modal/Modal.js +12 -26
  35. package/emotion/es/components/Modal/Modal.template-doc.mdx +0 -47
  36. package/emotion/es/components/Modal/Modal.tokens.js +1 -7
  37. package/emotion/es/components/Switch/Switch.tokens.js +7 -1
  38. package/emotion/es/components/Switch/_toggleSize/base.js +1 -1
  39. package/emotion/es/components/Switch/_view/base.js +1 -1
  40. package/emotion/es/examples/plasma_b2c/components/Modal/Modal.config.js +1 -1
  41. package/emotion/es/examples/plasma_b2c/components/Modal/Modal.stories.tsx +1 -90
  42. package/emotion/es/examples/plasma_b2c/components/Switch/Switch.config.js +8 -8
  43. package/emotion/es/examples/plasma_b2c/components/Switch/Switch.js +4 -1
  44. package/emotion/es/examples/plasma_b2c/components/Switch/Switch.outline.config.js +31 -0
  45. package/emotion/es/examples/plasma_b2c/components/Switch/Switch.stories.tsx +33 -1
  46. package/emotion/es/examples/plasma_web/components/Modal/Modal.config.js +1 -1
  47. package/emotion/es/examples/plasma_web/components/Modal/Modal.stories.tsx +1 -90
  48. package/emotion/es/examples/plasma_web/components/Switch/Switch.config.js +8 -8
  49. package/emotion/es/examples/plasma_web/components/Switch/Switch.js +4 -1
  50. package/emotion/es/examples/plasma_web/components/Switch/Switch.outline.config.js +31 -0
  51. package/emotion/es/examples/plasma_web/components/Switch/Switch.stories.tsx +33 -1
  52. package/es/components/Modal/Modal.css +0 -6
  53. package/es/components/Modal/Modal.js +13 -27
  54. package/es/components/Modal/Modal.js.map +1 -1
  55. package/es/components/Modal/Modal.tokens.js +1 -7
  56. package/es/components/Modal/Modal.tokens.js.map +1 -1
  57. package/es/components/Switch/Switch.css +2 -2
  58. package/es/components/Switch/Switch.tokens.js +7 -1
  59. package/es/components/Switch/Switch.tokens.js.map +1 -1
  60. package/es/components/Switch/_toggleSize/base.js +1 -1
  61. package/es/components/Switch/_toggleSize/base.js.map +1 -1
  62. package/es/components/Switch/_toggleSize/base_38anc0.css +1 -0
  63. package/es/components/Switch/_view/base.js +1 -1
  64. package/es/components/Switch/_view/base.js.map +1 -1
  65. package/es/components/Switch/_view/base_15atbyp.css +1 -0
  66. package/es/index.css +2 -6
  67. package/package.json +2 -2
  68. package/styled-components/cjs/components/Modal/Modal.js +12 -26
  69. package/styled-components/cjs/components/Modal/Modal.template-doc.mdx +0 -47
  70. package/styled-components/cjs/components/Modal/Modal.tokens.js +1 -7
  71. package/styled-components/cjs/components/Switch/Switch.tokens.js +7 -1
  72. package/styled-components/cjs/components/Switch/_toggleSize/base.js +1 -1
  73. package/styled-components/cjs/components/Switch/_view/base.js +1 -1
  74. package/styled-components/cjs/examples/plasma_b2c/components/Modal/Modal.config.js +1 -1
  75. package/styled-components/cjs/examples/plasma_b2c/components/Modal/Modal.stories.tsx +1 -90
  76. package/styled-components/cjs/examples/plasma_b2c/components/Switch/Switch.config.js +1 -1
  77. package/styled-components/cjs/examples/plasma_b2c/components/Switch/Switch.js +5 -2
  78. package/styled-components/cjs/examples/plasma_b2c/components/Switch/Switch.outline.config.js +37 -0
  79. package/styled-components/cjs/examples/plasma_b2c/components/Switch/Switch.stories.tsx +33 -1
  80. package/styled-components/cjs/examples/plasma_web/components/Modal/Modal.config.js +1 -1
  81. package/styled-components/cjs/examples/plasma_web/components/Modal/Modal.stories.tsx +1 -90
  82. package/styled-components/cjs/examples/plasma_web/components/Switch/Switch.config.js +1 -1
  83. package/styled-components/cjs/examples/plasma_web/components/Switch/Switch.js +5 -2
  84. package/styled-components/cjs/examples/plasma_web/components/Switch/Switch.outline.config.js +37 -0
  85. package/styled-components/cjs/examples/plasma_web/components/Switch/Switch.stories.tsx +33 -1
  86. package/styled-components/es/components/Modal/Modal.js +12 -26
  87. package/styled-components/es/components/Modal/Modal.template-doc.mdx +0 -47
  88. package/styled-components/es/components/Modal/Modal.tokens.js +1 -7
  89. package/styled-components/es/components/Switch/Switch.tokens.js +7 -1
  90. package/styled-components/es/components/Switch/_toggleSize/base.js +1 -1
  91. package/styled-components/es/components/Switch/_view/base.js +1 -1
  92. package/styled-components/es/examples/plasma_b2c/components/Modal/Modal.config.js +1 -1
  93. package/styled-components/es/examples/plasma_b2c/components/Modal/Modal.stories.tsx +1 -90
  94. package/styled-components/es/examples/plasma_b2c/components/Switch/Switch.config.js +1 -1
  95. package/styled-components/es/examples/plasma_b2c/components/Switch/Switch.js +4 -1
  96. package/styled-components/es/examples/plasma_b2c/components/Switch/Switch.outline.config.js +31 -0
  97. package/styled-components/es/examples/plasma_b2c/components/Switch/Switch.stories.tsx +33 -1
  98. package/styled-components/es/examples/plasma_web/components/Modal/Modal.config.js +1 -1
  99. package/styled-components/es/examples/plasma_web/components/Modal/Modal.stories.tsx +1 -90
  100. package/styled-components/es/examples/plasma_web/components/Switch/Switch.config.js +1 -1
  101. package/styled-components/es/examples/plasma_web/components/Switch/Switch.js +4 -1
  102. package/styled-components/es/examples/plasma_web/components/Switch/Switch.outline.config.js +31 -0
  103. package/styled-components/es/examples/plasma_web/components/Switch/Switch.stories.tsx +33 -1
  104. package/types/components/Modal/Modal.d.ts.map +1 -1
  105. package/types/components/Modal/Modal.tokens.d.ts +0 -6
  106. package/types/components/Modal/Modal.tokens.d.ts.map +1 -1
  107. package/types/components/Modal/Modal.types.d.ts +1 -21
  108. package/types/components/Modal/Modal.types.d.ts.map +1 -1
  109. package/types/components/Modal/index.d.ts +1 -1
  110. package/types/components/Modal/index.d.ts.map +1 -1
  111. package/types/components/Switch/Switch.tokens.d.ts +7 -1
  112. package/types/components/Switch/Switch.tokens.d.ts.map +1 -1
  113. package/types/components/Switch/_toggleSize/base.d.ts.map +1 -1
  114. package/types/components/Switch/_view/base.d.ts.map +1 -1
  115. package/types/examples/plasma_b2c/components/Modal/Modal.config.d.ts.map +1 -1
  116. package/types/examples/plasma_b2c/components/Modal/Modal.d.ts +1 -7
  117. package/types/examples/plasma_b2c/components/Modal/Modal.d.ts.map +1 -1
  118. package/types/examples/plasma_b2c/components/Switch/Switch.config.d.ts.map +1 -1
  119. package/types/examples/plasma_b2c/components/Switch/Switch.d.ts +20 -0
  120. package/types/examples/plasma_b2c/components/Switch/Switch.d.ts.map +1 -1
  121. package/types/examples/plasma_b2c/components/Switch/Switch.outline.config.d.ts +30 -0
  122. package/types/examples/plasma_b2c/components/Switch/Switch.outline.config.d.ts.map +1 -0
  123. package/types/examples/plasma_web/components/Modal/Modal.config.d.ts.map +1 -1
  124. package/types/examples/plasma_web/components/Modal/Modal.d.ts +1 -7
  125. package/types/examples/plasma_web/components/Modal/Modal.d.ts.map +1 -1
  126. package/types/examples/plasma_web/components/Switch/Switch.config.d.ts.map +1 -1
  127. package/types/examples/plasma_web/components/Switch/Switch.d.ts +20 -0
  128. package/types/examples/plasma_web/components/Switch/Switch.d.ts.map +1 -1
  129. package/types/examples/plasma_web/components/Switch/Switch.outline.config.d.ts +30 -0
  130. package/types/examples/plasma_web/components/Switch/Switch.outline.config.d.ts.map +1 -0
  131. package/cjs/components/Modal/Modal.styles.js +0 -27
  132. package/cjs/components/Modal/Modal.styles.js.map +0 -1
  133. package/cjs/components/Modal/Modal.styles_tqsxxy.css +0 -3
  134. package/cjs/components/Switch/_toggleSize/base_6i0904.css +0 -1
  135. package/cjs/components/Switch/_view/base_yxkf3s.css +0 -1
  136. package/emotion/cjs/components/Modal/Modal.styles.js +0 -27
  137. package/emotion/es/components/Modal/Modal.styles.js +0 -20
  138. package/es/components/Modal/Modal.styles.js +0 -21
  139. package/es/components/Modal/Modal.styles.js.map +0 -1
  140. package/es/components/Modal/Modal.styles_tqsxxy.css +0 -3
  141. package/es/components/Switch/_toggleSize/base_6i0904.css +0 -1
  142. package/es/components/Switch/_view/base_yxkf3s.css +0 -1
  143. package/styled-components/cjs/components/Modal/Modal.styles.js +0 -24
  144. package/styled-components/es/components/Modal/Modal.styles.js +0 -17
  145. package/types/components/Modal/Modal.styles.d.ts +0 -5
  146. package/types/components/Modal/Modal.styles.d.ts.map +0 -1
@@ -3,7 +3,6 @@ import styled from 'styled-components';
3
3
  import type { ComponentProps } from 'react';
4
4
  import type { StoryObj, Meta } from '@storybook/react';
5
5
  import { SSRProvider } from '@salutejs/plasma-core';
6
- import { disableProps } from '@salutejs/plasma-sb-utils';
7
6
 
8
7
  import { PopupProvider, popupClasses } from '../Popup/Popup';
9
8
  import { Button } from '../Button/Button';
@@ -19,7 +18,6 @@ export default {
19
18
  docs: { story: { inline: false, iframeHeight: '30rem' } },
20
19
  },
21
20
  argTypes: {
22
- ...disableProps(['hasBody']),
23
21
  placement: {
24
22
  options: [
25
23
  'center',
@@ -77,7 +75,6 @@ type StoryModalProps = ComponentProps<typeof Modal> & {
77
75
  closeOnEsc: boolean;
78
76
  closeOnOverlayClick: boolean;
79
77
  withBlur: boolean;
80
- hasClose?: boolean;
81
78
  };
82
79
 
83
80
  const StyledButton = styled(Button)`
@@ -138,72 +135,6 @@ const StoryModalDemo = ({ placement, offsetX, offsetY, ...rest }: StoryModalProp
138
135
  const [isOpenB, setIsOpenB] = useState(false);
139
136
  const [isOpenC, setIsOpenC] = useState(false);
140
137
 
141
- return (
142
- <SSRProvider>
143
- <StyledWrapper>
144
- <PopupProvider>
145
- <ButtonWrapper>
146
- <StyledButton text="Открыть A" onClick={() => setIsOpenA(true)} />
147
- </ButtonWrapper>
148
- <StyledModal
149
- id="modalA"
150
- frame="theme-root"
151
- withAnimation
152
- onClose={() => setIsOpenA(false)}
153
- opened={isOpenA}
154
- placement={placement}
155
- offset={[offsetX, offsetY]}
156
- hasBody
157
- {...rest}
158
- >
159
- <Button onClick={() => setIsOpenA(false)}>Close</Button>
160
- <ButtonWrapper>
161
- <StyledButton text="Открыть B" onClick={() => setIsOpenB(true)} />
162
- </ButtonWrapper>
163
- <Modal
164
- id="modalB"
165
- frame="theme-root"
166
- onClose={() => setIsOpenB(false)}
167
- opened={isOpenB}
168
- placement="left"
169
- offset={[offsetX, offsetY]}
170
- hasBody
171
- {...rest}
172
- >
173
- <Button style={{ marginRight: '1rem' }} onClick={() => setIsOpenB(false)}>
174
- Close
175
- </Button>
176
- <ButtonWrapper>
177
- <StyledButton text="Открыть C" onClick={() => setIsOpenC(true)} />
178
- </ButtonWrapper>
179
- <Modal
180
- id="modalC"
181
- frame="theme-root"
182
- onClose={() => setIsOpenC(false)}
183
- opened={isOpenC}
184
- placement="top"
185
- offset={[offsetX, offsetY]}
186
- hasBody
187
- {...rest}
188
- >
189
- <Button style={{ marginRight: '1rem' }} onClick={() => setIsOpenC(false)}>
190
- Close
191
- </Button>
192
- <>Content</>
193
- </Modal>
194
- </Modal>
195
- </StyledModal>
196
- </PopupProvider>
197
- </StyledWrapper>
198
- </SSRProvider>
199
- );
200
- };
201
-
202
- const StoryCustomModalDemo = ({ placement, offsetX, offsetY, ...rest }: StoryModalProps) => {
203
- const [isOpenA, setIsOpenA] = useState(false);
204
- const [isOpenB, setIsOpenB] = useState(false);
205
- const [isOpenC, setIsOpenC] = useState(false);
206
-
207
138
  return (
208
139
  <SSRProvider>
209
140
  <StyledWrapper>
@@ -268,7 +199,7 @@ const StoryCustomModalDemo = ({ placement, offsetX, offsetY, ...rest }: StoryMod
268
199
  );
269
200
  };
270
201
 
271
- export const Default: StoryObj<StoryModalProps> = {
202
+ export const ModalDemo: StoryObj<StoryModalProps> = {
272
203
  args: {
273
204
  placement: 'center',
274
205
  withBlur: false,
@@ -276,30 +207,10 @@ export const Default: StoryObj<StoryModalProps> = {
276
207
  closeOnOverlayClick: true,
277
208
  offsetX: 0,
278
209
  offsetY: 0,
279
- hasClose: true,
280
- },
281
- argTypes: {
282
- hasClose: {
283
- control: {
284
- type: 'boolean',
285
- },
286
- },
287
210
  },
288
211
  render: (args) => <StoryModalDemo {...args} />,
289
212
  };
290
213
 
291
- export const CustomModalDemo: StoryObj<StoryModalProps> = {
292
- args: {
293
- placement: 'center',
294
- withBlur: false,
295
- closeOnEsc: true,
296
- closeOnOverlayClick: true,
297
- offsetX: 0,
298
- offsetY: 0,
299
- },
300
- render: (args) => <StoryCustomModalDemo {...args} />,
301
- };
302
-
303
214
  const StyledModalAnimation = styled(Modal)`
304
215
  /* stylelint-disable */
305
216
  && .${popupClasses.root} {
@@ -19,7 +19,7 @@ export var config = {
19
19
  s: /*#__PURE__*/css(["", ":2rem;", ":1.25rem;", ":calc(var(", ") / 2);", ":1rem;", ":calc(var(", ") / 2);", ":0.125rem;", ":1.25;"], switchTokens.trackWidth, switchTokens.trackHeight, switchTokens.trackBorderRadius, switchTokens.trackHeight, switchTokens.thumbSize, switchTokens.thumbBorderRadius, switchTokens.thumbSize, switchTokens.thumbOffset, switchTokens.thumbPressScale)
20
20
  },
21
21
  view: {
22
- "default": /*#__PURE__*/css(["", ":var(--text-primary);", ":var(--text-secondary);", ":var(--surface-accent);", ":var(--surface-accent-hover);", ":var(--surface-transparent-tertiary);", ":var(--surface-transparent-tertiary-hover);", ":var(--on-dark-surface-solid-default);", ":0 1px 1px rgba(0,0,0,0.11);"], switchTokens.labelColor, switchTokens.descriptionColor, switchTokens.trackBackgroundColorOn, switchTokens.trackBackgroundColorOnHover, switchTokens.trackBackgroundColorOff, switchTokens.trackBackgroundColorOffHover, switchTokens.thumbBackgroundColor, switchTokens.thumbBoxShadow)
22
+ "default": /*#__PURE__*/css(["", ":var(--text-primary);", ":var(--text-secondary);", ":var(--surface-accent);", ":var(--surface-accent-hover);", ":var(--surface-transparent-tertiary);", ":var(--surface-transparent-tertiary-hover);", ":0rem;", ":transparent;", ":transparent;", ":transparent;", ":transparent;", ":var(--on-dark-surface-solid-default);", ":var(--on-dark-surface-solid-default);", ":0 1px 1px rgba(0,0,0,0.11);"], switchTokens.labelColor, switchTokens.descriptionColor, switchTokens.trackBackgroundColorOn, switchTokens.trackBackgroundColorOnHover, switchTokens.trackBackgroundColorOff, switchTokens.trackBackgroundColorOffHover, switchTokens.trackBorderWidth, switchTokens.trackBorderColorOff, switchTokens.trackBorderColorOffHover, switchTokens.trackBorderColorOn, switchTokens.trackBorderColorOnHover, switchTokens.thumbBackgroundColorOff, switchTokens.thumbBackgroundColorOn, switchTokens.thumbBoxShadow)
23
23
  },
24
24
  disabled: {
25
25
  "true": /*#__PURE__*/css(["", ":0.4;"], switchTokens.disabledOpacity)
@@ -1,5 +1,8 @@
1
1
  import { switchConfig } from '../../../../components/Switch';
2
2
  import { component, mergeConfig } from '../../../../engines';
3
3
  import { config } from './Switch.config';
4
+ import { config as outlineConfig } from './Switch.outline.config';
4
5
  var mergedConfig = /*#__PURE__*/mergeConfig(switchConfig, config);
5
- export var Switch = /*#__PURE__*/component(mergedConfig);
6
+ export var Switch = /*#__PURE__*/component(mergedConfig);
7
+ var mergedOutlineConfig = /*#__PURE__*/mergeConfig(switchConfig, outlineConfig);
8
+ export var SwitchOutline = /*#__PURE__*/component(mergedOutlineConfig);
@@ -0,0 +1,31 @@
1
+ import { css } from 'styled-components';
2
+ import { switchTokens } from '../../../../components/Switch';
3
+ export var config = {
4
+ defaults: {
5
+ view: 'default',
6
+ size: 'm',
7
+ toggleSize: 'l',
8
+ labelPosition: 'before',
9
+ focused: 'true'
10
+ },
11
+ variations: {
12
+ size: {
13
+ s: /*#__PURE__*/css(["", ":var(--plasma-typo-body-s-font-family);", ":var(--plasma-typo-body-s-font-style);", ":var(--plasma-typo-body-s-font-weight);", ":var(--plasma-typo-body-s-line-height);", ":var(--plasma-typo-body-s-font-size);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-font-weight);", ":var(--plasma-typo-body-xs-line-height);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-letter-spacing);", ":0.25rem;", ":0.75rem;"], switchTokens.fontFamily, switchTokens.fontStyle, switchTokens.fontWeight, switchTokens.lineHeight, switchTokens.fontSize, switchTokens.letterSpacing, switchTokens.descriptionFontFamily, switchTokens.descriptionFontStyle, switchTokens.descriptionFontWeight, switchTokens.descriptionLineHeight, switchTokens.descriptionFontSize, switchTokens.descriptionLetterSpacing, switchTokens.verticalGap, switchTokens.labelOffset),
14
+ m: /*#__PURE__*/css(["", ":var(--plasma-typo-body-m-font-family);", ":var(--plasma-typo-body-m-font-style);", ":var(--plasma-typo-body-m-font-weight);", ":var(--plasma-typo-body-m-line-height);", ":var(--plasma-typo-body-m-font-size);", ":var(--plasma-typo-body-m-letter-spacing);", ":var(--plasma-typo-body-s-font-family);", ":var(--plasma-typo-body-s-font-style);", ":var(--plasma-typo-body-s-font-weight);", ":var(--plasma-typo-body-s-line-height);", ":var(--plasma-typo-body-s-font-size);", ":var(--plasma-typo-body-xs-letter-spacing);", ":0.25rem;", ":0.75rem;"], switchTokens.fontFamily, switchTokens.fontStyle, switchTokens.fontWeight, switchTokens.lineHeight, switchTokens.fontSize, switchTokens.letterSpacing, switchTokens.descriptionFontFamily, switchTokens.descriptionFontStyle, switchTokens.descriptionFontWeight, switchTokens.descriptionLineHeight, switchTokens.descriptionFontSize, switchTokens.descriptionLetterSpacing, switchTokens.verticalGap, switchTokens.labelOffset),
15
+ l: /*#__PURE__*/css(["", ":var(--plasma-typo-body-l-font-family);", ":var(--plasma-typo-body-l-font-style);", ":var(--plasma-typo-body-l-font-weight);", ":var(--plasma-typo-body-l-line-height);", ":var(--plasma-typo-body-l-font-size);", ":var(--plasma-typo-body-l-letter-spacing);", ":var(--plasma-typo-body-m-font-family);", ":var(--plasma-typo-body-m-font-style);", ":var(--plasma-typo-body-m-font-weight);", ":var(--plasma-typo-body-m-line-height);", ":var(--plasma-typo-body-m-font-size);", ":var(--plasma-typo-body-xs-letter-spacing);", ":0.25rem;", ":0.75rem;"], switchTokens.fontFamily, switchTokens.fontStyle, switchTokens.fontWeight, switchTokens.lineHeight, switchTokens.fontSize, switchTokens.letterSpacing, switchTokens.descriptionFontFamily, switchTokens.descriptionFontStyle, switchTokens.descriptionFontWeight, switchTokens.descriptionLineHeight, switchTokens.descriptionFontSize, switchTokens.descriptionLetterSpacing, switchTokens.verticalGap, switchTokens.labelOffset)
16
+ },
17
+ toggleSize: {
18
+ l: /*#__PURE__*/css(["", ":2.75rem;", ":1.75rem;", ":calc(var(", ") / 2);", ":1.5rem;", ":calc(var(", ") / 2);", ":0.125rem;", ":1.25;"], switchTokens.trackWidth, switchTokens.trackHeight, switchTokens.trackBorderRadius, switchTokens.trackHeight, switchTokens.thumbSize, switchTokens.thumbBorderRadius, switchTokens.thumbSize, switchTokens.thumbOffset, switchTokens.thumbPressScale),
19
+ s: /*#__PURE__*/css(["", ":2rem;", ":1.25rem;", ":calc(var(", ") / 2);", ":1rem;", ":calc(var(", ") / 2);", ":0.125rem;", ":1.25;"], switchTokens.trackWidth, switchTokens.trackHeight, switchTokens.trackBorderRadius, switchTokens.trackHeight, switchTokens.thumbSize, switchTokens.thumbBorderRadius, switchTokens.thumbSize, switchTokens.thumbOffset, switchTokens.thumbPressScale)
20
+ },
21
+ view: {
22
+ "default": /*#__PURE__*/css(["", ":var(--text-primary);", ":var(--text-secondary);", ":transparent;", ":transparent;", ":transparent;", ":transparent;", ":0.0625rem;", ":var(--outline-secondary);", ":var(--outline-secondary-hover);", ":var(--outline-accent);", ":var(--outline-accent-hover);", ":var(--text-tertiary);", ":var(--text-accent);", ":0 1px 1px rgba(0,0,0,0.11);"], switchTokens.labelColor, switchTokens.descriptionColor, switchTokens.trackBackgroundColorOn, switchTokens.trackBackgroundColorOnHover, switchTokens.trackBackgroundColorOff, switchTokens.trackBackgroundColorOffHover, switchTokens.trackBorderWidth, switchTokens.trackBorderColorOff, switchTokens.trackBorderColorOffHover, switchTokens.trackBorderColorOn, switchTokens.trackBorderColorOnHover, switchTokens.thumbBackgroundColorOff, switchTokens.thumbBackgroundColorOn, switchTokens.thumbBoxShadow)
23
+ },
24
+ disabled: {
25
+ "true": /*#__PURE__*/css(["", ":0.4;"], switchTokens.disabledOpacity)
26
+ },
27
+ focused: {
28
+ "true": /*#__PURE__*/css(["", ":var(--surface-accent);"], switchTokens.trackFocusColor)
29
+ }
30
+ }
31
+ };
@@ -9,7 +9,7 @@ import { mergeConfig } from '../../../../engines';
9
9
  import { WithTheme, argTypesFromConfig } from '../../../_helpers';
10
10
 
11
11
  import { config } from './Switch.config';
12
- import { Switch } from './Switch';
12
+ import { Switch, SwitchOutline } from './Switch';
13
13
 
14
14
  type SwitchProps = ComponentProps<typeof Switch>;
15
15
 
@@ -72,3 +72,35 @@ export const Default: StoryObj<SwitchProps> = {
72
72
  },
73
73
  render: (args) => <StoryDefault {...args} />,
74
74
  };
75
+
76
+ const StoryOutline = (args: SwitchProps) => {
77
+ const value = 'yes';
78
+ const name = 'agree';
79
+ const [checked, setChecked] = useState(true);
80
+
81
+ return (
82
+ <StyledWrapper>
83
+ <SwitchOutline
84
+ value={value}
85
+ name={name}
86
+ checked={checked}
87
+ onChange={(event) => {
88
+ setChecked(event.target.checked);
89
+ onChange(event);
90
+ }}
91
+ onFocus={onFocus}
92
+ onBlur={onBlur}
93
+ {...args}
94
+ />
95
+ </StyledWrapper>
96
+ );
97
+ };
98
+
99
+ export const Outline: StoryObj<SwitchProps> = {
100
+ args: {
101
+ size: 'm',
102
+ toggleSize: 'l',
103
+ disabled: false,
104
+ },
105
+ render: (args) => <StoryOutline {...args} />,
106
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/Modal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2C,MAAM,OAAO,CAAC;AAGhE,OAAO,EAAE,SAAS,EAAa,MAAM,eAAe,CAAC;AAQrD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAS3C;;;GAGG;AACH,eAAO,MAAM,SAAS,SAAU,UAAU,cAAc,EAAE,UAAU,CAAC,sFA6GhE,CAAC;AAEN,eAAO,MAAM,WAAW;;;mBA/GQ,UAAU,cAAc,EAAE,UAAU,CAAC;;;;;;;;;;CA4HpE,CAAC"}
1
+ {"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/Modal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2C,MAAM,OAAO,CAAC;AAGhE,OAAO,EAAE,SAAS,EAAa,MAAM,eAAe,CAAC;AAOrD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAQ3C;;;GAGG;AACH,eAAO,MAAM,SAAS,SAAU,UAAU,cAAc,EAAE,UAAU,CAAC,sFA2FhE,CAAC;AAEN,eAAO,MAAM,WAAW;;;mBA7FQ,UAAU,cAAc,EAAE,UAAU,CAAC;;;;;;;;;;CA0GpE,CAAC"}
@@ -4,11 +4,5 @@ export declare const classes: {
4
4
  export declare const tokens: {
5
5
  modalOverlayWithBlurColor: string;
6
6
  modalOverlayColor: string;
7
- modalBodyBackground: string;
8
- modalBodyBorderRadius: string;
9
- modalBodyPadding: string;
10
- modalContentPadding: string;
11
- modalOutlineFocusColor: string;
12
- modalCloseButtonRadius: string;
13
7
  };
14
8
  //# sourceMappingURL=Modal.tokens.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Modal.tokens.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/Modal.tokens.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO;;CAKnB,CAAC;AAEF,eAAO,MAAM,MAAM;;;;;;;;;CASlB,CAAC"}
1
+ {"version":3,"file":"Modal.tokens.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/Modal.tokens.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO;;CAKnB,CAAC;AAEF,eAAO,MAAM,MAAM;;;CAGlB,CAAC"}
@@ -1,25 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { PopupHookArgs, PopupProps, PopupRootProps } from '../Popup/Popup.types';
3
- export declare type ModalBodyProps = {
4
- /**
5
- * Оборачивает children в стилизованную обертку
6
- */
7
- hasBody: true;
8
- /**
9
- * Отображает кнопку с крестиком для закрытия
10
- */
11
- hasClose?: never | boolean;
12
- } | {
13
- /**
14
- * Оборачивает children в стилизованную обертку
15
- */
16
- hasBody?: never | false;
17
- /**
18
- * Отображает кнопку с крестиком для закрытия
19
- */
20
- hasClose?: never;
21
- };
22
- export interface CommonModalProps extends PopupProps {
3
+ export interface ModalProps extends PopupProps {
23
4
  /**
24
5
  * Нужно ли применять blur для подложки.
25
6
  */
@@ -55,7 +36,6 @@ export interface CommonModalProps extends PopupProps {
55
36
  onClose?: () => void;
56
37
  view?: string;
57
38
  }
58
- export declare type ModalProps = CommonModalProps & ModalBodyProps;
59
39
  export declare type ModalBaseRootProps = PopupRootProps & Pick<ModalProps, 'initialFocusRef' | 'focusAfterRef' | 'onClose'>;
60
40
  export declare type ModalOverlayProps = Pick<PopupRootProps, 'id' | 'zIndex'> & Pick<ModalProps, 'withBlur' | 'closeOnOverlayClick' | 'onOverlayClick' | 'onClose'>;
61
41
  export declare type ModalHookArgs = Pick<PopupHookArgs, 'id' | 'popupInfo' | 'isOpen'> & Pick<ModalProps, 'closeOnEsc' | 'onEscKeyDown' | 'onClose'>;
@@ -1 +1 @@
1
- {"version":3,"file":"Modal.types.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/Modal.types.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEjF,oBAAY,cAAc,GACpB;IACI;;OAEG;IACH,OAAO,EAAE,IAAI,CAAC;IACd;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,GAAG,OAAO,CAAC;CAC9B,GACD;IACI;;OAEG;IACH,OAAO,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC;IACxB;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC;CACpB,CAAC;AAER,MAAM,WAAW,gBAAiB,SAAQ,UAAU;IAChD;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;;OAEG;IACH,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IAC9C;;OAEG;IACH,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,cAAc,CAAC,KAAK,IAAI,CAAC;IACnE;;OAEG;IACH,eAAe,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IAC/C;;;OAGG;IACH,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IAC7C;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,oBAAY,UAAU,GAAG,gBAAgB,GAAG,cAAc,CAAC;AAE3D,oBAAY,kBAAkB,GAAG,cAAc,GAAG,IAAI,CAAC,UAAU,EAAE,iBAAiB,GAAG,eAAe,GAAG,SAAS,CAAC,CAAC;AAEpH,oBAAY,iBAAiB,GAAG,IAAI,CAAC,cAAc,EAAE,IAAI,GAAG,QAAQ,CAAC,GACjE,IAAI,CAAC,UAAU,EAAE,UAAU,GAAG,qBAAqB,GAAG,gBAAgB,GAAG,SAAS,CAAC,CAAC;AAExF,oBAAY,aAAa,GAAG,IAAI,CAAC,aAAa,EAAE,IAAI,GAAG,WAAW,GAAG,QAAQ,CAAC,GAC1E,IAAI,CAAC,UAAU,EAAE,YAAY,GAAG,cAAc,GAAG,SAAS,CAAC,CAAC"}
1
+ {"version":3,"file":"Modal.types.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/Modal.types.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEjF,MAAM,WAAW,UAAW,SAAQ,UAAU;IAC1C;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;;OAEG;IACH,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IAC9C;;OAEG;IACH,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,cAAc,CAAC,KAAK,IAAI,CAAC;IACnE;;OAEG;IACH,eAAe,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IAC/C;;;OAGG;IACH,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IAC7C;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,oBAAY,kBAAkB,GAAG,cAAc,GAAG,IAAI,CAAC,UAAU,EAAE,iBAAiB,GAAG,eAAe,GAAG,SAAS,CAAC,CAAC;AAEpH,oBAAY,iBAAiB,GAAG,IAAI,CAAC,cAAc,EAAE,IAAI,GAAG,QAAQ,CAAC,GACjE,IAAI,CAAC,UAAU,EAAE,UAAU,GAAG,qBAAqB,GAAG,gBAAgB,GAAG,SAAS,CAAC,CAAC;AAExF,oBAAY,aAAa,GAAG,IAAI,CAAC,aAAa,EAAE,IAAI,GAAG,WAAW,GAAG,QAAQ,CAAC,GAC1E,IAAI,CAAC,UAAU,EAAE,YAAY,GAAG,cAAc,GAAG,SAAS,CAAC,CAAC"}
@@ -1,4 +1,4 @@
1
1
  export { modalConfig, modalRoot } from './Modal';
2
2
  export { classes as modalClasses, tokens as modalTokens } from './Modal.tokens';
3
- export type { ModalBodyProps, CommonModalProps, ModalProps, ModalOverlayProps } from './Modal.types';
3
+ export type { ModalProps, ModalOverlayProps } from './Modal.types';
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,IAAI,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAChF,YAAY,EAAE,cAAc,EAAE,gBAAgB,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,IAAI,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAChF,YAAY,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC"}
@@ -20,6 +20,11 @@ export declare const tokens: {
20
20
  verticalGap: string;
21
21
  trackWidth: string;
22
22
  trackHeight: string;
23
+ trackBorderWidth: string;
24
+ trackBorderColorOn: string;
25
+ trackBorderColorOnHover: string;
26
+ trackBorderColorOff: string;
27
+ trackBorderColorOffHover: string;
23
28
  trackBorderRadius: string;
24
29
  trackBackgroundColorOn: string;
25
30
  trackBackgroundColorOnHover: string;
@@ -30,7 +35,8 @@ export declare const tokens: {
30
35
  thumbOffset: string;
31
36
  thumbBorderRadius: string;
32
37
  thumbPressScale: string;
33
- thumbBackgroundColor: string;
38
+ thumbBackgroundColorOn: string;
39
+ thumbBackgroundColorOff: string;
34
40
  thumbBoxShadow: string;
35
41
  thumbBoxShadowOn: string;
36
42
  labelOffsetPrivate: string;
@@ -1 +1 @@
1
- {"version":3,"file":"Switch.tokens.d.ts","sourceRoot":"","sources":["../../../src/components/Switch/Switch.tokens.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;IAwBf,6DAA6D;;;;;;;;;;;;;;;;;;;CA0BhE,CAAC;AAEF,eAAO,MAAM,OAAO;;;CAGnB,CAAC"}
1
+ {"version":3,"file":"Switch.tokens.d.ts","sourceRoot":"","sources":["../../../src/components/Switch/Switch.tokens.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;IAwBf,6DAA6D;;;;;;;;;;;;;;;;;;;;;;;;;CAiChE,CAAC;AAEF,eAAO,MAAM,OAAO;;;CAGnB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../../src/components/Switch/_toggleSize/base.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,IAAI,0CAkBhB,CAAC"}
1
+ {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../../src/components/Switch/_toggleSize/base.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,IAAI,0CAyBhB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../../src/components/Switch/_view/base.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,IAAI,0CAiChB,CAAC"}
1
+ {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../../src/components/Switch/_view/base.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,IAAI,0CAsChB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Modal.config.d.ts","sourceRoot":"","sources":["../../../../../src/examples/plasma_b2c/components/Modal/Modal.config.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,MAAM;;;;;;;;;CAkBlB,CAAC"}
1
+ {"version":3,"file":"Modal.config.d.ts","sourceRoot":"","sources":["../../../../../src/examples/plasma_b2c/components/Modal/Modal.config.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,MAAM;;;;;;;;;CAYlB,CAAC"}
@@ -4,11 +4,5 @@ export declare const Modal: import("react").FunctionComponent<import("../../../.
4
4
  view: {
5
5
  default: import("@linaria/core").LinariaClassName;
6
6
  };
7
- }> & ((import("../../../../components/Modal").CommonModalProps & {
8
- hasBody: true;
9
- hasClose?: boolean | undefined;
10
- } & import("react").RefAttributes<HTMLDivElement>) | (import("../../../../components/Modal").CommonModalProps & {
11
- hasBody?: false | undefined;
12
- hasClose?: undefined;
13
- } & import("react").RefAttributes<HTMLDivElement>))>;
7
+ }> & import("../../../../components/Modal").ModalProps & import("react").RefAttributes<HTMLDivElement>>;
14
8
  //# sourceMappingURL=Modal.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../../../../src/examples/plasma_b2c/components/Modal/Modal.ts"],"names":[],"mappings":";AAKA,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAI5D,eAAO,MAAM,KAAK;;;;;;;;;;oDAA0B,CAAC"}
1
+ {"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../../../../src/examples/plasma_b2c/components/Modal/Modal.ts"],"names":[],"mappings":";AAKA,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAI5D,eAAO,MAAM,KAAK;;;;uGAA0B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Switch.config.d.ts","sourceRoot":"","sources":["../../../../../src/examples/plasma_b2c/components/Switch/Switch.config.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsGlB,CAAC"}
1
+ {"version":3,"file":"Switch.config.d.ts","sourceRoot":"","sources":["../../../../../src/examples/plasma_b2c/components/Switch/Switch.config.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4GlB,CAAC"}
@@ -19,4 +19,24 @@ export declare const Switch: import("react").FunctionComponent<import("../../../
19
19
  true: import("@linaria/core").LinariaClassName;
20
20
  };
21
21
  }> & import("../../../../components/Switch").SwitchProps & import("react").RefAttributes<HTMLInputElement>>;
22
+ export declare const SwitchOutline: import("react").FunctionComponent<import("../../../../engines/types").PropsType<{
23
+ size: {
24
+ s: import("@linaria/core").LinariaClassName;
25
+ m: import("@linaria/core").LinariaClassName;
26
+ l: import("@linaria/core").LinariaClassName;
27
+ };
28
+ toggleSize: {
29
+ l: import("@linaria/core").LinariaClassName;
30
+ s: import("@linaria/core").LinariaClassName;
31
+ };
32
+ view: {
33
+ default: import("@linaria/core").LinariaClassName;
34
+ };
35
+ disabled: {
36
+ true: import("@linaria/core").LinariaClassName;
37
+ };
38
+ focused: {
39
+ true: import("@linaria/core").LinariaClassName;
40
+ };
41
+ }> & import("../../../../components/Switch").SwitchProps & import("react").RefAttributes<HTMLInputElement>>;
22
42
  //# sourceMappingURL=Switch.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Switch.d.ts","sourceRoot":"","sources":["../../../../../src/examples/plasma_b2c/components/Switch/Switch.ts"],"names":[],"mappings":";AAOA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;2GAA0B,CAAC"}
1
+ {"version":3,"file":"Switch.d.ts","sourceRoot":"","sources":["../../../../../src/examples/plasma_b2c/components/Switch/Switch.ts"],"names":[],"mappings":";AAQA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;2GAA0B,CAAC;AAI9C,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;2GAAiC,CAAC"}
@@ -0,0 +1,30 @@
1
+ export declare const config: {
2
+ defaults: {
3
+ view: string;
4
+ size: string;
5
+ toggleSize: string;
6
+ labelPosition: string;
7
+ focused: string;
8
+ };
9
+ variations: {
10
+ size: {
11
+ s: import("@linaria/core").LinariaClassName;
12
+ m: import("@linaria/core").LinariaClassName;
13
+ l: import("@linaria/core").LinariaClassName;
14
+ };
15
+ toggleSize: {
16
+ l: import("@linaria/core").LinariaClassName;
17
+ s: import("@linaria/core").LinariaClassName;
18
+ };
19
+ view: {
20
+ default: import("@linaria/core").LinariaClassName;
21
+ };
22
+ disabled: {
23
+ true: import("@linaria/core").LinariaClassName;
24
+ };
25
+ focused: {
26
+ true: import("@linaria/core").LinariaClassName;
27
+ };
28
+ };
29
+ };
30
+ //# sourceMappingURL=Switch.outline.config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Switch.outline.config.d.ts","sourceRoot":"","sources":["../../../../../src/examples/plasma_b2c/components/Switch/Switch.outline.config.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4GlB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Modal.config.d.ts","sourceRoot":"","sources":["../../../../../src/examples/plasma_web/components/Modal/Modal.config.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,MAAM;;;;;;;;;CAkBlB,CAAC"}
1
+ {"version":3,"file":"Modal.config.d.ts","sourceRoot":"","sources":["../../../../../src/examples/plasma_web/components/Modal/Modal.config.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,MAAM;;;;;;;;;CAYlB,CAAC"}
@@ -4,11 +4,5 @@ export declare const Modal: import("react").FunctionComponent<import("../../../.
4
4
  view: {
5
5
  default: import("@linaria/core").LinariaClassName;
6
6
  };
7
- }> & ((import("../../../../components/Modal").CommonModalProps & {
8
- hasBody: true;
9
- hasClose?: boolean | undefined;
10
- } & import("react").RefAttributes<HTMLDivElement>) | (import("../../../../components/Modal").CommonModalProps & {
11
- hasBody?: false | undefined;
12
- hasClose?: undefined;
13
- } & import("react").RefAttributes<HTMLDivElement>))>;
7
+ }> & import("../../../../components/Modal").ModalProps & import("react").RefAttributes<HTMLDivElement>>;
14
8
  //# sourceMappingURL=Modal.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../../../../src/examples/plasma_web/components/Modal/Modal.ts"],"names":[],"mappings":";AAKA,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAI5D,eAAO,MAAM,KAAK;;;;;;;;;;oDAA0B,CAAC"}
1
+ {"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../../../../src/examples/plasma_web/components/Modal/Modal.ts"],"names":[],"mappings":";AAKA,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAI5D,eAAO,MAAM,KAAK;;;;uGAA0B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Switch.config.d.ts","sourceRoot":"","sources":["../../../../../src/examples/plasma_web/components/Switch/Switch.config.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsGlB,CAAC"}
1
+ {"version":3,"file":"Switch.config.d.ts","sourceRoot":"","sources":["../../../../../src/examples/plasma_web/components/Switch/Switch.config.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4GlB,CAAC"}
@@ -19,4 +19,24 @@ export declare const Switch: import("react").FunctionComponent<import("../../../
19
19
  true: import("@linaria/core").LinariaClassName;
20
20
  };
21
21
  }> & import("../../../../components/Switch").SwitchProps & import("react").RefAttributes<HTMLInputElement>>;
22
+ export declare const SwitchOutline: import("react").FunctionComponent<import("../../../../engines/types").PropsType<{
23
+ size: {
24
+ s: import("@linaria/core").LinariaClassName;
25
+ m: import("@linaria/core").LinariaClassName;
26
+ l: import("@linaria/core").LinariaClassName;
27
+ };
28
+ toggleSize: {
29
+ l: import("@linaria/core").LinariaClassName;
30
+ s: import("@linaria/core").LinariaClassName;
31
+ };
32
+ view: {
33
+ default: import("@linaria/core").LinariaClassName;
34
+ };
35
+ disabled: {
36
+ true: import("@linaria/core").LinariaClassName;
37
+ };
38
+ focused: {
39
+ true: import("@linaria/core").LinariaClassName;
40
+ };
41
+ }> & import("../../../../components/Switch").SwitchProps & import("react").RefAttributes<HTMLInputElement>>;
22
42
  //# sourceMappingURL=Switch.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Switch.d.ts","sourceRoot":"","sources":["../../../../../src/examples/plasma_web/components/Switch/Switch.ts"],"names":[],"mappings":";AAOA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;2GAA0B,CAAC"}
1
+ {"version":3,"file":"Switch.d.ts","sourceRoot":"","sources":["../../../../../src/examples/plasma_web/components/Switch/Switch.ts"],"names":[],"mappings":";AAQA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;2GAA0B,CAAC;AAI9C,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;2GAAiC,CAAC"}
@@ -0,0 +1,30 @@
1
+ export declare const config: {
2
+ defaults: {
3
+ view: string;
4
+ size: string;
5
+ toggleSize: string;
6
+ labelPosition: string;
7
+ focused: string;
8
+ };
9
+ variations: {
10
+ size: {
11
+ s: import("@linaria/core").LinariaClassName;
12
+ m: import("@linaria/core").LinariaClassName;
13
+ l: import("@linaria/core").LinariaClassName;
14
+ };
15
+ toggleSize: {
16
+ l: import("@linaria/core").LinariaClassName;
17
+ s: import("@linaria/core").LinariaClassName;
18
+ };
19
+ view: {
20
+ default: import("@linaria/core").LinariaClassName;
21
+ };
22
+ disabled: {
23
+ true: import("@linaria/core").LinariaClassName;
24
+ };
25
+ focused: {
26
+ true: import("@linaria/core").LinariaClassName;
27
+ };
28
+ };
29
+ };
30
+ //# sourceMappingURL=Switch.outline.config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Switch.outline.config.d.ts","sourceRoot":"","sources":["../../../../../src/examples/plasma_web/components/Switch/Switch.outline.config.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4GlB,CAAC"}
@@ -1,27 +0,0 @@
1
- import './Modal.styles_tqsxxy.css';
2
- 'use strict';
3
-
4
- Object.defineProperty(exports, '__esModule', { value: true });
5
-
6
- var react = require('@linaria/react');
7
-
8
- var ModalBody = /*#__PURE__*/react.styled('div')({
9
- name: "ModalBody",
10
- "class": "m7npn1w",
11
- propsAsIs: false
12
- });
13
- var ModalContent = /*#__PURE__*/react.styled('div')({
14
- name: "ModalContent",
15
- "class": "m16phoaz",
16
- propsAsIs: false
17
- });
18
- var CloseButton = /*#__PURE__*/react.styled('button')({
19
- name: "CloseButton",
20
- "class": "c5bx5hr",
21
- propsAsIs: false
22
- });
23
-
24
- exports.CloseButton = CloseButton;
25
- exports.ModalBody = ModalBody;
26
- exports.ModalContent = ModalContent;
27
- //# sourceMappingURL=Modal.styles.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Modal.styles.js","sources":["../../../src/components/Modal/Modal.styles.ts"],"sourcesContent":["import { styled } from '@linaria/react';\n\nimport { addFocus } from '../../mixins';\n\nimport { tokens } from './Modal.tokens';\n\nexport const ModalBody = styled.div`\n border-radius: var(${tokens.modalBodyBorderRadius});\n padding: var(${tokens.modalBodyPadding});\n background: var(${tokens.modalBodyBackground});\n box-shadow: var(--shadow-down-soft-l);\n`;\n\nexport const ModalContent = styled.div`\n position: relative;\n padding: var(${tokens.modalContentPadding});\n`;\n\nexport const CloseButton = styled.button`\n top: 0;\n right: 0;\n\n width: 1.5rem;\n height: 1.5rem;\n\n display: flex;\n align-items: center;\n justify-content: center;\n\n border: none;\n border-radius: var(${tokens.modalCloseButtonRadius});\n\n padding: 0;\n margin: 0;\n outline: none;\n\n cursor: pointer;\n\n background: transparent;\n\n ${addFocus({\n outlineSize: '0.063rem',\n outlineOffset: '-0.125rem',\n outlineColor: `var(${tokens.modalOutlineFocusColor})`,\n outlineRadius: `calc(var(${tokens.modalCloseButtonRadius}) + 0.063rem)`,\n })};\n\n position: absolute;\n`;\n"],"names":["ModalBody","styled","name","class","propsAsIs","ModalContent","CloseButton"],"mappings":";;;;;;AAMO,IAAMA,SAAS,gBAAGC,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,WAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAK9B,EAAA;AAEM,IAAMC,YAAY,gBAAGJ,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,cAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAGjC,EAAA;AAEM,IAAME,WAAW,gBAAGL,YAAM,CAAA,QAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,aAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CA8BhC;;;;;;"}
@@ -1,3 +0,0 @@
1
- .m7npn1w{border-radius:var(--plasma-modal-body-border-radius);padding:var(--plasma-modal-body-padding);background:var(--plasma-modal-body-background);box-shadow:var(--shadow-down-soft-l);}
2
- .m16phoaz{position:relative;padding:var(--plasma-modal-content-padding);}
3
- .c5bx5hr{top:0;right:0;width:1.5rem;height:1.5rem;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;border:none;border-radius:var(--plasma-modal-close-button-radius);padding:0;margin:0;outline:none;cursor:pointer;background:transparent;position:relative;position:absolute;}.c5bx5hr::before{content:'';position:absolute;top:-0.125rem;left:-0.125rem;right:-0.125rem;bottom:-0.125rem;z-index:1;display:block;box-sizing:content-box;border:0.063rem solid transparent;border-radius:calc(var(--plasma-modal-close-button-radius) + 0.063rem);-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.c5bx5hr.focus-visible:focus::before,.c5bx5hr[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 0.063rem var(--plasma-modal-outline-focus-color);}
@@ -1 +0,0 @@
1
- .b1wld3h3 .s2cs3kf{-webkit-flex:0 0 var(--plasma-switch__track-width);-ms-flex:0 0 var(--plasma-switch__track-width);flex:0 0 var(--plasma-switch__track-width);width:var(--plasma-switch__track-width);height:var(--plasma-switch__track-height);border-radius:var(--plasma-switch__track-border-radius);}.b1wld3h3 .s2cs3kf::after{width:var(--plasma-switch__thumb-size);height:var(--plasma-switch__thumb-size);border-radius:var(--plasma-switch__thumb-border-radius);margin:auto var(--plasma-switch__thumb-offset);}.b1wld3h3:active:not([disabled]) .s2cs3kf::after{width:calc(var(--plasma-switch__thumb-size) * var(--plasma-switch__thumb-scale,1));}
@@ -1 +0,0 @@
1
- .b1g0jmh3 .s2cs3kf{background-color:var(--plasma-switch__track_checked_false-bg-color);}.b1g0jmh3 .ssthlx1:not([disabled]) ~ .s2cs3kf:hover{background-color:var(--plasma-switch__track_checked_false_hovered_true-bg-color,var(--plasma-switch__track_checked_false-bg-color));}.b1g0jmh3 .ssthlx1:checked ~ .s2cs3kf{background-color:var(--plasma-switch__track_checked_true-bg-color);}.b1g0jmh3 .ssthlx1:checked:not([disabled]) ~ .s2cs3kf:hover{background-color:var(--plasma-switch__track_checked_true_hovered_true-bg-color,var(--plasma-switch__track_checked_true-bg-color));}.b1g0jmh3 .s2cs3kf::after{background-color:var(--plasma-switch__thumb-bg-color);box-shadow:var(--plasma-switch__thumb-box-shadow);}.b1g0jmh3 .ssthlx1:checked ~ .s2cs3kf::after{box-shadow:var(--plasma-switch__thumb-box-shadow_checked_true,var(--plasma-switch__thumb-box-shadow));}.b1g0jmh3 .s1ilr5eq{color:var(--plasma-switch__label-color);}.b1g0jmh3 .sdjnckq{color:var(--plasma-switch__description-color);}