@orangesk/orange-design-system 2.0.0-beta.47 → 2.0.0-beta.48

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 (91) hide show
  1. package/build/components/BlockAction/style.css +1 -1
  2. package/build/components/BlockAction/style.css.map +1 -1
  3. package/build/components/Breadcrumbs/style.css +1 -1
  4. package/build/components/Breadcrumbs/style.css.map +1 -1
  5. package/build/components/DocumentationSidebar/style.css +1 -1
  6. package/build/components/DocumentationSidebar/style.css.map +1 -1
  7. package/build/components/Icon/style.css +1 -1
  8. package/build/components/Icon/style.css.map +1 -1
  9. package/build/components/Loader/style.css +1 -1
  10. package/build/components/Loader/style.css.map +1 -1
  11. package/build/components/Megamenu/style.css +1 -1
  12. package/build/components/Megamenu/style.css.map +1 -1
  13. package/build/components/Pagination/style.css +1 -1
  14. package/build/components/Pagination/style.css.map +1 -1
  15. package/build/components/PromotionCard/style.css +1 -1
  16. package/build/components/PromotionCard/style.css.map +1 -1
  17. package/build/components/Section/style.css +1 -1
  18. package/build/components/Section/style.css.map +1 -1
  19. package/build/components/SocialButton/style.css +1 -1
  20. package/build/components/SocialButton/style.css.map +1 -1
  21. package/build/components/Stepbar/style.css +1 -1
  22. package/build/components/Stepbar/style.css.map +1 -1
  23. package/build/components/Table/style.css +1 -1
  24. package/build/components/Table/style.css.map +1 -1
  25. package/build/components/Tag/style.css +1 -1
  26. package/build/components/Tag/style.css.map +1 -1
  27. package/build/components/Tile/style.css +1 -1
  28. package/build/components/Tile/style.css.map +1 -1
  29. package/build/components/index.js +1 -1
  30. package/build/components/index.js.map +1 -1
  31. package/build/components/tsconfig.tsbuildinfo +1 -1
  32. package/build/components/types/index.d.ts +4 -11
  33. package/build/components/types/src/components/Carousel/Carousel.static.d.ts +4 -1
  34. package/build/components/types/src/components/Forms/Autocomplete/Autocomplete.static.d.ts +11 -0
  35. package/build/components/types/src/components/Forms/Group/Group.d.ts +1 -1
  36. package/build/components/types/src/components/Tile/Tile.d.ts +3 -11
  37. package/build/lib/base.css +1 -1
  38. package/build/lib/base.css.map +1 -1
  39. package/build/lib/components.css +1 -1
  40. package/build/lib/components.css.map +1 -1
  41. package/build/lib/megamenu.css +1 -1
  42. package/build/lib/megamenu.css.map +1 -1
  43. package/build/lib/scripts.js +1 -1
  44. package/build/lib/scripts.js.map +1 -1
  45. package/build/lib/style.css +1 -1
  46. package/build/lib/style.css.map +1 -1
  47. package/build/lib/tsconfig.tsbuildinfo +1 -1
  48. package/build/lib/utilities.css +1 -1
  49. package/build/lib/utilities.css.map +1 -1
  50. package/build/search-index.json +4 -4
  51. package/package.json +17 -17
  52. package/src/components/BlockAction/styles/style.scss +6 -4
  53. package/src/components/Breadcrumbs/styles/style.scss +2 -1
  54. package/src/components/Carousel/Carousel.static.ts +29 -1
  55. package/src/components/Carousel/tests/Carousel.static.test.jsx +50 -0
  56. package/src/components/DocumentationSidebar/DocumentationSidebar.tsx +21 -34
  57. package/src/components/DocumentationSidebar/styles/style.scss +0 -6
  58. package/src/components/Forms/Autocomplete/Autocomplete.static.ts +190 -14
  59. package/src/components/Forms/Autocomplete/styles/style.scss +61 -8
  60. package/src/components/Forms/Autocomplete/tests/Autocomplete.static.test.ts +187 -0
  61. package/src/components/Forms/DatePicker/styles/style.scss +1 -2
  62. package/src/components/Forms/Group/Group.tsx +4 -1
  63. package/src/components/Forms/Group/styles/config.scss +1 -1
  64. package/src/components/Forms/Group/styles/mixins.scss +17 -0
  65. package/src/components/Forms/Group/tests/Group.unit.test.jsx +9 -0
  66. package/src/components/Forms/TextArea/styles/config.scss +1 -0
  67. package/src/components/Forms/TextArea/styles/mixins.scss +7 -1
  68. package/src/components/Forms/TextInput/styles/config.scss +3 -1
  69. package/src/components/Forms/TextInput/styles/mixins.scss +7 -1
  70. package/src/components/Forms/TextInput/styles/style.scss +17 -12
  71. package/src/components/Forms/styles/config.scss +3 -2
  72. package/src/components/Icon/styles/style.scss +2 -1
  73. package/src/components/Loader/styles/style.scss +0 -2
  74. package/src/components/Pagination/styles/mixins.scss +8 -6
  75. package/src/components/Pagination/styles/style.scss +0 -4
  76. package/src/components/Preview/PreviewGenerator.tsx +15 -2
  77. package/src/components/PromotionCard/styles/mixins.scss +2 -1
  78. package/src/components/Section/styles/mixins.scss +27 -5
  79. package/src/components/SocialButton/styles/config.scss +2 -2
  80. package/src/components/Stepbar/styles/style.scss +4 -2
  81. package/src/components/Table/styles/mixins.scss +6 -3
  82. package/src/components/Tag/styles/config.scss +1 -1
  83. package/src/components/Tag/styles/style.scss +22 -5
  84. package/src/components/Tile/Tile.tsx +18 -42
  85. package/src/components/Tile/styles/mixins.scss +45 -47
  86. package/src/components/Tile/styles/style.scss +5 -17
  87. package/src/components/Tile/tests/Tile.unit.test.jsx +9 -78
  88. package/src/styles/tokens/color-vars.scss +0 -2
  89. package/src/styles/utilities/color.scss +0 -153
  90. package/src/components/Tile/CHANGELOG.md +0 -28
  91. package/src/components/Tile/styles/config.scss +0 -7
@@ -93,7 +93,7 @@
93
93
  },
94
94
  {
95
95
  "href": "/components/forms/addons",
96
- "content": "Search Icon Add search icon to TextInput using searchIcon=\"transient\". For Autocomplete, use .input--search-icon through autocompleteConfig.customInputClassName. Icon is visible when element is not focused and doesn't have value. It's required to set empty placeholder. Usage with placeholder is described in the example below. Does not apply for radios and checkboxes. <br /> <br /> <br /> Search icon with placeholder When displaying search icon on TextInput with placeholder, use searchIcon=\"persistent\". For Autocomplete, set .input--search-icon-with-placeholder through autocompleteConfig.customInputClassName. Does not apply for radios and checkboxes. Usage with Autocomplete Usage with TextInput Regular input Large input Control Group Add prefixes and suffixes to control elements. Does not apply for radios and checkboxes. Example Variants With Button Ok } control={{ type: \"text\", id: \"group-2\" }} /> Size kg</span>, Send]} control={{ type: \"text\", size: \"large\", id: \"group-3\" }} />"
96
+ "content": "Search Icon Add search icon to TextInput using searchIcon=\"transient\". For Autocomplete, use .input--search-icon through autocompleteConfig.customInputClassName. Icon is visible in default, focused, filled, disabled and invalid states. It's required to set empty placeholder. Usage with placeholder is described in the example below. Does not apply for radios and checkboxes. <br /> <br /> <br /> Search icon with placeholder When displaying search icon on TextInput with placeholder, use searchIcon=\"persistent\". For Autocomplete, set .input--search-icon-with-placeholder through autocompleteConfig.customInputClassName. Autocomplete with placeholder search icon includes a clear button when it has value. Does not apply for radios and checkboxes. Usage with Autocomplete Disabled autocomplete Usage with Group button Action} control={{ type: \"autocomplete\", id: \"search-group-button\", options: [\"\", \"apple\", \"apricot\", \"banana\"], autocompleteConfig: { customInputClassName: \"input--search-icon-with-placeholder\", placeholder: \"Placeholder text\", }, placeholder: \"\", }} /> Disabled group button Action } control={{ type: \"autocomplete\", id: \"search-group-button-disabled\", options: [\"\", \"apple\", \"apricot\", \"banana\"], autocompleteConfig: { customInputClassName: \"input--search-icon-with-placeholder\", placeholder: \"Placeholder text\", }, placeholder: \"\", isDisabled: true, }} /> Usage with TextInput Regular input Large input Control Group Add prefixes and suffixes to control elements. Does not apply for radios and checkboxes. Example Variants With Button Ok } control={{ type: \"text\", id: \"group-2\" }} /> Size kg</span>, Send]} control={{ type: \"text\", size: \"large\", id: \"group-3\" }} />"
97
97
  },
98
98
  {
99
99
  "href": "/components/forms/autocomplete",
@@ -261,7 +261,7 @@
261
261
  },
262
262
  {
263
263
  "href": "/components/tag",
264
- "content": "Tag Tags are small, compact components used to categorize, label, or filter content. They help users quickly identify and organize information. Basic Usage Default Tag Colors Tags support various color variants to convey different meanings or match your design system. <ul className=\"list-unstyled\"> <li> default </li> <li> {\"orange\"} </li> <li> {\"black\"} </li> <li> {\"yellow\"} </li> <li> {\"green\"} </li> <li> {\"blue\"} </li> <li> {\"success\"} </li> <li> {\"danger\"} </li> <li> {\"info\"} </li> <li> {\"warning\"} </li> </ul> Transparent color variant The transparent variant is a standalone color variant and cannot be applied to other color variants. This means not all colored Tags can be made transparent. <ul className=\"list-unstyled\"> <li> {\"transparent\"} </li> </ul> Sizes Tags come in different sizes to fit various use cases. <ul className=\"list-unstyled\"> <li> {\"Small Tag\"} </li> <li> Default Tag </li> <li> {\"Large Tag\"} </li> </ul> Interactive Tags Tags can be interactive in different ways: as clickable buttons or as navigational links. Clickable Tags Link Tags Tags can function as links by providing an href prop, rendering as anchor elements for navigation. Link to Button Component {\"External Link\"} {\"Large Link Tag\"} Transparent Interactive Tags Examples with transparent color variant for both clickable and link functionality: Tags with Action Buttons Tags can include action buttons (like close/remove buttons) for more complex interactions. }> {\"Label with Action\"} }> {\"Label with Action\"} }> {\"Label with Action\"} Accessibility - Tags should have clear, descriptive text that conveys their purpose - Interactive tags (both clickable and link tags) must be keyboard accessible and provide appropriate focus states - When using color to convey meaning, ensure sufficient color contrast ratios - Action buttons within tags should have appropriate aria-labels for screen readers - Disabled tags should be properly indicated to assistive technologies - Link tags should have descriptive text or additional context for screen readers when the link purpose isn't clear from the text alone - External links should indicate they open in a new window/tab when applicable API React Props | Name | Type | Default | Description | | -------------- | ------------------------------------ | ------- | -------------------------------------------------------------------------------------------------------------------------------------------- | | color | TagColor | - | Tag color. Options: \"black\", \"orange\", \"yellow\", \"green\", \"blue\", \"success\", \"info\", \"warning\", \"danger\", \"transparent\". | | size | \"small\" \\| \"large\" | - | Tag size. | | isDisabled | boolean | false | Whether the tag is disabled. | | className | string | - | Additional CSS classes. | | children | React.ReactNode | - | Tag content. | | actionButton | React.ReactElement | - | Action button (close/remove button) within the tag. | | onClick | React.MouseEventHandler | - | Click handler (makes tag render as button). | | href | string | - | URL (makes tag render as link). |"
264
+ "content": "Tag Figma groups Tag into three showcases: Tag Interactive, Tag Action Button, and Tag Read Only. transparent is standalone color variant. Tag Interactive Buttons use onClick. Links use href. Button <div> {\"Label\"} {\"Label\"} {\"Label\"} {\"Label\"} {\"Label\"} {\"Label\"} {\"Label\"} {\"Label\"} {\"Label\"} </div> Link <div> {\"Label\"} {\"Label\"} {\"Label\"} {\"Label\"} {\"Label\"} {\"Label\"} </div> Tag Action Button Use actionButton for removable labels. <div> } > {\"Label\"} } > {\"Label\"} } > {\"Label\"} } > {\"Label\"} </div> Tag Read Only Sizes {\"Label\"} {\"Label\"} {\"Label\"} Brand colors {\"Label\"} {\"Label\"} {\"Label\"} {\"Label\"} {\"Label\"} Semantic colors Info Warning Success Orange Accessibility - Use plain text tags only for non-interactive metadata - Use onClick when tag behaves like button - Use href when tag performs navigation - Always provide visible text that explains tag meaning - Always provide ariaLabel on TagButton - Check contrast when color communicates status API React Props | Name | Type | Default | Description | | -------------- | ------------------------------------ | ------- | -------------------------------------------------------------------------------------------------------------------------------------------- | | color | TagColor | - | Tag color. Options: \"black\", \"orange\", \"yellow\", \"green\", \"blue\", \"success\", \"info\", \"warning\", \"danger\", \"transparent\". | | size | \"small\" \\| \"large\" | - | Tag size. Omit prop for default medium size. | | isDisabled | boolean | false | Disables button state and adds aria-disabled for link, read-only, and action-button variants. | | className | string | - | Additional CSS classes. | | children | React.ReactNode | - | Visible tag label. | | actionButton | React.ReactElement | - | Action button rendered next to label, typically for remove or dismiss flows. | | onClick | React.MouseEventHandler | - | Makes tag render as <button>. | | href | string | - | Makes tag render as <a>. |"
265
265
  },
266
266
  {
267
267
  "href": "/components/testimonial",
@@ -269,7 +269,7 @@
269
269
  },
270
270
  {
271
271
  "href": "/components/tile",
272
- "content": "Tile Tile fills container and allows us to set background image, icon or to align children. Used mostly in Carousel or Grid components. Basic Usage <h3 className=\"h5 bold\">Basic Tile</h3> <p>This is a basic tile with content.</p> With Block Actions Tiles work well with Block Actions to create clickable card-like interfaces. Use the hasBorderOnHover prop to add a border to the tile on hover. {[\"device-tablet\", \"device-tv\", \"device-smart-phone\", \"device-tablet\"].map( (icon, index) => ( {\"Paušály\"} ), )} Vertical Alignment Tiles support different vertical alignment options with vAlign prop. {[\"device-tablet\", \"device-tv\", \"device-smart-phone\", \"device-tablet\"].map( (icon, index) => ( {\"Faktúry a platby\"} ), )} Action Variant Tiles can use the action variant for simple interactive elements. {[\"device-tablet\", \"device-tv\", \"device-smart-phone\", \"device-tablet\"].map( (icon, index) => ( {\"Ostatné možnosti dobitia\"} ), )} Colors Tiles support various background colors using global surface and background utility classes. These colors work consistently across the design system. <h3 className=\"h5 bold\">Default</h3> <p>No background color applied</p> <h3 className=\"h5 bold\">Surface Primary</h3> <p>White surface color</p> <h3 className=\"h5 bold\">Surface Subtle</h3> <p>Subtle gray surface</p> <h3 className=\"h5 bold\">Surface Contrast</h3> <p>Dark background with white text</p> Background Images Tiles can display background images with content overlaid. Use the backgroundImage prop with variant=\"image\". <h3 className=\"bold\">Background Image</h3> <p> {Volajte doma aj v zahraničí s paušálom aj bez viazanosti presne tak, ako to potrebujete.} </p> <h3 className=\"bold\">Telefóny a zariadenia</h3> <h3 className=\"bold\">Výhodné balíčky</h3> <p> {Internet, TV a paušál dokopy vám poskytnú skvelé výhody pre celú rodinu s balíkmi Love.} </p> Content Alignment Content within tiles can be aligned using hAlign and vAlign props for flexible positioning. {\"Default \"} <br /> {\" (left)\"} Center vertical Center horizontal End <p>Space</p> <p>between</p> {\"Center center alignment\"} <p>Center</p> <p>space-between</p> With Block Actions and Overrides Complex tiles can include primary actions and override buttons for more sophisticated interactions. <h3 className=\"bold\"> {\"Block heading\"} </h3> <p>Lorem Ipsum</p> Override button Usage Tiles are versatile containers that work well in: - Product grids and carousels - Feature showcases with icons - Navigation cards - Image galleries with overlaid content - Interactive dashboards When using tiles with Block Actions, ensure that the primary action (BlockActionControl) is clearly indicated and any override actions (BlockActionOverride) don't conflict with the main interaction. API React Props | Name | Type | Default | Description | | ----------------- | -------------------------------------- | ------- | ----------------------------------------------------------------------------------- | | color | TileColor | - | Tile color. Options: \"surface-primary\", \"surface-subtle\", \"surface-contrast\". | | hAlign | \"center\" | - | Horizontal alignment of the tile content. | | vAlign | \"center\" \\| \"end\" \\| \"space-between\" | - | Vertical alignment of the tile content. | | variant | \"image\" \\| \"action\" | - | Tile variant. | | backgroundImage | React.ComponentProps<typeof Image> | - | Alt and src attributes are required. | | space | \"small\" | - | Use small spacing. | | children | React.ReactNode | - | Tile content. | | className | string | - | Additional CSS classes. |"
272
+ "content": "Tile Tile grid {Array.from({ length: 7 }).map((, index) => ( <h3 className=\"h5 bold\"> Default label </h3> ))} Tile row {Array.from({ length: 4 }).map((, index) => ( Default label ))} Action variant {Array.from({ length: 3 }).map((_, index) => ( Default label ))} API React Props | Name | Type | Default | Description | | ----------- | -------------------------------------- | ------- | --------------------------------------------------------------------------------------------------------------- | | variant | \"compact\" \\| \"action\" | - | Compact reduces spacing, uses row layout on mobile and stacks from sm up. Action adds row layout and chevron. | | hAlign | \"center\" | - | Horizontal alignment of tile content. | | vAlign | \"center\" \\| \"end\" \\| \"space-between\" | - | Vertical alignment of tile content. | | children | React.ReactNode | - | Tile content. | | className | string | - | Additional CSS classes. |"
273
273
  },
274
274
  {
275
275
  "href": "/components/tooltip",
@@ -389,7 +389,7 @@
389
389
  },
390
390
  {
391
391
  "href": "/utilities/color",
392
- "content": "import Code from \"@/components/Code\"; Color Utilities Utility classes for applying colors based on our semantic design tokens. These classes automatically adapt to light and dark themes. 📖 For complete color system documentation, including theme switching and color philosophy, see our Color Palette & Theme System guide. ⚠️ Always check that your color combinations meet WCAG accessibility guidelines. Token-Based Utility Classes Our color utilities are automatically generated from semantic design tokens. Every class supports both light and dark themes through our .is-light and .is-dark system. Theme Switching Examples All color utilities work with our .is-light and .is-dark theme classes: <div className=\"is-light background-primary text-default p-4 border border-subtle rounded mb-4\"> <h4 className=\"bold\">Light Theme Section</h4> <p className=\"text-secondary\">Secondary text in light theme</p> <button className=\"surface-secondary text-inverse px-3 py-2 rounded\"> Orange Button </button> </div> <div className=\"is-dark background-primary text-default p-4 border border-subtle rounded\"> <h4 className=\"bold\">Dark Theme Section</h4> <p className=\"text-secondary\">Secondary text in dark theme</p> <button className=\"surface-secondary text-inverse px-3 py-2 rounded\"> Orange Button </button> </div> Text Color Utilities Use these classes to apply text colors: - .text-default - Default text color (black in light mode, white in dark mode) - .text-secondary - Secondary text color for less prominent content - .text-disabled - Disabled text color - .text-inverse - Inverse text color (white in light mode, black in dark mode) - .text-accent - Brand accent color (orange) - .text-information - Information/blue text - .text-positive - Success/green text - .text-warning - Warning/yellow text - .text-negative - Error/red text <p className=\"text-default\">Default text color</p> <p className=\"text-secondary\">Secondary text color</p> <p className=\"text-disabled\">Disabled text color</p> <p className=\"background-contrast text-inverse\"> {\"Inverse text color on dark background\"} </p> <p className=\"text-accent\">Accent text color</p> <p className=\"text-information\">Information text color</p> <p className=\"text-positive\">Success text color</p> <p className=\"text-warning\">Warning text color</p> <p className=\"text-negative\">Error text color</p> Icon Color Utilities Use these classes to apply colors to icons: - .icon-default - Default icon color - .icon-inverse - Inverse icon color - .icon-brand - Brand orange color - .icon-accent - Accent color variation - .icon-disabled - Disabled icon color - .icon-information - Information/blue color - .icon-positive - Success/green color - .icon-warning - Warning/yellow color - .icon-negative - Error/red color <span className=\"icon-default\"> </span> <span className=\"icon-inverse\"> </span> <span className=\"icon-brand\"> </span> <span className=\"icon-information\"> </span> <span className=\"icon-positive\"> </span> <span className=\"icon-warning\"> </span> <span className=\"icon-negative\"> </span> Background Utilities Primary Backgrounds - .background-primary - Primary background (white in light mode, dark in dark mode) - .background-secondary - Secondary background for subtle contrast - .background-contrast - High contrast background - .background-accent - Accent background for special content - .background-accent1-blog - Blog accent 1 background - .background-accent2-blog - Blog accent 2 background <p className=\"background-primary\">Primary background</p> <p className=\"background-secondary\">Secondary background</p> <p className=\"background-contrast text-inverse\">Contrast background</p> <p className=\"background-accent\">Accent background</p> <p className=\"background-accent1-blog\">Accent 1 Blog background</p> <p className=\"background-accent2-blog\">Accent 2 Blog background</p> Surface Utilities - .surface-primary - Primary surface - .surface-secondary - Brand orange surface - .surface-tertiary - Dark orange surface - .surface-subtle - Subtle surface for grouping - .surface-moderate - Moderate surface - .surface-contrast - High contrast surface - .surface-accent - Accent surface <p className=\"surface-primary\">Primary surface</p> <p className=\"surface-secondary text-inverse\">Secondary surface</p> <p className=\"surface-tertiary text-inverse\">Tertiary surface</p> <p className=\"surface-subtle\">Subtle surface</p> <p className=\"surface-moderate\">Moderate surface</p> <p className=\"surface-contrast text-inverse\">Contrast surface</p> <p className=\"surface-accent\">Accent surface</p> Fill Utilities - .fill-primary - Primary fill color - .fill-secondary - Secondary fill color (brand orange) - .fill-tertiary - Tertiary fill color (dark orange) - .fill-subtle - Subtle fill color - .fill-moderate - Moderate fill color - .fill-disabled - Disabled fill color - .fill-contrast - Contrast fill color - .fill-accent1 - Blue accent fill - .fill-accent2 - Green accent fill - .fill-accent3 - Pink accent fill - .fill-accent4 - Violet accent fill - .fill-accent5 - Yellow accent fill - .fill-information - Information background - .fill-positive - Success background - .fill-warning - Warning background - .fill-negative - Error background <p className=\"fill-primary\">Primary fill</p> <p className=\"fill-secondary text-inverse\">Secondary fill</p> <p className=\"fill-tertiary text-inverse\">Tertiary fill</p> <p className=\"fill-subtle\">Subtle fill</p> <p className=\"fill-moderate\">Moderate fill</p> <p className=\"fill-disabled\">Disabled fill</p> <p className=\"fill-contrast text-inverse\">Contrast fill</p> <p className=\"fill-accent1 text-inverse\">Blue accent fill</p> <p className=\"fill-accent2 text-inverse\">Green accent fill</p> <p className=\"fill-accent3 text-inverse\">Pink accent fill</p> <p className=\"fill-accent4 text-inverse\">Violet accent fill</p> <p className=\"fill-accent5 text-inverse\">Yellow accent fill</p> <p className=\"fill-information\">Information background</p> <p className=\"fill-positive\">Success background</p> <p className=\"fill-warning\">Warning background</p> <p className=\"fill-negative\">Error background</p> Border Utilities Use these classes to apply border colors: - .border-subtle - Subtle border - .border-strong - Strong border - .border-contrast - High contrast border - .border-accent - Brand accent border - .border-information - Information border - .border-positive - Success border - .border-warning - Warning border - .border-negative - Error border <div className=\"border border-subtle p-4 mb-small\">Subtle border</div> <div className=\"border border-strong p-4 mb-small\">Strong border</div> <div className=\"border border-contrast p-4 mb-small\">Contrast border</div> <div className=\"border border-accent p-4 mb-small\">Accent border</div> <div className=\"border border-information p-4 mb-small\"> Information border </div> <div className=\"border border-positive p-4 mb-small\">Success border</div> <div className=\"border border-warning p-4 mb-small\">Warning border</div> <div className=\"border border-negative p-4\">Error border</div> Legacy Classes (Deprecated) ⚠️ These classes are deprecated and will be removed in future versions. Please use the new token-based classes above. Legacy Text Colors These classes still work but will show deprecation warnings: .color-black → Use .text-default <p>Default text color is black</p> <p className=\"color-black\"> {\"But can be enforced with \"} <code>.color-black</code> {\" if needed. (Deprecated - use .text-default)\"} </p> .color-orange → Use .text-accent <p className=\"color-orange large bold\"> {\"Orange text (Deprecated - use .text-accent)\"} </p> .color-white → Use .text-inverse <p className=\"bg-black color-white\"> {\"White text (Deprecated - use .text-inverse)\"} </p> .color-gray → Use .text-secondary <p className=\"color-gray\">Gray text (Deprecated - use .text-secondary)</p> .color-blue → Use .icon-information <p className=\"color-blue\">Blue text (Deprecated - use .icon-information)</p> .color-danger → Use .icon-negative <p className=\"color-danger\">Danger text (Deprecated - use .icon-negative)</p> Legacy Background Colors These classes still work but will show deprecation warnings: .bg-white → Use .background-primary <p className=\"bg-white\"> {\"Default background (Deprecated - use .background-primary)\"} </p> .bg-black → Use .background-contrast <p className=\"bg-black\"> {\"Black background (Deprecated - use .background-contrast)\"} </p> .bg-orange → Use .surface-secondary <p className=\"bg-orange\"> {\"Orange background (Deprecated - use .surface-secondary)\"} </p> .bg-orange-dark → Use .surface-tertiary <p className=\"bg-orange-dark text-inverse\"> {\"Dark orange background (Deprecated - use .surface-tertiary)\"} </p> .bg-gray → Use .surface-subtle <p className=\"bg-gray\">Gray background (Deprecated - use .surface-subtle)</p> .bg-gray-lighter → Use .background-secondary <p className=\"bg-gray-lighter\"> {\"Light gray background (Deprecated - use .background-secondary)\"} </p> Accent Colors → Use .background- or .fill- <p className=\"bg-accent\"> {\"Accent background (Deprecated - use .background-accent)\"} </p> <p className=\"bg-accent1-blog\"> {\"Accent1 blog (Deprecated - use .background-accent1-blog)\"} </p> <p className=\"bg-accent2-blog\"> {\"Accent2 blog (Deprecated - use .background-accent2-blog)\"} </p> Supporting Colors → Use .fill-accent <p className=\"bg-blue\">Blue background (Deprecated - use .fill-accent1)</p> <p className=\"bg-green\">Green background (Deprecated - use .fill-accent2)</p> <p className=\"bg-pink\">Pink background (Deprecated - use .fill-accent3)</p> <p className=\"bg-violet\"> {\"Violet background (Deprecated - use .fill-accent4)\"} </p> <p className=\"bg-yellow\"> {\"Yellow background (Deprecated - use .fill-accent5)\"} </p> <p className=\"bg-red\">Red background (Deprecated - use .fill-negative)</p> Migration Guide When updating your code, use this mapping: Text Colors - .color-black → .text-default - .color-orange → .text-accent - .color-white → .text-inverse - .color-gray → .text-secondary - .color-blue → .icon-information - .color-danger → .icon-negative Background Colors - .bg-white → .background-primary - .bg-black → .background-contrast - .bg-orange → .surface-secondary - .bg-orange-dark → .surface-tertiary - .bg-gray → .surface-subtle - .bg-gray-lighter → .background-secondary - .bg-blue → .fill-accent1 - .bg-green → .fill-accent2 - .bg-pink → .fill-accent3 - .bg-violet → .fill-accent4 - .bg-yellow → .fill-accent5 - .bg-red → .fill-negative - .bg-accent → .background-accent - .bg-none → .background-none .bg-none → Use .background-none <p className=\"bg-none\">No background (Deprecated - use .background-none)</p> Special Utilities - .background-none - Removes background Best Practices 1. Use semantic names: Choose classes based on meaning rather than visual appearance 2. Consider theme compatibility: All token-based classes automatically adapt to light/dark themes 3. Test accessibility: Always verify color contrast meets WCAG guidelines 4. Migrate gradually: Legacy classes still work but show warnings to help with migration 5. Use border utilities: Apply consistent border colors using the new .border- classes 📖 For detailed guidance on theme switching, CSS variables, and color system architecture, see our Color Palette & Theme System documentation. Related Documentation - Color Palette & Theme System - Complete color system guide - Design Tokens - Token system overview - Accessibility - Color accessibility guidelines"
392
+ "content": "Color Utilities Utility classes for applying colors based on our semantic design tokens. These classes automatically adapt to light and dark themes. 📖 For complete color system documentation, including theme switching and color philosophy, see our Color Palette & Theme System guide. ⚠️ Always check that your color combinations meet WCAG accessibility guidelines. Token-Based Utility Classes Our color utilities are automatically generated from semantic design tokens. Every class supports both light and dark themes through our .is-light and .is-dark system. Theme Switching Examples All color utilities work with our .is-light and .is-dark theme classes: <div className=\"is-light background-primary text-default p-4 border border-subtle rounded mb-4\"> <h4 className=\"bold\">Light Theme Section</h4> <p className=\"text-secondary\">Secondary text in light theme</p> <button className=\"surface-secondary text-inverse px-3 py-2 rounded\"> Orange Button </button> </div> <div className=\"is-dark background-primary text-default p-4 border border-subtle rounded\"> <h4 className=\"bold\">Dark Theme Section</h4> <p className=\"text-secondary\">Secondary text in dark theme</p> <button className=\"surface-secondary text-inverse px-3 py-2 rounded\"> Orange Button </button> </div> Text Color Utilities Use these classes to apply text colors: - .text-default - Default text color (black in light mode, white in dark mode) - .text-secondary - Secondary text color for less prominent content - .text-disabled - Disabled text color - .text-inverse - Inverse text color (white in light mode, black in dark mode) - .text-accent - Brand accent color (orange) <p className=\"text-default\">Default text color</p> <p className=\"text-secondary\">Secondary text color</p> <p className=\"text-disabled\">Disabled text color</p> <p className=\"background-contrast text-inverse\"> {\"Inverse text color on dark background\"} </p> <p className=\"text-accent\">Accent text color</p> Icon Color Utilities Use these classes to apply colors to icons: - .icon-default - Default icon color - .icon-inverse - Inverse icon color - .icon-brand - Brand orange color - .icon-accent - Accent color variation - .icon-disabled - Disabled icon color - .icon-information - Information/blue color - .icon-positive - Success/green color - .icon-warning - Warning/yellow color - .icon-negative - Error/red color <span className=\"icon-default\"> </span> <span className=\"icon-inverse\"> </span> <span className=\"icon-brand\"> </span> <span className=\"icon-information\"> </span> <span className=\"icon-positive\"> </span> <span className=\"icon-warning\"> </span> <span className=\"icon-negative\"> </span> Background Utilities Primary Backgrounds - .background-primary - Primary background (white in light mode, dark in dark mode) - .background-secondary - Secondary background for subtle contrast - .background-contrast - High contrast background - .background-accent - Accent background for special content - .background-accent1-blog - Blog accent 1 background - .background-accent2-blog - Blog accent 2 background <p className=\"background-primary\">Primary background</p> <p className=\"background-secondary\">Secondary background</p> <p className=\"background-contrast text-inverse\">Contrast background</p> <p className=\"background-accent\">Accent background</p> <p className=\"background-accent1-blog\">Accent 1 Blog background</p> <p className=\"background-accent2-blog\">Accent 2 Blog background</p> Surface Utilities - .surface-primary - Primary surface - .surface-secondary - Brand orange surface - .surface-tertiary - Dark orange surface - .surface-subtle - Subtle surface for grouping - .surface-moderate - Moderate surface - .surface-contrast - High contrast surface - .surface-accent - Accent surface <p className=\"surface-primary\">Primary surface</p> <p className=\"surface-secondary text-inverse\">Secondary surface</p> <p className=\"surface-tertiary text-inverse\">Tertiary surface</p> <p className=\"surface-subtle\">Subtle surface</p> <p className=\"surface-moderate\">Moderate surface</p> <p className=\"surface-contrast text-inverse\">Contrast surface</p> <p className=\"surface-accent\">Accent surface</p> Fill Utilities - .fill-primary - Primary fill color - .fill-secondary - Secondary fill color (brand orange) - .fill-tertiary - Tertiary fill color (dark orange) - .fill-subtle - Subtle fill color - .fill-moderate - Moderate fill color - .fill-disabled - Disabled fill color - .fill-contrast - Contrast fill color - .fill-accent1 - Blue accent fill - .fill-accent2 - Green accent fill - .fill-accent3 - Pink accent fill - .fill-accent4 - Violet accent fill - .fill-accent5 - Yellow accent fill - .fill-information - Information background - .fill-positive - Success background - .fill-warning - Warning background - .fill-negative - Error background <p className=\"fill-primary\">Primary fill</p> <p className=\"fill-secondary text-inverse\">Secondary fill</p> <p className=\"fill-tertiary text-inverse\">Tertiary fill</p> <p className=\"fill-subtle\">Subtle fill</p> <p className=\"fill-moderate\">Moderate fill</p> <p className=\"fill-disabled\">Disabled fill</p> <p className=\"fill-contrast text-inverse\">Contrast fill</p> <p className=\"fill-accent1 text-inverse\">Blue accent fill</p> <p className=\"fill-accent2 text-inverse\">Green accent fill</p> <p className=\"fill-accent3 text-inverse\">Pink accent fill</p> <p className=\"fill-accent4 text-inverse\">Violet accent fill</p> <p className=\"fill-accent5 text-inverse\">Yellow accent fill</p> <p className=\"fill-information\">Information background</p> <p className=\"fill-positive\">Success background</p> <p className=\"fill-warning\">Warning background</p> <p className=\"fill-negative\">Error background</p> Border Utilities Use these classes to apply border colors: - .border-subtle - Subtle border - .border-strong - Strong border - .border-contrast - High contrast border - .border-accent - Brand accent border - .border-information - Information border - .border-positive - Success border - .border-warning - Warning border - .border-negative - Error border <div className=\"border border-subtle p-4 mb-small\">Subtle border</div> <div className=\"border border-strong p-4 mb-small\">Strong border</div> <div className=\"border border-contrast p-4 mb-small\">Contrast border</div> <div className=\"border border-accent p-4 mb-small\">Accent border</div> <div className=\"border border-information p-4 mb-small\"> Information border </div> <div className=\"border border-positive p-4 mb-small\">Success border</div> <div className=\"border border-warning p-4 mb-small\">Warning border</div> <div className=\"border border-negative p-4\">Error border</div> Special Utilities - .background-none - Removes background Best Practices 1. Use semantic names: Choose classes based on meaning rather than visual appearance 2. Consider theme compatibility: All token-based classes automatically adapt to light/dark themes 3. Test accessibility: Always verify color contrast meets WCAG guidelines 4. Use background-none: Remove background completely when you need transparent layout 5. Use border utilities: Apply consistent border colors using the new .border- classes 📖 For detailed guidance on theme switching, CSS variables, and color system architecture**, see our Color Palette & Theme System documentation. Related Documentation - Color Palette & Theme System - Complete color system guide - Design Tokens - Token system overview - Accessibility - Color accessibility guidelines"
393
393
  },
394
394
  {
395
395
  "href": "/utilities/flex-alignment",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orangesk/orange-design-system",
3
- "version": "2.0.0-beta.47",
3
+ "version": "2.0.0-beta.48",
4
4
  "private": false,
5
5
  "engines": {
6
6
  "node": ">=20.x"
@@ -63,8 +63,8 @@
63
63
  "classnames": "^2.5.1",
64
64
  "daypickr": "^0.3.4",
65
65
  "diff2html": "^3.4.56",
66
- "dompurify": "^3.4.2",
67
- "html-react-parser": "6.1.0",
66
+ "dompurify": "^3.4.5",
67
+ "html-react-parser": "6.1.2",
68
68
  "lorem-ipsum": "3.0.0",
69
69
  "minisearch": "7.2.0",
70
70
  "next": "16.2.6",
@@ -99,38 +99,38 @@
99
99
  "@rollup/plugin-terser": "1.0.0",
100
100
  "@rollup/plugin-typescript": "^12.3.0",
101
101
  "@rollup/plugin-url": "^8.0.2",
102
- "@rollup/rollup-darwin-arm64": "^4.60.3",
102
+ "@rollup/rollup-darwin-arm64": "^4.60.4",
103
103
  "@testing-library/dom": "^10.4.1",
104
104
  "@testing-library/jest-dom": "^6.9.1",
105
105
  "@testing-library/react": "^16.3.2",
106
106
  "@testing-library/user-event": "^14.6.1",
107
- "@types/node": "25.6.2",
108
- "@types/react": "19.2.14",
107
+ "@types/node": "25.9.1",
108
+ "@types/react": "19.2.15",
109
109
  "@types/react-dom": "19.2.3",
110
110
  "@types/wnumb": "^1.2.3",
111
- "@vitejs/plugin-react": "6.0.1",
112
- "@vitest/browser": "^4.1.5",
113
- "@vitest/browser-playwright": "^4.1.5",
114
- "@vitest/coverage-v8": "^4.1.5",
115
- "@vitest/ui": "^4.1.5",
111
+ "@vitejs/plugin-react": "6.0.2",
112
+ "@vitest/browser": "^4.1.7",
113
+ "@vitest/browser-playwright": "^4.1.7",
114
+ "@vitest/coverage-v8": "^4.1.7",
115
+ "@vitest/ui": "^4.1.7",
116
116
  "canvas": "^3.2.3",
117
117
  "fs-extra": "^11.3.5",
118
118
  "glob": "13.0.6",
119
- "html-validate": "10.16.0",
119
+ "html-validate": "11.2.0",
120
120
  "husky": "^9.1.7",
121
121
  "identity-obj-proxy": "^3.0.0",
122
122
  "jsdom": "29.1.1",
123
- "lint-staged": "17.0.4",
124
- "playwright": "^1.59.1",
123
+ "lint-staged": "17.0.5",
124
+ "playwright": "^1.60.0",
125
125
  "prettier": "^3.8.3",
126
- "rollup": "^4.60.3",
126
+ "rollup": "^4.60.4",
127
127
  "rollup-plugin-copy": "^3.5.0",
128
128
  "rollup-plugin-dts": "^6.4.1",
129
129
  "rollup-plugin-postcss": "^4.0.2",
130
- "sass": "^1.99.0",
130
+ "sass": "^1.100.0",
131
131
  "svg-sprite": "^2.0.4",
132
132
  "typescript": "6.0.3",
133
- "vitest": "^4.1.5",
133
+ "vitest": "^4.1.7",
134
134
  "vitest-axe": "^0.1.0",
135
135
  "vitest-browser-react": "^2.2.0"
136
136
  },
@@ -15,19 +15,21 @@
15
15
  &__indicator.is-indicating:not(.block-action__indicator--color-reset) {
16
16
  @include mixins.indicator;
17
17
 
18
- .bg-white & {
18
+ .background-primary &,
19
+ .surface-primary & {
19
20
  @include mixins.indicator;
20
21
  }
21
22
 
22
- .bg-black & {
23
+ .background-contrast &,
24
+ .surface-contrast & {
23
25
  @include mixins.indicator("black");
24
26
  }
25
27
 
26
- .bg-orange & {
28
+ .surface-secondary & {
27
29
  @include mixins.indicator("orange");
28
30
  }
29
31
 
30
- .bg-orange-dark & {
32
+ .surface-tertiary & {
31
33
  @include mixins.indicator("orange-dark");
32
34
  }
33
35
  }
@@ -12,7 +12,8 @@
12
12
  .osk-breadcrumbs__item {
13
13
  @include mixins.item;
14
14
 
15
- .bg-black &,
15
+ .background-contrast &,
16
+ .surface-contrast &,
16
17
  .is-dark & {
17
18
  @include mixins.item-dark;
18
19
  }
@@ -31,6 +31,11 @@ import {
31
31
  SELECTOR_VIEWPORT,
32
32
  } from "./constants";
33
33
 
34
+ interface ExternalControlsState {
35
+ isAtStart: boolean;
36
+ isAtEnd: boolean;
37
+ }
38
+
34
39
  export const defaultConfig: SwiperOptions = {
35
40
  navigation: {
36
41
  nextEl: SELECTOR_NEXT,
@@ -94,6 +99,8 @@ export default class Carousel {
94
99
  track!: HTMLElement;
95
100
  instance!: Swiper;
96
101
  carouselId?: string;
102
+ private isScrollbarDragging = false;
103
+ private externalControlsState: ExternalControlsState | null = null;
97
104
  private resizeObserver?: ResizeObserver;
98
105
  private resizeRafId?: number;
99
106
  private boundWindowResizeHandler: () => void;
@@ -215,6 +222,13 @@ export default class Carousel {
215
222
  slideChangeTransitionEnd: () => {
216
223
  this.updateExternalControlsState();
217
224
  },
225
+ scrollbarDragStart: () => {
226
+ this.isScrollbarDragging = true;
227
+ },
228
+ scrollbarDragEnd: () => {
229
+ this.isScrollbarDragging = false;
230
+ this.updateExternalControlsState(true);
231
+ },
218
232
  },
219
233
  });
220
234
 
@@ -697,7 +711,7 @@ export default class Carousel {
697
711
  * Update the disabled state of external navigation controls.
698
712
  * Controls are disabled at the start/end of the carousel based on slide position.
699
713
  */
700
- updateExternalControlsState() {
714
+ updateExternalControlsState(force = false) {
701
715
  if (!this.carouselId || !this.instance) {
702
716
  return;
703
717
  }
@@ -706,10 +720,22 @@ export default class Carousel {
706
720
  return;
707
721
  }
708
722
 
723
+ if (this.isScrollbarDragging && !force) {
724
+ return;
725
+ }
726
+
709
727
  const isDisabled = !this.instance.enabled;
710
728
  const isAtStart = isDisabled || this.instance.isBeginning;
711
729
  const isAtEnd = isDisabled || this.instance.isEnd;
712
730
 
731
+ this.externalControlsState = { isAtStart, isAtEnd };
732
+
733
+ this.applyExternalControlsState(this.externalControlsState);
734
+ }
735
+
736
+ private applyExternalControlsState(state: ExternalControlsState) {
737
+ const { isAtStart, isAtEnd } = state;
738
+
713
739
  const prevControls = document.querySelectorAll(
714
740
  `[data-carousel-controls="${this.carouselId}"][data-carousel-action="prev"]`,
715
741
  );
@@ -816,6 +842,8 @@ export default class Carousel {
816
842
  this.instance.destroy();
817
843
  }
818
844
 
845
+ this.isScrollbarDragging = false;
846
+ this.externalControlsState = null;
819
847
  this.resizeObserver?.disconnect();
820
848
  this.resizeObserver = undefined;
821
849
 
@@ -283,6 +283,56 @@ describe("Carousel Static - External Controls", () => {
283
283
  expect(updateStatesSpy).toHaveBeenCalled();
284
284
  }
285
285
  });
286
+
287
+ it("should keep external controls disabled while scrollbar drag is active", () => {
288
+ mockSwiperInstance.isBeginning = false;
289
+ mockSwiperInstance.isEnd = true;
290
+
291
+ carouselInstance.updateExternalControlsState();
292
+
293
+ const nextButton = document.getElementById("next-btn");
294
+ expect(nextButton).toHaveAttribute("disabled", "true");
295
+
296
+ const swiperConfig = Swiper.mock.calls[0]?.[1];
297
+ const slideChange = swiperConfig?.on?.slideChange;
298
+ const scrollbarDragStart = swiperConfig?.on?.scrollbarDragStart;
299
+
300
+ scrollbarDragStart?.();
301
+
302
+ expect(nextButton).toHaveAttribute("disabled", "true");
303
+ expect(nextButton).toHaveAttribute("aria-disabled", "true");
304
+
305
+ mockSwiperInstance.isBeginning = false;
306
+ mockSwiperInstance.isEnd = false;
307
+
308
+ slideChange?.();
309
+
310
+ expect(nextButton).toHaveAttribute("disabled", "true");
311
+ expect(nextButton).toHaveAttribute("aria-disabled", "true");
312
+ });
313
+
314
+ it("should sync external controls after scrollbar drag end", () => {
315
+ mockSwiperInstance.isBeginning = false;
316
+ mockSwiperInstance.isEnd = true;
317
+
318
+ carouselInstance.updateExternalControlsState();
319
+
320
+ const nextButton = document.getElementById("next-btn");
321
+ expect(nextButton).toHaveAttribute("disabled", "true");
322
+
323
+ const swiperConfig = Swiper.mock.calls[0]?.[1];
324
+ const scrollbarDragStart = swiperConfig?.on?.scrollbarDragStart;
325
+ const scrollbarDragEnd = swiperConfig?.on?.scrollbarDragEnd;
326
+
327
+ mockSwiperInstance.isBeginning = false;
328
+ mockSwiperInstance.isEnd = false;
329
+
330
+ scrollbarDragStart?.();
331
+ scrollbarDragEnd?.();
332
+
333
+ expect(nextButton).not.toHaveAttribute("disabled");
334
+ expect(nextButton).toHaveAttribute("aria-disabled", "false");
335
+ });
286
336
  });
287
337
 
288
338
  describe("Multiple Control Sets", () => {
@@ -381,7 +381,7 @@ export const DocumentationSidebar: React.FC<DocumentationSidebarProps> = (
381
381
  >
382
382
  <Image src="/logo.svg" alt="logo" />
383
383
 
384
- <div className={`${CLASS_ROOT}__search-container`}>
384
+ <div className="mb">
385
385
  <TextInput
386
386
  id="search-documentation"
387
387
  htmlType="search"
@@ -393,42 +393,29 @@ export const DocumentationSidebar: React.FC<DocumentationSidebarProps> = (
393
393
  aria-label="Search documentation"
394
394
  ref={searchInputRef}
395
395
  />
396
- {searchQuery && (
397
- <button
398
- type="button"
399
- className={`${CLASS_ROOT}__search-clear`}
400
- onClick={() => {
401
- setSearchQuery("");
402
- setSearchResults([]);
403
- }}
404
- aria-label="Clear search"
405
- >
406
-
407
- </button>
396
+
397
+ {searchResults.length > 0 && (
398
+ <div className={`${CLASS_ROOT}__search-results`}>
399
+ <ul className={`${CLASS_ROOT}__search-list`}>
400
+ {searchResults.map((result, index) => (
401
+ <li key={result.id}>
402
+ <Link
403
+ href={result.href}
404
+ className={cx(`${CLASS_ROOT}__search-result-link`, {
405
+ [`${CLASS_ROOT}__search-result-link--active`]:
406
+ index === activeSearchIndex,
407
+ })}
408
+ onClick={() => handleSelect(result.href)}
409
+ >
410
+ {result.label}
411
+ </Link>
412
+ </li>
413
+ ))}
414
+ </ul>
415
+ </div>
408
416
  )}
409
417
  </div>
410
418
 
411
- {searchResults.length > 0 && (
412
- <div className={`${CLASS_ROOT}__search-results`}>
413
- <ul className={`${CLASS_ROOT}__search-list`}>
414
- {searchResults.map((result, index) => (
415
- <li key={result.id}>
416
- <Link
417
- href={result.href}
418
- className={cx(`${CLASS_ROOT}__search-result-link`, {
419
- [`${CLASS_ROOT}__search-result-link--active`]:
420
- index === activeSearchIndex,
421
- })}
422
- onClick={() => handleSelect(result.href)}
423
- >
424
- {result.label}
425
- </Link>
426
- </li>
427
- ))}
428
- </ul>
429
- </div>
430
- )}
431
-
432
419
  <nav
433
420
  className={`${CLASS_ROOT}__nav`}
434
421
  style={{ display: searchResults.length > 0 ? "none" : "block" }}
@@ -201,12 +201,6 @@
201
201
  padding-left: convert.to-rem(15px);
202
202
  }
203
203
 
204
- // Search styles
205
- &__search-container {
206
- position: relative;
207
- margin-bottom: 16px;
208
- }
209
-
210
204
  &__search-clear {
211
205
  position: absolute;
212
206
  right: 8px;