@registrucentras/rc-ses-react-components 2.7.3 → 3.0.0-rc.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.
Files changed (289) hide show
  1. package/dist/assets/icons/phosphorIcons.d.ts +4 -0
  2. package/dist/components/common/Accordion/hooks/useAccordionController.d.ts +2 -1
  3. package/dist/components/common/Accordion/index.d.ts +18 -4
  4. package/dist/components/common/Accordion/types/AccordionControllerState.d.ts +1 -0
  5. package/dist/components/common/Card/index.d.ts +3 -0
  6. package/dist/components/common/CheckboxMark/index.d.ts +8 -0
  7. package/dist/components/common/DataPagination/components/ExpandButton.d.ts +7 -0
  8. package/dist/components/common/DataPagination/components/PaginationButton.d.ts +2 -1
  9. package/dist/components/common/DataPagination/index.d.ts +13 -3
  10. package/dist/components/common/DataPagination/paginationModel.d.ts +4 -0
  11. package/dist/components/common/Divider/index.d.ts +6 -0
  12. package/dist/components/common/EmptyState/index.d.ts +21 -0
  13. package/dist/components/common/IconWithSquareBackground/index.d.ts +2 -2
  14. package/dist/components/common/ImageCard/index.d.ts +5 -0
  15. package/dist/components/common/LinkTile/index.d.ts +11 -0
  16. package/dist/components/common/RadioMark/index.d.ts +8 -0
  17. package/dist/components/common/StepCard/StepCardFooter/index.d.ts +1 -1
  18. package/dist/components/common/TitleBlock/types.d.ts +4 -2
  19. package/dist/components/form/components/FormControlWrapper/index.d.ts +2 -1
  20. package/dist/components/form/inputs/Datepicker/RangeDatepicker.d.ts +23 -0
  21. package/dist/components/form/inputs/Datepicker/SingleDatepicker.d.ts +24 -0
  22. package/dist/components/form/inputs/Datepicker/components/CalendarViewsHeader.d.ts +18 -0
  23. package/dist/components/form/inputs/Datepicker/index.d.ts +10 -14
  24. package/dist/components/form/inputs/Datepicker/rangeModel.d.ts +4 -0
  25. package/dist/components/form/inputs/FileDropzone.d.ts +2 -2
  26. package/dist/components/form/inputs/RadioButtonGroup.d.ts +1 -0
  27. package/dist/components/form/inputs/Select/Select.styles.d.ts +84 -0
  28. package/dist/components/form/inputs/Select/components/OptionCheckbox.d.ts +2 -1
  29. package/dist/components/form/inputs/TextField.d.ts +27 -12
  30. package/dist/components/form/inputs/TextField.styles.d.ts +101 -0
  31. package/dist/components/layout/ServiceWizardStepper/stepperTokens.d.ts +5 -0
  32. package/dist/components/loaders/Loader/index.d.ts +12 -9
  33. package/dist/components/overlays/BottomSheet/index.d.ts +3 -2
  34. package/dist/components/overlays/Dialog/index.d.ts +1 -1
  35. package/dist/components/storybook/FileUploadTokenPreview.d.ts +4 -0
  36. package/dist/components/storybook/TabsTokenPreview.d.ts +3 -0
  37. package/dist/components/storybook/TokenDocs.d.ts +74 -0
  38. package/dist/library/index.d.ts +30 -1
  39. package/dist/registrucentras-rc-ses-react-components.cjs +2 -2
  40. package/dist/registrucentras-rc-ses-react-components.js +11143 -8378
  41. package/dist/theme/backdropTokens.d.ts +6 -0
  42. package/dist/theme/borderTokens.d.ts +33 -0
  43. package/dist/theme/cards.d.ts +42 -73
  44. package/dist/theme/colorTokens.d.ts +146 -0
  45. package/dist/theme/effectTokens.d.ts +9 -0
  46. package/dist/theme/layoutTokens.d.ts +12 -0
  47. package/dist/theme/light/MuiAccordion.d.ts +2 -2
  48. package/dist/theme/light/MuiAccordionSummary.d.ts +19 -0
  49. package/dist/theme/light/MuiButton.d.ts +7 -0
  50. package/dist/theme/light/MuiInputBase.d.ts +2 -0
  51. package/dist/theme/light/MuiPickerPopper.d.ts +3 -0
  52. package/dist/theme/light/MuiTypography.d.ts +0 -14
  53. package/dist/theme/palette.d.ts +8 -0
  54. package/dist/theme/sizeTokens.d.ts +20 -0
  55. package/dist/theme/spacingRoleBasedTokens.d.ts +38 -0
  56. package/dist/theme/spacingTokens.d.ts +97 -0
  57. package/dist/theme/tokenTheme.d.ts +13 -0
  58. package/dist/theme/typographyTokens.d.ts +104 -0
  59. package/package.json +2 -2
  60. package/src/assets/icons/phosphorIcons.ts +1 -0
  61. package/src/components/common/Accordion/hooks/useAccordionController.tsx +39 -7
  62. package/src/components/common/Accordion/index.test.tsx +132 -0
  63. package/src/components/common/Accordion/index.tsx +302 -25
  64. package/src/components/common/Accordion/types/AccordionControllerState.ts +1 -0
  65. package/src/components/common/AdvancedList/components/AdvancedListItem/components/AdvancedListItemLeading.tsx +3 -3
  66. package/src/components/common/AdvancedList/components/AdvancedListItem/components/AdvancedListItemTrailing.tsx +8 -3
  67. package/src/components/common/AdvancedList/components/AdvancedListItem/index.tsx +3 -2
  68. package/src/components/common/AdvancedList/components/AdvancedListItemShell/index.test.tsx +3 -3
  69. package/src/components/common/AdvancedList/components/AdvancedListItemShell/index.tsx +23 -19
  70. package/src/components/common/AdvancedList/index.test.tsx +4 -2
  71. package/src/components/common/Alert/index.tsx +10 -6
  72. package/src/components/common/Badge/index.tsx +50 -37
  73. package/src/components/common/Button/index.tsx +12 -10
  74. package/src/components/common/Card/index.tsx +6 -1
  75. package/src/components/common/CardShell/index.test.tsx +16 -6
  76. package/src/components/common/CheckboxMark/index.tsx +86 -0
  77. package/src/components/common/DataPagination/components/DataPaginationSkeleton.tsx +9 -7
  78. package/src/components/common/DataPagination/components/ExpandButton.tsx +48 -0
  79. package/src/components/common/DataPagination/components/PaginationButton.tsx +48 -21
  80. package/src/components/common/DataPagination/index.test.tsx +229 -12
  81. package/src/components/common/DataPagination/index.tsx +135 -60
  82. package/src/components/common/DataPagination/paginationModel.ts +35 -0
  83. package/src/components/common/Divider/index.test.tsx +33 -0
  84. package/src/components/common/Divider/index.tsx +52 -0
  85. package/src/components/common/EmptyState/index.test.tsx +56 -0
  86. package/src/components/common/EmptyState/index.tsx +211 -0
  87. package/src/components/common/FilterChip/index.tsx +24 -19
  88. package/src/components/common/IconWithCircularBackground.tsx +24 -6
  89. package/src/components/common/IconWithSquareBackground/index.test.tsx +14 -2
  90. package/src/components/common/IconWithSquareBackground/index.tsx +36 -17
  91. package/src/components/common/ImageCard/index.test.tsx +16 -0
  92. package/src/components/common/ImageCard/index.tsx +54 -1
  93. package/src/components/common/LinkTile/index.test.tsx +57 -0
  94. package/src/components/common/LinkTile/index.tsx +136 -0
  95. package/src/components/common/ListWithIcons/components/ListWithIconsItem.tsx +39 -23
  96. package/src/components/common/ListWithIcons/index.test.tsx +20 -9
  97. package/src/components/common/ListWithIcons/index.tsx +6 -6
  98. package/src/components/common/Popover/index.tsx +11 -1
  99. package/src/components/common/RadioMark/index.tsx +76 -0
  100. package/src/components/common/SegmentedControl/components/SegmentButton/index.tsx +49 -25
  101. package/src/components/common/SegmentedControl/index.tsx +10 -6
  102. package/src/components/common/SelectableCardList/components/SelectableCardListItem.tsx +7 -5
  103. package/src/components/common/SelectableCardList/index.test.tsx +8 -6
  104. package/src/components/common/SelectionMarks.test.tsx +92 -0
  105. package/src/components/common/ServiceLinks/ServiceLinkItem/index.tsx +20 -11
  106. package/src/components/common/ServiceLinks/index.tsx +3 -3
  107. package/src/components/common/SideNav/SideNavLayout.tsx +6 -1
  108. package/src/components/common/SideNav/components/SideNavPill.tsx +24 -12
  109. package/src/components/common/SideNav/components/SideNavPillList.tsx +18 -12
  110. package/src/components/common/SideNav/components/SideNavRow.tsx +22 -15
  111. package/src/components/common/SideNav/index.tsx +10 -9
  112. package/src/components/common/Snackbar/config.ts +27 -8
  113. package/src/components/common/Snackbar/index.tsx +39 -16
  114. package/src/components/common/StepCard/StepCardFooter/index.tsx +28 -6
  115. package/src/components/common/StepCard/index.tsx +18 -6
  116. package/src/components/common/Switch/index.tsx +10 -4
  117. package/src/components/common/Tabs/TabPanel.tsx +6 -3
  118. package/src/components/common/Tabs/TabsWrapper.tsx +15 -7
  119. package/src/components/common/TitleBlock/index.test.tsx +14 -17
  120. package/src/components/common/TitleBlock/index.tsx +120 -15
  121. package/src/components/common/TitleBlock/types.ts +4 -2
  122. package/src/components/common/Tooltip/index.tsx +32 -3
  123. package/src/components/form/components/FormControlWrapper/index.tsx +43 -14
  124. package/src/components/form/inputs/CheckboxFormControl.tsx +25 -13
  125. package/src/components/form/inputs/Datepicker/RangeDatepicker.tsx +356 -0
  126. package/src/components/form/inputs/Datepicker/SingleDatepicker.tsx +207 -0
  127. package/src/components/form/inputs/Datepicker/components/CalendarViewsHeader.tsx +335 -0
  128. package/src/components/form/inputs/Datepicker/components/RcSesDatepickerCalendarHeader.tsx +22 -10
  129. package/src/components/form/inputs/Datepicker/index.test.tsx +23 -18
  130. package/src/components/form/inputs/Datepicker/index.tsx +20 -150
  131. package/src/components/form/inputs/Datepicker/rangeModel.test.ts +35 -0
  132. package/src/components/form/inputs/Datepicker/rangeModel.ts +25 -0
  133. package/src/components/form/inputs/FileDropzone.tsx +73 -46
  134. package/src/components/form/inputs/FileUpload.tsx +25 -16
  135. package/src/components/form/inputs/NumberStepper.tsx +36 -14
  136. package/src/components/form/inputs/PhoneInputFormControl/components/AutocompleteInput.tsx +10 -5
  137. package/src/components/form/inputs/PhoneInputFormControl/components/ListboxComponent.tsx +7 -1
  138. package/src/components/form/inputs/PhoneInputFormControl/components/PopperComponent.tsx +5 -2
  139. package/src/components/form/inputs/PhoneInputFormControl/components/RowComponent.tsx +9 -5
  140. package/src/components/form/inputs/PhoneInputFormControl/index.tsx +48 -24
  141. package/src/components/form/inputs/RadioButtonGroup.tsx +14 -6
  142. package/src/components/form/inputs/Select/Select.styles.ts +76 -0
  143. package/src/components/form/inputs/Select/components/OptionCheckbox.tsx +6 -33
  144. package/src/components/form/inputs/Select/index.tsx +124 -86
  145. package/src/components/form/inputs/SimpleCheckbox.tsx +10 -3
  146. package/src/components/form/inputs/TextField.presets.test.tsx +284 -0
  147. package/src/components/form/inputs/TextField.styles.ts +96 -0
  148. package/src/components/form/inputs/TextField.test.tsx +153 -0
  149. package/src/components/form/inputs/TextField.tsx +315 -42
  150. package/src/components/layout/Footer/index.test.tsx +1 -1
  151. package/src/components/layout/Footer/index.tsx +17 -7
  152. package/src/components/layout/ServiceFormActions.tsx +5 -1
  153. package/src/components/layout/ServiceFormContainer/AccordionFormContainer/index.tsx +3 -3
  154. package/src/components/layout/ServiceHeader.tsx +19 -19
  155. package/src/components/layout/ServiceWizardStepper/ServiceWizardStepper.css +10 -10
  156. package/src/components/layout/ServiceWizardStepper/StepConnector.tsx +8 -5
  157. package/src/components/layout/ServiceWizardStepper/components/CustomStepIcon.tsx +22 -7
  158. package/src/components/layout/ServiceWizardStepper/components/HorizontalStepperButton.tsx +15 -11
  159. package/src/components/layout/ServiceWizardStepper/components/StyledStepLabel.tsx +28 -11
  160. package/src/components/layout/ServiceWizardStepper/stepperTokens.ts +8 -0
  161. package/src/components/loaders/FullPageLoader/index.test.tsx +18 -7
  162. package/src/components/loaders/FullPageLoader/index.tsx +14 -9
  163. package/src/components/loaders/Loader/index.tsx +48 -17
  164. package/src/components/overlays/BottomSheet/index.test.tsx +36 -3
  165. package/src/components/overlays/BottomSheet/index.tsx +54 -21
  166. package/src/components/overlays/Dialog/index.tsx +5 -23
  167. package/src/components/overlays/Drawer/index.tsx +29 -14
  168. package/src/components/overlays/Modal/index.tsx +46 -8
  169. package/src/components/storybook/FileUploadTokenPreview.tsx +68 -0
  170. package/src/components/storybook/TabsTokenPreview.tsx +58 -0
  171. package/src/components/storybook/TokenDocs.tsx +347 -0
  172. package/src/examples/MultipleStepForm/components/TermsAndConditionsForm.tsx +5 -1
  173. package/src/i18n/namespaces/input/en.json +48 -4
  174. package/src/i18n/namespaces/input/lt.json +48 -4
  175. package/src/library/index.ts +50 -0
  176. package/src/stories/atoms/Badge.stories.tsx +2 -1
  177. package/src/stories/atoms/Button.stories.tsx +124 -6
  178. package/src/stories/atoms/CheckboxMark.stories.tsx +79 -0
  179. package/src/stories/atoms/Divider.stories.tsx +129 -0
  180. package/src/stories/atoms/FilterChip.stories.tsx +9 -1
  181. package/src/stories/atoms/IconWithSquareBackground.stories.tsx +7 -7
  182. package/src/stories/atoms/Icons.stories.tsx +1 -1
  183. package/src/stories/atoms/NumberStepper.stories.tsx +44 -0
  184. package/src/stories/atoms/PhoneInput.stories.tsx +42 -0
  185. package/src/stories/atoms/RadioMark.stories.tsx +132 -0
  186. package/src/stories/atoms/Select.stories.tsx +139 -2
  187. package/src/stories/atoms/SimpleCheckbox.stories.tsx +74 -0
  188. package/src/stories/atoms/Switch.stories.tsx +46 -1
  189. package/src/stories/atoms/TextField.stories.tsx +508 -0
  190. package/src/stories/atoms/Tooltip.stories.tsx +5 -0
  191. package/src/stories/fixtures/foundations/Borders.stories.tsx +84 -0
  192. package/src/stories/fixtures/foundations/Effects.stories.tsx +204 -0
  193. package/src/stories/fixtures/foundations/Layout.stories.tsx +76 -0
  194. package/src/stories/fixtures/foundations/Sizes.stories.tsx +42 -0
  195. package/src/stories/fixtures/foundations/Spacing.stories.tsx +48 -0
  196. package/src/stories/fixtures/foundations/Typography.stories.tsx +49 -0
  197. package/src/stories/foundations/Borders.stories.tsx +179 -0
  198. package/src/stories/foundations/Colors.stories.tsx +253 -0
  199. package/src/stories/foundations/Effects.stories.tsx +116 -0
  200. package/src/stories/foundations/Layout.stories.tsx +177 -0
  201. package/src/stories/foundations/Sizes.stories.tsx +123 -0
  202. package/src/stories/foundations/Spacing.stories.tsx +159 -0
  203. package/src/stories/foundations/ThemeAdapter.stories.tsx +389 -0
  204. package/src/stories/foundations/Typography.stories.tsx +148 -0
  205. package/src/stories/molecules/Alert.stories.tsx +18 -0
  206. package/src/stories/molecules/Breadcrumbs.stories.tsx +51 -0
  207. package/src/stories/molecules/Card.stories.tsx +1 -1
  208. package/src/stories/molecules/CardShell.stories.tsx +1 -0
  209. package/src/stories/molecules/DatePicker.stories.tsx +133 -3
  210. package/src/stories/molecules/EmptyState.stories.tsx +106 -0
  211. package/src/stories/molecules/FormControlWrapper.stories.tsx +59 -0
  212. package/src/stories/molecules/LinkTile.stories.tsx +151 -0
  213. package/src/stories/molecules/ListWithIcons.stories.tsx +27 -2
  214. package/src/stories/molecules/RadioButtonGroup.stories.tsx +23 -0
  215. package/src/stories/molecules/SegmentedControl.stories.tsx +62 -1
  216. package/src/stories/molecules/Tabs.stories.tsx +4 -0
  217. package/src/stories/molecules/TitleBlock.stories.tsx +16 -16
  218. package/src/stories/organisms/Accordion.stories.tsx +132 -0
  219. package/src/stories/organisms/AdvancedListItemShell.stories.tsx +63 -23
  220. package/src/stories/organisms/BottomSheet.stories.tsx +48 -1
  221. package/src/stories/organisms/DataPagination.stories.tsx +127 -3
  222. package/src/stories/organisms/Dialog.stories.tsx +13 -0
  223. package/src/stories/organisms/FileDropzone.stories.tsx +6 -0
  224. package/src/stories/organisms/FileUpload.stories.tsx +4 -0
  225. package/src/stories/organisms/Footer.stories.tsx +20 -0
  226. package/src/stories/organisms/Modal.stories.tsx +53 -0
  227. package/src/stories/organisms/ServiceHeader.stories.tsx +25 -3
  228. package/src/stories/organisms/ServiceLinks.stories.tsx +1 -1
  229. package/src/stories/organisms/ServiceWizardStepper.stories.tsx +37 -1
  230. package/src/stories/organisms/SideNav.stories.tsx +8 -1
  231. package/src/theme/backdropTokens.test.ts +11 -0
  232. package/src/theme/backdropTokens.ts +11 -0
  233. package/src/theme/borderTokens.test.ts +59 -0
  234. package/src/theme/borderTokens.ts +36 -0
  235. package/src/theme/cards.ts +28 -28
  236. package/src/theme/colorTokens.test.ts +66 -0
  237. package/src/theme/colorTokens.ts +87 -0
  238. package/src/theme/effectTokens.test.ts +29 -0
  239. package/src/theme/effectTokens.ts +11 -0
  240. package/src/theme/layoutTokens.test.ts +42 -0
  241. package/src/theme/layoutTokens.ts +14 -0
  242. package/src/theme/light/MuiAccordion.tsx +30 -26
  243. package/src/theme/light/MuiAccordionDetails.ts +10 -5
  244. package/src/theme/light/MuiAccordionSummary.tsx +31 -17
  245. package/src/theme/light/MuiAlert.tsx +42 -65
  246. package/src/theme/light/MuiAutocomplete.ts +14 -7
  247. package/src/theme/light/MuiBreadcrumbs.tsx +17 -9
  248. package/src/theme/light/MuiButton.tsx +213 -204
  249. package/src/theme/light/MuiCard.tsx +5 -4
  250. package/src/theme/light/MuiCheckbox.ts +45 -14
  251. package/src/theme/light/MuiChip.tsx +3 -1
  252. package/src/theme/light/MuiDialog.ts +45 -6
  253. package/src/theme/light/MuiFormControl.ts +19 -9
  254. package/src/theme/light/MuiFormControlLabel.ts +16 -25
  255. package/src/theme/light/MuiFormGroup.ts +29 -26
  256. package/src/theme/light/MuiFormHelperText.ts +15 -4
  257. package/src/theme/light/MuiFormLabel.ts +20 -20
  258. package/src/theme/light/MuiInputBase.ts +49 -84
  259. package/src/theme/light/MuiOutlinedInput.ts +50 -6
  260. package/src/theme/light/MuiPagination.ts +21 -21
  261. package/src/theme/light/MuiPickerPopper.ts +17 -0
  262. package/src/theme/light/MuiPickersLayout.ts +63 -34
  263. package/src/theme/light/MuiPickersOutlinedInput.ts +38 -38
  264. package/src/theme/light/MuiPopover.ts +3 -1
  265. package/src/theme/light/MuiRadio.tsx +35 -52
  266. package/src/theme/light/MuiStepper.ts +21 -17
  267. package/src/theme/light/MuiSwitch.tsx +27 -23
  268. package/src/theme/light/MuiTab.tsx +27 -18
  269. package/src/theme/light/MuiTableCell.ts +4 -2
  270. package/src/theme/light/MuiTabs.tsx +11 -9
  271. package/src/theme/light/MuiTooltip.ts +2 -1
  272. package/src/theme/light/MuiTypography.tsx +0 -17
  273. package/src/theme/light/index.tsx +2 -0
  274. package/src/theme/light/themePalette.tsx +1 -0
  275. package/src/theme/palette.tsx +9 -0
  276. package/src/theme/sizeTokens.test.ts +37 -0
  277. package/src/theme/sizeTokens.ts +21 -0
  278. package/src/theme/spacingRoleBasedTokens.ts +41 -0
  279. package/src/theme/spacingTokens.test.ts +58 -0
  280. package/src/theme/spacingTokens.ts +114 -0
  281. package/src/theme/tokenTheme.test.tsx +402 -0
  282. package/src/theme/tokenTheme.ts +429 -0
  283. package/src/theme/tokens.css +476 -0
  284. package/src/theme/tokens.test.ts +174 -0
  285. package/src/theme/typographyTokens.test.ts +120 -0
  286. package/src/theme/typographyTokens.ts +119 -0
  287. package/dist/theme/spacing.d.ts +0 -4
  288. package/src/stories/foundations/Colors.mdx +0 -127
  289. package/src/theme/spacing.ts +0 -5
@@ -235,3 +235,21 @@ export const WithContainer: Story = {
235
235
  </>
236
236
  ),
237
237
  }
238
+
239
+ /** Semantic status tokens can be scoped by the consuming application. */
240
+ export const TokenOverrides: Story = {
241
+ render: () => (
242
+ <div
243
+ style={
244
+ {
245
+ '--rc-color-status-info-bg': '#fff3d6',
246
+ '--rc-color-status-info-border': '#805500',
247
+ '--rc-color-status-info-icon': '#805500',
248
+ '--rc-color-status-info-text': '#463000',
249
+ } as React.CSSProperties
250
+ }
251
+ >
252
+ <RcSesAlert severity='info'>Scoped information alert</RcSesAlert>
253
+ </div>
254
+ ),
255
+ }
@@ -1,4 +1,5 @@
1
1
  import { Meta, StoryObj } from '@storybook/react-vite'
2
+ import type { CSSProperties } from 'react'
2
3
 
3
4
  import RcSesBreadcrumbs from '@/components/common/Breadcrumbs'
4
5
 
@@ -28,3 +29,53 @@ export const Main: Story = {
28
29
  path: Path,
29
30
  },
30
31
  }
32
+
33
+ export const TokenBindings: Story = {
34
+ args: {
35
+ path: [
36
+ { label: 'Home', path: '#home' },
37
+ { label: 'Services', path: '#services' },
38
+ { label: 'Current page', path: '#current' },
39
+ ],
40
+ },
41
+ parameters: {
42
+ docs: {
43
+ description: {
44
+ story:
45
+ 'Breadcrumbs use the Figma Body/Micro role, 6px separator spacing and DS color tokens. Link behavior is preserved.',
46
+ },
47
+ },
48
+ },
49
+ }
50
+
51
+ export const TokenOverrides: Story = {
52
+ ...TokenBindings,
53
+ render: (args) => (
54
+ <div
55
+ style={
56
+ {
57
+ '--rc-color-text-secondary': '#008561',
58
+ '--rc-color-text-default': '#0e6790',
59
+ '--rc-space-6': '10px',
60
+ } as CSSProperties
61
+ }
62
+ >
63
+ <RcSesBreadcrumbs {...args} />
64
+ </div>
65
+ ),
66
+ }
67
+
68
+ export const ConsumerOverrides: Story = {
69
+ ...TokenBindings,
70
+ args: {
71
+ ...TokenBindings.args,
72
+ sx: {
73
+ fontSize: '18px',
74
+ '& .MuiBreadcrumbs-li': {
75
+ paddingTop: '3px',
76
+ paddingBottom: '3px',
77
+ '& a': { color: '#008561' },
78
+ },
79
+ },
80
+ },
81
+ }
@@ -13,7 +13,7 @@ import palette from '@/theme/palette'
13
13
  const meta: Meta<typeof RcSesCard> = {
14
14
  title: 'Molecules/Card',
15
15
  component: RcSesCard,
16
- tags: ['autodocs'],
16
+ tags: ['autodocs', 'deprecated'],
17
17
  }
18
18
 
19
19
  export default meta
@@ -94,6 +94,7 @@ const SampleHeader = () => (
94
94
  <RcSesTitleBlock
95
95
  title='Kortelės antraštė'
96
96
  description='Paaiškinimas apie šios kortelės turinį'
97
+ titleVariant='card-title'
97
98
  />
98
99
  )
99
100
 
@@ -1,10 +1,11 @@
1
+ import { Box, Button } from '@mui/material'
1
2
  import { AdapterDateFns } from '@mui/x-date-pickers/AdapterDateFns'
2
3
  import { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider'
3
4
  import { Meta, StoryContext } from '@storybook/react-vite'
4
5
  import { lt } from 'date-fns/locale/lt'
5
- import { useForm } from 'react-hook-form'
6
+ import { useForm, useWatch } from 'react-hook-form'
6
7
 
7
- import RcSesDatepicker from '@/components/form/inputs/Datepicker'
8
+ import RcSesDatepicker, { DateRangeValue } from '@/components/form/inputs/Datepicker'
8
9
  import FieldView from '@/components/storybook/FieldView'
9
10
  import Fields from '@/components/storybook/Fields'
10
11
  import SingleStepFormModel from '@/examples/SingleStepForm/types/SingleStepFormModel'
@@ -137,7 +138,7 @@ export const CalendarOpen = {
137
138
 
138
139
  /**
139
140
  * Days past the 20th are out of range: they must read as greyed out, not merely
140
- * be unclickable. Disabled weekends stay red.
141
+ * be unclickable. The existing red distinction for weekends is preserved.
141
142
  */
142
143
  export const CalendarWithDisabledDates = {
143
144
  render: (args: any) => <DatePickerDemo {...args} />,
@@ -227,3 +228,132 @@ export const WithError = {
227
228
  rules: { required: true },
228
229
  },
229
230
  }
231
+
232
+ export const TokenBindings = {
233
+ ...CalendarWithValue,
234
+ parameters: {
235
+ ...CalendarWithValue.parameters,
236
+ docs: {
237
+ ...CalendarWithValue.parameters.docs,
238
+ description: {
239
+ story:
240
+ 'Existing single-date calendar styles rebound to typography, color, spacing, radius and elevation tokens. Cell dimensions, circular shape, weekend coloring, props and navigation are preserved.',
241
+ },
242
+ },
243
+ },
244
+ }
245
+
246
+ export const ConsumerOverrides = {
247
+ ...Main,
248
+ tags: ['no-snapshot'],
249
+ args: {
250
+ ...Main.args,
251
+ datepickerProps: {
252
+ sx: {
253
+ '& .MuiPickersInputBase-sectionsContainer': {
254
+ fontSize: '23px',
255
+ lineHeight: '29px',
256
+ },
257
+ },
258
+ },
259
+ },
260
+ }
261
+
262
+ function RangeDemo({
263
+ selected = false,
264
+ disabled = false,
265
+ }: {
266
+ selected?: boolean
267
+ disabled?: boolean
268
+ }) {
269
+ const { control, reset } = useForm<{ period: DateRangeValue }>({
270
+ defaultValues: { period: selected ? ['2026-06-10', '2026-06-17'] : [null, null] },
271
+ })
272
+ const period = useWatch({ control, name: 'period' })
273
+ return (
274
+ <Box sx={{ width: '100%', maxWidth: '520px' }}>
275
+ <LocalizationProvider dateAdapter={AdapterDateFns} adapterLocale={lt}>
276
+ <RcSesDatepicker
277
+ selection='range'
278
+ id='period'
279
+ name='period'
280
+ control={control}
281
+ label='Date range'
282
+ clearable
283
+ disabled={disabled}
284
+ slotProps={{
285
+ wrapper: { labelOnTop: true },
286
+ calendar: { referenceDate: new Date(2026, 5, 10) },
287
+ }}
288
+ />
289
+ </LocalizationProvider>
290
+ <Box component='output' aria-label='Stored range' sx={{ display: 'block', mt: 2 }}>
291
+ {JSON.stringify(period)}
292
+ </Box>
293
+ <Button onClick={() => reset({ period: [null, null] })}>Reset form</Button>
294
+ </Box>
295
+ )
296
+ }
297
+
298
+ export const Range = {
299
+ render: () => <RangeDemo />,
300
+ parameters: {
301
+ docs: {
302
+ description: {
303
+ story:
304
+ "With `selection='range'` one field picks a period. The form value is a pair of plain local dates, `['2026-06-10', '2026-06-17']`: `[start, null]` while the end is still being picked and `[null, null]` when empty. Both dates are inclusive calendar days without a time or timezone, so read them as dates on the backend (e.g. `LocalDate`) and build any time window there. Unlike Single, which stores a UTC timestamp, values in any other format, such as ISO timestamps, are read as empty.",
305
+ },
306
+ },
307
+ },
308
+ }
309
+ export const RangeSelected = { render: () => <RangeDemo selected /> }
310
+ export const RangeDisabled = { render: () => <RangeDemo selected disabled /> }
311
+
312
+ function ViewsDemo({
313
+ range = false,
314
+ bounded = false,
315
+ }: {
316
+ range?: boolean
317
+ bounded?: boolean
318
+ }) {
319
+ const { control } = useForm<{ single: string | null; period: DateRangeValue }>({
320
+ defaultValues: { single: '2026-06-10T00:00:00.000Z', period: ['2026-06-10', null] },
321
+ })
322
+ const bounds = bounded
323
+ ? { minDate: new Date(2026, 3, 1), maxDate: new Date(2026, 8, 30) }
324
+ : {}
325
+ return (
326
+ <LocalizationProvider dateAdapter={AdapterDateFns} adapterLocale={lt}>
327
+ <Box sx={{ width: '100%', maxWidth: '450px' }}>
328
+ {range ? (
329
+ <RcSesDatepicker
330
+ selection='range'
331
+ id='views-range'
332
+ name='period'
333
+ control={control}
334
+ label='Range views'
335
+ slotProps={{
336
+ wrapper: { labelOnTop: true },
337
+ calendar: { referenceDate: REFERENCE_DATE, ...bounds },
338
+ }}
339
+ />
340
+ ) : (
341
+ <RcSesDatepicker
342
+ id='views-single'
343
+ name='single'
344
+ control={control}
345
+ label='Single views'
346
+ slotProps={{
347
+ wrapper: { labelOnTop: true },
348
+ datepicker: { referenceDate: REFERENCE_DATE, ...bounds },
349
+ }}
350
+ />
351
+ )}
352
+ </Box>
353
+ </LocalizationProvider>
354
+ )
355
+ }
356
+
357
+ export const SingleViews = { render: () => <ViewsDemo /> }
358
+ export const RangeViews = { render: () => <ViewsDemo range /> }
359
+ export const BoundedViews = { render: () => <ViewsDemo range bounded /> }
@@ -0,0 +1,106 @@
1
+ import { Box, Stack } from '@mui/material'
2
+ import type { Meta, StoryObj } from '@storybook/react-vite'
3
+ import { useState } from 'react'
4
+ import { fn } from 'storybook/test'
5
+
6
+ import RcSesAlert from '@/components/common/Alert'
7
+ import RcSesButton from '@/components/common/Button'
8
+ import RcSesEmptyState from '@/components/common/EmptyState'
9
+
10
+ const meta = {
11
+ title: 'Molecules/EmptyState',
12
+ component: RcSesEmptyState,
13
+ tags: ['autodocs'],
14
+ parameters: {
15
+ docs: {
16
+ description: {
17
+ component:
18
+ 'Replaces absent content after loading finishes. Use sx/minHeight to reserve the same space as the list or table. Set announce for warning/error responses to user actions; neutral/info remain plain content. Compose validationError with an Inline Alert below. Compact omits the hint; showAction=false prevents duplicate actions.',
19
+ },
20
+ },
21
+ },
22
+ args: {
23
+ title: 'Kol kas nieko nėra',
24
+ description: 'Paaiškinkite, kodėl turinio nėra ir ką daryti toliau.',
25
+ hint: 'Patarimas: trumpa užuomina, kaip greičiau gauti rezultatą.',
26
+ action: { label: 'Kaip ieškoti?', onClick: fn() },
27
+ },
28
+ argTypes: {
29
+ type: { control: 'select', options: ['neutral', 'info', 'warning', 'error'] },
30
+ size: { control: 'select', options: ['regular', 'compact'] },
31
+ headingLevel: { control: 'select', options: [1, 2, 3, 4, 5, 6] },
32
+ },
33
+ } satisfies Meta<typeof RcSesEmptyState>
34
+
35
+ export default meta
36
+ type Story = StoryObj<typeof meta>
37
+
38
+ export const Regular: Story = {}
39
+ export const Compact: Story = { args: { size: 'compact' } }
40
+ export const AllTones: Story = {
41
+ render: (args) => (
42
+ <Stack spacing={3}>
43
+ {(['neutral', 'info', 'warning', 'error'] as const).map((type) => (
44
+ <Box
45
+ key={type}
46
+ sx={{
47
+ display: 'grid',
48
+ alignItems: 'start',
49
+ gridTemplateColumns: { xs: '1fr', md: '2fr 1fr' },
50
+ gap: 3,
51
+ }}
52
+ >
53
+ <RcSesEmptyState {...args} type={type} />
54
+ <RcSesEmptyState {...args} type={type} size='compact' />
55
+ </Box>
56
+ ))}
57
+ </Stack>
58
+ ),
59
+ }
60
+ export const WithoutAction: Story = { args: { showAction: false } }
61
+ export const WithoutHint: Story = { args: { hint: undefined } }
62
+ export const Validation: Story = {
63
+ render: (args) => (
64
+ <Stack spacing={2}>
65
+ <RcSesEmptyState
66
+ {...args}
67
+ title='Pridėkite bent vieną dalyvį'
68
+ description='Dalyvių sąrašas tuščias.'
69
+ validationError
70
+ aria-describedby='participants-error'
71
+ action={{ label: 'Pridėti dalyvį', onClick: fn() }}
72
+ />
73
+ <RcSesAlert id='participants-error' severity='error'>
74
+ Privaloma pridėti bent vieną dalyvį.
75
+ </RcSesAlert>
76
+ </Stack>
77
+ ),
78
+ }
79
+ export const AfterUserAction: Story = {
80
+ render: function Render(args) {
81
+ const [failed, setFailed] = useState(false)
82
+ return (
83
+ <Stack spacing={2}>
84
+ <RcSesButton onClick={() => setFailed(true)}>Įkelti sąrašą</RcSesButton>
85
+ <RcSesEmptyState
86
+ {...args}
87
+ type={failed ? 'error' : 'neutral'}
88
+ announce={failed}
89
+ title={failed ? 'Nepavyko įkelti sąrašo' : args.title}
90
+ description={failed ? 'Bandykite dar kartą.' : args.description}
91
+ showAction={false}
92
+ />
93
+ </Stack>
94
+ )
95
+ },
96
+ }
97
+ export const LongContent: Story = {
98
+ args: {
99
+ title:
100
+ 'Pagal pasirinktus paieškos kriterijus ir papildomus filtrus rezultatų nerasta',
101
+ description:
102
+ 'Pakeiskite paieškos kriterijus arba pašalinkite pasirinktus filtrus ir bandykite ieškoti dar kartą. IlgaNepertraukiamaReikšmėKuriNeturėtųSukeltiHorizontalausSlinkimo'.repeat(
103
+ 2,
104
+ ),
105
+ },
106
+ }
@@ -1,7 +1,12 @@
1
+ import { Button, Stack } from '@mui/material'
1
2
  import TextField from '@mui/material/TextField'
2
3
  import { Meta, StoryObj } from '@storybook/react-vite'
4
+ import { useState } from 'react'
5
+ import { useForm } from 'react-hook-form'
3
6
 
4
7
  import RcSesFormControlWrapper from '@/components/form/components/FormControlWrapper'
8
+ import RcSesSelect from '@/components/form/inputs/Select'
9
+ import RcSesTextField from '@/components/form/inputs/TextField'
5
10
 
6
11
  const meta: Meta<typeof RcSesFormControlWrapper> = {
7
12
  title: 'Molecules/FormControlWrapper',
@@ -19,6 +24,60 @@ const meta: Meta<typeof RcSesFormControlWrapper> = {
19
24
  export default meta
20
25
  type Story = StoryObj<typeof meta>
21
26
 
27
+ function SharedLabelsPreview() {
28
+ const [disabled, setDisabled] = useState(false)
29
+ const [required, setRequired] = useState(false)
30
+ const { control } = useForm({
31
+ defaultValues: { default: 'first', top: 'first', side: 'first' },
32
+ })
33
+ const errors = { type: 'manual', message: 'Klaidos tekstas' }
34
+ return (
35
+ <Stack spacing={3} sx={{ width: '100%', maxWidth: 800 }}>
36
+ <Button onClick={() => setDisabled((value) => !value)}>Toggle disabled</Button>
37
+ <Button onClick={() => setRequired((value) => !value)}>Toggle required</Button>
38
+ {(['default', 'top', 'side'] as const).map((mode) => (
39
+ <Stack key={mode} spacing={2}>
40
+ <RcSesTextField
41
+ id={`shared-text-${mode}`}
42
+ label={`TextField ${mode}`}
43
+ disabled={disabled}
44
+ required={required}
45
+ errors={errors}
46
+ slotProps={{
47
+ wrapper: {
48
+ className: `shared-text-${mode}`,
49
+ labelOnTop: mode === 'default' ? undefined : mode === 'top',
50
+ description: 'Pagalbinis tekstas',
51
+ },
52
+ }}
53
+ />
54
+ <RcSesSelect
55
+ id={`shared-select-${mode}`}
56
+ name={mode}
57
+ control={control}
58
+ label={`Select ${mode}`}
59
+ disabled={disabled}
60
+ rules={{ required }}
61
+ errors={errors}
62
+ options={[{ value: 'first', label: 'Pirmas pasirinkimas' }]}
63
+ slotProps={{
64
+ wrapper: {
65
+ className: `shared-select-${mode}`,
66
+ labelOnTop: mode === 'default' ? undefined : mode === 'top',
67
+ description: 'Pagalbinis tekstas',
68
+ },
69
+ }}
70
+ />
71
+ </Stack>
72
+ ))}
73
+ </Stack>
74
+ )
75
+ }
76
+
77
+ export const SharedLabels: Story = {
78
+ render: () => <SharedLabelsPreview />,
79
+ }
80
+
22
81
  export const Default: Story = {
23
82
  args: {
24
83
  label: 'Label',
@@ -0,0 +1,151 @@
1
+ import { Box, Stack, Typography } from '@mui/material'
2
+ import {
3
+ ChatIcon,
4
+ ChatsIcon,
5
+ HouseLineIcon,
6
+ ShieldWarningIcon,
7
+ } from '@phosphor-icons/react'
8
+ import type { Meta, StoryObj } from '@storybook/react-vite'
9
+ import { fn } from 'storybook/test'
10
+
11
+ import createIcon from '@/assets/icons/createIcon'
12
+ import { ArrowRightIcon, InfoIcon } from '@/assets/icons/phosphorIcons'
13
+ import RcSesButton from '@/components/common/Button'
14
+ import RcSesLinkTile from '@/components/common/LinkTile'
15
+ import { typographyTokens } from '@/theme/typographyTokens'
16
+
17
+ const House = createIcon(HouseLineIcon)
18
+ const Chats = createIcon(ChatsIcon)
19
+ const Chat = createIcon(ChatIcon)
20
+ const ShieldWarning = createIcon(ShieldWarningIcon)
21
+
22
+ const meta = {
23
+ title: 'Molecules/LinkTile',
24
+ component: RcSesLinkTile,
25
+ tags: ['autodocs'],
26
+ args: { href: '#faq', label: 'D.U.K.', Icon: House, onClick: fn() },
27
+ argTypes: { Icon: { control: false }, current: { control: 'boolean' } },
28
+ parameters: {
29
+ docs: {
30
+ description: {
31
+ component:
32
+ 'One native anchor covers the entire tile. The label supplies its accessible name; Icon-tile 40 is decorative. Use current=true (or aria-current="page") for the current page. Hover and touch press use Surface/sunken; keyboard focus outlines the entire tile, including Current. Text wraps and the 140px minimum height grows with content. Parent layouts control column count and equal row heights.',
33
+ },
34
+ },
35
+ },
36
+ } satisfies Meta<typeof RcSesLinkTile>
37
+
38
+ export default meta
39
+ type Story = StoryObj<typeof meta>
40
+
41
+ export const Rest: Story = {
42
+ render: (args) => <RcSesLinkTile {...args} sx={{ width: 165 }} />,
43
+ }
44
+ export const Current: Story = {
45
+ args: { current: true },
46
+ render: (args) => <RcSesLinkTile {...args} sx={{ width: 165 }} />,
47
+ }
48
+ export const LongLabel: Story = {
49
+ args: {
50
+ label:
51
+ 'Pranešti apie pastebėtas informacijos ir asmens duomenų saugumo spragas bei gauti papildomą informaciją',
52
+ },
53
+ render: (args) => <RcSesLinkTile {...args} sx={{ width: 165 }} />,
54
+ }
55
+ export const States: Story = {
56
+ render: (args) => (
57
+ <Stack direction='row' useFlexGap sx={{ flexWrap: 'wrap', gap: 3, p: 1 }}>
58
+ <Box>
59
+ <Typography variant='caption'>Rest</Typography>
60
+ <RcSesLinkTile {...args} sx={{ width: 165 }} />
61
+ </Box>
62
+ <Box>
63
+ <Typography variant='caption'>Hover preview</Typography>
64
+ <RcSesLinkTile
65
+ {...args}
66
+ sx={{
67
+ width: 165,
68
+ backgroundColor: 'var(--rc-color-surface-sunken)',
69
+ borderColor: 'transparent',
70
+ }}
71
+ />
72
+ </Box>
73
+ <Box>
74
+ <Typography variant='caption'>Focus preview</Typography>
75
+ <RcSesLinkTile
76
+ {...args}
77
+ sx={{
78
+ width: 165,
79
+ outline: 'var(--rc-border-focus) solid var(--rc-color-border-focus)',
80
+ borderColor: 'transparent',
81
+ }}
82
+ />
83
+ </Box>
84
+ <Box>
85
+ <Typography variant='caption'>Current</Typography>
86
+ <RcSesLinkTile {...args} current sx={{ width: 165 }} />
87
+ </Box>
88
+ </Stack>
89
+ ),
90
+ }
91
+
92
+ export const MobileHelp: Story = {
93
+ tags: ['viewport-375'],
94
+ parameters: { layout: 'fullscreen' },
95
+ render: () => (
96
+ <Box
97
+ component='nav'
98
+ aria-label='Pagalbos nuorodos'
99
+ sx={{ maxWidth: 375, mx: 'auto', backgroundColor: 'var(--rc-color-surface-base)' }}
100
+ >
101
+ <Typography
102
+ component='h2'
103
+ sx={{
104
+ px: 2,
105
+ py: 3,
106
+ fontFamily: typographyTokens['font-family'],
107
+ fontSize: typographyTokens['font-size-heading-h2'],
108
+ lineHeight: typographyTokens['line-height-heading-h2'],
109
+ fontWeight: typographyTokens['font-weight-heading-h2'],
110
+ letterSpacing: typographyTokens['letter-spacing-heading-h2'],
111
+ }}
112
+ >
113
+ Pagalba
114
+ </Typography>
115
+ <Box
116
+ sx={{
117
+ display: 'grid',
118
+ gridTemplateColumns: 'repeat(2, minmax(0, 1fr))',
119
+ gridAutoRows: 'minmax(150px, auto)',
120
+ gap: '12px',
121
+ px: '16px',
122
+ py: '8px',
123
+ }}
124
+ >
125
+ <RcSesLinkTile href='#faq' label={'D.U.K.\n\n'} Icon={Chats} />
126
+ <RcSesLinkTile href='#assistant' label='Virtualus asistentas' Icon={Chat} />
127
+ <RcSesLinkTile
128
+ href='#appointment'
129
+ label={'Registruotis\nvizitui'}
130
+ Icon={InfoIcon}
131
+ />
132
+ <RcSesLinkTile
133
+ href='#security'
134
+ label='Pranešti apie saugumo spragas'
135
+ Icon={ShieldWarning}
136
+ />
137
+ </Box>
138
+ <Box sx={{ pl: '20px', py: '4px' }}>
139
+ <RcSesButton
140
+ component='a'
141
+ href='#help'
142
+ variant='link'
143
+ endIcon={<ArrowRightIcon aria-hidden='true' />}
144
+ sx={{ maxWidth: '100%', whiteSpace: 'normal', textAlign: 'left' }}
145
+ >
146
+ Visa Pagalbos centro informacija
147
+ </RcSesButton>
148
+ </Box>
149
+ </Box>
150
+ ),
151
+ }
@@ -1,9 +1,9 @@
1
1
  import type { Meta, StoryObj } from '@storybook/react-vite'
2
+ import type { CSSProperties } from 'react'
2
3
 
3
4
  import { CheckCircleFillIcon, WarningFillIcon } from '@/assets/icons/phosphorIcons'
4
5
  import ListWithIcons from '@/components/common/ListWithIcons'
5
6
  import { type ListWithIconsItemData } from '@/components/common/ListWithIcons/ListWithIcons.types'
6
- import { secondary } from '@/theme/palette'
7
7
 
8
8
  const baseItems: ListWithIconsItemData[] = [
9
9
  {
@@ -84,7 +84,7 @@ export const TextTones: Story = {
84
84
  }
85
85
 
86
86
  const customColorItems: ListWithIconsItemData[] = [
87
- { text: 'Custom palette color', textColor: secondary['700'] },
87
+ { text: 'Custom palette color', textColor: '#008561' },
88
88
  ]
89
89
 
90
90
  export const CustomColor: Story = {
@@ -93,3 +93,28 @@ export const CustomColor: Story = {
93
93
  items: customColorItems,
94
94
  },
95
95
  }
96
+
97
+ export const TokenBindings: Story = {
98
+ args: {
99
+ items: toneItems.map((item) => ({
100
+ ...item,
101
+ icon: CheckCircleFillIcon,
102
+ tooltip: 'Meta-info tooltip',
103
+ })),
104
+ },
105
+ }
106
+
107
+ export const TokenOverrides: Story = {
108
+ render: (args) => (
109
+ <div
110
+ style={
111
+ {
112
+ '--rc-color-text-secondary': '#0079ad',
113
+ '--rc-icon-size-inline': '20px',
114
+ } as CSSProperties
115
+ }
116
+ >
117
+ <ListWithIcons {...args} />
118
+ </div>
119
+ ),
120
+ }
@@ -143,6 +143,7 @@ export const Main: Story = {
143
143
  { label: 'Pick 2', value: 'pick2' },
144
144
  { label: 'Pick 3', value: 'pick3' },
145
145
  { label: 'Pick 4', value: 'pick4' },
146
+ { label: 'Disabled', value: 'pick5', disabled: true },
146
147
  ],
147
148
  },
148
149
  parameters: {
@@ -155,3 +156,25 @@ export const Main: Story = {
155
156
  },
156
157
  },
157
158
  }
159
+
160
+ function KeyboardPreview() {
161
+ const { control } = useForm({ defaultValues: { choice: 'first' } })
162
+ return (
163
+ <RcSesRadioButtonGroup
164
+ id='keyboard-choice'
165
+ name='choice'
166
+ label='Keyboard selection'
167
+ control={control}
168
+ options={[
169
+ { label: 'First option', value: 'first' },
170
+ { label: 'Second option', value: 'second' },
171
+ ]}
172
+ variant='flat'
173
+ />
174
+ )
175
+ }
176
+
177
+ export const KeyboardSelection = {
178
+ tags: ['no-snapshot'],
179
+ render: () => <KeyboardPreview />,
180
+ }