chunk.PWBJPIVT.js 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. import {
  2. e as e2
  3. } from "./chunk.YXKHB4AC.js";
  4. import {
  5. T,
  6. e,
  7. h,
  8. n,
  9. r
  10. } from "./chunk.5PIDMFOE.js";
  11. import {
  12. __decorateClass
  13. } from "./chunk.IHGPZX35.js";
  14. // _uyihdawu1:/Users/claviska/Projects/shoelace/src/components/radio-group/radio-group.scss
  15. var radio_group_default = ":host {\n position: relative;\n box-sizing: border-box;\n}\n:host *, :host *:before, :host *:after {\n box-sizing: inherit;\n}\n\n[hidden] {\n display: none !important;\n}\n\n:host {\n display: block;\n}\n\n.radio-group {\n border: solid var(--sl-input-border-width) var(--sl-input-border-color);\n border-radius: var(--sl-border-radius-medium);\n padding: var(--sl-spacing-large);\n padding-top: var(--sl-spacing-x-small);\n}\n.radio-group .radio-group__label {\n font-family: var(--sl-input-font-family);\n font-size: var(--sl-input-font-size-medium);\n font-weight: var(--sl-input-font-weight);\n color: var(--sl-input-color);\n padding: 0 var(--sl-spacing-xx-small);\n}\n\n::slotted(sl-radio:not(:last-of-type)) {\n display: block;\n margin-bottom: var(--sl-spacing-xx-small);\n}\n\n.radio-group--no-fieldset {\n border: none;\n padding: 0;\n margin: 0;\n min-width: 0;\n}\n.radio-group--no-fieldset .radio-group__label {\n clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: 1px;\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: 1px;\n}";
  16. // src/components/radio-group/radio-group.ts
  17. var SlRadioGroup = class extends h {
  18. constructor() {
  19. super(...arguments);
  20. this.label = "";
  21. this.noFieldset = false;
  22. }
  23. render() {
  24. return T`
  25. <fieldset
  26. part="base"
  27. class=${e2({
  28. "radio-group": true,
  29. "radio-group--no-fieldset": this.noFieldset
  30. })}
  31. role="radiogroup"
  32. >
  33. <legend part="label" class="radio-group__label">
  34. <slot name="label">${this.label}</slot>
  35. </legend>
  36. <slot></slot>
  37. </fieldset>
  38. `;
  39. }
  40. };
  41. SlRadioGroup.styles = r(radio_group_default);
  42. __decorateClass([
  43. e()
  44. ], SlRadioGroup.prototype, "label", 2);
  45. __decorateClass([
  46. e({ type: Boolean, attribute: "no-fieldset" })
  47. ], SlRadioGroup.prototype, "noFieldset", 2);
  48. SlRadioGroup = __decorateClass([
  49. n("sl-radio-group")
  50. ], SlRadioGroup);
  51. var radio_group_default2 = SlRadioGroup;
  52. export {
  53. radio_group_default2 as radio_group_default
  54. };