@redvars/peacock 3.5.1 → 3.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (198) hide show
  1. package/dist/{BaseButton-DuASuVth.js → BaseButton-BNFAYn-S.js} +2 -2
  2. package/dist/{BaseButton-DuASuVth.js.map → BaseButton-BNFAYn-S.js.map} +1 -1
  3. package/dist/BaseInput-14YmcfK7.js +27 -0
  4. package/dist/BaseInput-14YmcfK7.js.map +1 -0
  5. package/dist/banner.js +2 -3
  6. package/dist/banner.js.map +1 -1
  7. package/dist/{button-DouvOfEU.js → button-colors-Ccys3hvS.js} +5 -294
  8. package/dist/button-colors-Ccys3hvS.js.map +1 -0
  9. package/dist/button-group.js +226 -6
  10. package/dist/button-group.js.map +1 -1
  11. package/dist/button.js +294 -8
  12. package/dist/button.js.map +1 -1
  13. package/dist/calendar-column-view.js +634 -0
  14. package/dist/calendar-column-view.js.map +1 -0
  15. package/dist/calendar-event-BrQ_SEKD.js +199 -0
  16. package/dist/calendar-event-BrQ_SEKD.js.map +1 -0
  17. package/dist/calendar-month-view.js +376 -0
  18. package/dist/calendar-month-view.js.map +1 -0
  19. package/dist/calendar.js +339 -0
  20. package/dist/calendar.js.map +1 -0
  21. package/dist/canvas.js +361 -0
  22. package/dist/canvas.js.map +1 -0
  23. package/dist/cb-compound-expression.js +125 -0
  24. package/dist/cb-compound-expression.js.map +1 -0
  25. package/dist/cb-divider.js +150 -0
  26. package/dist/cb-divider.js.map +1 -0
  27. package/dist/cb-expression.js +75 -0
  28. package/dist/cb-expression.js.map +1 -0
  29. package/dist/cb-predicate.js +137 -0
  30. package/dist/cb-predicate.js.map +1 -0
  31. package/dist/code-editor.js +2 -1
  32. package/dist/code-editor.js.map +1 -1
  33. package/dist/condition-builder.js +58 -0
  34. package/dist/condition-builder.js.map +1 -0
  35. package/dist/custom-elements-jsdocs.json +7976 -4294
  36. package/dist/custom-elements.json +14358 -7589
  37. package/dist/dropdown-button.js +216 -0
  38. package/dist/dropdown-button.js.map +1 -0
  39. package/dist/event-manager-D-QCmUgR.js +113 -0
  40. package/dist/event-manager-D-QCmUgR.js.map +1 -0
  41. package/dist/fab.js +1 -1
  42. package/dist/flow-designer-dZnLJOQT.js +1656 -0
  43. package/dist/flow-designer-dZnLJOQT.js.map +1 -0
  44. package/dist/flow-designer-node-XMe-jlKg.js +548 -0
  45. package/dist/flow-designer-node-XMe-jlKg.js.map +1 -0
  46. package/dist/flow-designer-node.js +4 -0
  47. package/dist/flow-designer-node.js.map +1 -0
  48. package/dist/flow-designer.js +16 -0
  49. package/dist/flow-designer.js.map +1 -0
  50. package/dist/html-editor.js +358 -0
  51. package/dist/html-editor.js.map +1 -0
  52. package/dist/icon-button-CK1ZuE-2.js +247 -0
  53. package/dist/icon-button-CK1ZuE-2.js.map +1 -0
  54. package/dist/index.js +29 -6
  55. package/dist/index.js.map +1 -1
  56. package/dist/{is-dark-mode-DicqGkCJ.js → is-dark-mode-DOcaw4Yq.js} +2 -27
  57. package/dist/is-dark-mode-DOcaw4Yq.js.map +1 -0
  58. package/dist/modal.js +418 -0
  59. package/dist/modal.js.map +1 -0
  60. package/dist/{navigation-rail-Lxetd5-Z.js → navigation-rail-DyO0oAZU.js} +306 -2197
  61. package/dist/navigation-rail-DyO0oAZU.js.map +1 -0
  62. package/dist/notification-manager.js +268 -0
  63. package/dist/notification-manager.js.map +1 -0
  64. package/dist/peacock-loader.js +84 -8
  65. package/dist/peacock-loader.js.map +1 -1
  66. package/dist/popover-NC7b1lTq.js +1971 -0
  67. package/dist/popover-NC7b1lTq.js.map +1 -0
  68. package/dist/popover-content.js +125 -0
  69. package/dist/popover-content.js.map +1 -0
  70. package/dist/popover.js +4 -0
  71. package/dist/popover.js.map +1 -0
  72. package/dist/split-button.js +388 -0
  73. package/dist/split-button.js.map +1 -0
  74. package/dist/src/__controllers/floating-controller.d.ts +35 -0
  75. package/dist/src/calendar/base-event.d.ts +10 -0
  76. package/dist/src/calendar/calendar-column-view.d.ts +41 -0
  77. package/dist/src/calendar/calendar-event.d.ts +7 -0
  78. package/dist/src/calendar/calendar-month-view.d.ts +31 -0
  79. package/dist/src/calendar/calendar.d.ts +65 -0
  80. package/dist/src/calendar/event-manager.d.ts +17 -0
  81. package/dist/src/calendar/index.d.ts +4 -0
  82. package/dist/src/calendar/types.d.ts +13 -0
  83. package/dist/src/calendar/utils.d.ts +31 -0
  84. package/dist/src/canvas/canvas.d.ts +92 -0
  85. package/dist/src/canvas/index.d.ts +2 -0
  86. package/dist/src/condition-builder/cb-compound-expression.d.ts +31 -0
  87. package/dist/src/condition-builder/cb-divider.d.ts +26 -0
  88. package/dist/src/condition-builder/cb-expression.d.ts +31 -0
  89. package/dist/src/condition-builder/cb-predicate.d.ts +30 -0
  90. package/dist/src/condition-builder/condition-builder.d.ts +27 -0
  91. package/dist/src/condition-builder/index.d.ts +5 -0
  92. package/dist/src/dropdown-button/dropdown-button.d.ts +68 -0
  93. package/dist/src/dropdown-button/index.d.ts +1 -0
  94. package/dist/src/flow-designer/commands.d.ts +66 -0
  95. package/dist/src/flow-designer/flow-designer-node.d.ts +46 -0
  96. package/dist/src/flow-designer/flow-designer.d.ts +133 -0
  97. package/dist/src/flow-designer/index.d.ts +7 -0
  98. package/dist/src/flow-designer/layout.d.ts +30 -0
  99. package/dist/src/flow-designer/types.d.ts +142 -0
  100. package/dist/src/flow-designer/validation.d.ts +43 -0
  101. package/dist/src/flow-designer/workflow-utils.d.ts +40 -0
  102. package/dist/src/html-editor/html-editor.d.ts +56 -0
  103. package/dist/src/html-editor/index.d.ts +2 -0
  104. package/dist/src/index.d.ts +13 -0
  105. package/dist/src/menu/menu/menu.d.ts +5 -7
  106. package/dist/src/menu/menu-item/menu-item.d.ts +14 -13
  107. package/dist/src/modal/index.d.ts +1 -0
  108. package/dist/src/modal/modal.d.ts +63 -0
  109. package/dist/src/notification-manager/index.d.ts +1 -0
  110. package/dist/src/notification-manager/notification-manager.d.ts +44 -0
  111. package/dist/src/popover/index.d.ts +2 -0
  112. package/dist/src/popover/popover-content.d.ts +29 -0
  113. package/dist/src/popover/popover.d.ts +62 -0
  114. package/dist/src/split-button/index.d.ts +1 -0
  115. package/dist/src/split-button/split-button.d.ts +72 -0
  116. package/dist/src/tooltip/tooltip.d.ts +2 -15
  117. package/dist/test/flow-designer.test.d.ts +1 -0
  118. package/dist/tsconfig.tsbuildinfo +1 -1
  119. package/package.json +4 -2
  120. package/readme.md +2 -2
  121. package/src/__controllers/floating-controller.ts +237 -0
  122. package/src/banner/banner.scss +2 -3
  123. package/src/button/button/button.ts +1 -0
  124. package/src/calendar/base-event.ts +49 -0
  125. package/src/calendar/calendar-column-view.scss +326 -0
  126. package/src/calendar/calendar-column-view.ts +392 -0
  127. package/src/calendar/calendar-event.ts +20 -0
  128. package/src/calendar/calendar-month-view.scss +192 -0
  129. package/src/calendar/calendar-month-view.ts +244 -0
  130. package/src/calendar/calendar.scss +71 -0
  131. package/src/calendar/calendar.ts +298 -0
  132. package/src/calendar/event-manager.ts +117 -0
  133. package/src/calendar/index.ts +4 -0
  134. package/src/calendar/types.ts +14 -0
  135. package/src/calendar/utils.ts +180 -0
  136. package/src/canvas/canvas.scss +60 -0
  137. package/src/canvas/canvas.ts +391 -0
  138. package/src/canvas/index.ts +2 -0
  139. package/src/condition-builder/cb-compound-expression.scss +37 -0
  140. package/src/condition-builder/cb-compound-expression.ts +80 -0
  141. package/src/condition-builder/cb-divider.scss +93 -0
  142. package/src/condition-builder/cb-divider.ts +56 -0
  143. package/src/condition-builder/cb-expression.scss +14 -0
  144. package/src/condition-builder/cb-expression.ts +49 -0
  145. package/src/condition-builder/cb-predicate.scss +35 -0
  146. package/src/condition-builder/cb-predicate.ts +102 -0
  147. package/src/condition-builder/condition-builder.scss +13 -0
  148. package/src/condition-builder/condition-builder.ts +38 -0
  149. package/src/condition-builder/index.ts +5 -0
  150. package/src/dropdown-button/demo/index.html +110 -0
  151. package/src/dropdown-button/dropdown-button.scss +22 -0
  152. package/src/dropdown-button/dropdown-button.ts +206 -0
  153. package/src/dropdown-button/index.ts +1 -0
  154. package/src/flow-designer/DEMO.md +239 -0
  155. package/src/flow-designer/commands.ts +278 -0
  156. package/src/flow-designer/flow-designer-node.ts +172 -0
  157. package/src/flow-designer/flow-designer.scss +457 -0
  158. package/src/flow-designer/flow-designer.ts +611 -0
  159. package/src/flow-designer/index.ts +41 -0
  160. package/src/flow-designer/layout.ts +357 -0
  161. package/src/flow-designer/types.ts +166 -0
  162. package/src/flow-designer/validation.ts +284 -0
  163. package/src/flow-designer/workflow-utils.ts +282 -0
  164. package/src/html-editor/html-editor.scss +146 -0
  165. package/src/html-editor/html-editor.ts +276 -0
  166. package/src/html-editor/index.ts +3 -0
  167. package/src/index.ts +25 -0
  168. package/src/menu/menu/menu.scss +2 -2
  169. package/src/menu/menu/menu.ts +91 -101
  170. package/src/menu/menu-item/menu-item.scss +4 -0
  171. package/src/menu/menu-item/menu-item.ts +82 -78
  172. package/src/modal/index.ts +1 -0
  173. package/src/modal/modal.scss +206 -0
  174. package/src/modal/modal.ts +201 -0
  175. package/src/notification-manager/index.ts +1 -0
  176. package/src/notification-manager/notification-manager.scss +113 -0
  177. package/src/notification-manager/notification-manager.ts +199 -0
  178. package/src/peacock-loader.ts +71 -0
  179. package/src/popover/index.ts +2 -0
  180. package/src/popover/popover-content.scss +69 -0
  181. package/src/popover/popover-content.ts +51 -0
  182. package/src/popover/popover.scss +7 -0
  183. package/src/popover/popover.ts +170 -0
  184. package/src/split-button/index.ts +1 -0
  185. package/src/split-button/split-button-colors.scss +56 -0
  186. package/src/split-button/split-button-sizes.scss +28 -0
  187. package/src/split-button/split-button.scss +79 -0
  188. package/src/split-button/split-button.ts +236 -0
  189. package/src/table/table.ts +2 -2
  190. package/src/tooltip/tooltip.scss +4 -3
  191. package/src/tooltip/tooltip.ts +46 -104
  192. package/dist/button-DouvOfEU.js.map +0 -1
  193. package/dist/button-group-CEdMwvJJ.js +0 -464
  194. package/dist/button-group-CEdMwvJJ.js.map +0 -1
  195. package/dist/is-dark-mode-DicqGkCJ.js.map +0 -1
  196. package/dist/navigation-rail-Lxetd5-Z.js.map +0 -1
  197. package/dist/src/menu/menu/MenuSurfaceController.d.ts +0 -18
  198. package/src/menu/menu/MenuSurfaceController.ts +0 -61
@@ -215,5 +215,5 @@ __decorate([
215
215
  e$1('.button')
216
216
  ], BaseButton.prototype, "buttonElement", void 0);
217
217
 
218
- export { BaseButton as B, o, spread as s };
219
- //# sourceMappingURL=BaseButton-DuASuVth.js.map
218
+ export { BaseButton as B, BaseButtonMixin as a, o, spread as s };
219
+ //# sourceMappingURL=BaseButton-BNFAYn-S.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BaseButton-DuASuVth.js","sources":["../node_modules/lit-html/directives/if-defined.js","../../src/__directive/spread.ts","../../src/__mixins/BaseButtonMixin.ts","../../src/button/BaseButton.ts"],"sourcesContent":["import{nothing as t}from\"../lit-html.js\";\n/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const o=o=>o??t;export{o as ifDefined};\n//# sourceMappingURL=if-defined.js.map\n","import {\n directive,\n Directive,\n ElementPart,\n PartInfo,\n PartType,\n} from 'lit/directive.js';\n\nclass SpreadDirective extends Directive {\n constructor(partInfo: PartInfo) {\n super(partInfo);\n if (partInfo.type !== PartType.ELEMENT) {\n throw new Error('spread() can only be used on elements');\n }\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n render(_props: { [key: string]: any } | undefined) {\n return '';\n }\n\n update(part: ElementPart, [props]: [{ [key: string]: any } | undefined]) {\n if (!props) return;\n // eslint-disable-next-line guard-for-in,no-restricted-syntax\n for (const key in props) {\n const value = props[key];\n if (value === undefined || value === null) {\n part.element.removeAttribute(key);\n } else {\n part.element.setAttribute(key, value);\n }\n }\n }\n}\n\nexport const spread = directive(SpreadDirective);\n","import { LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport type { MixinConstructor } from './MixinConstructor.js';\n\n\n/**\n * 1. Define an interface for the members the mixin adds.\n * This makes the type annotation much cleaner.\n */\nexport interface BaseButtonInterface {\n htmlType: 'button' | 'submit' | 'reset';\n disabled: boolean;\n softDisabled: boolean;\n disabledReason: string;\n form: string;\n name: string;\n value: string;\n}\n\n/**\n * 2. Apply the type annotation to the variable.\n */\nconst BaseButtonMixin: <T extends MixinConstructor<LitElement>>(superclass: T) => T & MixinConstructor<BaseButtonInterface> = <T extends MixinConstructor<LitElement>>(superclass: T) => {\n // Naming the class (BaseButtonElement) instead of using 'Mixin' or anonymous \n // prevents the \"__childPart\" visibility error.\n class BaseButtonElement extends superclass implements BaseButtonInterface {\n\n /**\n * The type of the underlying `<button>` element. Maps to the native `type` attribute.\n * Possible values are `\"button\"`, `\"submit\"`, `\"reset\"`. Defaults to `\"button\"`.\n */\n @property({ type: String }) htmlType: 'button' | 'submit' | 'reset' =\n 'button';\n\n /**\n * When `true`, the button is disabled and cannot be interacted with. Reflects to the `disabled` attribute. Defaults to `false`.\n */\n @property({ type: Boolean, reflect: true })\n disabled: boolean = false;\n\n /**\n * When `true`, the button is visually styled as disabled and cannot be interacted with, but remains focusable.\n * Use this in combination with `disabledReason` to communicate why the button is unavailable.\n * Reflects to the `soft-disabled` attribute. Defaults to `false`.\n */\n @property({ type: Boolean, reflect: true, attribute: 'soft-disabled' })\n softDisabled: boolean = false;\n\n /**\n * A human-readable explanation of why the button is disabled or soft-disabled.\n * Rendered as a visually hidden tooltip and linked via `aria-describedby` for accessibility.\n * Maps to the `disabled-reason` attribute.\n */\n @property({ attribute: 'disabled-reason' })\n disabledReason: string = '';\n\n /**\n * The `id` of the `<form>` element to associate the button with.\n * If omitted, the button is associated with its nearest ancestor form.\n * Maps to the native `form` attribute.\n */\n @property()\n form: string = '';\n\n /**\n * The name of the button, submitted as part of a name/value pair when the associated form is submitted.\n * Maps to the native `name` attribute.\n */\n @property()\n name: string = '';\n\n /**\n * The value of the button, submitted as part of a name/value pair when the associated form is submitted.\n * Maps to the native `value` attribute.\n */\n @property()\n value: string = '';\n }\n\n return BaseButtonElement as T & MixinConstructor<BaseButtonInterface>;\n};\n\nexport default BaseButtonMixin;","import { html, LitElement, nothing } from 'lit';\nimport { property, query, state } from 'lit/decorators.js';\nimport { dispatchActivationClick, isActivationClick } from '../__utils/dispatch-event-utils.js';\nimport BaseHyperlinkMixin from '@/__mixins/BaseHyperlinkMixin.js';\nimport BaseButtonMixin from '@/__mixins/BaseButtonMixin.js';\n\n\n\nexport class BaseButton extends BaseButtonMixin(BaseHyperlinkMixin(LitElement)) {\n protected static readonly DISABLED_REASON_ID = 'disabled-reason';\n\n \n color?: string;\n\n variant?: string;\n\n @property({ type: Boolean, reflect: true }) skeleton: boolean = false;\n \n @property({ type: Boolean, reflect: true }) toggle: boolean = false;\n\n @property({ type: Boolean, reflect: true }) selected: boolean = false;\n\n /**\n * Sets the delay for throttle in milliseconds. Defaults to 200 milliseconds.\n */\n @property() throttleDelay = 200;\n\n @property() tooltip?: string;\n\n /**\n * States\n */\n @state()\n isPressed = false;\n\n @query('.button') readonly buttonElement!: HTMLElement | null;\n\n override connectedCallback() {\n super.connectedCallback();\n this.addEventListener('click', this.__dispatchClickWithThrottle);\n window.addEventListener('mouseup', this.__handlePress);\n }\n\n override disconnectedCallback() {\n window.removeEventListener('mouseup', this.__handlePress);\n this.removeEventListener('click', this.__dispatchClickWithThrottle);\n super.disconnectedCallback();\n }\n\n __handlePress = (event: KeyboardEvent | MouseEvent) => {\n if (this.disabled || this.skeleton || this.softDisabled) return;\n if (\n event instanceof KeyboardEvent &&\n event.type === 'keydown' &&\n (event.key === 'Enter' || event.key === ' ')\n ) {\n this.isPressed = true;\n } else if (event.type === 'mousedown') {\n this.isPressed = true;\n } else {\n this.isPressed = false;\n }\n };\n\n __dispatchClickWithThrottle: (event: MouseEvent | KeyboardEvent) => void =\n event => {\n this.__dispatchClick(event);\n };\n\n __dispatchClick = (event: MouseEvent | KeyboardEvent) => {\n // If the button is soft-disabled or a disabled link, we need to explicitly\n // prevent the click from propagating to other event listeners as well as\n // prevent the default action.\n if (this.softDisabled || (this.disabled && this.href) || this.skeleton) {\n event.stopImmediatePropagation();\n event.preventDefault();\n return;\n }\n\n if (!isActivationClick(event) || !this.buttonElement) {\n return;\n }\n\n if (this.toggle) {\n this.selected = !this.selected;\n }\n\n this.focus();\n dispatchActivationClick(this.buttonElement);\n };\n\n \n\n __renderDisabledReason(softDisabled: boolean) {\n if (softDisabled)\n return html`<div\n id=${BaseButton.DISABLED_REASON_ID}\n role=\"tooltip\"\n aria-label=${this.disabledReason}\n class=\"screen-reader-only\"\n >\n ${this.disabledReason}\n </div>`;\n return nothing;\n }\n\n __renderTooltip() {\n if (this.tooltip) {\n return html`<wc-tooltip for=\"button\">${this.tooltip}</wc-tooltip>`;\n }\n return nothing;\n }\n}\n"],"names":["t","Directive","PartType","directive","property","LitElement","html","nothing","state","query"],"mappings":";;;;;;;;AACA;AACA;AACA;AACA;AACA,GAAQ,MAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAEA;;ACGjB,MAAM,eAAgB,SAAQC,CAAS,CAAA;AACrC,IAAA,WAAA,CAAY,QAAkB,EAAA;QAC5B,KAAK,CAAC,QAAQ,CAAC;QACf,IAAI,QAAQ,CAAC,IAAI,KAAKC,CAAQ,CAAC,OAAO,EAAE;AACtC,YAAA,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC;QAC1D;IACF;;AAGA,IAAA,MAAM,CAAC,MAA0C,EAAA;AAC/C,QAAA,OAAO,EAAE;IACX;AAEA,IAAA,MAAM,CAAC,IAAiB,EAAE,CAAC,KAAK,CAAuC,EAAA;AACrE,QAAA,IAAI,CAAC,KAAK;YAAE;;AAEZ,QAAA,KAAK,MAAM,GAAG,IAAI,KAAK,EAAE;AACvB,YAAA,MAAM,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC;YACxB,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,EAAE;AACzC,gB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AAA;AAES,UAAA,CAAA;IAA1BC,GAAK,CAAC,SAAS;AAA8C,CAAA,EAAA,UAAA,CAAA,SAAA,EAAA,eAAA,EAAA,MAAA,CAAA;;;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"BaseButton-BNFAYn-S.js","sources":["../node_modules/lit-html/directives/if-defined.js","../../src/__directive/spread.ts","../../src/__mixins/BaseButtonMixin.ts","../../src/button/BaseButton.ts"],"sourcesContent":["import{nothing as t}from\"../lit-html.js\";\n/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const o=o=>o??t;export{o as ifDefined};\n//# sourceMappingURL=if-defined.js.map\n","import {\n directive,\n Directive,\n ElementPart,\n PartInfo,\n PartType,\n} from 'lit/directive.js';\n\nclass SpreadDirective extends Directive {\n constructor(partInfo: PartInfo) {\n super(partInfo);\n if (partInfo.type !== PartType.ELEMENT) {\n throw new Error('spread() can only be used on elements');\n }\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n render(_props: { [key: string]: any } | undefined) {\n return '';\n }\n\n update(part: ElementPart, [props]: [{ [key: string]: any } | undefined]) {\n if (!props) return;\n // eslint-disable-next-line guard-for-in,no-restricted-syntax\n for (const key in props) {\n const value = props[key];\n if (value === undefined || value === null) {\n part.element.removeAttribute(key);\n } else {\n part.element.setAttribute(key, value);\n }\n }\n }\n}\n\nexport const spread = directive(SpreadDirective);\n","import { LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport type { MixinConstructor } from './MixinConstructor.js';\n\n\n/**\n * 1. Define an interface for the members the mixin adds.\n * This makes the type annotation much cleaner.\n */\nexport interface BaseButtonInterface {\n htmlType: 'button' | 'submit' | 'reset';\n disabled: boolean;\n softDisabled: boolean;\n disabledReason: string;\n form: string;\n name: string;\n value: string;\n}\n\n/**\n * 2. Apply the type annotation to the variable.\n */\nconst BaseButtonMixin: <T extends MixinConstructor<LitElement>>(superclass: T) => T & MixinConstructor<BaseButtonInterface> = <T extends MixinConstructor<LitElement>>(superclass: T) => {\n // Naming the class (BaseButtonElement) instead of using 'Mixin' or anonymous \n // prevents the \"__childPart\" visibility error.\n class BaseButtonElement extends superclass implements BaseButtonInterface {\n\n /**\n * The type of the underlying `<button>` element. Maps to the native `type` attribute.\n * Possible values are `\"button\"`, `\"submit\"`, `\"reset\"`. Defaults to `\"button\"`.\n */\n @property({ type: String }) htmlType: 'button' | 'submit' | 'reset' =\n 'button';\n\n /**\n * When `true`, the button is disabled and cannot be interacted with. Reflects to the `disabled` attribute. Defaults to `false`.\n */\n @property({ type: Boolean, reflect: true })\n disabled: boolean = false;\n\n /**\n * When `true`, the button is visually styled as disabled and cannot be interacted with, but remains focusable.\n * Use this in combination with `disabledReason` to communicate why the button is unavailable.\n * Reflects to the `soft-disabled` attribute. Defaults to `false`.\n */\n @property({ type: Boolean, reflect: true, attribute: 'soft-disabled' })\n softDisabled: boolean = false;\n\n /**\n * A human-readable explanation of why the button is disabled or soft-disabled.\n * Rendered as a visually hidden tooltip and linked via `aria-describedby` for accessibility.\n * Maps to the `disabled-reason` attribute.\n */\n @property({ attribute: 'disabled-reason' })\n disabledReason: string = '';\n\n /**\n * The `id` of the `<form>` element to associate the button with.\n * If omitted, the button is associated with its nearest ancestor form.\n * Maps to the native `form` attribute.\n */\n @property()\n form: string = '';\n\n /**\n * The name of the button, submitted as part of a name/value pair when the associated form is submitted.\n * Maps to the native `name` attribute.\n */\n @property()\n name: string = '';\n\n /**\n * The value of the button, submitted as part of a name/value pair when the associated form is submitted.\n * Maps to the native `value` attribute.\n */\n @property()\n value: string = '';\n }\n\n return BaseButtonElement as T & MixinConstructor<BaseButtonInterface>;\n};\n\nexport default BaseButtonMixin;","import { html, LitElement, nothing } from 'lit';\nimport { property, query, state } from 'lit/decorators.js';\nimport { dispatchActivationClick, isActivationClick } from '../__utils/dispatch-event-utils.js';\nimport BaseHyperlinkMixin from '@/__mixins/BaseHyperlinkMixin.js';\nimport BaseButtonMixin from '@/__mixins/BaseButtonMixin.js';\n\n\n\nexport class BaseButton extends BaseButtonMixin(BaseHyperlinkMixin(LitElement)) {\n protected static readonly DISABLED_REASON_ID = 'disabled-reason';\n\n \n color?: string;\n\n variant?: string;\n\n @property({ type: Boolean, reflect: true }) skeleton: boolean = false;\n \n @property({ type: Boolean, reflect: true }) toggle: boolean = false;\n\n @property({ type: Boolean, reflect: true }) selected: boolean = false;\n\n /**\n * Sets the delay for throttle in milliseconds. Defaults to 200 milliseconds.\n */\n @property() throttleDelay = 200;\n\n @property() tooltip?: string;\n\n /**\n * States\n */\n @state()\n isPressed = false;\n\n @query('.button') readonly buttonElement!: HTMLElement | null;\n\n override connectedCallback() {\n super.connectedCallback();\n this.addEventListener('click', this.__dispatchClickWithThrottle);\n window.addEventListener('mouseup', this.__handlePress);\n }\n\n override disconnectedCallback() {\n window.removeEventListener('mouseup', this.__handlePress);\n this.removeEventListener('click', this.__dispatchClickWithThrottle);\n super.disconnectedCallback();\n }\n\n __handlePress = (event: KeyboardEvent | MouseEvent) => {\n if (this.disabled || this.skeleton || this.softDisabled) return;\n if (\n event instanceof KeyboardEvent &&\n event.type === 'keydown' &&\n (event.key === 'Enter' || event.key === ' ')\n ) {\n this.isPressed = true;\n } else if (event.type === 'mousedown') {\n this.isPressed = true;\n } else {\n this.isPressed = false;\n }\n };\n\n __dispatchClickWithThrottle: (event: MouseEvent | KeyboardEvent) => void =\n event => {\n this.__dispatchClick(event);\n };\n\n __dispatchClick = (event: MouseEvent | KeyboardEvent) => {\n // If the button is soft-disabled or a disabled link, we need to explicitly\n // prevent the click from propagating to other event listeners as well as\n // prevent the default action.\n if (this.softDisabled || (this.disabled && this.href) || this.skeleton) {\n event.stopImmediatePropagation();\n event.preventDefault();\n return;\n }\n\n if (!isActivationClick(event) || !this.buttonElement) {\n return;\n }\n\n if (this.toggle) {\n this.selected = !this.selected;\n }\n\n this.focus();\n dispatchActivationClick(this.buttonElement);\n };\n\n \n\n __renderDisabledReason(softDisabled: boolean) {\n if (softDisabled)\n return html`<div\n id=${BaseButton.DISABLED_REASON_ID}\n role=\"tooltip\"\n aria-label=${this.disabledReason}\n class=\"screen-reader-only\"\n >\n ${this.disabledReason}\n </div>`;\n return nothing;\n }\n\n __renderTooltip() {\n if (this.tooltip) {\n return html`<wc-tooltip for=\"button\">${this.tooltip}</wc-tooltip>`;\n }\n return nothing;\n }\n}\n"],"names":["t","Directive","PartType","directive","property","LitElement","html","nothing","state","query"],"mappings":";;;;;;;;AACA;AACA;AACA;AACA;AACA,GAAQ,MAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAEA;;ACGjB,MAAM,eAAgB,SAAQC,CAAS,CAAA;AACrC,IAAA,WAAA,CAAY,QAAkB,EAAA;QAC5B,KAAK,CAAC,QAAQ,CAAC;QACf,IAAI,QAAQ,CAAC,IAAI,KAAKC,CAAQ,CAAC,OAAO,EAAE;AACtC,YAAA,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC;QAC1D;IACF;;AAGA,IAAA,MAAM,CAAC,MAA0C,EAAA;AAC/C,QAAA,OAAO,EAAE;IACX;AAEA,IAAA,MAAM,CAAC,IAAiB,EAAE,CAAC,KAAK,CAAuC,EAAA;AACrE,QAAA,IAAI,CAAC,KAAK;YAAE;;AAEZ,QAAA,KAAK,MAAM,GAAG,IAAI,KAAK,EAAE;AACvB,YAAA,MAAM,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC;YACxB,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,EAAE;AACzC,gBAAA,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,GAAG,CAAC;YACnC;iBAAO;gBACL,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,GAAG,EAAE,KAAK,CAAC;YACvC;QACF;IACF;AACD;MAEY,MAAM,GAAGC,CAAS,CAAC,eAAe;;AChB/C;;AAEG;AACH,MAAM,eAAe,GAAyG,CAAyC,UAAa,KAAI;;;IAGpL,MAAM,iBAAkB,SAAQ,UAAU,CAA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OD,CAAI,CAAA,CAAA,yBAAA,EAA4B,IAAI,CAAC,OAAO,eAAe;QACpE;AACA,QAAA,OAAOC,CAAO;IAChB;;AAtG0B,UAAA,CAAA,kBAAkB,GAAG,iBAAH;AAOA,UAAA,CAAA;IAA3CH,CAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE;AAA4B,CAAA,EAAA,UAAA,CAAA,SAAA,EAAA,UAAA,EAAA,MAAA,CAAA;AAE1B,UAAA,CAAA;IAA3CA,CAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE;AAA0B,CAAA,EAAA,UAAA,CAAA,SAAA,EAAA,QAAA,EAAA,MAAA,CAAA;AAExB,UAAA,CAAA;IAA3CA,CAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE;AAA4B,CAAA,EAAA,UAAA,CAAA,SAAA,EAAA,UAAA,EAAA,MAAA,CAAA;AAK1D,UAAA,CAAA;AAAX,IAAAA,CAAQ;AAAuB,CAAA,EAAA,UAAA,CAAA,SAAA,EAAA,eAAA,EAAA,MAAA,CAAA;AAEpB,UAAA,CAAA;AAAX,IAAAA,CAAQ;AAAoB,CAAA,EAAA,UAAA,CAAA,SAAA,EAAA,SAAA,EAAA,MAAA,CAAA;AAM7B,UAAA,CAAA;AADC,IAAAI,CAAK;AACY,CAAA,EAAA,UAAA,CAAA,SAAA,EAAA,WAAA,EAAA,MAAA,CAAA;AAES,UAAA,CAAA;IAA1BC,GAAK,CAAC,SAAS;AAA8C,CAAA,EAAA,UAAA,CAAA,SAAA,EAAA,eAAA,EAAA,MAAA,CAAA;;;;","x_google_ignoreList":[0]}
@@ -0,0 +1,27 @@
1
+ import { _ as __decorate, i } from './IndividualComponent-DUINtMGK.js';
2
+ import { n } from './property-1psGvXOq.js';
3
+
4
+ class BaseInput extends i {
5
+ constructor() {
6
+ super(...arguments);
7
+ this.disabled = false;
8
+ this.readonly = false;
9
+ this.required = false;
10
+ this.skeleton = false;
11
+ }
12
+ }
13
+ __decorate([
14
+ n({ type: Boolean, reflect: true })
15
+ ], BaseInput.prototype, "disabled", void 0);
16
+ __decorate([
17
+ n({ type: Boolean, reflect: true })
18
+ ], BaseInput.prototype, "readonly", void 0);
19
+ __decorate([
20
+ n({ type: Boolean, reflect: true })
21
+ ], BaseInput.prototype, "required", void 0);
22
+ __decorate([
23
+ n({ type: Boolean, reflect: true })
24
+ ], BaseInput.prototype, "skeleton", void 0);
25
+
26
+ export { BaseInput as B };
27
+ //# sourceMappingURL=BaseInput-14YmcfK7.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BaseInput-14YmcfK7.js","sources":["../../src/input/BaseInput.ts"],"sourcesContent":["import { LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\n\nexport default abstract class BaseInput extends LitElement {\n value?: any;\n\n @property({ type: Boolean, reflect: true })\n disabled: boolean = false;\n\n @property({ type: Boolean, reflect: true })\n readonly: boolean = false;\n\n @property({ type: Boolean, reflect: true })\n required: boolean = false;\n\n @property({ type: Boolean, reflect: true })\n skeleton = false;\n}\n"],"names":["LitElement","property"],"mappings":";;;AAGc,MAAgB,SAAU,SAAQA,CAAU,CAAA;AAA1D,IAAA,WAAA,GAAA;;QAIE,IAAA,CAAA,QAAQ,GAAY,KAAK;QAGzB,IAAA,CAAA,QAAQ,GAAY,KAAK;QAGzB,IAAA,CAAA,QAAQ,GAAY,KAAK;QAGzB,IAAA,CAAA,QAAQ,GAAG,KAAK;IAClB;AAAC;AAVC,UAAA,CAAA;IADCC,CAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE;AAChB,CAAA,EAAA,SAAA,CAAA,SAAA,EAAA,UAAA,EAAA,MAAA,CAAA;AAG1B,UAAA,CAAA;IADCA,CAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE;AAChB,CAAA,EAAA,SAAA,CAAA,SAAA,EAAA,UAAA,EAAA,MAAA,CAAA;AAG1B,UAAA,CAAA;IADCA,CAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE;AAChB,CAAA,EAAA,SAAA,CAAA,SAAA,EAAA,UAAA,EAAA,MAAA,CAAA;AAG1B,UAAA,CAAA;IADCA,CAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE;AACzB,CAAA,EAAA,SAAA,CAAA,SAAA,EAAA,UAAA,EAAA,MAAA,CAAA;;;;"}
package/dist/banner.js CHANGED
@@ -20,7 +20,7 @@ var css_248z = i`* {
20
20
  background: var(--banner-container-color);
21
21
  border-radius: var(--banner-border-radius);
22
22
  display: grid;
23
- gap: var(--spacing-200);
23
+ gap: var(--spacing-100);
24
24
  grid-template-columns: auto 1fr;
25
25
  padding: var(--spacing-200);
26
26
  }
@@ -30,8 +30,7 @@ var css_248z = i`* {
30
30
  color: var(--banner-icon-color);
31
31
  display: inline-flex;
32
32
  justify-content: center;
33
- min-width: 1.5rem;
34
- padding-top: 0.1rem;
33
+ --icon-size: 1.5rem;
35
34
  }
36
35
 
37
36
  .banner-content .banner-label {
@@ -1 +1 @@
1
- {"version":3,"file":"banner.js","sources":["../../src/banner/banner.ts"],"sourcesContent":["import { LitElement, html, nothing } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\n\nimport IndividualComponent from '@/IndividualComponent.js';\nimport styles from './banner.scss';\n\ntype BannerVariant = 'note' | 'info' | 'success' | 'warning' | 'error';\n\nconst VARIANT_LABELS: Record<BannerVariant, string> = {\n note: 'Note',\n info: 'Info',\n success: 'Success',\n warning: 'Warning',\n error: 'Error',\n};\n\nconst VARIANT_ICONS: Record<BannerVariant, string> = {\n note: 'star',\n info: 'info',\n success: 'check_circle',\n warning: 'warning',\n error: 'error',\n};\n\n/**\n * @label Banner\n * @tag wc-banner\n * @rawTag banner\n * @summary Banners show short, prominent contextual messages with optional icon and description.\n *\n * @cssprop --banner-container-color - Background color of the banner container.\n * @cssprop --banner-label-text-color - Label text color.\n * @cssprop --banner-description-text-color - Description text color.\n * @cssprop --banner-icon-color - Icon color.\n * @cssprop --banner-border-radius - Border radius of the banner surface.\n *\n * @example\n * ```html\n * <wc-banner variant=\"note\" description=\"Use semantic roles that preserve a 3:1 contrast ratio.\"></wc-banner>\n * ```\n * @tags display, feedback\n */\n@IndividualComponent\nexport class Banner extends LitElement {\n static styles = [styles];\n\n /**\n * Visual intent of the banner.\n */\n @property({ type: String, reflect: true })\n variant: BannerVariant = 'note';\n\n /**\n * Optional explicit label text. Falls back to a variant-based label.\n */\n @property({ type: String })\n label?: string;\n\n /**\n * Optional explicit icon name. Falls back to a variant-based icon.\n */\n @property({ type: String })\n icon?: string;\n\n /**\n * Optional description text when a default slot is not provided.\n */\n @property({ type: String })\n description = '';\n\n private get resolvedLabel() {\n return this.label || VARIANT_LABELS[this.variant];\n }\n\n private get resolvedIcon() {\n return this.icon || VARIANT_ICONS[this.variant];\n }\n\n render() {\n return html`\n <div class=${classMap({ 'banner': true, [this.variant]: true })} role=\"status\" aria-live=\"polite\">\n <div class=\"banner-icon\" aria-hidden=\"true\">\n <slot name=\"icon\">\n <wc-icon name=${this.resolvedIcon}></wc-icon>\n </slot>\n </div>\n\n <div class=${classMap({ 'banner-content': true, [this.variant]: true })}>\n <div class=\"banner-label\">\n <slot name=\"label\">${this.resolvedLabel}:</slot>\n </div>\n\n <div class=\"banner-description\">\n <slot>${this.description || nothing}</slot>\n </div>\n </div>\n </div>\n `;\n }\n}\n"],"names":["LitElement","html","classMap","nothing","styles","property"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,MAAM,cAAc,GAAkC;AACpD,IAAA,IAAI,EAAE,MAAM;AACZ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AAM,CAAC;AAMxB,UAAA,CAAA;IADCC,CAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE;AACT,CAAA,EAAA,MAAA,CAAA,SAAA,EAAA,SAAA,EAAA,MAAA,CAAA;AAMhC,UAAA,CAAA;AADC,IAAAA,CAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE;AACX,CAAA,EAAA,MAAA,CAAA,SAAA,EAAA,OAAA,EAAA,MAAA,CAAA;AAMf,UAAA,CAAA;AADC,IAAAA,CAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE;AACZ,CAAA,EAAA,MAAA,CAAA,SAAA,EAAA,MAAA,EAAA,MAAA,CAAA;AAMd,UAAA,CAAA;AADC,IAAAA,CAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE;AACT,CAAA,EAAA,MAAA,CAAA,SAAA,EAAA,aAAA,EAAA,MAAA,CAAA;AAzBN,MAAM,GAAA,UAAA,CAAA;IADlB;AACY,CAAA,EAAA,MAAM,CAwDlB;;;;"}
1
+ {"version":3,"file":"banner.js","sources":["../../src/banner/banner.ts"],"sourcesContent":["import { LitElement, html, nothing } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\n\nimport IndividualComponent from '@/IndividualComponent.js';\nimport styles from './banner.scss';\n\ntype BannerVariant = 'note' | 'info' | 'success' | 'warning' | 'error';\n\nconst VARIANT_LABELS: Record<BannerVariant, string> = {\n note: 'Note',\n info: 'Info',\n success: 'Success',\n warning: 'Warning',\n error: 'Error',\n};\n\nconst VARIANT_ICONS: Record<BannerVariant, string> = {\n note: 'star',\n info: 'info',\n success: 'check_circle',\n warning: 'warning',\n error: 'error',\n};\n\n/**\n * @label Banner\n * @tag wc-banner\n * @rawTag banner\n * @summary Banners show short, prominent contextual messages with optional icon and description.\n *\n * @cssprop --banner-container-color - Background color of the banner container.\n * @cssprop --banner-label-text-color - Label text color.\n * @cssprop --banner-description-text-color - Description text color.\n * @cssprop --banner-icon-color - Icon color.\n * @cssprop --banner-border-radius - Border radius of the banner surface.\n *\n * @example\n * ```html\n * <wc-banner variant=\"note\" description=\"Use semantic roles that preserve a 3:1 contrast ratio.\"></wc-banner>\n * ```\n * @tags display, feedback\n */\n@IndividualComponent\nexport class Banner extends LitElement {\n static styles = [styles];\n\n /**\n * Visual intent of the banner.\n */\n @property({ type: String, reflect: true })\n variant: BannerVariant = 'note';\n\n /**\n * Optional explicit label text. Falls back to a variant-based label.\n */\n @property({ type: String })\n label?: string;\n\n /**\n * Optional explicit icon name. Falls back to a variant-based icon.\n */\n @property({ type: String })\n icon?: string;\n\n /**\n * Optional description text when a default slot is not provided.\n */\n @property({ type: String })\n description = '';\n\n private get resolvedLabel() {\n return this.label || VARIANT_LABELS[this.variant];\n }\n\n private get resolvedIcon() {\n return this.icon || VARIANT_ICONS[this.variant];\n }\n\n render() {\n return html`\n <div class=${classMap({ 'banner': true, [this.variant]: true })} role=\"status\" aria-live=\"polite\">\n <div class=\"banner-icon\" aria-hidden=\"true\">\n <slot name=\"icon\">\n <wc-icon name=${this.resolvedIcon}></wc-icon>\n </slot>\n </div>\n\n <div class=${classMap({ 'banner-content': true, [this.variant]: true })}>\n <div class=\"banner-label\">\n <slot name=\"label\">${this.resolvedLabel}:</slot>\n </div>\n\n <div class=\"banner-description\">\n <slot>${this.description || nothing}</slot>\n </div>\n </div>\n </div>\n `;\n }\n}\n"],"names":["LitElement","html","classMap","nothing","styles","property"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,MAAM,cAAc,GAAkC;AACpD,IAAA,IAAI,EAAE,MAAM;AACZ,IAAA,IAAI,EAAE,MAAM;AACZ,IAAA,OAAO,EAAE,SAAS;AAClB,IAAA,OAAO,EAAE,SAAS;AAClB,IAAA,KAAK,EAAE,OAAO;CACf;AA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A,CAAA,SAAA,EAAA,SAAA,EAAA,MAAA,CAAA;AAMhC,UAAA,CAAA;AADC,IAAAA,CAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE;AACX,CAAA,EAAA,MAAA,CAAA,SAAA,EAAA,OAAA,EAAA,MAAA,CAAA;AAMf,UAAA,CAAA;AADC,IAAAA,CAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE;AACZ,CAAA,EAAA,MAAA,CAAA,SAAA,EAAA,MAAA,EAAA,MAAA,CAAA;AAMd,UAAA,CAAA;AADC,IAAAA,CAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE;AACT,CAAA,EAAA,MAAA,CAAA,SAAA,EAAA,aAAA,EAAA,MAAA,CAAA;AAzBN,MAAM,GAAA,UAAA,CAAA;IADlB;AACY,CAAA,EAAA,MAAM,CAwDlB;;;;"}
@@ -1,12 +1,6 @@
1
- import { a as i, _ as __decorate, I as IndividualComponent, b } from './IndividualComponent-DUINtMGK.js';
2
- import { n } from './property-1psGvXOq.js';
3
- import { r } from './state-DwbEjqVk.js';
4
- import { e } from './class-map-YU7g0o3B.js';
5
- import { B as BaseButton, o, s as spread } from './BaseButton-DuASuVth.js';
6
- import { o as observerSlotChangesWithCallback } from './observe-slot-change-BGJfgg2E.js';
7
- import { t as throttle } from './BaseHyperlinkMixin-BNuwbiEf.js';
1
+ import { a as i } from './IndividualComponent-DUINtMGK.js';
8
2
 
9
- var css_248z$2 = i`* {
3
+ var css_248z$1 = i`* {
10
4
  box-sizing: border-box;
11
5
  }
12
6
 
@@ -355,7 +349,7 @@ slot::slotted(*) {
355
349
  width: 100%;
356
350
  }`;
357
351
 
358
- var css_248z$1 = i`:host([color=primary]:not([toggle])) {
352
+ var css_248z = i`:host([color=primary]:not([toggle])) {
359
353
  --filled-button-container-color: var(--color-primary);
360
354
  --filled-button-label-text-color: var(--color-on-primary);
361
355
  --tonal-button-container-color: var(--color-primary-container);
@@ -563,288 +557,5 @@ var css_248z$1 = i`:host([color=primary]:not([toggle])) {
563
557
  --neo-button-label-text-color: var(--color-on-surface);
564
558
  }`;
565
559
 
566
- var css_248z = i`:host([size=xs]),
567
- :host([size=extra-small]) {
568
- --button-height: 2rem;
569
- }
570
-
571
- :host([size=xs]) .button,
572
- :host([size=extra-small]) .button {
573
- --_button-icon-size: 1rem;
574
- --_button_container-padding: 0.75rem;
575
- font-size: 0.875rem !important;
576
- font-weight: var(--font-weight-medium) !important;
577
- line-height: 1.25rem !important;
578
- letter-spacing: 0.1px !important;
579
- }
580
-
581
- :host([size=sm]),
582
- :host([size=small]) {
583
- --button-height: 2.5rem;
584
- }
585
-
586
- :host([size=sm]) .button,
587
- :host([size=small]) .button {
588
- --_button-icon-size: 1.25rem;
589
- --_button_container-padding: 1rem;
590
- --_button-icon-label-spacing: 0.5rem;
591
- font-size: 0.875rem !important;
592
- font-weight: var(--font-weight-medium) !important;
593
- line-height: 1.25rem !important;
594
- letter-spacing: 0.1px !important;
595
- }
596
-
597
- :host([size=md]),
598
- :host([size=medium]) {
599
- --button-height: 3.5rem;
600
- }
601
-
602
- :host([size=md]) .button,
603
- :host([size=medium]) .button {
604
- --_button-icon-size: 1.5rem;
605
- --_button_container-padding: 1.5rem;
606
- font-size: 1rem !important;
607
- font-weight: var(--font-weight-medium) !important;
608
- line-height: 1.5rem !important;
609
- letter-spacing: 0.15px !important;
610
- }
611
-
612
- :host([size=lg]),
613
- :host([size=large]) {
614
- --button-height: 6rem;
615
- }
616
-
617
- :host([size=lg]) .button,
618
- :host([size=large]) .button {
619
- --_button-icon-size: 2rem;
620
- --_button_container-padding: 3rem;
621
- font-size: 1.5rem !important;
622
- font-weight: var(--font-weight-regular) !important;
623
- line-height: 2rem !important;
624
- letter-spacing: 0 !important;
625
- }
626
-
627
- :host([size=xl]),
628
- :host([size=extra-large]) {
629
- --button-height: 8.5rem;
630
- }
631
-
632
- :host([size=xl]) .button,
633
- :host([size=extra-large]) .button {
634
- --_button-icon-size: 2.5rem;
635
- --_button_container-padding: 4rem;
636
- font-size: 2rem !important;
637
- font-weight: var(--font-weight-regular) !important;
638
- line-height: 2.5rem !important;
639
- letter-spacing: 0 !important;
640
- }`;
641
-
642
- /**
643
- * @label Button
644
- * @tag wc-button
645
- * @rawTag button
646
- *
647
- * @summary Buttons help people initiate actions, from sending an email, to sharing a document, to liking a post.
648
- * @overview
649
- * <p>Buttons are clickable elements that are used to trigger actions. They communicate calls to action to the user and allow users to interact with pages in a variety of ways. Button labels express what action will occur when the user interacts with it.</p>
650
- *
651
- * @cssprop --button-container-shape: Defines the border radius of the button container shape.
652
- *
653
- * @cssprop --button-container-shape-start-start: Defines the start position of the button container shape.
654
- * @cssprop --button-container-shape-start-end: Defines the end position of the button container shape.
655
- * @cssprop --button-container-shape-end-start: Defines the start position of the button container shape.
656
- * @cssprop --button-container-shape-end-end: Defines the end position of the button container shape.
657
- *
658
- *
659
- * @cssprop --filled-button-container-color: Color of the filled button container.
660
- * @cssprop --filled-button-label-text-color: Text color of the filled button label.
661
- *
662
- * @cssprop --outlined-button-container-color: Color of the outlined button container.
663
- * @cssprop --outlined-button-label-text-color: Text color of the outlined button label.
664
- *
665
- * @cssprop --text-button-label-text-color: Text color of the text button label.
666
- *
667
- * @cssprop --tonal-button-container-color: Color of the tonal button container.
668
- * @cssprop --tonal-button-label-text-color: Text color of the tonal button label.
669
- *
670
- * @cssprop --elevated-button-container-color: Color of the elevated button container.
671
- * @cssprop --elevated-button-label-text-color: Text color of the elevated button label.
672
- *
673
- * @cssprop --neo-button-container-color: Color of the neo button container.
674
- * @cssprop --neo-button-label-text-color: Text color of the neo button label.
675
- *
676
- * @fires {MouseEvent} click - Dispatched when the button is clicked.
677
- *
678
- * @example
679
- * ```html
680
- * <wc-button>Button</wc-button>
681
- * ```
682
- * @tags display
683
- */
684
- let Button = class Button extends BaseButton {
685
- constructor() {
686
- super(...arguments);
687
- /**
688
- * Icon alignment.
689
- * Possible values are `"start"`, `"end"`. Defaults to `"end"`.
690
- */
691
- this.iconAlign = 'end';
692
- /**
693
- * Button size.
694
- * Possible values are `"xs"`, `"sm"`, `"md"`, `"lg"`, `"xl"`. Defaults to `"sm"`.
695
- */
696
- this.size = 'sm';
697
- /**
698
- * The visual style of the button.
699
- *
700
- * Possible variant values:
701
- * `"filled"` is a filled button.
702
- * `"outlined"` is an outlined button.
703
- * `"text"` is a transparent button.
704
- * `"tonal"` is a light color button.
705
- * `"elevated"` is elevated button
706
- */
707
- this.variant = 'filled';
708
- /**
709
- * Defines the primary color of the button. This can be set to predefined color names to apply specific color themes.
710
- */
711
- this.color = 'primary';
712
- this.slotHasContent = false;
713
- }
714
- focus() {
715
- this.buttonElement?.focus();
716
- }
717
- blur() {
718
- this.buttonElement?.blur();
719
- }
720
- firstUpdated() {
721
- this.__dispatchClickWithThrottle = throttle(this.__dispatchClick, this.throttleDelay);
722
- observerSlotChangesWithCallback(this.renderRoot.querySelector('slot'), hasContent => {
723
- this.slotHasContent = hasContent;
724
- this.requestUpdate();
725
- });
726
- this.__convertTypeToVariantAndColor();
727
- }
728
- __convertTypeToVariantAndColor() {
729
- if (this.type === 'primary') {
730
- this.color = 'primary';
731
- this.variant = 'filled';
732
- }
733
- else if (this.type === 'secondary') {
734
- this.color = 'surface';
735
- this.variant = 'filled';
736
- }
737
- else if (this.type === 'tertiary') {
738
- this.color = 'primary';
739
- this.variant = 'text';
740
- }
741
- else if (this.type === 'danger') {
742
- this.color = 'danger';
743
- this.variant = 'filled';
744
- }
745
- }
746
- render() {
747
- const isLink = this.__isLink();
748
- const cssClasses = {
749
- button: true,
750
- 'button-element': true,
751
- [`size-${this.size}`]: true,
752
- [`variant-${this.variant}`]: true,
753
- [`color-${this.color}`]: true,
754
- disabled: this.disabled || this.softDisabled,
755
- pressed: this.isPressed,
756
- 'has-content': this.slotHasContent,
757
- 'show-skeleton': this.skeleton,
758
- [`icon-align-${this.iconAlign}`]: true,
759
- };
760
- if (!isLink) {
761
- return b `<button
762
- class=${e(cssClasses)}
763
- id="button"
764
- type=${this.htmlType}
765
- @click=${this.__dispatchClickWithThrottle}
766
- @mousedown=${this.__handlePress}
767
- @keydown=${this.__handlePress}
768
- @keyup=${this.__handlePress}
769
-
770
- aria-describedby=${o(this.softDisabled ? BaseButton.DISABLED_REASON_ID : undefined)}
771
- ?aria-disabled=${this.softDisabled}
772
-
773
- ?disabled=${this.disabled}
774
- ${spread(this.configAria)}
775
- >
776
- ${this.renderButtonContent()}
777
- </button>
778
- ${this.__renderTooltip()}`;
779
- }
780
- return b `<a
781
- class=${e(cssClasses)}
782
- id="button"
783
- href=${this.href}
784
- target=${this.target}
785
- tabindex=${this.disabled ? '-1' : '0'}
786
- @click=${this.__dispatchClick}
787
- @mousedown=${this.__handlePress}
788
- @keydown=${this.__handlePress}
789
- @keyup=${this.__handlePress}
790
- role="button"
791
-
792
- aria-describedby=${o(this.softDisabled ? BaseButton.DISABLED_REASON_ID : undefined)}
793
- ?aria-disabled=${this.softDisabled}
794
-
795
- ${spread(this.configAria)}
796
- >
797
- ${this.renderButtonContent()}
798
- </a>
799
- ${this.__renderTooltip()}`;
800
- }
801
- renderButtonContent() {
802
- return b `
803
- <wc-focus-ring class="focus-ring" for='button'></wc-focus-ring>
804
- <wc-elevation class="elevation"></wc-elevation>
805
- <div class="neo-background"></div>
806
- <div class="background"></div>
807
- <div class="outline"></div>
808
- <wc-ripple class="ripple"></wc-ripple>
809
- <wc-skeleton class="skeleton"></wc-skeleton>
810
-
811
- <div class="button-content">
812
- <div class="slot-container">
813
- <slot></slot>
814
- </div>
815
-
816
- <slot name="icon"></slot>
817
- </div>
818
-
819
- ${this.__renderDisabledReason(this.softDisabled)}
820
- `;
821
- }
822
- };
823
- Button.styles = [css_248z$2, css_248z$1, css_248z];
824
- __decorate([
825
- n({ attribute: 'icon-align' })
826
- ], Button.prototype, "iconAlign", void 0);
827
- __decorate([
828
- n({ reflect: true })
829
- ], Button.prototype, "size", void 0);
830
- __decorate([
831
- n({ type: String })
832
- ], Button.prototype, "type", void 0);
833
- __decorate([
834
- n()
835
- ], Button.prototype, "variant", void 0);
836
- __decorate([
837
- n({ reflect: true })
838
- ], Button.prototype, "color", void 0);
839
- __decorate([
840
- n({ reflect: true })
841
- ], Button.prototype, "configAria", void 0);
842
- __decorate([
843
- r()
844
- ], Button.prototype, "slotHasContent", void 0);
845
- Button = __decorate([
846
- IndividualComponent
847
- ], Button);
848
-
849
- export { Button as B, css_248z$1 as a, css_248z$2 as c };
850
- //# sourceMappingURL=button-DouvOfEU.js.map
560
+ export { css_248z as a, css_248z$1 as c };
561
+ //# sourceMappingURL=button-colors-Ccys3hvS.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button-colors-Ccys3hvS.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}