@nuralyui/button 0.0.12 → 0.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/{nr-button.component.d.ts → button.component.d.ts} +28 -2
  2. package/button.component.d.ts.map +1 -0
  3. package/button.component.js +240 -0
  4. package/button.component.js.map +1 -0
  5. package/{nr-button.style.d.ts → button.style.d.ts} +1 -1
  6. package/button.style.d.ts.map +1 -0
  7. package/{nr-button.style.js → button.style.js} +180 -2
  8. package/button.style.js.map +1 -0
  9. package/{nr-button.style.variables.d.ts → button.style.variables.d.ts} +1 -1
  10. package/button.style.variables.d.ts.map +1 -0
  11. package/{nr-button.style.variables.js → button.style.variables.js} +1 -1
  12. package/button.style.variables.js.map +1 -0
  13. package/{nr-button.types.d.ts → button.types.d.ts} +9 -2
  14. package/button.types.d.ts.map +1 -0
  15. package/button.types.js +2 -0
  16. package/button.types.js.map +1 -0
  17. package/demo/{nr-buttons-demo.d.ts → buttons-demo.d.ts} +2 -2
  18. package/demo/buttons-demo.d.ts.map +1 -0
  19. package/demo/{nr-buttons-demo.js → buttons-demo.js} +64 -2
  20. package/demo/buttons-demo.js.map +1 -0
  21. package/index.d.ts +1 -1
  22. package/index.d.ts.map +1 -1
  23. package/index.js +1 -1
  24. package/index.js.map +1 -1
  25. package/package.json +1 -1
  26. package/react.d.ts +1 -1
  27. package/react.d.ts.map +1 -1
  28. package/react.js +1 -1
  29. package/react.js.map +1 -1
  30. package/test/nr-button_test.d.ts +1 -1
  31. package/test/nr-button_test.d.ts.map +1 -1
  32. package/test/nr-button_test.js +2 -2
  33. package/test/nr-button_test.js.map +1 -1
  34. package/demo/nr-buttons-demo.d.ts.map +0 -1
  35. package/demo/nr-buttons-demo.js.map +0 -1
  36. package/nr-button.component.d.ts.map +0 -1
  37. package/nr-button.component.js +0 -99
  38. package/nr-button.component.js.map +0 -1
  39. package/nr-button.style.d.ts.map +0 -1
  40. package/nr-button.style.js.map +0 -1
  41. package/nr-button.style.variables.d.ts.map +0 -1
  42. package/nr-button.style.variables.js.map +0 -1
  43. package/nr-button.types.d.ts.map +0 -1
  44. package/nr-button.types.js +0 -2
  45. package/nr-button.types.js.map +0 -1
@@ -4,16 +4,21 @@
4
4
  * SPDX-License-Identifier: MIT
5
5
  */
6
6
  import { LitElement } from 'lit';
7
- import { ButtonType, IconPosition } from './nr-button.types.js';
7
+ import { ButtonType, ButtonShape, IconPosition } from './button.types.js';
8
8
  declare const NrButtonElement_base: (new (...args: any[]) => import("../../shared/dependency-mixin.js").DependencyAware) & (new (...args: any[]) => import("../../shared/theme-mixin.js").ThemeAware) & typeof LitElement;
9
9
  export declare class NrButtonElement extends NrButtonElement_base {
10
10
  disabled: boolean;
11
11
  loading: boolean;
12
12
  size: string;
13
13
  type: ButtonType;
14
+ shape: ButtonShape;
15
+ block: boolean;
14
16
  dashed: boolean;
15
17
  icon: string[];
16
18
  iconPosition: IconPosition;
19
+ href: string;
20
+ target: string;
21
+ ripple: boolean;
17
22
  /**
18
23
  * Required components that must be registered for this component to work properly
19
24
  * Can be overridden by parent implementations
@@ -23,14 +28,35 @@ export declare class NrButtonElement extends NrButtonElement_base {
23
28
  * Check for required dependencies when component is connected to DOM
24
29
  */
25
30
  connectedCallback(): void;
31
+ /**
32
+ * Get the appropriate element tag based on button type
33
+ */
34
+ private getElementTag;
35
+ /**
36
+ * Get attributes for accessibility and functionality
37
+ */
38
+ private getElementAttributes;
39
+ buttonAriaLabel: string;
40
+ ariaDescribedBy: string;
41
+ htmlType: string;
26
42
  /**
27
43
  * Renders an icon if the hy-icon component is available
28
44
  * @param iconName - The name of the icon to render
29
45
  * @returns TemplateResult or nothing
30
46
  */
31
47
  private renderIcon;
48
+ /**
49
+ * Creates ripple effect on button click
50
+ * @param event - The click event
51
+ */
52
+ private createRipple;
53
+ /**
54
+ * Handle click events with ripple effect
55
+ * @param event - The click event
56
+ */
57
+ private handleClick;
32
58
  render(): import("lit").TemplateResult<1>;
33
59
  static styles: import("lit").CSSResult[];
34
60
  }
35
61
  export {};
36
- //# sourceMappingURL=nr-button.component.d.ts.map
62
+ //# sourceMappingURL=button.component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button.component.d.ts","sourceRoot":"","sources":["../../../src/components/button/button.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAQ,UAAU,EAAW,MAAM,KAAK,CAAC;AAEhD,OAAO,EAAE,UAAU,EAAE,WAAW,EAAgB,YAAY,EAAE,MAAM,mBAAmB,CAAC;;AAIxF,qBACa,eAAgB,SAAQ,oBAA6B;IAEhE,QAAQ,UAAS;IAGjB,OAAO,UAAS;IAGhB,IAAI,SAAgB;IAGpB,IAAI,EAAE,UAAU,CAAsB;IAGtC,KAAK,EAAE,WAAW,CAAuB;IAGzC,KAAK,UAAS;IAGd,MAAM,UAAS;IAGf,IAAI,EAAE,MAAM,EAAE,CAAM;IAGpB,YAAY,eAAqB;IAGjC,IAAI,SAAgB;IAGpB,MAAM,SAAgB;IAGtB,MAAM,UAAQ;IAEd;;;OAGG;IACM,kBAAkB,WAAe;IAE1C;;OAEG;IACM,iBAAiB;IAK1B;;OAEG;IACH,OAAO,CAAC,aAAa;IAIrB;;OAEG;IACH,OAAO,CAAC,oBAAoB;IAoC5B,eAAe,SAAgB;IAG/B,eAAe,SAAgB;IAG/B,QAAQ,SAAgB;IAExB;;;;OAIG;IACH,OAAO,CAAC,UAAU;IAWlB;;;OAGG;IACH,OAAO,CAAC,YAAY;IA2BpB;;;OAGG;IACH,OAAO,CAAC,WAAW;IAIV,MAAM;IAwDf,OAAgB,MAAM,4BAAU;CACjC"}
@@ -0,0 +1,240 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2023 Nuraly, Laabidi Aymen
4
+ * SPDX-License-Identifier: MIT
5
+ */
6
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
7
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
8
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
9
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
10
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
11
+ };
12
+ import { html, LitElement, nothing } from 'lit';
13
+ import { customElement, property } from 'lit/decorators.js';
14
+ import { EMPTY_STRING } from './button.types.js';
15
+ import { styles } from './button.style.js';
16
+ import { NuralyUIBaseMixin } from '../../shared/base-mixin.js';
17
+ let NrButtonElement = class NrButtonElement extends NuralyUIBaseMixin(LitElement) {
18
+ constructor() {
19
+ super(...arguments);
20
+ this.disabled = false;
21
+ this.loading = false;
22
+ this.size = EMPTY_STRING;
23
+ this.type = "default" /* ButtonType.Default */;
24
+ this.shape = "default" /* ButtonShape.Default */;
25
+ this.block = false;
26
+ this.dashed = false;
27
+ this.icon = [];
28
+ this.iconPosition = "left" /* IconPosition.Left */;
29
+ this.href = EMPTY_STRING;
30
+ this.target = EMPTY_STRING;
31
+ this.ripple = true;
32
+ /**
33
+ * Required components that must be registered for this component to work properly
34
+ * Can be overridden by parent implementations
35
+ */
36
+ this.requiredComponents = ['hy-icon'];
37
+ this.buttonAriaLabel = EMPTY_STRING;
38
+ this.ariaDescribedBy = EMPTY_STRING;
39
+ this.htmlType = EMPTY_STRING;
40
+ }
41
+ /**
42
+ * Check for required dependencies when component is connected to DOM
43
+ */
44
+ connectedCallback() {
45
+ super.connectedCallback();
46
+ this.validateDependencies();
47
+ }
48
+ /**
49
+ * Get the appropriate element tag based on button type
50
+ */
51
+ getElementTag() {
52
+ return this.type === "link" /* ButtonType.Link */ && this.href ? 'a' : 'button';
53
+ }
54
+ /**
55
+ * Get attributes for accessibility and functionality
56
+ */
57
+ getElementAttributes() {
58
+ const attributes = {
59
+ '?disabled': this.disabled && this.type !== "link" /* ButtonType.Link */,
60
+ 'data-type': this.type,
61
+ 'data-shape': this.shape,
62
+ 'data-size': this.size ? this.size : nothing,
63
+ 'data-state': this.loading ? 'loading' : nothing,
64
+ 'data-theme': this.currentTheme,
65
+ 'data-block': this.block ? 'true' : nothing,
66
+ 'class': this.dashed ? 'button-dashed' : '',
67
+ 'role': this.type === "link" /* ButtonType.Link */ ? 'link' : 'button',
68
+ 'aria-disabled': this.disabled ? 'true' : 'false',
69
+ 'aria-label': this.buttonAriaLabel || nothing,
70
+ 'aria-describedby': this.ariaDescribedBy || nothing,
71
+ };
72
+ // Add link-specific attributes
73
+ if (this.type === "link" /* ButtonType.Link */ && this.href) {
74
+ attributes.href = this.href;
75
+ if (this.target) {
76
+ attributes.target = this.target;
77
+ }
78
+ if (this.target === '_blank') {
79
+ attributes.rel = 'noopener noreferrer';
80
+ }
81
+ }
82
+ // Add button-specific attributes
83
+ if (this.type !== "link" /* ButtonType.Link */) {
84
+ attributes.type = this.htmlType || 'button';
85
+ }
86
+ return attributes;
87
+ }
88
+ /**
89
+ * Renders an icon if the hy-icon component is available
90
+ * @param iconName - The name of the icon to render
91
+ * @returns TemplateResult or nothing
92
+ */
93
+ renderIcon(iconName) {
94
+ if (!this.isComponentAvailable('hy-icon')) {
95
+ console.warn(`hy-icon component not found. Icon "${iconName}" will not be displayed. ` +
96
+ `Please import hy-icon component.`);
97
+ return nothing;
98
+ }
99
+ return html `<hy-icon name=${iconName}></hy-icon>`;
100
+ }
101
+ /**
102
+ * Creates ripple effect on button click
103
+ * @param event - The click event
104
+ */
105
+ createRipple(event) {
106
+ if (!this.ripple || this.disabled)
107
+ return;
108
+ const button = event.currentTarget;
109
+ const rect = button.getBoundingClientRect();
110
+ const size = Math.max(rect.width, rect.height);
111
+ const x = event.clientX - rect.left - size / 2;
112
+ const y = event.clientY - rect.top - size / 2;
113
+ const ripple = document.createElement('span');
114
+ ripple.className = 'ripple';
115
+ ripple.style.width = ripple.style.height = size + 'px';
116
+ ripple.style.left = x + 'px';
117
+ ripple.style.top = y + 'px';
118
+ // Remove any existing ripples
119
+ const existingRipples = button.querySelectorAll('.ripple');
120
+ existingRipples.forEach(r => r.remove());
121
+ button.appendChild(ripple);
122
+ // Remove ripple after animation
123
+ setTimeout(() => {
124
+ ripple.remove();
125
+ }, 600);
126
+ }
127
+ /**
128
+ * Handle click events with ripple effect
129
+ * @param event - The click event
130
+ */
131
+ handleClick(event) {
132
+ this.createRipple(event);
133
+ }
134
+ render() {
135
+ var _a, _b, _c, _d;
136
+ const elementTag = this.getElementTag();
137
+ const attributes = this.getElementAttributes();
138
+ if (elementTag === 'a') {
139
+ return html `
140
+ <a
141
+ href="${attributes.href}"
142
+ target="${attributes.target || nothing}"
143
+ rel="${attributes.rel || nothing}"
144
+ data-type="${attributes['data-type']}"
145
+ data-shape="${attributes['data-shape']}"
146
+ data-size="${attributes['data-size']}"
147
+ data-state="${attributes['data-state']}"
148
+ data-theme="${attributes['data-theme']}"
149
+ data-block="${attributes['data-block']}"
150
+ class="${attributes.class}"
151
+ role="${attributes.role}"
152
+ aria-disabled="${attributes['aria-disabled']}"
153
+ aria-label="${attributes['aria-label']}"
154
+ aria-describedby="${attributes['aria-describedby']}"
155
+ >
156
+ <span id="container">
157
+ ${((_a = this.icon) === null || _a === void 0 ? void 0 : _a.length) ? this.renderIcon(this.icon[0]) : nothing}
158
+ <slot id="slot"></slot>
159
+ ${((_b = this.icon) === null || _b === void 0 ? void 0 : _b.length) == 2 ? this.renderIcon(this.icon[1]) : nothing}
160
+ </span>
161
+ </a>
162
+ `;
163
+ }
164
+ return html `
165
+ <button
166
+ ?disabled="${attributes['?disabled']}"
167
+ type="${attributes.type || nothing}"
168
+ data-type="${attributes['data-type']}"
169
+ data-shape="${attributes['data-shape']}"
170
+ data-size="${attributes['data-size']}"
171
+ data-state="${attributes['data-state']}"
172
+ data-theme="${attributes['data-theme']}"
173
+ data-block="${attributes['data-block']}"
174
+ class="${attributes.class}"
175
+ role="${attributes.role}"
176
+ aria-disabled="${attributes['aria-disabled']}"
177
+ aria-label="${attributes['aria-label']}"
178
+ aria-describedby="${attributes['aria-describedby']}"
179
+ @click="${this.handleClick}"
180
+ >
181
+ <span id="container">
182
+ ${((_c = this.icon) === null || _c === void 0 ? void 0 : _c.length) ? this.renderIcon(this.icon[0]) : nothing}
183
+ <slot id="slot"></slot>
184
+ ${((_d = this.icon) === null || _d === void 0 ? void 0 : _d.length) == 2 ? this.renderIcon(this.icon[1]) : nothing}
185
+ </span>
186
+ </button>
187
+ `;
188
+ }
189
+ };
190
+ NrButtonElement.styles = styles;
191
+ __decorate([
192
+ property({ type: Boolean })
193
+ ], NrButtonElement.prototype, "disabled", void 0);
194
+ __decorate([
195
+ property({ type: Boolean })
196
+ ], NrButtonElement.prototype, "loading", void 0);
197
+ __decorate([
198
+ property({ type: String })
199
+ ], NrButtonElement.prototype, "size", void 0);
200
+ __decorate([
201
+ property({ type: String })
202
+ ], NrButtonElement.prototype, "type", void 0);
203
+ __decorate([
204
+ property({ type: String })
205
+ ], NrButtonElement.prototype, "shape", void 0);
206
+ __decorate([
207
+ property({ type: Boolean })
208
+ ], NrButtonElement.prototype, "block", void 0);
209
+ __decorate([
210
+ property({ type: Boolean })
211
+ ], NrButtonElement.prototype, "dashed", void 0);
212
+ __decorate([
213
+ property({ type: Array })
214
+ ], NrButtonElement.prototype, "icon", void 0);
215
+ __decorate([
216
+ property({ reflect: true })
217
+ ], NrButtonElement.prototype, "iconPosition", void 0);
218
+ __decorate([
219
+ property({ type: String })
220
+ ], NrButtonElement.prototype, "href", void 0);
221
+ __decorate([
222
+ property({ type: String })
223
+ ], NrButtonElement.prototype, "target", void 0);
224
+ __decorate([
225
+ property({ type: Boolean })
226
+ ], NrButtonElement.prototype, "ripple", void 0);
227
+ __decorate([
228
+ property({ type: String })
229
+ ], NrButtonElement.prototype, "buttonAriaLabel", void 0);
230
+ __decorate([
231
+ property({ type: String })
232
+ ], NrButtonElement.prototype, "ariaDescribedBy", void 0);
233
+ __decorate([
234
+ property({ type: String })
235
+ ], NrButtonElement.prototype, "htmlType", void 0);
236
+ NrButtonElement = __decorate([
237
+ customElement('nr-button')
238
+ ], NrButtonElement);
239
+ export { NrButtonElement };
240
+ //# sourceMappingURL=button.component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button.component.js","sourceRoot":"","sources":["../../../src/components/button/button.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;;;;;;AAEH,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAA2B,YAAY,EAAgB,MAAM,mBAAmB,CAAC;AACxF,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAG/D,IAAa,eAAe,GAA5B,MAAa,eAAgB,SAAQ,iBAAiB,CAAC,UAAU,CAAC;IAAlE;;QAEE,aAAQ,GAAG,KAAK,CAAC;QAGjB,YAAO,GAAG,KAAK,CAAC;QAGhB,SAAI,GAAG,YAAY,CAAC;QAGpB,SAAI,sCAAkC;QAGtC,UAAK,uCAAoC;QAGzC,UAAK,GAAG,KAAK,CAAC;QAGd,WAAM,GAAG,KAAK,CAAC;QAGf,SAAI,GAAa,EAAE,CAAC;QAGpB,iBAAY,kCAAqB;QAGjC,SAAI,GAAG,YAAY,CAAC;QAGpB,WAAM,GAAG,YAAY,CAAC;QAGtB,WAAM,GAAG,IAAI,CAAC;QAEd;;;WAGG;QACM,uBAAkB,GAAG,CAAC,SAAS,CAAC,CAAC;QAwD1C,oBAAe,GAAG,YAAY,CAAC;QAG/B,oBAAe,GAAG,YAAY,CAAC;QAG/B,aAAQ,GAAG,YAAY,CAAC;IAkH1B,CAAC;IA9KC;;OAEG;IACM,iBAAiB;QACxB,KAAK,CAAC,iBAAiB,EAAE,CAAC;QAC1B,IAAI,CAAC,o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MIT\n */\n\nimport { html, LitElement, nothing } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { ButtonType, ButtonShape, EMPTY_STRING, IconPosition } from './button.types.js';\nimport { styles } from './button.style.js';\nimport { NuralyUIBaseMixin } from '../../shared/base-mixin.js';\n\n@customElement('nr-button')\nexport class NrButtonElement extends NuralyUIBaseMixin(LitElement) {\n @property({type: Boolean})\n disabled = false;\n\n @property({type: Boolean})\n loading = false;\n\n @property({type: String})\n size = EMPTY_STRING;\n\n @property({type: String})\n type: ButtonType = ButtonType.Default;\n\n @property({type: String})\n shape: ButtonShape = ButtonShape.Default;\n\n @property({type: Boolean})\n block = false;\n\n @property({type: Boolean})\n dashed = false;\n\n @property({type: Array})\n icon: string[] = [];\n\n @property({reflect: true})\n iconPosition = IconPosition.Left;\n\n @property({type: String})\n href = EMPTY_STRING;\n\n @property({type: String})\n target = EMPTY_STRING;\n\n @property({type: Boolean})\n ripple = true;\n\n /**\n * Required components that must be registered for this component to work properly\n * Can be overridden by parent implementations\n */\n override requiredComponents = ['hy-icon'];\n\n /**\n * Check for required dependencies when component is connected to DOM\n */\n override connectedCallback() {\n super.connectedCallback();\n this.validateDependencies();\n }\n\n /**\n * Get the appropriate element tag based on button type\n */\n private getElementTag() {\n return this.type === ButtonType.Link && this.href ? 'a' : 'button';\n }\n\n /**\n * Get attributes for accessibility and functionality\n */\n private getElementAttributes() {\n const attributes: any = {\n '?disabled': this.disabled && this.type !== ButtonType.Link,\n 'data-type': this.type,\n 'data-shape': this.shape,\n 'data-size': this.size ? this.size : nothing,\n 'data-state': this.loading ? 'loading' : nothing,\n 'data-theme': this.currentTheme,\n 'data-block': this.block ? 'true' : nothing,\n 'class': this.dashed ? 'button-dashed' : '',\n 'role': this.type === ButtonType.Link ? 'link' : 'button',\n 'aria-disabled': this.disabled ? 'true' : 'false',\n 'aria-label': this.buttonAriaLabel || nothing,\n 'aria-describedby': this.ariaDescribedBy || nothing,\n };\n\n // Add link-specific attributes\n if (this.type === ButtonType.Link && this.href) {\n attributes.href = this.href;\n if (this.target) {\n attributes.target = this.target;\n }\n if (this.target === '_blank') {\n attributes.rel = 'noopener noreferrer';\n }\n }\n\n // Add button-specific attributes\n if (this.type !== ButtonType.Link) {\n attributes.type = this.htmlType || 'button';\n }\n\n return attributes;\n }\n\n @property({type: String})\n buttonAriaLabel = EMPTY_STRING;\n\n @property({type: String})\n ariaDescribedBy = EMPTY_STRING;\n\n @property({type: String})\n htmlType = EMPTY_STRING;\n\n /**\n * Renders an icon if the hy-icon component is available\n * @param iconName - The name of the icon to render\n * @returns TemplateResult or nothing\n */\n private renderIcon(iconName: string) {\n if (!this.isComponentAvailable('hy-icon')) {\n console.warn(\n `hy-icon component not found. Icon \"${iconName}\" will not be displayed. ` +\n `Please import hy-icon component.`\n );\n return nothing;\n }\n return html`<hy-icon name=${iconName}></hy-icon>`;\n }\n\n /**\n * Creates ripple effect on button click\n * @param event - The click event\n */\n private createRipple(event: MouseEvent) {\n if (!this.ripple || this.disabled) return;\n\n const button = event.currentTarget as HTMLElement;\n const rect = button.getBoundingClientRect();\n const size = Math.max(rect.width, rect.height);\n const x = event.clientX - rect.left - size / 2;\n const y = event.clientY - rect.top - size / 2;\n\n const ripple = document.createElement('span');\n ripple.className = 'ripple';\n ripple.style.width = ripple.style.height = size + 'px';\n ripple.style.left = x + 'px';\n ripple.style.top = y + 'px';\n\n // Remove any existing ripples\n const existingRipples = button.querySelectorAll('.ripple');\n existingRipples.forEach(r => r.remove());\n\n button.appendChild(ripple);\n\n // Remove ripple after animation\n setTimeout(() => {\n ripple.remove();\n }, 600);\n }\n\n /**\n * Handle click events with ripple effect\n * @param event - The click event\n */\n private handleClick(event: MouseEvent) {\n this.createRipple(event);\n }\n\n override render() {\n const elementTag = this.getElementTag();\n const attributes = this.getElementAttributes();\n \n if (elementTag === 'a') {\n return html`\n <a\n href=\"${attributes.href}\"\n target=\"${attributes.target || nothing}\"\n rel=\"${attributes.rel || nothing}\"\n data-type=\"${attributes['data-type']}\"\n data-shape=\"${attributes['data-shape']}\"\n data-size=\"${attributes['data-size']}\"\n data-state=\"${attributes['data-state']}\"\n data-theme=\"${attributes['data-theme']}\"\n data-block=\"${attributes['data-block']}\"\n class=\"${attributes.class}\"\n role=\"${attributes.role}\"\n aria-disabled=\"${attributes['aria-disabled']}\"\n aria-label=\"${attributes['aria-label']}\"\n aria-describedby=\"${attributes['aria-describedby']}\"\n >\n <span id=\"container\">\n ${this.icon?.length ? this.renderIcon(this.icon[0]) : nothing}\n <slot id=\"slot\"></slot>\n ${this.icon?.length == 2 ? this.renderIcon(this.icon[1]) : nothing}\n </span>\n </a>\n `;\n }\n \n return html`\n <button\n ?disabled=\"${attributes['?disabled']}\"\n type=\"${attributes.type || nothing}\"\n data-type=\"${attributes['data-type']}\"\n data-shape=\"${attributes['data-shape']}\"\n data-size=\"${attributes['data-size']}\"\n data-state=\"${attributes['data-state']}\"\n data-theme=\"${attributes['data-theme']}\"\n data-block=\"${attributes['data-block']}\"\n class=\"${attributes.class}\"\n role=\"${attributes.role}\"\n aria-disabled=\"${attributes['aria-disabled']}\"\n aria-label=\"${attributes['aria-label']}\"\n aria-describedby=\"${attributes['aria-describedby']}\"\n @click=\"${this.handleClick}\"\n >\n <span id=\"container\">\n ${this.icon?.length ? this.renderIcon(this.icon[0]) : nothing}\n <slot id=\"slot\"></slot>\n ${this.icon?.length == 2 ? this.renderIcon(this.icon[1]) : nothing}\n </span>\n </button>\n `;\n }\n static override styles = styles;\n}\n"]}
@@ -16,4 +16,4 @@
16
16
  * ```
17
17
  */
18
18
  export declare const styles: import("lit").CSSResult[];
19
- //# sourceMappingURL=nr-button.style.d.ts.map
19
+ //# sourceMappingURL=button.style.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button.style.d.ts","sourceRoot":"","sources":["../../../src/components/button/button.style.ts"],"names":[],"mappings":"AA4mBA;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,MAAM,2BAAkC,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { css } from 'lit';
2
- import { buttonVariables } from './nr-button.style.variables.js';
2
+ import { buttonVariables } from './button.style.variables.js';
3
3
  /**
4
4
  * Button component styles for the Hybrid UI Library
5
5
  *
@@ -82,6 +82,10 @@ const buttonStyles = css `
82
82
  padding-right: var(--hybrid-button-padding-x,var(--hybrid-button-local-padding-x));
83
83
  padding-left: var(--hybrid-button-padding-x,var(--hybrid-button-local-padding-x));
84
84
  font-size: var(--hybrid-button-font-size,var(--hybrid-button-local-font-size));
85
+
86
+ /* Positioning for ripple effect */
87
+ position: relative;
88
+ overflow: hidden;
85
89
  }
86
90
 
87
91
  /* Icon styling within button - inherits text color and size */
@@ -359,6 +363,113 @@ const buttonStyles = css `
359
363
  border-style: dashed;
360
364
  }
361
365
 
366
+ /* ========================================
367
+ * NEW BUTTON TYPES
368
+ * ======================================== */
369
+
370
+ /* TEXT BUTTON VARIANT */
371
+ button[data-type='text'] {
372
+ background-color: var(--hybrid-button-text-background-color, var(--hybrid-button-local-text-background-color, transparent));
373
+ color: var(--hybrid-button-text-text-color, var(--hybrid-button-local-text-text-color, #1890ff));
374
+ border: none;
375
+ box-shadow: none;
376
+ }
377
+
378
+ button[data-type='text'] hy-icon {
379
+ --hybrid-icon-color: var(--hybrid-button-text-text-color, var(--hybrid-button-local-text-text-color, #1890ff));
380
+ }
381
+
382
+ button[data-type='text']:hover:not(:disabled) {
383
+ background-color: var(--hybrid-button-text-hover-background-color, var(--hybrid-button-local-text-hover-background-color, rgba(24, 144, 255, 0.06)));
384
+ color: var(--hybrid-button-text-hover-text-color, var(--hybrid-button-local-text-hover-text-color, #40a9ff));
385
+ }
386
+
387
+ button[data-type='text']:hover:not(:disabled) hy-icon {
388
+ --hybrid-icon-color: var(--hybrid-button-text-hover-text-color, var(--hybrid-button-local-text-hover-text-color, #40a9ff));
389
+ }
390
+
391
+ button[data-type='text']:active:not(:disabled) {
392
+ background-color: var(--hybrid-button-text-active-background-color, var(--hybrid-button-local-text-active-background-color, rgba(24, 144, 255, 0.15)));
393
+ color: var(--hybrid-button-text-active-text-color, var(--hybrid-button-local-text-active-text-color, #096dd9));
394
+ }
395
+
396
+ button[data-type='text']:disabled {
397
+ background-color: transparent;
398
+ color: var(--hybrid-button-text-disabled-text-color, var(--hybrid-button-local-text-disabled-text-color, rgba(0, 0, 0, 0.25)));
399
+ border: none;
400
+ }
401
+
402
+ /* LINK BUTTON VARIANT */
403
+ a[data-type='link'], button[data-type='link'] {
404
+ background-color: transparent;
405
+ color: var(--hybrid-button-link-text-color, var(--hybrid-button-local-link-text-color, #1890ff));
406
+ border: none;
407
+ box-shadow: none;
408
+ text-decoration: underline;
409
+ cursor: pointer;
410
+ }
411
+
412
+ a[data-type='link'] hy-icon, button[data-type='link'] hy-icon {
413
+ --hybrid-icon-color: var(--hybrid-button-link-text-color, var(--hybrid-button-local-link-text-color, #1890ff));
414
+ }
415
+
416
+ a[data-type='link']:hover, button[data-type='link']:hover:not(:disabled) {
417
+ color: var(--hybrid-button-link-hover-text-color, var(--hybrid-button-local-link-hover-text-color, #40a9ff));
418
+ }
419
+
420
+ a[data-type='link']:hover hy-icon, button[data-type='link']:hover:not(:disabled) hy-icon {
421
+ --hybrid-icon-color: var(--hybrid-button-link-hover-text-color, var(--hybrid-button-local-link-hover-text-color, #40a9ff));
422
+ }
423
+
424
+ a[data-type='link']:active, button[data-type='link']:active:not(:disabled) {
425
+ color: var(--hybrid-button-link-active-text-color, var(--hybrid-button-local-link-active-text-color, #096dd9));
426
+ }
427
+
428
+ button[data-type='link']:disabled {
429
+ color: var(--hybrid-button-link-disabled-text-color, var(--hybrid-button-local-link-disabled-text-color, rgba(0, 0, 0, 0.25)));
430
+ text-decoration: none;
431
+ cursor: not-allowed;
432
+ }
433
+
434
+ /* ========================================
435
+ * SHAPE VARIANTS
436
+ * ======================================== */
437
+
438
+ /* Circle button shape */
439
+ button[data-shape='circle'], a[data-shape='circle'] {
440
+ border-radius: 50%;
441
+ width: var(--hybrid-button-circle-size, var(--hybrid-button-local-circle-size, 32px));
442
+ height: var(--hybrid-button-circle-size, var(--hybrid-button-local-circle-size, 32px));
443
+ padding: 0;
444
+ display: inline-flex;
445
+ align-items: center;
446
+ justify-content: center;
447
+ }
448
+
449
+ button[data-shape='circle'][data-size='small'], a[data-shape='circle'][data-size='small'] {
450
+ width: var(--hybrid-button-circle-size-small, var(--hybrid-button-local-circle-size-small, 24px));
451
+ height: var(--hybrid-button-circle-size-small, var(--hybrid-button-local-circle-size-small, 24px));
452
+ }
453
+
454
+ button[data-shape='circle'][data-size='large'], a[data-shape='circle'][data-size='large'] {
455
+ width: var(--hybrid-button-circle-size-large, var(--hybrid-button-local-circle-size-large, 40px));
456
+ height: var(--hybrid-button-circle-size-large, var(--hybrid-button-local-circle-size-large, 40px));
457
+ }
458
+
459
+ /* Round button shape */
460
+ button[data-shape='round'], a[data-shape='round'] {
461
+ border-radius: var(--hybrid-button-round-border-radius, var(--hybrid-button-local-round-border-radius, 16px));
462
+ }
463
+
464
+ /* ========================================
465
+ * BLOCK BUTTON
466
+ * ======================================== */
467
+
468
+ button[data-block='true'], a[data-block='true'] {
469
+ width: 100%;
470
+ display: block;
471
+ }
472
+
362
473
  /* ========================================
363
474
  * VARIANT STYLES
364
475
  * ======================================== */
@@ -436,6 +547,73 @@ const buttonStyles = css `
436
547
  --hybrid-button-local-danger-disabled-text-color: #8d8d8d;
437
548
  --hybrid-button-local-danger-disabled-border-color: #6f6f6f;
438
549
  --hybrid-button-local-danger-dashed-border-color: #ffffff;
550
+
551
+ /* Text button dark theme overrides */
552
+ --hybrid-button-local-text-background-color: transparent;
553
+ --hybrid-button-local-text-text-color: #ffffff;
554
+ --hybrid-button-local-text-border-color: transparent;
555
+ --hybrid-button-local-text-hover-background-color: rgba(255, 255, 255, 0.1);
556
+ --hybrid-button-local-text-hover-text-color: #ffffff;
557
+ --hybrid-button-local-text-hover-border-color: transparent;
558
+ --hybrid-button-local-text-active-background-color: rgba(255, 255, 255, 0.15);
559
+ --hybrid-button-local-text-active-text-color: #ffffff;
560
+ --hybrid-button-local-text-active-border-color: transparent;
561
+ --hybrid-button-local-text-disabled-background-color: transparent;
562
+ --hybrid-button-local-text-disabled-text-color: #6f6f6f;
563
+ --hybrid-button-local-text-disabled-border-color: transparent;
564
+
565
+ /* Link button dark theme overrides */
566
+ --hybrid-button-local-link-background-color: transparent;
567
+ --hybrid-button-local-link-text-color: #78a9ff;
568
+ --hybrid-button-local-link-border-color: transparent;
569
+ --hybrid-button-local-link-hover-background-color: transparent;
570
+ --hybrid-button-local-link-hover-text-color: #a6c8ff;
571
+ --hybrid-button-local-link-hover-border-color: transparent;
572
+ --hybrid-button-local-link-active-background-color: transparent;
573
+ --hybrid-button-local-link-active-text-color: #a6c8ff;
574
+ --hybrid-button-local-link-active-border-color: transparent;
575
+ --hybrid-button-local-link-disabled-background-color: transparent;
576
+ --hybrid-button-local-link-disabled-text-color: #6f6f6f;
577
+ --hybrid-button-local-link-disabled-border-color: transparent;
578
+ }
579
+
580
+ /* ========================================
581
+ * RIPPLE EFFECT STYLES
582
+ * ======================================== */
583
+
584
+ /* Ripple effect animation */
585
+ .ripple {
586
+ position: absolute;
587
+ border-radius: 50%;
588
+ background-color: rgba(255, 255, 255, 0.4);
589
+ transform: scale(0);
590
+ animation: ripple-animation 0.6s linear;
591
+ pointer-events: none;
592
+ }
593
+
594
+ /* Darker ripple for light buttons */
595
+ button[data-type='default'] .ripple,
596
+ button[data-type='ghost'] .ripple {
597
+ background-color: rgba(0, 0, 0, 0.1);
598
+ }
599
+
600
+ /* Lighter ripple for dark buttons */
601
+ button[data-type='primary'] .ripple,
602
+ button[data-type='danger'] .ripple {
603
+ background-color: rgba(255, 255, 255, 0.3);
604
+ }
605
+
606
+ /* Ripple animation keyframes */
607
+ @keyframes ripple-animation {
608
+ to {
609
+ transform: scale(4);
610
+ opacity: 0;
611
+ }
612
+ }
613
+
614
+ /* Disable ripple when component is disabled */
615
+ button:disabled .ripple {
616
+ display: none;
439
617
  }
440
618
  `;
441
619
  /**
@@ -456,4 +634,4 @@ const buttonStyles = css `
456
634
  * ```
457
635
  */
458
636
  export const styles = [buttonStyles, buttonVariables];
459
- //# sourceMappingURL=nr-button.style.js.map
637
+ //# sourceMappingURL=button.style.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button.style.js","sourceRoot":"","sources":["../../../src/components/button/button.style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAE9D;;;;;;;;;;;;;;GAcG;AACH,MAAM,YAAY,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwlBvB,CAAC;AAEF;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,YAAY,EAAE,eAAe,CAAC,CAAC","sourcesContent":["import { css } from 'lit';\nimport { buttonVariables } from './button.style.variables.js';\n\n/**\n * Button component styles for the Hybrid UI Library\n * \n * This file contains all the styling for the nr-button component, including:\n * - Base button styles with CSS custom properties for theming\n * - Multiple button variants (primary, secondary, ghost, danger)\n * - Size variations (small, large)\n * - State styles (hover, active, disabled, loading)\n * - Dark theme support\n * - Icon positioning and styling\n * - Responsive design considerations\n * \n * The styling system uses CSS custom properties with fallbacks to allow\n * for both global and local customization of button appearance.\n */\nconst buttonStyles = css`\n /* Container for button content and icon positioning */\n #container {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 100%;\n }\n\n /* Icon positioned to the right of text when iconPosition='right' */\n :host([iconPosition='right']) #container {\n flex-direction: row-reverse;\n }\n\n /* Icon styling within button */\n hy-icon {\n display: flex;\n justify-content: center;\n align-items: center;\n padding: 2px;\n }\n\n /* \n * Base button element styles\n * Uses CSS custom properties with fallbacks for comprehensive theming support\n * Properties follow the pattern: --hybrid-button-{property}, --hybrid-button-local-{property}\n */\n\n /* \n * Base button element styles\n * Uses CSS custom properties with fallbacks for comprehensive theming support\n * Properties follow the pattern: --hybrid-button-{property}, --hybrid-button-local-{property}\n */\n button {\n /* Dimensions */\n height: var(--hybrid-button-height,var(--hybrid-button-local-height));\n width: var(--hybrid-button-width,var(--hybrid-button-local-width));\n \n /* Border properties - individual sides for granular control */\n border-left: var(--hybrid-button-border-left,var(--hybrid-button-local-border-left));\n border-right: var(--hybrid-button-border-right,var(--hybrid-button-local-border-right));\n border-top: var(--hybrid-button-border-top,var(--hybrid-button-local-border-top));\n border-bottom: var(--hybrid-button-border-bottom,var(--hybrid-button-local-border-bottom));\n \n /* Border radius - individual corners for design flexibility */\n border-top-left-radius:var(--hybrid-button-border-top-left-radius,var(--hybrid-button-local-border-top-left-radius)) ;\n border-top-right-radius: var(--hybrid-button-border-top-right-radius,var(--hybrid-button-local-border-top-right-radius));\n border-bottom-left-radius: var(--hybrid-button-border-bottom-left-radius,var(--hybrid-button-local-border-bottom-left-radius));\n border-bottom-right-radius: var(--hybrid-button-border-bottom-right-radius,var(--hybrid-button-local-border-bottom-right-radius));\n \n /* Colors */\n background-color: var(--hybrid-button-background-color,var(--hybrid-button-local-background-color));\n color: var(--hybrid-button-text-color,var(--hybrid-button-local-text-color));\n \n /* Typography */\n font-size: var(--hybrid-button-font-size,var(--hybrid-button-local-font-size));\n font-weight: var(--hybrid-button-font-weight,var(--hybrid-button-local-font-weight));\n text-transform: var(--hybrid-button-text-transform,var(--hybrid-button-local-text-transform));\n \n /* Spacing */\n padding-top: var(--hybrid-button-padding-y,var(--hybrid-button-local-padding-y));\n margin-top: var(--hybrid-button-margin-y,var(--hybrid-button-local-margin-y));\n padding-bottom: var(--hybrid-button-padding-y,var(--hybrid-button-local-padding-y));\n padding-right: var(--hybrid-button-padding-x,var(--hybrid-button-local-padding-x));\n padding-left: var(--hybrid-button-padding-x,var(--hybrid-button-local-padding-x));\n font-size: var(--hybrid-button-font-size,var(--hybrid-button-local-font-size));\n\n /* Positioning for ripple effect */\n position: relative;\n overflow: hidden;\n }\n \n /* Icon styling within button - inherits text color and size */\n button hy-icon {\n --hybrid-icon-color: var(--hybrid-button-text-color,var(--hybrid-button-local-text-color));\n --hybrid-icon-width: var(--hybrid-button-icon-width,var(--hybrid-button-local-icon-width));\n --hybrid-icon-height: var(--hybrid-button-icon-height,var(--hybrid-button-local-icon-height));\n }\n\n /* \n * Hover state styles\n * Applied when button is hovered but not disabled\n */\n\n /* \n * Hover state styles\n * Applied when button is hovered but not disabled\n */\n button:hover:not(:disabled) {\n cursor: pointer;\n border-color: var(--hybrid-button-hover-border-color,var(--hybrid-button-local-hover-border-color));\n background-color: var(--hybrid-button-hover-background-color,var(--hybrid-button-local-hover-background-color));\n color: var(--hybrid-button-hover-color,var(--hybrid-button-local-hover-color));\n }\n \n /* Icon color on hover */\n button:hover:not(:disabled) hy-icon {\n --hybrid-icon-color: var(--hybrid-button-hover-color,var(--hybrid-button-local-hover-color));\n }\n\n /* \n * Active state styles\n * Applied when button is being clicked/pressed but not disabled\n */\n button:active:not(:disabled) {\n outline: none;\n border-color: var(--hybrid-button-active-border-color,var(--hybrid-button-local-active-border-color));\n color: var(--hybrid-button-active-color,var(--hybrid-button-local-active-color));\n }\n \n /* Icon color on active state */\n button:active:not(:disabled) hy-icon {\n --hybrid-icon-color: var(--hybrid-button-active-color,var(--hybrid-button-local-active-color));\n }\n\n /* \n * Disabled state styles\n * Applied when button is disabled - removes interactivity and applies muted colors\n */\n\n /* \n * Disabled state styles\n * Applied when button is disabled - removes interactivity and applies muted colors\n */\n button:disabled {\n cursor: auto;\n background-color: var(--hybrid-button-disabled-background-color,var(--hybrid-button-local-disabled-background-color));\n color: var(--hybrid-button-disabled-text-color,var(--hybrid-button-local-disabled-text-color));\n border-color: var(--hybrid-button-disabled-border-color,var(--hybrid-button-local-disabled-border-color));\n }\n\n /* ========================================\n * SIZE VARIATIONS\n * ======================================== */\n\n /* Small button size variant */\n\n /* Small button size variant */\n button[data-size='small'] {\n padding-top: var(--hybrid-small-button-padding-y,var(--hybrid-small-button-local-padding-y));\n padding-bottom: var(--hybrid-small-button-padding-y,var(--hybrid-small-button-local-padding-y));\n padding-right: var(--hybrid-small-button-padding-x,var(--hybrid-small-button-local-padding-x));\n padding-left: var(--hybrid-small-button-padding-x,var(--hybrid-small-button-local-padding-x));\n font-size: var(--hybrid-small-button-font-size,var(--hybrid-small-button-local-font-size));\n }\n\n /* Large button size variant */\n button[data-size='large'] {\n padding-top: var(--hybrid-large-button-padding-y,var(--hybrid-large-button-local-padding-y));\n padding-bottom: var(--hybrid-large-button-padding-y,var(--hybrid-large-button-local-padding-y));\n padding-right: var(--hybrid-large-button-padding-x,var(--hybrid-large-button-local-padding-x));\n padding-left: var(--hybrid-large-button-padding-x,var(--hybrid-large-button-local-padding-x));\n font-size: var(--hybrid-large-button-font-size,var(--hybrid-large-button-local-font-size));\n }\n\n /* ========================================\n * BUTTON STATES\n * ======================================== */\n\n /* Loading state - reduces opacity to indicate processing */\n button[data-state='loading'] {\n opacity: 0.5;\n }\n\n /* ========================================\n * BUTTON TYPE VARIANTS\n * ======================================== */\n\n /* DANGER BUTTON VARIANT */\n /* DANGER BUTTON VARIANT */\n \n /* Danger button base styles and icon */\n button[data-type='danger'] hy-icon {\n --hybrid-icon-color: var(--hybrid-button-danger-text-color,var(--hybrid-button-local-danger-text-color));\n }\n button[data-type='danger'] {\n border-color: var(--hybrid-button-danger-border-color,var(--hybrid-button-local-danger-border-color));\n background-color: var(--hybrid-button-danger-background-color,var(--hybrid-button-local-danger-background-color));\n color: var(--hybrid-button-danger-text-color,var(--hybrid-button-local-danger-text-color));\n }\n \n /* Danger button with dashed border variant */\n button[data-type='danger'].button-dashed {\n border-color: var(--hybrid-button-danger-dashed-border-color,var(--hybrid-button-local-danger-dashed-border-color));\n }\n \n /* Danger button disabled state */\n button[data-type='danger']:disabled {\n border-color: var(--hybrid-button-danger-disabled-border-color,var(--hybrid-button-local-danger-disabled-border-color));\n background-color: var(--hybrid-button-danger-disabled-background-color,var(--hybrid-button-local-danger-disabled-background-color));\n color: var(--hybrid-button-danger-disabled-text-color,var(--hybrid-button-local-danger-disabled-text-color));\n }\n\n /* Danger button hover state */\n button[data-type='danger']:hover:not(:disabled) {\n background-color: var(--hybrid-button-danger-hover-background-color,var(--hybrid-button-local-danger-hover-background-color));\n border-color: var(--hybrid-button-danger-hover-border-color,var(--hybrid-button-local-danger-hover-border-color));\n color: var(--hybrid-button-danger-text-color,var(--hybrid-button-local-danger-text-color));\n }\n button[data-type='danger']:hover:not(:disabled) hy-icon {\n --hybrid-icon-color: var(--hybrid-button-danger-text-color,var(--hybrid-button-local-danger-text-color));\n }\n\n /* Danger button active state */\n button[data-type='danger']:active:not(:disabled) {\n background-color: var(--hybrid-button-danger-active-background-color,var(--hybrid-button-local-danger-active-background-color));\n border-color: var(--hybrid-button-danger-active-border-color,var(--hybrid-button-local-danger-active-border-color));\n outline: var(--hybrid-button-danger-outline,var(--hybrid-button-local-danger-outline));\n outline-offset: var(--hybrid-button-danger-outline-offset,var(--hybrid-button-local-danger-outline-offset));\n }\n\n /* PRIMARY BUTTON VARIANT */\n /* PRIMARY BUTTON VARIANT */\n \n /* Primary button base styles and icon */\n button[data-type='primary'] hy-icon {\n --hybrid-icon-color: var(--hybrid-button-primary-text-color,var(--hybrid-button-local-primary-text-color));\n }\n button[data-type='primary'] {\n border-color: var(--hybrid-button-primary-border-color,var(--hybrid-button-local-primary-border-color));\n background-color: var(--hybrid-button-primary-background-color,var(--hybrid-button-local-primary-background-color));\n color: var(--hybrid-button-primary-text-color,var(--hybrid-button-local-primary-text-color));\n }\n \n /* Primary button with dashed border variant */\n button[data-type='primary'].button-dashed {\n border-color: var(--hybrid-button-primary-dashed-border-color,var(--hybrid-button-local-primary-dashed-border-color));\n }\n\n /* Primary button disabled state */\n button[data-type='primary']:disabled {\n border-color: var(--hybrid-button-primary-disabled-border-color,var(--hybrid-button-local-primary-disabled-border-color));\n background-color: var(--hybrid-button-primary-disabled-background-color,var(--hybrid-button-local-primary-disabled-background-color));\n color: var(--hybrid-button-primary-disabled-text-color,var(--hybrid-button-local-primary-disabled-text-color));\n }\n\n /* Primary button hover state */\n button[data-type='primary']:hover:not(:disabled) {\n background-color: var(--hybrid-button-primary-hover-background-color,var(--hybrid-button-local-primary-hover-background-color));\n border-color: var(--hybrid-button-primary-hover-border-color,var(--hybrid-button-local-primary-hover-border-color));\n color: var(--hybrid-button-primary-text-color,var(--hybrid-button-local-primary-text-color));\n }\n button[data-type='primary']:hover:not(:disabled) hy-icon {\n --hybrid-icon-color: var(--hybrid-button-primary-text-color,var(--hybrid-button-local-primary-text-color));\n }\n \n /* Primary button active state */\n button[data-type='primary']:active:not(:disabled) {\n border-color: var(--hybrid-button-primary-active-border-color,var(--hybrid-button-local-primary-active-border-color));\n background-color: var(--hybrid-button-primary-active-background-color,var(--hybrid-button-local-primary-active-background-color));\n outline: var(--hybrid-button-primary-outline,var(--hybrid-button-local-primary-outline));\n outline-offset: var(--hybrid-button-primary-outline-offset,var(--hybrid-button-local-primary-outline-offset));\n }\n\n /* GHOST BUTTON VARIANT */\n /* GHOST BUTTON VARIANT */\n \n /* Ghost button base styles and icon */\n button[data-type='ghost'] hy-icon {\n --hybrid-icon-color: var(--hybrid-button-ghost-text-color,var(--hybrid-button-local-ghost-text-color));\n }\n button[data-type='ghost'] {\n background-color: var(--hybrid-button-ghost-background-color,var(--hybrid-button-local-ghost-background-color));\n color: var(--hybrid-button-ghost-text-color,var(--hybrid-button-local-ghost-text-color));\n border-color: var(--hybrid-button-ghost-border-color,var(--hybrid-button-local-ghost-border-color));\n }\n \n /* Ghost button with dashed border variant */\n button[data-type='ghost'].button-dashed {\n border-color: var(--hybrid-button-ghost-dashed-border-color,var(--hybrid-button-local-ghost-dashed-border-color));\n }\n \n /* Ghost button disabled state */\n button[data-type='ghost']:disabled {\n background-color: var(--hybrid-button-ghost-disabled-background-color,var(--hybrid-button-local-ghost-disabled-background-color));\n color: var(--hybrid-button-ghost-disabled-text-color,var(--hybrid-button-local-ghost-disabled-text-color));\n border-color: var(--hybrid-button-ghost-disabled-border-color,var(--hybrid-button-local-ghost-disabled-border-color));\n }\n\n /* Ghost button hover state */\n button[data-type='ghost']:hover:not(:disabled) {\n background-color: var(--hybrid-button-ghost-hover-background-color,var(--hybrid-button-local-ghost-hover-background-color));\n color: var(--hybrid-button-ghost-hover-text-color,var(--hybrid-button-local-ghost-hover-text-color));\n border-color: var(--hybrid-button-local-ghost-hover-border-color,var(--hybrid-button-local-ghost-hover-border-color));\n }\n button[data-type='ghost']:hover:not(:disabled) hy-icon {\n --hybrid-icon-color: var(--hybrid-button-ghost-hover-text-color,var(--hybrid-button-local-ghost-hover-text-color));\n }\n \n /* Ghost button active state */\n button[data-type='ghost']:active:not(:disabled) {\n background-color: var(--hybrid-button-ghost-active-background-color,var(--hybrid-button-local-ghost-active-background-color));\n border-color: var(--hybrid-button-ghost-active-border-color,var(--hybrid-button-local-ghost-active-border-color));\n }\n\n /* SECONDARY BUTTON VARIANT */\n /* SECONDARY BUTTON VARIANT */\n \n /* Secondary button base styles and icon */\n button[data-type='secondary'] hy-icon {\n --hybrid-icon-color: var(--hybrid-button-secondary-text-color,var(--hybrid-button-local-secondary-text-color));\n }\n button[data-type='secondary'] {\n background-color: var(--hybrid-button-secondary-background-color,var(--hybrid-button-local-secondary-background-color));\n color: var(--hybrid-button-secondary-text-color,var(--hybrid-button-local-secondary-text-color));\n border-color: var(--hybrid-button-secondary-border-color,var(--hybrid-button-local-secondary-border-color));\n }\n \n /* Secondary button with dashed border variant */\n button[data-type='secondary'].button-dashed {\n border-color: var(--hybrid-button-secondary-dashed-border-color,var(--hybrid-button-local-secondary-dashed-border-color));\n }\n \n /* Secondary button disabled state */\n button[data-type='secondary']:disabled {\n background-color: var(--hybrid-button-secondary-disabled-background-color,var(--hybrid-button-local-secondary-disabled-background-color));\n color: var(--hybrid-button-secondary-disabled-text-color,var(--hybrid-button-local-secondary-disabled-text-color));\n border-color: var(--hybrid-button-secondary-disabled-border-color,var(--hybrid-button-local-secondary-disabled-border-color));\n }\n \n /* Secondary button hover state */\n button[data-type='secondary']:hover:not(:disabled) {\n background-color: var(--hybrid-button-secondary-hover-background-color,var(--hybrid-button-local-secondary-hover-background-color));\n color: var(--hybrid-button-secondary-text-color,var(--hybrid-button-local-secondary-text-color));\n border-color: var(--hybrid-button-secondary-hover-border-color,var(--hybrid-button-local-secondary-hover-border-color));\n }\n button[data-type='secondary']:hover:not(:disabled) hy-icon {\n --hybrid-icon-color: var(--hybrid-button-secondary-text-color,var(--hybrid-button-local-secondary-text-color));\n }\n\n /* Secondary button active state */\n button[data-type='secondary']:active:not(:disabled) {\n background-color: var(--hybrid-button-secondary-active-background-color,var(--hybrid-button-local-secondary-active-background-color));\n border-color: var(--hybrid-button-secondary-active-border-color,var(--hybrid-button-local-secondary-active-border-color));\n outline: var(--hybrid-button-secondary-outline,var(--hybrid-button-local-secondary-outline));\n outline-offset: var(--hybrid-button-secondary-outline-offset,var(--hybrid-button-local-secondary-outline-offset));\n }\n\n /* ========================================\n * UTILITY CLASSES\n * ======================================== */\n\n /* Dashed border style modifier */\n .button-dashed {\n border-style: dashed;\n }\n\n /* ========================================\n * NEW BUTTON TYPES\n * ======================================== */\n\n /* TEXT BUTTON VARIANT */\n button[data-type='text'] {\n background-color: var(--hybrid-button-text-background-color, var(--hybrid-button-local-text-background-color, transparent));\n color: var(--hybrid-button-text-text-color, var(--hybrid-button-local-text-text-color, #1890ff));\n border: none;\n box-shadow: none;\n }\n\n button[data-type='text'] hy-icon {\n --hybrid-icon-color: var(--hybrid-button-text-text-color, var(--hybrid-button-local-text-text-color, #1890ff));\n }\n\n button[data-type='text']:hover:not(:disabled) {\n background-color: var(--hybrid-button-text-hover-background-color, var(--hybrid-button-local-text-hover-background-color, rgba(24, 144, 255, 0.06)));\n color: var(--hybrid-button-text-hover-text-color, var(--hybrid-button-local-text-hover-text-color, #40a9ff));\n }\n\n button[data-type='text']:hover:not(:disabled) hy-icon {\n --hybrid-icon-color: var(--hybrid-button-text-hover-text-color, var(--hybrid-button-local-text-hover-text-color, #40a9ff));\n }\n\n button[data-type='text']:active:not(:disabled) {\n background-color: var(--hybrid-button-text-active-background-color, var(--hybrid-button-local-text-active-background-color, rgba(24, 144, 255, 0.15)));\n color: var(--hybrid-button-text-active-text-color, var(--hybrid-button-local-text-active-text-color, #096dd9));\n }\n\n button[data-type='text']:disabled {\n background-color: transparent;\n color: var(--hybrid-button-text-disabled-text-color, var(--hybrid-button-local-text-disabled-text-color, rgba(0, 0, 0, 0.25)));\n border: none;\n }\n\n /* LINK BUTTON VARIANT */\n a[data-type='link'], button[data-type='link'] {\n background-color: transparent;\n color: var(--hybrid-button-link-text-color, var(--hybrid-button-local-link-text-color, #1890ff));\n border: none;\n box-shadow: none;\n text-decoration: underline;\n cursor: pointer;\n }\n\n a[data-type='link'] hy-icon, button[data-type='link'] hy-icon {\n --hybrid-icon-color: var(--hybrid-button-link-text-color, var(--hybrid-button-local-link-text-color, #1890ff));\n }\n\n a[data-type='link']:hover, button[data-type='link']:hover:not(:disabled) {\n color: var(--hybrid-button-link-hover-text-color, var(--hybrid-button-local-link-hover-text-color, #40a9ff));\n }\n\n a[data-type='link']:hover hy-icon, button[data-type='link']:hover:not(:disabled) hy-icon {\n --hybrid-icon-color: var(--hybrid-button-link-hover-text-color, var(--hybrid-button-local-link-hover-text-color, #40a9ff));\n }\n\n a[data-type='link']:active, button[data-type='link']:active:not(:disabled) {\n color: var(--hybrid-button-link-active-text-color, var(--hybrid-button-local-link-active-text-color, #096dd9));\n }\n\n button[data-type='link']:disabled {\n color: var(--hybrid-button-link-disabled-text-color, var(--hybrid-button-local-link-disabled-text-color, rgba(0, 0, 0, 0.25)));\n text-decoration: none;\n cursor: not-allowed;\n }\n\n /* ========================================\n * SHAPE VARIANTS\n * ======================================== */\n\n /* Circle button shape */\n button[data-shape='circle'], a[data-shape='circle'] {\n border-radius: 50%;\n width: var(--hybrid-button-circle-size, var(--hybrid-button-local-circle-size, 32px));\n height: var(--hybrid-button-circle-size, var(--hybrid-button-local-circle-size, 32px));\n padding: 0;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n }\n\n button[data-shape='circle'][data-size='small'], a[data-shape='circle'][data-size='small'] {\n width: var(--hybrid-button-circle-size-small, var(--hybrid-button-local-circle-size-small, 24px));\n height: var(--hybrid-button-circle-size-small, var(--hybrid-button-local-circle-size-small, 24px));\n }\n\n button[data-shape='circle'][data-size='large'], a[data-shape='circle'][data-size='large'] {\n width: var(--hybrid-button-circle-size-large, var(--hybrid-button-local-circle-size-large, 40px));\n height: var(--hybrid-button-circle-size-large, var(--hybrid-button-local-circle-size-large, 40px));\n }\n\n /* Round button shape */\n button[data-shape='round'], a[data-shape='round'] {\n border-radius: var(--hybrid-button-round-border-radius, var(--hybrid-button-local-round-border-radius, 16px));\n }\n\n /* ========================================\n * BLOCK BUTTON\n * ======================================== */\n\n button[data-block='true'], a[data-block='true'] {\n width: 100%;\n display: block;\n }\n\n /* ========================================\n * VARIANT STYLES\n * ======================================== */\n\n /* Primary button variant */\n\n /* ========================================\n * DARK THEME OVERRIDES\n * ======================================== */\n \n /**\n * Dark theme styles using data-theme attribute on button element\n * These override the light theme defaults when data-theme=\"dark\" is applied\n */\n /**\n * Dark theme styles using data-theme attribute on button element\n * These override the light theme defaults when data-theme=\"dark\" is applied\n */\n button[data-theme=\"dark\"] {\n /* Default button dark theme overrides */\n --hybrid-button-local-background-color: #000000;\n --hybrid-button-local-text-color: #ffffff;\n --hybrid-button-local-hover-border-color: #6f6f6f;\n --hybrid-button-local-hover-color: #6f6f6f;\n --hybrid-button-local-active-border-color: #c6c6c6;\n --hybrid-button-local-active-color: #c6c6c6;\n --hybrid-button-local-disabled-background-color: #c6c6c6;\n\n /* Primary button dark theme overrides */\n --hybrid-button-local-primary-outline: 1px solid black;\n --hybrid-button-local-primary-outline-offset: -3px;\n --hybrid-button-local-primary-active-border-color: #ffffff;\n --hybrid-button-local-primary-disabled-text-color: #c6c6c6;\n --hybrid-button-local-primary-disabled-background-color: #8d8d8d;\n --hybrid-button-local-primary-disabled-border-color: #8d8d8d;\n\n /* Secondary button dark theme overrides */\n --hybrid-button-local-secondary-background-color: #6f6f6f;\n --hybrid-button-local-secondary-border-color: #6f6f6f;\n --hybrid-button-local-secondary-text-color: #ffffff;\n --hybrid-button-local-secondary-active-border-color: #ffffff;\n --hybrid-button-local-secondary-active-background-color: #6f6f6f;\n --hybrid-button-local-secondary-outline: 1px solid black;\n --hybrid-button-local-secondary-outline-offset: -3px;\n --hybrid-button-local-secondary-hover-background-color: #606060;\n --hybrid-button-local-secondary-hover-border-color: #606060;\n --hybrid-button-local-secondary-disabled-background-color: #6f6f6f;\n --hybrid-button-local-secondary-disabled-text-color: #8d8d8d;\n --hybrid-button-local-secondary-disabled-border-color: #6f6f6f;\n --hybrid-button-local-secondary-dashed-border-color: #ffffff;\n\n /* Ghost button dark theme overrides */\n --hybrid-button-local-ghost-background-color: transparent;\n --hybrid-button-local-ghost-text-color: #78a9ff;\n --hybrid-button-local-ghost-border-color: transparent;\n --hybrid-button-local-ghost-active-background-color: transparent;\n --hybrid-button-local-ghost-active-text-color: #a6c8ff;\n --hybrid-button-local-ghost-active-border-color: #ffffff;\n --hybrid-button-local-ghost-hover-background-color: #4c4c4c;\n --hybrid-button-local-ghost-hover-border-color: #4c4c4c;\n --hybrid-button-local-ghost-hover-text-color: #a6c8ff;\n --hybrid-button-local-ghost-disabled-background-color: transparent;\n --hybrid-button-local-ghost-disabled-text-color: #6f6f6f;\n --hybrid-button-local-ghost-disabled-border-color: transparent;\n --hybrid-button-local-ghost-dashed-border-color: #c6c6c6;\n\n /* Danger button dark theme overrides */\n --hybrid-button-local-danger-outline: 1px solid #000000;\n --hybrid-button-local-danger-outline-offset: -3px;\n --hybrid-button-local-danger-hover-background-color: #ba1b23;\n --hybrid-button-local-danger-hover-border-color: #ba1b23;\n --hybrid-button-local-danger-active-background-color: #da1e28;\n --hybrid-button-local-danger-active-border-color: #ffffff;\n --hybrid-button-local-danger-disabled-background-color: #6f6f6f;\n --hybrid-button-local-danger-disabled-text-color: #8d8d8d;\n --hybrid-button-local-danger-disabled-border-color: #6f6f6f;\n --hybrid-button-local-danger-dashed-border-color: #ffffff;\n\n /* Text button dark theme overrides */\n --hybrid-button-local-text-background-color: transparent;\n --hybrid-button-local-text-text-color: #ffffff;\n --hybrid-button-local-text-border-color: transparent;\n --hybrid-button-local-text-hover-background-color: rgba(255, 255, 255, 0.1);\n --hybrid-button-local-text-hover-text-color: #ffffff;\n --hybrid-button-local-text-hover-border-color: transparent;\n --hybrid-button-local-text-active-background-color: rgba(255, 255, 255, 0.15);\n --hybrid-button-local-text-active-text-color: #ffffff;\n --hybrid-button-local-text-active-border-color: transparent;\n --hybrid-button-local-text-disabled-background-color: transparent;\n --hybrid-button-local-text-disabled-text-color: #6f6f6f;\n --hybrid-button-local-text-disabled-border-color: transparent;\n\n /* Link button dark theme overrides */\n --hybrid-button-local-link-background-color: transparent;\n --hybrid-button-local-link-text-color: #78a9ff;\n --hybrid-button-local-link-border-color: transparent;\n --hybrid-button-local-link-hover-background-color: transparent;\n --hybrid-button-local-link-hover-text-color: #a6c8ff;\n --hybrid-button-local-link-hover-border-color: transparent;\n --hybrid-button-local-link-active-background-color: transparent;\n --hybrid-button-local-link-active-text-color: #a6c8ff;\n --hybrid-button-local-link-active-border-color: transparent;\n --hybrid-button-local-link-disabled-background-color: transparent;\n --hybrid-button-local-link-disabled-text-color: #6f6f6f;\n --hybrid-button-local-link-disabled-border-color: transparent;\n }\n\n /* ========================================\n * RIPPLE EFFECT STYLES\n * ======================================== */\n\n /* Ripple effect animation */\n .ripple {\n position: absolute;\n border-radius: 50%;\n background-color: rgba(255, 255, 255, 0.4);\n transform: scale(0);\n animation: ripple-animation 0.6s linear;\n pointer-events: none;\n }\n\n /* Darker ripple for light buttons */\n button[data-type='default'] .ripple,\n button[data-type='ghost'] .ripple {\n background-color: rgba(0, 0, 0, 0.1);\n }\n\n /* Lighter ripple for dark buttons */\n button[data-type='primary'] .ripple,\n button[data-type='danger'] .ripple {\n background-color: rgba(255, 255, 255, 0.3);\n }\n\n /* Ripple animation keyframes */\n @keyframes ripple-animation {\n to {\n transform: scale(4);\n opacity: 0;\n }\n }\n\n /* Disable ripple when component is disabled */\n button:disabled .ripple {\n display: none;\n }\n`;\n\n/**\n * Exported styles for the nr-button component\n * \n * @description\n * This export provides the complete styling system for the button component,\n * including all variants, states, sizes, theme support, and CSS custom properties.\n * \n * @usage\n * Import and use in the component's styles property:\n * ```typescript\n * import { styles } from './nr-button.style.ts';\n * \n * @Component({\n * styles: styles\n * })\n * ```\n */\nexport const styles = [buttonStyles, buttonVariables];\n"]}
@@ -8,4 +8,4 @@
8
8
  * for both global and local customization of button appearance.
9
9
  */
10
10
  export declare const buttonVariables: import("lit").CSSResult;
11
- //# sourceMappingURL=nr-button.style.variables.d.ts.map
11
+ //# sourceMappingURL=button.style.variables.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button.style.variables.d.ts","sourceRoot":"","sources":["../../../src/components/button/button.style.variables.ts"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AACH,eAAO,MAAM,eAAe,yBAsL3B,CAAC"}
@@ -191,4 +191,4 @@ export const buttonVariables = css `
191
191
  --hybrid-button-local-danger-dashed-border-color: #ffffff;
192
192
  }
193
193
  `;
194
- //# sourceMappingURL=nr-button.style.variables.js.map
194
+ //# sourceMappingURL=button.style.variables.js.map