@lazhus/kg-ui 0.5.3 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (136) hide show
  1. package/custom-elements.json +201 -113
  2. package/dist/chunks/FormAssociated-Ca1JavvX.js +1 -0
  3. package/dist/chunks/create-component-jQ1kjF1Z.js +1 -0
  4. package/dist/components/kg-accordion-item.js +1 -1
  5. package/dist/components/kg-accordion.js +2 -2
  6. package/dist/components/kg-avatar.js +3 -3
  7. package/dist/components/kg-breadcrumbs.js +1 -1
  8. package/dist/components/kg-button.js +4 -4
  9. package/dist/components/kg-card.js +1 -1
  10. package/dist/components/kg-checkbox.js +21 -22
  11. package/dist/components/kg-colorpicker.js +5 -5
  12. package/dist/components/kg-column.js +3 -3
  13. package/dist/components/kg-datagrid.js +1 -1
  14. package/dist/components/kg-datepicker.js +19 -19
  15. package/dist/components/kg-divider.js +4 -4
  16. package/dist/components/kg-drawer.js +1 -1
  17. package/dist/components/kg-file-upload.js +3 -4
  18. package/dist/components/kg-grid.js +3 -3
  19. package/dist/components/kg-image.js +3 -3
  20. package/dist/components/kg-input.js +3 -3
  21. package/dist/components/kg-link.js +3 -3
  22. package/dist/components/kg-list.js +5 -5
  23. package/dist/components/kg-loader.js +1 -1
  24. package/dist/components/kg-modal.js +1 -1
  25. package/dist/components/kg-progress.js +1 -1
  26. package/dist/components/kg-radio-group.js +4 -4
  27. package/dist/components/kg-radio.js +5 -7
  28. package/dist/components/kg-row.js +3 -3
  29. package/dist/components/kg-select.js +27 -27
  30. package/dist/components/kg-skeleton.js +1 -1
  31. package/dist/components/kg-slider.js +7 -7
  32. package/dist/components/kg-spinner.js +1 -1
  33. package/dist/components/kg-stepper.js +4 -4
  34. package/dist/components/kg-switch.js +6 -6
  35. package/dist/components/kg-tab-panel.js +2 -2
  36. package/dist/components/kg-tabs.js +1 -1
  37. package/dist/components/kg-tag.js +5 -5
  38. package/dist/components/kg-text.js +3 -3
  39. package/dist/components/kg-textarea.js +6 -7
  40. package/dist/components/kg-toast.js +1 -1
  41. package/dist/components/kg-tooltip.js +1 -1
  42. package/dist/components/kg-tree.js +1 -1
  43. package/dist/react/KgAccordion.js +1 -0
  44. package/dist/react/KgAccordionItem.js +1 -0
  45. package/dist/react/KgAvatar.js +1 -0
  46. package/dist/react/KgBreadcrumbs.js +1 -0
  47. package/dist/react/KgButton.js +1 -0
  48. package/dist/react/KgCard.js +1 -0
  49. package/dist/react/KgCheckbox.js +1 -0
  50. package/dist/react/KgColorPicker.js +1 -0
  51. package/dist/react/KgColumn.js +1 -0
  52. package/dist/react/KgDataGrid.js +1 -0
  53. package/dist/react/KgDatePicker.js +1 -0
  54. package/dist/react/KgDivider.js +1 -0
  55. package/dist/react/KgDrawer.js +1 -0
  56. package/dist/react/KgFileUpload.js +1 -0
  57. package/dist/react/KgGrid.js +1 -0
  58. package/dist/react/KgImage.js +1 -0
  59. package/dist/react/KgInput.js +1 -0
  60. package/dist/react/KgLink.js +1 -0
  61. package/dist/react/KgList.js +1 -0
  62. package/dist/react/KgLoader.js +1 -0
  63. package/dist/react/KgModal.js +1 -0
  64. package/dist/react/KgProgress.js +1 -0
  65. package/dist/react/KgRadio.js +1 -0
  66. package/dist/react/KgRadioGroup.js +1 -0
  67. package/dist/react/KgRow.js +1 -0
  68. package/dist/react/KgSelect.js +1 -0
  69. package/dist/react/KgSkeleton.js +1 -0
  70. package/dist/react/KgSlider.js +1 -0
  71. package/dist/react/KgSpinner.js +1 -0
  72. package/dist/react/KgStepper.js +1 -0
  73. package/dist/react/KgSwitch.js +1 -0
  74. package/dist/react/KgTabPanel.js +1 -0
  75. package/dist/react/KgTabs.js +1 -0
  76. package/dist/react/KgTag.js +1 -0
  77. package/dist/react/KgText.js +1 -0
  78. package/dist/react/KgTextarea.js +1 -0
  79. package/dist/react/KgToast.js +1 -0
  80. package/dist/react/KgTooltip.js +1 -0
  81. package/dist/react/KgTree.js +1 -0
  82. package/dist/react/index.js +1 -0
  83. package/package.json +15 -3
  84. package/types/components/kg-checkbox.d.ts +3 -3
  85. package/types/components/kg-colorpicker.d.ts +0 -3
  86. package/types/components/kg-file-upload.d.ts +0 -6
  87. package/types/components/kg-input.d.ts +0 -6
  88. package/types/components/kg-radio.d.ts +0 -3
  89. package/types/components/kg-select.d.ts +0 -3
  90. package/types/components/kg-slider.d.ts +2 -5
  91. package/types/components/kg-switch.d.ts +3 -3
  92. package/types/components/kg-textarea.d.ts +0 -6
  93. package/types/index.d.ts +20 -30
  94. package/types/react/Kgaccordion.d.ts +6 -0
  95. package/types/react/Kgaccordionitem.d.ts +6 -0
  96. package/types/react/Kgavatar.d.ts +6 -0
  97. package/types/react/Kgbreadcrumbitem.d.ts +6 -0
  98. package/types/react/Kgbreadcrumbs.d.ts +6 -0
  99. package/types/react/Kgbutton.d.ts +6 -0
  100. package/types/react/Kgcard.d.ts +6 -0
  101. package/types/react/Kgcheckbox.d.ts +6 -0
  102. package/types/react/Kgcolorpicker.d.ts +6 -0
  103. package/types/react/Kgcolumn.d.ts +6 -0
  104. package/types/react/Kgdatagrid.d.ts +6 -0
  105. package/types/react/Kgdatepicker.d.ts +6 -0
  106. package/types/react/Kgdivider.d.ts +6 -0
  107. package/types/react/Kgdrawer.d.ts +6 -0
  108. package/types/react/Kgfileupload.d.ts +6 -0
  109. package/types/react/Kggrid.d.ts +6 -0
  110. package/types/react/Kgimage.d.ts +6 -0
  111. package/types/react/Kginput.d.ts +6 -0
  112. package/types/react/Kglink.d.ts +6 -0
  113. package/types/react/Kglist.d.ts +6 -0
  114. package/types/react/Kglistitem.d.ts +6 -0
  115. package/types/react/Kgloader.d.ts +6 -0
  116. package/types/react/Kgmodal.d.ts +6 -0
  117. package/types/react/Kgprogress.d.ts +6 -0
  118. package/types/react/Kgradio.d.ts +6 -0
  119. package/types/react/Kgradiogroup.d.ts +6 -0
  120. package/types/react/Kgrow.d.ts +6 -0
  121. package/types/react/Kgselect.d.ts +6 -0
  122. package/types/react/Kgskeleton.d.ts +6 -0
  123. package/types/react/Kgslider.d.ts +6 -0
  124. package/types/react/Kgspinner.d.ts +6 -0
  125. package/types/react/Kgstepper.d.ts +6 -0
  126. package/types/react/Kgswitch.d.ts +6 -0
  127. package/types/react/Kgtabpanel.d.ts +6 -0
  128. package/types/react/Kgtabs.d.ts +6 -0
  129. package/types/react/Kgtag.d.ts +6 -0
  130. package/types/react/Kgtext.d.ts +6 -0
  131. package/types/react/Kgtextarea.d.ts +6 -0
  132. package/types/react/Kgtoast.d.ts +6 -0
  133. package/types/react/Kgtooltip.d.ts +6 -0
  134. package/types/react/Kgtree.d.ts +6 -0
  135. package/types/react/Kgtreeitem.d.ts +6 -0
  136. package/types/react/index.d.ts +42 -0
@@ -414,7 +414,7 @@
414
414
  "text": "object"
415
415
  },
416
416
  "static": true,
417
- "default": "{ color: { type: String }, // primary, secondary, tertiary, red, green, etc. size: { type: String }, // mini, tiny, small, medium, large, big, huge, massive fullwidth: { type: Boolean }, circular: { type: Boolean }, square: { type: Boolean }, loading: { type: Boolean }, disabled: { type: Boolean }, basic: { type: Boolean }, inverted: { type: Boolean }, active: { type: Boolean }, text: { type: Boolean }, hasText: { type: Boolean, state: true }, hasLeft: { type: Boolean, state: true }, hasRight: { type: Boolean, state: true }, type: { type: String } }"
417
+ "default": "{ color: { type: String }, // primary, secondary, tertiary, red, green, etc. size: { type: String }, // mini, tiny, small, medium, large, big, huge, massive fullwidth: { type: Boolean }, circular: { type: Boolean }, square: { type: Boolean }, loading: { type: Boolean }, disabled: { type: Boolean }, basic: { type: Boolean }, inverted: { type: Boolean }, active: { type: Boolean }, text: { type: Boolean }, hasText: { type: Boolean, state: true }, hasLeft: { type: Boolean, state: true }, hasRight: { type: Boolean, state: true } }"
418
418
  },
419
419
  {
420
420
  "kind": "field",
@@ -493,6 +493,12 @@
493
493
  "default": "'button'"
494
494
  }
495
495
  ],
496
+ "mixins": [
497
+ {
498
+ "name": "FormAssociated",
499
+ "module": "/src/mixins/FormAssociated.js"
500
+ }
501
+ ],
496
502
  "superclass": {
497
503
  "name": "LitElement",
498
504
  "package": "lit"
@@ -630,13 +636,39 @@
630
636
  "text": "object"
631
637
  },
632
638
  "static": true,
633
- "default": "{ checked: { type: Boolean, reflect: true }, label: { type: String }, disabled: { type: Boolean }, color: { type: String }, indeterminate: { type: Boolean } }"
639
+ "default": "{ checked: { type: Boolean, reflect: true }, label: { type: String }, indeterminate: { type: Boolean }, // disabled and value are handled by mixin color: { type: String } }"
634
640
  },
635
641
  {
636
642
  "kind": "field",
637
643
  "name": "styles",
638
644
  "static": true,
639
- "default": "css` :host { display: inline-block; cursor: pointer; user-select: none; font-family: inherit; } .kg-checkbox-container { display: flex; align-items: center; gap: 10px; position: relative; } .checkbox-box { width: 20px; height: 20px; border: 2px solid var(--kg-border); border-radius: 6px; display: flex; align-items: center; justify-content: center; background: var(--kg-bg); transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); position: relative; flex-shrink: 0; } .kg-checkbox-container:hover .checkbox-box { border-color: var(--checkbox-active-color, var(--kg-primary)); } .kg-checkbox-container.checked .checkbox-box { background: var(--checkbox-active-color, var(--kg-primary)); border-color: var(--checkbox-active-color, var(--kg-primary)); } /* Checkmark Icon */ .checkmark { width: 12px; height: 12px; color: white; opacity: 0; transform: scale(0.5) rotate(-45deg); transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); } .checked .checkmark { opacity: 1; transform: scale(1) rotate(0); } /* Indeterminate state */ .checkbox-box::after { content: ''; position: absolute; width: 10px; height: 2px; background: white; border-radius: 1px; opacity: 0; transform: scaleX(0.5); transition: all 0.2s; } .kg-checkbox-container.indeterminate .checkbox-box { background: var(--kg-primary); border-color: var(--kg-primary); } .indeterminate .checkbox-box::after { opacity: 1; transform: scaleX(1); } .label-text { font-size: 0.95rem; color: var(--kg-text); transition: color 0.2s; } /* States */ .disabled { opacity: 0.5; cursor: not-allowed; } `"
645
+ "default": "css` :host { display: inline-block; cursor: pointer; user-select: none; font-family: inherit; } .kg-checkbox-container { display: flex; align-items: center; gap: 10px; position: relative; } .checkbox-box { width: 20px; height: 20px; border: 2px solid var(--kg-border); border-radius: 6px; display: flex; align-items: center; justify-content: center; background: var(--kg-bg); transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); position: relative; flex-shrink: 0; } .kg-checkbox-container:hover .checkbox-box { border-color: var(--checkbox-active-color, var(--kg-primary)); } .kg-checkbox-container.checked .checkbox-box { background: var(--checkbox-active-color, var(--kg-primary)); border-color: var(--checkbox-active-color, var(--kg-primary)); } .checkmark { width: 12px; height: 12px; color: white; opacity: 0; transform: scale(0.5) rotate(-45deg); transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); } .checked .checkmark { opacity: 1; transform: scale(1) rotate(0); } /* Indeterminate state */ .checkbox-box::after { content: ''; position: absolute; width: 10px; height: 2px; background: white; border-radius: 1px; opacity: 0; transform: scaleX(0.5); transition: all 0.2s; } .kg-checkbox-container.indeterminate .checkbox-box { background: var(--kg-primary); border-color: var(--kg-primary); } .indeterminate .checkbox-box::after { opacity: 1; transform: scaleX(1); } .label-text { font-size: 0.95rem; color: var(--kg-text); transition: color 0.2s; } /* States */ .disabled { opacity: 0.5; cursor: not-allowed; } `"
646
+ },
647
+ {
648
+ "kind": "method",
649
+ "name": "formResetCallback"
650
+ },
651
+ {
652
+ "kind": "method",
653
+ "name": "formStateRestoreCallback",
654
+ "parameters": [
655
+ {
656
+ "name": "state"
657
+ }
658
+ ]
659
+ },
660
+ {
661
+ "kind": "method",
662
+ "name": "updated",
663
+ "parameters": [
664
+ {
665
+ "name": "changedProperties"
666
+ }
667
+ ]
668
+ },
669
+ {
670
+ "kind": "method",
671
+ "name": "_updateFormValue"
640
672
  },
641
673
  {
642
674
  "kind": "method",
@@ -656,7 +688,7 @@
656
688
  },
657
689
  {
658
690
  "kind": "field",
659
- "name": "disabled",
691
+ "name": "indeterminate",
660
692
  "type": {
661
693
  "text": "boolean"
662
694
  },
@@ -664,11 +696,11 @@
664
696
  },
665
697
  {
666
698
  "kind": "field",
667
- "name": "indeterminate",
699
+ "name": "value",
668
700
  "type": {
669
- "text": "boolean"
701
+ "text": "string"
670
702
  },
671
- "default": "false"
703
+ "default": "'on'"
672
704
  }
673
705
  ],
674
706
  "events": [
@@ -679,6 +711,12 @@
679
711
  }
680
712
  }
681
713
  ],
714
+ "mixins": [
715
+ {
716
+ "name": "FormAssociated",
717
+ "module": "/src/mixins/FormAssociated.js"
718
+ }
719
+ ],
682
720
  "superclass": {
683
721
  "name": "LitElement",
684
722
  "package": "lit"
@@ -722,7 +760,7 @@
722
760
  "text": "object"
723
761
  },
724
762
  "static": true,
725
- "default": "{ value: { type: String, reflect: true }, label: { type: String }, open: { type: Boolean }, disabled: { type: Boolean } }"
763
+ "default": "{ // value, disabled, name handled by mixin label: { type: String }, open: { type: Boolean } }"
726
764
  },
727
765
  {
728
766
  "kind": "field",
@@ -790,14 +828,6 @@
790
828
  },
791
829
  "default": "false"
792
830
  },
793
- {
794
- "kind": "field",
795
- "name": "disabled",
796
- "type": {
797
- "text": "boolean"
798
- },
799
- "default": "false"
800
- },
801
831
  {
802
832
  "kind": "field",
803
833
  "name": "_presets",
@@ -815,9 +845,15 @@
815
845
  }
816
846
  }
817
847
  ],
848
+ "mixins": [
849
+ {
850
+ "name": "FormAssociated",
851
+ "module": "/src/mixins/FormAssociated.js"
852
+ }
853
+ ],
818
854
  "superclass": {
819
855
  "name": "LitElement",
820
- "package": "lit"
856
+ "module": "src/components/kg-colorpicker.js"
821
857
  },
822
858
  "tagName": "kg-colorpicker",
823
859
  "customElement": true
@@ -1219,7 +1255,7 @@
1219
1255
  "text": "object"
1220
1256
  },
1221
1257
  "static": true,
1222
- "default": "{ value: { type: String, reflect: true }, open: { type: Boolean, reflect: true }, disabled: { type: Boolean, reflect: true }, placeholder: { type: String }, label: { type: String }, showTime: { type: Boolean }, mode: { type: String }, // 'date', 'month', 'year' locale: { type: String }, min: { type: String }, max: { type: String }, _viewDate: { type: Object }, _selectedDate: { type: Object } }"
1258
+ "default": "{ // value, disabled, name handled by mixin open: { type: Boolean, reflect: true }, placeholder: { type: String }, label: { type: String }, showTime: { type: Boolean }, mode: { type: String }, // 'date', 'month', 'year' locale: { type: String }, min: { type: String }, max: { type: String }, _viewDate: { type: Object }, _selectedDate: { type: Object } }"
1223
1259
  },
1224
1260
  {
1225
1261
  "kind": "field",
@@ -1484,9 +1520,15 @@
1484
1520
  }
1485
1521
  }
1486
1522
  ],
1523
+ "mixins": [
1524
+ {
1525
+ "name": "FormAssociated",
1526
+ "module": "/src/mixins/FormAssociated.js"
1527
+ }
1528
+ ],
1487
1529
  "superclass": {
1488
1530
  "name": "LitElement",
1489
- "package": "lit"
1531
+ "module": "src/components/kg-datepicker.js"
1490
1532
  },
1491
1533
  "tagName": "kg-datepicker",
1492
1534
  "customElement": true
@@ -1750,13 +1792,17 @@
1750
1792
  "text": "object"
1751
1793
  },
1752
1794
  "static": true,
1753
- "default": "{ label: { type: String }, placeholder: { type: String }, accept: { type: String }, multiple: { type: Boolean }, disabled: { type: Boolean }, hideChips: { type: Boolean, attribute: 'hide-chips' }, files: { type: Array, state: true }, _previews: { state: true } }"
1795
+ "default": "{ // value, disabled, name handled by mixin label: { type: String }, placeholder: { type: String }, accept: { type: String }, multiple: { type: Boolean }, hideChips: { type: Boolean, attribute: 'hide-chips' }, files: { type: Array, state: true }, _previews: { state: true } }"
1754
1796
  },
1755
1797
  {
1756
1798
  "kind": "field",
1757
1799
  "name": "styles",
1758
1800
  "static": true,
1759
- "default": "css` :host { display: block; width: 100%; font-family: inherit; } .container { display: flex; flex-direction: column; gap: 0.5rem; } .label { font-size: 0.85rem; font-weight: 600; color: var(--kg-text); } .upload-wrapper { display: flex; align-items: stretch; border: 2px solid var(--kg-border); border-radius: 10px; overflow: hidden; background: var(--kg-bg-primary); transition: all 0.2s ease; height: var(--kg-form-height); cursor: pointer; } .upload-wrapper:hover:not(.disabled) { border-color: var(--kg-primary); } .upload-wrapper.active { border-color: var(--kg-primary); box-shadow: 0 0 0 3px rgba(65, 171, 52, 0.1); } .upload-wrapper.disabled { opacity: 0.6; cursor: not-allowed; background: var(--kg-bg-secondary); } .file-display { flex: 1; display: flex; align-items: center; padding: 0 1rem; font-size: 0.9rem; color: var(--kg-text-muted); min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .file-display.has-file { color: var(--kg-text); font-weight: 500; } .divider { width: 1px; background: var(--kg-border); margin: 8px 0; transition: background 0.2s ease; } .upload-wrapper:hover .divider { background: var(--kg-primary); opacity: 0.3; } .upload-btn { width: 48px; display: flex; align-items: center; justify-content: center; color: var(--kg-primary); background: transparent; transition: all 0.2s ease; } .upload-wrapper:hover .upload-btn { background: rgba(65, 171, 52, 0.05); } input[type=\"file\"] { display: none; } /* File Chips below for multiple */ .file-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; } .chip { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.4rem 0.75rem; background: var(--kg-bg-secondary); border: 1px solid var(--kg-border); border-radius: 20px; font-size: 0.8rem; animation: slideIn 0.2s ease; } .chip-name { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .chip-remove { cursor: pointer; color: var(--kg-text-muted); display: flex; align-items: center; } .chip-remove:hover { color: #e74c3c; } @keyframes slideIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } } .preview-thumb { width: 24px; height: 24px; object-fit: cover; border-radius: 4px; margin-right: 8px; border: 1px solid var(--kg-border); } .chip .preview-thumb { width: 20px; height: 20px; margin-right: 6px; } `"
1801
+ "default": "css` :host { display: block; width: 100%; font-family: inherit; } .container { display: flex; flex-direction: column; gap: 0.5rem; } .label { font-size: 0.85rem; font-weight: 600; color: var(--kg-text); } .upload-wrapper { display: flex; align-items: stretch; border: 2px solid var(--kg-border); border-radius: 10px; overflow: hidden; background: var(--kg-bg-primary); transition: all 0.2s ease; height: var(--kg-form-height); cursor: pointer; } .upload-wrapper:hover:not(.disabled) { border-color: var(--kg-primary); } .upload-wrapper.active { border-color: var(--kg-primary); box-shadow: 0 0 0 3px rgba(65, 171, 52, 0.1); } .upload-wrapper.disabled { opacity: 0.6; cursor: not-allowed; background: var(--kg-bg-secondary); } .file-display { flex: 1; display: flex; align-items: center; padding: 0 1rem; font-size: 0.9rem; color: var(--kg-text-muted); min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .file-display.has-file { color: var(--kg-text); font-weight: 500; } .divider { width: 1px; background: var(--kg-border); margin: 8px 0; transition: background 0.2s ease; } .upload-wrapper:hover .divider { background: var(--kg-primary); opacity: 0.3; } .upload-btn { width: 48px; display: flex; align-items: center; justify-content: center; color: var(--kg-primary); background: transparent; transition: all 0.2s ease; } .upload-wrapper:hover .upload-btn { background: rgba(65, 171, 52, 0.05); } input[type=\"file\"] { display: none; } .file-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; } .chip { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.4rem 0.75rem; background: var(--kg-bg-secondary); border: 1px solid var(--kg-border); border-radius: 20px; font-size: 0.8rem; animation: slideIn 0.2s ease; } .chip-name { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .chip-remove { cursor: pointer; color: var(--kg-text-muted); display: flex; align-items: center; } .chip-remove:hover { color: #e74c3c; } @keyframes slideIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } } .preview-thumb { width: 24px; height: 24px; object-fit: cover; border-radius: 4px; margin-right: 8px; border: 1px solid var(--kg-border); } .chip .preview-thumb { width: 20px; height: 20px; margin-right: 6px; } `"
1802
+ },
1803
+ {
1804
+ "kind": "method",
1805
+ "name": "_updateFormValue"
1760
1806
  },
1761
1807
  {
1762
1808
  "kind": "method",
@@ -1836,14 +1882,6 @@
1836
1882
  "kind": "method",
1837
1883
  "name": "render"
1838
1884
  },
1839
- {
1840
- "kind": "field",
1841
- "name": "label",
1842
- "type": {
1843
- "text": "string"
1844
- },
1845
- "default": "''"
1846
- },
1847
1885
  {
1848
1886
  "kind": "field",
1849
1887
  "name": "placeholder",
@@ -1868,14 +1906,6 @@
1868
1906
  },
1869
1907
  "default": "false"
1870
1908
  },
1871
- {
1872
- "kind": "field",
1873
- "name": "disabled",
1874
- "type": {
1875
- "text": "boolean"
1876
- },
1877
- "default": "false"
1878
- },
1879
1909
  {
1880
1910
  "kind": "field",
1881
1911
  "name": "hideChips",
@@ -1906,6 +1936,12 @@
1906
1936
  }
1907
1937
  }
1908
1938
  ],
1939
+ "mixins": [
1940
+ {
1941
+ "name": "FormAssociated",
1942
+ "module": "/src/mixins/FormAssociated.js"
1943
+ }
1944
+ ],
1909
1945
  "superclass": {
1910
1946
  "name": "LitElement",
1911
1947
  "package": "lit"
@@ -2150,7 +2186,7 @@
2150
2186
  "text": "object"
2151
2187
  },
2152
2188
  "static": true,
2153
- "default": "{ value: { type: String }, label: { type: String }, placeholder: { type: String }, type: { type: String }, size: { type: String }, disabled: { type: Boolean }, loading: { type: Boolean }, error: { type: Boolean }, fullwidth: { type: Boolean, reflect: true }, inverted: { type: Boolean, reflect: true }, hasLeft: { type: Boolean, state: true }, hasRight: { type: Boolean, state: true }, _showPassword: { type: Boolean, state: true }, positive: { type: Boolean, reflect: true }, integer: { type: Boolean, reflect: true } }"
2189
+ "default": "{ // value, type, disabled are now handled by FormAssociated label: { type: String }, placeholder: { type: String }, loading: { type: Boolean }, error: { type: Boolean }, fullwidth: { type: Boolean, reflect: true }, inverted: { type: Boolean, reflect: true }, hasLeft: { type: Boolean, state: true }, hasRight: { type: Boolean, state: true }, _showPassword: { type: Boolean, state: true }, positive: { type: Boolean, reflect: true }, integer: { type: Boolean, reflect: true } }"
2154
2190
  },
2155
2191
  {
2156
2192
  "kind": "field",
@@ -2193,22 +2229,6 @@
2193
2229
  "kind": "method",
2194
2230
  "name": "render"
2195
2231
  },
2196
- {
2197
- "kind": "field",
2198
- "name": "type",
2199
- "type": {
2200
- "text": "string"
2201
- },
2202
- "default": "'text'"
2203
- },
2204
- {
2205
- "kind": "field",
2206
- "name": "value",
2207
- "type": {
2208
- "text": "string"
2209
- },
2210
- "default": "''"
2211
- },
2212
2232
  {
2213
2233
  "kind": "field",
2214
2234
  "name": "placeholder",
@@ -2250,6 +2270,12 @@
2250
2270
  }
2251
2271
  }
2252
2272
  ],
2273
+ "mixins": [
2274
+ {
2275
+ "name": "FormAssociated",
2276
+ "module": "/src/mixins/FormAssociated.js"
2277
+ }
2278
+ ],
2253
2279
  "superclass": {
2254
2280
  "name": "LitElement",
2255
2281
  "package": "lit"
@@ -2841,7 +2867,7 @@
2841
2867
  "text": "object"
2842
2868
  },
2843
2869
  "static": true,
2844
- "default": "{ value: { type: String, reflect: true }, direction: { type: String }, // horizontal, vertical label: { type: String } }"
2870
+ "default": "{ // value, name handled by mixin direction: { type: String }, // horizontal, vertical label: { type: String } }"
2845
2871
  },
2846
2872
  {
2847
2873
  "kind": "field",
@@ -2904,9 +2930,15 @@
2904
2930
  }
2905
2931
  }
2906
2932
  ],
2933
+ "mixins": [
2934
+ {
2935
+ "name": "FormAssociated",
2936
+ "module": "/src/mixins/FormAssociated.js"
2937
+ }
2938
+ ],
2907
2939
  "superclass": {
2908
2940
  "name": "LitElement",
2909
- "package": "lit"
2941
+ "module": "src/components/kg-radio-group.js"
2910
2942
  },
2911
2943
  "tagName": "kg-radio-group",
2912
2944
  "customElement": true
@@ -2947,13 +2979,13 @@
2947
2979
  "text": "object"
2948
2980
  },
2949
2981
  "static": true,
2950
- "default": "{ checked: { type: Boolean, reflect: true }, label: { type: String }, name: { type: String }, value: { type: String }, disabled: { type: Boolean }, color: { type: String } }"
2982
+ "default": "{ checked: { type: Boolean, reflect: true }, label: { type: String }, // name, value, disabled handled by mixin color: { type: String } }"
2951
2983
  },
2952
2984
  {
2953
2985
  "kind": "field",
2954
2986
  "name": "styles",
2955
2987
  "static": true,
2956
- "default": "css` :host { display: inline-block; cursor: pointer; user-select: none; font-family: inherit; } .kg-radio-container { display: flex; align-items: center; gap: 10px; position: relative; } .radio-circle { width: 20px; height: 20px; border: 2px solid var(--kg-border); border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--kg-bg); transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); position: relative; flex-shrink: 0; } .kg-radio-container:hover .radio-circle { border-color: var(--radio-active-color, var(--kg-primary)); } .kg-radio-container.checked .radio-circle { border-color: var(--radio-active-color, var(--kg-primary)); } /* Inner Dot */ .radio-circle::after { content: ''; width: 10px; height: 10px; background: var(--radio-active-color, var(--kg-primary)); border-radius: 50%; transform: scale(0); transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275); } .checked .radio-circle::after { transform: scale(1); } .label-text { font-size: 0.95rem; color: var(--kg-text); transition: color 0.2s; } /* States */ .disabled { opacity: 0.5; cursor: not-allowed; } .disabled .radio-circle { background: var(--kg-surface); } `"
2988
+ "default": "css` :host { display: inline-block; cursor: pointer; user-select: none; font-family: inherit; } .kg-radio-container { display: flex; align-items: center; gap: 10px; position: relative; } .radio-circle { width: 20px; height: 20px; border: 2px solid var(--kg-border); border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--kg-bg); transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); position: relative; flex-shrink: 0; } .kg-radio-container:hover .radio-circle { border-color: var(--radio-active-color, var(--kg-primary)); } .kg-radio-container.checked .radio-circle { border-color: var(--radio-active-color, var(--kg-primary)); } .radio-circle::after { content: ''; width: 10px; height: 10px; background: var(--radio-active-color, var(--kg-primary)); border-radius: 50%; transform: scale(0); transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275); } .checked .radio-circle::after { transform: scale(1); } .label-text { font-size: 0.95rem; color: var(--kg-text); transition: color 0.2s; } .disabled { opacity: 0.5; cursor: not-allowed; } .disabled .radio-circle { background: var(--kg-surface); } `"
2957
2989
  },
2958
2990
  {
2959
2991
  "kind": "method",
@@ -2961,19 +2993,41 @@
2961
2993
  },
2962
2994
  {
2963
2995
  "kind": "method",
2964
- "name": "render"
2996
+ "name": "_uncheckOthers"
2965
2997
  },
2966
2998
  {
2967
- "kind": "field",
2968
- "name": "checked",
2969
- "type": {
2970
- "text": "boolean"
2971
- },
2972
- "default": "false"
2999
+ "kind": "method",
3000
+ "name": "_updateFormValue"
3001
+ },
3002
+ {
3003
+ "kind": "method",
3004
+ "name": "updated",
3005
+ "parameters": [
3006
+ {
3007
+ "name": "changedProperties"
3008
+ }
3009
+ ]
3010
+ },
3011
+ {
3012
+ "kind": "method",
3013
+ "name": "formResetCallback"
3014
+ },
3015
+ {
3016
+ "kind": "method",
3017
+ "name": "formStateRestoreCallback",
3018
+ "parameters": [
3019
+ {
3020
+ "name": "state"
3021
+ }
3022
+ ]
3023
+ },
3024
+ {
3025
+ "kind": "method",
3026
+ "name": "render"
2973
3027
  },
2974
3028
  {
2975
3029
  "kind": "field",
2976
- "name": "disabled",
3030
+ "name": "checked",
2977
3031
  "type": {
2978
3032
  "text": "boolean"
2979
3033
  },
@@ -2986,6 +3040,18 @@
2986
3040
  "type": {
2987
3041
  "text": "CustomEvent"
2988
3042
  }
3043
+ },
3044
+ {
3045
+ "name": "change",
3046
+ "type": {
3047
+ "text": "CustomEvent"
3048
+ }
3049
+ }
3050
+ ],
3051
+ "mixins": [
3052
+ {
3053
+ "name": "FormAssociated",
3054
+ "module": "/src/mixins/FormAssociated.js"
2989
3055
  }
2990
3056
  ],
2991
3057
  "superclass": {
@@ -3111,13 +3177,17 @@
3111
3177
  "text": "object"
3112
3178
  },
3113
3179
  "static": true,
3114
- "default": "{ options: { type: Array }, value: { type: Object }, // Can be string or array placeholder: { type: String }, label: { type: String }, multiple: { type: Boolean }, disabled: { type: Boolean }, searchable: { type: Boolean }, _open: { type: Boolean, state: true }, _searchQuery: { type: String, state: true } }"
3180
+ "default": "{ options: { type: Array }, value: { type: Object }, // Can be string, array, or object placeholder: { type: String }, label: { type: String }, multiple: { type: Boolean }, searchable: { type: Boolean }, _open: { type: Boolean, state: true }, _searchQuery: { type: String, state: true } // disabled is handled by mixin }"
3115
3181
  },
3116
3182
  {
3117
3183
  "kind": "field",
3118
3184
  "name": "styles",
3119
3185
  "static": true,
3120
- "default": "css` :host { display: inline-block; width: 100%; position: relative; font-family: inherit; user-select: none; } .kg-select-container { display: flex; flex-direction: column; gap: 0.5rem; width: 100%; } .select-label { font-size: 0.875rem; font-weight: 600; color: var(--kg-text); opacity: 0.8; margin-left: 2px; } * { box-sizing: border-box; } .select-trigger { display: flex; align-items: center; justify-content: space-between; height: var(--kg-form-height); padding: 0 1rem; background: var(--kg-surface); border: 1px solid var(--kg-border); border-radius: var(--kg-radius-md, 8px); cursor: pointer; transition: all 0.2s ease; gap: 8px; flex-wrap: nowrap; overflow: hidden; } .select-trigger:hover { border-color: var(--kg-primary); } .select-trigger.open { border-color: var(--kg-primary); box-shadow: 0 0 0 2px rgba(65, 171, 52, 0.2); } .select-trigger.disabled { opacity: 0.5; cursor: not-allowed; background: var(--kg-bg-secondary); } .placeholder { color: var(--kg-text-muted); opacity: 0.6; } .selected-text { color: var(--kg-text); flex: 1; } .tags-container { display: flex; flex-wrap: wrap; gap: 4px; flex: 1; } .tag { background: var(--kg-primary); color: white; padding: 2px 8px; border-radius: 4px; font-size: 0.8rem; display: flex; align-items: center; gap: 4px; } .tag-remove { cursor: pointer; opacity: 0.8; } .tag-remove:hover { opacity: 1; } .chevron { transition: transform 0.2s ease; color: var(--kg-text-muted); flex-shrink: 0; } .open .chevron { transform: rotate(180deg); } /* Dropdown */ .select-dropdown { position: absolute; top: calc(100% + 5px); left: 0; width: 100%; background: var(--kg-surface); border: 1px solid var(--kg-border); border-radius: var(--kg-radius-md, 8px); box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1); z-index: 1000; max-height: 300px; overflow-y: auto; display: none; animation: slideDown 0.2s ease-out; } .select-dropdown.visible { display: block; } @keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } } .search-container { padding: 8px; border-bottom: 1px solid var(--kg-border); position: sticky; top: 0; background: var(--kg-surface); z-index: 10; } .search-input { width: 100%; padding: 6px 10px; border: 1px solid var(--kg-border); border-radius: 4px; outline: none; font-family: inherit; font-size: 0.9rem; } .search-input:focus { border-color: var(--kg-primary); } .option-item { padding: 10px 16px; cursor: pointer; display: flex; align-items: center; justify-content: space-between; transition: background 0.15s; color: var(--kg-text); } .option-item:hover { background: var(--kg-bg-secondary, rgba(0,0,0,0.04)); } .option-item.selected { background: rgba(var(--kg-primary-rgb, 19, 103, 255), 0.08); color: var(--kg-primary); font-weight: 600; } .no-results { padding: 16px; text-align: center; color: var(--kg-text-muted); font-size: 0.9rem; } .check-icon { width: 16px; height: 16px; } `"
3186
+ "default": "css` :host { display: inline-block; width: 100%; position: relative; font-family: inherit; user-select: none; } .kg-select-container { display: flex; flex-direction: column; gap: 0.5rem; width: 100%; } .select-label { font-size: 0.875rem; font-weight: 600; color: var(--kg-text); opacity: 0.8; margin-left: 2px; } * { box-sizing: border-box; } .select-trigger { display: flex; align-items: center; justify-content: space-between; height: var(--kg-form-height); padding: 0 1rem; background: var(--kg-surface); border: 1px solid var(--kg-border); border-radius: var(--kg-radius-md, 8px); cursor: pointer; transition: all 0.2s ease; gap: 8px; flex-wrap: nowrap; overflow: hidden; } .select-trigger:hover { border-color: var(--kg-primary); } .select-trigger.open { border-color: var(--kg-primary); box-shadow: 0 0 0 2px rgba(65, 171, 52, 0.2); } .select-trigger.disabled { opacity: 0.5; cursor: not-allowed; background: var(--kg-bg-secondary); } .placeholder { color: var(--kg-text-muted); opacity: 0.6; } .selected-text { color: var(--kg-text); flex: 1; } .tags-container { display: flex; flex-wrap: wrap; gap: 4px; flex: 1; } .tag { background: var(--kg-primary); color: white; padding: 2px 8px; border-radius: 4px; font-size: 0.8rem; display: flex; align-items: center; gap: 4px; } .tag-remove { cursor: pointer; opacity: 0.8; } .tag-remove:hover { opacity: 1; } .chevron { transition: transform 0.2s ease; color: var(--kg-text-muted); flex-shrink: 0; } .open .chevron { transform: rotate(180deg); } /* Dropdown */ .select-dropdown { position: absolute; top: calc(100% + 5px); left: 0; width: 100%; background: var(--kg-surface); border: 1px solid var(--kg-border); border-radius: var(--kg-radius-md, 8px); box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1); z-index: 1000; max-height: 300px; overflow-y: auto; display: none; animation: slideDown 0.2s ease-out; } .select-dropdown.visible { display: block; } @keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } } .search-container { padding: 8px; border-bottom: 1px solid var(--kg-border); position: sticky; top: 0; background: var(--kg-surface); z-index: 10; } .search-input { width: 100%; padding: 6px 10px; border: 1px solid var(--kg-border); border-radius: 4px; outline: none; font-family: inherit; font-size: 0.9rem; } .search-input:focus { border-color: var(--kg-primary); } .option-item { padding: 10px 16px; cursor: pointer; display: flex; align-items: center; justify-content: space-between; transition: background 0.15s; color: var(--kg-text); } .option-item:hover { background: var(--kg-bg-secondary, rgba(0, 0, 0, 0.04)); } .option-item.selected { background: rgba(var(--kg-primary-rgb, 19, 103, 255), 0.08); color: var(--kg-primary); font-weight: 600; } .no-results { padding: 16px; text-align: center; color: var(--kg-text-muted); font-size: 0.9rem; } .check-icon { width: 16px; height: 16px; } `"
3187
+ },
3188
+ {
3189
+ "kind": "method",
3190
+ "name": "_updateFormValue"
3121
3191
  },
3122
3192
  {
3123
3193
  "kind": "method",
@@ -3214,14 +3284,6 @@
3214
3284
  },
3215
3285
  "default": "false"
3216
3286
  },
3217
- {
3218
- "kind": "field",
3219
- "name": "disabled",
3220
- "type": {
3221
- "text": "boolean"
3222
- },
3223
- "default": "false"
3224
- },
3225
3287
  {
3226
3288
  "kind": "field",
3227
3289
  "name": "searchable",
@@ -3255,6 +3317,12 @@
3255
3317
  }
3256
3318
  }
3257
3319
  ],
3320
+ "mixins": [
3321
+ {
3322
+ "name": "FormAssociated",
3323
+ "module": "/src/mixins/FormAssociated.js"
3324
+ }
3325
+ ],
3258
3326
  "superclass": {
3259
3327
  "name": "LitElement",
3260
3328
  "package": "lit"
@@ -3394,7 +3462,7 @@
3394
3462
  "text": "object"
3395
3463
  },
3396
3464
  "static": true,
3397
- "default": "{ value: { type: Number, reflect: true }, min: { type: Number }, max: { type: Number }, step: { type: Number }, label: { type: String }, color: { type: String }, disabled: { type: Boolean, reflect: true }, hideValue: { type: Boolean, reflect: true, attribute: 'hide-value' }, showPins: { type: Boolean, attribute: 'show-pins' } }"
3465
+ "default": "{ // value, disabled, name handled by mixin min: { type: Number }, max: { type: Number }, step: { type: Number }, label: { type: String }, color: { type: String }, hideValue: { type: Boolean, reflect: true, attribute: 'hide-value' }, showPins: { type: Boolean, attribute: 'show-pins' } }"
3398
3466
  },
3399
3467
  {
3400
3468
  "kind": "field",
@@ -3415,14 +3483,6 @@
3415
3483
  "kind": "method",
3416
3484
  "name": "render"
3417
3485
  },
3418
- {
3419
- "kind": "field",
3420
- "name": "value",
3421
- "type": {
3422
- "text": "number"
3423
- },
3424
- "default": "50"
3425
- },
3426
3486
  {
3427
3487
  "kind": "field",
3428
3488
  "name": "min",
@@ -3449,11 +3509,11 @@
3449
3509
  },
3450
3510
  {
3451
3511
  "kind": "field",
3452
- "name": "disabled",
3512
+ "name": "value",
3453
3513
  "type": {
3454
- "text": "boolean"
3514
+ "text": "number"
3455
3515
  },
3456
- "default": "false"
3516
+ "default": "50"
3457
3517
  },
3458
3518
  {
3459
3519
  "kind": "field",
@@ -3480,9 +3540,15 @@
3480
3540
  }
3481
3541
  }
3482
3542
  ],
3543
+ "mixins": [
3544
+ {
3545
+ "name": "FormAssociated",
3546
+ "module": "/src/mixins/FormAssociated.js"
3547
+ }
3548
+ ],
3483
3549
  "superclass": {
3484
3550
  "name": "LitElement",
3485
- "package": "lit"
3551
+ "module": "src/components/kg-slider.js"
3486
3552
  },
3487
3553
  "tagName": "kg-slider",
3488
3554
  "customElement": true
@@ -3708,7 +3774,7 @@
3708
3774
  "text": "object"
3709
3775
  },
3710
3776
  "static": true,
3711
- "default": "{ checked: { type: Boolean, reflect: true }, disabled: { type: Boolean }, label: { type: String }, color: { type: String } // primary, secondary, tertiary }"
3777
+ "default": "{ checked: { type: Boolean, reflect: true }, label: { type: String }, color: { type: String } // primary, secondary, tertiary // disabled and value handled by mixin }"
3712
3778
  },
3713
3779
  {
3714
3780
  "kind": "field",
@@ -3716,6 +3782,32 @@
3716
3782
  "static": true,
3717
3783
  "default": "css` :host { display: inline-block; vertical-align: middle; cursor: pointer; user-select: none; font-family: inherit; } :host([disabled]) { cursor: not-allowed; opacity: 0.5; } .kg-switch-wrapper { display: flex; align-items: center; gap: 0.75rem; } .kg-switch-track { position: relative; width: 44px; height: 24px; background: var(--kg-border); border-radius: 24px; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); box-shadow: inset 0 2px 4px rgba(0,0,0,0.05); } .kg-switch-thumb { position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; background: white; border-radius: 50%; box-shadow: 0 2px 4px rgba(0,0,0,0.2); transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); } /* Checked State */ :host([checked]) .kg-switch-track { background: var(--switch-active-color, var(--kg-primary)); } :host([checked]) .kg-switch-thumb { transform: translateX(20px); } .label { font-size: 0.95rem; font-weight: 500; color: var(--kg-text); } `"
3718
3784
  },
3785
+ {
3786
+ "kind": "method",
3787
+ "name": "formResetCallback"
3788
+ },
3789
+ {
3790
+ "kind": "method",
3791
+ "name": "formStateRestoreCallback",
3792
+ "parameters": [
3793
+ {
3794
+ "name": "state"
3795
+ }
3796
+ ]
3797
+ },
3798
+ {
3799
+ "kind": "method",
3800
+ "name": "updated",
3801
+ "parameters": [
3802
+ {
3803
+ "name": "changedProperties"
3804
+ }
3805
+ ]
3806
+ },
3807
+ {
3808
+ "kind": "method",
3809
+ "name": "_updateFormValue"
3810
+ },
3719
3811
  {
3720
3812
  "kind": "method",
3721
3813
  "name": "_toggle"
@@ -3734,19 +3826,19 @@
3734
3826
  },
3735
3827
  {
3736
3828
  "kind": "field",
3737
- "name": "disabled",
3829
+ "name": "color",
3738
3830
  "type": {
3739
- "text": "boolean"
3831
+ "text": "string"
3740
3832
  },
3741
- "default": "false"
3833
+ "default": "'primary'"
3742
3834
  },
3743
3835
  {
3744
3836
  "kind": "field",
3745
- "name": "color",
3837
+ "name": "value",
3746
3838
  "type": {
3747
3839
  "text": "string"
3748
3840
  },
3749
- "default": "'primary'"
3841
+ "default": "'on'"
3750
3842
  }
3751
3843
  ],
3752
3844
  "events": [
@@ -3757,6 +3849,12 @@
3757
3849
  }
3758
3850
  }
3759
3851
  ],
3852
+ "mixins": [
3853
+ {
3854
+ "name": "FormAssociated",
3855
+ "module": "/src/mixins/FormAssociated.js"
3856
+ }
3857
+ ],
3760
3858
  "superclass": {
3761
3859
  "name": "LitElement",
3762
3860
  "package": "lit"
@@ -4163,13 +4261,13 @@
4163
4261
  "text": "object"
4164
4262
  },
4165
4263
  "static": true,
4166
- "default": "{ value: { type: String }, label: { type: String }, placeholder: { type: String }, rows: { type: Number }, disabled: { type: Boolean, reflect: true }, error: { type: Boolean, reflect: true }, fullwidth: { type: Boolean, reflect: true }, inverted: { type: Boolean, reflect: true }, resize: { type: String, reflect: true } // none, both, horizontal, vertical }"
4264
+ "default": "{ // value, disabled handled by mixin label: { type: String }, placeholder: { type: String }, rows: { type: Number }, error: { type: Boolean, reflect: true }, fullwidth: { type: Boolean, reflect: true }, inverted: { type: Boolean, reflect: true }, resize: { type: String, reflect: true } }"
4167
4265
  },
4168
4266
  {
4169
4267
  "kind": "field",
4170
4268
  "name": "styles",
4171
4269
  "static": true,
4172
- "default": "css` :host { display: inline-block; max-width: 100%; vertical-align: top; } :host([fullwidth]) { display: block; width: 100%; } /* Allow host to grow with content if resize is allowed */ :host([resize=\"both\"]), :host([resize=\"horizontal\"]) { display: inline-block; width: auto; min-width: 100px; } .kg-textarea-container { display: flex; flex-direction: column; gap: 0.5rem; width: 100%; } .textarea-label { font-size: 0.875rem; font-weight: 600; color: var(--kg-text); opacity: 0.8; margin-left: 2px; } .ui-textarea { display: inline-flex; width: 100%; color: var(--kg-text); font-family: inherit; } .textarea-wrapper { display: flex; width: 100%; height: 100%; align-items: stretch; background: var(--kg-surface); border: 1px solid var(--kg-border); border-radius: var(--kg-radius-md, 8px); transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease; position: relative; } .textarea-wrapper:focus-within { border-color: var(--kg-primary); background: var(--kg-bg); box-shadow: 0 0 0 2px rgba(65, 171, 52, 0.2); } textarea { margin: 0; flex: 1 1 auto; outline: none; -webkit-tap-highlight-color: rgba(0,0,0,0); text-align: left; line-height: 1.5; font-family: inherit; padding: 0.75rem 1rem; background: transparent; border: none; color: inherit; min-width: 0; width: 100%; min-height: 5rem; } textarea::placeholder { color: var(--kg-text-muted); opacity: 0.6; } /* States */ .disabled { opacity: 0.45; pointer-events: none; } .error .textarea-wrapper { border-color: #DB2828; background-color: rgba(219, 40, 40, 0.02); } /* Variations */ :host([inverted]) .textarea-label { color: rgba(255, 255, 255, 0.9); } :host([inverted]) .textarea-wrapper { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.15); color: #FFFFFF; } :host([inverted]) .textarea-wrapper:focus-within { background: rgba(255, 255, 255, 0.12); border-color: var(--kg-primary); } :host([inverted]) textarea::placeholder { color: rgba(255, 255, 255, 0.5); } `"
4270
+ "default": "css` :host { display: inline-block; max-width: 100%; vertical-align: top; } :host([fullwidth]) { display: block; width: 100%; } :host([resize=\"both\"]), :host([resize=\"horizontal\"]) { display: inline-block; width: auto; min-width: 100px; } .kg-textarea-container { display: flex; flex-direction: column; gap: 0.5rem; width: 100%; } .textarea-label { font-size: 0.875rem; font-weight: 600; color: var(--kg-text); opacity: 0.8; margin-left: 2px; } .ui-textarea { display: inline-flex; width: 100%; color: var(--kg-text); font-family: inherit; } .textarea-wrapper { display: flex; width: 100%; height: 100%; align-items: stretch; background: var(--kg-surface); border: 1px solid var(--kg-border); border-radius: var(--kg-radius-md, 8px); transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease; position: relative; } .textarea-wrapper:focus-within { border-color: var(--kg-primary); background: var(--kg-bg); box-shadow: 0 0 0 2px rgba(65, 171, 52, 0.2); } textarea { margin: 0; flex: 1 1 auto; outline: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); text-align: left; line-height: 1.5; font-family: inherit; padding: 0.75rem 1rem; background: transparent; border: none; color: inherit; min-width: 0; width: 100%; min-height: 5rem; } textarea::placeholder { color: var(--kg-text-muted); opacity: 0.6; } /* States */ .disabled { opacity: 0.45; pointer-events: none; } .error.textarea-wrapper { border-color: #DB2828; background-color: rgba(219, 40, 40, 0.02); } /* Variations */ :host([inverted]) .textarea-label { color: rgba(255, 255, 255, 0.9); } :host([inverted]) .textarea-wrapper { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.15); color: #FFFFFF; } :host([inverted]) .textarea-wrapper:focus-within { background: rgba(255, 255, 255, 0.12); border-color: var(--kg-primary); } :host([inverted]) textarea::placeholder { color: rgba(255, 255, 255, 0.5); } `"
4173
4271
  },
4174
4272
  {
4175
4273
  "kind": "method",
@@ -4184,14 +4282,6 @@
4184
4282
  "kind": "method",
4185
4283
  "name": "render"
4186
4284
  },
4187
- {
4188
- "kind": "field",
4189
- "name": "value",
4190
- "type": {
4191
- "text": "string"
4192
- },
4193
- "default": "''"
4194
- },
4195
4285
  {
4196
4286
  "kind": "field",
4197
4287
  "name": "placeholder",
@@ -4208,14 +4298,6 @@
4208
4298
  },
4209
4299
  "default": "3"
4210
4300
  },
4211
- {
4212
- "kind": "field",
4213
- "name": "disabled",
4214
- "type": {
4215
- "text": "boolean"
4216
- },
4217
- "default": "false"
4218
- },
4219
4301
  {
4220
4302
  "kind": "field",
4221
4303
  "name": "error",
@@ -4257,6 +4339,12 @@
4257
4339
  }
4258
4340
  }
4259
4341
  ],
4342
+ "mixins": [
4343
+ {
4344
+ "name": "FormAssociated",
4345
+ "module": "/src/mixins/FormAssociated.js"
4346
+ }
4347
+ ],
4260
4348
  "superclass": {
4261
4349
  "name": "LitElement",
4262
4350
  "package": "lit"
@@ -0,0 +1 @@
1
+ import{isServer as t}from"lit";const e=e=>class extends e{static get properties(){return{name:{type:String,reflect:!0},value:{type:String,reflect:!0},disabled:{type:Boolean,reflect:!0},required:{type:Boolean,reflect:!0},type:{type:String,reflect:!0}}}static get formAssociated(){return!0}constructor(){super(),this.name="",this.value="",this.disabled=!1,this.required=!1,this.type="text",!t&&this.attachInternals&&(this.internals=this.attachInternals())}get form(){return this.internals?this.internals.form:null}updated(t){super.updated(t),(t.has("value")||t.has("disabled"))&&this._updateFormValue()}_updateFormValue(){!t&&this.internals&&this.internals.setFormValue(this.value)}formResetCallback(){this.value=this.getAttribute("value")||""}formStateRestoreCallback(t){this.value=t}setValidity(e,i,s){!t&&this.internals&&this.internals.setValidity(e,i,s)}checkValidity(){return!this.internals||this.internals.checkValidity()}reportValidity(){return!this.internals||this.internals.reportValidity()}};export{e as F};