@waggylabs/yumekit 0.2.1 → 0.2.2

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 (45) hide show
  1. package/dist/components/y-appbar.d.ts +21 -0
  2. package/dist/components/y-appbar.js +310 -22
  3. package/dist/components/y-badge.d.ts +5 -0
  4. package/dist/components/y-badge.js +5 -0
  5. package/dist/components/y-button.d.ts +6 -1
  6. package/dist/components/y-button.js +5 -0
  7. package/dist/components/y-checkbox.d.ts +7 -1
  8. package/dist/components/y-checkbox.js +6 -0
  9. package/dist/components/y-dialog.d.ts +7 -0
  10. package/dist/components/y-dialog.js +14 -24
  11. package/dist/components/y-drawer.js +1 -2
  12. package/dist/components/y-icon.d.ts +5 -0
  13. package/dist/components/y-icon.js +16 -8
  14. package/dist/components/y-input.d.ts +5 -0
  15. package/dist/components/y-input.js +6 -0
  16. package/dist/components/y-menu.d.ts +1 -0
  17. package/dist/components/y-menu.js +28 -1
  18. package/dist/components/y-panel.d.ts +10 -1
  19. package/dist/components/y-panel.js +21 -0
  20. package/dist/components/y-progress.d.ts +11 -0
  21. package/dist/components/y-progress.js +14 -0
  22. package/dist/components/y-radio.d.ts +11 -2
  23. package/dist/components/y-radio.js +3 -0
  24. package/dist/components/y-select.d.ts +19 -5
  25. package/dist/components/y-select.js +19 -0
  26. package/dist/components/y-slider.d.ts +11 -2
  27. package/dist/components/y-slider.js +10 -0
  28. package/dist/components/y-switch.d.ts +3 -0
  29. package/dist/components/y-switch.js +8 -2
  30. package/dist/components/y-table.d.ts +3 -0
  31. package/dist/components/y-table.js +4 -1
  32. package/dist/components/y-tabs.d.ts +14 -7
  33. package/dist/components/y-tabs.js +9 -0
  34. package/dist/components/y-theme.d.ts +6 -1
  35. package/dist/components/y-theme.js +11 -4
  36. package/dist/components/y-toast.d.ts +4 -0
  37. package/dist/components/y-toast.js +7 -0
  38. package/dist/components/y-tooltip.d.ts +6 -0
  39. package/dist/components/y-tooltip.js +8 -0
  40. package/dist/icons/all.js +3 -0
  41. package/dist/icons/index.d.ts +1 -0
  42. package/dist/index.js +459 -55
  43. package/dist/styles/variables.css +7 -4
  44. package/dist/yumekit.min.js +1 -1
  45. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- var variablesCSS = "/* Colors */\n:root {\n --neutral--: #7f8286ff;\n --neutral-white: #ffffffff;\n --neutral-black: #000000ff;\n --neutral-light-0: #f7f7faff;\n --neutral-light-1: #f0f0f2ff;\n --neutral-light-2: #dfe0e3ff;\n --neutral-light-3: #cacbcfff;\n --neutral-light-4: #bbbdc0ff;\n --neutral-light-5: #acaeb2ff;\n --neutral-light-6: #9d9fa3ff;\n --neutral-light-7: #8e9195ff;\n --neutral-dark-0: #0c0c0dff;\n --neutral-dark-1: #151617ff;\n --neutral-dark-2: #292a2bff;\n --neutral-dark-3: #37383aff;\n --neutral-dark-4: #46474aff;\n --neutral-dark-5: #545659ff;\n --neutral-dark-6: #626568ff;\n --neutral-dark-7: #717377ff;\n --neutral-black-translucent: #0000001f;\n --neutral-white-translucent: #1111111f;\n --red--: #b80421ff;\n --red-light-0: #f2e6e8ff;\n --red-light-1: #ebcacfff;\n --red-light-2: #e4aeb6ff;\n --red-light-3: #dc919dff;\n --red-light-4: #d57585ff;\n --red-light-5: #ce596cff;\n --red-light-6: #c73d53ff;\n --red-light-7: #bf203aff;\n --red-dark-0: #0d0103ff;\n --red-dark-1: #220107ff;\n --red-dark-2: #38020bff;\n --red-dark-3: #4d020eff;\n --red-dark-4: #630312ff;\n --red-dark-5: #780316ff;\n --red-dark-6: #8d031aff;\n --red-dark-7: #a3041dff;\n --red-translucent: #b804211f;\n --orange--: #d13704ff;\n --orange-light-0: #f2e9e6ff;\n --orange-light-1: #eed3caff;\n --orange-light-2: #eabdaeff;\n --orange-light-3: #e6a691ff;\n --orange-light-4: #e29075ff;\n --orange-light-5: #dd7a59ff;\n --orange-light-6: #d9643dff;\n --orange-light-7: #d54d20ff;\n --orange-dark-0: #0d0300ff;\n --orange-dark-1: #260a01ff;\n --orange-dark-2: #3e1001ff;\n --orange-dark-3: #571702ff;\n --orange-dark-4: #6f1d02ff;\n --orange-dark-5: #882403ff;\n --orange-dark-6: #a02a03ff;\n --orange-dark-7: #b93104ff;\n --orange-translucent: #d137041f;\n --amber--: #d16004ff;\n --amber-light-0: #f2ece6ff;\n --amber-light-1: #eedbcaff;\n --amber-light-2: #eac9aeff;\n --amber-light-3: #e6b891ff;\n --amber-light-4: #e2a675ff;\n --amber-light-5: #dd9559ff;\n --amber-light-6: #d9833dff;\n --amber-light-7: #d57220ff;\n --amber-dark-0: #0d0c0cff;\n --amber-dark-1: #26170bff;\n --amber-dark-2: #3e210aff;\n --amber-dark-3: #572c09ff;\n --amber-dark-4: #6f3608ff;\n --amber-dark-5: #884107ff;\n --amber-dark-6: #a04b06ff;\n --amber-dark-7: #b95605ff;\n --amber-translucent: #d160041f;\n --yellow--: #d17f04ff;\n --yellow-light-0: #f2eadfff;\n --yellow-light-1: #eeddc4ff;\n --yellow-light-2: #eacfa8ff;\n --yellow-light-3: #e6c28dff;\n --yellow-light-4: #e2b572ff;\n --yellow-light-5: #dda756ff;\n --yellow-light-6: #d99a3bff;\n --yellow-light-7: #d58c1fff;\n --yellow-dark-0: #0d0c0cff;\n --yellow-dark-1: #261a0bff;\n --yellow-dark-2: #3e290aff;\n --yellow-dark-3: #573709ff;\n --yellow-dark-4: #6f4608ff;\n --yellow-dark-5: #885407ff;\n --yellow-dark-6: #a06206ff;\n --yellow-dark-7: #b97105ff;\n --yellow-translucent: #d17f041f;\n --lime--: #cad104ff;\n --lime-light-0: #f2f2dfff;\n --lime-light-1: #edeec4ff;\n --lime-light-2: #e8eaa8ff;\n --lime-light-3: #e3e68dff;\n --lime-light-4: #dee272ff;\n --lime-light-5: #d9dd56ff;\n --lime-light-6: #d4d93bff;\n --lime-light-7: #cfd51fff;\n --lime-dark-0: #0d0d0cff;\n --lime-dark-1: #25260bff;\n --lime-dark-2: #3c3e0aff;\n --lime-dark-3: #545709ff;\n --lime-dark-4: #6c6f08ff;\n --lime-dark-5: #838807ff;\n --lime-dark-6: #9ba006ff;\n --lime-dark-7: #b2b905ff;\n --lime-translucent: #cad1041f;\n --green--: #2dba73ff;\n --green-light-0: #e6f2ecff;\n --green-light-1: #cfebddff;\n --green-light-2: #b8e4ceff;\n --green-light-3: #a1ddbfff;\n --green-light-4: #8ad6b0ff;\n --green-light-5: #72cfa0ff;\n --green-light-6: #5bc891ff;\n --green-light-7: #44c182ff;\n --green-dark-0: #030d08ff;\n --green-dark-1: #082315ff;\n --green-dark-2: #0e3823ff;\n --green-dark-3: #134e30ff;\n --green-dark-4: #18643eff;\n --green-dark-5: #1d794bff;\n --green-dark-6: #238f58ff;\n --green-dark-7: #28a466ff;\n --green-translucent: #2dba731f;\n --teal--: #04b8b8ff;\n --teal-light-0: #f2fffeff;\n --teal-light-1: #d4f6f5ff;\n --teal-light-2: #b7ededff;\n --teal-light-3: #99e4e4ff;\n --teal-light-4: #7bdcdbff;\n --teal-light-5: #5dd3d2ff;\n --teal-light-6: #40cacaff;\n --teal-light-7: #22c1c1ff;\n --teal-dark-0: #0c0d0dff;\n --teal-dark-1: #0b2624ff;\n --teal-dark-2: #0a3e3cff;\n --teal-dark-3: #095753ff;\n --teal-dark-4: #086f6aff;\n --teal-dark-5: #078881ff;\n --teal-dark-6: #06a099ff;\n --teal-dark-7: #05b9b0ff;\n --teal-translucent: #04b8b81f;\n --blue--: #0576ffff;\n --blue-light-0: #ebf5ffff;\n --blue-light-1: #cee5ffff;\n --blue-light-2: #b2d5ffff;\n --blue-light-3: #95c5ffff;\n --blue-light-4: #78b6ffff;\n --blue-light-5: #5ba6ffff;\n --blue-light-6: #3f96ffff;\n --blue-light-7: #2286ffff;\n --blue-dark-0: #0c0c0dff;\n --blue-dark-1: #0b192bff;\n --blue-dark-2: #0a274aff;\n --blue-dark-3: #093468ff;\n --blue-dark-4: #094186ff;\n --blue-dark-5: #084ea4ff;\n --blue-dark-6: #075cc3ff;\n --blue-dark-7: #0669e1ff;\n --blue-translucent: #0576ff1f;\n --indigo--: #5405ffff;\n --indigo-light-0: #f6f2ffff;\n --indigo-light-1: #e2d4ffff;\n --indigo-light-2: #ceb7ffff;\n --indigo-light-3: #b999ffff;\n --indigo-light-4: #a57cffff;\n --indigo-light-5: #915effff;\n --indigo-light-6: #7d40ffff;\n --indigo-light-7: #6823ffff;\n --indigo-dark-0: #0d0c0cff;\n --indigo-dark-1: #160b2aff;\n --indigo-dark-2: #1f0a49ff;\n --indigo-dark-3: #280967ff;\n --indigo-dark-4: #310986ff;\n --indigo-dark-5: #3908a4ff;\n --indigo-dark-6: #4207c2ff;\n --indigo-dark-7: #4b06e1ff;\n --indigo-translucent: #5405ff1f;\n --purple--: #8a05ffff;\n --purple-light-0: #f9f2ffff;\n --purple-light-1: #ebd4ffff;\n --purple-light-2: #ddb7ffff;\n --purple-light-3: #cf99ffff;\n --purple-light-4: #c27cffff;\n --purple-light-5: #b45effff;\n --purple-light-6: #a640ffff;\n --purple-light-7: #9823ffff;\n --purple-dark-0: #0c0c0dff;\n --purple-dark-1: #1c0b2bff;\n --purple-dark-2: #2c0a4aff;\n --purple-dark-3: #3b0968ff;\n --purple-dark-4: #4b0986ff;\n --purple-dark-5: #5b08a4ff;\n --purple-dark-6: #6b07c3ff;\n --purple-dark-7: #7a06e1ff;\n --purple-translucent: #8a05ff1f;\n --pink--: #ff05a8ff;\n --pink-light-0: #f9f2ffff;\n --pink-light-1: #fad4f4ff;\n --pink-light-2: #fbb7e9ff;\n --pink-light-3: #fb99deff;\n --pink-light-4: #fc7cd4ff;\n --pink-light-5: #fd5ec9ff;\n --pink-light-6: #fe40beff;\n --pink-light-7: #fe23b3ff;\n --pink-dark-0: #0c0c0dff;\n --pink-dark-1: #2a0b20ff;\n --pink-dark-2: #490a34ff;\n --pink-dark-3: #670947ff;\n --pink-dark-4: #86095bff;\n --pink-dark-5: #a4086eff;\n --pink-dark-6: #c20781ff;\n --pink-dark-7: #e10695ff;\n --pink-translucent: #ff05a81f;\n --brown--: #ab642eff;\n --brown-light-0: #f2dfdfff;\n --brown-light-1: #e9d0c9ff;\n --brown-light-2: #e0c0b3ff;\n --brown-light-3: #d7b19dff;\n --brown-light-4: #cfa287ff;\n --brown-light-5: #c69270ff;\n --brown-light-6: #bd835aff;\n --brown-light-7: #b47344ff;\n --brown-dark-0: #0d0c0cff;\n --brown-dark-1: #211710ff;\n --brown-dark-2: #352215ff;\n --brown-dark-3: #482d19ff;\n --brown-dark-4: #5c381dff;\n --brown-dark-5: #704321ff;\n --brown-dark-6: #844e26ff;\n --brown-dark-7: #97592aff;\n --brown-translucent: #ab642e1f;\n}\n\n/* Numerics */\n:root {\n --border-none: 0px;\n --border-x-thin: 1px;\n --border-thin: 2px;\n --border-medium: 4px;\n --border-thick: 8px;\n --border-x-thick: 10px;\n --spacing-none: 0px;\n --spacing-4x-small: 1px;\n --spacing-2x-small: 2px;\n --spacing-x-small: 4px;\n --spacing-small: 6px;\n --spacing-medium: 8px;\n --spacing-large: 12px;\n --spacing-x-large: 16px;\n --spacing-2x-large: 24px;\n --spacing-4x-large: 32px;\n --font-size-display-1: 6em;\n --font-size-display-2: 5.5em;\n --font-size-display-3: 4.5em;\n --font-size-display-4: 3.5em;\n --font-size-h1: 2em;\n --font-size-h2: 1.5em;\n --font-size-h3: 1.17em;\n --font-size-h4: 1em;\n --font-size-h5: 0.83em;\n --font-size-paragraph: 1em;\n --font-size-small: 0.8em;\n --font-size-label: 0.83em;\n --font-size-button: 1em;\n --font-size-quote: 1.17em;\n --radii-none: 0px;\n --radii-x-small: 0.125em;\n --radii-small: 0.25em;\n --radii-medium: 0.375em;\n --radii-large: 0.5px;\n --radii-x-large: 1em;\n --radii-full: 9999px;\n --sizing-2x-small: 16px;\n --sizing-x-small: 19px;\n --sizing-small: 32px;\n --sizing-medium: 40px;\n --sizing-large: 56px;\n}\n\n/* Components */\n\n:root {\n /* appbar */\n --component-appbar-collapsed-width: 48px;\n --component-appbar-padding: var(--spacing-medium);\n --component-appbar-width: 240px;\n --component-appbar-z-index: 100;\n\n /* avatar */\n --component-avatar-border-radius-circle: var(--radii-full);\n --component-avatar-border-radius-square: var(--radii-small);\n --component-avatar-size-large: var(--sizing-large);\n --component-avatar-size-medium: var(--sizing-medium);\n --component-avatar-size-small: var(--sizing-small);\n\n /* badge */\n --component-badge-border-radius-circle: var(--radii-full);\n --component-badge-border-radius-square: var(--radii-small);\n --component-badge-padding-large: var(--spacing-small);\n --component-badge-padding-medium: var(--spacing-x-small);\n --component-badge-padding-small: var(--spacing-2x-small);\n --component-badge-size-large: var(--sizing-medium);\n --component-badge-size-medium: var(--sizing-small);\n --component-badge-size-small: var(--sizing-2x-small);\n\n /* button */\n --component-button-border-radius-inner: var(--radii-x-small);\n --component-button-border-radius-outer: var(--radii-small);\n --component-button-border-width: var(--border-thin);\n --component-button-border-width-2: var(--border-x-thin);\n --component-button-padding-large: var(--spacing-x-large);\n --component-button-padding-medium: var(--spacing-medium);\n --component-button-padding-small: var(--spacing-x-small);\n\n /* card */\n --component-card-border-radius-inner: var(--radii-small);\n --component-card-border-radius-outer: var(--radii-medium);\n --component-card-border-width: var(--border-x-thin);\n --component-card-inner-border-width: var(--border-x-thin);\n --component-card-padding-inner: var(--spacing-medium);\n --component-card-padding-outer: var(--spacing-x-large);\n\n /* checkbox */\n --component-checkbox-icon-size: var(--sizing-2x-small);\n --component-checkbox-size: var(--sizing-x-small);\n\n /* dialog */\n --component-dialog-border-radius-inner: var(--radii-x-small);\n --component-dialog-border-radius-outer: var(--radii-small);\n --component-dialog-border-width: var(--border-x-thin);\n --component-dialog-inner-border-width: var(--border-x-thin);\n --component-dialog-padding: var(--spacing-medium);\n --component-dialog-z-index: 1000;\n\n /* drawer */\n --component-drawer-border-radius: var(--radii-small);\n --component-drawer-border-width: var(--border-x-thin);\n --component-drawer-handle-padding: var(--spacing-x-small);\n --component-drawer-handle-width: var(--spacing-x-small);\n --component-drawer-padding: var(--spacing-medium);\n --component-drawer-z-index: 5000;\n\n /* icon */\n --component-icon-size-large: var(--spacing-4x-large);\n --component-icon-size-medium: var(--spacing-2x-large);\n --component-icon-size-small: var(--spacing-x-large);\n\n /* inputs */\n --component-inputs-border-radius-inner: var(--radii-x-small);\n --component-inputs-border-radius-outer: var(--radii-small);\n --component-inputs-border-width: var(--border-thin);\n --component-inputs-padding-large: var(--spacing-x-large);\n --component-inputs-padding-medium: var(--spacing-medium);\n --component-inputs-padding-small: var(--spacing-x-small);\n\n /* menu */\n --component-menu-border-radius: var(--radii-x-small);\n --component-menu-border-width: var(--border-x-thin);\n --component-menu-padding-horizontal: var(--spacing-small);\n --component-menu-padding-vertical: var(--spacing-x-small);\n --component-menu-z-index: 1001;\n\n /* panelbar */\n --component-panelbar-border-radius: var(--radii-x-small);\n --component-panelbar-border-width: var(--border-x-thin);\n --component-panelbar-indent: var(--spacing-x-large);\n --component-panelbar-padding: var(--spacing-medium);\n\n /* progress */\n --component-progress-border-radius-inner: var(--radii-small);\n --component-progress-border-radius-outer: calc(var(--radii-small) + 4px);\n --component-progress-border-width: var(--border-x-thin);\n --component-progress-padding: var(--spacing-x-small);\n --component-progress-size-large: var(--sizing-large);\n --component-progress-size-medium: var(--sizing-medium);\n --component-progress-size-small: var(--sizing-small);\n\n /* radio */\n --component-radio-dot-offset: var(--spacing-2x-small);\n --component-radio-dot-size: var(--spacing-medium);\n --component-radio-size: var(--sizing-2x-small);\n\n /* select */\n --component-select-z-index: 6000;\n\n /* sidebar */\n --component-sidebar-border-radius: var(--radii-small);\n --component-sidebar-border-width: var(--border-x-thin);\n\n /* slider */\n --component-slider-border-radius-inner: var(--radii-small);\n --component-slider-border-radius-outer: calc(var(--radii-small) + 4px);\n --component-slider-border-width: var(--border-thin);\n --component-slider-padding: var(--spacing-x-small);\n --component-slider-thumb-border-radius: var(--radii-x-small);\n\n /* switch */\n --component-switch-border-radius: var(--radii-full);\n --component-switch-border-width: var(--border-thin);\n --component-switch-padding: var(--spacing-2x-small);\n\n /* tab */\n --component-tab-border-radius-inner: var(--radii-x-small);\n --component-tab-border-radius-outer: var(--radii-small);\n --component-tab-border-width: var(--border-x-thin);\n --component-tab-content-padding: var(--spacing-large);\n --component-tab-gap-large: var(--spacing-large);\n --component-tab-gap-medium: var(--spacing-small);\n --component-tab-gap-small: var(--spacing-2x-small);\n --component-tab-padding-large: var(--spacing-2x-large);\n --component-tab-padding-medium: var(--spacing-large);\n --component-tab-padding-small: var(--spacing-small);\n\n /* table */\n --component-table-border-radius: var(--radii-small);\n --component-table-border-width: var(--border-x-thin);\n --component-table-border-width-header: var(--border-thin);\n --component-table-padding-large: var(--spacing-large);\n --component-table-padding-medium: var(--spacing-medium);\n --component-table-padding-small: var(--spacing-small);\n\n /* tag */\n --component-tag-border-radius-circle: var(--radii-full);\n --component-tag-border-radius-square: var(--radii-small);\n --component-tag-padding-large: var(--spacing-small);\n --component-tag-padding-medium: var(--spacing-x-small);\n --component-tag-padding-small: var(--spacing-2x-small);\n --component-tag-height-large: 38px;\n --component-tag-height-medium: 28px;\n --component-tag-height-small: 22px;\n --component-tag-size-large: var(--sizing-large);\n --component-tag-size-medium: var(--sizing-medium);\n --component-tag-size-small: var(--sizing-small);\n\n /* toast */\n --component-toast-border-radius: var(--radii-small);\n --component-toast-offset: var(--spacing-x-large);\n --component-toast-padding: var(--spacing-medium);\n --component-toast-padding-h: var(--spacing-x-large);\n --component-toast-z-index: 9000;\n\n /* tooltip */\n --component-tooltip-border-radius: var(--radii-small);\n --component-tooltip-padding: var(--spacing-x-small);\n --component-tooltip-padding-h: var(--spacing-medium);\n --component-tooltip-z-index: 7000;\n}\n\n/* Default Theme (Blue Light) */\n:root {\n --base-background-app: var(--neutral-light-1);\n --base-background-component: var(--neutral-light-0);\n --base-background-hover: var(--neutral-light-2);\n --base-background-border: var(--neutral-light-3);\n --base-background-active: var(--neutral-light-4);\n --base-content--: var(--neutral-dark-0);\n --base-content-inverse: var(--neutral-white);\n --base-content-light: var(--neutral-dark-1);\n --base-content-lighter: var(--neutral-dark-3);\n --base-content-lightest: var(--neutral-dark-5);\n --base-shadow: 0 2px 6px var(--neutral-black-translucent);\n --primary-background-app: var(--blue-light-1);\n --primary-background-component: var(--blue-light-0);\n --primary-background-hover: var(--blue-light-2);\n --primary-background-active: var(--blue-light-3);\n --primary-background-border: var(--blue-light-4);\n --primary-content--: var(--blue--);\n --primary-content-inverse: var(--neutral-white);\n --primary-content-hover: var(--blue-dark-7);\n --primary-content-active: var(--blue-dark-6);\n --secondary-background-app: var(--teal-light-1);\n --secondary-background-component: var(--teal-light-0);\n --secondary-background-hover: var(--teal-light-2);\n --secondary-background-border: var(--teal-light-3);\n --secondary-background-active: var(--teal-light-4);\n --secondary-content--: var(--teal--);\n --secondary-content-inverse: var(--neutral-black);\n --secondary-content-hover: var(--teal-dark-7);\n --secondary-content-active: var(--teal-dark-6);\n --success-background-app: var(--green-light-1);\n --success-background-component: var(--green-light-0);\n --success-background-hover: var(--green-light-2);\n --success-background-border: var(--green-light-3);\n --success-background-active: var(--green-light-4);\n --success-content--: var(--green--);\n --success-content-inverse: var(--neutral-black);\n --success-content-hover: var(--green-dark-7);\n --success-content-active: var(--green-dark-6);\n --warning-background-app: var(--yellow-light-1);\n --warning-background-component: var(--yellow-light-0);\n --warning-background-hover: var(--yellow-light-2);\n --warning-background-border: var(--yellow-light-3);\n --warning-background-active: var(--yellow-light-4);\n --warning-content--: var(--yellow--);\n --warning-content-inverse: var(--neutral-black);\n --warning-content-hover: var(--yellow-dark-7);\n --warning-content-active: var(--yellow-dark-6);\n --error-background-app: var(--red-light-1);\n --error-background-component: var(--red-light-0);\n --error-background-hover: var(--red-light-2);\n --error-background-border: var(--red-light-3);\n --error-background-active: var(--red-light-4);\n --error-content--: var(--red--);\n --error-content-inverse: var(--neutral-white);\n --error-content-hover: var(--red-dark-7);\n --error-content-active: var(--red-dark-6);\n --help-background-app: var(--indigo-light-1);\n --help-background-component: var(--indigo-light-0);\n --help-background-hover: var(--indigo-light-2);\n --help-background-active: var(--indigo-light-3);\n --help-background-border: var(--indigo-light-4);\n --help-content--: var(--indigo--);\n --help-content-inverse: var(--neutral-white);\n --help-content-hover: var(--indigo-dark-7);\n --help-content-active: var(--indigo-dark-6);\n --component-appbar-background: var(--base-background-component);\n --component-appbar-color: var(--base-content--);\n --component-appbar-border-color: var(--base-background-border);\n --component-appbar-border-width: var(--component-sidebar-border-width);\n --component-appbar-border-radius: var(--component-sidebar-border-radius);\n --component-appbar-inner-border-width: var(\n --component-sidebar-border-width\n );\n --component-checkbox-background: var(--base-background-component);\n --component-checkbox-color: var(--base-content--);\n --component-checkbox-border-color: var(--base-content--);\n --component-checkbox-accent: var(--primary-content--);\n --component-dialog-background: var(--base-background-component);\n --component-dialog-color: var(--base-content--);\n --component-dialog-border-color: var(--base-background-border);\n --component-dialog-hover-background: var(--base-background-hover);\n --component-dialog-accent: var(--primary-content--);\n --component-dialog-shadow: var(--base-shadow);\n --component-drawer-background: var(--base-background-component);\n --component-drawer-color: var(--base-content--);\n --component-drawer-border-color: var(--base-background-border);\n --component-drawer-hover-background: var(--base-background-hover);\n --component-input-background: var(--base-background-app);\n --component-input-background-disabled: var(--base-background-component);\n --component-input-color: var(--base-content--);\n --component-input-border-color: var(--base-background-border);\n --component-input-accent: var(--primary-content--);\n --component-input-label-color: var(--base-content-light);\n --component-input-icon-color: var(--base-content-lighter);\n --component-input-error-color: var(--error-content--);\n --component-input-error-background: var(--error-background-component);\n --component-input-error-border-color: var(--error-background-border);\n --component-menu-background: var(--base-background-component);\n --component-menu-color: var(--base-content--);\n --component-menu-border-color: var(--base-background-border);\n --component-menu-hover-background: var(--base-background-hover);\n --component-menu-shadow: var(--base-shadow);\n --component-panel-background: var(--base-background-component);\n --component-panel-color: var(--base-content--);\n --component-panel-expanded-background: var(--base-background-app);\n --component-panel-accent: var(--primary-content--);\n --component-panel-active-border: var(--base-background-active);\n --component-panel-accent-hover-background: var(--primary-background-active);\n --component-panel-hover-background: var(--base-background-hover);\n --component-radio-color: var(--base-content--);\n --component-radio-accent: var(--primary-content--);\n --component-select-background: var(--base-background-app);\n --component-select-color: var(--base-content--);\n --component-select-border-color: var(--base-background-border);\n --component-select-accent: var(--primary-content--);\n --component-select-accent-contrast: var(--base-background-component);\n --component-select-label-color: var(--base-content-light);\n --component-select-hover-background: var(--base-background-hover);\n --component-select-shadow: var(--base-shadow);\n --component-select-error-color: var(--error-content--);\n --component-select-error-background: var(--error-background-component);\n --component-select-error-border-color: var(--error-background-border);\n --component-table-color: var(--base-content--);\n --component-table-border-color: var(--base-background-border);\n --component-table-hover-background: var(--base-background-hover);\n --component-table-active-background: var(--base-background-active);\n --component-table-color-light: var(--base-content-lightest);\n --component-tabs-background: var(--base-background-component);\n --component-tabs-color: var(--base-content--);\n --component-tabs-border-color: var(--base-background-border);\n --component-tabs-accent: var(--primary-content--);\n --component-tabs-font-family: var(--font-family-body);\n --component-slider-width: 129px;\n --font-family-header: \"Lexend\", sans-serif;\n --font-family-body: \"Lexend\", sans-serif;\n}\n";
1
+ var variablesCSS = "/* Colors */\n:root {\n --neutral--: #7f8286ff;\n --neutral-white: #ffffffff;\n --neutral-black: #000000ff;\n --neutral-light-0: #f7f7faff;\n --neutral-light-1: #f0f0f2ff;\n --neutral-light-2: #dfe0e3ff;\n --neutral-light-3: #cacbcfff;\n --neutral-light-4: #bbbdc0ff;\n --neutral-light-5: #acaeb2ff;\n --neutral-light-6: #9d9fa3ff;\n --neutral-light-7: #8e9195ff;\n --neutral-dark-0: #0c0c0dff;\n --neutral-dark-1: #151617ff;\n --neutral-dark-2: #292a2bff;\n --neutral-dark-3: #37383aff;\n --neutral-dark-4: #46474aff;\n --neutral-dark-5: #545659ff;\n --neutral-dark-6: #626568ff;\n --neutral-dark-7: #717377ff;\n --neutral-black-translucent: #0000001f;\n --neutral-white-translucent: #1111111f;\n --red--: #b80421ff;\n --red-light-0: #f2e6e8ff;\n --red-light-1: #ebcacfff;\n --red-light-2: #e4aeb6ff;\n --red-light-3: #dc919dff;\n --red-light-4: #d57585ff;\n --red-light-5: #ce596cff;\n --red-light-6: #c73d53ff;\n --red-light-7: #bf203aff;\n --red-dark-0: #0d0103ff;\n --red-dark-1: #220107ff;\n --red-dark-2: #38020bff;\n --red-dark-3: #4d020eff;\n --red-dark-4: #630312ff;\n --red-dark-5: #780316ff;\n --red-dark-6: #8d031aff;\n --red-dark-7: #a3041dff;\n --red-translucent: #b804211f;\n --orange--: #d13704ff;\n --orange-light-0: #f2e9e6ff;\n --orange-light-1: #eed3caff;\n --orange-light-2: #eabdaeff;\n --orange-light-3: #e6a691ff;\n --orange-light-4: #e29075ff;\n --orange-light-5: #dd7a59ff;\n --orange-light-6: #d9643dff;\n --orange-light-7: #d54d20ff;\n --orange-dark-0: #0d0300ff;\n --orange-dark-1: #260a01ff;\n --orange-dark-2: #3e1001ff;\n --orange-dark-3: #571702ff;\n --orange-dark-4: #6f1d02ff;\n --orange-dark-5: #882403ff;\n --orange-dark-6: #a02a03ff;\n --orange-dark-7: #b93104ff;\n --orange-translucent: #d137041f;\n --amber--: #d16004ff;\n --amber-light-0: #f2ece6ff;\n --amber-light-1: #eedbcaff;\n --amber-light-2: #eac9aeff;\n --amber-light-3: #e6b891ff;\n --amber-light-4: #e2a675ff;\n --amber-light-5: #dd9559ff;\n --amber-light-6: #d9833dff;\n --amber-light-7: #d57220ff;\n --amber-dark-0: #0d0c0cff;\n --amber-dark-1: #26170bff;\n --amber-dark-2: #3e210aff;\n --amber-dark-3: #572c09ff;\n --amber-dark-4: #6f3608ff;\n --amber-dark-5: #884107ff;\n --amber-dark-6: #a04b06ff;\n --amber-dark-7: #b95605ff;\n --amber-translucent: #d160041f;\n --yellow--: #d17f04ff;\n --yellow-light-0: #f2eadfff;\n --yellow-light-1: #eeddc4ff;\n --yellow-light-2: #eacfa8ff;\n --yellow-light-3: #e6c28dff;\n --yellow-light-4: #e2b572ff;\n --yellow-light-5: #dda756ff;\n --yellow-light-6: #d99a3bff;\n --yellow-light-7: #d58c1fff;\n --yellow-dark-0: #0d0c0cff;\n --yellow-dark-1: #261a0bff;\n --yellow-dark-2: #3e290aff;\n --yellow-dark-3: #573709ff;\n --yellow-dark-4: #6f4608ff;\n --yellow-dark-5: #885407ff;\n --yellow-dark-6: #a06206ff;\n --yellow-dark-7: #b97105ff;\n --yellow-translucent: #d17f041f;\n --lime--: #cad104ff;\n --lime-light-0: #f2f2dfff;\n --lime-light-1: #edeec4ff;\n --lime-light-2: #e8eaa8ff;\n --lime-light-3: #e3e68dff;\n --lime-light-4: #dee272ff;\n --lime-light-5: #d9dd56ff;\n --lime-light-6: #d4d93bff;\n --lime-light-7: #cfd51fff;\n --lime-dark-0: #0d0d0cff;\n --lime-dark-1: #25260bff;\n --lime-dark-2: #3c3e0aff;\n --lime-dark-3: #545709ff;\n --lime-dark-4: #6c6f08ff;\n --lime-dark-5: #838807ff;\n --lime-dark-6: #9ba006ff;\n --lime-dark-7: #b2b905ff;\n --lime-translucent: #cad1041f;\n --green--: #2dba73ff;\n --green-light-0: #e6f2ecff;\n --green-light-1: #cfebddff;\n --green-light-2: #b8e4ceff;\n --green-light-3: #a1ddbfff;\n --green-light-4: #8ad6b0ff;\n --green-light-5: #72cfa0ff;\n --green-light-6: #5bc891ff;\n --green-light-7: #44c182ff;\n --green-dark-0: #030d08ff;\n --green-dark-1: #082315ff;\n --green-dark-2: #0e3823ff;\n --green-dark-3: #134e30ff;\n --green-dark-4: #18643eff;\n --green-dark-5: #1d794bff;\n --green-dark-6: #238f58ff;\n --green-dark-7: #28a466ff;\n --green-translucent: #2dba731f;\n --teal--: #04b8b8ff;\n --teal-light-0: #f2fffeff;\n --teal-light-1: #d4f6f5ff;\n --teal-light-2: #b7ededff;\n --teal-light-3: #99e4e4ff;\n --teal-light-4: #7bdcdbff;\n --teal-light-5: #5dd3d2ff;\n --teal-light-6: #40cacaff;\n --teal-light-7: #22c1c1ff;\n --teal-dark-0: #0c0d0dff;\n --teal-dark-1: #0b2624ff;\n --teal-dark-2: #0a3e3cff;\n --teal-dark-3: #095753ff;\n --teal-dark-4: #086f6aff;\n --teal-dark-5: #078881ff;\n --teal-dark-6: #06a099ff;\n --teal-dark-7: #05b9b0ff;\n --teal-translucent: #04b8b81f;\n --blue--: #0576ffff;\n --blue-light-0: #ebf5ffff;\n --blue-light-1: #cee5ffff;\n --blue-light-2: #b2d5ffff;\n --blue-light-3: #95c5ffff;\n --blue-light-4: #78b6ffff;\n --blue-light-5: #5ba6ffff;\n --blue-light-6: #3f96ffff;\n --blue-light-7: #2286ffff;\n --blue-dark-0: #0c0c0dff;\n --blue-dark-1: #0b192bff;\n --blue-dark-2: #0a274aff;\n --blue-dark-3: #093468ff;\n --blue-dark-4: #094186ff;\n --blue-dark-5: #084ea4ff;\n --blue-dark-6: #075cc3ff;\n --blue-dark-7: #0669e1ff;\n --blue-translucent: #0576ff1f;\n --indigo--: #5405ffff;\n --indigo-light-0: #f6f2ffff;\n --indigo-light-1: #e2d4ffff;\n --indigo-light-2: #ceb7ffff;\n --indigo-light-3: #b999ffff;\n --indigo-light-4: #a57cffff;\n --indigo-light-5: #915effff;\n --indigo-light-6: #7d40ffff;\n --indigo-light-7: #6823ffff;\n --indigo-dark-0: #0d0c0cff;\n --indigo-dark-1: #160b2aff;\n --indigo-dark-2: #1f0a49ff;\n --indigo-dark-3: #280967ff;\n --indigo-dark-4: #310986ff;\n --indigo-dark-5: #3908a4ff;\n --indigo-dark-6: #4207c2ff;\n --indigo-dark-7: #4b06e1ff;\n --indigo-translucent: #5405ff1f;\n --purple--: #8a05ffff;\n --purple-light-0: #f9f2ffff;\n --purple-light-1: #ebd4ffff;\n --purple-light-2: #ddb7ffff;\n --purple-light-3: #cf99ffff;\n --purple-light-4: #c27cffff;\n --purple-light-5: #b45effff;\n --purple-light-6: #a640ffff;\n --purple-light-7: #9823ffff;\n --purple-dark-0: #0c0c0dff;\n --purple-dark-1: #1c0b2bff;\n --purple-dark-2: #2c0a4aff;\n --purple-dark-3: #3b0968ff;\n --purple-dark-4: #4b0986ff;\n --purple-dark-5: #5b08a4ff;\n --purple-dark-6: #6b07c3ff;\n --purple-dark-7: #7a06e1ff;\n --purple-translucent: #8a05ff1f;\n --pink--: #ff05a8ff;\n --pink-light-0: #f9f2ffff;\n --pink-light-1: #fad4f4ff;\n --pink-light-2: #fbb7e9ff;\n --pink-light-3: #fb99deff;\n --pink-light-4: #fc7cd4ff;\n --pink-light-5: #fd5ec9ff;\n --pink-light-6: #fe40beff;\n --pink-light-7: #fe23b3ff;\n --pink-dark-0: #0c0c0dff;\n --pink-dark-1: #2a0b20ff;\n --pink-dark-2: #490a34ff;\n --pink-dark-3: #670947ff;\n --pink-dark-4: #86095bff;\n --pink-dark-5: #a4086eff;\n --pink-dark-6: #c20781ff;\n --pink-dark-7: #e10695ff;\n --pink-translucent: #ff05a81f;\n --brown--: #ab642eff;\n --brown-light-0: #f2dfdfff;\n --brown-light-1: #e9d0c9ff;\n --brown-light-2: #e0c0b3ff;\n --brown-light-3: #d7b19dff;\n --brown-light-4: #cfa287ff;\n --brown-light-5: #c69270ff;\n --brown-light-6: #bd835aff;\n --brown-light-7: #b47344ff;\n --brown-dark-0: #0d0c0cff;\n --brown-dark-1: #211710ff;\n --brown-dark-2: #352215ff;\n --brown-dark-3: #482d19ff;\n --brown-dark-4: #5c381dff;\n --brown-dark-5: #704321ff;\n --brown-dark-6: #844e26ff;\n --brown-dark-7: #97592aff;\n --brown-translucent: #ab642e1f;\n}\n\n/* Numerics */\n:root {\n --border-none: 0px;\n --border-x-thin: 1px;\n --border-thin: 2px;\n --border-medium: 4px;\n --border-thick: 8px;\n --border-x-thick: 10px;\n --spacing-none: 0px;\n --spacing-4x-small: 1px;\n --spacing-2x-small: 2px;\n --spacing-x-small: 4px;\n --spacing-small: 6px;\n --spacing-medium: 8px;\n --spacing-large: 12px;\n --spacing-x-large: 16px;\n --spacing-2x-large: 24px;\n --spacing-4x-large: 32px;\n --font-size-display-1: 6em;\n --font-size-display-2: 5.5em;\n --font-size-display-3: 4.5em;\n --font-size-display-4: 3.5em;\n --font-size-h1: 2em;\n --font-size-h2: 1.5em;\n --font-size-h3: 1.17em;\n --font-size-h4: 1em;\n --font-size-h5: 0.83em;\n --font-size-paragraph: 1em;\n --font-size-small: 0.8em;\n --font-size-label: 0.83em;\n --font-size-button: 1em;\n --font-size-quote: 1.17em;\n --radii-none: 0px;\n --radii-x-small: 0.125em;\n --radii-small: 0.25em;\n --radii-medium: 0.375em;\n --radii-large: 0.5px;\n --radii-x-large: 1em;\n --radii-full: 9999px;\n --sizing-2x-small: 16px;\n --sizing-x-small: 19px;\n --sizing-small: 32px;\n --sizing-medium: 40px;\n --sizing-large: 56px;\n}\n\n/* Components */\n\n:root {\n /* appbar */\n --component-appbar-collapsed-width: 52px;\n --component-appbar-mobile-breakpoint: 768px;\n --component-appbar-padding: var(--spacing-medium);\n --component-appbar-width: 240px;\n --component-appbar-z-index: 100;\n\n /* avatar */\n --component-avatar-border-radius-circle: var(--radii-full);\n --component-avatar-border-radius-square: var(--radii-small);\n --component-avatar-size-large: var(--sizing-large);\n --component-avatar-size-medium: var(--sizing-medium);\n --component-avatar-size-small: var(--sizing-small);\n\n /* badge */\n --component-badge-border-radius-circle: var(--radii-full);\n --component-badge-border-radius-square: var(--radii-small);\n --component-badge-padding-large: var(--spacing-small);\n --component-badge-padding-medium: var(--spacing-x-small);\n --component-badge-padding-small: var(--spacing-2x-small);\n --component-badge-size-large: var(--sizing-medium);\n --component-badge-size-medium: var(--sizing-small);\n --component-badge-size-small: var(--sizing-2x-small);\n\n /* button */\n --component-button-border-radius-inner: var(--radii-x-small);\n --component-button-border-radius-outer: var(--radii-small);\n --component-button-border-width: var(--border-thin);\n --component-button-border-width-2: var(--border-x-thin);\n --component-button-padding-large: var(--spacing-x-large);\n --component-button-padding-medium: var(--spacing-medium);\n --component-button-padding-small: var(--spacing-x-small);\n\n /* card */\n --component-card-border-radius-inner: var(--radii-small);\n --component-card-border-radius-outer: var(--radii-medium);\n --component-card-border-width: var(--border-x-thin);\n --component-card-inner-border-width: var(--border-x-thin);\n --component-card-padding-inner: var(--spacing-medium);\n --component-card-padding-outer: var(--spacing-x-large);\n\n /* checkbox */\n --component-checkbox-icon-size: var(--sizing-2x-small);\n --component-checkbox-size: var(--sizing-x-small);\n\n /* dialog */\n --component-dialog-border-radius-inner: var(--radii-x-small);\n --component-dialog-border-radius-outer: var(--radii-small);\n --component-dialog-border-width: var(--border-x-thin);\n --component-dialog-inner-border-width: var(--border-x-thin);\n --component-dialog-padding: var(--spacing-medium);\n --component-dialog-z-index: 1000;\n\n /* drawer */\n --component-drawer-border-radius: var(--radii-small);\n --component-drawer-border-width: var(--border-x-thin);\n --component-drawer-handle-padding: var(--spacing-x-small);\n --component-drawer-handle-width: var(--spacing-x-small);\n --component-drawer-padding: var(--spacing-medium);\n --component-drawer-z-index: 5000;\n\n /* icon */\n --component-icon-size-x-large: 28px;\n --component-icon-size-large: 22px;\n --component-icon-size-medium: 18px;\n --component-icon-size-small: 14px;\n --component-icon-size-x-small: 10px;\n\n /* inputs */\n --component-inputs-border-radius-inner: var(--radii-x-small);\n --component-inputs-border-radius-outer: var(--radii-small);\n --component-inputs-border-width: var(--border-thin);\n --component-inputs-padding-large: var(--spacing-x-large);\n --component-inputs-padding-medium: var(--spacing-medium);\n --component-inputs-padding-small: var(--spacing-x-small);\n\n /* menu */\n --component-menu-border-radius: var(--radii-x-small);\n --component-menu-border-width: var(--border-x-thin);\n --component-menu-padding-horizontal: var(--spacing-small);\n --component-menu-padding-vertical: var(--spacing-x-small);\n --component-menu-z-index: 1001;\n\n /* panelbar */\n --component-panelbar-border-radius: var(--radii-x-small);\n --component-panelbar-border-width: var(--border-x-thin);\n --component-panelbar-indent: var(--spacing-x-large);\n --component-panelbar-padding: var(--spacing-medium);\n\n /* progress */\n --component-progress-border-radius-inner: var(--radii-small);\n --component-progress-border-radius-outer: calc(var(--radii-small) + 4px);\n --component-progress-border-width: var(--border-x-thin);\n --component-progress-padding: var(--spacing-x-small);\n --component-progress-size-large: var(--sizing-large);\n --component-progress-size-medium: var(--sizing-medium);\n --component-progress-size-small: var(--sizing-small);\n\n /* radio */\n --component-radio-dot-offset: var(--spacing-2x-small);\n --component-radio-dot-size: var(--spacing-medium);\n --component-radio-size: var(--sizing-2x-small);\n\n /* select */\n --component-select-z-index: 6000;\n\n /* sidebar */\n --component-sidebar-border-radius: var(--radii-small);\n --component-sidebar-border-width: var(--border-x-thin);\n\n /* slider */\n --component-slider-border-radius-inner: var(--radii-small);\n --component-slider-border-radius-outer: calc(var(--radii-small) + 4px);\n --component-slider-border-width: var(--border-thin);\n --component-slider-padding: var(--spacing-x-small);\n --component-slider-thumb-border-radius: var(--radii-x-small);\n\n /* switch */\n --component-switch-border-radius: var(--radii-full);\n --component-switch-border-width: var(--border-thin);\n --component-switch-padding: var(--spacing-2x-small);\n\n /* tab */\n --component-tab-border-radius-inner: var(--radii-x-small);\n --component-tab-border-radius-outer: var(--radii-small);\n --component-tab-border-width: var(--border-x-thin);\n --component-tab-content-padding: var(--spacing-large);\n --component-tab-gap-large: var(--spacing-large);\n --component-tab-gap-medium: var(--spacing-small);\n --component-tab-gap-small: var(--spacing-2x-small);\n --component-tab-padding-large: var(--spacing-2x-large);\n --component-tab-padding-medium: var(--spacing-large);\n --component-tab-padding-small: var(--spacing-small);\n\n /* table */\n --component-table-border-radius: var(--radii-small);\n --component-table-border-width: var(--border-x-thin);\n --component-table-border-width-header: var(--border-thin);\n --component-table-padding-large: var(--spacing-large);\n --component-table-padding-medium: var(--spacing-medium);\n --component-table-padding-small: var(--spacing-small);\n\n /* tag */\n --component-tag-border-radius-circle: var(--radii-full);\n --component-tag-border-radius-square: var(--radii-small);\n --component-tag-padding-large: var(--spacing-small);\n --component-tag-padding-medium: var(--spacing-x-small);\n --component-tag-padding-small: var(--spacing-2x-small);\n --component-tag-height-large: 38px;\n --component-tag-height-medium: 28px;\n --component-tag-height-small: 22px;\n --component-tag-size-large: var(--sizing-large);\n --component-tag-size-medium: var(--sizing-medium);\n --component-tag-size-small: var(--sizing-small);\n\n /* toast */\n --component-toast-border-radius: var(--radii-small);\n --component-toast-offset: var(--spacing-x-large);\n --component-toast-padding: var(--spacing-medium);\n --component-toast-padding-h: var(--spacing-x-large);\n --component-toast-z-index: 9000;\n\n /* tooltip */\n --component-tooltip-border-radius: var(--radii-small);\n --component-tooltip-padding: var(--spacing-x-small);\n --component-tooltip-padding-h: var(--spacing-medium);\n --component-tooltip-z-index: 7000;\n}\n\n/* Default Theme (Blue Light) */\n:root {\n --base-background-app: var(--neutral-light-1);\n --base-background-component: var(--neutral-light-0);\n --base-background-hover: var(--neutral-light-2);\n --base-background-border: var(--neutral-light-3);\n --base-background-active: var(--neutral-light-4);\n --base-content--: var(--neutral-dark-0);\n --base-content-inverse: var(--neutral-white);\n --base-content-light: var(--neutral-dark-1);\n --base-content-lighter: var(--neutral-dark-3);\n --base-content-lightest: var(--neutral-dark-5);\n --base-shadow: 0 2px 6px var(--neutral-black-translucent);\n --primary-background-app: var(--blue-light-1);\n --primary-background-component: var(--blue-light-0);\n --primary-background-hover: var(--blue-light-2);\n --primary-background-active: var(--blue-light-3);\n --primary-background-border: var(--blue-light-4);\n --primary-content--: var(--blue--);\n --primary-content-inverse: var(--neutral-white);\n --primary-content-hover: var(--blue-dark-7);\n --primary-content-active: var(--blue-dark-6);\n --secondary-background-app: var(--teal-light-1);\n --secondary-background-component: var(--teal-light-0);\n --secondary-background-hover: var(--teal-light-2);\n --secondary-background-border: var(--teal-light-3);\n --secondary-background-active: var(--teal-light-4);\n --secondary-content--: var(--teal--);\n --secondary-content-inverse: var(--neutral-black);\n --secondary-content-hover: var(--teal-dark-7);\n --secondary-content-active: var(--teal-dark-6);\n --success-background-app: var(--green-light-1);\n --success-background-component: var(--green-light-0);\n --success-background-hover: var(--green-light-2);\n --success-background-border: var(--green-light-3);\n --success-background-active: var(--green-light-4);\n --success-content--: var(--green--);\n --success-content-inverse: var(--neutral-black);\n --success-content-hover: var(--green-dark-7);\n --success-content-active: var(--green-dark-6);\n --warning-background-app: var(--yellow-light-1);\n --warning-background-component: var(--yellow-light-0);\n --warning-background-hover: var(--yellow-light-2);\n --warning-background-border: var(--yellow-light-3);\n --warning-background-active: var(--yellow-light-4);\n --warning-content--: var(--yellow--);\n --warning-content-inverse: var(--neutral-black);\n --warning-content-hover: var(--yellow-dark-7);\n --warning-content-active: var(--yellow-dark-6);\n --error-background-app: var(--red-light-1);\n --error-background-component: var(--red-light-0);\n --error-background-hover: var(--red-light-2);\n --error-background-border: var(--red-light-3);\n --error-background-active: var(--red-light-4);\n --error-content--: var(--red--);\n --error-content-inverse: var(--neutral-white);\n --error-content-hover: var(--red-dark-7);\n --error-content-active: var(--red-dark-6);\n --help-background-app: var(--indigo-light-1);\n --help-background-component: var(--indigo-light-0);\n --help-background-hover: var(--indigo-light-2);\n --help-background-active: var(--indigo-light-3);\n --help-background-border: var(--indigo-light-4);\n --help-content--: var(--indigo--);\n --help-content-inverse: var(--neutral-white);\n --help-content-hover: var(--indigo-dark-7);\n --help-content-active: var(--indigo-dark-6);\n --component-appbar-background: var(--base-background-component);\n --component-appbar-color: var(--base-content--);\n --component-appbar-border-color: var(--base-background-border);\n --component-appbar-border-width: var(--component-sidebar-border-width);\n --component-appbar-border-radius: var(--component-sidebar-border-radius);\n --component-appbar-inner-border-width: var(\n --component-sidebar-border-width\n );\n --component-checkbox-background: var(--base-background-component);\n --component-checkbox-color: var(--base-content--);\n --component-checkbox-border-color: var(--base-content--);\n --component-checkbox-accent: var(--primary-content--);\n --component-dialog-background: var(--base-background-component);\n --component-dialog-color: var(--base-content--);\n --component-dialog-border-color: var(--base-background-border);\n --component-dialog-hover-background: var(--base-background-hover);\n --component-dialog-accent: var(--primary-content--);\n --component-dialog-shadow: var(--base-shadow);\n --component-drawer-background: var(--base-background-component);\n --component-drawer-color: var(--base-content--);\n --component-drawer-border-color: var(--base-background-border);\n --component-drawer-hover-background: var(--base-background-hover);\n --component-input-background: var(--base-background-app);\n --component-input-background-disabled: var(--base-background-component);\n --component-input-color: var(--base-content--);\n --component-input-border-color: var(--base-background-border);\n --component-input-accent: var(--primary-content--);\n --component-input-label-color: var(--base-content-light);\n --component-input-icon-color: var(--base-content-lighter);\n --component-input-error-color: var(--error-content--);\n --component-input-error-background: var(--error-background-component);\n --component-input-error-border-color: var(--error-background-border);\n --component-menu-background: var(--base-background-component);\n --component-menu-color: var(--base-content--);\n --component-menu-border-color: var(--base-background-border);\n --component-menu-hover-background: var(--base-background-hover);\n --component-menu-shadow: var(--base-shadow);\n --component-panel-background: var(--base-background-component);\n --component-panel-color: var(--base-content--);\n --component-panel-expanded-background: var(--base-background-app);\n --component-panel-accent: var(--primary-content--);\n --component-panel-active-border: var(--base-background-active);\n --component-panel-accent-hover-background: var(--primary-background-active);\n --component-panel-hover-background: var(--base-background-hover);\n --component-radio-color: var(--base-content--);\n --component-radio-accent: var(--primary-content--);\n --component-select-background: var(--base-background-app);\n --component-select-color: var(--base-content--);\n --component-select-border-color: var(--base-background-border);\n --component-select-accent: var(--primary-content--);\n --component-select-accent-contrast: var(--base-background-component);\n --component-select-label-color: var(--base-content-light);\n --component-select-hover-background: var(--base-background-hover);\n --component-select-shadow: var(--base-shadow);\n --component-select-error-color: var(--error-content--);\n --component-select-error-background: var(--error-background-component);\n --component-select-error-border-color: var(--error-background-border);\n --component-table-color: var(--base-content--);\n --component-table-border-color: var(--base-background-border);\n --component-table-hover-background: var(--base-background-hover);\n --component-table-active-background: var(--base-background-active);\n --component-table-color-light: var(--base-content-lightest);\n --component-tabs-background: var(--base-background-component);\n --component-tabs-color: var(--base-content--);\n --component-tabs-border-color: var(--base-background-border);\n --component-tabs-accent: var(--primary-content--);\n --component-tabs-font-family: var(--font-family-body);\n --component-slider-width: 129px;\n --font-family-header: \"Lexend\", sans-serif;\n --font-family-body: \"Lexend\", sans-serif;\n}\n";
2
2
 
3
3
  /**
4
4
  * Icon registry — a runtime map of icon names to SVG markup strings.
@@ -151,6 +151,8 @@ var logo = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill
151
151
 
152
152
  var mail = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <rect x=\"2\" y=\"4\" width=\"20\" height=\"16\" rx=\"2\"/>\n <path d=\"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7\"/>\n</svg>\n";
153
153
 
154
+ var menu$1 = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <line x1=\"4\" y1=\"6\" x2=\"20\" y2=\"6\"/>\n <line x1=\"4\" y1=\"12\" x2=\"20\" y2=\"12\"/>\n <line x1=\"4\" y1=\"18\" x2=\"20\" y2=\"18\"/>\n</svg>\n";
155
+
154
156
  var moon = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <path d=\"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z\"/>\n</svg>\n";
155
157
 
156
158
  var palette = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <circle cx=\"13.5\" cy=\"6.5\" r=\"1.5\"/>\n <circle cx=\"17.5\" cy=\"10.5\" r=\"1.5\"/>\n <circle cx=\"8.5\" cy=\"7.5\" r=\"1.5\"/>\n <circle cx=\"6.5\" cy=\"12.5\" r=\"1.5\"/>\n <path d=\"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z\"/>\n</svg>\n";
@@ -256,6 +258,7 @@ registerIcons({
256
258
  lock,
257
259
  logo,
258
260
  mail,
261
+ menu: menu$1,
259
262
  moon,
260
263
  palette,
261
264
  plus,
@@ -332,6 +335,7 @@ class YumeButton extends HTMLElement {
332
335
  }
333
336
  }
334
337
 
338
+ /** The current selected value(s), comma-separated when 'multiple' is set. */
335
339
  get value() {
336
340
  if (this.hasAttribute("multiple")) {
337
341
  return Array.from(this.selectedValues).join(",");
@@ -362,6 +366,10 @@ class YumeButton extends HTMLElement {
362
366
  this.setAttribute("value", newVal);
363
367
  }
364
368
 
369
+ /**
370
+ * Sets the button options from an array of objects.
371
+ * @param {Array<Object>} options
372
+ */
365
373
  setOptions(options) {
366
374
  this.setAttribute("options", JSON.stringify(options));
367
375
  }
@@ -939,7 +947,6 @@ function sanitizeSvg(raw) {
939
947
  }
940
948
  };
941
949
 
942
- // Sanitize the <svg> element's own attributes
943
950
  for (const attr of [...svg.attributes]) {
944
951
  if (!ALLOWED_ATTRS.has(attr.name.toLowerCase())) {
945
952
  svg.removeAttribute(attr.name);
@@ -981,6 +988,7 @@ class YumeIcon extends HTMLElement {
981
988
  this.render();
982
989
  }
983
990
 
991
+ /** The registered icon name to display. */
984
992
  get name() {
985
993
  return this.getAttribute("name") || "";
986
994
  }
@@ -988,6 +996,7 @@ class YumeIcon extends HTMLElement {
988
996
  this.setAttribute("name", val);
989
997
  }
990
998
 
999
+ /** Icon size: "small" | "medium" | "large" (default "medium"). */
991
1000
  get size() {
992
1001
  return this.getAttribute("size") || "medium";
993
1002
  }
@@ -995,6 +1004,7 @@ class YumeIcon extends HTMLElement {
995
1004
  this.setAttribute("size", val);
996
1005
  }
997
1006
 
1007
+ /** Color theme: "base" | "primary" | "secondary" | "success" | "warning" | "error" | "help". */
998
1008
  get color() {
999
1009
  return this.getAttribute("color") || "";
1000
1010
  }
@@ -1003,6 +1013,7 @@ class YumeIcon extends HTMLElement {
1003
1013
  else this.removeAttribute("color");
1004
1014
  }
1005
1015
 
1016
+ /** Accessible label for the icon. When set, the icon gets role="img". */
1006
1017
  get label() {
1007
1018
  return this.getAttribute("label") || "";
1008
1019
  }
@@ -1011,8 +1022,9 @@ class YumeIcon extends HTMLElement {
1011
1022
  else this.removeAttribute("label");
1012
1023
  }
1013
1024
 
1025
+ /** Stroke weight: "thin" | "regular" | "thick". */
1014
1026
  get weight() {
1015
- return this.getAttribute("weight") || "";
1027
+ return this.getAttribute("weight") || "regular";
1016
1028
  }
1017
1029
  set weight(val) {
1018
1030
  if (val) this.setAttribute("weight", val);
@@ -1034,18 +1046,22 @@ class YumeIcon extends HTMLElement {
1034
1046
 
1035
1047
  _getSize(size) {
1036
1048
  const map = {
1037
- small: "var(--component-icon-size-small, 16px)",
1038
- medium: "var(--component-icon-size-medium, 24px)",
1039
- large: "var(--component-icon-size-large, 32px)",
1049
+ "x-small": "var(--component-icon-size-x-small, 10px)",
1050
+ small: "var(--component-icon-size-small, 14px)",
1051
+ medium: "var(--component-icon-size-medium, 18px)",
1052
+ large: "var(--component-icon-size-large, 22px)",
1053
+ "x-large": "var(--component-icon-size-x-large, 28px)",
1040
1054
  };
1041
1055
  return map[size] || map.medium;
1042
1056
  }
1043
1057
 
1044
1058
  _getWeight(weight) {
1045
1059
  const map = {
1046
- thin: "1",
1047
- regular: "1.5",
1048
- thick: "2",
1060
+ "x-thin": "1",
1061
+ thin: "1.5",
1062
+ regular: "2",
1063
+ thick: "2.5",
1064
+ "x-thick": "3",
1049
1065
  };
1050
1066
  return map[weight] || "";
1051
1067
  }
@@ -1113,11 +1129,14 @@ class YumeMenu extends HTMLElement {
1113
1129
 
1114
1130
  connectedCallback() {
1115
1131
  if (!this.hasAttribute("items")) this.items = [];
1132
+
1116
1133
  this._setupAnchor();
1117
1134
  this.render();
1135
+
1118
1136
  document.addEventListener("click", this._onDocumentClick);
1119
1137
  window.addEventListener("scroll", this._onScrollOrResize, true);
1120
1138
  window.addEventListener("resize", this._onScrollOrResize);
1139
+
1121
1140
  this.style.position = "fixed";
1122
1141
  this.style.zIndex = "1000";
1123
1142
  this.style.display = "none";
@@ -1125,6 +1144,7 @@ class YumeMenu extends HTMLElement {
1125
1144
 
1126
1145
  disconnectedCallback() {
1127
1146
  this._teardownAnchor();
1147
+
1128
1148
  document.removeEventListener("click", this._onDocumentClick);
1129
1149
  window.removeEventListener("scroll", this._onScrollOrResize, true);
1130
1150
  window.removeEventListener("resize", this._onScrollOrResize);
@@ -1132,14 +1152,18 @@ class YumeMenu extends HTMLElement {
1132
1152
 
1133
1153
  attributeChangedCallback(name, oldVal, newVal) {
1134
1154
  if (oldVal === newVal) return;
1155
+
1135
1156
  if (name === "items" || name === "size") this.render();
1157
+
1136
1158
  if (name === "anchor") {
1137
1159
  this._teardownAnchor();
1138
1160
  this._setupAnchor();
1139
1161
  }
1162
+
1140
1163
  if (name === "visible") {
1141
1164
  this._updatePosition();
1142
1165
  }
1166
+
1143
1167
  if (name === "direction") {
1144
1168
  this._updatePosition();
1145
1169
  }
@@ -1250,9 +1274,20 @@ class YumeMenu extends HTMLElement {
1250
1274
 
1251
1275
  _onAnchorClick(e) {
1252
1276
  e.stopPropagation();
1277
+ if (!this.visible) {
1278
+ YumeMenu._closeAll(this);
1279
+ }
1253
1280
  this.visible = !this.visible;
1254
1281
  }
1255
1282
 
1283
+ static _closeAll(except) {
1284
+ document.querySelectorAll("y-menu").forEach((menu) => {
1285
+ if (menu !== except && menu.visible) {
1286
+ menu.visible = false;
1287
+ }
1288
+ });
1289
+ }
1290
+
1256
1291
  _onDocumentClick(e) {
1257
1292
  const path = e.composedPath();
1258
1293
  if (this._anchorEl && path.includes(this._anchorEl)) return;
@@ -1292,7 +1327,13 @@ class YumeMenu extends HTMLElement {
1292
1327
  }
1293
1328
 
1294
1329
  const anchorRect = this._anchorEl.getBoundingClientRect();
1330
+
1331
+ // Temporarily show off-screen to measure actual dimensions
1332
+ this.style.visibility = "hidden";
1333
+ this.style.display = "block";
1295
1334
  const menuRect = this.getBoundingClientRect();
1335
+ this.style.visibility = "";
1336
+
1296
1337
  const vw = window.innerWidth;
1297
1338
  const vh = window.innerHeight;
1298
1339
 
@@ -1353,8 +1394,8 @@ class YumeMenu extends HTMLElement {
1353
1394
  this.shadowRoot.innerHTML = "";
1354
1395
 
1355
1396
  const paddingVar = `var(--component-button-padding-${this.size}, 0.5rem)`;
1356
-
1357
1397
  const style = document.createElement("style");
1398
+
1358
1399
  style.textContent = `
1359
1400
  ul.menu,
1360
1401
  ul.submenu {
@@ -1407,12 +1448,14 @@ class YumeMenu extends HTMLElement {
1407
1448
  flex: 1;
1408
1449
  }
1409
1450
  `;
1451
+
1410
1452
  this.shadowRoot.appendChild(style);
1411
1453
 
1412
1454
  const rootUl = this._createMenuList(this.items);
1413
1455
  rootUl.classList.add("menu");
1414
1456
  rootUl.setAttribute("role", "menu");
1415
1457
  rootUl.setAttribute("part", "menu");
1458
+
1416
1459
  this.shadowRoot.appendChild(rootUl);
1417
1460
  }
1418
1461
  }
@@ -1450,6 +1493,10 @@ const checkmark = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><
1450
1493
 
1451
1494
  const indeterminate = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><rect x="4" y="11" width="16" height="2" rx="1" ry="1" fill="currentColor"/></svg>`;
1452
1495
 
1496
+ /* ── Menu (hamburger) ────────────────────────────────────────────── */
1497
+
1498
+ const menu = `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="4" y1="6" x2="20" y2="6"/><line x1="4" y1="12" x2="20" y2="12"/><line x1="4" y1="18" x2="20" y2="18"/></svg>`;
1499
+
1453
1500
  /* ── Close / remove ───────────────────────────────────────────────── */
1454
1501
 
1455
1502
  const close = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" width="14" height="14" stroke="currentColor" stroke-width="2" fill="none" stroke-linecap="round"><line x1="6" y1="6" x2="14" y2="14" /><line x1="14" y1="6" x2="6" y2="14" /></svg>`;
@@ -1495,6 +1542,7 @@ class YumeAppbar extends HTMLElement {
1495
1542
  "size",
1496
1543
  "menu-direction",
1497
1544
  "sticky",
1545
+ "mobile-breakpoint",
1498
1546
  ];
1499
1547
  }
1500
1548
 
@@ -1502,17 +1550,26 @@ class YumeAppbar extends HTMLElement {
1502
1550
  super();
1503
1551
  this.attachShadow({ mode: "open" });
1504
1552
  this._onCollapseClick = this._onCollapseClick.bind(this);
1553
+ this._onMediaChange = this._onMediaChange.bind(this);
1505
1554
  this._idCounter = 0;
1555
+ this._mql = null;
1556
+ this._isMobile = false;
1506
1557
  }
1507
1558
 
1508
1559
  connectedCallback() {
1560
+ this._setupMediaQuery();
1509
1561
  this.render();
1510
1562
  }
1511
1563
 
1512
- disconnectedCallback() {}
1564
+ disconnectedCallback() {
1565
+ this._teardownMediaQuery();
1566
+ }
1513
1567
 
1514
1568
  attributeChangedCallback(name, oldVal, newVal) {
1515
1569
  if (oldVal === newVal) return;
1570
+ if (name === "mobile-breakpoint" || name === "orientation") {
1571
+ this._setupMediaQuery();
1572
+ }
1516
1573
  this.render();
1517
1574
  }
1518
1575
 
@@ -1570,6 +1627,23 @@ class YumeAppbar extends HTMLElement {
1570
1627
  else this.removeAttribute("sticky");
1571
1628
  }
1572
1629
 
1630
+ /**
1631
+ * Override the mobile breakpoint (in pixels) for this instance.
1632
+ * Falls back to the CSS variable --component-appbar-mobile-breakpoint (default 768).
1633
+ */
1634
+ get mobileBreakpoint() {
1635
+ return this.getAttribute("mobile-breakpoint") || "";
1636
+ }
1637
+ set mobileBreakpoint(val) {
1638
+ if (val) this.setAttribute("mobile-breakpoint", val);
1639
+ else this.removeAttribute("mobile-breakpoint");
1640
+ }
1641
+
1642
+ /** Whether the appbar is currently rendering in mobile mode. */
1643
+ get mobile() {
1644
+ return this._isMobile;
1645
+ }
1646
+
1573
1647
  toggle() {
1574
1648
  this.collapsed = !this.collapsed;
1575
1649
  }
@@ -1592,7 +1666,228 @@ class YumeAppbar extends HTMLElement {
1592
1666
  return false;
1593
1667
  }
1594
1668
 
1669
+ _getBreakpointPx() {
1670
+ const attr = this.mobileBreakpoint;
1671
+ if (attr) {
1672
+ const px = parseInt(attr, 10);
1673
+ if (!isNaN(px) && px > 0) return px;
1674
+ }
1675
+ const cssVal = getComputedStyle(document.documentElement)
1676
+ .getPropertyValue("--component-appbar-mobile-breakpoint")
1677
+ .trim();
1678
+ if (cssVal) {
1679
+ const px = parseInt(cssVal, 10);
1680
+ if (!isNaN(px) && px > 0) return px;
1681
+ }
1682
+ return 768;
1683
+ }
1684
+
1685
+ _setupMediaQuery() {
1686
+ this._teardownMediaQuery();
1687
+ if (this.orientation !== "horizontal") {
1688
+ this._isMobile = false;
1689
+ return;
1690
+ }
1691
+ const bp = this._getBreakpointPx();
1692
+ this._mql = window.matchMedia(`(max-width: ${bp}px)`);
1693
+ this._isMobile = this._mql.matches;
1694
+ this._mql.addEventListener("change", this._onMediaChange);
1695
+ }
1696
+
1697
+ _teardownMediaQuery() {
1698
+ if (this._mql) {
1699
+ this._mql.removeEventListener("change", this._onMediaChange);
1700
+ this._mql = null;
1701
+ }
1702
+ }
1703
+
1704
+ _onMediaChange(e) {
1705
+ this._isMobile = e.matches;
1706
+ this.render();
1707
+ }
1708
+
1709
+ /**
1710
+ * Convert appbar nav items to y-menu item format.
1711
+ * Maps `href` → `url` and recursively converts children.
1712
+ */
1713
+ _toMenuItems(items) {
1714
+ return items.map((item) => {
1715
+ const mi = { text: item.text || "" };
1716
+ if (item.href) mi.url = item.href;
1717
+ if (item.icon) mi.icon = item.icon;
1718
+ if (item.children?.length) {
1719
+ mi.children = this._toMenuItems(item.children);
1720
+ }
1721
+ return mi;
1722
+ });
1723
+ }
1724
+
1595
1725
  render() {
1726
+ if (this._isMobile) {
1727
+ this._renderMobile();
1728
+ } else {
1729
+ this._renderDesktop();
1730
+ }
1731
+ }
1732
+
1733
+ _renderMobile() {
1734
+ const size = this.size;
1735
+
1736
+ const sizeConfig = {
1737
+ small: {
1738
+ padding: "var(--spacing-x-small, 4px)",
1739
+ buttonSize: "small",
1740
+ iconSize: "small",
1741
+ },
1742
+ medium: {
1743
+ padding: "var(--spacing-small, 6px)",
1744
+ buttonSize: "medium",
1745
+ iconSize: "medium",
1746
+ },
1747
+ large: {
1748
+ padding: "var(--spacing-medium, 8px)",
1749
+ buttonSize: "large",
1750
+ iconSize: "large",
1751
+ },
1752
+ };
1753
+
1754
+ this.shadowRoot.innerHTML = "";
1755
+ this._idCounter = 0;
1756
+
1757
+ const cfg = sizeConfig[size] || sizeConfig.medium;
1758
+ const style = document.createElement("style");
1759
+
1760
+ style.textContent = `
1761
+ :host {
1762
+ display: block;
1763
+ font-family: var(--font-family-body, sans-serif);
1764
+ color: var(--component-appbar-color, #f7f7fa);
1765
+ }
1766
+
1767
+ :host([sticky]),
1768
+ :host([sticky="start"]),
1769
+ :host([sticky="end"]) {
1770
+ position: sticky;
1771
+ top: 0;
1772
+ left: 0;
1773
+ width: 100%;
1774
+ z-index: var(--component-appbar-z-index, 100);
1775
+ }
1776
+
1777
+ :host([sticky]) .appbar {
1778
+ border-radius: 0;
1779
+ border: none;
1780
+ border-bottom: var(--component-appbar-border-width, var(--component-sidebar-border-width, 2px)) solid var(--component-appbar-border-color, #37383a);
1781
+ }
1782
+
1783
+ .appbar {
1784
+ display: flex;
1785
+ flex-direction: row;
1786
+ align-items: center;
1787
+ background: var(--component-appbar-background, #0c0c0d);
1788
+ border: var(--component-appbar-border-width, var(--component-sidebar-border-width, 2px)) solid var(--component-appbar-border-color, #37383a);
1789
+ border-radius: var(--component-appbar-border-radius, var(--component-sidebar-border-radius, 4px));
1790
+ overflow: visible;
1791
+ padding: var(--_appbar-padding);
1792
+ box-sizing: border-box;
1793
+ width: 100%;
1794
+ height: auto;
1795
+ }
1796
+
1797
+ .mobile-start {
1798
+ display: flex;
1799
+ align-items: center;
1800
+ flex-shrink: 0;
1801
+ }
1802
+
1803
+ .mobile-center {
1804
+ flex: 1;
1805
+ display: flex;
1806
+ justify-content: center;
1807
+ align-items: center;
1808
+ overflow: hidden;
1809
+ }
1810
+
1811
+ .mobile-end {
1812
+ display: flex;
1813
+ align-items: center;
1814
+ flex-shrink: 0;
1815
+ }
1816
+
1817
+ .mobile-end ::slotted(*) {
1818
+ display: block;
1819
+ }
1820
+
1821
+ ::slotted(*) {
1822
+ display: block;
1823
+ }
1824
+ `;
1825
+ this.shadowRoot.appendChild(style);
1826
+
1827
+ const bar = document.createElement("div");
1828
+ bar.className = "appbar";
1829
+ bar.setAttribute("role", "navigation");
1830
+ bar.style.setProperty("--_appbar-padding", cfg.padding);
1831
+
1832
+ /* ── Left: hamburger button ── */
1833
+ const startSection = document.createElement("div");
1834
+ startSection.className = "mobile-start";
1835
+
1836
+ const menuBtn = document.createElement("y-button");
1837
+ const menuBtnId = this._uid("appbar-mobile-menu");
1838
+ menuBtn.id = menuBtnId;
1839
+ menuBtn.setAttribute("color", "base");
1840
+ menuBtn.setAttribute("style-type", "flat");
1841
+ menuBtn.setAttribute("size", cfg.buttonSize);
1842
+ menuBtn.setAttribute("aria-label", "Open menu");
1843
+
1844
+ const menuIcon = document.createElement("span");
1845
+ menuIcon.slot = "left-icon";
1846
+ menuIcon.innerHTML = menu;
1847
+ menuBtn.appendChild(menuIcon);
1848
+
1849
+ startSection.appendChild(menuBtn);
1850
+
1851
+ const navItems = this.items;
1852
+ if (navItems.length > 0) {
1853
+ const mobileMenu = document.createElement("y-menu");
1854
+ mobileMenu.setAttribute("anchor", menuBtnId);
1855
+ mobileMenu.setAttribute("direction", "down");
1856
+ mobileMenu.setAttribute("size", cfg.buttonSize);
1857
+ mobileMenu.items = this._toMenuItems(navItems);
1858
+ startSection.appendChild(mobileMenu);
1859
+ }
1860
+
1861
+ bar.appendChild(startSection);
1862
+
1863
+ /* ── Center: logo + title ── */
1864
+ const centerSection = document.createElement("div");
1865
+ centerSection.className = "mobile-center";
1866
+
1867
+ const logoSlot = document.createElement("slot");
1868
+ logoSlot.name = "logo";
1869
+ centerSection.appendChild(logoSlot);
1870
+
1871
+ const titleSlot = document.createElement("slot");
1872
+ titleSlot.name = "title";
1873
+ centerSection.appendChild(titleSlot);
1874
+
1875
+ bar.appendChild(centerSection);
1876
+
1877
+ /* ── Right: footer slot ── */
1878
+ const endSection = document.createElement("div");
1879
+ endSection.className = "mobile-end";
1880
+ endSection.setAttribute("part", "footer");
1881
+
1882
+ const footerSlot = document.createElement("slot");
1883
+ footerSlot.name = "footer";
1884
+ endSection.appendChild(footerSlot);
1885
+
1886
+ bar.appendChild(endSection);
1887
+ this.shadowRoot.appendChild(bar);
1888
+ }
1889
+
1890
+ _renderDesktop() {
1596
1891
  const isVertical = this.orientation === "vertical";
1597
1892
  const isCollapsed = this.collapsed && isVertical;
1598
1893
  const size = this.size;
@@ -1621,12 +1916,13 @@ class YumeAppbar extends HTMLElement {
1621
1916
  iconSize: "large",
1622
1917
  },
1623
1918
  };
1624
- const cfg = sizeConfig[size] || sizeConfig.medium;
1625
1919
 
1626
1920
  this.shadowRoot.innerHTML = "";
1627
1921
  this._idCounter = 0;
1628
1922
 
1923
+ const cfg = sizeConfig[size] || sizeConfig.medium;
1629
1924
  const style = document.createElement("style");
1925
+
1630
1926
  style.textContent = `
1631
1927
  :host {
1632
1928
  display: block;
@@ -1855,15 +2151,11 @@ class YumeAppbar extends HTMLElement {
1855
2151
  `;
1856
2152
  this.shadowRoot.appendChild(style);
1857
2153
 
1858
- // Clone document stylesheets so CSS-class-based icons (e.g. Font Awesome) render in shadow DOM
1859
- document.querySelectorAll('link[rel="stylesheet"]').forEach((link) => {
1860
- this.shadowRoot.appendChild(link.cloneNode(true));
1861
- });
1862
-
1863
2154
  const bar = document.createElement("div");
1864
2155
  bar.className = `appbar ${isVertical ? "vertical" : "horizontal"}`;
1865
2156
 
1866
2157
  if (isCollapsed) bar.classList.add("collapsed");
2158
+
1867
2159
  bar.setAttribute("role", "navigation");
1868
2160
  bar.style.setProperty("--_appbar-padding", cfg.padding);
1869
2161
  bar.style.setProperty("--_appbar-collapsed-width", cfg.collapsedWidth);
@@ -1873,7 +2165,6 @@ class YumeAppbar extends HTMLElement {
1873
2165
  `calc(${cfg.collapsedWidth} - 2 * var(--_appbar-padding) - 2 * var(--component-appbar-border-width, var(--component-sidebar-border-width, 2px)))`,
1874
2166
  );
1875
2167
 
1876
- /* --- Header: logo + title --- */
1877
2168
  const header = document.createElement("div");
1878
2169
  header.className = "appbar-header";
1879
2170
  header.setAttribute("part", "header");
@@ -1903,21 +2194,22 @@ class YumeAppbar extends HTMLElement {
1903
2194
  header.appendChild(headerSlot);
1904
2195
  bar.appendChild(header);
1905
2196
 
1906
- /* --- Body: y-button nav items --- */
1907
2197
  const body = document.createElement("div");
1908
2198
  body.className = "appbar-body";
1909
2199
  body.setAttribute("part", "body");
1910
2200
 
1911
2201
  const navItems = this.items;
2202
+
1912
2203
  navItems.forEach((item) => {
1913
2204
  const hasChildren = item.children?.length > 0;
1914
2205
  const wrapper = document.createElement("div");
1915
- wrapper.className = "nav-item";
1916
-
1917
2206
  const btn = document.createElement("y-button");
1918
2207
  const btnId = this._uid("appbar-btn");
1919
- btn.id = btnId;
1920
2208
  const isActive = this._isItemActive(item);
2209
+
2210
+ wrapper.className = "nav-item";
2211
+ btn.id = btnId;
2212
+
1921
2213
  btn.setAttribute("color", isActive ? "primary" : "base");
1922
2214
  btn.setAttribute("style-type", "flat");
1923
2215
  btn.setAttribute("size", cfg.buttonSize);
@@ -1980,7 +2272,6 @@ class YumeAppbar extends HTMLElement {
1980
2272
 
1981
2273
  bar.appendChild(body);
1982
2274
 
1983
- /* --- Footer: slot + collapse toggle (vertical only) --- */
1984
2275
  const footer = document.createElement("div");
1985
2276
  footer.className = "appbar-footer";
1986
2277
  footer.setAttribute("part", "footer");
@@ -2198,22 +2489,27 @@ class YumeBadge extends HTMLElement {
2198
2489
  }
2199
2490
  }
2200
2491
 
2492
+ /** Horizontal alignment of the badge: "left" | "right" (default "right"). */
2201
2493
  get alignment() {
2202
2494
  return this.getAttribute("alignment") || "right";
2203
2495
  }
2204
2496
 
2497
+ /** Color theme: "primary" | "secondary" | "base" | "success" | "warning" | "error" | "help". */
2205
2498
  get color() {
2206
2499
  return this.getAttribute("color") || "primary";
2207
2500
  }
2208
2501
 
2502
+ /** Vertical position of the badge: "top" | "bottom" (default "top"). */
2209
2503
  get position() {
2210
2504
  return this.getAttribute("position") || "top";
2211
2505
  }
2212
2506
 
2507
+ /** Badge size: "small" | "medium" | "large" (default "small"). */
2213
2508
  get size() {
2214
2509
  return this.getAttribute("size") || "small";
2215
2510
  }
2216
2511
 
2512
+ /** The text content displayed inside the badge. */
2217
2513
  get value() {
2218
2514
  return this.getAttribute("value") || "";
2219
2515
  }
@@ -2524,6 +2820,7 @@ class YumeCheckbox extends HTMLElement {
2524
2820
  this.updateState();
2525
2821
  }
2526
2822
 
2823
+ /** @type {boolean} Whether the checkbox is checked. */
2527
2824
  get checked() {
2528
2825
  return this.hasAttribute("checked");
2529
2826
  }
@@ -2533,6 +2830,7 @@ class YumeCheckbox extends HTMLElement {
2533
2830
  else this.removeAttribute("checked");
2534
2831
  }
2535
2832
 
2833
+ /** @type {boolean} Whether the checkbox is disabled. */
2536
2834
  get disabled() {
2537
2835
  return this.hasAttribute("disabled");
2538
2836
  }
@@ -2542,6 +2840,7 @@ class YumeCheckbox extends HTMLElement {
2542
2840
  else this.removeAttribute("disabled");
2543
2841
  }
2544
2842
 
2843
+ /** @type {boolean} Whether the checkbox is in an indeterminate state. */
2545
2844
  get indeterminate() {
2546
2845
  return this.hasAttribute("indeterminate");
2547
2846
  }
@@ -2551,6 +2850,7 @@ class YumeCheckbox extends HTMLElement {
2551
2850
  else this.removeAttribute("indeterminate");
2552
2851
  }
2553
2852
 
2853
+ /** @type {string} The form value submitted when checked. Defaults to "on". */
2554
2854
  get value() {
2555
2855
  return this.getAttribute("value") || "on";
2556
2856
  }
@@ -2559,10 +2859,12 @@ class YumeCheckbox extends HTMLElement {
2559
2859
  this.setAttribute("value", val);
2560
2860
  }
2561
2861
 
2862
+ /** @type {string|null} The form name of the checkbox. */
2562
2863
  get name() {
2563
2864
  return this.getAttribute("name");
2564
2865
  }
2565
2866
 
2867
+ /** Toggles the checked state and dispatches a "change" event. */
2566
2868
  toggle() {
2567
2869
  if (this.disabled) return;
2568
2870
  if (this.indeterminate) {
@@ -2749,6 +3051,7 @@ class YumeDialog extends HTMLElement {
2749
3051
  }
2750
3052
  }
2751
3053
 
3054
+ /** Whether the dialog is currently displayed. */
2752
3055
  get visible() {
2753
3056
  return this.hasAttribute("visible");
2754
3057
  }
@@ -2758,6 +3061,7 @@ class YumeDialog extends HTMLElement {
2758
3061
  else this.removeAttribute("visible");
2759
3062
  }
2760
3063
 
3064
+ /** The id of the element that toggles this dialog on click. */
2761
3065
  get anchor() {
2762
3066
  return this.getAttribute("anchor");
2763
3067
  }
@@ -2766,6 +3070,7 @@ class YumeDialog extends HTMLElement {
2766
3070
  this.setAttribute("anchor", id);
2767
3071
  }
2768
3072
 
3073
+ /** Whether the dialog renders a close button in the header. */
2769
3074
  get closable() {
2770
3075
  return this.hasAttribute("closable");
2771
3076
  }
@@ -2774,6 +3079,7 @@ class YumeDialog extends HTMLElement {
2774
3079
  else this.removeAttribute("closable");
2775
3080
  }
2776
3081
 
3082
+ /** Whether to apply a blurred backdrop behind the dialog. */
2777
3083
  get showBackdrop() {
2778
3084
  return this.hasAttribute("show-backdrop");
2779
3085
  }
@@ -2782,6 +3088,7 @@ class YumeDialog extends HTMLElement {
2782
3088
  else this.removeAttribute("show-backdrop");
2783
3089
  }
2784
3090
 
3091
+ /** Whether the dialog uses an entrance animation. */
2785
3092
  get animate() {
2786
3093
  return this.hasAttribute("animate");
2787
3094
  }
@@ -2790,6 +3097,7 @@ class YumeDialog extends HTMLElement {
2790
3097
  else this.removeAttribute("animate");
2791
3098
  }
2792
3099
 
3100
+ /** Opens the dialog and focuses it. */
2793
3101
  show() {
2794
3102
  if (!this.shadowRoot.querySelector(".dialog")) {
2795
3103
  this.render();
@@ -2803,6 +3111,7 @@ class YumeDialog extends HTMLElement {
2803
3111
  }
2804
3112
  }
2805
3113
 
3114
+ /** Closes the dialog. */
2806
3115
  hide() {
2807
3116
  document.removeEventListener("keydown", this.onKeyDown);
2808
3117
  }
@@ -2878,26 +3187,6 @@ class YumeDialog extends HTMLElement {
2878
3187
  .header-content {
2879
3188
  flex: 1;
2880
3189
  }
2881
- .close-btn {
2882
- background: none;
2883
- border: none;
2884
- cursor: pointer;
2885
- padding: var(--spacing-x-small, 4px);
2886
- color: var(--component-dialog-color, #f7f7fa);
2887
- font-size: 1.25em;
2888
- line-height: 1;
2889
- border-radius: var(--component-button-border-radius-outer, 4px);
2890
- display: flex;
2891
- align-items: center;
2892
- justify-content: center;
2893
- }
2894
- .close-btn:hover {
2895
- background: var(--component-dialog-hover-background, #292a2b);
2896
- }
2897
- .close-btn:focus-visible {
2898
- outline: 2px solid var(--component-dialog-accent);
2899
- outline-offset: -1px;
2900
- }
2901
3190
  .body {
2902
3191
  padding: var(--component-dialog-padding, var(--spacing-medium));
2903
3192
  overflow: auto;
@@ -2933,10 +3222,11 @@ class YumeDialog extends HTMLElement {
2933
3222
  header.appendChild(headerContent);
2934
3223
 
2935
3224
  if (this.closable) {
2936
- const closeBtn = document.createElement("button");
2937
- closeBtn.className = "close-btn";
3225
+ const closeBtn = document.createElement("y-button");
3226
+ closeBtn.setAttribute("size", "small");
3227
+ closeBtn.setAttribute("style-type", "flat");
2938
3228
  closeBtn.setAttribute("aria-label", "Close");
2939
- closeBtn.innerHTML = "&#10005;";
3229
+ closeBtn.textContent = "\u2715";
2940
3230
  closeBtn.addEventListener("click", () => {
2941
3231
  this.visible = false;
2942
3232
  });
@@ -2958,18 +3248,20 @@ class YumeDialog extends HTMLElement {
2958
3248
  dialog.appendChild(footer);
2959
3249
  this.shadowRoot.appendChild(dialog);
2960
3250
 
2961
- // Hide slot containers that have no slotted content
2962
3251
  const hideIfEmpty = (wrapper) => {
2963
3252
  const slot = wrapper.querySelector("slot");
2964
3253
  if (!slot) return;
3254
+
2965
3255
  const update = () => {
2966
3256
  const hasContent =
2967
3257
  slot.assignedNodes({ flatten: true }).length > 0;
2968
3258
  wrapper.style.display = hasContent ? "" : "none";
2969
3259
  };
3260
+
2970
3261
  slot.addEventListener("slotchange", update);
2971
3262
  update();
2972
3263
  };
3264
+
2973
3265
  if (!this.closable) hideIfEmpty(header);
2974
3266
  hideIfEmpty(body);
2975
3267
  hideIfEmpty(footer);
@@ -3082,8 +3374,7 @@ class YumeDrawer extends HTMLElement {
3082
3374
 
3083
3375
  _show() {
3084
3376
  this.style.display = "block";
3085
- // Force a reflow so the browser registers the initial state
3086
- this.offsetHeight; // eslint-disable-line no-unused-expressions
3377
+ this.offsetHeight;
3087
3378
 
3088
3379
  const overlay = this.shadowRoot.querySelector(".overlay");
3089
3380
  const panel = this.shadowRoot.querySelector(".drawer-panel");
@@ -3469,6 +3760,7 @@ class YumeInput extends HTMLElement {
3469
3760
  this.render();
3470
3761
  }
3471
3762
 
3763
+ /** @type {string} The current input value. */
3472
3764
  get value() {
3473
3765
  return this.input?.value || "";
3474
3766
  }
@@ -3479,6 +3771,10 @@ class YumeInput extends HTMLElement {
3479
3771
  this._internals.setFormValue(val, this.getAttribute("name"));
3480
3772
  }
3481
3773
 
3774
+ /**
3775
+ * Checks the validity of the underlying input element.
3776
+ * @returns {boolean} Whether the input is valid.
3777
+ */
3482
3778
  checkValidity() {
3483
3779
  return this.input?.checkValidity?.() ?? true;
3484
3780
  }
@@ -3514,6 +3810,7 @@ class YumeInput extends HTMLElement {
3514
3810
  }[size] || "var(--sizing-medium, 40px)";
3515
3811
 
3516
3812
  const sheet = new CSSStyleSheet();
3813
+
3517
3814
  sheet.replaceSync(`
3518
3815
  :host {
3519
3816
  display: block;
@@ -3650,8 +3947,10 @@ class YumePanel extends HTMLElement {
3650
3947
  constructor() {
3651
3948
  super();
3652
3949
  this.attachShadow({ mode: "open" });
3950
+
3653
3951
  this._expanded = false;
3654
3952
  this._checkRouteMatchBound = this.checkRouteMatch.bind(this);
3953
+
3655
3954
  this.render();
3656
3955
  }
3657
3956
 
@@ -3690,6 +3989,7 @@ class YumePanel extends HTMLElement {
3690
3989
  }
3691
3990
  }
3692
3991
 
3992
+ /** @type {boolean} Whether the panel is in a selected/active state. */
3693
3993
  get selected() {
3694
3994
  return this.hasAttribute("selected");
3695
3995
  }
@@ -3699,6 +3999,7 @@ class YumePanel extends HTMLElement {
3699
3999
  else this.removeAttribute("selected");
3700
4000
  }
3701
4001
 
4002
+ /** @type {boolean} Whether the panel's children slot is visible. */
3702
4003
  get expanded() {
3703
4004
  return this.hasAttribute("expanded");
3704
4005
  }
@@ -3708,8 +4009,10 @@ class YumePanel extends HTMLElement {
3708
4009
  else this.removeAttribute("expanded");
3709
4010
  }
3710
4011
 
4012
+ /** Toggles the expanded state (collapses siblings when inside an exclusive panelbar). */
3711
4013
  toggle() {
3712
4014
  if (!this.hasChildren()) return;
4015
+
3713
4016
  if (!this._expanded) {
3714
4017
  const parentBar = this.closest("y-panelbar");
3715
4018
  if (parentBar && parentBar.hasAttribute("exclusive")) {
@@ -3729,6 +4032,7 @@ class YumePanel extends HTMLElement {
3729
4032
  } else {
3730
4033
  this.collapse();
3731
4034
  }
4035
+
3732
4036
  this.dispatchEvent(
3733
4037
  new CustomEvent("toggle", {
3734
4038
  detail: { expanded: this._expanded },
@@ -3738,6 +4042,7 @@ class YumePanel extends HTMLElement {
3738
4042
  );
3739
4043
  }
3740
4044
 
4045
+ /** Expands the panel to show its children. */
3741
4046
  expand() {
3742
4047
  if (!this.hasChildren()) return;
3743
4048
  this.expanded = true;
@@ -3752,6 +4057,7 @@ class YumePanel extends HTMLElement {
3752
4057
  );
3753
4058
  }
3754
4059
 
4060
+ /** Collapses the panel to hide its children. */
3755
4061
  collapse() {
3756
4062
  this.expanded = false;
3757
4063
  this._expanded = false;
@@ -3781,6 +4087,7 @@ class YumePanel extends HTMLElement {
3781
4087
  break;
3782
4088
  }
3783
4089
  }
4090
+
3784
4091
  this.setAttribute("data-is-child", depth > 0 ? "true" : "false");
3785
4092
  this.style.setProperty("--panel-depth", depth);
3786
4093
  }
@@ -3836,6 +4143,7 @@ class YumePanel extends HTMLElement {
3836
4143
  const childrenSlot = this.shadowRoot.querySelector(
3837
4144
  'slot[name="children"]',
3838
4145
  );
4146
+
3839
4147
  if (childrenSlot) {
3840
4148
  childrenSlot.addEventListener("slotchange", () =>
3841
4149
  this.checkForChildren(),
@@ -3843,11 +4151,17 @@ class YumePanel extends HTMLElement {
3843
4151
  }
3844
4152
  }
3845
4153
 
4154
+ /**
4155
+ * Checks whether the panel has slotted children content.
4156
+ * @returns {boolean}
4157
+ */
3846
4158
  hasChildren() {
3847
4159
  const childrenSlot = this.shadowRoot.querySelector(
3848
4160
  'slot[name="children"]',
3849
4161
  );
4162
+
3850
4163
  if (!childrenSlot) return false;
4164
+
3851
4165
  const nodes = childrenSlot.assignedNodes({ flatten: true });
3852
4166
  return nodes.some((n) => {
3853
4167
  if (n.nodeType === Node.TEXT_NODE) {
@@ -3859,7 +4173,9 @@ class YumePanel extends HTMLElement {
3859
4173
 
3860
4174
  checkForChildren() {
3861
4175
  const hasChildren = this.hasChildren();
4176
+
3862
4177
  this.setAttribute("data-has-children", hasChildren ? "true" : "false");
4178
+
3863
4179
  if (!hasChildren && this.expanded) {
3864
4180
  this.expanded = false;
3865
4181
  }
@@ -3869,6 +4185,7 @@ class YumePanel extends HTMLElement {
3869
4185
  const hasChildren = this.hasChildren();
3870
4186
  const header = this.shadowRoot.querySelector(".header");
3871
4187
  const isExpanded = this.expanded && hasChildren;
4188
+
3872
4189
  this._expanded = isExpanded;
3873
4190
 
3874
4191
  if (header) {
@@ -3878,6 +4195,7 @@ class YumePanel extends HTMLElement {
3878
4195
 
3879
4196
  render() {
3880
4197
  const sheet = new CSSStyleSheet();
4198
+
3881
4199
  sheet.replaceSync(`
3882
4200
  :host {
3883
4201
  display: block;
@@ -4055,6 +4373,7 @@ class YumeProgress extends HTMLElement {
4055
4373
  }
4056
4374
  }
4057
4375
 
4376
+ /** Current progress value, or null if unset. */
4058
4377
  get value() {
4059
4378
  const val = parseFloat(this.getAttribute("value"));
4060
4379
  return Number.isNaN(val) ? null : val;
@@ -4068,6 +4387,7 @@ class YumeProgress extends HTMLElement {
4068
4387
  }
4069
4388
  }
4070
4389
 
4390
+ /** Minimum value (default 0). */
4071
4391
  get min() {
4072
4392
  return parseFloat(this.getAttribute("min")) || 0;
4073
4393
  }
@@ -4076,6 +4396,7 @@ class YumeProgress extends HTMLElement {
4076
4396
  this.setAttribute("min", String(val));
4077
4397
  }
4078
4398
 
4399
+ /** Maximum value (default 100). */
4079
4400
  get max() {
4080
4401
  return parseFloat(this.getAttribute("max")) || 100;
4081
4402
  }
@@ -4084,6 +4405,7 @@ class YumeProgress extends HTMLElement {
4084
4405
  this.setAttribute("max", String(val));
4085
4406
  }
4086
4407
 
4408
+ /** Step increment for snapping, or null if continuous. */
4087
4409
  get step() {
4088
4410
  const s = parseFloat(this.getAttribute("step"));
4089
4411
  return Number.isNaN(s) || s <= 0 ? null : s;
@@ -4097,6 +4419,7 @@ class YumeProgress extends HTMLElement {
4097
4419
  }
4098
4420
  }
4099
4421
 
4422
+ /** Bar thickness: "small" | "medium" | "large" (default "medium"). */
4100
4423
  get size() {
4101
4424
  return this.getAttribute("size") || "medium";
4102
4425
  }
@@ -4105,6 +4428,7 @@ class YumeProgress extends HTMLElement {
4105
4428
  this.setAttribute("size", val);
4106
4429
  }
4107
4430
 
4431
+ /** Color theme for the progress bar (default "primary"). */
4108
4432
  get color() {
4109
4433
  return this.getAttribute("color") || "primary";
4110
4434
  }
@@ -4113,6 +4437,7 @@ class YumeProgress extends HTMLElement {
4113
4437
  this.setAttribute("color", val);
4114
4438
  }
4115
4439
 
4440
+ /** Whether to show the value label on the bar (default true). */
4116
4441
  get labelDisplay() {
4117
4442
  return this.getAttribute("label-display") !== "false";
4118
4443
  }
@@ -4121,6 +4446,7 @@ class YumeProgress extends HTMLElement {
4121
4446
  this.setAttribute("label-display", val ? "true" : "false");
4122
4447
  }
4123
4448
 
4449
+ /** Label format: "percent" | "value" | "fraction" (default "percent"). */
4124
4450
  get labelFormat() {
4125
4451
  return this.getAttribute("label-format") || "percent";
4126
4452
  }
@@ -4129,6 +4455,7 @@ class YumeProgress extends HTMLElement {
4129
4455
  this.setAttribute("label-format", val);
4130
4456
  }
4131
4457
 
4458
+ /** Whether the progress bar shows an indeterminate animation. */
4132
4459
  get indeterminate() {
4133
4460
  return this.hasAttribute("indeterminate");
4134
4461
  }
@@ -4138,6 +4465,7 @@ class YumeProgress extends HTMLElement {
4138
4465
  else this.removeAttribute("indeterminate");
4139
4466
  }
4140
4467
 
4468
+ /** Whether the progress bar is disabled. */
4141
4469
  get disabled() {
4142
4470
  return this.hasAttribute("disabled");
4143
4471
  }
@@ -4165,6 +4493,7 @@ class YumeProgress extends HTMLElement {
4165
4493
  this.value = Math.max(this.value - s, this.min);
4166
4494
  }
4167
4495
 
4496
+ /** Computed fill percentage (0–100), accounting for min, max, and step. */
4168
4497
  get percentage() {
4169
4498
  if (this.value === null) return 0;
4170
4499
  const range = this.max - this.min;
@@ -4324,7 +4653,9 @@ class YumeProgress extends HTMLElement {
4324
4653
  _autoHideHeader() {
4325
4654
  const header = this.shadowRoot.querySelector(".progress-header");
4326
4655
  const slot = header?.querySelector("slot");
4656
+
4327
4657
  if (!slot || !header) return;
4658
+
4328
4659
  const update = () => {
4329
4660
  const hasContent = slot
4330
4661
  .assignedNodes({ flatten: true })
@@ -4337,6 +4668,7 @@ class YumeProgress extends HTMLElement {
4337
4668
  );
4338
4669
  header.style.display = hasContent ? "" : "none";
4339
4670
  };
4671
+
4340
4672
  slot.addEventListener("slotchange", update);
4341
4673
  update();
4342
4674
  }
@@ -4376,6 +4708,7 @@ class YumeRadio extends HTMLElement {
4376
4708
  }
4377
4709
  }
4378
4710
 
4711
+ /** @type {string} The currently selected radio value. */
4379
4712
  get value() {
4380
4713
  return this._value;
4381
4714
  }
@@ -4387,10 +4720,12 @@ class YumeRadio extends HTMLElement {
4387
4720
  this.updateChecked();
4388
4721
  }
4389
4722
 
4723
+ /** @type {string} The form name of the radio group. */
4390
4724
  get name() {
4391
4725
  return this.getAttribute("name") || "";
4392
4726
  }
4393
4727
 
4728
+ /** @type {Array<{value: string, label: string}>} The radio options parsed from the "options" attribute. */
4394
4729
  get options() {
4395
4730
  try {
4396
4731
  return JSON.parse(this.getAttribute("options") || "[]");
@@ -4579,6 +4914,7 @@ class YumeSelect extends HTMLElement {
4579
4914
  if (!this.hasAttribute("label-position")) {
4580
4915
  this.setAttribute("label-position", "top");
4581
4916
  }
4917
+
4582
4918
  this.updateValidation();
4583
4919
  this._internals.setFormValue(this.value);
4584
4920
  }
@@ -4589,7 +4925,9 @@ class YumeSelect extends HTMLElement {
4589
4925
 
4590
4926
  _onDocumentClick(e) {
4591
4927
  if (this.getAttribute("close-on-click-outside") === "false") return;
4928
+
4592
4929
  const path = e.composedPath();
4930
+
4593
4931
  if (!path.includes(this) && this.dropdown?.classList.contains("open")) {
4594
4932
  this.closeDropdown();
4595
4933
  }
@@ -4623,6 +4961,7 @@ class YumeSelect extends HTMLElement {
4623
4961
  }
4624
4962
  }
4625
4963
 
4964
+ /** @type {string} The current selected value, or comma-separated values when multiple. */
4626
4965
  get value() {
4627
4966
  if (this.hasAttribute("multiple")) {
4628
4967
  return Array.from(this.selectedValues).join(",");
@@ -4649,6 +4988,10 @@ class YumeSelect extends HTMLElement {
4649
4988
  this.updateSelectedStyles();
4650
4989
  }
4651
4990
 
4991
+ /**
4992
+ * Returns the parsed options array from the "options" attribute.
4993
+ * @returns {Array<{value: string, label: string}>}
4994
+ */
4652
4995
  getOptions() {
4653
4996
  try {
4654
4997
  return JSON.parse(this.getAttribute("options") || "[]");
@@ -4657,6 +5000,10 @@ class YumeSelect extends HTMLElement {
4657
5000
  }
4658
5001
  }
4659
5002
 
5003
+ /**
5004
+ * Returns the display text for the current selection.
5005
+ * @returns {string}
5006
+ */
4660
5007
  getDisplayText() {
4661
5008
  const options = this.getOptions();
4662
5009
  const isMulti = this.hasAttribute("multiple");
@@ -4683,6 +5030,7 @@ class YumeSelect extends HTMLElement {
4683
5030
  }
4684
5031
  }
4685
5032
 
5033
+ /** Toggles the dropdown open or closed. */
4686
5034
  toggleDropdown() {
4687
5035
  const isOpen = this.dropdown.classList.contains("open");
4688
5036
  if (isOpen) {
@@ -4692,16 +5040,19 @@ class YumeSelect extends HTMLElement {
4692
5040
  this.selectContainer.classList.add("open");
4693
5041
  this._positionDropdown();
4694
5042
  this._onScrollOrResize = this._positionDropdown.bind(this);
5043
+
4695
5044
  window.addEventListener("scroll", this._onScrollOrResize, true);
4696
5045
  window.addEventListener("resize", this._onScrollOrResize);
4697
5046
  document.addEventListener("click", this._onDocumentClick, true);
4698
5047
  }
4699
5048
  }
4700
5049
 
5050
+ /** Closes the dropdown. */
4701
5051
  closeDropdown() {
4702
5052
  this.dropdown?.classList.remove("open");
4703
5053
  this.selectContainer?.classList.remove("open");
4704
5054
  document.removeEventListener("click", this._onDocumentClick, true);
5055
+
4705
5056
  if (this._onScrollOrResize) {
4706
5057
  window.removeEventListener("scroll", this._onScrollOrResize, true);
4707
5058
  window.removeEventListener("resize", this._onScrollOrResize);
@@ -4712,11 +5063,13 @@ class YumeSelect extends HTMLElement {
4712
5063
  _positionDropdown() {
4713
5064
  const rect = this.selectContainer.getBoundingClientRect();
4714
5065
  const gap = 4;
5066
+
4715
5067
  this.dropdown.style.left = `${rect.left}px`;
4716
5068
  this.dropdown.style.width = `${rect.width}px`;
4717
5069
 
4718
5070
  const spaceBelow = window.innerHeight - rect.bottom - gap;
4719
5071
  const maxH = 200;
5072
+
4720
5073
  if (spaceBelow >= maxH || spaceBelow >= rect.top) {
4721
5074
  this.dropdown.style.top = `${rect.bottom + gap}px`;
4722
5075
  this.dropdown.style.bottom = "auto";
@@ -4784,6 +5137,7 @@ class YumeSelect extends HTMLElement {
4784
5137
  renderTags() {
4785
5138
  const isMulti = this.hasAttribute("multiple");
4786
5139
  const isTagMode = this.getAttribute("display-mode") === "tag";
5140
+
4787
5141
  if (!isMulti || !isTagMode || !this.displayElement) return;
4788
5142
 
4789
5143
  const options = this.getOptions();
@@ -5114,6 +5468,7 @@ class YumeSlider extends HTMLElement {
5114
5468
  }
5115
5469
  }
5116
5470
 
5471
+ /** @type {number} The current slider value, clamped between min and max. */
5117
5472
  get value() {
5118
5473
  const val = parseFloat(this.getAttribute("value"));
5119
5474
  return Number.isNaN(val) ? 0 : val;
@@ -5125,6 +5480,7 @@ class YumeSlider extends HTMLElement {
5125
5480
  this.setAttribute("value", String(stepped));
5126
5481
  }
5127
5482
 
5483
+ /** @type {number} The minimum allowed value. Defaults to 0. */
5128
5484
  get min() {
5129
5485
  return parseFloat(this.getAttribute("min")) || 0;
5130
5486
  }
@@ -5133,6 +5489,7 @@ class YumeSlider extends HTMLElement {
5133
5489
  this.setAttribute("min", String(val));
5134
5490
  }
5135
5491
 
5492
+ /** @type {number} The maximum allowed value. Defaults to 100. */
5136
5493
  get max() {
5137
5494
  return parseFloat(this.getAttribute("max")) || 100;
5138
5495
  }
@@ -5141,6 +5498,7 @@ class YumeSlider extends HTMLElement {
5141
5498
  this.setAttribute("max", String(val));
5142
5499
  }
5143
5500
 
5501
+ /** @type {number|null} The step increment, or null for continuous. */
5144
5502
  get step() {
5145
5503
  const s = parseFloat(this.getAttribute("step"));
5146
5504
  return Number.isNaN(s) || s <= 0 ? null : s;
@@ -5154,6 +5512,7 @@ class YumeSlider extends HTMLElement {
5154
5512
  }
5155
5513
  }
5156
5514
 
5515
+ /** @type {string} The size variant ("small", "medium", or "large"). */
5157
5516
  get size() {
5158
5517
  return this.getAttribute("size") || "medium";
5159
5518
  }
@@ -5162,6 +5521,7 @@ class YumeSlider extends HTMLElement {
5162
5521
  this.setAttribute("size", val);
5163
5522
  }
5164
5523
 
5524
+ /** @type {string} The color theme for the slider track and thumb. */
5165
5525
  get color() {
5166
5526
  return this.getAttribute("color") || "primary";
5167
5527
  }
@@ -5170,6 +5530,7 @@ class YumeSlider extends HTMLElement {
5170
5530
  this.setAttribute("color", val);
5171
5531
  }
5172
5532
 
5533
+ /** @type {boolean} Whether the slider is disabled. */
5173
5534
  get disabled() {
5174
5535
  return this.hasAttribute("disabled");
5175
5536
  }
@@ -5179,6 +5540,7 @@ class YumeSlider extends HTMLElement {
5179
5540
  else this.removeAttribute("disabled");
5180
5541
  }
5181
5542
 
5543
+ /** @type {string} The slider orientation ("horizontal" or "vertical"). */
5182
5544
  get orientation() {
5183
5545
  return this.getAttribute("orientation") || "horizontal";
5184
5546
  }
@@ -5187,6 +5549,7 @@ class YumeSlider extends HTMLElement {
5187
5549
  this.setAttribute("orientation", val);
5188
5550
  }
5189
5551
 
5552
+ /** @type {number} The current value as a percentage of the min-max range. */
5190
5553
  get percentage() {
5191
5554
  const range = this.max - this.min;
5192
5555
  if (range <= 0) return 0;
@@ -5319,6 +5682,7 @@ class YumeSlider extends HTMLElement {
5319
5682
  Math.min(1, (e.clientX - rect.left) / rect.width),
5320
5683
  );
5321
5684
  const rawValue = this.min + ratio * (this.max - this.min);
5685
+
5322
5686
  this.value = rawValue;
5323
5687
  this.dispatchEvent(
5324
5688
  new Event("input", { bubbles: true, composed: true }),
@@ -5490,6 +5854,7 @@ class YumeSwitch extends HTMLElement {
5490
5854
  }
5491
5855
  }
5492
5856
 
5857
+ /** @type {boolean} Whether the switch is on. */
5493
5858
  get checked() {
5494
5859
  return this.hasAttribute("checked");
5495
5860
  }
@@ -5500,6 +5865,7 @@ class YumeSwitch extends HTMLElement {
5500
5865
  this.update();
5501
5866
  }
5502
5867
 
5868
+ /** @type {string} The form value submitted when checked. Defaults to "on". */
5503
5869
  get value() {
5504
5870
  return this.getAttribute("value") || "on";
5505
5871
  }
@@ -5509,8 +5875,10 @@ class YumeSwitch extends HTMLElement {
5509
5875
  this.update();
5510
5876
  }
5511
5877
 
5878
+ /** Toggles the checked state and dispatches a "change" event. */
5512
5879
  toggle() {
5513
5880
  if (this.hasAttribute("disabled")) return;
5881
+
5514
5882
  this.checked = !this.checked;
5515
5883
  this.dispatchEvent(
5516
5884
  new Event("change", { bubbles: true, composed: true }),
@@ -5530,9 +5898,10 @@ class YumeSwitch extends HTMLElement {
5530
5898
 
5531
5899
  _autoHideLabel() {
5532
5900
  const slot = this.shadowRoot.querySelector('slot[name="label"]');
5533
- if (!slot) return;
5534
5901
  const wrapper = slot.closest(".label-wrapper");
5535
- if (!wrapper) return;
5902
+
5903
+ if (!slot || !wrapper) return;
5904
+
5536
5905
  const update = () => {
5537
5906
  const hasContent = slot
5538
5907
  .assignedNodes({ flatten: true })
@@ -5545,6 +5914,7 @@ class YumeSwitch extends HTMLElement {
5545
5914
  );
5546
5915
  wrapper.style.display = hasContent ? "" : "none";
5547
5916
  };
5917
+
5548
5918
  slot.addEventListener("slotchange", update);
5549
5919
  update();
5550
5920
  }
@@ -5827,7 +6197,7 @@ class YumeTable extends HTMLElement {
5827
6197
  super();
5828
6198
  this.attachShadow({ mode: "open" });
5829
6199
  this._sortField = null;
5830
- this._sortDir = "none"; // "none" | "asc" | "desc"
6200
+ this._sortDir = "none";
5831
6201
  this._parsedData = [];
5832
6202
  this._parsedColumns = [];
5833
6203
  }
@@ -5843,6 +6213,7 @@ class YumeTable extends HTMLElement {
5843
6213
  this.render();
5844
6214
  }
5845
6215
 
6216
+ /** Column definitions as a JSON string or array of { field, header?, sortable? } objects. */
5846
6217
  get columns() {
5847
6218
  return this.getAttribute("columns");
5848
6219
  }
@@ -5853,6 +6224,7 @@ class YumeTable extends HTMLElement {
5853
6224
  );
5854
6225
  }
5855
6226
 
6227
+ /** Row data as a JSON string or array of objects keyed by column field names. */
5856
6228
  get data() {
5857
6229
  return this.getAttribute("data");
5858
6230
  }
@@ -5863,6 +6235,7 @@ class YumeTable extends HTMLElement {
5863
6235
  );
5864
6236
  }
5865
6237
 
6238
+ /** Whether to show alternating row backgrounds. */
5866
6239
  get striped() {
5867
6240
  return this.hasAttribute("striped");
5868
6241
  }
@@ -6352,6 +6725,7 @@ class YumeTabs extends HTMLElement {
6352
6725
  }
6353
6726
  }
6354
6727
 
6728
+ /** @type {Array<Object>} Tab definitions with id, label, slot, and optional disabled flag. */
6355
6729
  get options() {
6356
6730
  try {
6357
6731
  return JSON.parse(this.getAttribute("options") || "[]");
@@ -6365,6 +6739,7 @@ class YumeTabs extends HTMLElement {
6365
6739
  this.render();
6366
6740
  }
6367
6741
 
6742
+ /** @type {"small"|"medium"|"large"} Controls tab button padding and gap. */
6368
6743
  get size() {
6369
6744
  const sz = this.getAttribute("size");
6370
6745
  return ["small", "medium", "large"].includes(sz) ? sz : "medium";
@@ -6376,6 +6751,7 @@ class YumeTabs extends HTMLElement {
6376
6751
  else this.setAttribute("size", "medium");
6377
6752
  }
6378
6753
 
6754
+ /** @type {"top"|"bottom"|"left"|"right"} Which edge the tab strip is placed on. */
6379
6755
  get position() {
6380
6756
  const pos = this.getAttribute("position");
6381
6757
  return ["top", "bottom", "left", "right"].includes(pos) ? pos : "top";
@@ -6387,6 +6763,10 @@ class YumeTabs extends HTMLElement {
6387
6763
  else this.setAttribute("position", "top");
6388
6764
  }
6389
6765
 
6766
+ /**
6767
+ * Activates a tab by its id.
6768
+ * @param {string} id - The id of the tab to activate.
6769
+ */
6390
6770
  activateTab(id) {
6391
6771
  const tab = this.options.find((t) => t.id === id);
6392
6772
  if (!tab || tab.disabled) return;
@@ -6535,6 +6915,7 @@ class YumeTabs extends HTMLElement {
6535
6915
  const isActive = tab.id === this._activeTab;
6536
6916
  const isDisabled = !!tab.disabled;
6537
6917
  const btn = document.createElement("button");
6918
+
6538
6919
  btn.id = `tab-${tab.id}`;
6539
6920
  btn.setAttribute("role", "tab");
6540
6921
  btn.setAttribute("part", "tab");
@@ -6578,6 +6959,7 @@ class YumeTabs extends HTMLElement {
6578
6959
  const contentSlot = document.createElement("slot");
6579
6960
  contentSlot.name = slotName;
6580
6961
  panel.appendChild(contentSlot);
6962
+
6581
6963
  return panel;
6582
6964
  }
6583
6965
 
@@ -6630,6 +7012,7 @@ class YumeToast extends HTMLElement {
6630
7012
  this.render();
6631
7013
  }
6632
7014
 
7015
+ /** Screen position for the toast stack (e.g. "top-right", "bottom-center"). */
6633
7016
  get position() {
6634
7017
  return this.getAttribute("position") || "bottom-right";
6635
7018
  }
@@ -6637,6 +7020,7 @@ class YumeToast extends HTMLElement {
6637
7020
  this.setAttribute("position", val);
6638
7021
  }
6639
7022
 
7023
+ /** Default auto-dismiss duration in milliseconds. */
6640
7024
  get duration() {
6641
7025
  return parseInt(this.getAttribute("duration") ?? "4000", 10);
6642
7026
  }
@@ -6644,6 +7028,7 @@ class YumeToast extends HTMLElement {
6644
7028
  this.setAttribute("duration", String(val));
6645
7029
  }
6646
7030
 
7031
+ /** Maximum number of toasts visible at once. */
6647
7032
  get max() {
6648
7033
  return parseInt(this.getAttribute("max") ?? "5", 10);
6649
7034
  }
@@ -6736,6 +7121,7 @@ class YumeToast extends HTMLElement {
6736
7121
  return toast;
6737
7122
  }
6738
7123
 
7124
+ /** Dismisses all visible toasts. */
6739
7125
  clear() {
6740
7126
  const container = this.shadowRoot.querySelector(".toast-container");
6741
7127
  if (!container) return;
@@ -6746,8 +7132,11 @@ class YumeToast extends HTMLElement {
6746
7132
 
6747
7133
  _removeToast(toast) {
6748
7134
  if (!toast || toast._removing) return;
7135
+
6749
7136
  toast._removing = true;
7137
+
6750
7138
  clearTimeout(toast._timeout);
7139
+
6751
7140
  toast.classList.remove("visible");
6752
7141
  toast.classList.add("exit");
6753
7142
  toast.addEventListener(
@@ -6897,6 +7286,7 @@ class YumeTooltip extends HTMLElement {
6897
7286
  this.render();
6898
7287
  }
6899
7288
 
7289
+ /** The tooltip text content. */
6900
7290
  get text() {
6901
7291
  return this.getAttribute("text") || "";
6902
7292
  }
@@ -6904,6 +7294,7 @@ class YumeTooltip extends HTMLElement {
6904
7294
  this.setAttribute("text", val);
6905
7295
  }
6906
7296
 
7297
+ /** Placement relative to the trigger: "top" | "bottom" | "left" | "right". */
6907
7298
  get position() {
6908
7299
  return this.getAttribute("position") || "top";
6909
7300
  }
@@ -6911,6 +7302,7 @@ class YumeTooltip extends HTMLElement {
6911
7302
  this.setAttribute("position", val);
6912
7303
  }
6913
7304
 
7305
+ /** Delay in milliseconds before the tooltip appears. */
6914
7306
  get delay() {
6915
7307
  return parseInt(this.getAttribute("delay") ?? "200", 10);
6916
7308
  }
@@ -6918,6 +7310,7 @@ class YumeTooltip extends HTMLElement {
6918
7310
  this.setAttribute("delay", String(val));
6919
7311
  }
6920
7312
 
7313
+ /** Color theme for the tooltip (e.g. "base", "primary", "error"). */
6921
7314
  get color() {
6922
7315
  return this.getAttribute("color") || "base";
6923
7316
  }
@@ -6925,11 +7318,14 @@ class YumeTooltip extends HTMLElement {
6925
7318
  this.setAttribute("color", val);
6926
7319
  }
6927
7320
 
7321
+ /** Programmatically shows the tooltip after the configured delay. */
6928
7322
  show() {
6929
7323
  clearTimeout(this._hideTimeout);
7324
+
6930
7325
  this._showTimeout = setTimeout(() => {
6931
7326
  this._visible = true;
6932
7327
  const tip = this.shadowRoot.querySelector(".tooltip");
7328
+
6933
7329
  if (tip) {
6934
7330
  const [, fg] = getColorVarPair(this.color);
6935
7331
  tip.style.color = fg;
@@ -6938,6 +7334,7 @@ class YumeTooltip extends HTMLElement {
6938
7334
  }, this.delay);
6939
7335
  }
6940
7336
 
7337
+ /** Immediately hides the tooltip. */
6941
7338
  hide() {
6942
7339
  clearTimeout(this._showTimeout);
6943
7340
  this._visible = false;
@@ -7150,6 +7547,10 @@ class YumeTheme extends HTMLElement {
7150
7547
  this.applyVariablesToHost(variablesCSS + themeCSS);
7151
7548
  }
7152
7549
 
7550
+ /**
7551
+ * Parses CSS custom properties from the given text and sets them on the host element.
7552
+ * @param {string} cssText - Raw CSS containing custom property declarations.
7553
+ */
7153
7554
  applyVariablesToHost(cssText) {
7154
7555
  const regex = /--([\w-]+):\s*([^;]+);/g;
7155
7556
  let match;
@@ -7162,6 +7563,7 @@ class YumeTheme extends HTMLElement {
7162
7563
  }
7163
7564
  }
7164
7565
 
7566
+ /** Removes all theme custom properties previously applied to the host element. */
7165
7567
  clearThemeProperties() {
7166
7568
  if (this._themeProps) {
7167
7569
  for (const prop of this._themeProps) {
@@ -7176,13 +7578,15 @@ class YumeTheme extends HTMLElement {
7176
7578
  const style = document.createElement("style");
7177
7579
  style.setAttribute("data-yumekit-page-styles", "");
7178
7580
  style.textContent = `
7179
- html, body {
7180
- margin: 0;
7181
- padding: 0;
7581
+ :host {
7182
7582
  font-family: var(--font-family-header, "Lexend", sans-serif);
7183
7583
  color: var(--base-content--, #000);
7184
7584
  font-weight: 300;
7185
7585
  }
7586
+
7587
+ :host * {
7588
+ color: var(--base-content--, #000);
7589
+ }
7186
7590
  `;
7187
7591
  document.head.appendChild(style);
7188
7592
  }