@politiet/sheriff-web-components 1.0.0-beta.0 → 1.0.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/dist/frameworks/preact.d.ts +44 -0
  2. package/dist/frameworks/react.d.ts +44 -0
  3. package/dist/frameworks/solidjs.d.ts +44 -0
  4. package/dist/frameworks/svelte.d.ts +2 -0
  5. package/dist/frameworks/vue.d.ts +42 -0
  6. package/dist/sds-button/sds-button.d.ts.map +1 -1
  7. package/dist/sds-button/sds-button.js +0 -29
  8. package/dist/sds-button/sds-button.js.map +1 -1
  9. package/dist/sds-checkbox/sds-checkbox.d.ts.map +1 -1
  10. package/dist/sds-checkbox/sds-checkbox.js +0 -29
  11. package/dist/sds-checkbox/sds-checkbox.js.map +1 -1
  12. package/dist/sds-checkbox-group/sds-checkbox-group.d.ts +1 -14
  13. package/dist/sds-checkbox-group/sds-checkbox-group.d.ts.map +1 -1
  14. package/dist/sds-checkbox-group/sds-checkbox-group.js +0 -21
  15. package/dist/sds-checkbox-group/sds-checkbox-group.js.map +1 -1
  16. package/dist/sds-chip/sds-chip.d.ts +1 -13
  17. package/dist/sds-chip/sds-chip.d.ts.map +1 -1
  18. package/dist/sds-chip/sds-chip.js +0 -21
  19. package/dist/sds-chip/sds-chip.js.map +1 -1
  20. package/dist/sds-detail/sds-detail.d.ts +1 -13
  21. package/dist/sds-detail/sds-detail.d.ts.map +1 -1
  22. package/dist/sds-detail/sds-detail.js +0 -21
  23. package/dist/sds-detail/sds-detail.js.map +1 -1
  24. package/dist/sds-heading/sds-heading.d.ts +1 -13
  25. package/dist/sds-heading/sds-heading.d.ts.map +1 -1
  26. package/dist/sds-heading/sds-heading.js +0 -21
  27. package/dist/sds-heading/sds-heading.js.map +1 -1
  28. package/dist/sds-icon/sds-icon.d.ts +1 -13
  29. package/dist/sds-icon/sds-icon.d.ts.map +1 -1
  30. package/dist/sds-icon/sds-icon.js +0 -21
  31. package/dist/sds-icon/sds-icon.js.map +1 -1
  32. package/dist/sds-label/sds-label.d.ts +1 -13
  33. package/dist/sds-label/sds-label.d.ts.map +1 -1
  34. package/dist/sds-label/sds-label.js +0 -21
  35. package/dist/sds-label/sds-label.js.map +1 -1
  36. package/dist/sds-link/sds-link.d.ts +1 -13
  37. package/dist/sds-link/sds-link.d.ts.map +1 -1
  38. package/dist/sds-link/sds-link.js +0 -21
  39. package/dist/sds-link/sds-link.js.map +1 -1
  40. package/dist/sds-loader/sds-loader.d.ts +1 -13
  41. package/dist/sds-loader/sds-loader.d.ts.map +1 -1
  42. package/dist/sds-loader/sds-loader.js +0 -21
  43. package/dist/sds-loader/sds-loader.js.map +1 -1
  44. package/dist/sds-nav-card/sds-nav-card.d.ts +1 -13
  45. package/dist/sds-nav-card/sds-nav-card.d.ts.map +1 -1
  46. package/dist/sds-nav-card/sds-nav-card.js +0 -21
  47. package/dist/sds-nav-card/sds-nav-card.js.map +1 -1
  48. package/dist/sds-notification/sds-notification.d.ts +1 -13
  49. package/dist/sds-notification/sds-notification.d.ts.map +1 -1
  50. package/dist/sds-notification/sds-notification.js +0 -21
  51. package/dist/sds-notification/sds-notification.js.map +1 -1
  52. package/dist/sds-paragraph/sds-paragraph.d.ts +1 -13
  53. package/dist/sds-paragraph/sds-paragraph.d.ts.map +1 -1
  54. package/dist/sds-paragraph/sds-paragraph.js +0 -21
  55. package/dist/sds-paragraph/sds-paragraph.js.map +1 -1
  56. package/dist/sds-radio/sds-radio.d.ts +1 -14
  57. package/dist/sds-radio/sds-radio.d.ts.map +1 -1
  58. package/dist/sds-radio/sds-radio.js +0 -21
  59. package/dist/sds-radio/sds-radio.js.map +1 -1
  60. package/dist/sds-radio-group/sds-radio-group.d.ts +1 -14
  61. package/dist/sds-radio-group/sds-radio-group.d.ts.map +1 -1
  62. package/dist/sds-radio-group/sds-radio-group.js +0 -21
  63. package/dist/sds-radio-group/sds-radio-group.js.map +1 -1
  64. package/dist/sds-switch/sds-switch.d.ts +1 -13
  65. package/dist/sds-switch/sds-switch.d.ts.map +1 -1
  66. package/dist/sds-switch/sds-switch.js +0 -21
  67. package/dist/sds-switch/sds-switch.js.map +1 -1
  68. package/dist/sds-text/sds-text.d.ts +1 -13
  69. package/dist/sds-text/sds-text.d.ts.map +1 -1
  70. package/dist/sds-text/sds-text.js +0 -21
  71. package/dist/sds-text/sds-text.js.map +1 -1
  72. package/dist/sds-textfield/sds-textfield.d.ts +1 -13
  73. package/dist/sds-textfield/sds-textfield.d.ts.map +1 -1
  74. package/dist/sds-textfield/sds-textfield.js +0 -21
  75. package/dist/sds-textfield/sds-textfield.js.map +1 -1
  76. package/dist/sheriff-web-components.js +13 -20
  77. package/package.json +146 -130
@@ -0,0 +1,44 @@
1
+ import 'preact';
2
+ import { SDSButtonProps } from '../sds-button/sds-button';
3
+ import { SDSCheckboxProps } from '../sds-checkbox/sds-checkbox';
4
+ import { SDSCheckboxGroupProps } from '../sds-checkbox-group/sds-checkbox-group';
5
+ import { SDSChipProps } from '../sds-chip/sds-chip';
6
+ import { SDSDetailProps } from '../sds-detail/sds-detail';
7
+ import { SDSHeadingProps } from '../sds-heading/sds-heading';
8
+ import { SDSIconProps } from '../sds-icon/sds-icon';
9
+ import { SDSLabelProps } from '../sds-label/sds-label';
10
+ import { SDSLinkProps } from '../sds-link/sds-link';
11
+ import { SDSLoaderProps } from '../sds-loader/sds-loader';
12
+ import { SDSNavCardProps } from '../sds-nav-card/sds-nav-card';
13
+ import { SDSNotificationProps } from '../sds-notification/sds-notification';
14
+ import { SDSParagraphProps } from '../sds-paragraph/sds-paragraph';
15
+ import { SDSRadioProps } from '../sds-radio/sds-radio';
16
+ import { SDSRadioGroupProps } from '../sds-radio-group/sds-radio-group';
17
+ import { SDSSwitchProps } from '../sds-switch/sds-switch';
18
+ import { SDSTextProps } from '../sds-text/sds-text';
19
+ import { SDSTextFieldProps } from '../sds-textfield/sds-textfield';
20
+ declare module 'preact' {
21
+ namespace JSX {
22
+ interface IntrinsicElements {
23
+ 'sds-button': SDSButtonProps & JSX.HTMLAttributes<HTMLElement>;
24
+ 'sds-checkbox': SDSCheckboxProps & JSX.HTMLAttributes<HTMLElement>;
25
+ 'sds-checkbox-group': SDSCheckboxGroupProps & JSX.HTMLAttributes<HTMLElement>;
26
+ 'sds-chip': SDSChipProps & JSX.HTMLAttributes<HTMLElement>;
27
+ 'sds-detail': SDSDetailProps & JSX.HTMLAttributes<HTMLElement>;
28
+ 'sds-heading': SDSHeadingProps & JSX.HTMLAttributes<HTMLElement>;
29
+ 'sds-icon': SDSIconProps & JSX.HTMLAttributes<HTMLElement>;
30
+ 'sds-label': SDSLabelProps & JSX.HTMLAttributes<HTMLElement>;
31
+ 'sds-link': SDSLinkProps & JSX.HTMLAttributes<HTMLElement>;
32
+ 'sds-loader': SDSLoaderProps & JSX.HTMLAttributes<HTMLElement>;
33
+ 'sds-nav-card': SDSNavCardProps & JSX.HTMLAttributes<HTMLElement>;
34
+ 'sds-notification': SDSNotificationProps & JSX.HTMLAttributes<HTMLElement>;
35
+ 'sds-paragraph': SDSParagraphProps & JSX.HTMLAttributes<HTMLElement>;
36
+ 'sds-radio': SDSRadioProps & JSX.HTMLAttributes<HTMLElement>;
37
+ 'sds-radio-group': SDSRadioGroupProps & JSX.HTMLAttributes<HTMLElement>;
38
+ 'sds-switch': SDSSwitchProps & JSX.HTMLAttributes<HTMLElement>;
39
+ 'sds-text': SDSTextProps & JSX.HTMLAttributes<HTMLElement>;
40
+ 'sds-textfield': SDSTextFieldProps & JSX.HTMLAttributes<HTMLElement>;
41
+ }
42
+ }
43
+ }
44
+ //# sourceMappingURL=preact.d.ts.map
@@ -0,0 +1,44 @@
1
+ import 'react';
2
+ import { SDSButtonProps } from '../sds-button/sds-button';
3
+ import { SDSCheckboxProps } from '../sds-checkbox/sds-checkbox';
4
+ import { SDSCheckboxGroupProps } from '../sds-checkbox-group/sds-checkbox-group';
5
+ import { SDSChipProps } from '../sds-chip/sds-chip';
6
+ import { SDSDetailProps } from '../sds-detail/sds-detail';
7
+ import { SDSHeadingProps } from '../sds-heading/sds-heading';
8
+ import { SDSIconProps } from '../sds-icon/sds-icon';
9
+ import { SDSLabelProps } from '../sds-label/sds-label';
10
+ import { SDSLinkProps } from '../sds-link/sds-link';
11
+ import { SDSLoaderProps } from '../sds-loader/sds-loader';
12
+ import { SDSNavCardProps } from '../sds-nav-card/sds-nav-card';
13
+ import { SDSNotificationProps } from '../sds-notification/sds-notification';
14
+ import { SDSParagraphProps } from '../sds-paragraph/sds-paragraph';
15
+ import { SDSRadioProps } from '../sds-radio/sds-radio';
16
+ import { SDSRadioGroupProps } from '../sds-radio-group/sds-radio-group';
17
+ import { SDSSwitchProps } from '../sds-switch/sds-switch';
18
+ import { SDSTextProps } from '../sds-text/sds-text';
19
+ import { SDSTextFieldProps } from '../sds-textfield/sds-textfield';
20
+ declare module 'react' {
21
+ namespace JSX {
22
+ interface IntrinsicElements {
23
+ 'sds-button': SDSButtonProps & React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
24
+ 'sds-checkbox': SDSCheckboxProps & React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
25
+ 'sds-checkbox-group': SDSCheckboxGroupProps & React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
26
+ 'sds-chip': SDSChipProps & React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
27
+ 'sds-detail': SDSDetailProps & React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
28
+ 'sds-heading': SDSHeadingProps & React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
29
+ 'sds-icon': SDSIconProps & React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
30
+ 'sds-label': SDSLabelProps & React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
31
+ 'sds-link': SDSLinkProps & React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
32
+ 'sds-loader': SDSLoaderProps & React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
33
+ 'sds-nav-card': SDSNavCardProps & React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
34
+ 'sds-notification': SDSNotificationProps & React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
35
+ 'sds-paragraph': SDSParagraphProps & React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
36
+ 'sds-radio': SDSRadioProps & React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
37
+ 'sds-radio-group': SDSRadioGroupProps & React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
38
+ 'sds-switch': SDSSwitchProps & React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
39
+ 'sds-text': SDSTextProps & React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
40
+ 'sds-textfield': SDSTextFieldProps & React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
41
+ }
42
+ }
43
+ }
44
+ //# sourceMappingURL=react.d.ts.map
@@ -0,0 +1,44 @@
1
+ import 'solid-js';
2
+ import { SDSButtonProps } from '../sds-button/sds-button';
3
+ import { SDSCheckboxProps } from '../sds-checkbox/sds-checkbox';
4
+ import { SDSCheckboxGroupProps } from '../sds-checkbox-group/sds-checkbox-group';
5
+ import { SDSChipProps } from '../sds-chip/sds-chip';
6
+ import { SDSDetailProps } from '../sds-detail/sds-detail';
7
+ import { SDSHeadingProps } from '../sds-heading/sds-heading';
8
+ import { SDSIconProps } from '../sds-icon/sds-icon';
9
+ import { SDSLabelProps } from '../sds-label/sds-label';
10
+ import { SDSLinkProps } from '../sds-link/sds-link';
11
+ import { SDSLoaderProps } from '../sds-loader/sds-loader';
12
+ import { SDSNavCardProps } from '../sds-nav-card/sds-nav-card';
13
+ import { SDSNotificationProps } from '../sds-notification/sds-notification';
14
+ import { SDSParagraphProps } from '../sds-paragraph/sds-paragraph';
15
+ import { SDSRadioProps } from '../sds-radio/sds-radio';
16
+ import { SDSRadioGroupProps } from '../sds-radio-group/sds-radio-group';
17
+ import { SDSSwitchProps } from '../sds-switch/sds-switch';
18
+ import { SDSTextProps } from '../sds-text/sds-text';
19
+ import { SDSTextFieldProps } from '../sds-textfield/sds-textfield';
20
+ declare module 'solid-js' {
21
+ namespace JSX {
22
+ interface IntrinsicElements {
23
+ 'sds-button': SDSButtonProps & JSX.HTMLAttributes<HTMLElement>;
24
+ 'sds-checkbox': SDSCheckboxProps & JSX.HTMLAttributes<HTMLElement>;
25
+ 'sds-checkbox-group': SDSCheckboxGroupProps & JSX.HTMLAttributes<HTMLElement>;
26
+ 'sds-chip': SDSChipProps & JSX.HTMLAttributes<HTMLElement>;
27
+ 'sds-detail': SDSDetailProps & JSX.HTMLAttributes<HTMLElement>;
28
+ 'sds-heading': SDSHeadingProps & JSX.HTMLAttributes<HTMLElement>;
29
+ 'sds-icon': SDSIconProps & JSX.HTMLAttributes<HTMLElement>;
30
+ 'sds-label': SDSLabelProps & JSX.HTMLAttributes<HTMLElement>;
31
+ 'sds-link': SDSLinkProps & JSX.HTMLAttributes<HTMLElement>;
32
+ 'sds-loader': SDSLoaderProps & JSX.HTMLAttributes<HTMLElement>;
33
+ 'sds-nav-card': SDSNavCardProps & JSX.HTMLAttributes<HTMLElement>;
34
+ 'sds-notification': SDSNotificationProps & JSX.HTMLAttributes<HTMLElement>;
35
+ 'sds-paragraph': SDSParagraphProps & JSX.HTMLAttributes<HTMLElement>;
36
+ 'sds-radio': SDSRadioProps & JSX.HTMLAttributes<HTMLElement>;
37
+ 'sds-radio-group': SDSRadioGroupProps & JSX.HTMLAttributes<HTMLElement>;
38
+ 'sds-switch': SDSSwitchProps & JSX.HTMLAttributes<HTMLElement>;
39
+ 'sds-text': SDSTextProps & JSX.HTMLAttributes<HTMLElement>;
40
+ 'sds-textfield': SDSTextFieldProps & JSX.HTMLAttributes<HTMLElement>;
41
+ }
42
+ }
43
+ }
44
+ //# sourceMappingURL=solidjs.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=svelte.d.ts.map
@@ -0,0 +1,42 @@
1
+ import type { DefineComponent } from 'vue';
2
+ import { SDSButtonProps } from '../sds-button/sds-button';
3
+ import { SDSCheckboxProps } from '../sds-checkbox/sds-checkbox';
4
+ import { SDSCheckboxGroupProps } from '../sds-checkbox-group/sds-checkbox-group';
5
+ import { SDSChipProps } from '../sds-chip/sds-chip';
6
+ import { SDSDetailProps } from '../sds-detail/sds-detail';
7
+ import { SDSHeadingProps } from '../sds-heading/sds-heading';
8
+ import { SDSIconProps } from '../sds-icon/sds-icon';
9
+ import { SDSLabelProps } from '../sds-label/sds-label';
10
+ import { SDSLinkProps } from '../sds-link/sds-link';
11
+ import { SDSLoaderProps } from '../sds-loader/sds-loader';
12
+ import { SDSNavCardProps } from '../sds-nav-card/sds-nav-card';
13
+ import { SDSNotificationProps } from '../sds-notification/sds-notification';
14
+ import { SDSParagraphProps } from '../sds-paragraph/sds-paragraph';
15
+ import { SDSRadioProps } from '../sds-radio/sds-radio';
16
+ import { SDSRadioGroupProps } from '../sds-radio-group/sds-radio-group';
17
+ import { SDSSwitchProps } from '../sds-switch/sds-switch';
18
+ import { SDSTextProps } from '../sds-text/sds-text';
19
+ import { SDSTextFieldProps } from '../sds-textfield/sds-textfield';
20
+ declare module 'vue' {
21
+ interface GlobalComponents {
22
+ 'sds-button': DefineComponent<SDSButtonProps>;
23
+ 'sds-checkbox': DefineComponent<SDSCheckboxProps>;
24
+ 'sds-checkbox-group': DefineComponent<SDSCheckboxGroupProps>;
25
+ 'sds-chip': DefineComponent<SDSChipProps>;
26
+ 'sds-detail': DefineComponent<SDSDetailProps>;
27
+ 'sds-heading': DefineComponent<SDSHeadingProps>;
28
+ 'sds-icon': DefineComponent<SDSIconProps>;
29
+ 'sds-label': DefineComponent<SDSLabelProps>;
30
+ 'sds-link': DefineComponent<SDSLinkProps>;
31
+ 'sds-loader': DefineComponent<SDSLoaderProps>;
32
+ 'sds-nav-card': DefineComponent<SDSNavCardProps>;
33
+ 'sds-notification': DefineComponent<SDSNotificationProps>;
34
+ 'sds-paragraph': DefineComponent<SDSParagraphProps>;
35
+ 'sds-radio': DefineComponent<SDSRadioProps>;
36
+ 'sds-radio-group': DefineComponent<SDSRadioGroupProps>;
37
+ 'sds-switch': DefineComponent<SDSSwitchProps>;
38
+ 'sds-text': DefineComponent<SDSTextProps>;
39
+ 'sds-textfield': DefineComponent<SDSTextFieldProps>;
40
+ }
41
+ }
42
+ //# sourceMappingURL=vue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sds-button.d.ts","sourceRoot":"","sources":["../../src/sds-button/sds-button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AAMvC,KAAK,UAAU,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;AAChD,KAAK,aAAa,GAAG,SAAS,GAAG,WAAW,GAAG,UAAU,GAAG,UAAU,CAAC;AACvE,KAAK,UAAU,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AAE/C,MAAM,WAAW,cAAc;IAC9B,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAC;IACvC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAC;IACxC,OAAO,CAAC,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C,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAC;IACvC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAC;IACxC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAC;CACvC;AAED,qBACa,SAAU,SAAQ,UAAU;IACxC,OAAgB,MAAM,4BAAY;IAElC,MAAM,CAAC,cAAc,UAAQ;IAC7B,SAAgB,SAAS,EAAE,gBAAgB,CAAC;IAG5C,IAAI,EAAE,UAAU,CAAY;IAG5B,OAAO,EAAE,aAAa,CAAa;IAGnC,IAAI,EAAE,UAAU,CAAW;IAEiB,QAAQ,EAAE,OAAO,CAAS;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAM;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;;IAQzD,OAAO,CAAC,QAAQ,CAAC,YAAY,CAuD3B;IAEO,KAAK,IAAI,IAAI;IAIb,IAAI,IAAI,IAAI;IAIZ,KAAK,IAAI,IAAI;IAIb,MAAM;CA2Bf;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,YAAY,EAAE,SAAS,CAAC;KACxB;CACD"}
@@ -137,33 +137,4 @@ SDSButton = __decorate([
137
137
  customElement('sds-button')
138
138
  ], SDSButton);
139
139
  export { SDSButton };
140
- /*// NextJs
141
- declare module 'react' {
142
- namespace JSX {
143
- interface IntrinsicElements {
144
- 'sds-button': SDSButtonProps & React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
145
- }
146
- }
147
- }*/
148
- /*
149
- // Angular
150
- declare module '@angular/core' {
151
- interface IntrinsicElements {
152
- 'sds-button': SDSButtonProps;
153
- }
154
- }
155
-
156
- // Vue
157
- declare module 'vue' {
158
- export interface GlobalComponents {
159
- 'sds-button': SDSButtonProps;
160
- }
161
- }
162
-
163
- // Svelte
164
- declare namespace svelteHTML {
165
- interface HTMLAttributes<T> {
166
- 'sds-button'?: SDSButtonProps;
167
- }
168
- } */
169
140
  //# sourceMappingURL=sds-button.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"sds-button.js","sourceRoot":"","sources":["../../src/sds-button/sds-button.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAoBtC,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,UAAU;IAoBxC;QACC,KAAK,EAAE,CAAC;QAdT,SAAI,GAAe,QAAQ,CAAC;QAG5B,YAAO,GAAkB,SAAS,CAAC;QAGnC,SAAI,GAAe,OAAO,CAAC;QAEiB,aAAQ,GAAY,KAAK,CAAC;QAE3B,UAAK,GAAW,EAAE,CAAC;QAS7C,iBAAY,GAAG,CAAC,KAAiB,EAAE,EAAE;YACrD,KAAK,CAAC,cAAc,EAAE,CAAC;YACvB,KAAK,CAAC,wBAAwB,EAAE,CAAC;YAEjC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;gBACpB,QAAQ,IAAI,CAAC,IAAI,EAAE,CAAC;oBACnB,KAAK,QAAQ,CAAC,CAAC,CAAC;wBACf,MAAM,WAAW,GAAG,IAAI,WAAW,CAAC,QAAQ,EAAE;4BAC7C,OAAO,EAAE,IAAI;4BACb,QAAQ,EAAE,IAAI;4BACd,UAAU,EAAE,IAAI;yBAChB,CAAC,CAAC;wBACH,MAAM,YAAY,GAAG,IAAI,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC;wBAErD,IAAI,YAAY,EAAE,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C,YAAY;;;;;;GAM5B,CAAC;IACH,CAAC;;AAxHe,gBAAM,GAAG,CAAC,MAAM,CAAC,AAAX,CAAY;AAE3B,wBAAc,GAAG,IAAI,AAAP,CAAQ;AAI7B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;uCACd;AAG5B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;0CACP;AAGnC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;uCACf;AAEiB;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;2CAA2B;AAC3B;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;uCAAe;AACd;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;wCAAoB;AACnB;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;uCAAe;AAlB7C,SAAS;IADrB,aAAa,CAAC,YAAY,CAAC;GACf,SAAS,CA0HrB;;AAgBD;;;;;;;GAOG;AAEH;;;;;;;;;;;;;;;;;;;;IAoBI","sourcesContent":["import { LitElement, html } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { styles } from './sds-button.styles';\n\ntype ButtonType = 'button' | 'submit' | 'reset';\ntype ButtonVariant = 'primary' | 'secondary' | 'tertiary' | 'critical';\ntype ButtonSize = 'large' | 'medium' | 'small';\n\nexport interface SDSButtonProps {\n\ttype?: ButtonType;\n\tvariant?: ButtonVariant;\n\tsize?: ButtonSize;\n\tdisabled?: boolean;\n\tname?: string;\n\tvalue?: string;\n\tform?: string;\n\tonClick?: (event: CustomEvent) => void;\n\tonSubmit?: (event: CustomEvent) => void;\n\tonReset?: (event: CustomEvent) => void;\n}\n\n@customElement('sds-button')\nexport class SDSButton extends LitElement {\n\tstatic override styles = [styles];\n\n\tstatic formAssociated = true;\n\tpublic readonly internals: ElementInternals;\n\n\t@property({ type: String, reflect: true })\n\ttype: ButtonType = 'button';\n\n\t@property({ type: String, reflect: true })\n\tvariant: ButtonVariant = 'primary';\n\n\t@property({ type: String, reflect: true })\n\tsize: ButtonSize = 'large';\n\n\t@property({ type: Boolean, reflect: true }) disabled: boolean = false;\n\t@property({ type: String, reflect: true }) name?: string;\n\t@property({ type: String, reflect: true }) value: string = '';\n\t@property({ type: String, reflect: true }) form?: string;\n\n\tconstructor() {\n\t\tsuper();\n\t\tthis.internals = this.attachInternals();\n\t\tthis.attachShadow({ mode: 'open', delegatesFocus: true });\n\t}\n\n\tprivate readonly _handleClick = (event: MouseEvent) => {\n\t\tevent.preventDefault();\n\t\tevent.stopImmediatePropagation();\n\n\t\tif (!this.disabled) {\n\t\t\tswitch (this.type) {\n\t\t\t\tcase 'submit': {\n\t\t\t\t\tconst submitEvent = new CustomEvent('submit', {\n\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t\tcancelable: true,\n\t\t\t\t\t});\n\t\t\t\t\tconst shouldSubmit = this.dispatchEvent(submitEvent);\n\n\t\t\t\t\tif (shouldSubmit) {\n\t\t\t\t\t\tif (this.form) {\n\t\t\t\t\t\t\tconst root = this.getRootNode() as Document | ShadowRoot;\n\t\t\t\t\t\t\tconst formElement: HTMLFormElement | null = root.querySelector(`form#${this.form}`);\n\t\t\t\t\t\t\tformElement?.submit();\n\t\t\t\t\t\t} else if (this.internals.form) {\n\t\t\t\t\t\t\tthis.internals.form.submit();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tcase 'reset': {\n\t\t\t\t\tconst resetEvent = new CustomEvent('reset', {\n\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t\tcancelable: true,\n\t\t\t\t\t});\n\t\t\t\t\tconst shouldReset = this.dispatchEvent(resetEvent);\n\n\t\t\t\t\tif (shouldReset) {\n\t\t\t\t\t\tif (this.form) {\n\t\t\t\t\t\t\tconst root = this.getRootNode() as Document | ShadowRoot;\n\t\t\t\t\t\t\tconst formElement: HTMLFormElement | null = root.querySelector(`form#${this.form}`);\n\t\t\t\t\t\t\tformElement?.reset();\n\t\t\t\t\t\t} else if (this.internals.form) {\n\t\t\t\t\t\t\tthis.internals.form.reset();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tdefault:\n\t\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\t\tnew CustomEvent('click', {\n\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t\t})\n\t\t\t\t\t);\n\t\t\t}\n\t\t}\n\t};\n\n\toverride focus(): void {\n\t\tif (!this.disabled) this.shadowRoot?.querySelector('button')?.focus();\n\t}\n\n\toverride blur(): void {\n\t\tif (!this.disabled) this.shadowRoot?.querySelector('button')?.blur();\n\t}\n\n\toverride click(): void {\n\t\tif (!this.disabled) this.shadowRoot?.querySelector('button')?.click();\n\t}\n\n\toverride render() {\n\t\tconst buttonClasses = {\n\t\t\t'sds-button': true,\n\t\t\t'sds-button--secondary': this.variant === 'secondary',\n\t\t\t'sds-button--tertiary': this.variant === 'tertiary',\n\t\t\t'sds-button--critical': this.variant === 'critical',\n\t\t\t'sds-button--medium': this.size === 'medium',\n\t\t\t'sds-button--small': this.size === 'small',\n\t\t};\n\n\t\treturn html`\n\t\t\t<button\n\t\t\t\tid=\"control\"\n\t\t\t\tform=\"${ifDefined(this.form)}\"\n\t\t\t\tclass=\"${classMap(buttonClasses)}\"\n\t\t\t\ttype=\"${this.type}\"\n\t\t\t\tname=\"${ifDefined(this.name)}\"\n\t\t\t\tvalue=\"${ifDefined(this.value)}\"\n\t\t\t\t?disabled=\"${this.disabled}\"\n\t\t\t\t@click=\"${this._handleClick}\"\n\t\t\t>\n\t\t\t\t<slot name=\"before\"></slot>\n\t\t\t\t<slot></slot>\n\t\t\t\t<slot name=\"after\"></slot>\n\t\t\t</button>\n\t\t`;\n\t}\n}\n\ndeclare global {\n\t// HTML\n\tinterface HTMLElementTagNameMap {\n\t\t'sds-button': SDSButton;\n\t}\n\n\t/*// React\n\tnamespace JSX {\n\t\tinterface IntrinsicElements {\n\t\t\t'sds-button': SDSButtonProps & React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;\n\t\t}\n\t}*/\n}\n\n/*// NextJs\ndeclare module 'react' {\n\tnamespace JSX {\n\t\tinterface IntrinsicElements {\n\t\t\t'sds-button': SDSButtonProps & React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;\n\t\t}\n\t}\n}*/\n\n/*\n// Angular\ndeclare module '@angular/core' {\n\tinterface IntrinsicElements {\n\t\t'sds-button': SDSButtonProps;\n\t}\n}\n\n// Vue\ndeclare module 'vue' {\n\texport interface GlobalComponents {\n\t\t'sds-button': SDSButtonProps;\n\t}\n}\n\n// Svelte\ndeclare namespace svelteHTML {\n\tinterface HTMLAttributes<T> {\n\t\t'sds-button'?: SDSButtonProps;\n\t}\n} */\n"]}
1
+ {"version":3,"file":"sds-button.js","sourceRoot":"","sources":["../../src/sds-button/sds-button.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,SAAS,EA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AAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;2CAA2B;AAC3B;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;uCAAe;AACd;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;wCAAoB;AACnB;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;uCAAe;AAlB7C,SAAS;IADrB,aAAa,CAAC,YAAY,CAAC;GACf,SAAS,CA0HrB","sourcesContent":["import { LitElement, html } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { styles } from './sds-button.styles';\n\ntype ButtonType = 'button' | 'submit' | 'reset';\ntype ButtonVariant = 'primary' | 'secondary' | 'tertiary' | 'critical';\ntype ButtonSize = 'large' | 'medium' | 'small';\n\nexport interface SDSButtonProps {\n\ttype?: ButtonType;\n\tvariant?: ButtonVariant;\n\tsize?: ButtonSize;\n\tdisabled?: boolean;\n\tname?: string;\n\tvalue?: string;\n\tform?: string;\n\tonClick?: (event: CustomEvent) => void;\n\tonSubmit?: (event: CustomEvent) => void;\n\tonReset?: (event: CustomEvent) => void;\n}\n\n@customElement('sds-button')\nexport class SDSButton extends LitElement {\n\tstatic override styles = [styles];\n\n\tstatic formAssociated = true;\n\tpublic readonly internals: ElementInternals;\n\n\t@property({ type: String, reflect: true })\n\ttype: ButtonType = 'button';\n\n\t@property({ type: String, reflect: true })\n\tvariant: ButtonVariant = 'primary';\n\n\t@property({ type: String, reflect: true })\n\tsize: ButtonSize = 'large';\n\n\t@property({ type: Boolean, reflect: true }) disabled: boolean = false;\n\t@property({ type: String, reflect: true }) name?: string;\n\t@property({ type: String, reflect: true }) value: string = '';\n\t@property({ type: String, reflect: true }) form?: string;\n\n\tconstructor() {\n\t\tsuper();\n\t\tthis.internals = this.attachInternals();\n\t\tthis.attachShadow({ mode: 'open', delegatesFocus: true });\n\t}\n\n\tprivate readonly _handleClick = (event: MouseEvent) => {\n\t\tevent.preventDefault();\n\t\tevent.stopImmediatePropagation();\n\n\t\tif (!this.disabled) {\n\t\t\tswitch (this.type) {\n\t\t\t\tcase 'submit': {\n\t\t\t\t\tconst submitEvent = new CustomEvent('submit', {\n\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t\tcancelable: true,\n\t\t\t\t\t});\n\t\t\t\t\tconst shouldSubmit = this.dispatchEvent(submitEvent);\n\n\t\t\t\t\tif (shouldSubmit) {\n\t\t\t\t\t\tif (this.form) {\n\t\t\t\t\t\t\tconst root = this.getRootNode() as Document | ShadowRoot;\n\t\t\t\t\t\t\tconst formElement: HTMLFormElement | null = root.querySelector(`form#${this.form}`);\n\t\t\t\t\t\t\tformElement?.submit();\n\t\t\t\t\t\t} else if (this.internals.form) {\n\t\t\t\t\t\t\tthis.internals.form.submit();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tcase 'reset': {\n\t\t\t\t\tconst resetEvent = new CustomEvent('reset', {\n\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t\tcancelable: true,\n\t\t\t\t\t});\n\t\t\t\t\tconst shouldReset = this.dispatchEvent(resetEvent);\n\n\t\t\t\t\tif (shouldReset) {\n\t\t\t\t\t\tif (this.form) {\n\t\t\t\t\t\t\tconst root = this.getRootNode() as Document | ShadowRoot;\n\t\t\t\t\t\t\tconst formElement: HTMLFormElement | null = root.querySelector(`form#${this.form}`);\n\t\t\t\t\t\t\tformElement?.reset();\n\t\t\t\t\t\t} else if (this.internals.form) {\n\t\t\t\t\t\t\tthis.internals.form.reset();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tdefault:\n\t\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\t\tnew CustomEvent('click', {\n\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t\t})\n\t\t\t\t\t);\n\t\t\t}\n\t\t}\n\t};\n\n\toverride focus(): void {\n\t\tif (!this.disabled) this.shadowRoot?.querySelector('button')?.focus();\n\t}\n\n\toverride blur(): void {\n\t\tif (!this.disabled) this.shadowRoot?.querySelector('button')?.blur();\n\t}\n\n\toverride click(): void {\n\t\tif (!this.disabled) this.shadowRoot?.querySelector('button')?.click();\n\t}\n\n\toverride render() {\n\t\tconst buttonClasses = {\n\t\t\t'sds-button': true,\n\t\t\t'sds-button--secondary': this.variant === 'secondary',\n\t\t\t'sds-button--tertiary': this.variant === 'tertiary',\n\t\t\t'sds-button--critical': this.variant === 'critical',\n\t\t\t'sds-button--medium': this.size === 'medium',\n\t\t\t'sds-button--small': this.size === 'small',\n\t\t};\n\n\t\treturn html`\n\t\t\t<button\n\t\t\t\tid=\"control\"\n\t\t\t\tform=\"${ifDefined(this.form)}\"\n\t\t\t\tclass=\"${classMap(buttonClasses)}\"\n\t\t\t\ttype=\"${this.type}\"\n\t\t\t\tname=\"${ifDefined(this.name)}\"\n\t\t\t\tvalue=\"${ifDefined(this.value)}\"\n\t\t\t\t?disabled=\"${this.disabled}\"\n\t\t\t\t@click=\"${this._handleClick}\"\n\t\t\t>\n\t\t\t\t<slot name=\"before\"></slot>\n\t\t\t\t<slot></slot>\n\t\t\t\t<slot name=\"after\"></slot>\n\t\t\t</button>\n\t\t`;\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'sds-button': SDSButton;\n\t}\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"sds-checkbox.d.ts","sourceRoot":"","sources":["../../src/sds-checkbox/sds-checkbox.ts"],"names":[],"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C,QAAQ,CAAC,WAAW,CAS1B;IAEO,KAAK,IAAI,IAAI;IAIb,IAAI,IAAI,IAAI;IAIZ,KAAK,IAAI,IAAI;IAIb,MAAM;CA8Bf;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,cAAc,EAAE,WAAW,CAAC;KAC5B;CACD"}
@@ -113,33 +113,4 @@ SDSCheckbox = __decorate([
113
113
  customElement('sds-checkbox')
114
114
  ], SDSCheckbox);
115
115
  export { SDSCheckbox };
116
- /*// NextJs
117
- declare module 'react' {
118
- namespace JSX {
119
- interface IntrinsicElements {
120
- 'sds-checkbox': SDSCheckboxProps & React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
121
- }
122
- }
123
- }*/
124
- /*
125
- // Angular
126
- declare module '@angular/core' {
127
- interface IntrinsicElements {
128
- 'sds-checkbox': SDSCheckboxProps;
129
- }
130
- }
131
-
132
- // Vue
133
- declare module 'vue' {
134
- export interface GlobalComponents {
135
- 'sds-checkbox': SDSCheckboxProps;
136
- }
137
- }
138
-
139
- // Svelte
140
- declare namespace svelteHTML {
141
- interface HTMLAttributes<T> {
142
- 'sds-checkbox'?: SDSCheckboxProps;
143
- }
144
- } */
145
116
  //# sourceMappingURL=sds-checkbox.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"sds-checkbox.js","sourceRoot":"","sources":["../../src/sds-checkbox/sds-checkbox.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAgBxC,IAAM,WAAW,GAAjB,MAAM,WAAY,S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AS,CAAC,CAAC,CAAC,OAAO;;;GAGtF,CAAC;IACH,CAAC;;AAnGD,UAAU;AACM,kBAAM,GAAG,CAAC,MAAM,CAAC,AAAX,CAAY;AAE3B,0BAAc,GAAG,IAAI,AAAP,CAAQ;AAIc;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;yCAAe;AACd;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;0CAAgB;AAC9B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;0CAAgB;AACC;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;4CAAiB;AAChB;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;6CAAkB;AACjB;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;0CAAe;AAb9C,WAAW;IADvB,aAAa,CAAC,cAAc,CAAC;GACjB,WAAW,CAqGvB;;AAgBD;;;;;;;GAOG;AAEH;;;;;;;;;;;;;;;;;;;;IAoBI","sourcesContent":["import { LitElement, html, nothing } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { styles } from './sds-checkbox.styles';\n\n// Props Interface\nexport interface SDSCheckboxProps {\n\tname?: string;\n\tlabel?: string;\n\tvalue?: string;\n\tchecked?: boolean;\n\tdisabled?: boolean;\n\terror?: boolean;\n\tonChange?: (event: CustomEvent<{ checked: boolean; value: string }>) => void;\n\tonFocus?: (event: CustomEvent<{ checked: boolean }>) => void;\n\tonBlur?: (event: CustomEvent<{ checked: boolean }>) => void;\n}\n\n@customElement('sds-checkbox')\nexport class SDSCheckbox extends LitElement {\n\t// Styling\n\tstatic override styles = [styles];\n\n\tstatic formAssociated = true;\n\tpublic readonly internals: ElementInternals;\n\n\t// Props\n\t@property({ type: String, reflect: true }) name?: string;\n\t@property({ type: String, reflect: true }) label?: string;\n\t@property({ type: String }) value?: string;\n\t@property({ type: Boolean, reflect: true }) checked = false;\n\t@property({ type: Boolean, reflect: true }) disabled = false;\n\t@property({ type: Boolean, reflect: true }) error = false;\n\n\tconstructor() {\n\t\tsuper();\n\t\tthis.internals = this.attachInternals();\n\t\tthis.attachShadow({ mode: 'open', delegatesFocus: true });\n\t}\n\n\t// Event handling\n\tprivate readonly _handleChange = (event: Event) => {\n\t\tevent.stopImmediatePropagation();\n\t\tif (!this.disabled) {\n\t\t\tconst elem = event.target as HTMLInputElement;\n\t\t\tthis.checked = elem.checked;\n\t\t\tthis.dispatchEvent(\n\t\t\t\tnew CustomEvent('change', {\n\t\t\t\t\tdetail: { checked: this.checked, value: elem.value },\n\t\t\t\t\tbubbles: true,\n\t\t\t\t\tcomposed: true,\n\t\t\t\t})\n\t\t\t);\n\t\t}\n\t};\n\n\tprivate readonly _handleFocus = (event: FocusEvent) => {\n\t\tevent.stopImmediatePropagation();\n\t\tthis.dispatchEvent(\n\t\t\tnew CustomEvent('focus', {\n\t\t\t\tdetail: { checked: this.checked },\n\t\t\t\tbubbles: true,\n\t\t\t\tcomposed: true,\n\t\t\t})\n\t\t);\n\t};\n\n\tprivate readonly _handleBlur = (event: FocusEvent) => {\n\t\tevent.stopImmediatePropagation();\n\t\tthis.dispatchEvent(\n\t\t\tnew CustomEvent('blur', {\n\t\t\t\tdetail: { checked: this.checked },\n\t\t\t\tbubbles: true,\n\t\t\t\tcomposed: true,\n\t\t\t})\n\t\t);\n\t};\n\n\toverride focus(): void {\n\t\tif (!this.disabled) this.shadowRoot?.querySelector('input')?.focus();\n\t}\n\n\toverride blur(): void {\n\t\tif (!this.disabled) this.shadowRoot?.querySelector('input')?.blur();\n\t}\n\n\toverride click(): void {\n\t\tif (!this.disabled) this.shadowRoot?.querySelector('input')?.click();\n\t}\n\n\toverride render() {\n\t\tconst checkboxClasses = {\n\t\t\t'sds-checkbox': true,\n\t\t\t'sds-checkbox--error': Boolean(this.error),\n\t\t};\n\n\t\tconst inputClasses = {\n\t\t\t'sds-checkbox__input': true,\n\t\t\t'sds-checkbox__input--error': Boolean(this.error),\n\t\t};\n\n\t\treturn html`\n\t\t\t<div class=\"${classMap(checkboxClasses)}\">\n\t\t\t\t<label class=\"sds-checkbox__label\">\n\t\t\t\t\t<input\n\t\t\t\t\t\ttype=\"checkbox\"\n\t\t\t\t\t\tname=\"${ifDefined(this.name)}\"\n\t\t\t\t\t\tvalue=\"${ifDefined(this.value)}\"\n\t\t\t\t\t\t?checked=\"${this.checked}\"\n\t\t\t\t\t\t?disabled=\"${this.disabled}\"\n\t\t\t\t\t\t@change=\"${this._handleChange}\"\n\t\t\t\t\t\t@focus=\"${this._handleFocus}\"\n\t\t\t\t\t\t@blur=\"${this._handleBlur}\"\n\t\t\t\t\t\tclass=\"${classMap(inputClasses)}\"\n\t\t\t\t\t/>\n\t\t\t\t\t${this.label ? html`<span class=\"sds-checkbox__text\">${this.label}</span>` : nothing}\n\t\t\t\t</label>\n\t\t\t</div>\n\t\t`;\n\t}\n}\n\ndeclare global {\n\t// HTML\n\tinterface HTMLElementTagNameMap {\n\t\t'sds-checkbox': SDSCheckbox;\n\t}\n\n\t/*// React\n\tnamespace JSX {\n\t\tinterface IntrinsicElements {\n\t\t\t'sds-checkbox': SDSCheckboxProps & React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;\n\t\t}\n\t}*/\n}\n\n/*// NextJs\ndeclare module 'react' {\n\tnamespace JSX {\n\t\tinterface IntrinsicElements {\n\t\t\t'sds-checkbox': SDSCheckboxProps & React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;\n\t\t}\n\t}\n}*/\n\n/*\n// Angular\ndeclare module '@angular/core' {\n\tinterface IntrinsicElements {\n\t\t'sds-checkbox': SDSCheckboxProps;\n\t}\n}\n\n// Vue\ndeclare module 'vue' {\n\texport interface GlobalComponents {\n\t\t'sds-checkbox': SDSCheckboxProps;\n\t}\n}\n\n// Svelte\ndeclare namespace svelteHTML {\n\tinterface HTMLAttributes<T> {\n\t\t'sds-checkbox'?: SDSCheckboxProps;\n\t}\n} */\n"]}
1
+ {"version":3,"file":"sds-checkbox.js","sourceRoot":"","sources":["../../src/sds-checkbox/sds-checkbox.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAgBxC,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,UAAU;IAe1C;QACC,KAAK,EAAE,CAAC;QALmC,YAAO,GAAG,KAAK,CAAC;QAChB,aAAQ,GAAG,KAAK,CAAC;QACjB,UAAK,GAAG,KAAK,CAAC;QAQ1D,iBAAiB;QACA,kBAAa,GAAG,CAAC,KAAY,EAAE,EAAE;YACjD,KAAK,CAAC,wBAAwB,EAAE,CAAC;YACjC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;gBACpB,MAAM,IAAI,GAAG,KAAK,CAAC,MAA0B,CAAC;gBAC9C,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;gBAC5B,IAAI,CAAC,aAAa,CACjB,IAAI,WAAW,CAAC,QAAQ,EAAE;oBACzB,MAAM,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE;oBACpD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OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;6CAAkB;AACjB;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;0CAAe;AAb9C,WAAW;IADvB,aAAa,CAAC,cAAc,CAAC;GACjB,WAAW,CAqGvB","sourcesContent":["import { LitElement, html, nothing } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { styles } from './sds-checkbox.styles';\n\n// Props Interface\nexport interface SDSCheckboxProps {\n\tname?: string;\n\tlabel?: string;\n\tvalue?: string;\n\tchecked?: boolean;\n\tdisabled?: boolean;\n\terror?: boolean;\n\tonChange?: (event: CustomEvent<{ checked: boolean; value: string }>) => void;\n\tonFocus?: (event: CustomEvent<{ checked: boolean }>) => void;\n\tonBlur?: (event: CustomEvent<{ checked: boolean }>) => void;\n}\n\n@customElement('sds-checkbox')\nexport class SDSCheckbox extends LitElement {\n\t// Styling\n\tstatic override styles = [styles];\n\n\tstatic formAssociated = true;\n\tpublic readonly internals: ElementInternals;\n\n\t// Props\n\t@property({ type: String, reflect: true }) name?: string;\n\t@property({ type: String, reflect: true }) label?: string;\n\t@property({ type: String }) value?: string;\n\t@property({ type: Boolean, reflect: true }) checked = false;\n\t@property({ type: Boolean, reflect: true }) disabled = false;\n\t@property({ type: Boolean, reflect: true }) error = false;\n\n\tconstructor() {\n\t\tsuper();\n\t\tthis.internals = this.attachInternals();\n\t\tthis.attachShadow({ mode: 'open', delegatesFocus: true });\n\t}\n\n\t// Event handling\n\tprivate readonly _handleChange = (event: Event) => {\n\t\tevent.stopImmediatePropagation();\n\t\tif (!this.disabled) {\n\t\t\tconst elem = event.target as HTMLInputElement;\n\t\t\tthis.checked = elem.checked;\n\t\t\tthis.dispatchEvent(\n\t\t\t\tnew CustomEvent('change', {\n\t\t\t\t\tdetail: { checked: this.checked, value: elem.value },\n\t\t\t\t\tbubbles: true,\n\t\t\t\t\tcomposed: true,\n\t\t\t\t})\n\t\t\t);\n\t\t}\n\t};\n\n\tprivate readonly _handleFocus = (event: FocusEvent) => {\n\t\tevent.stopImmediatePropagation();\n\t\tthis.dispatchEvent(\n\t\t\tnew CustomEvent('focus', {\n\t\t\t\tdetail: { checked: this.checked },\n\t\t\t\tbubbles: true,\n\t\t\t\tcomposed: true,\n\t\t\t})\n\t\t);\n\t};\n\n\tprivate readonly _handleBlur = (event: FocusEvent) => {\n\t\tevent.stopImmediatePropagation();\n\t\tthis.dispatchEvent(\n\t\t\tnew CustomEvent('blur', {\n\t\t\t\tdetail: { checked: this.checked },\n\t\t\t\tbubbles: true,\n\t\t\t\tcomposed: true,\n\t\t\t})\n\t\t);\n\t};\n\n\toverride focus(): void {\n\t\tif (!this.disabled) this.shadowRoot?.querySelector('input')?.focus();\n\t}\n\n\toverride blur(): void {\n\t\tif (!this.disabled) this.shadowRoot?.querySelector('input')?.blur();\n\t}\n\n\toverride click(): void {\n\t\tif (!this.disabled) this.shadowRoot?.querySelector('input')?.click();\n\t}\n\n\toverride render() {\n\t\tconst checkboxClasses = {\n\t\t\t'sds-checkbox': true,\n\t\t\t'sds-checkbox--error': Boolean(this.error),\n\t\t};\n\n\t\tconst inputClasses = {\n\t\t\t'sds-checkbox__input': true,\n\t\t\t'sds-checkbox__input--error': Boolean(this.error),\n\t\t};\n\n\t\treturn html`\n\t\t\t<div class=\"${classMap(checkboxClasses)}\">\n\t\t\t\t<label class=\"sds-checkbox__label\">\n\t\t\t\t\t<input\n\t\t\t\t\t\ttype=\"checkbox\"\n\t\t\t\t\t\tname=\"${ifDefined(this.name)}\"\n\t\t\t\t\t\tvalue=\"${ifDefined(this.value)}\"\n\t\t\t\t\t\t?checked=\"${this.checked}\"\n\t\t\t\t\t\t?disabled=\"${this.disabled}\"\n\t\t\t\t\t\t@change=\"${this._handleChange}\"\n\t\t\t\t\t\t@focus=\"${this._handleFocus}\"\n\t\t\t\t\t\t@blur=\"${this._handleBlur}\"\n\t\t\t\t\t\tclass=\"${classMap(inputClasses)}\"\n\t\t\t\t\t/>\n\t\t\t\t\t${this.label ? html`<span class=\"sds-checkbox__text\">${this.label}</span>` : nothing}\n\t\t\t\t</label>\n\t\t\t</div>\n\t\t`;\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'sds-checkbox': SDSCheckbox;\n\t}\n}\n"]}
@@ -1,7 +1,7 @@
1
1
  import { LitElement } from 'lit';
2
2
  import '../sds-checkbox/sds-checkbox';
3
3
  import '../sds-icon/sds-icon';
4
- interface SDSCheckboxGroupProps {
4
+ export interface SDSCheckboxGroupProps {
5
5
  legend?: string;
6
6
  'help-text'?: string;
7
7
  'error-message'?: string;
@@ -22,18 +22,5 @@ declare global {
22
22
  interface HTMLElementTagNameMap {
23
23
  'sds-checkbox-group': SDSCheckboxGroup;
24
24
  }
25
- namespace JSX {
26
- interface IntrinsicElements {
27
- 'sds-checkbox-group': SDSCheckboxGroupProps & React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
28
- }
29
- }
30
- }
31
- declare module 'react' {
32
- namespace JSX {
33
- interface IntrinsicElements {
34
- 'sds-checkbox-group': SDSCheckboxGroupProps & React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
35
- }
36
- }
37
25
  }
38
- export {};
39
26
  //# sourceMappingURL=sds-checkbox-group.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sds-checkbox-group.d.ts","sourceRoot":"","sources":["../../src/sds-checkbox-group/sds-checkbox-group.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAiB,MAAM,KAAK,CAAC;AAKhD,OAAO,8BAA8B,CAAC;AACtC,OAAO,sBAAsB,CAAC;AAG9B,UAAU,qBAAqB;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAA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M,CAAC;IACzB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC;QAAE,cAAc,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC,KAAK,IAAI,CAAC;CACtE;AAED,qBACa,gBAAiB,SAAQ,UAAU;IAE/C,OAAgB,MAAM,4BAAY;IAGS,MAAM,CAAC,EAAE,MAAM,CAAC;IACQ,QAAQ,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,CAAC;IAG7F,OAAO,CAAC,cAAc,CAAgB;IAEtC,OAAO,CAAC,QAAQ,CAAC,qBAAqB,CAgBpC;IAEO,MAAM;CA0Bf;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,oBAAoB,EAAE,gBAAgB,CAAC;KACvC;CACD"}
@@ -72,25 +72,4 @@ SDSCheckboxGroup = __decorate([
72
72
  customElement('sds-checkbox-group')
73
73
  ], SDSCheckboxGroup);
74
74
  export { SDSCheckboxGroup };
75
- /*
76
- // Angular
77
- declare module '@angular/core' {
78
- interface IntrinsicElements {
79
- 'sds-checkbox-group': SDSCheckboxGroupProps;
80
- }
81
- }
82
-
83
- // Vue
84
- declare module 'vue' {
85
- export interface GlobalComponents {
86
- 'sds-checkbox-group': SDSCheckboxGroupProps;
87
- }
88
- }
89
-
90
- // Svelte
91
- declare namespace svelteHTML {
92
- interface HTMLAttributes<T> {
93
- 'sds-checkbox-group'?: SDSCheckboxGroupProps;
94
- }
95
- } */
96
75
  //# sourceMappingURL=sds-checkbox-group.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"sds-checkbox-group.js","sourceRoot":"","sources":["../../src/sds-checkbox-group/sds-checkbox-group.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,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CAAA,4CAA4C,IAAI,CAAC,QAAQ,MAAM,CAAC,CAAC,CAAC,OAAO;;qBAE9E,IAAI,CAAC,qBAAqB;;MAEzC,IAAI,CAAC,YAAY;YAClB,CAAC,CAAC,IAAI,CAAA;;;;;;SAMF,IAAI,CAAC,YAAY;WACf;YACN,CAAC,CAAC,OAAO;;GAEX,CAAC;IACH,CAAC;;AAtDD,UAAU;AACM,uBAAM,GAAG,CAAC,MAAM,CAAC,AAAX,CAAY;AAGS;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;gDAAiB;AACQ;IAAlE,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;kDAAmB;AACd;IAAtE,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,eAAe,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;sDAAuB;AAGrF;IADP,KAAK,EAAE;wDAC8B;AAV1B,gBAAgB;IAD5B,aAAa,CAAC,oBAAoB,CAAC;GACvB,gBAAgB,CAwD5B;;AA2BD;;;;;;;;;;;;;;;;;;;;IAoBI","sourcesContent":["import { LitElement, html, nothing } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { styles } from './sds-checkbox-group.styles';\n\nimport '../sds-checkbox/sds-checkbox';\nimport '../sds-icon/sds-icon';\n\n// Props Interface\ninterface SDSCheckboxGroupProps {\n\tlegend?: string;\n\t'help-text'?: string;\n\t'error-message'?: string;\n\tonChange?: (event: CustomEvent<{ selectedValues: string[] }>) => void;\n}\n\n@customElement('sds-checkbox-group')\nexport class SDSCheckboxGroup extends LitElement {\n\t// Styling\n\tstatic override styles = [styles];\n\n\t// Props\n\t@property({ type: String, reflect: true }) legend?: string;\n\t@property({ type: String, attribute: 'help-text', reflect: true }) helpText?: string;\n\t@property({ type: String, attribute: 'error-message', reflect: true }) errorMessage?: string;\n\n\t@state()\n\tprivate selectedValues: string[] = [];\n\n\tprivate readonly _handleCheckboxChange = (event: CustomEvent): void => {\n\t\tconst checkbox = event.target as HTMLInputElement;\n\t\tconst value = checkbox.value;\n\t\tconst isChecked = checkbox.checked;\n\n\t\tthis.selectedValues = isChecked\n\t\t\t? [...this.selectedValues, value]\n\t\t\t: this.selectedValues.filter((v) => v !== value);\n\n\t\tthis.dispatchEvent(\n\t\t\tnew CustomEvent('change', {\n\t\t\t\tdetail: { selectedValues: this.selectedValues },\n\t\t\t\tbubbles: true,\n\t\t\t\tcomposed: true,\n\t\t\t})\n\t\t);\n\t};\n\n\toverride render() {\n\t\tconst groupClasses = {\n\t\t\t'sds-checkbox-group': true,\n\t\t\t'sds-checkbox-group--error': Boolean(this.errorMessage),\n\t\t};\n\n\t\treturn html`\n\t\t\t<fieldset class=\"${classMap(groupClasses)}\">\n\t\t\t\t${this.legend ? html`<legend class=\"sds-checkbox-group__legend\">${this.legend}</legend>` : nothing}\n\t\t\t\t${this.helpText ? html`<p class=\"sds-checkbox-group__help-text\">${this.helpText}</p>` : nothing}\n\t\t\t\t<div class=\"sds-checkbox-group__checkboxes\">\n\t\t\t\t\t<slot @change=${this._handleCheckboxChange}></slot>\n\t\t\t\t</div>\n\t\t\t\t${this.errorMessage\n\t\t\t\t\t? html`<p class=\"sds-checkbox-group__error-message\">\n\t\t\t\t\t\t\t<sds-icon\n\t\t\t\t\t\t\t\tname=\"warning-material-filled\"\n\t\t\t\t\t\t\t\tsize=\"m\"\n\t\t\t\t\t\t\t\tcolor=\"var(--sds-color-semantic-icon-critical)\"\n\t\t\t\t\t\t\t></sds-icon>\n\t\t\t\t\t\t\t${this.errorMessage}\n\t\t\t\t\t\t</p>`\n\t\t\t\t\t: nothing}\n\t\t\t</fieldset>\n\t\t`;\n\t}\n}\n\ndeclare global {\n\t// HTML\n\tinterface HTMLElementTagNameMap {\n\t\t'sds-checkbox-group': SDSCheckboxGroup;\n\t}\n\n\t// React\n\tnamespace JSX {\n\t\tinterface IntrinsicElements {\n\t\t\t'sds-checkbox-group': SDSCheckboxGroupProps &\n\t\t\t\tReact.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;\n\t\t}\n\t}\n}\n\n// NextJs\ndeclare module 'react' {\n\tnamespace JSX {\n\t\tinterface IntrinsicElements {\n\t\t\t'sds-checkbox-group': SDSCheckboxGroupProps &\n\t\t\t\tReact.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;\n\t\t}\n\t}\n}\n\n/*\n// Angular\ndeclare module '@angular/core' {\n\tinterface IntrinsicElements {\n\t\t'sds-checkbox-group': SDSCheckboxGroupProps;\n\t}\n}\n\n// Vue\ndeclare module 'vue' {\n\texport interface GlobalComponents {\n\t\t'sds-checkbox-group': SDSCheckboxGroupProps;\n\t}\n}\n\n// Svelte\ndeclare namespace svelteHTML {\n\tinterface HTMLAttributes<T> {\n\t\t'sds-checkbox-group'?: SDSCheckboxGroupProps;\n\t}\n} */\n"]}
1
+ {"version":3,"file":"sds-checkbox-group.js","sourceRoot":"","sources":["../../src/sds-checkbox-group/sds-checkbox-group.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAErD,OAAO,8BAA8B,CAAC;AACtC,OAAO,sBAAsB,CAAC;AAWvB,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,UAAU;IAAzC;;QAUE,mBAAc,GAAa,EAAE,CAAC;QAErB,0BAAqB,GAAG,CAAC,KAAkB,EAAQ,EAAE;YACrE,MAAM,QAAQ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1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;gDAAiB;AACQ;IAAlE,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;kDAAmB;AACd;IAAtE,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,eAAe,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;sDAAuB;AAGrF;IADP,KAAK,EAAE;wDAC8B;AAV1B,gBAAgB;IAD5B,aAAa,CAAC,oBAAoB,CAAC;GACvB,gBAAgB,CAwD5B","sourcesContent":["import { LitElement, html, nothing } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { styles } from './sds-checkbox-group.styles';\n\nimport '../sds-checkbox/sds-checkbox';\nimport '../sds-icon/sds-icon';\n\n// Props Interface\nexport interface SDSCheckboxGroupProps {\n\tlegend?: string;\n\t'help-text'?: string;\n\t'error-message'?: string;\n\tonChange?: (event: CustomEvent<{ selectedValues: string[] }>) => void;\n}\n\n@customElement('sds-checkbox-group')\nexport class SDSCheckboxGroup extends LitElement {\n\t// Styling\n\tstatic override styles = [styles];\n\n\t// Props\n\t@property({ type: String, reflect: true }) legend?: string;\n\t@property({ type: String, attribute: 'help-text', reflect: true }) helpText?: string;\n\t@property({ type: String, attribute: 'error-message', reflect: true }) errorMessage?: string;\n\n\t@state()\n\tprivate selectedValues: string[] = [];\n\n\tprivate readonly _handleCheckboxChange = (event: CustomEvent): void => {\n\t\tconst checkbox = event.target as HTMLInputElement;\n\t\tconst value = checkbox.value;\n\t\tconst isChecked = checkbox.checked;\n\n\t\tthis.selectedValues = isChecked\n\t\t\t? [...this.selectedValues, value]\n\t\t\t: this.selectedValues.filter((v) => v !== value);\n\n\t\tthis.dispatchEvent(\n\t\t\tnew CustomEvent('change', {\n\t\t\t\tdetail: { selectedValues: this.selectedValues },\n\t\t\t\tbubbles: true,\n\t\t\t\tcomposed: true,\n\t\t\t})\n\t\t);\n\t};\n\n\toverride render() {\n\t\tconst groupClasses = {\n\t\t\t'sds-checkbox-group': true,\n\t\t\t'sds-checkbox-group--error': Boolean(this.errorMessage),\n\t\t};\n\n\t\treturn html`\n\t\t\t<fieldset class=\"${classMap(groupClasses)}\">\n\t\t\t\t${this.legend ? html`<legend class=\"sds-checkbox-group__legend\">${this.legend}</legend>` : nothing}\n\t\t\t\t${this.helpText ? html`<p class=\"sds-checkbox-group__help-text\">${this.helpText}</p>` : nothing}\n\t\t\t\t<div class=\"sds-checkbox-group__checkboxes\">\n\t\t\t\t\t<slot @change=${this._handleCheckboxChange}></slot>\n\t\t\t\t</div>\n\t\t\t\t${this.errorMessage\n\t\t\t\t\t? html`<p class=\"sds-checkbox-group__error-message\">\n\t\t\t\t\t\t\t<sds-icon\n\t\t\t\t\t\t\t\tname=\"warning-material-filled\"\n\t\t\t\t\t\t\t\tsize=\"m\"\n\t\t\t\t\t\t\t\tcolor=\"var(--sds-color-semantic-icon-critical)\"\n\t\t\t\t\t\t\t></sds-icon>\n\t\t\t\t\t\t\t${this.errorMessage}\n\t\t\t\t\t\t</p>`\n\t\t\t\t\t: nothing}\n\t\t\t</fieldset>\n\t\t`;\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'sds-checkbox-group': SDSCheckboxGroup;\n\t}\n}\n"]}
@@ -2,7 +2,7 @@ import { LitElement } from 'lit';
2
2
  import '../sds-icon/sds-icon';
3
3
  type ChipVariant = 'selectable' | 'removable';
4
4
  type ChipSize = 'large' | 'small';
5
- interface SDSChipProps {
5
+ export interface SDSChipProps {
6
6
  variant?: ChipVariant;
7
7
  size?: ChipSize;
8
8
  checked?: boolean;
@@ -34,18 +34,6 @@ declare global {
34
34
  interface HTMLElementTagNameMap {
35
35
  'sds-chip': SDSChip;
36
36
  }
37
- namespace JSX {
38
- interface IntrinsicElements {
39
- 'sds-chip': SDSChipProps & React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
40
- }
41
- }
42
- }
43
- declare module 'react' {
44
- namespace JSX {
45
- interface IntrinsicElements {
46
- 'sds-chip': SDSChipProps & React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
47
- }
48
- }
49
37
  }
50
38
  export {};
51
39
  //# sourceMappingURL=sds-chip.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sds-chip.d.ts","sourceRoot":"","sources":["../../src/sds-chip/sds-chip.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AAMvC,OAAO,sBAAsB,CAAC;AAE9B,KAAK,WAAW,GAAG,YAAY,GAAG,WAAW,CAAC;AAC9C,KAAK,QAAQ,GAAG,OAAO,GAAG,OAAO,CAAC;AAElC,UAAU,YAAY;IACrB,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC;QAAE,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;QAAC,SAAS,EAAE,OAAO,CAAA;KAAE,CAAC,KAAK,IAAI,CAAC;IAC3F,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAC;CAC3C;AAED,qBACa,OAAQ,SAAQ,UAAU;IAEtC,OAAgB,MAAM,4BAAY;IAGS,OAAO,EAAE,WAAW,CAAgB;IACpC,IAAI,EAAE,QAAQ,CAAW;IACxB,OAAO,UAAS;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC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QAAE,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;QAAC,SAAS,EAAE,OAAO,CAAA;KAAE,CAAC,KAAK,IAAI,CAAC;IAC3F,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAC;CAC3C;AAED,qBACa,OAAQ,SAAQ,UAAU;IAEtC,OAAgB,MAAM,4BAAY;IAGS,OAAO,EAAE,WAAW,CAAgB;IACpC,IAAI,EAAE,QAAQ,CAAW;IACxB,OAAO,UAAS;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACC,QAAQ,UAAS;IAEpD,KAAK,IAAI,IAAI;IAIb,IAAI,IAAI,IAAI;IAIZ,KAAK,IAAI,IAAI;IAIb,MAAM;IAyBf,OAAO,CAAC,QAAQ,CAAC,OAAO,CAYtB;IAEF,OAAO,CAAC,QAAQ,CAAC,OAAO,CAOtB;CACF;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,UAAU,EAAE,OAAO,CAAC;KACpB;CACD"}
@@ -94,25 +94,4 @@ SDSChip = __decorate([
94
94
  customElement('sds-chip')
95
95
  ], SDSChip);
96
96
  export { SDSChip };
97
- /*
98
- // Angular
99
- declare module '@angular/core' {
100
- interface IntrinsicElements {
101
- 'sds-chip': SDSChipProps;
102
- }
103
- }
104
-
105
- // Vue
106
- declare module 'vue' {
107
- export interface GlobalComponents {
108
- 'sds-chip': SDSChipProps;
109
- }
110
- }
111
-
112
- // Svelte
113
- declare namespace svelteHTML {
114
- interface HTMLAttributes<T> {
115
- 'sds-chip'?: SDSChipProps;
116
- }
117
- } */
118
97
  //# sourceMappingURL=sds-chip.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"sds-chip.js","sourceRoot":"","sources":["../../src/sds-chip/sds-chip.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AACv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;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;sCAAgB;AACC;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;yCAAkB;AAVjD,OAAO;IADnB,aAAa,CAAC,UAAU,CAAC;GACb,OAAO,CAuEnB;;AAyBD;;;;;;;;;;;;;;;;;;;;IAoBI","sourcesContent":["import { LitElement, html } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { styles } from './sds-chip.styles';\n\nimport '../sds-icon/sds-icon';\n\ntype ChipVariant = 'selectable' | 'removable';\ntype ChipSize = 'large' | 'small';\n\ninterface SDSChipProps {\n\tvariant?: ChipVariant;\n\tsize?: ChipSize;\n\tchecked?: boolean;\n\tname?: string;\n\tvalue?: string;\n\tdisabled?: boolean;\n\tonChange?: (event: CustomEvent<{ value: string | undefined; isChecked: boolean }>) => void;\n\tonSdsRemove?: (event: CustomEvent) => void;\n}\n\n@customElement('sds-chip')\nexport class SDSChip extends LitElement {\n\t// Styling\n\tstatic override styles = [styles];\n\n\t// Reactive Props\n\t@property({ type: String, reflect: true }) variant: ChipVariant = 'selectable';\n\t@property({ type: String, reflect: true }) size: ChipSize = 'large';\n\t@property({ type: Boolean, reflect: true }) checked = false;\n\t@property({ type: String, reflect: true }) name?: string;\n\t@property({ type: String }) value?: string;\n\t@property({ type: Boolean, reflect: true }) disabled = false;\n\n\toverride focus(): void {\n\t\tif (!this.disabled) this.shadowRoot?.querySelector('input')?.focus();\n\t}\n\n\toverride blur(): void {\n\t\tif (!this.disabled) this.shadowRoot?.querySelector('input')?.blur();\n\t}\n\n\toverride click(): void {\n\t\tif (!this.disabled) this.shadowRoot?.querySelector('input')?.click();\n\t}\n\n\toverride render() {\n\t\tconst chipClasses = {\n\t\t\t'sds-chip': true,\n\t\t\t'sds-chip--small': this.size === 'small',\n\t\t};\n\n\t\tif (this.variant === 'removable') {\n\t\t\treturn html`<button class=\"${classMap(chipClasses)}\" @click=${this._remove}>\n\t\t\t\t<slot></slot>\n\t\t\t\t<sds-icon name=\"close-material-outlined\" size=\"s\"></sds-icon>\n\t\t\t</button>`;\n\t\t}\n\n\t\treturn html`<label class=\"${classMap(chipClasses)}\" @click=\"${this._toggle}\">\n\t\t\t<input\n\t\t\t\ttype=\"checkbox\"\n\t\t\t\tname=\"${ifDefined(this.name)}\"\n\t\t\t\tvalue=\"${ifDefined(this.value)}\"\n\t\t\t\t?checked=\"${this.checked}\"\n\t\t\t\t?disabled=\"${this.disabled}\"\n\t\t\t/>\n\t\t\t<slot></slot>\n\t\t</label>`;\n\t}\n\n\tprivate readonly _toggle = (event: MouseEvent) => {\n\t\tevent.preventDefault();\n\t\tevent.stopImmediatePropagation();\n\n\t\tthis.checked = !this.checked;\n\t\tthis.dispatchEvent(\n\t\t\tnew CustomEvent('change', {\n\t\t\t\tdetail: { value: this.value, isChecked: this.checked },\n\t\t\t\tbubbles: true,\n\t\t\t\tcomposed: true,\n\t\t\t})\n\t\t);\n\t};\n\n\tprivate readonly _remove = () => {\n\t\tthis.dispatchEvent(\n\t\t\tnew CustomEvent('sds-remove', {\n\t\t\t\tbubbles: true,\n\t\t\t\tcomposed: true,\n\t\t\t})\n\t\t);\n\t};\n}\n\ndeclare global {\n\t// HTML\n\tinterface HTMLElementTagNameMap {\n\t\t'sds-chip': SDSChip;\n\t}\n\n\t// React\n\tnamespace JSX {\n\t\tinterface IntrinsicElements {\n\t\t\t'sds-chip': SDSChipProps & React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;\n\t\t}\n\t}\n}\n\n// NextJs\ndeclare module 'react' {\n\tnamespace JSX {\n\t\tinterface IntrinsicElements {\n\t\t\t'sds-chip': SDSChipProps & React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;\n\t\t}\n\t}\n}\n\n/*\n// Angular\ndeclare module '@angular/core' {\n\tinterface IntrinsicElements {\n\t\t'sds-chip': SDSChipProps;\n\t}\n}\n\n// Vue\ndeclare module 'vue' {\n\texport interface GlobalComponents {\n\t\t'sds-chip': SDSChipProps;\n\t}\n}\n\n// Svelte\ndeclare namespace svelteHTML {\n\tinterface HTMLAttributes<T> {\n\t\t'sds-chip'?: SDSChipProps;\n\t}\n} */\n"]}
1
+ {"version":3,"file":"sds-chip.js","sourceRoot":"","sources":["../../src/sds-chip/sds-chip.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,OAAO,sBAAsB,CAAC;AAiBvB,IAAM,OAAO,GAAb,MAAM,OAAQ,SAAQ,UAAU;IAAhC;;QAIN,iBAAiB;QAC0B,YAAO,GAAgB,YAAY,CAAC;QACpC,SAAI,GAAa,OAAO,CAAC;QACxB,YAAO,GAAG,KAAK,CAAC;QAGhB,aAAQ,GAAG,KAAK,CAAC;QAuC5C,YAAO,GAAG,CAAC,KAAiB,EAAE,EAAE;YAChD,KAAK,CAAC,cAAc,EAAE,CAAC;YACvB,KAAK,CAAC,wBAAwB,EAAE,CAAC;YAEjC,IAAI,CAAC,OAAO,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC;YAC7B,IAAI,CAAC,aAAa,CACjB,IAAI,WAAW,CAAC,QAAQ,EAAE;gBACzB,MAAM,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,OAAO,EAAE;gBACtD,OAAO,EAAE,IAAI;gBACb,QAAQ,EAAE,IAAI;a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AAX,CAAY;AAGS;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;wCAAqC;AACpC;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;qCAA0B;AACxB;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;wCAAiB;AACjB;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;qCAAe;AAC7B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;sCAAgB;AACC;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;yCAAkB;AAVjD,OAAO;IADnB,aAAa,CAAC,UAAU,CAAC;GACb,OAAO,CAuEnB","sourcesContent":["import { LitElement, html } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { styles } from './sds-chip.styles';\n\nimport '../sds-icon/sds-icon';\n\ntype ChipVariant = 'selectable' | 'removable';\ntype ChipSize = 'large' | 'small';\n\nexport interface SDSChipProps {\n\tvariant?: ChipVariant;\n\tsize?: ChipSize;\n\tchecked?: boolean;\n\tname?: string;\n\tvalue?: string;\n\tdisabled?: boolean;\n\tonChange?: (event: CustomEvent<{ value: string | undefined; isChecked: boolean }>) => void;\n\tonSdsRemove?: (event: CustomEvent) => void;\n}\n\n@customElement('sds-chip')\nexport class SDSChip extends LitElement {\n\t// Styling\n\tstatic override styles = [styles];\n\n\t// Reactive Props\n\t@property({ type: String, reflect: true }) variant: ChipVariant = 'selectable';\n\t@property({ type: String, reflect: true }) size: ChipSize = 'large';\n\t@property({ type: Boolean, reflect: true }) checked = false;\n\t@property({ type: String, reflect: true }) name?: string;\n\t@property({ type: String }) value?: string;\n\t@property({ type: Boolean, reflect: true }) disabled = false;\n\n\toverride focus(): void {\n\t\tif (!this.disabled) this.shadowRoot?.querySelector('input')?.focus();\n\t}\n\n\toverride blur(): void {\n\t\tif (!this.disabled) this.shadowRoot?.querySelector('input')?.blur();\n\t}\n\n\toverride click(): void {\n\t\tif (!this.disabled) this.shadowRoot?.querySelector('input')?.click();\n\t}\n\n\toverride render() {\n\t\tconst chipClasses = {\n\t\t\t'sds-chip': true,\n\t\t\t'sds-chip--small': this.size === 'small',\n\t\t};\n\n\t\tif (this.variant === 'removable') {\n\t\t\treturn html`<button class=\"${classMap(chipClasses)}\" @click=${this._remove}>\n\t\t\t\t<slot></slot>\n\t\t\t\t<sds-icon name=\"close-material-outlined\" size=\"s\"></sds-icon>\n\t\t\t</button>`;\n\t\t}\n\n\t\treturn html`<label class=\"${classMap(chipClasses)}\" @click=\"${this._toggle}\">\n\t\t\t<input\n\t\t\t\ttype=\"checkbox\"\n\t\t\t\tname=\"${ifDefined(this.name)}\"\n\t\t\t\tvalue=\"${ifDefined(this.value)}\"\n\t\t\t\t?checked=\"${this.checked}\"\n\t\t\t\t?disabled=\"${this.disabled}\"\n\t\t\t/>\n\t\t\t<slot></slot>\n\t\t</label>`;\n\t}\n\n\tprivate readonly _toggle = (event: MouseEvent) => {\n\t\tevent.preventDefault();\n\t\tevent.stopImmediatePropagation();\n\n\t\tthis.checked = !this.checked;\n\t\tthis.dispatchEvent(\n\t\t\tnew CustomEvent('change', {\n\t\t\t\tdetail: { value: this.value, isChecked: this.checked },\n\t\t\t\tbubbles: true,\n\t\t\t\tcomposed: true,\n\t\t\t})\n\t\t);\n\t};\n\n\tprivate readonly _remove = () => {\n\t\tthis.dispatchEvent(\n\t\t\tnew CustomEvent('sds-remove', {\n\t\t\t\tbubbles: true,\n\t\t\t\tcomposed: true,\n\t\t\t})\n\t\t);\n\t};\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'sds-chip': SDSChip;\n\t}\n}\n"]}
@@ -1,6 +1,6 @@
1
1
  import { LitElement } from 'lit';
2
2
  type Variation = 'text' | 'label';
3
- interface SDSDetailProps {
3
+ export interface SDSDetailProps {
4
4
  variation?: Variation;
5
5
  }
6
6
  export declare class SDSDetail extends LitElement {
@@ -12,18 +12,6 @@ declare global {
12
12
  interface HTMLElementTagNameMap {
13
13
  'sds-detail': SDSDetail;
14
14
  }
15
- namespace JSX {
16
- interface IntrinsicElements {
17
- 'sds-detail': SDSDetailProps & React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
18
- }
19
- }
20
- }
21
- declare module 'react' {
22
- namespace JSX {
23
- interface IntrinsicElements {
24
- 'sds-detail': SDSDetailProps & React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
25
- }
26
- }
27
15
  }
28
16
  export {};
29
17
  //# sourceMappingURL=sds-detail.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sds-detail.d.ts","sourceRoot":"","sources":["../../src/sds-detail/sds-detail.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AAKvC,KAAK,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC;AAElC,UAAU,cAAc;IACvB,SAAS,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,qBACa,SAAU,SAAQ,UAAU;IAExC,OAAgB,MAAM,4BAAY;IAGN,SAAS,EAAE,SAAS,CAAU;IAEjD,MAAM;CAWf;AAED,OAAO,CAAC,MAAM,CAAC;IAEd,UAAU,qBAAqB;QAC9B,YAAY,EAAE,SAAS,CAAC;KACxB;IAGD,UAAU,GAAG,CAAC;QACb,UAAU,iBAAiB;YAC1B,YAAY,EAAE,cAAc,GAAG,KAAK,CAAC,iBAAiB,CAAC,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC,CAAC;SACvG;KACD;CACD;AAGD,OAAO,QAAQ,OAAO,CAAC;IACtB,UAAU,GAAG,CAAC;QACb,UAAU,iBAAiB;YAC1B,YAAY,EAAE,cAAc,GAAG,KAAK,CAAC,iBAAiB,CAAC,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC,CAAC;SACvG;KACD;CACD"}
1
+ {"version":3,"file":"sds-detail.d.ts","sourceRoot":"","sources":["../../src/sds-detail/sds-detail.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AAKvC,KAAK,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC;AAElC,MAAM,WAAW,cAAc;IAC9B,SAAS,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,qBACa,SAAU,SAAQ,UAAU;IAExC,OAAgB,MAAM,4BAAY;IAGN,SAAS,EAAE,SAAS,CAAU;IAEjD,MAAM;CAWf;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,YAAY,EAAE,SAAS,CAAC;KACxB;CACD"}
@@ -33,25 +33,4 @@ SDSDetail = __decorate([
33
33
  customElement('sds-detail')
34
34
  ], SDSDetail);
35
35
  export { SDSDetail };
36
- /*
37
- // Angular
38
- declare module '@angular/core' {
39
- interface IntrinsicElements {
40
- 'sds-detail': SDSDetailProps;
41
- }
42
- }
43
-
44
- // Vue
45
- declare module 'vue' {
46
- export interface GlobalComponents {
47
- 'sds-detail': SDSDetailProps;
48
- }
49
- }
50
-
51
- // Svelte
52
- declare namespace svelteHTML {
53
- interface HTMLAttributes<T> {
54
- 'sds-detail'?: SDSDetailProps;
55
- }
56
- } */
57
36
  //# sourceMappingURL=sds-detail.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"sds-detail.js","sourceRoot":"","sources":["../../src/sds-detail/sds-detail.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAStC,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,UAAU;IAAlC;;QAIN,iBAAiB;QACW,cAAS,GAAc,MAAM,CAAC;IAa3D,CAAC;IAXS,MAAM;QACd,MAAM,YAAY,GAAG;YACpB,YAAY,EAAE,IAAI;YAClB,kBAAkB,EAAE,IAAI,CAAC,SAAS,KAAK,MAAM;YAC7C,mBAAmB,EAAE,IAAI,CAAC,SAAS,KAAK,OAAO;SAC/C,CAAC;QAEF,MAAM,OAAO,GAAG,QAAQ,CAAC,YAAY,CAAC,CAAC;QAEvC,OAAO,IAAI,CAAA,YAAY,OAAO,oBAAoB,CAAC;IACpD,CAAC;;AAhBD,UAAU;AACM,gBAAM,GAAG,CAAC,MAAM,CAAC,AAAX,CAAY;AAGN;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;4CAA+B;AAL9C,SAAS;IADrB,aAAa,CAAC,YAAY,CAAC;GACf,SAAS,CAkBrB;;AAyBD;;;;;;;;;;;;;;;;;;;;IAoBI","sourcesContent":["import { LitElement, html } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { styles } from './sds-detail.styles';\n\ntype Variation = 'text' | 'label';\n\ninterface SDSDetailProps {\n\tvariation?: Variation;\n}\n\n@customElement('sds-detail')\nexport class SDSDetail extends LitElement {\n\t// Styling\n\tstatic override styles = [styles];\n\n\t// Reactive Props\n\t@property({ type: String }) variation: Variation = 'text';\n\n\toverride render() {\n\t\tconst styleClasses = {\n\t\t\t'sds-detail': true,\n\t\t\t'sds-detail--text': this.variation === 'text',\n\t\t\t'sds-detail--label': this.variation === 'label',\n\t\t};\n\n\t\tconst classes = classMap(styleClasses);\n\n\t\treturn html`<p class=${classes}><slot></slot></p>`;\n\t}\n}\n\ndeclare global {\n\t// HTML\n\tinterface HTMLElementTagNameMap {\n\t\t'sds-detail': SDSDetail;\n\t}\n\n\t// React\n\tnamespace JSX {\n\t\tinterface IntrinsicElements {\n\t\t\t'sds-detail': SDSDetailProps & React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;\n\t\t}\n\t}\n}\n\n// NextJs\ndeclare module 'react' {\n\tnamespace JSX {\n\t\tinterface IntrinsicElements {\n\t\t\t'sds-detail': SDSDetailProps & React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;\n\t\t}\n\t}\n}\n\n/*\n// Angular\ndeclare module '@angular/core' {\n\tinterface IntrinsicElements {\n\t\t'sds-detail': SDSDetailProps;\n\t}\n}\n\n// Vue\ndeclare module 'vue' {\n\texport interface GlobalComponents {\n\t\t'sds-detail': SDSDetailProps;\n\t}\n}\n\n// Svelte\ndeclare namespace svelteHTML {\n\tinterface HTMLAttributes<T> {\n\t\t'sds-detail'?: SDSDetailProps;\n\t}\n} */\n"]}
1
+ {"version":3,"file":"sds-detail.js","sourceRoot":"","sources":["../../src/sds-detail/sds-detail.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAStC,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,UAAU;IAAlC;;QAIN,iBAAiB;QACW,cAAS,GAAc,MAAM,CAAC;IAa3D,CAAC;IAXS,MAAM;QACd,MAAM,YAAY,GAAG;YACpB,YAAY,EAAE,IAAI;YAClB,kBAAkB,EAAE,IAAI,CAAC,SAAS,KAAK,MAAM;YAC7C,mBAAmB,EAAE,IAAI,CAAC,SAAS,KAAK,OAAO;SAC/C,CAAC;QAEF,MAAM,OAAO,GAAG,QAAQ,CAAC,YAAY,CAAC,CAAC;QAEvC,OAAO,IAAI,CAAA,YAAY,OAAO,oBAAoB,CAAC;IACpD,CAAC;;AAhBD,UAAU;AACM,gBAAM,GAAG,CAAC,MAAM,CAAC,AAAX,CAAY;AAGN;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;4CAA+B;AAL9C,SAAS;IADrB,aAAa,CAAC,YAAY,CAAC;GACf,SAAS,CAkBrB","sourcesContent":["import { LitElement, html } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { styles } from './sds-detail.styles';\n\ntype Variation = 'text' | 'label';\n\nexport interface SDSDetailProps {\n\tvariation?: Variation;\n}\n\n@customElement('sds-detail')\nexport class SDSDetail extends LitElement {\n\t// Styling\n\tstatic override styles = [styles];\n\n\t// Reactive Props\n\t@property({ type: String }) variation: Variation = 'text';\n\n\toverride render() {\n\t\tconst styleClasses = {\n\t\t\t'sds-detail': true,\n\t\t\t'sds-detail--text': this.variation === 'text',\n\t\t\t'sds-detail--label': this.variation === 'label',\n\t\t};\n\n\t\tconst classes = classMap(styleClasses);\n\n\t\treturn html`<p class=${classes}><slot></slot></p>`;\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'sds-detail': SDSDetail;\n\t}\n}\n"]}