@studious-creative/yumekit 0.1.7 → 0.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,5 +1,172 @@
1
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-x-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-x-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-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
+ /**
4
+ * Icon registry — a runtime map of icon names to SVG markup strings.
5
+ *
6
+ * Register only the icons you need for tree-shaking:
7
+ *
8
+ * import { registerIcon } from "@studious-creative/yumekit";
9
+ * registerIcon("home", homeSvgString);
10
+ *
11
+ * Or register all bundled icons at once (separate import):
12
+ *
13
+ * import "@studious-creative/yumekit/icons/all.js";
14
+ */
15
+
16
+ const icons = new Map();
17
+
18
+ function registerIcon(name, svg) {
19
+ icons.set(name, svg);
20
+ }
21
+
22
+ function registerIcons(entries) {
23
+ for (const [name, svg] of Object.entries(entries)) {
24
+ icons.set(name, svg);
25
+ }
26
+ }
27
+
28
+ function getIcon(name) {
29
+ return icons.get(name) || "";
30
+ }
31
+
32
+ var ai = "<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=\"M12 8V4H8\"/>\n <rect width=\"16\" height=\"12\" x=\"4\" y=\"8\" rx=\"2\"/>\n <path d=\"M2 14h2M20 14h2M15 13v2M9 13v2\"/>\n</svg>\n";
33
+
34
+ var arrowRight = "<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=\"5\" y1=\"12\" x2=\"19\" y2=\"12\"/>\n <polyline points=\"12 5 19 12 12 19\"/>\n</svg>\n";
35
+
36
+ var arrowUp = "<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=\"12\" y1=\"19\" x2=\"12\" y2=\"5\"/>\n <polyline points=\"5 12 12 5 19 12\"/>\n</svg>\n";
37
+
38
+ var bell = "<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=\"M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9\"/>\n <path d=\"M13.73 21a2 2 0 0 1-3.46 0\"/>\n</svg>\n";
39
+
40
+ var bolt = "<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 <polygon points=\"13 2 3 14 12 14 11 22 21 10 12 10 13 2\"/>\n</svg>\n";
41
+
42
+ var calendar = "<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=\"3\" y=\"4\" width=\"18\" height=\"18\" rx=\"2\" ry=\"2\"/>\n <line x1=\"16\" y1=\"2\" x2=\"16\" y2=\"6\"/>\n <line x1=\"8\" y1=\"2\" x2=\"8\" y2=\"6\"/>\n <line x1=\"3\" y1=\"10\" x2=\"21\" y2=\"10\"/>\n <rect x=\"7\" y=\"14\" width=\"3\" height=\"3\" rx=\"0.5\"/>\n <rect x=\"14\" y=\"14\" width=\"3\" height=\"3\" rx=\"0.5\"/>\n</svg>\n";
43
+
44
+ var chart = "<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 <polyline points=\"22 12 18 12 15 21 9 3 6 12 2 12\"/>\n</svg>\n";
45
+
46
+ var checkmark$1 = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <polyline points=\"5 13 10 17 19 6\"/>\n</svg>\n";
47
+
48
+ var chevronDown$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 <polyline points=\"6 9 12 15 18 9\"/>\n</svg>\n";
49
+
50
+ var chevronDownLg$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 <polyline points=\"4 8 12 16 20 8\"/>\n</svg>\n";
51
+
52
+ var chevronRight$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 <polyline points=\"9 18 15 12 9 6\"/>\n</svg>\n";
53
+
54
+ var clock = "<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=\"12\" cy=\"12\" r=\"10\"/>\n <polyline points=\"12 6 12 12 16 14\"/>\n</svg>\n";
55
+
56
+ var close$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=\"18\" y1=\"6\" x2=\"6\" y2=\"18\"/>\n <line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\"/>\n</svg>\n";
57
+
58
+ var collapseLeft$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 <polyline points=\"11 17 6 12 11 7\"/>\n <polyline points=\"18 17 13 12 18 7\"/>\n</svg>\n";
59
+
60
+ var comments = "<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 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z\"/>\n</svg>\n";
61
+
62
+ var compass = "<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=\"12\" cy=\"12\" r=\"10\"/>\n <polygon points=\"16.24 7.76 14.12 14.12 7.76 16.24 9.88 9.88 16.24 7.76\"/>\n</svg>\n";
63
+
64
+ var diagram = "<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=\"3\" y=\"3\" width=\"6\" height=\"6\" rx=\"1\"/>\n <rect x=\"15\" y=\"3\" width=\"6\" height=\"6\" rx=\"1\"/>\n <rect x=\"9\" y=\"15\" width=\"6\" height=\"6\" rx=\"1\"/>\n <line x1=\"6\" y1=\"9\" x2=\"6\" y2=\"15\"/>\n <line x1=\"6\" y1=\"15\" x2=\"9\" y2=\"15\"/>\n <line x1=\"18\" y1=\"9\" x2=\"18\" y2=\"15\"/>\n <line x1=\"18\" y1=\"15\" x2=\"15\" y2=\"15\"/>\n</svg>\n";
65
+
66
+ var discord = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\">\n <path d=\"M20.317 4.492c-1.53-.69-3.17-1.2-4.885-1.49a.075.075 0 0 0-.079.036c-.21.369-.444.85-.608 1.23a18.566 18.566 0 0 0-5.487 0 12.36 12.36 0 0 0-.617-1.23A.077.077 0 0 0 8.562 3c-1.714.29-3.354.8-4.885 1.491a.07.07 0 0 0-.032.027C.533 9.093-.32 13.555.099 17.961a.08.08 0 0 0 .031.055 20.03 20.03 0 0 0 5.993 2.98.078.078 0 0 0 .084-.026c.462-.62.874-1.275 1.226-1.963.021-.04.001-.088-.041-.104a13.201 13.201 0 0 1-1.872-.878.075.075 0 0 1-.008-.125c.126-.093.252-.19.372-.287a.075.075 0 0 1 .078-.01c3.927 1.764 8.18 1.764 12.061 0a.075.075 0 0 1 .079.009c.12.098.245.195.372.288a.075.075 0 0 1-.006.125c-.598.344-1.22.635-1.873.877a.075.075 0 0 0-.041.105c.36.687.772 1.341 1.225 1.962a.077.077 0 0 0 .084.028 19.963 19.963 0 0 0 6.002-2.981.076.076 0 0 0 .032-.054c.5-5.094-.838-9.52-3.549-13.442a.06.06 0 0 0-.031-.028z\"/>\n</svg>\n";
67
+
68
+ var expandRight$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 <polyline points=\"13 17 18 12 13 7\"/>\n <polyline points=\"6 17 11 12 6 7\"/>\n</svg>\n";
69
+
70
+ var features = "<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=\"12\" cy=\"12\" r=\"3\"/>\n <path d=\"M12 1v4M12 19v4M4.22 4.22l2.83 2.83M16.95 16.95l2.83 2.83M1 12h4M19 12h4M4.22 19.78l2.83-2.83M16.95 7.05l2.83-2.83\"/>\n</svg>\n";
71
+
72
+ var figma = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\">\n <path d=\"M5 5.5A3.5 3.5 0 0 1 8.5 2H12v7H8.5A3.5 3.5 0 0 1 5 5.5z\"/>\n <path d=\"M12 2h3.5a3.5 3.5 0 1 1 0 7H12V2z\"/>\n <path d=\"M12 12.5a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0z\"/>\n <path d=\"M5 19.5A3.5 3.5 0 0 1 8.5 16H12v3.5a3.5 3.5 0 1 1-7 0z\"/>\n <path d=\"M5 12.5A3.5 3.5 0 0 1 8.5 9H12v7H8.5A3.5 3.5 0 0 1 5 12.5z\"/>\n</svg>\n";
73
+
74
+ var filter = "<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 <polygon points=\"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3\"/>\n</svg>\n";
75
+
76
+ var folder = "<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=\"M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.93a2 2 0 0 1-1.66-.9l-.82-1.2A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2z\"/>\n</svg>\n";
77
+
78
+ var github = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\">\n <path d=\"M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0022 12.017C22 6.484 17.522 2 12 2z\"/>\n</svg>\n";
79
+
80
+ var home = "<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=\"m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z\"/>\n <polyline points=\"9 22 9 12 15 12 15 22\"/>\n</svg>\n";
81
+
82
+ var image = "<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=\"3\" y=\"3\" width=\"18\" height=\"18\" rx=\"2\" ry=\"2\"/>\n <circle cx=\"8.5\" cy=\"8.5\" r=\"1.5\"/>\n <polyline points=\"21 15 16 10 5 21\"/>\n</svg>\n";
83
+
84
+ var indeterminate$1 = "<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>\n";
85
+
86
+ var layout = "<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=\"3\" y=\"3\" width=\"18\" height=\"18\" rx=\"2\" ry=\"2\"/>\n <line x1=\"3\" y1=\"9\" x2=\"21\" y2=\"9\"/>\n <line x1=\"9\" y1=\"21\" x2=\"9\" y2=\"9\"/>\n</svg>\n";
87
+
88
+ var listCheck = "<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=\"10\" y1=\"6\" x2=\"21\" y2=\"6\"/>\n <line x1=\"10\" y1=\"12\" x2=\"21\" y2=\"12\"/>\n <line x1=\"10\" y1=\"18\" x2=\"21\" y2=\"18\"/>\n <polyline points=\"3 6 4 7 6 5\"/>\n <polyline points=\"3 12 4 13 6 11\"/>\n <polyline points=\"3 18 4 19 6 17\"/>\n</svg>\n";
89
+
90
+ var logo = "<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=\"M12 2L2 7l10 5 10-5-10-5z\"/>\n <path d=\"M2 17l10 5 10-5\"/>\n <path d=\"M2 12l10 5 10-5\"/>\n</svg>\n";
91
+
92
+ 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";
93
+
94
+ 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";
95
+
96
+ 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";
97
+
98
+ var plus = "<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=\"12\" y1=\"5\" x2=\"12\" y2=\"19\"/>\n <line x1=\"5\" y1=\"12\" x2=\"19\" y2=\"12\"/>\n</svg>\n";
99
+
100
+ var save = "<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=\"M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z\"/>\n <polyline points=\"17 21 17 13 7 13 7 21\"/>\n <polyline points=\"7 3 7 8 15 8\"/>\n</svg>\n";
101
+
102
+ var search = "<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=\"11\" cy=\"11\" r=\"8\"/>\n <path d=\"m21 21-4.35-4.35\"/>\n</svg>\n";
103
+
104
+ var settings = "<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=\"12\" cy=\"12\" r=\"3\"/>\n <path d=\"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z\"/>\n</svg>\n";
105
+
106
+ var star = "<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=\"M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z\"/>\n</svg>\n";
107
+
108
+ var sun = "<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=\"12\" cy=\"12\" r=\"5\"/>\n <path d=\"M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42\"/>\n</svg>\n";
109
+
110
+ var user = "<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=\"M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2\"/>\n <circle cx=\"12\" cy=\"7\" r=\"4\"/>\n</svg>\n";
111
+
112
+ var users = "<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=\"M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2\"/>\n <circle cx=\"9\" cy=\"7\" r=\"4\"/>\n <path d=\"M23 21v-2a4 4 0 0 0-3-3.87\"/>\n <path d=\"M16 3.13a4 4 0 0 1 0 7.75\"/>\n</svg>\n";
113
+
114
+ var warning = "<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=\"M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z\"/>\n <line x1=\"12\" y1=\"9\" x2=\"12\" y2=\"13\"/>\n <line x1=\"12\" y1=\"17\" x2=\"12.01\" y2=\"17\"/>\n</svg>\n";
115
+
116
+ /**
117
+ * Registers all bundled icons into the icon registry.
118
+ *
119
+ * Import this module as a side-effect to make every icon available to <y-icon>:
120
+ *
121
+ * import "@studious-creative/yumekit/icons/all.js";
122
+ */
123
+
124
+
125
+ registerIcons({
126
+ ai,
127
+ "arrow-right": arrowRight,
128
+ "arrow-up": arrowUp,
129
+ bell,
130
+ bolt,
131
+ calendar,
132
+ chart,
133
+ checkmark: checkmark$1,
134
+ "chevron-down": chevronDown$1,
135
+ "chevron-down-lg": chevronDownLg$1,
136
+ "chevron-right": chevronRight$1,
137
+ clock,
138
+ close: close$1,
139
+ "collapse-left": collapseLeft$1,
140
+ comments,
141
+ compass,
142
+ diagram,
143
+ discord,
144
+ "expand-right": expandRight$1,
145
+ features,
146
+ figma,
147
+ filter,
148
+ folder,
149
+ github,
150
+ home,
151
+ image,
152
+ indeterminate: indeterminate$1,
153
+ layout,
154
+ "list-check": listCheck,
155
+ logo,
156
+ mail,
157
+ moon,
158
+ palette,
159
+ plus,
160
+ save,
161
+ search,
162
+ settings,
163
+ star,
164
+ sun,
165
+ user,
166
+ users,
167
+ warning,
168
+ });
169
+
3
170
  class YumeButton extends HTMLElement {
4
171
  static get observedAttributes() {
5
172
  return [
@@ -556,65 +723,332 @@ if (!customElements.get("y-button")) {
556
723
  customElements.define("y-button", YumeButton);
557
724
  }
558
725
 
559
- class YumeMenu extends HTMLElement {
726
+ // Allowlist-based SVG sanitizer — only known-safe elements and attributes are kept.
727
+ const ALLOWED_ELEMENTS = new Set([
728
+ "svg",
729
+ "g",
730
+ "path",
731
+ "circle",
732
+ "ellipse",
733
+ "rect",
734
+ "line",
735
+ "polyline",
736
+ "polygon",
737
+ "text",
738
+ "tspan",
739
+ "defs",
740
+ "clippath",
741
+ "mask",
742
+ "lineargradient",
743
+ "radialgradient",
744
+ "stop",
745
+ "symbol",
746
+ "title",
747
+ "desc",
748
+ "metadata",
749
+ ]);
750
+
751
+ const ALLOWED_ATTRS = new Set([
752
+ "viewbox",
753
+ "xmlns",
754
+ "fill",
755
+ "stroke",
756
+ "stroke-width",
757
+ "stroke-linecap",
758
+ "stroke-linejoin",
759
+ "stroke-dasharray",
760
+ "stroke-dashoffset",
761
+ "stroke-miterlimit",
762
+ "stroke-opacity",
763
+ "fill-opacity",
764
+ "fill-rule",
765
+ "clip-rule",
766
+ "opacity",
767
+ "d",
768
+ "cx",
769
+ "cy",
770
+ "r",
771
+ "rx",
772
+ "ry",
773
+ "x",
774
+ "x1",
775
+ "x2",
776
+ "y",
777
+ "y1",
778
+ "y2",
779
+ "width",
780
+ "height",
781
+ "points",
782
+ "transform",
783
+ "id",
784
+ "class",
785
+ "clip-path",
786
+ "mask",
787
+ "offset",
788
+ "stop-color",
789
+ "stop-opacity",
790
+ "gradient-units",
791
+ "gradienttransform",
792
+ "gradientunits",
793
+ "spreadmethod",
794
+ "patternunits",
795
+ "patterntransform",
796
+ "font-size",
797
+ "font-family",
798
+ "font-weight",
799
+ "text-anchor",
800
+ "dominant-baseline",
801
+ "alignment-baseline",
802
+ "dx",
803
+ "dy",
804
+ "rotate",
805
+ "textlength",
806
+ "lengthadjust",
807
+ "display",
808
+ "visibility",
809
+ "color",
810
+ "vector-effect",
811
+ ]);
812
+
813
+ function sanitizeSvg(raw) {
814
+ if (!raw) return "";
815
+ const doc = new DOMParser().parseFromString(raw, "image/svg+xml");
816
+ const svg = doc.querySelector("svg");
817
+ if (!svg) return "";
818
+
819
+ const walk = (el) => {
820
+ for (const child of [...el.children]) {
821
+ if (!ALLOWED_ELEMENTS.has(child.tagName.toLowerCase())) {
822
+ child.remove();
823
+ continue;
824
+ }
825
+ for (const attr of [...child.attributes]) {
826
+ if (!ALLOWED_ATTRS.has(attr.name.toLowerCase())) {
827
+ child.removeAttribute(attr.name);
828
+ }
829
+ }
830
+ walk(child);
831
+ }
832
+ };
833
+
834
+ // Sanitize the <svg> element's own attributes
835
+ for (const attr of [...svg.attributes]) {
836
+ if (!ALLOWED_ATTRS.has(attr.name.toLowerCase())) {
837
+ svg.removeAttribute(attr.name);
838
+ }
839
+ }
840
+ walk(svg);
841
+ return svg.outerHTML;
842
+ }
843
+
844
+ // Cache sanitized SVG markup per icon name to avoid repeated DOMParser + DOM-walk
845
+ // on every render. The cache is naturally bounded by the number of registered icons.
846
+ const sanitizedSvgCache = new Map();
847
+
848
+ function getCachedSvg(name) {
849
+ if (sanitizedSvgCache.has(name)) {
850
+ return sanitizedSvgCache.get(name);
851
+ }
852
+ const result = sanitizeSvg(getIcon(name));
853
+ sanitizedSvgCache.set(name, result);
854
+ return result;
855
+ }
856
+
857
+ class YumeIcon extends HTMLElement {
560
858
  static get observedAttributes() {
561
- return ["items", "anchor", "visible", "direction", "size"];
859
+ return ["name", "size", "color", "label", "weight"];
562
860
  }
563
861
 
564
862
  constructor() {
565
863
  super();
566
864
  this.attachShadow({ mode: "open" });
567
- this._onAnchorClick = this._onAnchorClick.bind(this);
568
- this._onDocumentClick = this._onDocumentClick.bind(this);
569
- this._onScrollOrResize = this._onScrollOrResize.bind(this);
570
865
  }
571
866
 
572
867
  connectedCallback() {
573
- if (!this.hasAttribute("items")) this.items = [];
574
- this._setupAnchor();
575
868
  this.render();
576
- document.addEventListener("click", this._onDocumentClick);
577
- window.addEventListener("scroll", this._onScrollOrResize, true);
578
- window.addEventListener("resize", this._onScrollOrResize);
579
- this.style.position = "fixed";
580
- this.style.zIndex = "1000";
581
- this.style.display = "none";
582
- }
583
-
584
- disconnectedCallback() {
585
- this._teardownAnchor();
586
- document.removeEventListener("click", this._onDocumentClick);
587
- window.removeEventListener("scroll", this._onScrollOrResize, true);
588
- window.removeEventListener("resize", this._onScrollOrResize);
589
869
  }
590
870
 
591
871
  attributeChangedCallback(name, oldVal, newVal) {
592
872
  if (oldVal === newVal) return;
593
- if (name === "items" || name === "size") this.render();
594
- if (name === "anchor") {
595
- this._teardownAnchor();
596
- this._setupAnchor();
597
- }
598
- if (name === "visible") {
599
- this._updatePosition();
600
- }
601
- if (name === "direction") {
602
- this._updatePosition();
603
- }
873
+ this.render();
604
874
  }
605
875
 
606
- get items() {
607
- try {
608
- return JSON.parse(this.getAttribute("items")) || [];
609
- } catch {
610
- return [];
611
- }
876
+ get name() {
877
+ return this.getAttribute("name") || "";
612
878
  }
613
- set items(val) {
614
- this.setAttribute("items", JSON.stringify(val));
879
+ set name(val) {
880
+ this.setAttribute("name", val);
615
881
  }
616
882
 
617
- get anchor() {
883
+ get size() {
884
+ return this.getAttribute("size") || "medium";
885
+ }
886
+ set size(val) {
887
+ this.setAttribute("size", val);
888
+ }
889
+
890
+ get color() {
891
+ return this.getAttribute("color") || "";
892
+ }
893
+ set color(val) {
894
+ if (val) this.setAttribute("color", val);
895
+ else this.removeAttribute("color");
896
+ }
897
+
898
+ get label() {
899
+ return this.getAttribute("label") || "";
900
+ }
901
+ set label(val) {
902
+ if (val) this.setAttribute("label", val);
903
+ else this.removeAttribute("label");
904
+ }
905
+
906
+ get weight() {
907
+ return this.getAttribute("weight") || "";
908
+ }
909
+ set weight(val) {
910
+ if (val) this.setAttribute("weight", val);
911
+ else this.removeAttribute("weight");
912
+ }
913
+
914
+ _getColor(color) {
915
+ const map = {
916
+ base: "var(--base-content--, #f7f7fa)",
917
+ primary: "var(--primary-content--, #0576ff)",
918
+ secondary: "var(--secondary-content--, #04b8b8)",
919
+ success: "var(--success-content--, #2dba73)",
920
+ warning: "var(--warning-content--, #d17f04)",
921
+ error: "var(--error-content--, #b80421)",
922
+ help: "var(--help-content--, #5405ff)",
923
+ };
924
+ return map[color] || map.base;
925
+ }
926
+
927
+ _getSize(size) {
928
+ const map = {
929
+ small: "var(--component-icon-size-small, 16px)",
930
+ medium: "var(--component-icon-size-medium, 24px)",
931
+ large: "var(--component-icon-size-large, 32px)",
932
+ };
933
+ return map[size] || map.medium;
934
+ }
935
+
936
+ _getWeight(weight) {
937
+ const map = {
938
+ thin: "1",
939
+ regular: "1.5",
940
+ thick: "2",
941
+ };
942
+ return map[weight] || "";
943
+ }
944
+
945
+ render() {
946
+ const svg = getCachedSvg(this.name);
947
+ const sizeVal = this._getSize(this.size);
948
+ const colorVal = this.color ? this._getColor(this.color) : "inherit";
949
+ const weightVal = this._getWeight(this.weight);
950
+ const label = this.label;
951
+
952
+ if (label) {
953
+ this.setAttribute("role", "img");
954
+ this.setAttribute("aria-label", label);
955
+ this.removeAttribute("aria-hidden");
956
+ } else {
957
+ this.setAttribute("aria-hidden", "true");
958
+ this.removeAttribute("role");
959
+ this.removeAttribute("aria-label");
960
+ }
961
+
962
+ const weightCSS = weightVal
963
+ ? `.icon-wrapper svg,
964
+ .icon-wrapper svg * { stroke-width: ${weightVal} !important; }`
965
+ : "";
966
+
967
+ this.shadowRoot.innerHTML = `
968
+ <style>
969
+ :host {
970
+ display: inline-flex;
971
+ align-items: center;
972
+ justify-content: center;
973
+ width: ${sizeVal};
974
+ height: ${sizeVal};
975
+ color: ${colorVal};
976
+ line-height: 0;
977
+ }
978
+ .icon-wrapper svg {
979
+ width: 100%;
980
+ height: 100%;
981
+ }
982
+ ${weightCSS}
983
+ </style>
984
+ <span class="icon-wrapper" part="icon">${svg}</span>
985
+ `;
986
+ }
987
+ }
988
+
989
+ if (!customElements.get("y-icon")) {
990
+ customElements.define("y-icon", YumeIcon);
991
+ }
992
+
993
+ class YumeMenu extends HTMLElement {
994
+ static get observedAttributes() {
995
+ return ["items", "anchor", "visible", "direction", "size"];
996
+ }
997
+
998
+ constructor() {
999
+ super();
1000
+ this.attachShadow({ mode: "open" });
1001
+ this._onAnchorClick = this._onAnchorClick.bind(this);
1002
+ this._onDocumentClick = this._onDocumentClick.bind(this);
1003
+ this._onScrollOrResize = this._onScrollOrResize.bind(this);
1004
+ }
1005
+
1006
+ connectedCallback() {
1007
+ if (!this.hasAttribute("items")) this.items = [];
1008
+ this._setupAnchor();
1009
+ this.render();
1010
+ document.addEventListener("click", this._onDocumentClick);
1011
+ window.addEventListener("scroll", this._onScrollOrResize, true);
1012
+ window.addEventListener("resize", this._onScrollOrResize);
1013
+ this.style.position = "fixed";
1014
+ this.style.zIndex = "1000";
1015
+ this.style.display = "none";
1016
+ }
1017
+
1018
+ disconnectedCallback() {
1019
+ this._teardownAnchor();
1020
+ document.removeEventListener("click", this._onDocumentClick);
1021
+ window.removeEventListener("scroll", this._onScrollOrResize, true);
1022
+ window.removeEventListener("resize", this._onScrollOrResize);
1023
+ }
1024
+
1025
+ attributeChangedCallback(name, oldVal, newVal) {
1026
+ if (oldVal === newVal) return;
1027
+ if (name === "items" || name === "size") this.render();
1028
+ if (name === "anchor") {
1029
+ this._teardownAnchor();
1030
+ this._setupAnchor();
1031
+ }
1032
+ if (name === "visible") {
1033
+ this._updatePosition();
1034
+ }
1035
+ if (name === "direction") {
1036
+ this._updatePosition();
1037
+ }
1038
+ }
1039
+
1040
+ get items() {
1041
+ try {
1042
+ return JSON.parse(this.getAttribute("items")) || [];
1043
+ } catch {
1044
+ return [];
1045
+ }
1046
+ }
1047
+ set items(val) {
1048
+ this.setAttribute("items", JSON.stringify(val));
1049
+ }
1050
+
1051
+ get anchor() {
618
1052
  return this.getAttribute("anchor");
619
1053
  }
620
1054
  set anchor(val) {
@@ -1374,10 +1808,18 @@ class YumeAppbar extends HTMLElement {
1374
1808
  btn.setAttribute("size", cfg.buttonSize);
1375
1809
 
1376
1810
  if (item.icon) {
1377
- const iconEl = document.createElement("span");
1378
- iconEl.slot = "left-icon";
1379
- iconEl.innerHTML = item.icon;
1380
- btn.appendChild(iconEl);
1811
+ if (item.icon.trim().startsWith("<")) {
1812
+ const iconEl = document.createElement("span");
1813
+ iconEl.slot = "left-icon";
1814
+ iconEl.innerHTML = item.icon;
1815
+ btn.appendChild(iconEl);
1816
+ } else {
1817
+ const iconEl = document.createElement("y-icon");
1818
+ iconEl.slot = "left-icon";
1819
+ iconEl.setAttribute("name", item.icon);
1820
+ iconEl.setAttribute("size", "small");
1821
+ btn.appendChild(iconEl);
1822
+ }
1381
1823
  }
1382
1824
 
1383
1825
  if (item.text && !isCollapsed) {
@@ -2847,277 +3289,6 @@ if (!customElements.get("y-drawer")) {
2847
3289
  customElements.define("y-drawer", YumeDrawer);
2848
3290
  }
2849
3291
 
2850
- /**
2851
- * Icon registry — a runtime map of icon names to SVG markup strings.
2852
- *
2853
- * Register only the icons you need for tree-shaking:
2854
- *
2855
- * import { registerIcon } from "@studious-creative/yumekit";
2856
- * registerIcon("home", homeSvgString);
2857
- *
2858
- * Or register all bundled icons at once (separate import):
2859
- *
2860
- * import "@studious-creative/yumekit/icons/all.js";
2861
- */
2862
-
2863
- const icons = new Map();
2864
-
2865
- function registerIcon(name, svg) {
2866
- icons.set(name, svg);
2867
- }
2868
-
2869
- function registerIcons(entries) {
2870
- for (const [name, svg] of Object.entries(entries)) {
2871
- icons.set(name, svg);
2872
- }
2873
- }
2874
-
2875
- function getIcon(name) {
2876
- return icons.get(name) || "";
2877
- }
2878
-
2879
- // Allowlist-based SVG sanitizer — only known-safe elements and attributes are kept.
2880
- const ALLOWED_ELEMENTS = new Set([
2881
- "svg",
2882
- "g",
2883
- "path",
2884
- "circle",
2885
- "ellipse",
2886
- "rect",
2887
- "line",
2888
- "polyline",
2889
- "polygon",
2890
- "text",
2891
- "tspan",
2892
- "defs",
2893
- "clippath",
2894
- "mask",
2895
- "lineargradient",
2896
- "radialgradient",
2897
- "stop",
2898
- "symbol",
2899
- "title",
2900
- "desc",
2901
- "metadata",
2902
- ]);
2903
-
2904
- const ALLOWED_ATTRS = new Set([
2905
- "viewbox",
2906
- "xmlns",
2907
- "fill",
2908
- "stroke",
2909
- "stroke-width",
2910
- "stroke-linecap",
2911
- "stroke-linejoin",
2912
- "stroke-dasharray",
2913
- "stroke-dashoffset",
2914
- "stroke-miterlimit",
2915
- "stroke-opacity",
2916
- "fill-opacity",
2917
- "fill-rule",
2918
- "clip-rule",
2919
- "opacity",
2920
- "d",
2921
- "cx",
2922
- "cy",
2923
- "r",
2924
- "rx",
2925
- "ry",
2926
- "x",
2927
- "x1",
2928
- "x2",
2929
- "y",
2930
- "y1",
2931
- "y2",
2932
- "width",
2933
- "height",
2934
- "points",
2935
- "transform",
2936
- "id",
2937
- "class",
2938
- "clip-path",
2939
- "mask",
2940
- "offset",
2941
- "stop-color",
2942
- "stop-opacity",
2943
- "gradient-units",
2944
- "gradienttransform",
2945
- "gradientunits",
2946
- "spreadmethod",
2947
- "patternunits",
2948
- "patterntransform",
2949
- "font-size",
2950
- "font-family",
2951
- "font-weight",
2952
- "text-anchor",
2953
- "dominant-baseline",
2954
- "alignment-baseline",
2955
- "dx",
2956
- "dy",
2957
- "rotate",
2958
- "textlength",
2959
- "lengthadjust",
2960
- "display",
2961
- "visibility",
2962
- "color",
2963
- "vector-effect",
2964
- ]);
2965
-
2966
- function sanitizeSvg(raw) {
2967
- if (!raw) return "";
2968
- const doc = new DOMParser().parseFromString(raw, "image/svg+xml");
2969
- const svg = doc.querySelector("svg");
2970
- if (!svg) return "";
2971
-
2972
- const walk = (el) => {
2973
- for (const child of [...el.children]) {
2974
- if (!ALLOWED_ELEMENTS.has(child.tagName.toLowerCase())) {
2975
- child.remove();
2976
- continue;
2977
- }
2978
- for (const attr of [...child.attributes]) {
2979
- if (!ALLOWED_ATTRS.has(attr.name.toLowerCase())) {
2980
- child.removeAttribute(attr.name);
2981
- }
2982
- }
2983
- walk(child);
2984
- }
2985
- };
2986
-
2987
- // Sanitize the <svg> element's own attributes
2988
- for (const attr of [...svg.attributes]) {
2989
- if (!ALLOWED_ATTRS.has(attr.name.toLowerCase())) {
2990
- svg.removeAttribute(attr.name);
2991
- }
2992
- }
2993
- walk(svg);
2994
- return svg.outerHTML;
2995
- }
2996
-
2997
- // Cache sanitized SVG markup per icon name to avoid repeated DOMParser + DOM-walk
2998
- // on every render. The cache is naturally bounded by the number of registered icons.
2999
- const sanitizedSvgCache = new Map();
3000
-
3001
- function getCachedSvg(name) {
3002
- if (sanitizedSvgCache.has(name)) {
3003
- return sanitizedSvgCache.get(name);
3004
- }
3005
- const result = sanitizeSvg(getIcon(name));
3006
- sanitizedSvgCache.set(name, result);
3007
- return result;
3008
- }
3009
-
3010
- class YumeIcon extends HTMLElement {
3011
- static get observedAttributes() {
3012
- return ["name", "size", "color", "label"];
3013
- }
3014
-
3015
- constructor() {
3016
- super();
3017
- this.attachShadow({ mode: "open" });
3018
- }
3019
-
3020
- connectedCallback() {
3021
- this.render();
3022
- }
3023
-
3024
- attributeChangedCallback(name, oldVal, newVal) {
3025
- if (oldVal === newVal) return;
3026
- this.render();
3027
- }
3028
-
3029
- get name() {
3030
- return this.getAttribute("name") || "";
3031
- }
3032
- set name(val) {
3033
- this.setAttribute("name", val);
3034
- }
3035
-
3036
- get size() {
3037
- return this.getAttribute("size") || "medium";
3038
- }
3039
- set size(val) {
3040
- this.setAttribute("size", val);
3041
- }
3042
-
3043
- get color() {
3044
- return this.getAttribute("color") || "base";
3045
- }
3046
- set color(val) {
3047
- this.setAttribute("color", val);
3048
- }
3049
-
3050
- get label() {
3051
- return this.getAttribute("label") || "";
3052
- }
3053
- set label(val) {
3054
- if (val) this.setAttribute("label", val);
3055
- else this.removeAttribute("label");
3056
- }
3057
-
3058
- _getColor(color) {
3059
- const map = {
3060
- base: "var(--base-content--, #f7f7fa)",
3061
- primary: "var(--primary-content--, #0576ff)",
3062
- secondary: "var(--secondary-content--, #04b8b8)",
3063
- success: "var(--success-content--, #2dba73)",
3064
- warning: "var(--warning-content--, #d17f04)",
3065
- error: "var(--error-content--, #b80421)",
3066
- help: "var(--help-content--, #5405ff)",
3067
- };
3068
- return map[color] || map.base;
3069
- }
3070
-
3071
- _getSize(size) {
3072
- const map = {
3073
- small: "var(--component-icon-size-small, 16px)",
3074
- medium: "var(--component-icon-size-medium, 24px)",
3075
- large: "var(--component-icon-size-large, 32px)",
3076
- };
3077
- return map[size] || map.medium;
3078
- }
3079
-
3080
- render() {
3081
- const svg = getCachedSvg(this.name);
3082
- const sizeVal = this._getSize(this.size);
3083
- const colorVal = this._getColor(this.color);
3084
- const label = this.label;
3085
-
3086
- if (label) {
3087
- this.setAttribute("role", "img");
3088
- this.setAttribute("aria-label", label);
3089
- this.removeAttribute("aria-hidden");
3090
- } else {
3091
- this.setAttribute("aria-hidden", "true");
3092
- this.removeAttribute("role");
3093
- this.removeAttribute("aria-label");
3094
- }
3095
-
3096
- this.shadowRoot.innerHTML = `
3097
- <style>
3098
- :host {
3099
- display: inline-flex;
3100
- align-items: center;
3101
- justify-content: center;
3102
- width: ${sizeVal};
3103
- height: ${sizeVal};
3104
- color: ${colorVal};
3105
- line-height: 0;
3106
- }
3107
- .icon-wrapper svg {
3108
- width: 100%;
3109
- height: 100%;
3110
- }
3111
- </style>
3112
- <span class="icon-wrapper" part="icon">${svg}</span>
3113
- `;
3114
- }
3115
- }
3116
-
3117
- if (!customElements.get("y-icon")) {
3118
- customElements.define("y-icon", YumeIcon);
3119
- }
3120
-
3121
3292
  class YumeInput extends HTMLElement {
3122
3293
  static formAssociated = true;
3123
3294
 
@@ -6282,7 +6453,7 @@ class YumeToast extends HTMLElement {
6282
6453
  * @param {string} [opts.color] — base|primary|secondary|success|warning|error|help (default base).
6283
6454
  * @param {number} [opts.duration] — Override container-level duration for this toast.
6284
6455
  * @param {boolean} [opts.dismissible] — Show a close button (default true).
6285
- * @param {string} [opts.icon] — Optional Font Awesome class e.g. "fas fa-check".
6456
+ * @param {string} [opts.icon] — Optional y-icon name e.g. "checkmark".
6286
6457
  * @returns {HTMLElement} The toast element (for manual removal).
6287
6458
  */
6288
6459
  show(opts = {}) {
@@ -6315,8 +6486,10 @@ class YumeToast extends HTMLElement {
6315
6486
  toast.style.color = textColor;
6316
6487
 
6317
6488
  if (icon) {
6318
- const iconEl = document.createElement("i");
6319
- iconEl.className = `toast-icon ${icon}`;
6489
+ const iconEl = document.createElement("y-icon");
6490
+ iconEl.setAttribute("name", icon);
6491
+ iconEl.setAttribute("size", "small");
6492
+ iconEl.className = "toast-icon";
6320
6493
  iconEl.setAttribute("part", "icon");
6321
6494
  toast.appendChild(iconEl);
6322
6495
  }