@visitwonders/assembly 0.1.0 → 0.2.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 (241) hide show
  1. package/declarations/action/button-group.d.ts +89 -0
  2. package/declarations/action/button-group.d.ts.map +1 -0
  3. package/declarations/action/button.d.ts +4 -0
  4. package/declarations/action/button.d.ts.map +1 -1
  5. package/declarations/action/index.d.ts +1 -0
  6. package/declarations/action/index.d.ts.map +1 -1
  7. package/declarations/components/form/checkbox.d.ts +0 -65
  8. package/declarations/components/form/control.d.ts +0 -36
  9. package/declarations/components/form/error-message.d.ts +0 -22
  10. package/declarations/components/form/field.d.ts +0 -21
  11. package/declarations/components/form/form.d.ts +0 -14
  12. package/declarations/components/form/help-text.d.ts +0 -14
  13. package/declarations/components/form/index.d.ts +0 -15
  14. package/declarations/components/form/input.d.ts +0 -80
  15. package/declarations/components/form/label.d.ts +0 -34
  16. package/declarations/components/form/radio-group.d.ts +0 -43
  17. package/declarations/components/form/radio.d.ts +0 -54
  18. package/declarations/components/form/search-input.d.ts +0 -35
  19. package/declarations/components/form/select.d.ts +0 -36
  20. package/declarations/components/form/test.d.ts +0 -11
  21. package/declarations/components/form/textarea.d.ts +0 -79
  22. package/declarations/components/form/toggle.d.ts +0 -23
  23. package/declarations/components/primitives/grid-item.d.ts +0 -21
  24. package/declarations/components/primitives/grid.d.ts +0 -49
  25. package/declarations/components/primitives/h-stack.d.ts +0 -17
  26. package/declarations/components/primitives/heading.d.ts +0 -52
  27. package/declarations/components/primitives/image.d.ts +0 -24
  28. package/declarations/components/primitives/index.d.ts +0 -8
  29. package/declarations/components/primitives/link.d.ts +0 -16
  30. package/declarations/components/primitives/stack.d.ts +0 -23
  31. package/declarations/components/primitives/text.d.ts +0 -50
  32. package/declarations/components/primitives/v-stack.d.ts +0 -16
  33. package/declarations/components/ui/badge.d.ts +0 -14
  34. package/declarations/components/ui/button.d.ts +0 -32
  35. package/declarations/components/ui/card.d.ts +0 -27
  36. package/declarations/components/ui/description-list.d.ts +0 -22
  37. package/declarations/components/ui/drawer.d.ts +0 -14
  38. package/declarations/components/ui/icon-button.d.ts +0 -21
  39. package/declarations/components/ui/icon.d.ts +0 -21
  40. package/declarations/components/ui/index.d.ts +0 -17
  41. package/declarations/components/ui/modal.d.ts +0 -14
  42. package/declarations/components/ui/page-header.d.ts +0 -16
  43. package/declarations/components/ui/skeleton-card.d.ts +0 -17
  44. package/declarations/components/ui/skeleton-text.d.ts +0 -16
  45. package/declarations/components/ui/skeleton.d.ts +0 -20
  46. package/declarations/components/ui/spinner.d.ts +0 -11
  47. package/declarations/components/ui/tab-nav/index.d.ts +0 -36
  48. package/declarations/components/ui/table/body.d.ts +0 -11
  49. package/declarations/components/ui/table/caption.d.ts +0 -18
  50. package/declarations/components/ui/table/cell.d.ts +0 -31
  51. package/declarations/components/ui/table/footer.d.ts +0 -11
  52. package/declarations/components/ui/table/header-cell.d.ts +0 -35
  53. package/declarations/components/ui/table/header.d.ts +0 -11
  54. package/declarations/components/ui/table/row.d.ts +0 -21
  55. package/declarations/components/ui/table_old.d.ts +0 -29
  56. package/declarations/data/table.d.ts +0 -1
  57. package/declarations/data/table.d.ts.map +1 -1
  58. package/declarations/form/calendar.d.ts +0 -1
  59. package/declarations/form/calendar.d.ts.map +1 -1
  60. package/declarations/form/control.d.ts +5 -1
  61. package/declarations/form/control.d.ts.map +1 -1
  62. package/declarations/form/country-select-field.d.ts +6 -0
  63. package/declarations/form/country-select-field.d.ts.map +1 -1
  64. package/declarations/form/country-select.d.ts +0 -1
  65. package/declarations/form/country-select.d.ts.map +1 -1
  66. package/declarations/form/date-picker-field.d.ts +6 -0
  67. package/declarations/form/date-picker-field.d.ts.map +1 -1
  68. package/declarations/form/date-picker.d.ts +0 -1
  69. package/declarations/form/date-picker.d.ts.map +1 -1
  70. package/declarations/form/date-range-picker-field.d.ts +6 -0
  71. package/declarations/form/date-range-picker-field.d.ts.map +1 -1
  72. package/declarations/form/date-range-picker.d.ts +0 -1
  73. package/declarations/form/date-range-picker.d.ts.map +1 -1
  74. package/declarations/form/fieldset.d.ts +22 -0
  75. package/declarations/form/fieldset.d.ts.map +1 -0
  76. package/declarations/form/form.d.ts +0 -1
  77. package/declarations/form/form.d.ts.map +1 -1
  78. package/declarations/form/index.d.ts +1 -0
  79. package/declarations/form/index.d.ts.map +1 -1
  80. package/declarations/form/label.d.ts +4 -0
  81. package/declarations/form/label.d.ts.map +1 -1
  82. package/declarations/form/listbox.d.ts +0 -1
  83. package/declarations/form/listbox.d.ts.map +1 -1
  84. package/declarations/form/money-field.d.ts +6 -1
  85. package/declarations/form/money-field.d.ts.map +1 -1
  86. package/declarations/form/multi-select.d.ts +0 -1
  87. package/declarations/form/multi-select.d.ts.map +1 -1
  88. package/declarations/form/number-field.d.ts +9 -1
  89. package/declarations/form/number-field.d.ts.map +1 -1
  90. package/declarations/form/select-field.d.ts +4 -1
  91. package/declarations/form/select-field.d.ts.map +1 -1
  92. package/declarations/form/test.d.ts +0 -11
  93. package/declarations/form/text-field.d.ts +9 -0
  94. package/declarations/form/text-field.d.ts.map +1 -1
  95. package/declarations/form/time-picker-field.d.ts +6 -0
  96. package/declarations/form/time-picker-field.d.ts.map +1 -1
  97. package/declarations/form/time-picker.d.ts +0 -1
  98. package/declarations/form/time-picker.d.ts.map +1 -1
  99. package/declarations/form/toggle.d.ts +4 -0
  100. package/declarations/form/toggle.d.ts.map +1 -1
  101. package/declarations/layout/index.d.ts +1 -0
  102. package/declarations/layout/index.d.ts.map +1 -1
  103. package/declarations/layout/panel.d.ts +34 -0
  104. package/declarations/layout/panel.d.ts.map +1 -0
  105. package/declarations/media/icon.d.ts +0 -1
  106. package/declarations/media/icon.d.ts.map +1 -1
  107. package/declarations/media/image.d.ts +1 -1
  108. package/declarations/overlay/blanket.d.ts +0 -1
  109. package/declarations/overlay/blanket.d.ts.map +1 -1
  110. package/declarations/overlay/drawer.d.ts +4 -1
  111. package/declarations/overlay/drawer.d.ts.map +1 -1
  112. package/declarations/overlay/modal.d.ts +0 -1
  113. package/declarations/overlay/modal.d.ts.map +1 -1
  114. package/declarations/overlay/popover.d.ts +0 -1
  115. package/declarations/overlay/popover.d.ts.map +1 -1
  116. package/declarations/overlay/toast.d.ts +0 -1
  117. package/declarations/overlay/toast.d.ts.map +1 -1
  118. package/declarations/overlay/tooltip.d.ts +0 -1
  119. package/declarations/overlay/tooltip.d.ts.map +1 -1
  120. package/declarations/primitives/grid-item.d.ts +0 -21
  121. package/declarations/primitives/grid.d.ts +0 -49
  122. package/declarations/primitives/h-stack.d.ts +0 -17
  123. package/declarations/primitives/heading.d.ts +0 -52
  124. package/declarations/primitives/image.d.ts +0 -24
  125. package/declarations/primitives/index.d.ts +0 -4
  126. package/declarations/primitives/link.d.ts +0 -16
  127. package/declarations/primitives/stack.d.ts +0 -23
  128. package/declarations/primitives/text.d.ts +0 -50
  129. package/declarations/primitives/v-stack.d.ts +0 -16
  130. package/declarations/status/badge.d.ts +0 -1
  131. package/declarations/status/badge.d.ts.map +1 -1
  132. package/declarations/status/skeleton-avatar.d.ts +1 -1
  133. package/declarations/status/skeleton-avatar.d.ts.map +1 -1
  134. package/declarations/status/skeleton-button.d.ts +1 -1
  135. package/declarations/status/skeleton-button.d.ts.map +1 -1
  136. package/declarations/status/skeleton-image.d.ts +1 -1
  137. package/declarations/status/skeleton-image.d.ts.map +1 -1
  138. package/declarations/status/skeleton-text.d.ts +1 -1
  139. package/declarations/status/skeleton-text.d.ts.map +1 -1
  140. package/declarations/status/skeleton.d.ts +1 -1
  141. package/declarations/status/skeleton.d.ts.map +1 -1
  142. package/declarations/status/tag.d.ts +0 -1
  143. package/declarations/status/tag.d.ts.map +1 -1
  144. package/declarations/typography/link.d.ts +0 -16
  145. package/declarations/ui/button.d.ts +0 -50
  146. package/declarations/ui/icon.d.ts +0 -21
  147. package/dist/_app_/action/button-group.js +1 -0
  148. package/dist/_app_/form/fieldset.js +1 -0
  149. package/dist/_app_/layout/panel.js +1 -0
  150. package/dist/action/button-group.css +18 -0
  151. package/dist/action/button-group.js +130 -0
  152. package/dist/action/button-group.js.map +1 -0
  153. package/dist/action/button.css +152 -0
  154. package/dist/action/button.js +1 -1
  155. package/dist/action/index.js +1 -0
  156. package/dist/action/index.js.map +1 -1
  157. package/dist/data/table.css +48 -47
  158. package/dist/data/table.js +1 -1
  159. package/dist/form/checkbox.css +3 -3
  160. package/dist/form/control-css-02e93d930aecac651d5c69dc10a83504.css +36 -0
  161. package/dist/form/control.js +2 -2
  162. package/dist/form/country-select-field.js +1 -1
  163. package/dist/form/country-select-field.js.map +1 -1
  164. package/dist/form/country-select.css +1 -1
  165. package/dist/form/date-picker-field.js +1 -1
  166. package/dist/form/date-picker-field.js.map +1 -1
  167. package/dist/form/date-range-picker-field.js +1 -1
  168. package/dist/form/date-range-picker-field.js.map +1 -1
  169. package/dist/form/field.css +3 -3
  170. package/dist/form/fieldset.css +65 -0
  171. package/dist/form/fieldset.js +20 -0
  172. package/dist/form/fieldset.js.map +1 -0
  173. package/dist/form/help-text.css +1 -1
  174. package/dist/form/index.js +1 -0
  175. package/dist/form/index.js.map +1 -1
  176. package/dist/form/input.css +1 -0
  177. package/dist/form/label.css +15 -1
  178. package/dist/form/label.js +10 -4
  179. package/dist/form/money-field.js +1 -1
  180. package/dist/form/multi-select.css +1 -1
  181. package/dist/form/number-field.css +1 -0
  182. package/dist/form/number-field.js +1 -1
  183. package/dist/form/radio.css +3 -3
  184. package/dist/form/select-field.js +1 -1
  185. package/dist/form/select-field.js.map +1 -1
  186. package/dist/form/select.css +1 -1
  187. package/dist/form/{text-field-css-f60360f3f8aaf4da664eaccd1bcc9f8f.css → text-field-css-754feeb82dbd9fc9afdc1f00dceb13ad.css} +22 -1
  188. package/dist/form/text-field.js +2 -2
  189. package/dist/form/textarea.css +2 -1
  190. package/dist/form/time-picker-field.js +1 -1
  191. package/dist/form/time-picker-field.js.map +1 -1
  192. package/dist/form/toggle.css +27 -1
  193. package/dist/form/toggle.js +4 -1
  194. package/dist/layout/{divider-css-1ba104b9c606cbd1f542b45640fb5f2b.css → divider-css-7e0cc7d350e31172582851c6cb2cf586.css} +2 -2
  195. package/dist/layout/divider.js +1 -1
  196. package/dist/layout/{grid-css-086976eb41686e3714554f56c098d3d5.css → grid-css-c8259b34d7062f44e78f0a2cc139cb44.css} +13 -13
  197. package/dist/layout/grid.js +1 -1
  198. package/dist/layout/index.js +1 -0
  199. package/dist/layout/index.js.map +1 -1
  200. package/dist/layout/panel.css +229 -0
  201. package/dist/layout/panel.js +32 -0
  202. package/dist/layout/panel.js.map +1 -0
  203. package/dist/overlay/blanket.css +12 -11
  204. package/dist/overlay/blanket.js +1 -1
  205. package/dist/overlay/drawer.css +99 -62
  206. package/dist/overlay/drawer.js +7 -4
  207. package/dist/overlay/modal.css +22 -21
  208. package/dist/overlay/modal.js +4 -4
  209. package/dist/overlay/popover.css +30 -29
  210. package/dist/overlay/popover.js +4 -4
  211. package/dist/overlay/toast.css +49 -48
  212. package/dist/overlay/toast.js +2 -2
  213. package/dist/overlay/tooltip.css +38 -37
  214. package/dist/overlay/tooltip.js +2 -2
  215. package/dist/skeleton-shared-BTA5oAjw.js +3 -0
  216. package/dist/skeleton-shared-BTA5oAjw.js.map +1 -0
  217. package/dist/status/badge.css +30 -29
  218. package/dist/status/badge.js +1 -1
  219. package/dist/status/skeleton-avatar.js +1 -1
  220. package/dist/status/skeleton-avatar.js.map +1 -1
  221. package/dist/status/skeleton-button.js +1 -1
  222. package/dist/status/skeleton-button.js.map +1 -1
  223. package/dist/status/skeleton-image.js +1 -1
  224. package/dist/status/skeleton-image.js.map +1 -1
  225. package/dist/status/skeleton-text.js +1 -1
  226. package/dist/status/skeleton-text.js.map +1 -1
  227. package/dist/status/skeleton.js +1 -1
  228. package/dist/status/skeleton.js.map +1 -1
  229. package/dist/status/tag.css +50 -51
  230. package/dist/status/tag.js +1 -1
  231. package/dist/styles/base/typography.css +1 -1
  232. package/dist/styles/primitive/typography.css +10 -7
  233. package/dist/styles/semantic/typography.css +4 -4
  234. package/dist/styles.css +15 -12
  235. package/dist/typography/{heading-css-8850735eabc2efb34f15240b852c99e7.css → heading-css-726c4c3109f2b741657733e1ba103c67.css} +9 -9
  236. package/dist/typography/heading.js +1 -1
  237. package/package.json +22 -18
  238. package/dist/form/control-css-6c81caf37fd813b36033091d5340bc70.css +0 -20
  239. package/dist/skeleton-CL5Pcwrk.js +0 -3
  240. package/dist/skeleton-CL5Pcwrk.js.map +0 -1
  241. /package/dist/status/{skeleton.css → skeleton-shared.css} +0 -0
@@ -147,17 +147,17 @@
147
147
  .label_eed179744 {
148
148
  font-size: var(--font-size-md);
149
149
  color: var(--color-text);
150
- line-height: var(--spacing-5);
150
+ line-height: var(--line-height-20);
151
151
  }
152
152
 
153
153
  .wrapper_eed179744[data-size="sm"] .label_eed179744 {
154
154
  font-size: var(--font-size-sm);
155
- line-height: var(--spacing-4);
155
+ line-height: var(--line-height-16);
156
156
  }
157
157
 
158
158
  .wrapper_eed179744[data-size="lg"] .label_eed179744 {
159
159
  font-size: var(--font-size-lg);
160
- line-height: var(--spacing-6);
160
+ line-height: var(--line-height-24);
161
161
  }
162
162
 
163
163
  .label_eed179744[data-visually-hidden="true"] {
@@ -0,0 +1,36 @@
1
+ /* <inline>/src/form/control-css-02e93d930aecac651d5c69dc10a83504.css */
2
+
3
+ .assembly-control_e529e8199 {
4
+ display: flex;
5
+ flex-direction: column;
6
+ gap: var(--spacing-2);
7
+ width: 100%;
8
+ }
9
+
10
+ .assembly-control_e529e8199[data-orientation="horizontal"] {
11
+ flex-direction: row;
12
+ align-items: flex-start;
13
+ gap: var(--spacing-6);
14
+ }
15
+
16
+ .assembly-control_e529e8199[data-orientation="horizontal"] .label {
17
+ flex-shrink: 0;
18
+ min-width: 120px;
19
+ padding-top: var(--spacing-2);
20
+ }
21
+
22
+ .assembly-control_e529e8199[data-max-width="xs"] {
23
+ max-width: 120px;
24
+ }
25
+ .assembly-control_e529e8199[data-max-width="sm"] {
26
+ max-width: 200px;
27
+ }
28
+ .assembly-control_e529e8199[data-max-width="md"] {
29
+ max-width: 320px;
30
+ }
31
+ .assembly-control_e529e8199[data-max-width="lg"] {
32
+ max-width: 480px;
33
+ }
34
+ .assembly-control_e529e8199[data-max-width="xl"] {
35
+ max-width: 640px;
36
+ }
@@ -1,4 +1,4 @@
1
- import "./control-css-6c81caf37fd813b36033091d5340bc70.css"
1
+ import "./control-css-02e93d930aecac651d5c69dc10a83504.css"
2
2
  import Component from '@glimmer/component';
3
3
  import { guidFor } from '@ember/object/internals';
4
4
  import { hash } from '@ember/helper';
@@ -39,7 +39,7 @@ class Control extends Component {
39
39
  return this.args.isReadOnly ?? false;
40
40
  }
41
41
  static {
42
- setComponentTemplate(precompileTemplate("\n\n<div class=\"assembly-control_e529e8199\" data-orientation={{this.orientation}} data-invalid={{if this.isInvalid \"true\" \"false\"}} data-disabled={{if this.isDisabled \"true\" \"false\"}} data-required={{if this.isRequired \"true\" \"false\"}} data-readonly={{if this.isReadOnly \"true\" \"false\"}} data-test-form-control ...attributes>\n {{yield (hash Label=(component Label for=this.id isRequired=this.isRequired isDisabled=this.isDisabled) Input=(component Input id=this.id isDisabled=this.isDisabled isRequired=this.isRequired isReadOnly=this.isReadOnly isInvalid=this.isInvalid aria-describedby=this.ariaDescribedBy) Textarea=(component Textarea id=this.id isDisabled=this.isDisabled isRequired=this.isRequired isReadOnly=this.isReadOnly isInvalid=this.isInvalid aria-describedby=this.ariaDescribedBy) HelpText=(component HelpText id=this.helpTextId) ErrorMessage=(component ErrorMessage id=this.errorMessageId isInvalid=this.isInvalid) id=this.id isInvalid=this.isInvalid isDisabled=this.isDisabled isRequired=this.isRequired isReadOnly=this.isReadOnly)}}\n</div>", {
42
+ setComponentTemplate(precompileTemplate("\n\n<div class=\"assembly-control_e529e8199\" data-orientation={{this.orientation}} data-invalid={{if this.isInvalid \"true\" \"false\"}} data-disabled={{if this.isDisabled \"true\" \"false\"}} data-required={{if this.isRequired \"true\" \"false\"}} data-readonly={{if this.isReadOnly \"true\" \"false\"}} data-test-form-control ...attributes>\n {{yield (hash Label=(component Label for=this.id isRequired=this.isRequired isDisabled=this.isDisabled info=@labelInfo) Input=(component Input id=this.id isDisabled=this.isDisabled isRequired=this.isRequired isReadOnly=this.isReadOnly isInvalid=this.isInvalid aria-describedby=this.ariaDescribedBy) Textarea=(component Textarea id=this.id isDisabled=this.isDisabled isRequired=this.isRequired isReadOnly=this.isReadOnly isInvalid=this.isInvalid aria-describedby=this.ariaDescribedBy) HelpText=(component HelpText id=this.helpTextId) ErrorMessage=(component ErrorMessage id=this.errorMessageId isInvalid=this.isInvalid) id=this.id isInvalid=this.isInvalid isDisabled=this.isDisabled isRequired=this.isRequired isReadOnly=this.isReadOnly)}}\n</div>", {
43
43
  strictMode: true,
44
44
  scope: () => ({
45
45
  hash,
@@ -23,7 +23,7 @@ class CountrySelectField extends Component {
23
23
  return parts.length > 0 ? parts.join(' ') : undefined;
24
24
  };
25
25
  static {
26
- setComponentTemplate(precompileTemplate("<Control @isInvalid={{this.isInvalid}} @isDisabled={{@isDisabled}} @isRequired={{@isRequired}} ...attributes as |ctrl|>\n <ctrl.Label @isVisuallyHidden={{this.isLabelHidden}}>\n {{@label}}\n </ctrl.Label>\n\n <CountrySelect @id={{ctrl.id}} @name={{@name}} @value={{@value}} @placeholder={{@placeholder}} @isDisabled={{@isDisabled}} @isInvalid={{this.isInvalid}} @isRequired={{@isRequired}} @aria-describedby={{this.getAriaDescribedBy ctrl.id}} @showFlag={{@showFlag}} @showDialCode={{@showDialCode}} @displayDialCode={{@displayDialCode}} @suggestedCountries={{@suggestedCountries}} @prioritizeByLocale={{@prioritizeByLocale}} @includeOnly={{@includeOnly}} @exclude={{@exclude}} @onChange={{@onChange}} @onBlur={{@onBlur}} @onFocus={{@onFocus}} data-test-country-select-field />\n\n {{#if @helpText}}\n <ctrl.HelpText>{{@helpText}}</ctrl.HelpText>\n {{/if}}\n\n {{#if @error}}\n <ctrl.ErrorMessage>{{@error}}</ctrl.ErrorMessage>\n {{/if}}\n</Control>", {
26
+ setComponentTemplate(precompileTemplate("<Control @isInvalid={{this.isInvalid}} @isDisabled={{@isDisabled}} @isRequired={{@isRequired}} @labelInfo={{@labelInfo}} ...attributes as |ctrl|>\n {{#if (has-block \"info\")}}\n <ctrl.Label @isVisuallyHidden={{this.isLabelHidden}}>\n <:default>{{@label}}</:default>\n <:info>{{yield to=\"info\"}}</:info>\n </ctrl.Label>\n {{else}}\n <ctrl.Label @isVisuallyHidden={{this.isLabelHidden}}>\n {{@label}}\n </ctrl.Label>\n {{/if}}\n\n <CountrySelect @id={{ctrl.id}} @name={{@name}} @value={{@value}} @placeholder={{@placeholder}} @isDisabled={{@isDisabled}} @isInvalid={{this.isInvalid}} @isRequired={{@isRequired}} @aria-describedby={{this.getAriaDescribedBy ctrl.id}} @showFlag={{@showFlag}} @showDialCode={{@showDialCode}} @displayDialCode={{@displayDialCode}} @suggestedCountries={{@suggestedCountries}} @prioritizeByLocale={{@prioritizeByLocale}} @includeOnly={{@includeOnly}} @exclude={{@exclude}} @onChange={{@onChange}} @onBlur={{@onBlur}} @onFocus={{@onFocus}} data-test-country-select-field />\n\n {{#if @helpText}}\n <ctrl.HelpText>{{@helpText}}</ctrl.HelpText>\n {{/if}}\n\n {{#if @error}}\n <ctrl.ErrorMessage>{{@error}}</ctrl.ErrorMessage>\n {{/if}}\n</Control>", {
27
27
  strictMode: true,
28
28
  scope: () => ({
29
29
  Control,
@@ -1 +1 @@
1
- {"version":3,"file":"country-select-field.js","sources":["../../src/form/country-select-field.gts"],"sourcesContent":["import Component from '@glimmer/component';\n\nimport Control from './control.gts';\nimport CountrySelect from './country-select.gts';\n\nexport type LabelVisibility = 'visible' | 'hidden';\n\nexport interface CountrySelectFieldSignature {\n Element: HTMLDivElement;\n Args: {\n /** Label text (required) */\n label: string;\n\n /** Current selected value (ISO country code) */\n value?: string;\n\n /** Placeholder text shown when no value is selected */\n placeholder?: string;\n\n /** Help text displayed below the select */\n helpText?: string;\n\n /** Error message (also sets invalid state) */\n error?: string;\n\n /** Field is required */\n isRequired?: boolean;\n\n /** Field is disabled */\n isDisabled?: boolean;\n\n /** Label visibility */\n labelVisibility?: LabelVisibility;\n\n /** Input name for forms */\n name?: string;\n\n /** Show flag emoji in options and trigger (default: true) */\n showFlag?: boolean;\n\n /** Show dial code in options */\n showDialCode?: boolean;\n\n /** Show dial code in the selected value display */\n displayDialCode?: boolean;\n\n /** ISO codes to show at top as suggested */\n suggestedCountries?: string[];\n\n /** Auto-suggest based on browser locale (default: false) */\n prioritizeByLocale?: boolean;\n\n /** Only show these countries (ISO codes) */\n includeOnly?: string[];\n\n /** Hide these countries (ISO codes) */\n exclude?: string[];\n\n /** Change event handler */\n onChange?: (countryCode: string | null) => void;\n\n /** Blur event handler */\n onBlur?: (event: FocusEvent) => void;\n\n /** Focus event handler */\n onFocus?: (event: FocusEvent) => void;\n };\n}\n\nexport default class CountrySelectField extends Component<CountrySelectFieldSignature> {\n get isInvalid(): boolean {\n return !!this.args.error;\n }\n\n get isLabelHidden(): boolean {\n return this.args.labelVisibility === 'hidden';\n }\n\n /** Build aria-describedby from the control's help text and error message IDs */\n getAriaDescribedBy = (controlId: string): string | undefined => {\n const parts: string[] = [];\n if (this.args.helpText) {\n parts.push(`${controlId}-help-text`);\n }\n if (this.args.error) {\n parts.push(`${controlId}-error-message`);\n }\n return parts.length > 0 ? parts.join(' ') : undefined;\n };\n\n <template>\n <Control\n @isInvalid={{this.isInvalid}}\n @isDisabled={{@isDisabled}}\n @isRequired={{@isRequired}}\n ...attributes\n as |ctrl|\n >\n <ctrl.Label @isVisuallyHidden={{this.isLabelHidden}}>\n {{@label}}\n </ctrl.Label>\n\n <CountrySelect\n @id={{ctrl.id}}\n @name={{@name}}\n @value={{@value}}\n @placeholder={{@placeholder}}\n @isDisabled={{@isDisabled}}\n @isInvalid={{this.isInvalid}}\n @isRequired={{@isRequired}}\n @aria-describedby={{this.getAriaDescribedBy ctrl.id}}\n @showFlag={{@showFlag}}\n @showDialCode={{@showDialCode}}\n @displayDialCode={{@displayDialCode}}\n @suggestedCountries={{@suggestedCountries}}\n @prioritizeByLocale={{@prioritizeByLocale}}\n @includeOnly={{@includeOnly}}\n @exclude={{@exclude}}\n @onChange={{@onChange}}\n @onBlur={{@onBlur}}\n @onFocus={{@onFocus}}\n data-test-country-select-field\n />\n\n {{#if @helpText}}\n <ctrl.HelpText>{{@helpText}}</ctrl.HelpText>\n {{/if}}\n\n {{#if @error}}\n <ctrl.ErrorMessage>{{@error}}</ctrl.ErrorMessage>\n {{/if}}\n </Control>\n </template>\n}\n"],"names":["CountrySelectField","Component","isInvalid","args","error","isLabelHidden","labelVisibility","getAriaDescribedBy","controlId","parts","helpText","push","length","join","undefined","setComponentTemplate","precompileTemplate","strictMode","scope","Control","CountrySelect"],"mappings":";;;;;;AAqEe,MAAMA,2BAA2BC,SAAA,CAAU;EACxD,IAAIC,SAAAA,GAAqB;AACvB,IAAA,OAAO,CAAC,CAAC,IAAI,CAACC,IAAI,CAACC,KAAK;AAC1B,EAAA;EAEA,IAAIC,aAAAA,GAAyB;AAC3B,IAAA,OAAO,IAAI,CAACF,IAAI,CAACG,eAAe,KAAK,QAAA;AACvC,EAAA;AAEA;EACAC,qBAAsBC,SAAiB,IAAqB;IAC1D,MAAMC,KAAa,GAAK,EAAE;AAC1B,IAAA,IAAI,IAAI,CAACN,IAAI,CAACO,QAAQ,EAAE;AACtBD,MAAAA,KAAA,CAAME,IAAI,CAAC,CAAA,EAAGH,SAAA,YAAqB,CAAA;AACrC,IAAA;AACA,IAAA,IAAI,IAAI,CAACL,IAAI,CAACC,KAAK,EAAE;AACnBK,MAAAA,KAAA,CAAME,IAAI,CAAC,CAAA,EAAGH,SAAA,gBAAyB,CAAA;AACzC,IAAA;AACA,IAAA,OAAOC,MAAMG,MAAM,GAAG,IAAIH,KAAA,CAAMI,IAAI,CAAC,GAAA,CAAA,GAAOC,SAAA;EAC9C,CAAA;AAEA,EAAA;IAAAC,oBAAA,CAAAC,kBAAA,CAAA,u8BAAA,EA0CA;MAAAC,UAAA,EAAA,IAAA;AAAAC,MAAAA,KAAA,EAAAA,OAAA;QAAAC,OAAA;AAAAC,QAAAA;AAAA,OAAA;KAAU,CAAA,EAAV,IAAW,CAAA;AAAD;AACZ;;;;"}
1
+ {"version":3,"file":"country-select-field.js","sources":["../../src/form/country-select-field.gts"],"sourcesContent":["import Component from '@glimmer/component';\n\nimport Control from './control.gts';\nimport CountrySelect from './country-select.gts';\n\nexport type LabelVisibility = 'visible' | 'hidden';\n\nexport interface CountrySelectFieldSignature {\n Element: HTMLDivElement;\n Args: {\n /** Label text (required) */\n label: string;\n\n /** Current selected value (ISO country code) */\n value?: string;\n\n /** Placeholder text shown when no value is selected */\n placeholder?: string;\n\n /** Help text displayed below the select */\n helpText?: string;\n\n /** Error message (also sets invalid state) */\n error?: string;\n\n /** Field is required */\n isRequired?: boolean;\n\n /** Field is disabled */\n isDisabled?: boolean;\n\n /** Info tooltip text shown next to the label */\n labelInfo?: string;\n\n /** Label visibility */\n labelVisibility?: LabelVisibility;\n\n /** Input name for forms */\n name?: string;\n\n /** Show flag emoji in options and trigger (default: true) */\n showFlag?: boolean;\n\n /** Show dial code in options */\n showDialCode?: boolean;\n\n /** Show dial code in the selected value display */\n displayDialCode?: boolean;\n\n /** ISO codes to show at top as suggested */\n suggestedCountries?: string[];\n\n /** Auto-suggest based on browser locale (default: false) */\n prioritizeByLocale?: boolean;\n\n /** Only show these countries (ISO codes) */\n includeOnly?: string[];\n\n /** Hide these countries (ISO codes) */\n exclude?: string[];\n\n /** Change event handler */\n onChange?: (countryCode: string | null) => void;\n\n /** Blur event handler */\n onBlur?: (event: FocusEvent) => void;\n\n /** Focus event handler */\n onFocus?: (event: FocusEvent) => void;\n };\n Blocks: {\n /** Rich tooltip content shown next to the label */\n info: [];\n };\n}\n\nexport default class CountrySelectField extends Component<CountrySelectFieldSignature> {\n get isInvalid(): boolean {\n return !!this.args.error;\n }\n\n get isLabelHidden(): boolean {\n return this.args.labelVisibility === 'hidden';\n }\n\n /** Build aria-describedby from the control's help text and error message IDs */\n getAriaDescribedBy = (controlId: string): string | undefined => {\n const parts: string[] = [];\n if (this.args.helpText) {\n parts.push(`${controlId}-help-text`);\n }\n if (this.args.error) {\n parts.push(`${controlId}-error-message`);\n }\n return parts.length > 0 ? parts.join(' ') : undefined;\n };\n\n <template>\n <Control\n @isInvalid={{this.isInvalid}}\n @isDisabled={{@isDisabled}}\n @isRequired={{@isRequired}}\n @labelInfo={{@labelInfo}}\n ...attributes\n as |ctrl|\n >\n {{#if (has-block \"info\")}}\n <ctrl.Label @isVisuallyHidden={{this.isLabelHidden}}>\n <:default>{{@label}}</:default>\n <:info>{{yield to=\"info\"}}</:info>\n </ctrl.Label>\n {{else}}\n <ctrl.Label @isVisuallyHidden={{this.isLabelHidden}}>\n {{@label}}\n </ctrl.Label>\n {{/if}}\n\n <CountrySelect\n @id={{ctrl.id}}\n @name={{@name}}\n @value={{@value}}\n @placeholder={{@placeholder}}\n @isDisabled={{@isDisabled}}\n @isInvalid={{this.isInvalid}}\n @isRequired={{@isRequired}}\n @aria-describedby={{this.getAriaDescribedBy ctrl.id}}\n @showFlag={{@showFlag}}\n @showDialCode={{@showDialCode}}\n @displayDialCode={{@displayDialCode}}\n @suggestedCountries={{@suggestedCountries}}\n @prioritizeByLocale={{@prioritizeByLocale}}\n @includeOnly={{@includeOnly}}\n @exclude={{@exclude}}\n @onChange={{@onChange}}\n @onBlur={{@onBlur}}\n @onFocus={{@onFocus}}\n data-test-country-select-field\n />\n\n {{#if @helpText}}\n <ctrl.HelpText>{{@helpText}}</ctrl.HelpText>\n {{/if}}\n\n {{#if @error}}\n <ctrl.ErrorMessage>{{@error}}</ctrl.ErrorMessage>\n {{/if}}\n </Control>\n </template>\n}\n"],"names":["CountrySelectField","Component","isInvalid","args","error","isLabelHidden","labelVisibility","getAriaDescribedBy","controlId","parts","helpText","push","length","join","undefined","setComponentTemplate","precompileTemplate","strictMode","scope","Control","CountrySelect"],"mappings":";;;;;;AA4Ee,MAAMA,2BAA2BC,SAAA,CAAU;EACxD,IAAIC,SAAAA,GAAqB;AACvB,IAAA,OAAO,CAAC,CAAC,IAAI,CAACC,IAAI,CAACC,KAAK;AAC1B,EAAA;EAEA,IAAIC,aAAAA,GAAyB;AAC3B,IAAA,OAAO,IAAI,CAACF,IAAI,CAACG,eAAe,KAAK,QAAA;AACvC,EAAA;AAEA;EACAC,qBAAsBC,SAAiB,IAAqB;IAC1D,MAAMC,KAAa,GAAK,EAAE;AAC1B,IAAA,IAAI,IAAI,CAACN,IAAI,CAACO,QAAQ,EAAE;AACtBD,MAAAA,KAAA,CAAME,IAAI,CAAC,CAAA,EAAGH,SAAA,YAAqB,CAAA;AACrC,IAAA;AACA,IAAA,IAAI,IAAI,CAACL,IAAI,CAACC,KAAK,EAAE;AACnBK,MAAAA,KAAA,CAAME,IAAI,CAAC,CAAA,EAAGH,SAAA,gBAAyB,CAAA;AACzC,IAAA;AACA,IAAA,OAAOC,MAAMG,MAAM,GAAG,IAAIH,KAAA,CAAMI,IAAI,CAAC,GAAA,CAAA,GAAOC,SAAA;EAC9C,CAAA;AAEA,EAAA;IAAAC,oBAAA,CAAAC,kBAAA,CAAA,+rCAAA,EAkDA;MAAAC,UAAA,EAAA,IAAA;AAAAC,MAAAA,KAAA,EAAAA,OAAA;QAAAC,OAAA;AAAAC,QAAAA;AAAA,OAAA;KAAU,CAAA,EAAV,IAAW,CAAA;AAAD;AACZ;;;;"}
@@ -229,7 +229,7 @@
229
229
  padding: var(--spacing-2) var(--spacing-3);
230
230
  border-radius: var(--radius-sm);
231
231
  font-size: var(--font-size-13);
232
- line-height: var(--line-height-1-25);
232
+ line-height: var(--line-height-tight);
233
233
  color: var(--color-text);
234
234
  cursor: pointer;
235
235
  user-select: none;
@@ -23,7 +23,7 @@ class DatePickerField extends Component {
23
23
  return parts.length > 0 ? parts.join(' ') : undefined;
24
24
  };
25
25
  static {
26
- setComponentTemplate(precompileTemplate("<Control @isInvalid={{this.isInvalid}} @isDisabled={{@isDisabled}} @isRequired={{@isRequired}} @isReadOnly={{@isReadOnly}} ...attributes as |ctrl|>\n <ctrl.Label @isVisuallyHidden={{this.isLabelHidden}}>\n {{@label}}\n </ctrl.Label>\n\n <DatePicker @id={{ctrl.id}} @name={{@name}} @value={{@value}} @defaultValue={{@defaultValue}} @placeholder={{@placeholder}} @format={{@format}} @minDate={{@minDate}} @maxDate={{@maxDate}} @disabledDates={{@disabledDates}} @disabledDaysOfWeek={{@disabledDaysOfWeek}} @weekStartsOn={{@weekStartsOn}} @showOutsideDays={{@showOutsideDays}} @showToday={{@showToday}} @allowTextInput={{@allowTextInput}} @closeOnSelect={{@closeOnSelect}} @showIcon={{@showIcon}} @clearable={{@clearable}} @isDisabled={{@isDisabled}} @isInvalid={{this.isInvalid}} @isRequired={{@isRequired}} @isReadOnly={{@isReadOnly}} @aria-describedby={{this.getAriaDescribedBy ctrl.id}} @onChange={{@onChange}} @onBlur={{@onBlur}} @onFocus={{@onFocus}} @onOpenChange={{@onOpenChange}} data-test-date-picker-field />\n\n {{#if @helpText}}\n <ctrl.HelpText>{{@helpText}}</ctrl.HelpText>\n {{/if}}\n\n {{#if @error}}\n <ctrl.ErrorMessage>{{@error}}</ctrl.ErrorMessage>\n {{/if}}\n</Control>", {
26
+ setComponentTemplate(precompileTemplate("<Control @isInvalid={{this.isInvalid}} @isDisabled={{@isDisabled}} @isRequired={{@isRequired}} @isReadOnly={{@isReadOnly}} @labelInfo={{@labelInfo}} ...attributes as |ctrl|>\n {{#if (has-block \"info\")}}\n <ctrl.Label @isVisuallyHidden={{this.isLabelHidden}}>\n <:default>{{@label}}</:default>\n <:info>{{yield to=\"info\"}}</:info>\n </ctrl.Label>\n {{else}}\n <ctrl.Label @isVisuallyHidden={{this.isLabelHidden}}>\n {{@label}}\n </ctrl.Label>\n {{/if}}\n\n <DatePicker @id={{ctrl.id}} @name={{@name}} @value={{@value}} @defaultValue={{@defaultValue}} @placeholder={{@placeholder}} @format={{@format}} @minDate={{@minDate}} @maxDate={{@maxDate}} @disabledDates={{@disabledDates}} @disabledDaysOfWeek={{@disabledDaysOfWeek}} @weekStartsOn={{@weekStartsOn}} @showOutsideDays={{@showOutsideDays}} @showToday={{@showToday}} @allowTextInput={{@allowTextInput}} @closeOnSelect={{@closeOnSelect}} @showIcon={{@showIcon}} @clearable={{@clearable}} @isDisabled={{@isDisabled}} @isInvalid={{this.isInvalid}} @isRequired={{@isRequired}} @isReadOnly={{@isReadOnly}} @aria-describedby={{this.getAriaDescribedBy ctrl.id}} @onChange={{@onChange}} @onBlur={{@onBlur}} @onFocus={{@onFocus}} @onOpenChange={{@onOpenChange}} data-test-date-picker-field />\n\n {{#if @helpText}}\n <ctrl.HelpText>{{@helpText}}</ctrl.HelpText>\n {{/if}}\n\n {{#if @error}}\n <ctrl.ErrorMessage>{{@error}}</ctrl.ErrorMessage>\n {{/if}}\n</Control>", {
27
27
  strictMode: true,
28
28
  scope: () => ({
29
29
  Control,
@@ -1 +1 @@
1
- {"version":3,"file":"date-picker-field.js","sources":["../../src/form/date-picker-field.gts"],"sourcesContent":["import Component from '@glimmer/component';\n\nimport Control from './control.gts';\nimport DatePicker, { type DateFormat } from './date-picker.gts';\n\nexport type LabelVisibility = 'visible' | 'hidden';\n\nexport interface DatePickerFieldSignature {\n Element: HTMLDivElement;\n Args: {\n /** Label text (required) */\n label: string;\n\n /** Current selected date value */\n value?: Date | null;\n\n /** Default value (uncontrolled) */\n defaultValue?: Date | null;\n\n /** Placeholder text shown when no value is selected */\n placeholder?: string;\n\n /** Date format for display and parsing (date-fns format) */\n format?: DateFormat;\n\n /** Minimum allowed date */\n minDate?: Date;\n\n /** Maximum allowed date */\n maxDate?: Date;\n\n /** Array of disabled dates or a function to check if a date is disabled */\n disabledDates?: Date[] | ((date: Date) => boolean);\n\n /** Array of day numbers (0-6, Sunday-Saturday) to disable */\n disabledDaysOfWeek?: number[];\n\n /** Day to start the week on (0 = Sunday, 1 = Monday, etc.) */\n weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6;\n\n /** Show days from adjacent months */\n showOutsideDays?: boolean;\n\n /** Show today indicator */\n showToday?: boolean;\n\n /** Allow typing in the input */\n allowTextInput?: boolean;\n\n /** Close dropdown when a date is selected */\n closeOnSelect?: boolean;\n\n /** Show calendar icon */\n showIcon?: boolean;\n\n /** Show clear button when value is selected */\n clearable?: boolean;\n\n /** Help text displayed below the input */\n helpText?: string;\n\n /** Error message (also sets invalid state) */\n error?: string;\n\n /** Field is required */\n isRequired?: boolean;\n\n /** Field is disabled */\n isDisabled?: boolean;\n\n /** Field is read-only */\n isReadOnly?: boolean;\n\n /** Label visibility */\n labelVisibility?: LabelVisibility;\n\n /** Input name for forms */\n name?: string;\n\n /** Change event handler */\n onChange?: (value: Date | null) => void;\n\n /** Blur event handler */\n onBlur?: (event: FocusEvent) => void;\n\n /** Focus event handler */\n onFocus?: (event: FocusEvent) => void;\n\n /** Open state change handler */\n onOpenChange?: (open: boolean) => void;\n };\n}\n\nexport default class DatePickerField extends Component<DatePickerFieldSignature> {\n get isInvalid(): boolean {\n return !!this.args.error;\n }\n\n get isLabelHidden(): boolean {\n return this.args.labelVisibility === 'hidden';\n }\n\n /** Build aria-describedby from the control's help text and error message IDs */\n getAriaDescribedBy = (controlId: string): string | undefined => {\n const parts: string[] = [];\n if (this.args.helpText) {\n parts.push(`${controlId}-help-text`);\n }\n if (this.args.error) {\n parts.push(`${controlId}-error-message`);\n }\n return parts.length > 0 ? parts.join(' ') : undefined;\n };\n\n <template>\n <Control\n @isInvalid={{this.isInvalid}}\n @isDisabled={{@isDisabled}}\n @isRequired={{@isRequired}}\n @isReadOnly={{@isReadOnly}}\n ...attributes\n as |ctrl|\n >\n <ctrl.Label @isVisuallyHidden={{this.isLabelHidden}}>\n {{@label}}\n </ctrl.Label>\n\n <DatePicker\n @id={{ctrl.id}}\n @name={{@name}}\n @value={{@value}}\n @defaultValue={{@defaultValue}}\n @placeholder={{@placeholder}}\n @format={{@format}}\n @minDate={{@minDate}}\n @maxDate={{@maxDate}}\n @disabledDates={{@disabledDates}}\n @disabledDaysOfWeek={{@disabledDaysOfWeek}}\n @weekStartsOn={{@weekStartsOn}}\n @showOutsideDays={{@showOutsideDays}}\n @showToday={{@showToday}}\n @allowTextInput={{@allowTextInput}}\n @closeOnSelect={{@closeOnSelect}}\n @showIcon={{@showIcon}}\n @clearable={{@clearable}}\n @isDisabled={{@isDisabled}}\n @isInvalid={{this.isInvalid}}\n @isRequired={{@isRequired}}\n @isReadOnly={{@isReadOnly}}\n @aria-describedby={{this.getAriaDescribedBy ctrl.id}}\n @onChange={{@onChange}}\n @onBlur={{@onBlur}}\n @onFocus={{@onFocus}}\n @onOpenChange={{@onOpenChange}}\n data-test-date-picker-field\n />\n\n {{#if @helpText}}\n <ctrl.HelpText>{{@helpText}}</ctrl.HelpText>\n {{/if}}\n\n {{#if @error}}\n <ctrl.ErrorMessage>{{@error}}</ctrl.ErrorMessage>\n {{/if}}\n </Control>\n </template>\n}\n"],"names":["DatePickerField","Component","isInvalid","args","error","isLabelHidden","labelVisibility","getAriaDescribedBy","controlId","parts","helpText","push","length","join","undefined","setComponentTemplate","precompileTemplate","strictMode","scope","Control","DatePicker"],"mappings":";;;;;;AA6Fe,MAAMA,wBAAwBC,SAAA,CAAU;EACrD,IAAIC,SAAAA,GAAqB;AACvB,IAAA,OAAO,CAAC,CAAC,IAAI,CAACC,IAAI,CAACC,KAAK;AAC1B,EAAA;EAEA,IAAIC,aAAAA,GAAyB;AAC3B,IAAA,OAAO,IAAI,CAACF,IAAI,CAACG,eAAe,KAAK,QAAA;AACvC,EAAA;AAEA;EACAC,qBAAsBC,SAAiB,IAAqB;IAC1D,MAAMC,KAAa,GAAK,EAAE;AAC1B,IAAA,IAAI,IAAI,CAACN,IAAI,CAACO,QAAQ,EAAE;AACtBD,MAAAA,KAAA,CAAME,IAAI,CAAC,CAAA,EAAGH,SAAA,YAAqB,CAAA;AACrC,IAAA;AACA,IAAA,IAAI,IAAI,CAACL,IAAI,CAACC,KAAK,EAAE;AACnBK,MAAAA,KAAA,CAAME,IAAI,CAAC,CAAA,EAAGH,SAAA,gBAAyB,CAAA;AACzC,IAAA;AACA,IAAA,OAAOC,MAAMG,MAAM,GAAG,IAAIH,KAAA,CAAMI,IAAI,CAAC,GAAA,CAAA,GAAOC,SAAA;EAC9C,CAAA;AAEA,EAAA;IAAAC,oBAAA,CAAAC,kBAAA,CAAA,qrCAAA,EAmDA;MAAAC,UAAA,EAAA,IAAA;AAAAC,MAAAA,KAAA,EAAAA,OAAA;QAAAC,OAAA;AAAAC,QAAAA;AAAA,OAAA;KAAU,CAAA,EAAV,IAAW,CAAA;AAAD;AACZ;;;;"}
1
+ {"version":3,"file":"date-picker-field.js","sources":["../../src/form/date-picker-field.gts"],"sourcesContent":["import Component from '@glimmer/component';\n\nimport Control from './control.gts';\nimport DatePicker, { type DateFormat } from './date-picker.gts';\n\nexport type LabelVisibility = 'visible' | 'hidden';\n\nexport interface DatePickerFieldSignature {\n Element: HTMLDivElement;\n Args: {\n /** Label text (required) */\n label: string;\n\n /** Current selected date value */\n value?: Date | null;\n\n /** Default value (uncontrolled) */\n defaultValue?: Date | null;\n\n /** Placeholder text shown when no value is selected */\n placeholder?: string;\n\n /** Date format for display and parsing (date-fns format) */\n format?: DateFormat;\n\n /** Minimum allowed date */\n minDate?: Date;\n\n /** Maximum allowed date */\n maxDate?: Date;\n\n /** Array of disabled dates or a function to check if a date is disabled */\n disabledDates?: Date[] | ((date: Date) => boolean);\n\n /** Array of day numbers (0-6, Sunday-Saturday) to disable */\n disabledDaysOfWeek?: number[];\n\n /** Day to start the week on (0 = Sunday, 1 = Monday, etc.) */\n weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6;\n\n /** Show days from adjacent months */\n showOutsideDays?: boolean;\n\n /** Show today indicator */\n showToday?: boolean;\n\n /** Allow typing in the input */\n allowTextInput?: boolean;\n\n /** Close dropdown when a date is selected */\n closeOnSelect?: boolean;\n\n /** Show calendar icon */\n showIcon?: boolean;\n\n /** Show clear button when value is selected */\n clearable?: boolean;\n\n /** Help text displayed below the input */\n helpText?: string;\n\n /** Error message (also sets invalid state) */\n error?: string;\n\n /** Field is required */\n isRequired?: boolean;\n\n /** Field is disabled */\n isDisabled?: boolean;\n\n /** Field is read-only */\n isReadOnly?: boolean;\n\n /** Info tooltip text shown next to the label */\n labelInfo?: string;\n\n /** Label visibility */\n labelVisibility?: LabelVisibility;\n\n /** Input name for forms */\n name?: string;\n\n /** Change event handler */\n onChange?: (value: Date | null) => void;\n\n /** Blur event handler */\n onBlur?: (event: FocusEvent) => void;\n\n /** Focus event handler */\n onFocus?: (event: FocusEvent) => void;\n\n /** Open state change handler */\n onOpenChange?: (open: boolean) => void;\n };\n Blocks: {\n /** Rich tooltip content shown next to the label */\n info: [];\n };\n}\n\nexport default class DatePickerField extends Component<DatePickerFieldSignature> {\n get isInvalid(): boolean {\n return !!this.args.error;\n }\n\n get isLabelHidden(): boolean {\n return this.args.labelVisibility === 'hidden';\n }\n\n /** Build aria-describedby from the control's help text and error message IDs */\n getAriaDescribedBy = (controlId: string): string | undefined => {\n const parts: string[] = [];\n if (this.args.helpText) {\n parts.push(`${controlId}-help-text`);\n }\n if (this.args.error) {\n parts.push(`${controlId}-error-message`);\n }\n return parts.length > 0 ? parts.join(' ') : undefined;\n };\n\n <template>\n <Control\n @isInvalid={{this.isInvalid}}\n @isDisabled={{@isDisabled}}\n @isRequired={{@isRequired}}\n @isReadOnly={{@isReadOnly}}\n @labelInfo={{@labelInfo}}\n ...attributes\n as |ctrl|\n >\n {{#if (has-block \"info\")}}\n <ctrl.Label @isVisuallyHidden={{this.isLabelHidden}}>\n <:default>{{@label}}</:default>\n <:info>{{yield to=\"info\"}}</:info>\n </ctrl.Label>\n {{else}}\n <ctrl.Label @isVisuallyHidden={{this.isLabelHidden}}>\n {{@label}}\n </ctrl.Label>\n {{/if}}\n\n <DatePicker\n @id={{ctrl.id}}\n @name={{@name}}\n @value={{@value}}\n @defaultValue={{@defaultValue}}\n @placeholder={{@placeholder}}\n @format={{@format}}\n @minDate={{@minDate}}\n @maxDate={{@maxDate}}\n @disabledDates={{@disabledDates}}\n @disabledDaysOfWeek={{@disabledDaysOfWeek}}\n @weekStartsOn={{@weekStartsOn}}\n @showOutsideDays={{@showOutsideDays}}\n @showToday={{@showToday}}\n @allowTextInput={{@allowTextInput}}\n @closeOnSelect={{@closeOnSelect}}\n @showIcon={{@showIcon}}\n @clearable={{@clearable}}\n @isDisabled={{@isDisabled}}\n @isInvalid={{this.isInvalid}}\n @isRequired={{@isRequired}}\n @isReadOnly={{@isReadOnly}}\n @aria-describedby={{this.getAriaDescribedBy ctrl.id}}\n @onChange={{@onChange}}\n @onBlur={{@onBlur}}\n @onFocus={{@onFocus}}\n @onOpenChange={{@onOpenChange}}\n data-test-date-picker-field\n />\n\n {{#if @helpText}}\n <ctrl.HelpText>{{@helpText}}</ctrl.HelpText>\n {{/if}}\n\n {{#if @error}}\n <ctrl.ErrorMessage>{{@error}}</ctrl.ErrorMessage>\n {{/if}}\n </Control>\n </template>\n}\n"],"names":["DatePickerField","Component","isInvalid","args","error","isLabelHidden","labelVisibility","getAriaDescribedBy","controlId","parts","helpText","push","length","join","undefined","setComponentTemplate","precompileTemplate","strictMode","scope","Control","DatePicker"],"mappings":";;;;;;AAoGe,MAAMA,wBAAwBC,SAAA,CAAU;EACrD,IAAIC,SAAAA,GAAqB;AACvB,IAAA,OAAO,CAAC,CAAC,IAAI,CAACC,IAAI,CAACC,KAAK;AAC1B,EAAA;EAEA,IAAIC,aAAAA,GAAyB;AAC3B,IAAA,OAAO,IAAI,CAACF,IAAI,CAACG,eAAe,KAAK,QAAA;AACvC,EAAA;AAEA;EACAC,qBAAsBC,SAAiB,IAAqB;IAC1D,MAAMC,KAAa,GAAK,EAAE;AAC1B,IAAA,IAAI,IAAI,CAACN,IAAI,CAACO,QAAQ,EAAE;AACtBD,MAAAA,KAAA,CAAME,IAAI,CAAC,CAAA,EAAGH,SAAA,YAAqB,CAAA;AACrC,IAAA;AACA,IAAA,IAAI,IAAI,CAACL,IAAI,CAACC,KAAK,EAAE;AACnBK,MAAAA,KAAA,CAAME,IAAI,CAAC,CAAA,EAAGH,SAAA,gBAAyB,CAAA;AACzC,IAAA;AACA,IAAA,OAAOC,MAAMG,MAAM,GAAG,IAAIH,KAAA,CAAMI,IAAI,CAAC,GAAA,CAAA,GAAOC,SAAA;EAC9C,CAAA;AAEA,EAAA;IAAAC,oBAAA,CAAAC,kBAAA,CAAA,66CAAA,EA2DA;MAAAC,UAAA,EAAA,IAAA;AAAAC,MAAAA,KAAA,EAAAA,OAAA;QAAAC,OAAA;AAAAC,QAAAA;AAAA,OAAA;KAAU,CAAA,EAAV,IAAW,CAAA;AAAD;AACZ;;;;"}
@@ -23,7 +23,7 @@ class DateRangePickerField extends Component {
23
23
  return parts.length > 0 ? parts.join(' ') : undefined;
24
24
  };
25
25
  static {
26
- setComponentTemplate(precompileTemplate("<Control @isInvalid={{this.isInvalid}} @isDisabled={{@isDisabled}} @isRequired={{@isRequired}} @isReadOnly={{@isReadOnly}} ...attributes as |ctrl|>\n <ctrl.Label @isVisuallyHidden={{this.isLabelHidden}}>\n {{@label}}\n </ctrl.Label>\n\n <DateRangePicker @id={{ctrl.id}} @name={{@name}} @value={{@value}} @defaultValue={{@defaultValue}} @startPlaceholder={{@startPlaceholder}} @endPlaceholder={{@endPlaceholder}} @format={{@format}} @minDate={{@minDate}} @maxDate={{@maxDate}} @disabledDates={{@disabledDates}} @disabledDaysOfWeek={{@disabledDaysOfWeek}} @weekStartsOn={{@weekStartsOn}} @showOutsideDays={{@showOutsideDays}} @showToday={{@showToday}} @presets={{@presets}} @allowTextInput={{@allowTextInput}} @showIcon={{@showIcon}} @clearable={{@clearable}} @isDisabled={{@isDisabled}} @isInvalid={{this.isInvalid}} @isRequired={{@isRequired}} @isReadOnly={{@isReadOnly}} @aria-describedby={{this.getAriaDescribedBy ctrl.id}} @onChange={{@onChange}} @onBlur={{@onBlur}} @onFocus={{@onFocus}} @onOpenChange={{@onOpenChange}} data-test-date-range-picker-field />\n\n {{#if @helpText}}\n <ctrl.HelpText>{{@helpText}}</ctrl.HelpText>\n {{/if}}\n\n {{#if @error}}\n <ctrl.ErrorMessage>{{@error}}</ctrl.ErrorMessage>\n {{/if}}\n</Control>", {
26
+ setComponentTemplate(precompileTemplate("<Control @isInvalid={{this.isInvalid}} @isDisabled={{@isDisabled}} @isRequired={{@isRequired}} @isReadOnly={{@isReadOnly}} @labelInfo={{@labelInfo}} ...attributes as |ctrl|>\n {{#if (has-block \"info\")}}\n <ctrl.Label @isVisuallyHidden={{this.isLabelHidden}}>\n <:default>{{@label}}</:default>\n <:info>{{yield to=\"info\"}}</:info>\n </ctrl.Label>\n {{else}}\n <ctrl.Label @isVisuallyHidden={{this.isLabelHidden}}>\n {{@label}}\n </ctrl.Label>\n {{/if}}\n\n <DateRangePicker @id={{ctrl.id}} @name={{@name}} @value={{@value}} @defaultValue={{@defaultValue}} @startPlaceholder={{@startPlaceholder}} @endPlaceholder={{@endPlaceholder}} @format={{@format}} @minDate={{@minDate}} @maxDate={{@maxDate}} @disabledDates={{@disabledDates}} @disabledDaysOfWeek={{@disabledDaysOfWeek}} @weekStartsOn={{@weekStartsOn}} @showOutsideDays={{@showOutsideDays}} @showToday={{@showToday}} @presets={{@presets}} @allowTextInput={{@allowTextInput}} @showIcon={{@showIcon}} @clearable={{@clearable}} @isDisabled={{@isDisabled}} @isInvalid={{this.isInvalid}} @isRequired={{@isRequired}} @isReadOnly={{@isReadOnly}} @aria-describedby={{this.getAriaDescribedBy ctrl.id}} @onChange={{@onChange}} @onBlur={{@onBlur}} @onFocus={{@onFocus}} @onOpenChange={{@onOpenChange}} data-test-date-range-picker-field />\n\n {{#if @helpText}}\n <ctrl.HelpText>{{@helpText}}</ctrl.HelpText>\n {{/if}}\n\n {{#if @error}}\n <ctrl.ErrorMessage>{{@error}}</ctrl.ErrorMessage>\n {{/if}}\n</Control>", {
27
27
  strictMode: true,
28
28
  scope: () => ({
29
29
  Control,
@@ -1 +1 @@
1
- {"version":3,"file":"date-range-picker-field.js","sources":["../../src/form/date-range-picker-field.gts"],"sourcesContent":["import Component from '@glimmer/component';\n\nimport Control from './control.gts';\nimport DateRangePicker, {\n type DateFormat,\n type DateRangePreset,\n type DateRange,\n} from './date-range-picker.gts';\n\nexport type LabelVisibility = 'visible' | 'hidden';\n\nexport interface DateRangePickerFieldSignature {\n Element: HTMLDivElement;\n Args: {\n /** Label text (required) */\n label: string;\n\n /** Current selected date range value */\n value?: DateRange | null;\n\n /** Default value (uncontrolled) */\n defaultValue?: DateRange | null;\n\n /** Placeholder text for start date */\n startPlaceholder?: string;\n\n /** Placeholder text for end date */\n endPlaceholder?: string;\n\n /** Date format for display and parsing (date-fns format) */\n format?: DateFormat;\n\n /** Minimum allowed date */\n minDate?: Date;\n\n /** Maximum allowed date */\n maxDate?: Date;\n\n /** Array of disabled dates or a function to check if a date is disabled */\n disabledDates?: Date[] | ((date: Date) => boolean);\n\n /** Array of day numbers (0-6, Sunday-Saturday) to disable */\n disabledDaysOfWeek?: number[];\n\n /** Day to start the week on (0 = Sunday, 1 = Monday, etc.) */\n weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6;\n\n /** Show days from adjacent months */\n showOutsideDays?: boolean;\n\n /** Show today indicator */\n showToday?: boolean;\n\n /** Preset date range options */\n presets?: DateRangePreset[];\n\n /** Allow typing in the inputs */\n allowTextInput?: boolean;\n\n /** Show calendar icon */\n showIcon?: boolean;\n\n /** Show clear button when value is selected */\n clearable?: boolean;\n\n /** Help text displayed below the input */\n helpText?: string;\n\n /** Error message (also sets invalid state) */\n error?: string;\n\n /** Field is required */\n isRequired?: boolean;\n\n /** Field is disabled */\n isDisabled?: boolean;\n\n /** Field is read-only */\n isReadOnly?: boolean;\n\n /** Label visibility */\n labelVisibility?: LabelVisibility;\n\n /** Input name prefix for forms (creates {name}_start and {name}_end) */\n name?: string;\n\n /** Change event handler */\n onChange?: (value: DateRange | null) => void;\n\n /** Blur event handler */\n onBlur?: (event: FocusEvent) => void;\n\n /** Focus event handler */\n onFocus?: (event: FocusEvent) => void;\n\n /** Open state change handler */\n onOpenChange?: (open: boolean) => void;\n };\n}\n\nexport default class DateRangePickerField extends Component<DateRangePickerFieldSignature> {\n get isInvalid(): boolean {\n return !!this.args.error;\n }\n\n get isLabelHidden(): boolean {\n return this.args.labelVisibility === 'hidden';\n }\n\n /** Build aria-describedby from the control's help text and error message IDs */\n getAriaDescribedBy = (controlId: string): string | undefined => {\n const parts: string[] = [];\n if (this.args.helpText) {\n parts.push(`${controlId}-help-text`);\n }\n if (this.args.error) {\n parts.push(`${controlId}-error-message`);\n }\n return parts.length > 0 ? parts.join(' ') : undefined;\n };\n\n <template>\n <Control\n @isInvalid={{this.isInvalid}}\n @isDisabled={{@isDisabled}}\n @isRequired={{@isRequired}}\n @isReadOnly={{@isReadOnly}}\n ...attributes\n as |ctrl|\n >\n <ctrl.Label @isVisuallyHidden={{this.isLabelHidden}}>\n {{@label}}\n </ctrl.Label>\n\n <DateRangePicker\n @id={{ctrl.id}}\n @name={{@name}}\n @value={{@value}}\n @defaultValue={{@defaultValue}}\n @startPlaceholder={{@startPlaceholder}}\n @endPlaceholder={{@endPlaceholder}}\n @format={{@format}}\n @minDate={{@minDate}}\n @maxDate={{@maxDate}}\n @disabledDates={{@disabledDates}}\n @disabledDaysOfWeek={{@disabledDaysOfWeek}}\n @weekStartsOn={{@weekStartsOn}}\n @showOutsideDays={{@showOutsideDays}}\n @showToday={{@showToday}}\n @presets={{@presets}}\n @allowTextInput={{@allowTextInput}}\n @showIcon={{@showIcon}}\n @clearable={{@clearable}}\n @isDisabled={{@isDisabled}}\n @isInvalid={{this.isInvalid}}\n @isRequired={{@isRequired}}\n @isReadOnly={{@isReadOnly}}\n @aria-describedby={{this.getAriaDescribedBy ctrl.id}}\n @onChange={{@onChange}}\n @onBlur={{@onBlur}}\n @onFocus={{@onFocus}}\n @onOpenChange={{@onOpenChange}}\n data-test-date-range-picker-field\n />\n\n {{#if @helpText}}\n <ctrl.HelpText>{{@helpText}}</ctrl.HelpText>\n {{/if}}\n\n {{#if @error}}\n <ctrl.ErrorMessage>{{@error}}</ctrl.ErrorMessage>\n {{/if}}\n </Control>\n </template>\n}\n"],"names":["DateRangePickerField","Component","isInvalid","args","error","isLabelHidden","labelVisibility","getAriaDescribedBy","controlId","parts","helpText","push","length","join","undefined","setComponentTemplate","precompileTemplate","strictMode","scope","Control","DateRangePicker"],"mappings":";;;;;;AAoGe,MAAMA,6BAA6BC,SAAA,CAAU;EAC1D,IAAIC,SAAAA,GAAqB;AACvB,IAAA,OAAO,CAAC,CAAC,IAAI,CAACC,IAAI,CAACC,KAAK;AAC1B,EAAA;EAEA,IAAIC,aAAAA,GAAyB;AAC3B,IAAA,OAAO,IAAI,CAACF,IAAI,CAACG,eAAe,KAAK,QAAA;AACvC,EAAA;AAEA;EACAC,qBAAsBC,SAAiB,IAAqB;IAC1D,MAAMC,KAAa,GAAK,EAAE;AAC1B,IAAA,IAAI,IAAI,CAACN,IAAI,CAACO,QAAQ,EAAE;AACtBD,MAAAA,KAAA,CAAME,IAAI,CAAC,CAAA,EAAGH,SAAA,YAAqB,CAAA;AACrC,IAAA;AACA,IAAA,IAAI,IAAI,CAACL,IAAI,CAACC,KAAK,EAAE;AACnBK,MAAAA,KAAA,CAAME,IAAI,CAAC,CAAA,EAAGH,SAAA,gBAAyB,CAAA;AACzC,IAAA;AACA,IAAA,OAAOC,MAAMG,MAAM,GAAG,IAAIH,KAAA,CAAMI,IAAI,CAAC,GAAA,CAAA,GAAOC,SAAA;EAC9C,CAAA;AAEA,EAAA;IAAAC,oBAAA,CAAAC,kBAAA,CAAA,kuCAAA,EAoDA;MAAAC,UAAA,EAAA,IAAA;AAAAC,MAAAA,KAAA,EAAAA,OAAA;QAAAC,OAAA;AAAAC,QAAAA;AAAA,OAAA;KAAU,CAAA,EAAV,IAAW,CAAA;AAAD;AACZ;;;;"}
1
+ {"version":3,"file":"date-range-picker-field.js","sources":["../../src/form/date-range-picker-field.gts"],"sourcesContent":["import Component from '@glimmer/component';\n\nimport Control from './control.gts';\nimport DateRangePicker, {\n type DateFormat,\n type DateRangePreset,\n type DateRange,\n} from './date-range-picker.gts';\n\nexport type LabelVisibility = 'visible' | 'hidden';\n\nexport interface DateRangePickerFieldSignature {\n Element: HTMLDivElement;\n Args: {\n /** Label text (required) */\n label: string;\n\n /** Current selected date range value */\n value?: DateRange | null;\n\n /** Default value (uncontrolled) */\n defaultValue?: DateRange | null;\n\n /** Placeholder text for start date */\n startPlaceholder?: string;\n\n /** Placeholder text for end date */\n endPlaceholder?: string;\n\n /** Date format for display and parsing (date-fns format) */\n format?: DateFormat;\n\n /** Minimum allowed date */\n minDate?: Date;\n\n /** Maximum allowed date */\n maxDate?: Date;\n\n /** Array of disabled dates or a function to check if a date is disabled */\n disabledDates?: Date[] | ((date: Date) => boolean);\n\n /** Array of day numbers (0-6, Sunday-Saturday) to disable */\n disabledDaysOfWeek?: number[];\n\n /** Day to start the week on (0 = Sunday, 1 = Monday, etc.) */\n weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6;\n\n /** Show days from adjacent months */\n showOutsideDays?: boolean;\n\n /** Show today indicator */\n showToday?: boolean;\n\n /** Preset date range options */\n presets?: DateRangePreset[];\n\n /** Allow typing in the inputs */\n allowTextInput?: boolean;\n\n /** Show calendar icon */\n showIcon?: boolean;\n\n /** Show clear button when value is selected */\n clearable?: boolean;\n\n /** Help text displayed below the input */\n helpText?: string;\n\n /** Error message (also sets invalid state) */\n error?: string;\n\n /** Field is required */\n isRequired?: boolean;\n\n /** Field is disabled */\n isDisabled?: boolean;\n\n /** Field is read-only */\n isReadOnly?: boolean;\n\n /** Info tooltip text shown next to the label */\n labelInfo?: string;\n\n /** Label visibility */\n labelVisibility?: LabelVisibility;\n\n /** Input name prefix for forms (creates {name}_start and {name}_end) */\n name?: string;\n\n /** Change event handler */\n onChange?: (value: DateRange | null) => void;\n\n /** Blur event handler */\n onBlur?: (event: FocusEvent) => void;\n\n /** Focus event handler */\n onFocus?: (event: FocusEvent) => void;\n\n /** Open state change handler */\n onOpenChange?: (open: boolean) => void;\n };\n Blocks: {\n /** Rich tooltip content shown next to the label */\n info: [];\n };\n}\n\nexport default class DateRangePickerField extends Component<DateRangePickerFieldSignature> {\n get isInvalid(): boolean {\n return !!this.args.error;\n }\n\n get isLabelHidden(): boolean {\n return this.args.labelVisibility === 'hidden';\n }\n\n /** Build aria-describedby from the control's help text and error message IDs */\n getAriaDescribedBy = (controlId: string): string | undefined => {\n const parts: string[] = [];\n if (this.args.helpText) {\n parts.push(`${controlId}-help-text`);\n }\n if (this.args.error) {\n parts.push(`${controlId}-error-message`);\n }\n return parts.length > 0 ? parts.join(' ') : undefined;\n };\n\n <template>\n <Control\n @isInvalid={{this.isInvalid}}\n @isDisabled={{@isDisabled}}\n @isRequired={{@isRequired}}\n @isReadOnly={{@isReadOnly}}\n @labelInfo={{@labelInfo}}\n ...attributes\n as |ctrl|\n >\n {{#if (has-block \"info\")}}\n <ctrl.Label @isVisuallyHidden={{this.isLabelHidden}}>\n <:default>{{@label}}</:default>\n <:info>{{yield to=\"info\"}}</:info>\n </ctrl.Label>\n {{else}}\n <ctrl.Label @isVisuallyHidden={{this.isLabelHidden}}>\n {{@label}}\n </ctrl.Label>\n {{/if}}\n\n <DateRangePicker\n @id={{ctrl.id}}\n @name={{@name}}\n @value={{@value}}\n @defaultValue={{@defaultValue}}\n @startPlaceholder={{@startPlaceholder}}\n @endPlaceholder={{@endPlaceholder}}\n @format={{@format}}\n @minDate={{@minDate}}\n @maxDate={{@maxDate}}\n @disabledDates={{@disabledDates}}\n @disabledDaysOfWeek={{@disabledDaysOfWeek}}\n @weekStartsOn={{@weekStartsOn}}\n @showOutsideDays={{@showOutsideDays}}\n @showToday={{@showToday}}\n @presets={{@presets}}\n @allowTextInput={{@allowTextInput}}\n @showIcon={{@showIcon}}\n @clearable={{@clearable}}\n @isDisabled={{@isDisabled}}\n @isInvalid={{this.isInvalid}}\n @isRequired={{@isRequired}}\n @isReadOnly={{@isReadOnly}}\n @aria-describedby={{this.getAriaDescribedBy ctrl.id}}\n @onChange={{@onChange}}\n @onBlur={{@onBlur}}\n @onFocus={{@onFocus}}\n @onOpenChange={{@onOpenChange}}\n data-test-date-range-picker-field\n />\n\n {{#if @helpText}}\n <ctrl.HelpText>{{@helpText}}</ctrl.HelpText>\n {{/if}}\n\n {{#if @error}}\n <ctrl.ErrorMessage>{{@error}}</ctrl.ErrorMessage>\n {{/if}}\n </Control>\n </template>\n}\n"],"names":["DateRangePickerField","Component","isInvalid","args","error","isLabelHidden","labelVisibility","getAriaDescribedBy","controlId","parts","helpText","push","length","join","undefined","setComponentTemplate","precompileTemplate","strictMode","scope","Control","DateRangePicker"],"mappings":";;;;;;AA2Ge,MAAMA,6BAA6BC,SAAA,CAAU;EAC1D,IAAIC,SAAAA,GAAqB;AACvB,IAAA,OAAO,CAAC,CAAC,IAAI,CAACC,IAAI,CAACC,KAAK;AAC1B,EAAA;EAEA,IAAIC,aAAAA,GAAyB;AAC3B,IAAA,OAAO,IAAI,CAACF,IAAI,CAACG,eAAe,KAAK,QAAA;AACvC,EAAA;AAEA;EACAC,qBAAsBC,SAAiB,IAAqB;IAC1D,MAAMC,KAAa,GAAK,EAAE;AAC1B,IAAA,IAAI,IAAI,CAACN,IAAI,CAACO,QAAQ,EAAE;AACtBD,MAAAA,KAAA,CAAME,IAAI,CAAC,CAAA,EAAGH,SAAA,YAAqB,CAAA;AACrC,IAAA;AACA,IAAA,IAAI,IAAI,CAACL,IAAI,CAACC,KAAK,EAAE;AACnBK,MAAAA,KAAA,CAAME,IAAI,CAAC,CAAA,EAAGH,SAAA,gBAAyB,CAAA;AACzC,IAAA;AACA,IAAA,OAAOC,MAAMG,MAAM,GAAG,IAAIH,KAAA,CAAMI,IAAI,CAAC,GAAA,CAAA,GAAOC,SAAA;EAC9C,CAAA;AAEA,EAAA;IAAAC,oBAAA,CAAAC,kBAAA,CAAA,09CAAA,EA4DA;MAAAC,UAAA,EAAA,IAAA;AAAAC,MAAAA,KAAA,EAAAA,OAAA;QAAAC,OAAA;AAAAC,QAAAA;AAAA,OAAA;KAAU,CAAA,EAAV,IAAW,CAAA;AAAD;AACZ;;;;"}
@@ -10,7 +10,7 @@
10
10
  font-size: 0.875rem;
11
11
  font-weight: 500;
12
12
  color: var(--color-text);
13
- line-height: 1.25rem;
13
+ line-height: var(--line-height-normal);
14
14
  }
15
15
 
16
16
  .required_e77bb2bf4 {
@@ -28,14 +28,14 @@
28
28
  .helper-text_e77bb2bf4 {
29
29
  margin: 0;
30
30
  font-size: 0.8125rem;
31
- line-height: 1.125rem;
31
+ line-height: var(--line-height-tight);
32
32
  color: var(--color-text-secondary);
33
33
  }
34
34
 
35
35
  .error-text_e77bb2bf4 {
36
36
  margin: 0;
37
37
  font-size: 0.8125rem;
38
- line-height: 1.125rem;
38
+ line-height: var(--line-height-tight);
39
39
  color: var(--red-500);
40
40
  }
41
41
 
@@ -0,0 +1,65 @@
1
+ /* src/form/fieldset.css */
2
+ .fieldset_ef4a2e6ab {
3
+ border: none;
4
+ margin: 0;
5
+ padding: 0;
6
+ display: flex;
7
+ flex-direction: column;
8
+ }
9
+
10
+ /* Legend */
11
+ .legend_ef4a2e6ab {
12
+ display: block;
13
+ font-size: var(--font-size-xs);
14
+ font-weight: var(--font-weight-semibold);
15
+ color: var(--color-text-secondary);
16
+ letter-spacing: 0.05em;
17
+ text-transform: uppercase;
18
+ line-height: var(--line-height-normal);
19
+ padding: 0;
20
+ margin-bottom: var(--spacing-3);
21
+ }
22
+
23
+ .fieldset_ef4a2e6ab[data-disabled="true"] .legend_ef4a2e6ab {
24
+ color: var(--color-text-disabled);
25
+ }
26
+
27
+ /* Description */
28
+ .description_ef4a2e6ab {
29
+ margin: 0;
30
+ font-size: var(--font-size-xs);
31
+ line-height: var(--line-height-normal);
32
+ color: var(--color-text-secondary);
33
+ margin-top: calc(-1 * var(--spacing-2));
34
+ margin-bottom: var(--spacing-3);
35
+ }
36
+
37
+ /* Content */
38
+ .content_ef4a2e6ab {
39
+ display: flex;
40
+ flex-direction: column;
41
+ }
42
+
43
+ .content_ef4a2e6ab[data-gap="none"] {
44
+ gap: 0;
45
+ }
46
+
47
+ .content_ef4a2e6ab[data-gap="xs"] {
48
+ gap: var(--spacing-gap-xs);
49
+ }
50
+
51
+ .content_ef4a2e6ab[data-gap="sm"] {
52
+ gap: var(--spacing-gap-sm);
53
+ }
54
+
55
+ .content_ef4a2e6ab[data-gap="md"] {
56
+ gap: var(--spacing-gap-md);
57
+ }
58
+
59
+ .content_ef4a2e6ab[data-gap="lg"] {
60
+ gap: var(--spacing-gap-lg);
61
+ }
62
+
63
+ .content_ef4a2e6ab[data-gap="xl"] {
64
+ gap: var(--spacing-gap-xl);
65
+ }
@@ -0,0 +1,20 @@
1
+ import "./fieldset.css"
2
+ import Component from '@glimmer/component';
3
+ import { precompileTemplate } from '@ember/template-compilation';
4
+ import { setComponentTemplate } from '@ember/component';
5
+
6
+ ;
7
+
8
+ class Fieldset extends Component {
9
+ get gap() {
10
+ return this.args.gap ?? 'md';
11
+ }
12
+ static {
13
+ setComponentTemplate(precompileTemplate("<fieldset class=\"fieldset_ef4a2e6ab\" data-disabled={{if @isDisabled \"true\"}} data-test-fieldset ...attributes>\n {{#if @legend}}\n <legend class=\"legend_ef4a2e6ab\" data-test-fieldset-legend>\n {{@legend}}\n </legend>\n {{/if}}\n\n {{#if @description}}\n <p class=\"description_ef4a2e6ab\" data-test-fieldset-description>\n {{@description}}\n </p>\n {{/if}}\n\n <div class=\"content_ef4a2e6ab\" data-gap={{this.gap}} data-test-fieldset-content>\n {{yield}}\n </div>\n</fieldset>", {
14
+ strictMode: true
15
+ }), this);
16
+ }
17
+ }
18
+
19
+ export { Fieldset as default };
20
+ //# sourceMappingURL=fieldset.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fieldset.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,7 +1,7 @@
1
1
  /* src/form/help-text.css */
2
2
  .help-text_e4685b9e4 {
3
3
  display: block;
4
- font-size: var(--font-size-sm);
4
+ font-size: var(--font-size-xs);
5
5
  color: var(--color-text-secondary);
6
6
  line-height: var(--line-height-normal);
7
7
  }
@@ -10,6 +10,7 @@ export { default as DateRangePicker } from './date-range-picker.js';
10
10
  export { default as DateRangePickerField } from './date-range-picker-field.js';
11
11
  export { default as ErrorMessage } from './error-message.js';
12
12
  export { default as Field } from './field.js';
13
+ export { default as Fieldset } from './fieldset.js';
13
14
  export { default as Form } from './form.js';
14
15
  export { default as HelpText } from './help-text.js';
15
16
  export { default as Input } from './input.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -121,6 +121,7 @@
121
121
  .input-suffix_ef268a5e9 {
122
122
  display: flex;
123
123
  align-items: center;
124
+ box-sizing: border-box;
124
125
  padding: 0 var(--spacing-3);
125
126
  background-color: var(--color-bg-surface-sunken);
126
127
  border: var(--border-width-1) solid var(--color-border-control);
@@ -3,7 +3,7 @@
3
3
  display: flex;
4
4
  align-items: baseline;
5
5
  gap: var(--spacing-1);
6
- font-weight: var(--font-weight-medium);
6
+ font-weight: var(--font-weight-regular);
7
7
  color: var(--color-text);
8
8
  line-height: var(--line-height-tight);
9
9
  }
@@ -57,3 +57,17 @@
57
57
  font-weight: var(--font-weight-regular);
58
58
  font-style: italic;
59
59
  }
60
+
61
+ /* Info tooltip trigger */
62
+ .label-info-trigger_e7fa6e7a3 {
63
+ display: inline-flex;
64
+ align-items: center;
65
+ color: var(--color-text-secondary);
66
+ cursor: default;
67
+ position: relative;
68
+ top: 0.1em;
69
+ }
70
+
71
+ .label-info-trigger_e7fa6e7a3:hover {
72
+ color: var(--color-text);
73
+ }
@@ -1,5 +1,8 @@
1
1
  import "./label.css"
2
2
  import Component from '@glimmer/component';
3
+ import { Info } from 'lucide';
4
+ import Icon from '../media/icon.js';
5
+ import Tooltip from '../overlay/tooltip.js';
3
6
  import { precompileTemplate } from '@ember/template-compilation';
4
7
  import { setComponentTemplate } from '@ember/component';
5
8
 
@@ -14,7 +17,6 @@ class Label extends Component {
14
17
  isRequired,
15
18
  requiredIndicator
16
19
  } = this.args;
17
- // Show when required AND requiredIndicator is not explicitly false
18
20
  return isRequired === true && requiredIndicator !== false;
19
21
  }
20
22
  get requiredIndicatorText() {
@@ -31,7 +33,6 @@ class Label extends Component {
31
33
  isRequired,
32
34
  optionalIndicator
33
35
  } = this.args;
34
- // Show when NOT required AND optionalIndicator is truthy
35
36
  return isRequired !== true && !!optionalIndicator;
36
37
  }
37
38
  get optionalIndicatorText() {
@@ -44,8 +45,13 @@ class Label extends Component {
44
45
  return '(optional)';
45
46
  }
46
47
  static {
47
- setComponentTemplate(precompileTemplate("<label class=\"label_e7fa6e7a3\" for={{@for}} data-size={{this.size}} data-disabled={{if @isDisabled \"true\"}} data-visually-hidden={{if @isVisuallyHidden \"true\"}} data-test-form-label ...attributes>\n <span class=\"label-text\" data-test-label-text>{{yield}}</span>\n {{#if this.showRequiredIndicator}}\n <span class=\"label-required_e7fa6e7a3\" data-test-label-required aria-hidden=\"true\">{{this.requiredIndicatorText}}</span>\n {{/if}}\n {{#if this.showOptionalIndicator}}\n <span class=\"label-optional_e7fa6e7a3\" data-test-label-optional>{{this.optionalIndicatorText}}</span>\n {{/if}}\n {{#if @secondaryLabel}}\n <span class=\"label-secondary_e7fa6e7a3\" data-test-label-secondary>{{@secondaryLabel}}</span>\n {{/if}}\n</label>", {
48
- strictMode: true
48
+ setComponentTemplate(precompileTemplate("<label class=\"label_e7fa6e7a3\" for={{@for}} data-size={{this.size}} data-disabled={{if @isDisabled \"true\"}} data-visually-hidden={{if @isVisuallyHidden \"true\"}} data-test-form-label ...attributes>\n <span class=\"label-text\" data-test-label-text>{{yield}}</span>\n {{#if this.showRequiredIndicator}}\n <span class=\"label-required_e7fa6e7a3\" data-test-label-required aria-hidden=\"true\">{{this.requiredIndicatorText}}</span>\n {{/if}}\n {{#if this.showOptionalIndicator}}\n <span class=\"label-optional_e7fa6e7a3\" data-test-label-optional>{{this.optionalIndicatorText}}</span>\n {{/if}}\n {{#if @secondaryLabel}}\n <span class=\"label-secondary_e7fa6e7a3\" data-test-label-secondary>{{@secondaryLabel}}</span>\n {{/if}}\n {{#if (has-block \"info\")}}\n <Tooltip @side=\"top\" @showArrow={{false}} data-test-label-info>\n <:default>\n <span class=\"label-info-trigger_e7fa6e7a3\">\n <Icon @icon={{Info}} @size=\"xs\" @label=\"More information\" />\n </span>\n </:default>\n <:content>\n {{yield to=\"info\"}}\n </:content>\n </Tooltip>\n {{else if @info}}\n <Tooltip @content={{@info}} @side=\"top\" @showArrow={{false}} data-test-label-info>\n <span class=\"label-info-trigger_e7fa6e7a3\">\n <Icon @icon={{Info}} @size=\"xs\" @label=\"More information\" />\n </span>\n </Tooltip>\n {{/if}}\n</label>", {
49
+ strictMode: true,
50
+ scope: () => ({
51
+ Tooltip,
52
+ Icon,
53
+ Info
54
+ })
49
55
  }), this);
50
56
  }
51
57
  }
@@ -188,7 +188,7 @@ class MoneyField extends Component {
188
188
  n(this.prototype, "handleFocus", [action]);
189
189
  }
190
190
  static {
191
- setComponentTemplate(precompileTemplate("<Control @isInvalid={{this.isInvalid}} @isDisabled={{@isDisabled}} @isRequired={{@isRequired}} @isReadOnly={{@isReadOnly}} data-currency={{@currency}} data-test-money-field ...attributes as |ctrl|>\n <ctrl.Label @isVisuallyHidden={{this.isLabelHidden}}>\n {{@label}}\n </ctrl.Label>\n\n <ctrl.Input @prefix={{if this.showPrefix this.currencySymbol}} @suffix={{if this.showSuffix this.currencySymbol}} @inputMode=\"decimal\" @placeholder={{this.placeholder}} @name={{@name}} @value={{this.displayValue}} data-money-field {{on \"input\" this.handleInput}} {{on \"blur\" this.handleBlur}} {{on \"focus\" this.handleFocus}} />\n\n {{#if @helpText}}\n <ctrl.HelpText>{{@helpText}}</ctrl.HelpText>\n {{/if}}\n\n {{#if @error}}\n <ctrl.ErrorMessage @errors={{array @error}} />\n {{/if}}\n</Control>", {
191
+ setComponentTemplate(precompileTemplate("<Control @isInvalid={{this.isInvalid}} @isDisabled={{@isDisabled}} @isRequired={{@isRequired}} @isReadOnly={{@isReadOnly}} @labelInfo={{@labelInfo}} data-currency={{@currency}} data-test-money-field ...attributes as |ctrl|>\n {{#if (has-block \"info\")}}\n <ctrl.Label @isVisuallyHidden={{this.isLabelHidden}}>\n <:default>{{@label}}</:default>\n <:info>{{yield to=\"info\"}}</:info>\n </ctrl.Label>\n {{else}}\n <ctrl.Label @isVisuallyHidden={{this.isLabelHidden}}>\n {{@label}}\n </ctrl.Label>\n {{/if}}\n\n <ctrl.Input @prefix={{if this.showPrefix this.currencySymbol}} @suffix={{if this.showSuffix this.currencySymbol}} @inputMode=\"decimal\" @placeholder={{this.placeholder}} @name={{@name}} @value={{this.displayValue}} data-money-field {{on \"input\" this.handleInput}} {{on \"blur\" this.handleBlur}} {{on \"focus\" this.handleFocus}} />\n\n {{#if @helpText}}\n <ctrl.HelpText>{{@helpText}}</ctrl.HelpText>\n {{/if}}\n\n {{#if @error}}\n <ctrl.ErrorMessage @errors={{array @error}} />\n {{/if}}\n</Control>", {
192
192
  strictMode: true,
193
193
  scope: () => ({
194
194
  Control,
@@ -214,7 +214,7 @@
214
214
  padding: var(--spacing-2) var(--spacing-3);
215
215
  border-radius: var(--radius-sm);
216
216
  font-size: var(--font-size-13);
217
- line-height: var(--line-height-1-25);
217
+ line-height: var(--line-height-tight);
218
218
  color: var(--color-text);
219
219
  cursor: pointer;
220
220
  user-select: none;
@@ -3,6 +3,7 @@
3
3
  .number-field-input-wrapper_e9ff3bd72 {
4
4
  display: flex;
5
5
  align-items: stretch;
6
+ box-sizing: border-box;
6
7
  height: var(--input-height-md);
7
8
  border: var(--border-width-1) solid var(--color-border-control);
8
9
  border-radius: var(--radius-md);
@@ -167,7 +167,7 @@ class NumberField extends Component {
167
167
  }
168
168
  };
169
169
  static {
170
- setComponentTemplate(precompileTemplate("<Control @isInvalid={{this.isInvalid}} @isDisabled={{@isDisabled}} @isRequired={{@isRequired}} @isReadOnly={{@isReadOnly}} ...attributes as |ctrl|>\n <ctrl.Label @isVisuallyHidden={{this.isLabelHidden}}>\n {{@label}}\n </ctrl.Label>\n\n <div class=\"number-field-input-wrapper_e9ff3bd72\" data-invalid={{if this.isInvalid \"true\" \"false\"}} data-disabled={{if @isDisabled \"true\" \"false\"}} data-readonly={{if @isReadOnly \"true\" \"false\"}} data-at-min={{if this.isAtMin \"true\" \"false\"}} data-at-max={{if this.isAtMax \"true\" \"false\"}} data-has-stepper={{if this.showStepper \"true\" \"false\"}} data-test-number-field-wrapper>\n {{#if @prefix}}\n <span class=\"number-field-affix_e9ff3bd72 number-field-prefix_e9ff3bd72\" data-test-number-field-prefix>\n {{@prefix}}\n </span>\n {{/if}}\n\n {{!-- template-lint-disable no-redundant-role --}}\n <input id={{ctrl.id}} class=\"number-field-input_e9ff3bd72\" type=\"text\" inputmode={{this.inputMode}} role=\"spinbutton\" name={{@name}} value={{this.displayValue}} placeholder={{@placeholder}} disabled={{@isDisabled}} readonly={{@isReadOnly}} aria-invalid={{if this.isInvalid \"true\"}} aria-required={{if @isRequired \"true\"}} aria-describedby={{this.getAriaDescribedBy ctrl.id}} aria-valuenow={{this.ariaValueNow}} aria-valuemin={{this.ariaValueMin}} aria-valuemax={{this.ariaValueMax}} {{on \"input\" this.handleInput}} {{on \"blur\" this.handleBlur}} {{on \"focus\" this.handleFocus}} {{on \"keydown\" this.handleKeyDown}} data-test-number-field-input />\n\n {{#if @suffix}}\n <span class=\"number-field-affix_e9ff3bd72 number-field-suffix_e9ff3bd72\" data-test-number-field-suffix>\n {{@suffix}}\n </span>\n {{/if}}\n\n {{#if this.showStepper}}\n <div class=\"number-field-stepper_e9ff3bd72\" data-test-number-field-stepper>\n <button type=\"button\" class=\"number-field-stepper-button_e9ff3bd72\" tabindex=\"-1\" aria-label=\"Increase\" disabled={{if @isDisabled true (if @isReadOnly true this.isAtMax)}} {{on \"click\" this.increment}} data-test-number-field-increment>\n <Icon @icon={{ChevronUp}} @size=\"xs\" />\n </button>\n <button type=\"button\" class=\"number-field-stepper-button_e9ff3bd72\" tabindex=\"-1\" aria-label=\"Decrease\" disabled={{if @isDisabled true (if @isReadOnly true this.isAtMin)}} {{on \"click\" this.decrement}} data-test-number-field-decrement>\n <Icon @icon={{ChevronDown}} @size=\"xs\" />\n </button>\n </div>\n {{/if}}\n </div>\n\n {{#if @helpText}}\n <ctrl.HelpText>{{@helpText}}</ctrl.HelpText>\n {{/if}}\n\n {{#if @error}}\n <ctrl.ErrorMessage>{{@error}}</ctrl.ErrorMessage>\n {{/if}}\n</Control>", {
170
+ setComponentTemplate(precompileTemplate("<Control @isInvalid={{this.isInvalid}} @isDisabled={{@isDisabled}} @isRequired={{@isRequired}} @isReadOnly={{@isReadOnly}} @labelInfo={{@labelInfo}} data-max-width={{@maxWidth}} ...attributes as |ctrl|>\n {{#if (has-block \"info\")}}\n <ctrl.Label @isVisuallyHidden={{this.isLabelHidden}}>\n <:default>{{@label}}</:default>\n <:info>{{yield to=\"info\"}}</:info>\n </ctrl.Label>\n {{else}}\n <ctrl.Label @isVisuallyHidden={{this.isLabelHidden}}>\n {{@label}}\n </ctrl.Label>\n {{/if}}\n\n <div class=\"number-field-input-wrapper_e9ff3bd72\" data-invalid={{if this.isInvalid \"true\" \"false\"}} data-disabled={{if @isDisabled \"true\" \"false\"}} data-readonly={{if @isReadOnly \"true\" \"false\"}} data-at-min={{if this.isAtMin \"true\" \"false\"}} data-at-max={{if this.isAtMax \"true\" \"false\"}} data-has-stepper={{if this.showStepper \"true\" \"false\"}} data-test-number-field-wrapper>\n {{#if @prefix}}\n <span class=\"number-field-affix_e9ff3bd72 number-field-prefix_e9ff3bd72\" data-test-number-field-prefix>\n {{@prefix}}\n </span>\n {{/if}}\n\n {{!-- template-lint-disable no-redundant-role --}}\n <input id={{ctrl.id}} class=\"number-field-input_e9ff3bd72\" type=\"text\" inputmode={{this.inputMode}} role=\"spinbutton\" name={{@name}} value={{this.displayValue}} placeholder={{@placeholder}} disabled={{@isDisabled}} readonly={{@isReadOnly}} aria-invalid={{if this.isInvalid \"true\"}} aria-required={{if @isRequired \"true\"}} aria-describedby={{this.getAriaDescribedBy ctrl.id}} aria-valuenow={{this.ariaValueNow}} aria-valuemin={{this.ariaValueMin}} aria-valuemax={{this.ariaValueMax}} {{on \"input\" this.handleInput}} {{on \"blur\" this.handleBlur}} {{on \"focus\" this.handleFocus}} {{on \"keydown\" this.handleKeyDown}} data-test-number-field-input />\n\n {{#if @suffix}}\n <span class=\"number-field-affix_e9ff3bd72 number-field-suffix_e9ff3bd72\" data-test-number-field-suffix>\n {{@suffix}}\n </span>\n {{/if}}\n\n {{#if this.showStepper}}\n <div class=\"number-field-stepper_e9ff3bd72\" data-test-number-field-stepper>\n <button type=\"button\" class=\"number-field-stepper-button_e9ff3bd72\" tabindex=\"-1\" aria-label=\"Increase\" disabled={{if @isDisabled true (if @isReadOnly true this.isAtMax)}} {{on \"click\" this.increment}} data-test-number-field-increment>\n <Icon @icon={{ChevronUp}} @size=\"xs\" />\n </button>\n <button type=\"button\" class=\"number-field-stepper-button_e9ff3bd72\" tabindex=\"-1\" aria-label=\"Decrease\" disabled={{if @isDisabled true (if @isReadOnly true this.isAtMin)}} {{on \"click\" this.decrement}} data-test-number-field-decrement>\n <Icon @icon={{ChevronDown}} @size=\"xs\" />\n </button>\n </div>\n {{/if}}\n </div>\n\n {{#if @helpText}}\n <ctrl.HelpText>{{@helpText}}</ctrl.HelpText>\n {{/if}}\n\n {{#if @error}}\n <ctrl.ErrorMessage>{{@error}}</ctrl.ErrorMessage>\n {{/if}}\n</Control>", {
171
171
  strictMode: true,
172
172
  scope: () => ({
173
173
  Control,
@@ -132,17 +132,17 @@
132
132
  font-size: var(--font-size-md);
133
133
  font-weight: var(--font-weight-regular);
134
134
  color: var(--color-text);
135
- line-height: var(--spacing-5);
135
+ line-height: var(--line-height-20);
136
136
  }
137
137
 
138
138
  .radio-wrapper_e6dda4f5d[data-size="sm"] .radio-label_e6dda4f5d {
139
139
  font-size: var(--font-size-sm);
140
- line-height: var(--spacing-4);
140
+ line-height: var(--line-height-16);
141
141
  }
142
142
 
143
143
  .radio-wrapper_e6dda4f5d[data-size="lg"] .radio-label_e6dda4f5d {
144
144
  font-size: var(--font-size-lg);
145
- line-height: var(--spacing-6);
145
+ line-height: var(--line-height-24);
146
146
  }
147
147
 
148
148
  .radio-label_e6dda4f5d[data-visually-hidden="true"] {
@@ -24,7 +24,7 @@ class SelectField extends Component {
24
24
  return parts.length > 0 ? parts.join(' ') : undefined;
25
25
  };
26
26
  static {
27
- setComponentTemplate(precompileTemplate("<Control @isInvalid={{this.isInvalid}} @isDisabled={{@isDisabled}} @isRequired={{@isRequired}} ...attributes as |ctrl|>\n <ctrl.Label @isVisuallyHidden={{this.isLabelHidden}}>\n {{@label}}\n </ctrl.Label>\n\n <Select @id={{ctrl.id}} @name={{@name}} @value={{@value}} @placeholder={{@placeholder}} @isDisabled={{@isDisabled}} @isInvalid={{this.isInvalid}} @isRequired={{@isRequired}} @aria-describedby={{this.getAriaDescribedBy ctrl.id}} @onChange={{@onChange}} @onBlur={{@onBlur}} @onFocus={{@onFocus}} data-test-select-field as |select|>\n {{yield (hash Option=select.Option OptionGroup=select.OptionGroup)}}\n </Select>\n\n {{#if @helpText}}\n <ctrl.HelpText>{{@helpText}}</ctrl.HelpText>\n {{/if}}\n\n {{#if @error}}\n <ctrl.ErrorMessage>{{@error}}</ctrl.ErrorMessage>\n {{/if}}\n</Control>", {
27
+ setComponentTemplate(precompileTemplate("<Control @isInvalid={{this.isInvalid}} @isDisabled={{@isDisabled}} @isRequired={{@isRequired}} @labelInfo={{@labelInfo}} ...attributes as |ctrl|>\n {{#if (has-block \"info\")}}\n <ctrl.Label @isVisuallyHidden={{this.isLabelHidden}}>\n <:default>{{@label}}</:default>\n <:info>{{yield to=\"info\"}}</:info>\n </ctrl.Label>\n {{else}}\n <ctrl.Label @isVisuallyHidden={{this.isLabelHidden}}>\n {{@label}}\n </ctrl.Label>\n {{/if}}\n\n <Select @id={{ctrl.id}} @name={{@name}} @value={{@value}} @placeholder={{@placeholder}} @isDisabled={{@isDisabled}} @isInvalid={{this.isInvalid}} @isRequired={{@isRequired}} @aria-describedby={{this.getAriaDescribedBy ctrl.id}} @onChange={{@onChange}} @onBlur={{@onBlur}} @onFocus={{@onFocus}} data-test-select-field as |select|>\n {{yield (hash Option=select.Option OptionGroup=select.OptionGroup)}}\n </Select>\n\n {{#if @helpText}}\n <ctrl.HelpText>{{@helpText}}</ctrl.HelpText>\n {{/if}}\n\n {{#if @error}}\n <ctrl.ErrorMessage>{{@error}}</ctrl.ErrorMessage>\n {{/if}}\n</Control>", {
28
28
  strictMode: true,
29
29
  scope: () => ({
30
30
  Control,
@@ -1 +1 @@
1
- {"version":3,"file":"select-field.js","sources":["../../src/form/select-field.gts"],"sourcesContent":["import Component from '@glimmer/component';\nimport { hash } from '@ember/helper';\nimport type { WithBoundArgs } from '@glint/template';\n\nimport Control from './control.gts';\nimport Select, { SelectOption, SelectOptionGroup } from './select.gts';\n\nimport './select.css';\n\nexport type LabelVisibility = 'visible' | 'hidden';\n\nexport interface SelectFieldSignature {\n Element: HTMLDivElement;\n Args: {\n /** Label text (required) */\n label: string;\n\n /** Current selected value */\n value?: string;\n\n /** Placeholder text shown when no value is selected */\n placeholder?: string;\n\n /** Help text displayed below the select */\n helpText?: string;\n\n /** Error message (also sets invalid state) */\n error?: string;\n\n /** Field is required */\n isRequired?: boolean;\n\n /** Field is disabled */\n isDisabled?: boolean;\n\n /** Label visibility */\n labelVisibility?: LabelVisibility;\n\n /** Input name for forms */\n name?: string;\n\n /** Change event handler */\n onChange?: (value: string) => void;\n\n /** Blur event handler */\n onBlur?: (event: FocusEvent) => void;\n\n /** Focus event handler */\n onFocus?: (event: FocusEvent) => void;\n };\n Blocks: {\n default: [\n {\n Option: WithBoundArgs<typeof SelectOption, 'ctx'>;\n OptionGroup: typeof SelectOptionGroup;\n },\n ];\n };\n}\n\nexport default class SelectField extends Component<SelectFieldSignature> {\n get isInvalid(): boolean {\n return !!this.args.error;\n }\n\n get isLabelHidden(): boolean {\n return this.args.labelVisibility === 'hidden';\n }\n\n /** Build aria-describedby from the control's help text and error message IDs */\n getAriaDescribedBy = (controlId: string): string | undefined => {\n const parts: string[] = [];\n if (this.args.helpText) {\n parts.push(`${controlId}-help-text`);\n }\n if (this.args.error) {\n parts.push(`${controlId}-error-message`);\n }\n return parts.length > 0 ? parts.join(' ') : undefined;\n };\n\n <template>\n <Control\n @isInvalid={{this.isInvalid}}\n @isDisabled={{@isDisabled}}\n @isRequired={{@isRequired}}\n ...attributes\n as |ctrl|\n >\n <ctrl.Label @isVisuallyHidden={{this.isLabelHidden}}>\n {{@label}}\n </ctrl.Label>\n\n <Select\n @id={{ctrl.id}}\n @name={{@name}}\n @value={{@value}}\n @placeholder={{@placeholder}}\n @isDisabled={{@isDisabled}}\n @isInvalid={{this.isInvalid}}\n @isRequired={{@isRequired}}\n @aria-describedby={{this.getAriaDescribedBy ctrl.id}}\n @onChange={{@onChange}}\n @onBlur={{@onBlur}}\n @onFocus={{@onFocus}}\n data-test-select-field\n as |select|\n >\n {{yield (hash Option=select.Option OptionGroup=select.OptionGroup)}}\n </Select>\n\n {{#if @helpText}}\n <ctrl.HelpText>{{@helpText}}</ctrl.HelpText>\n {{/if}}\n\n {{#if @error}}\n <ctrl.ErrorMessage>{{@error}}</ctrl.ErrorMessage>\n {{/if}}\n </Control>\n </template>\n}\n"],"names":["SelectField","Component","isInvalid","args","error","isLabelHidden","labelVisibility","getAriaDescribedBy","controlId","parts","helpText","push","length","join","undefined","setComponentTemplate","precompileTemplate","strictMode","scope","Control","Select","hash"],"mappings":";;;;;;;AA4De,MAAMA,oBAAoBC,SAAA,CAAU;EACjD,IAAIC,SAAAA,GAAqB;AACvB,IAAA,OAAO,CAAC,CAAC,IAAI,CAACC,IAAI,CAACC,KAAK;AAC1B,EAAA;EAEA,IAAIC,aAAAA,GAAyB;AAC3B,IAAA,OAAO,IAAI,CAACF,IAAI,CAACG,eAAe,KAAK,QAAA;AACvC,EAAA;AAEA;EACAC,qBAAsBC,SAAiB,IAAqB;IAC1D,MAAMC,KAAa,GAAK,EAAE;AAC1B,IAAA,IAAI,IAAI,CAACN,IAAI,CAACO,QAAQ,EAAE;AACtBD,MAAAA,KAAA,CAAME,IAAI,CAAC,CAAA,EAAGH,SAAA,YAAqB,CAAA;AACrC,IAAA;AACA,IAAA,IAAI,IAAI,CAACL,IAAI,CAACC,KAAK,EAAE;AACnBK,MAAAA,KAAA,CAAME,IAAI,CAAC,CAAA,EAAGH,SAAA,gBAAyB,CAAA;AACzC,IAAA;AACA,IAAA,OAAOC,MAAMG,MAAM,GAAG,IAAIH,KAAA,CAAMI,IAAI,CAAC,GAAA,CAAA,GAAOC,SAAA;EAC9C,CAAA;AAEA,EAAA;IAAAC,oBAAA,CAAAC,kBAAA,CAAA,+yBAAA,EAsCA;MAAAC,UAAA,EAAA,IAAA;AAAAC,MAAAA,KAAA,EAAAA,OAAA;QAAAC,OAAA;QAAAC,MAAA;AAAAC,QAAAA;AAAA,OAAA;KAAU,CAAA,EAAV,IAAW,CAAA;AAAD;AACZ;;;;"}
1
+ {"version":3,"file":"select-field.js","sources":["../../src/form/select-field.gts"],"sourcesContent":["import Component from '@glimmer/component';\nimport { hash } from '@ember/helper';\nimport type { WithBoundArgs } from '@glint/template';\n\nimport Control from './control.gts';\nimport Select, { SelectOption, SelectOptionGroup } from './select.gts';\n\nexport type LabelVisibility = 'visible' | 'hidden';\n\nexport interface SelectFieldSignature {\n Element: HTMLDivElement;\n Args: {\n /** Label text (required) */\n label: string;\n\n /** Current selected value */\n value?: string;\n\n /** Placeholder text shown when no value is selected */\n placeholder?: string;\n\n /** Help text displayed below the select */\n helpText?: string;\n\n /** Error message (also sets invalid state) */\n error?: string;\n\n /** Field is required */\n isRequired?: boolean;\n\n /** Field is disabled */\n isDisabled?: boolean;\n\n /** Info tooltip text shown next to the label */\n labelInfo?: string;\n\n /** Label visibility */\n labelVisibility?: LabelVisibility;\n\n /** Input name for forms */\n name?: string;\n\n /** Change event handler */\n onChange?: (value: string) => void;\n\n /** Blur event handler */\n onBlur?: (event: FocusEvent) => void;\n\n /** Focus event handler */\n onFocus?: (event: FocusEvent) => void;\n };\n Blocks: {\n default: [\n {\n Option: WithBoundArgs<typeof SelectOption, 'ctx'>;\n OptionGroup: typeof SelectOptionGroup;\n },\n ];\n /** Rich tooltip content shown next to the label */\n info: [];\n };\n}\n\nexport default class SelectField extends Component<SelectFieldSignature> {\n get isInvalid(): boolean {\n return !!this.args.error;\n }\n\n get isLabelHidden(): boolean {\n return this.args.labelVisibility === 'hidden';\n }\n\n /** Build aria-describedby from the control's help text and error message IDs */\n getAriaDescribedBy = (controlId: string): string | undefined => {\n const parts: string[] = [];\n if (this.args.helpText) {\n parts.push(`${controlId}-help-text`);\n }\n if (this.args.error) {\n parts.push(`${controlId}-error-message`);\n }\n return parts.length > 0 ? parts.join(' ') : undefined;\n };\n\n <template>\n <Control\n @isInvalid={{this.isInvalid}}\n @isDisabled={{@isDisabled}}\n @isRequired={{@isRequired}}\n @labelInfo={{@labelInfo}}\n ...attributes\n as |ctrl|\n >\n {{#if (has-block \"info\")}}\n <ctrl.Label @isVisuallyHidden={{this.isLabelHidden}}>\n <:default>{{@label}}</:default>\n <:info>{{yield to=\"info\"}}</:info>\n </ctrl.Label>\n {{else}}\n <ctrl.Label @isVisuallyHidden={{this.isLabelHidden}}>\n {{@label}}\n </ctrl.Label>\n {{/if}}\n\n <Select\n @id={{ctrl.id}}\n @name={{@name}}\n @value={{@value}}\n @placeholder={{@placeholder}}\n @isDisabled={{@isDisabled}}\n @isInvalid={{this.isInvalid}}\n @isRequired={{@isRequired}}\n @aria-describedby={{this.getAriaDescribedBy ctrl.id}}\n @onChange={{@onChange}}\n @onBlur={{@onBlur}}\n @onFocus={{@onFocus}}\n data-test-select-field\n as |select|\n >\n {{yield (hash Option=select.Option OptionGroup=select.OptionGroup)}}\n </Select>\n\n {{#if @helpText}}\n <ctrl.HelpText>{{@helpText}}</ctrl.HelpText>\n {{/if}}\n\n {{#if @error}}\n <ctrl.ErrorMessage>{{@error}}</ctrl.ErrorMessage>\n {{/if}}\n </Control>\n </template>\n}\n"],"names":["SelectField","Component","isInvalid","args","error","isLabelHidden","labelVisibility","getAriaDescribedBy","controlId","parts","helpText","push","length","join","undefined","setComponentTemplate","precompileTemplate","strictMode","scope","Control","Select","hash"],"mappings":";;;;;;;AA+De,MAAMA,oBAAoBC,SAAA,CAAU;EACjD,IAAIC,SAAAA,GAAqB;AACvB,IAAA,OAAO,CAAC,CAAC,IAAI,CAACC,IAAI,CAACC,KAAK;AAC1B,EAAA;EAEA,IAAIC,aAAAA,GAAyB;AAC3B,IAAA,OAAO,IAAI,CAACF,IAAI,CAACG,eAAe,KAAK,QAAA;AACvC,EAAA;AAEA;EACAC,qBAAsBC,SAAiB,IAAqB;IAC1D,MAAMC,KAAa,GAAK,EAAE;AAC1B,IAAA,IAAI,IAAI,CAACN,IAAI,CAACO,QAAQ,EAAE;AACtBD,MAAAA,KAAA,CAAME,IAAI,CAAC,CAAA,EAAGH,SAAA,YAAqB,CAAA;AACrC,IAAA;AACA,IAAA,IAAI,IAAI,CAACL,IAAI,CAACC,KAAK,EAAE;AACnBK,MAAAA,KAAA,CAAME,IAAI,CAAC,CAAA,EAAGH,SAAA,gBAAyB,CAAA;AACzC,IAAA;AACA,IAAA,OAAOC,MAAMG,MAAM,GAAG,IAAIH,KAAA,CAAMI,IAAI,CAAC,GAAA,CAAA,GAAOC,SAAA;EAC9C,CAAA;AAEA,EAAA;IAAAC,oBAAA,CAAAC,kBAAA,CAAA,uiCAAA,EA8CA;MAAAC,UAAA,EAAA,IAAA;AAAAC,MAAAA,KAAA,EAAAA,OAAA;QAAAC,OAAA;QAAAC,MAAA;AAAAC,QAAAA;AAAA,OAAA;KAAU,CAAA,EAAV,IAAW,CAAA;AAAD;AACZ;;;;"}
@@ -127,7 +127,7 @@
127
127
  padding: var(--spacing-2) var(--spacing-3);
128
128
  border-radius: var(--radius-sm);
129
129
  font-size: var(--font-size-13);
130
- line-height: var(--line-height-1-25);
130
+ line-height: var(--line-height-tight);
131
131
  color: var(--color-text);
132
132
  cursor: pointer;
133
133
  user-select: none;
@@ -1,4 +1,4 @@
1
- /* <inline>/src/form/text-field-css-f60360f3f8aaf4da664eaccd1bcc9f8f.css */
1
+ /* <inline>/src/form/text-field-css-754feeb82dbd9fc9afdc1f00dceb13ad.css */
2
2
 
3
3
  .text-field_e2680f9ba {
4
4
  display: flex;
@@ -29,3 +29,24 @@
29
29
  .text-field_e2680f9ba[data-over-limit="true"] .text-field-character-count_e2680f9ba {
30
30
  color: var(--color-text-critical);
31
31
  }
32
+
33
+ .text-field_e2680f9ba[data-monospace="true"] input,
34
+ .text-field_e2680f9ba[data-monospace="true"] textarea {
35
+ font-family: var(--font-family-mono);
36
+ }
37
+
38
+ .text-field_e2680f9ba[data-max-width="xs"] {
39
+ max-width: 120px;
40
+ }
41
+ .text-field_e2680f9ba[data-max-width="sm"] {
42
+ max-width: 200px;
43
+ }
44
+ .text-field_e2680f9ba[data-max-width="md"] {
45
+ max-width: 320px;
46
+ }
47
+ .text-field_e2680f9ba[data-max-width="lg"] {
48
+ max-width: 480px;
49
+ }
50
+ .text-field_e2680f9ba[data-max-width="xl"] {
51
+ max-width: 640px;
52
+ }