@manafishrov/ui 1.2.11 → 1.2.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (163) hide show
  1. package/dist/Theme.js +3 -3
  2. package/dist/_virtual/calendar-month.js +3 -3
  3. package/dist/_virtual/check-circle.js +3 -3
  4. package/dist/_virtual/check.js +3 -3
  5. package/dist/_virtual/chevron-left.js +3 -3
  6. package/dist/_virtual/chevron-right.js +3 -3
  7. package/dist/_virtual/close.js +3 -3
  8. package/dist/_virtual/error.js +3 -3
  9. package/dist/_virtual/expand-less.js +3 -3
  10. package/dist/_virtual/expand-more.js +3 -3
  11. package/dist/_virtual/info.js +3 -3
  12. package/dist/_virtual/more-horiz.js +3 -3
  13. package/dist/_virtual/progress-activity.js +3 -3
  14. package/dist/_virtual/search.js +3 -3
  15. package/dist/_virtual/side-navigation.js +3 -3
  16. package/dist/_virtual/visibility-off.js +3 -3
  17. package/dist/_virtual/visibility.js +3 -3
  18. package/dist/_virtual/warning.js +3 -3
  19. package/dist/components/Accordion.js +3 -3
  20. package/dist/components/AlertDialog.js +5 -5
  21. package/dist/components/AspectRatio.js +3 -3
  22. package/dist/components/Avatar.js +5 -5
  23. package/dist/components/Badge.js +3 -3
  24. package/dist/components/Breadcrumb.js +8 -8
  25. package/dist/components/Button.js +5 -5
  26. package/dist/components/Card.js +9 -9
  27. package/dist/components/Carousel.js +8 -8
  28. package/dist/components/Combobox.js +4 -4
  29. package/dist/components/Combobox.js.map +1 -1
  30. package/dist/components/DatePicker.js +5 -5
  31. package/dist/components/DatePicker.js.map +1 -1
  32. package/dist/components/Dialog.js +4 -4
  33. package/dist/components/Empty.js +8 -8
  34. package/dist/components/Field.js +8 -8
  35. package/dist/components/Field.js.map +1 -1
  36. package/dist/components/InputGroup.js +7 -7
  37. package/dist/components/Item.js +11 -11
  38. package/dist/components/Kbd.js +4 -4
  39. package/dist/components/Menu.js +3 -3
  40. package/dist/components/MenuCombobox.js +1 -1
  41. package/dist/components/MenuComboboxList.js +1 -1
  42. package/dist/components/NumberInput.js +5 -5
  43. package/dist/components/NumberInput.js.map +1 -1
  44. package/dist/components/Pagination.js +5 -5
  45. package/dist/components/PasswordInput.js +1 -1
  46. package/dist/components/PasswordInput.js.map +1 -1
  47. package/dist/components/PinInput.js +5 -5
  48. package/dist/components/PinInput.js.map +1 -1
  49. package/dist/components/Popover.js +3 -3
  50. package/dist/components/Progress.js +2 -2
  51. package/dist/components/Progress.js.map +1 -1
  52. package/dist/components/RadioGroup.js +2 -2
  53. package/dist/components/RadioGroup.js.map +1 -1
  54. package/dist/components/Select.js +2 -2
  55. package/dist/components/Select.js.map +1 -1
  56. package/dist/components/Separator.js +3 -3
  57. package/dist/components/Sheet.js +1 -1
  58. package/dist/components/Skeleton.js +3 -3
  59. package/dist/components/Slider.js +29 -29
  60. package/dist/components/Slider.js.map +1 -1
  61. package/dist/components/Spinner.js +4 -4
  62. package/dist/components/Table.js +10 -10
  63. package/dist/components/TagsInput.js +1 -1
  64. package/dist/components/TagsInput.js.map +1 -1
  65. package/dist/components/TextInput.js +4 -4
  66. package/dist/components/TextInput.js.map +1 -1
  67. package/dist/components/Typography.js +1 -1
  68. package/dist/components/form/ComboboxField.d.ts +5 -3
  69. package/dist/components/form/ComboboxField.js +62 -63
  70. package/dist/components/form/ComboboxField.js.map +1 -1
  71. package/dist/components/form/DatePickerField.d.ts +3 -2
  72. package/dist/components/form/DatePickerField.js +43 -32
  73. package/dist/components/form/DatePickerField.js.map +1 -1
  74. package/dist/components/form/NumberInputField.d.ts +3 -3
  75. package/dist/components/form/NumberInputField.js +18 -19
  76. package/dist/components/form/NumberInputField.js.map +1 -1
  77. package/dist/components/form/PasswordInputField.d.ts +1 -0
  78. package/dist/components/form/PasswordInputField.js +23 -16
  79. package/dist/components/form/PasswordInputField.js.map +1 -1
  80. package/dist/components/form/SliderField.js +16 -18
  81. package/dist/components/form/SliderField.js.map +1 -1
  82. package/dist/components/form/TagsInputField.d.ts +4 -4
  83. package/dist/components/form/TagsInputField.js +52 -49
  84. package/dist/components/form/TagsInputField.js.map +1 -1
  85. package/dist/components/sidebar/SidebarDesktop.js +6 -6
  86. package/dist/components/sidebar/SidebarMenu.js +11 -11
  87. package/dist/components/sidebar/SidebarMobile.js +1 -1
  88. package/dist/components/sidebar/SidebarProvider.js +4 -4
  89. package/dist/components/sidebar/SidebarSubComponents.js +11 -11
  90. package/dist/components/toaster/Toaster.js +4 -4
  91. package/dist/index.js +16 -16
  92. package/dist/node_modules/.bun/@ark-ui_solid@5.34.1_2e1854f049906f04/node_modules/@ark-ui/solid/dist/chunk/ZMQW6EBL.js +4 -4
  93. package/dist/node_modules/.bun/{@floating-ui_core@1.7.4 → @floating-ui_core@1.7.5}/node_modules/@floating-ui/core/dist/floating-ui.core.js +171 -171
  94. package/dist/node_modules/.bun/@floating-ui_core@1.7.5/node_modules/@floating-ui/core/dist/floating-ui.core.js.map +1 -0
  95. package/dist/node_modules/.bun/@floating-ui_dom@1.7.6/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +404 -0
  96. package/dist/node_modules/.bun/@floating-ui_dom@1.7.6/node_modules/@floating-ui/dom/dist/floating-ui.dom.js.map +1 -0
  97. package/dist/node_modules/.bun/@floating-ui_utils@0.2.11/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +137 -0
  98. package/dist/node_modules/.bun/@floating-ui_utils@0.2.11/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js.map +1 -0
  99. package/dist/node_modules/.bun/@floating-ui_utils@0.2.11/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +129 -0
  100. package/dist/node_modules/.bun/@floating-ui_utils@0.2.11/node_modules/@floating-ui/utils/dist/floating-ui.utils.js.map +1 -0
  101. package/dist/node_modules/.bun/@internationalized_date@3.11.0/node_modules/@internationalized/date/dist/CalendarDate.js +1 -1
  102. package/dist/node_modules/.bun/{@swc_helpers@0.5.18 → @swc_helpers@0.5.19}/node_modules/@swc/helpers/esm/_check_private_redeclaration.js.map +1 -1
  103. package/dist/node_modules/.bun/{@swc_helpers@0.5.18 → @swc_helpers@0.5.19}/node_modules/@swc/helpers/esm/_class_private_field_init.js.map +1 -1
  104. package/dist/node_modules/.bun/@zag-js_angle-slider@1.35.3/node_modules/@zag-js/angle-slider/dist/angle-slider.connect.js +1 -1
  105. package/dist/node_modules/.bun/@zag-js_checkbox@1.35.3/node_modules/@zag-js/checkbox/dist/checkbox.connect.js +3 -3
  106. package/dist/node_modules/.bun/@zag-js_combobox@1.35.3/node_modules/@zag-js/combobox/dist/combobox.connect.js +3 -3
  107. package/dist/node_modules/.bun/@zag-js_combobox@1.35.3/node_modules/@zag-js/combobox/dist/combobox.machine.js +7 -7
  108. package/dist/node_modules/.bun/@zag-js_date-picker@1.35.3_ee33ebb1f804619f/node_modules/@zag-js/date-picker/dist/date-picker.connect.js +10 -10
  109. package/dist/node_modules/.bun/@zag-js_date-picker@1.35.3_ee33ebb1f804619f/node_modules/@zag-js/date-picker/dist/date-picker.machine.js +20 -20
  110. package/dist/node_modules/.bun/@zag-js_dismissable@1.35.3/node_modules/@zag-js/dismissable/dist/dismissable-layer.js +1 -1
  111. package/dist/node_modules/.bun/@zag-js_dom-query@1.35.3/node_modules/@zag-js/dom-query/dist/press.js +3 -3
  112. package/dist/node_modules/.bun/@zag-js_hover-card@1.35.3/node_modules/@zag-js/hover-card/dist/hover-card.machine.js +1 -1
  113. package/dist/node_modules/.bun/@zag-js_menu@1.35.3/node_modules/@zag-js/menu/dist/menu.dom.js +4 -4
  114. package/dist/node_modules/.bun/@zag-js_menu@1.35.3/node_modules/@zag-js/menu/dist/menu.machine.js +5 -5
  115. package/dist/node_modules/.bun/@zag-js_navigation-menu@1.35.3/node_modules/@zag-js/navigation-menu/dist/navigation-menu.connect.js +1 -1
  116. package/dist/node_modules/.bun/@zag-js_navigation-menu@1.35.3/node_modules/@zag-js/navigation-menu/dist/navigation-menu.machine.js +12 -12
  117. package/dist/node_modules/.bun/@zag-js_number-input@1.35.3/node_modules/@zag-js/number-input/dist/number-input.connect.js +1 -1
  118. package/dist/node_modules/.bun/@zag-js_number-input@1.35.3/node_modules/@zag-js/number-input/dist/number-input.machine.js +23 -23
  119. package/dist/node_modules/.bun/@zag-js_pin-input@1.35.3/node_modules/@zag-js/pin-input/dist/pin-input.machine.js +4 -4
  120. package/dist/node_modules/.bun/@zag-js_popper@1.35.3/node_modules/@zag-js/popper/dist/get-placement.js +5 -5
  121. package/dist/node_modules/.bun/@zag-js_radio-group@1.35.3/node_modules/@zag-js/radio-group/dist/radio-group.connect.js +3 -3
  122. package/dist/node_modules/.bun/@zag-js_remove-scroll@1.35.3/node_modules/@zag-js/remove-scroll/dist/index.js +4 -4
  123. package/dist/node_modules/.bun/@zag-js_select@1.35.3/node_modules/@zag-js/select/dist/select.connect.js +1 -1
  124. package/dist/node_modules/.bun/@zag-js_select@1.35.3/node_modules/@zag-js/select/dist/select.machine.js +2 -2
  125. package/dist/node_modules/.bun/@zag-js_slider@1.35.3/node_modules/@zag-js/slider/dist/slider.dom.js +4 -4
  126. package/dist/node_modules/.bun/@zag-js_slider@1.35.3/node_modules/@zag-js/slider/dist/slider.machine.js +18 -18
  127. package/dist/node_modules/.bun/@zag-js_solid@1.35.3_2e1854f049906f04/node_modules/@zag-js/solid/dist/machine.js +1 -1
  128. package/dist/node_modules/.bun/@zag-js_switch@1.35.3/node_modules/@zag-js/switch/dist/switch.connect.js +1 -1
  129. package/dist/node_modules/.bun/@zag-js_tabs@1.35.3/node_modules/@zag-js/tabs/dist/tabs.dom.js +4 -4
  130. package/dist/node_modules/.bun/@zag-js_tabs@1.35.3/node_modules/@zag-js/tabs/dist/tabs.machine.js +11 -11
  131. package/dist/node_modules/.bun/@zag-js_tags-input@1.35.3/node_modules/@zag-js/tags-input/dist/tags-input.connect.js +4 -4
  132. package/dist/node_modules/.bun/@zag-js_tags-input@1.35.3/node_modules/@zag-js/tags-input/dist/tags-input.dom.js +1 -1
  133. package/dist/node_modules/.bun/@zag-js_tags-input@1.35.3/node_modules/@zag-js/tags-input/dist/tags-input.machine.js +4 -4
  134. package/dist/node_modules/.bun/@zag-js_toast@1.35.3/node_modules/@zag-js/toast/dist/toast-group.machine.js +4 -4
  135. package/dist/node_modules/.bun/@zag-js_tree-view@1.35.3/node_modules/@zag-js/tree-view/dist/tree-view.machine.js +7 -7
  136. package/package.json +1 -1
  137. package/src/components/Combobox.tsx +1 -1
  138. package/src/components/DatePicker.tsx +1 -1
  139. package/src/components/Field.tsx +6 -6
  140. package/src/components/NumberInput.tsx +1 -1
  141. package/src/components/PasswordInput.tsx +1 -1
  142. package/src/components/PinInput.tsx +1 -1
  143. package/src/components/Progress.tsx +2 -2
  144. package/src/components/RadioGroup.tsx +4 -4
  145. package/src/components/Select.tsx +1 -1
  146. package/src/components/Slider.tsx +8 -8
  147. package/src/components/TagsInput.tsx +1 -1
  148. package/src/components/TextInput.tsx +1 -1
  149. package/src/components/form/ComboboxField.tsx +30 -25
  150. package/src/components/form/DatePickerField.tsx +30 -17
  151. package/src/components/form/NumberInputField.tsx +5 -6
  152. package/src/components/form/PasswordInputField.tsx +7 -3
  153. package/src/components/form/SliderField.tsx +3 -1
  154. package/src/components/form/TagsInputField.tsx +43 -32
  155. package/dist/node_modules/.bun/@floating-ui_core@1.7.4/node_modules/@floating-ui/core/dist/floating-ui.core.js.map +0 -1
  156. package/dist/node_modules/.bun/@floating-ui_dom@1.7.5/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +0 -403
  157. package/dist/node_modules/.bun/@floating-ui_dom@1.7.5/node_modules/@floating-ui/dom/dist/floating-ui.dom.js.map +0 -1
  158. package/dist/node_modules/.bun/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +0 -137
  159. package/dist/node_modules/.bun/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js.map +0 -1
  160. package/dist/node_modules/.bun/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +0 -131
  161. package/dist/node_modules/.bun/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.js.map +0 -1
  162. /package/dist/node_modules/.bun/{@swc_helpers@0.5.18 → @swc_helpers@0.5.19}/node_modules/@swc/helpers/esm/_check_private_redeclaration.js +0 -0
  163. /package/dist/node_modules/.bun/{@swc_helpers@0.5.18 → @swc_helpers@0.5.19}/node_modules/@swc/helpers/esm/_class_private_field_init.js +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"TextInput.js","sources":["../../src/components/TextInput.tsx"],"sourcesContent":["import { Field as PrimitiveField } from '@ark-ui/solid/field';\nimport { splitProps, type Component, type ComponentProps } from 'solid-js';\nimport { cn } from 'tailwind-variants';\n\nimport { FieldDescription, FieldError } from '@/components/Field';\n\nexport const TextInput: Component<PrimitiveField.RootProps> = (props) => {\n const [local, others] = splitProps(props, ['class']);\n return (\n <PrimitiveField.Root\n class={cn('group/text-input relative flex w-full flex-col', local.class)}\n {...others}\n />\n );\n};\n\nexport const TextInputLabel: Component<PrimitiveField.LabelProps> = (props) => {\n const [local, others] = splitProps(props, ['class']);\n return (\n <PrimitiveField.Label\n class={cn(\n 'mb-1 gap-2 text-sm font-medium flex items-center leading-none select-none group-data-disabled:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50',\n local.class,\n )}\n {...others}\n />\n );\n};\n\nexport const TextInputControl: Component<ComponentProps<'div'>> = (props) => {\n const [local, others] = splitProps(props, ['class']);\n return (\n <PrimitiveField.Context>\n {(field) => (\n <div\n data-slot='text-input-control'\n {...(field().disabled && { 'data-disabled': 'true' })}\n {...(field().invalid && { 'data-invalid': 'true' })}\n {...(field().readOnly && { 'data-readonly': 'true' })}\n class={cn(\n 'min-w-0 h-8 relative flex w-full items-center overflow-hidden rounded-lg border border-input transition-colors outline-none dark:bg-input/30',\n 'has-focus-visible:border-ring has-focus-visible:ring-[3px] has-focus-visible:ring-ring/50',\n 'data-[invalid=true]:border-destructive data-[invalid=true]:ring-[3px] data-[invalid=true]:ring-destructive/20 dark:data-[invalid=true]:ring-destructive/40',\n 'data-[disabled=true]:bg-input/50 data-[disabled=true]:opacity-50 dark:data-[disabled=true]:bg-input/80',\n 'data-[readonly=true]:has-focus-visible:border-input data-[readonly=true]:has-focus-visible:ring-0',\n 'has-[textarea]:h-auto',\n local.class,\n )}\n {...others}\n />\n )}\n </PrimitiveField.Context>\n );\n};\n\nexport const TextInputInput: Component<PrimitiveField.InputProps> = (props) => {\n const [local, others] = splitProps(props, ['class']);\n return (\n <PrimitiveField.Input\n class={cn(\n 'min-w-0 text-base md:text-sm flex w-full bg-transparent transition-colors outline-none placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 data-[readonly=true]:cursor-default',\n 'px-0 py-0 h-full border-none bg-transparent shadow-none ring-0 focus-visible:ring-0',\n 'px-2.5',\n local.class,\n )}\n {...others}\n />\n );\n};\n\nexport const TextInputArea: Component<PrimitiveField.TextareaProps> = (props) => {\n const [local, others] = splitProps(props, ['class']);\n return (\n <PrimitiveField.Textarea\n class={cn(\n 'min-h-16 text-base md:text-sm flex field-sizing-content w-full bg-transparent transition-colors outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50 data-[readonly=true]:cursor-default',\n 'px-0 py-0 border-none bg-transparent shadow-none ring-0 focus-visible:ring-0',\n 'px-2.5 py-1.5',\n local.class,\n )}\n {...others}\n />\n );\n};\n\nexport const TextInputDescription = FieldDescription;\nexport const TextInputError = FieldError;\n"],"names":["TextInput","props","local","others","splitProps","_$createComponent","PrimitiveField","Root","_$mergeProps","cn","class","TextInputLabel","Label","TextInputControl","Context","children","field","_el$","_tmpl$","_$spread","disabled","invalid","readOnly","TextInputInput","Input","TextInputArea","Textarea","TextInputDescription","FieldDescription","TextInputError","FieldError"],"mappings":";;;;;;AAMO,MAAMA,IAAkDC,CAAAA,MAAU;AACv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EAAA;AAAA,IAAA,IAAA,QAAA;AAAA,aACZC,EACL,6OACA,uFACA,UACAP,EAAMQ,KACR;AAAA,IAAC;AAAA,EAAA,GACGP,CAAM,CAAA;AAGhB,GAEasB,IAA0DxB,CAAAA,MAAU;AAC/E,QAAM,CAACC,GAAOC,CAAM,IAAIC,EAAWH,GAAO,CAAC,OAAO,CAAC;AACnD,SAAAI,EACGC,EAAeoB,UAAQlB,EAAA;AAAA,IAAA,IAAA,QAAA;AAAA,aACfC,EACL,sOACA,gFACA,iBACAP,EAAMQ,KACR;AAAA,IAAC;AAAA,EAAA,GACGP,CAAM,CAAA;AAGhB,GAEawB,IAAuBC,GACvBC,IAAiBC;"}
1
+ {"version":3,"file":"TextInput.js","sources":["../../src/components/TextInput.tsx"],"sourcesContent":["import { Field as PrimitiveField } from '@ark-ui/solid/field';\nimport { splitProps, type Component, type ComponentProps } from 'solid-js';\nimport { cn } from 'tailwind-variants';\n\nimport { FieldDescription, FieldError } from '@/components/Field';\n\nexport const TextInput: Component<PrimitiveField.RootProps> = (props) => {\n const [local, others] = splitProps(props, ['class']);\n return (\n <PrimitiveField.Root\n class={cn('group/text-input relative flex w-full flex-col', local.class)}\n {...others}\n />\n );\n};\n\nexport const TextInputLabel: Component<PrimitiveField.LabelProps> = (props) => {\n const [local, others] = splitProps(props, ['class']);\n return (\n <PrimitiveField.Label\n class={cn(\n 'mb-1.5 gap-2 text-sm font-medium flex items-center leading-none select-none group-data-disabled:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50',\n local.class,\n )}\n {...others}\n />\n );\n};\n\nexport const TextInputControl: Component<ComponentProps<'div'>> = (props) => {\n const [local, others] = splitProps(props, ['class']);\n return (\n <PrimitiveField.Context>\n {(field) => (\n <div\n data-slot='text-input-control'\n {...(field().disabled && { 'data-disabled': 'true' })}\n {...(field().invalid && { 'data-invalid': 'true' })}\n {...(field().readOnly && { 'data-readonly': 'true' })}\n class={cn(\n 'min-w-0 h-8 relative flex w-full items-center overflow-hidden rounded-lg border border-input transition-colors outline-none dark:bg-input/30',\n 'has-focus-visible:border-ring has-focus-visible:ring-[3px] has-focus-visible:ring-ring/50',\n 'data-[invalid=true]:border-destructive data-[invalid=true]:ring-[3px] data-[invalid=true]:ring-destructive/20 dark:data-[invalid=true]:ring-destructive/40',\n 'data-[disabled=true]:bg-input/50 data-[disabled=true]:opacity-50 dark:data-[disabled=true]:bg-input/80',\n 'data-[readonly=true]:has-focus-visible:border-input data-[readonly=true]:has-focus-visible:ring-0',\n 'has-[textarea]:h-auto',\n local.class,\n )}\n {...others}\n />\n )}\n </PrimitiveField.Context>\n );\n};\n\nexport const TextInputInput: Component<PrimitiveField.InputProps> = (props) => {\n const [local, others] = splitProps(props, ['class']);\n return (\n <PrimitiveField.Input\n class={cn(\n 'min-w-0 text-base md:text-sm flex w-full bg-transparent transition-colors outline-none placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 data-[readonly=true]:cursor-default',\n 'px-0 py-0 h-full border-none bg-transparent shadow-none ring-0 focus-visible:ring-0',\n 'px-2.5',\n local.class,\n )}\n {...others}\n />\n );\n};\n\nexport const TextInputArea: Component<PrimitiveField.TextareaProps> = (props) => {\n const [local, others] = splitProps(props, ['class']);\n return (\n <PrimitiveField.Textarea\n class={cn(\n 'min-h-16 text-base md:text-sm flex field-sizing-content w-full bg-transparent transition-colors outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50 data-[readonly=true]:cursor-default',\n 'px-0 py-0 border-none bg-transparent shadow-none ring-0 focus-visible:ring-0',\n 'px-2.5 py-1.5',\n local.class,\n )}\n {...others}\n />\n );\n};\n\nexport const TextInputDescription = FieldDescription;\nexport const TextInputError = FieldError;\n"],"names":["TextInput","props","local","others","splitProps","_$createComponent","PrimitiveField","Root","_$mergeProps","cn","class","TextInputLabel","Label","TextInputControl","Context","children","field","_el$","_tmpl$","_$spread","disabled","invalid","readOnly","TextInputInput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C7E,QAAM,CAACC,GAAOC,CAAM,IAAIC,EAAWH,GAAO,CAAC,OAAO,CAAC;AACnD,SAAAI,EACGC,EAAekB,OAAKhB,EAAA;AAAA,IAAA,IAAA,QAAA;AAAA,aACZC,EACL,6OACA,uFACA,UACAP,EAAMQ,KACR;AAAA,IAAC;AAAA,EAAA,GACGP,CAAM,CAAA;AAGhB,GAEasB,IAA0DxB,CAAAA,MAAU;AAC/E,QAAM,CAACC,GAAOC,CAAM,IAAIC,EAAWH,GAAO,CAAC,OAAO,CAAC;AACnD,SAAAI,EACGC,EAAeoB,UAAQlB,EAAA;AAAA,IAAA,IAAA,QAAA;AAAA,aACfC,EACL,sOACA,gFACA,iBACAP,EAAMQ,KACR;AAAA,IAAC;AAAA,EAAA,GACGP,CAAM,CAAA;AAGhB,GAEawB,IAAuBC,GACvBC,IAAiBC;"}
@@ -1,4 +1,4 @@
1
- import { template as c, spread as r, mergeProps as a } from "solid-js/web";
1
+ import { spread as r, mergeProps as a, template as c } from "solid-js/web";
2
2
  import { splitProps as o } from "solid-js";
3
3
  import { cn as n } from "../node_modules/.bun/tailwind-variants@3.2.2_7ac958b541464b98/node_modules/tailwind-variants/dist/index.js";
4
4
  var m = /* @__PURE__ */ c("<h1>"), f = /* @__PURE__ */ c("<h2>"), g = /* @__PURE__ */ c("<h3>"), i = /* @__PURE__ */ c("<h4>"), u = /* @__PURE__ */ c("<p>"), d = /* @__PURE__ */ c("<blockquote>"), h = /* @__PURE__ */ c("<ul>"), p = /* @__PURE__ */ c("<code>"), _ = /* @__PURE__ */ c("<div>"), $ = /* @__PURE__ */ c("<small>");
@@ -1,10 +1,12 @@
1
1
  import { ComboboxRootProps } from '@ark-ui/solid';
2
- import { Component } from 'solid-js';
3
- export type ComboboxFieldProps = ComboboxRootProps<string> & {
2
+ import { Component, ComponentProps } from 'solid-js';
3
+ import { ComboboxInput } from '../Combobox';
4
+ export type ComboboxFieldProps = ComponentProps<typeof ComboboxInput> & {
5
+ collection: ComboboxRootProps<string>['collection'];
4
6
  label?: string;
5
7
  description?: string;
6
8
  showTrigger?: boolean;
7
- showClear?: boolean;
9
+ showClearTrigger?: boolean;
8
10
  } & {
9
11
  class?: string;
10
12
  };
@@ -1,66 +1,68 @@
1
- import { createComponent as r, mergeProps as d, template as u, insert as o, memo as n } from "solid-js/web";
2
- import { Combobox as s, ComboboxControl as g, ComboboxInput as h, ComboboxClearTrigger as c, ComboboxTrigger as m, ComboboxPositioner as b, ComboboxContent as C, ComboboxList as p } from "../Combobox.js";
3
- import { Field as x, FieldLabel as f, FieldContent as v, FieldError as O, FieldDescription as w } from "../Field.js";
1
+ import { createComponent as e, mergeProps as s, insert as i, memo as g, template as d } from "solid-js/web";
2
+ import { Combobox as u, ComboboxControl as c, ComboboxInput as h, ComboboxClearTrigger as m, ComboboxTrigger as b, ComboboxPositioner as C, ComboboxContent as p, ComboboxList as x } from "../Combobox.js";
3
+ import { Field as f, FieldLabel as T, FieldContent as v, FieldError as w, FieldDescription as O } from "../Field.js";
4
4
  import { useFieldContext as F } from "./context.js";
5
- import { splitProps as T } from "solid-js";
6
- var _ = /* @__PURE__ */ u('<div class="gap-1 flex items-center">');
7
- const y = (l) => [r(g, {
8
- get children() {
9
- return [r(h, {
10
- get placeholder() {
11
- return l.placeholder;
12
- }
13
- }), (() => {
14
- var t = _();
15
- return o(t, (() => {
16
- var e = n(() => l.showClear === !0);
17
- return () => e() && r(c, {});
18
- })(), null), o(t, (() => {
19
- var e = n(() => l.showTrigger === !0);
20
- return () => e() && r(m, {});
21
- })(), null), t;
22
- })()];
23
- }
24
- }), r(b, {
25
- get children() {
26
- return r(C, {
27
- get children() {
28
- return r(p, {
29
- get children() {
30
- return l.children;
31
- }
32
- });
33
- }
34
- });
35
- }
36
- })], P = ["label", "description", "required", "disabled", "readOnly", "placeholder", "showTrigger", "showClear", "children"], D = (l) => {
37
- const t = F(), [e, i] = T(l, P);
38
- return r(x, {
5
+ import { splitProps as a } from "solid-js";
6
+ var _ = /* @__PURE__ */ d('<div class="gap-1 flex items-center">');
7
+ const y = (l) => {
8
+ const [t, r] = a(l, ["showTrigger", "showClearTrigger", "children"]);
9
+ return [e(c, {
10
+ get children() {
11
+ return [e(h, r), (() => {
12
+ var o = _();
13
+ return i(o, (() => {
14
+ var n = g(() => t.showClearTrigger === !0);
15
+ return () => n() && e(m, {});
16
+ })(), null), i(o, (() => {
17
+ var n = g(() => t.showTrigger === !0);
18
+ return () => n() && e(b, {});
19
+ })(), null), o;
20
+ })()];
21
+ }
22
+ }), e(C, {
23
+ get children() {
24
+ return e(p, {
25
+ get children() {
26
+ return e(x, {
27
+ get children() {
28
+ return t.children;
29
+ }
30
+ });
31
+ }
32
+ });
33
+ }
34
+ })];
35
+ }, P = ["label", "description", "required", "disabled", "readOnly", "collection", "showTrigger", "showClearTrigger", "children"], D = (l) => {
36
+ const t = F(), [r, o] = a(l, P);
37
+ return e(f, {
39
38
  get invalid() {
40
39
  return t().state.meta.errors.length > 0;
41
40
  },
42
41
  get disabled() {
43
- return e.disabled ?? !1;
42
+ return r.disabled ?? !1;
44
43
  },
45
44
  get readOnly() {
46
- return e.readOnly ?? !1;
45
+ return r.readOnly ?? !1;
47
46
  },
48
47
  get required() {
49
- return e.required ?? !1;
48
+ return r.required ?? !1;
50
49
  },
51
50
  get children() {
52
- return [r(f, {
51
+ return [e(T, {
53
52
  get children() {
54
- return e.label;
53
+ return r.label;
55
54
  }
56
- }), r(v, {
55
+ }), e(v, {
57
56
  get children() {
58
- return [r(s, d({
57
+ return [e(u, {
58
+ get collection() {
59
+ return r.collection;
60
+ },
59
61
  get value() {
60
62
  return t().state.value;
61
63
  },
62
- onValueChange: (a) => {
63
- t().handleChange(a.value);
64
+ onValueChange: (n) => {
65
+ t().handleChange(n.value);
64
66
  },
65
67
  onBlur: () => {
66
68
  t().handleBlur();
@@ -69,35 +71,32 @@ const y = (l) => [r(g, {
69
71
  return t().state.meta.errors.length > 0;
70
72
  },
71
73
  get disabled() {
72
- return e.disabled ?? !1;
74
+ return r.disabled ?? !1;
73
75
  },
74
76
  get readOnly() {
75
- return e.readOnly ?? !1;
76
- }
77
- }, i, {
77
+ return r.readOnly ?? !1;
78
+ },
78
79
  get children() {
79
- return r(y, {
80
- get placeholder() {
81
- return e.placeholder;
82
- },
80
+ return e(y, s({
83
81
  get showTrigger() {
84
- return e.showTrigger;
85
- },
86
- get showClear() {
87
- return e.showClear;
82
+ return r.showTrigger;
88
83
  },
84
+ get showClearTrigger() {
85
+ return r.showClearTrigger;
86
+ }
87
+ }, o, {
89
88
  get children() {
90
- return e.children;
89
+ return r.children;
91
90
  }
92
- });
91
+ }));
93
92
  }
94
- })), r(O, {
93
+ }), e(w, {
95
94
  get errors() {
96
95
  return t().state.meta.errors;
97
96
  }
98
- }), r(w, {
97
+ }), e(O, {
99
98
  get children() {
100
- return e.description;
99
+ return r.description;
101
100
  }
102
101
  })];
103
102
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ComboboxField.js","sources":["../../../src/components/form/ComboboxField.tsx"],"sourcesContent":["import type { ComboboxRootProps } from '@ark-ui/solid';\nimport type { Component, ComponentProps } from 'solid-js';\n\nimport {\n Combobox,\n ComboboxContent,\n ComboboxInput,\n ComboboxList,\n ComboboxPositioner,\n ComboboxControl,\n ComboboxTrigger,\n ComboboxClearTrigger,\n} from '@/components/Combobox';\nimport { Field, FieldContent, FieldDescription, FieldError, FieldLabel } from '@/components/Field';\n\nimport { useFieldContext } from './context';\n\nexport type ComboboxFieldProps = ComboboxRootProps<string> & {\n label?: string;\n description?: string;\n showTrigger?: boolean;\n showClear?: boolean;\n} & { class?: string };\n\nconst ComboboxInputGroup: Component<\n ComponentProps<typeof ComboboxInput> & {\n showTrigger?: boolean | undefined;\n showClear?: boolean | undefined;\n }\n> = (props) => (\n <>\n <ComboboxControl>\n <ComboboxInput placeholder={props.placeholder} />\n <div class='gap-1 flex items-center'>\n {props.showClear === true && <ComboboxClearTrigger />}\n {props.showTrigger === true && <ComboboxTrigger />}\n </div>\n </ComboboxControl>\n <ComboboxPositioner>\n <ComboboxContent>\n <ComboboxList>{props.children}</ComboboxList>\n </ComboboxContent>\n </ComboboxPositioner>\n </>\n);\n\nconst COMBOBOX_FIELD_PROPS = [\n 'label',\n 'description',\n 'required',\n 'disabled',\n 'readOnly',\n 'placeholder',\n 'showTrigger',\n 'showClear',\n 'children',\n] as const;\n\nexport const ComboboxField: Component<ComboboxFieldProps> = (props) => {\n const field = useFieldContext<string[]>();\n const [local, others] = splitProps(props, COMBOBOX_FIELD_PROPS);\n\n return (\n <Field\n invalid={field().state.meta.errors.length > 0}\n disabled={local.disabled ?? false}\n readOnly={local.readOnly ?? false}\n required={local.required ?? false}\n >\n <FieldLabel>{local.label}</FieldLabel>\n <FieldContent>\n <Combobox\n value={field().state.value}\n onValueChange={(details) => {\n field().handleChange(details.value);\n }}\n onBlur={() => {\n field().handleBlur();\n }}\n invalid={field().state.meta.errors.length > 0}\n disabled={local.disabled ?? false}\n readOnly={local.readOnly ?? false}\n {...others}\n >\n <ComboboxInputGroup\n placeholder={local.placeholder}\n showTrigger={local.showTrigger}\n showClear={local.showClear}\n >\n {local.children}\n </ComboboxInputGroup>\n </Combobox>\n <FieldError errors={field().state.meta.errors} />\n <FieldDescription>{local.description}</FieldDescription>\n </FieldContent>\n </Field>\n );\n};\n"],"names":["ComboboxInputGroup","props","_$createComponent","ComboboxControl","children","ComboboxInput","placeholder","_el$","_tmpl$","_$insert","_c$","_$memo","showClear","ComboboxClearTrigger","_c$2","showTrigger","ComboboxTrigger","ComboboxPositioner","ComboboxContent","ComboboxList","COMBOBOX_FIELD_PROPS","ComboboxField","field","useFieldContext","local","others","splitProps","Field","invalid","state","meta","errors","length","disabled","readOnly","required","FieldLabel","label","FieldContent","Combobox","_$mergeProps","value","onValueChange","details","handleChange","onBlur","handleBlur","FieldError","FieldDescription","description"],"mappings":";;;;;;AAwBA,MAAMA,IAKDC,CAAAA,MAAK,CAAAC,EAELC,GAAe;AAAA,EAAA,IAAAC,WAA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;AAAA,qBAAET,EAAAA,EAAQO,MAAMC,KAAKC;AAAAA,YAAM;AAAA,UAAA,CAAA,GAAA7B,EAC5C8C,GAAgB;AAAA,YAAA,IAAA5C,WAAA;AAAA,qBAAEoB,EAAMyB;AAAAA,YAAW;AAAA,UAAA,CAAA,CAAA;AAAA,QAAA;AAAA,MAAA,CAAA,CAAA;AAAA,IAAA;AAAA,EAAA,CAAA;AAI5C;"}
1
+ {"version":3,"file":"ComboboxField.js","sources":["../../../src/components/form/ComboboxField.tsx"],"sourcesContent":["import type { ComboboxRootProps } from '@ark-ui/solid';\nimport type { Component, ComponentProps } from 'solid-js';\n\nimport {\n Combobox,\n ComboboxContent,\n ComboboxInput,\n ComboboxList,\n ComboboxPositioner,\n ComboboxControl,\n ComboboxTrigger,\n ComboboxClearTrigger,\n} from '@/components/Combobox';\nimport { Field, FieldContent, FieldDescription, FieldError, FieldLabel } from '@/components/Field';\n\nimport { useFieldContext } from './context';\n\nexport type ComboboxFieldProps = ComponentProps<typeof ComboboxInput> & {\n collection: ComboboxRootProps<string>['collection'];\n label?: string;\n description?: string;\n showTrigger?: boolean;\n showClearTrigger?: boolean;\n} & { class?: string };\n\nconst ComboboxInputGroup: Component<\n ComponentProps<typeof ComboboxInput> & {\n showTrigger?: boolean | undefined;\n showClearTrigger?: boolean | undefined;\n }\n> = (props) => {\n const [local, others] = splitProps(props, ['showTrigger', 'showClearTrigger', 'children']);\n\n return (\n <>\n <ComboboxControl>\n <ComboboxInput {...others} />\n <div class='gap-1 flex items-center'>\n {local.showClearTrigger === true && <ComboboxClearTrigger />}\n {local.showTrigger === true && <ComboboxTrigger />}\n </div>\n </ComboboxControl>\n <ComboboxPositioner>\n <ComboboxContent>\n <ComboboxList>{local.children}</ComboboxList>\n </ComboboxContent>\n </ComboboxPositioner>\n </>\n );\n};\n\nconst COMBOBOX_FIELD_PROPS = [\n 'label',\n 'description',\n 'required',\n 'disabled',\n 'readOnly',\n 'collection',\n 'showTrigger',\n 'showClearTrigger',\n 'children',\n] as const;\n\nexport const ComboboxField: Component<ComboboxFieldProps> = (props) => {\n const field = useFieldContext<string[]>();\n const [local, others] = splitProps(props, COMBOBOX_FIELD_PROPS);\n\n return (\n <Field\n invalid={field().state.meta.errors.length > 0}\n disabled={local.disabled ?? false}\n readOnly={local.readOnly ?? false}\n required={local.required ?? false}\n >\n <FieldLabel>{local.label}</FieldLabel>\n <FieldContent>\n <Combobox<string>\n collection={local.collection}\n value={field().state.value}\n onValueChange={(details) => {\n field().handleChange(details.value);\n }}\n onBlur={() => {\n field().handleBlur();\n }}\n invalid={field().state.meta.errors.length > 0}\n disabled={local.disabled ?? false}\n readOnly={local.readOnly ?? false}\n >\n <ComboboxInputGroup\n showTrigger={local.showTrigger}\n showClearTrigger={local.showClearTrigger}\n {...others}\n >\n {local.children}\n </ComboboxInputGroup>\n </Combobox>\n <FieldError errors={field().state.meta.errors} />\n <FieldDescription>{local.description}</FieldDescription>\n </FieldContent>\n </Field>\n );\n};\n"],"names":["ComboboxInputGroup","props","local","others","splitProps","_$createComponent","ComboboxControl","children","ComboboxInput","_el$","_tmpl$","_$insert","_c$","_$memo","showClearTrigger","ComboboxClearTrigger","_c$2","showTrigger","ComboboxTrigger","ComboboxPositioner","ComboboxContent","ComboboxList","COMBOBOX_FIELD_PROPS","ComboboxField","field","useFieldContext","Field","invalid","state","meta","errors","length","disabled","readOnly","required","FieldLabel","label","FieldContent","Combobox","collection","value","onValueChange","details","handleChange","onBlur","handleBlur","_$mergeProps","FieldError","FieldDescription","description"],"mappings":";;;;;;AAyBA,MAAMA,IAKDC,CAAAA,MAAU;AACb,QAAM,CAACC,GAAOC,CAAM,IAAIC,EAAWH,GAAO,CAAC,eAAe,oBAAoB,UAAU,CAAC;AAEzF,SAAA,CAAAI,EAEKC,GAAe;AAAA,IAAA,IAAAC,WAAA;AAAA,aAAA,CAAAF,EACbG,GAAkBL,CAAM,IAAA,MAAA;AAAA,YAAAM,IAAAC,EAAAA;AAAAC,eAAAA,EA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A;AAAA,qBAAEL,EAAM+C;AAAAA,YAAW;AAAA,UAAA,CAAA,CAAA;AAAA,QAAA;AAAA,MAAA,CAAA,CAAA;AAAA,IAAA;AAAA,EAAA,CAAA;AAI5C;"}
@@ -1,7 +1,8 @@
1
- import { DatePickerRootProps } from '@ark-ui/solid';
1
+ import { DatePickerInputProps } from '@ark-ui/solid';
2
2
  import { Component } from 'solid-js';
3
- export type DatePickerFieldProps = DatePickerRootProps & {
3
+ export type DatePickerFieldProps = DatePickerInputProps & {
4
4
  label?: string;
5
5
  description?: string;
6
+ showTrigger?: boolean;
6
7
  };
7
8
  export declare const DatePickerField: Component<DatePickerFieldProps>;
@@ -1,23 +1,33 @@
1
- import { createComponent as e, mergeProps as a } from "solid-js/web";
2
- import { DatePicker as d, DatePickerControl as o, DatePickerInput as s, DatePickerTrigger as u, DatePickerPositioner as c, DatePickerContent as g, DatePickerViews as p } from "../DatePicker.js";
3
- import { Field as h, FieldLabel as m, FieldContent as P, FieldError as D, FieldDescription as f } from "../Field.js";
4
- import { useFieldContext as k } from "./context.js";
5
- import { splitProps as b } from "solid-js";
6
- const C = (n) => [e(o, {
7
- get children() {
8
- return [e(s, n), e(u, {})];
9
- }
10
- }), e(c, {
11
- get children() {
12
- return e(g, {
13
- get children() {
14
- return e(p, {});
15
- }
16
- });
17
- }
18
- })], F = ["label", "description", "required", "disabled", "readOnly", "placeholder"], q = (n) => {
19
- const t = k(), [r, l] = b(n, F);
20
- return e(h, {
1
+ import { createComponent as e, mergeProps as a, Show as d } from "solid-js/web";
2
+ import { DatePicker as s, DatePickerControl as g, DatePickerInput as u, DatePickerTrigger as c, DatePickerPositioner as h, DatePickerContent as p, DatePickerViews as m } from "../DatePicker.js";
3
+ import { Field as P, FieldLabel as f, FieldContent as D, FieldError as b, FieldDescription as k } from "../Field.js";
4
+ import { useFieldContext as w } from "./context.js";
5
+ import { splitProps as l } from "solid-js";
6
+ const C = (n) => {
7
+ const [t, r] = l(n, ["showTrigger"]);
8
+ return [e(g, {
9
+ get children() {
10
+ return [e(u, r), e(d, {
11
+ get when() {
12
+ return t.showTrigger !== !1;
13
+ },
14
+ get children() {
15
+ return e(c, {});
16
+ }
17
+ })];
18
+ }
19
+ }), e(h, {
20
+ get children() {
21
+ return e(p, {
22
+ get children() {
23
+ return e(m, {});
24
+ }
25
+ });
26
+ }
27
+ })];
28
+ }, F = ["label", "description", "required", "disabled", "readOnly", "placeholder", "showTrigger"], I = (n) => {
29
+ const t = w(), [r, i] = l(n, F);
30
+ return e(P, {
21
31
  get invalid() {
22
32
  return t().state.meta.errors.length > 0;
23
33
  },
@@ -31,18 +41,18 @@ const C = (n) => [e(o, {
31
41
  return r.required ?? !1;
32
42
  },
33
43
  get children() {
34
- return [e(m, {
44
+ return [e(f, {
35
45
  get children() {
36
46
  return r.label;
37
47
  }
38
- }), e(P, {
48
+ }), e(D, {
39
49
  get children() {
40
- return [e(d, a({
50
+ return [e(s, {
41
51
  get value() {
42
52
  return t().state.value;
43
53
  },
44
- onValueChange: (i) => {
45
- t().handleChange(i.value);
54
+ onValueChange: (o) => {
55
+ t().handleChange(o.value);
46
56
  },
47
57
  onBlur: () => {
48
58
  t().handleBlur();
@@ -55,20 +65,21 @@ const C = (n) => [e(o, {
55
65
  },
56
66
  get readOnly() {
57
67
  return r.readOnly ?? !1;
58
- }
59
- }, l, {
68
+ },
60
69
  get children() {
61
- return e(C, {
70
+ return e(C, a(i, {
62
71
  get placeholder() {
63
72
  return r.placeholder;
64
73
  }
65
- });
74
+ }, () => typeof r.showTrigger == "boolean" && {
75
+ showTrigger: r.showTrigger
76
+ }));
66
77
  }
67
- })), e(D, {
78
+ }), e(b, {
68
79
  get errors() {
69
80
  return t().state.meta.errors;
70
81
  }
71
- }), e(f, {
82
+ }), e(k, {
72
83
  get children() {
73
84
  return r.description;
74
85
  }
@@ -79,6 +90,6 @@ const C = (n) => [e(o, {
79
90
  });
80
91
  };
81
92
  export {
82
- q as DatePickerField
93
+ I as DatePickerField
83
94
  };
84
95
  //# sourceMappingURL=DatePickerField.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DatePickerField.js","sources":["../../../src/components/form/DatePickerField.tsx"],"sourcesContent":["import type { DatePickerInputProps, DatePickerRootProps, DateValue } from '@ark-ui/solid';\nimport type { Component } from 'solid-js';\n\nimport {\n DatePicker,\n DatePickerContent,\n DatePickerControl,\n DatePickerInput,\n DatePickerPositioner,\n DatePickerTrigger,\n DatePickerViews,\n} from '@/components/DatePicker';\nimport { Field, FieldContent, FieldDescription, FieldError, FieldLabel } from '@/components/Field';\n\nimport { useFieldContext } from './context';\n\nexport type DatePickerFieldProps = DatePickerRootProps & {\n label?: string;\n description?: string;\n};\n\nconst DatePickerInputGroup: Component<DatePickerInputProps> = (props) => (\n <>\n <DatePickerControl>\n <DatePickerInput {...props} />\n <DatePickerTrigger />\n </DatePickerControl>\n <DatePickerPositioner>\n <DatePickerContent>\n <DatePickerViews />\n </DatePickerContent>\n </DatePickerPositioner>\n </>\n);\n\nconst DATE_PICKER_FIELD_PROPS = [\n 'label',\n 'description',\n 'required',\n 'disabled',\n 'readOnly',\n 'placeholder',\n] as const;\n\nexport const DatePickerField: Component<DatePickerFieldProps> = (props) => {\n const field = useFieldContext<DateValue[]>();\n const [local, others] = splitProps(props, DATE_PICKER_FIELD_PROPS);\n\n return (\n <Field\n invalid={field().state.meta.errors.length > 0}\n disabled={local.disabled ?? false}\n readOnly={local.readOnly ?? false}\n required={local.required ?? false}\n >\n <FieldLabel>{local.label}</FieldLabel>\n <FieldContent>\n <DatePicker\n value={field().state.value}\n onValueChange={(details) => {\n field().handleChange(details.value);\n }}\n onBlur={() => {\n field().handleBlur();\n }}\n invalid={field().state.meta.errors.length > 0}\n disabled={local.disabled ?? false}\n readOnly={local.readOnly ?? false}\n {...others}\n >\n <DatePickerInputGroup placeholder={local.placeholder} />\n </DatePicker>\n <FieldError errors={field().state.meta.errors} />\n <FieldDescription>{local.description}</FieldDescription>\n </FieldContent>\n </Field>\n );\n};\n"],"names":["DatePickerInputGroup","props","_$createComponent","DatePickerControl","children","DatePickerInput","DatePickerTrigger","DatePickerPositioner","DatePickerContent","DatePickerViews","DATE_PICKER_FIELD_PROPS","DatePickerField","field","useFieldContext","local","others","splitProps","Field","invalid","state","meta","errors","length","disabled","readOnly","required","FieldLabel","label","FieldContent","DatePicker","_$mergeProps","value","onValueChange","details","handleChange","onBlur","handleBlur","placeholder","FieldError","FieldDescription","description"],"mappings":";;;;;AAqBA,MAAMA,IAAyDC,CAAAA,MAAK,CAAAC,EAE/DC,GAAiB;AAAA,EAAA,IAAAC,WAAA;AAAA,WAAA,CAAAF,EACfG,GAAoBJ,CAAK,GAAAC,EACzBI,GAAiB,CAAA,CAAA,CAAA;AAAA,EAAA;AAAA,CAAA,GAAAJ,EAEnBK,GAAoB;AAAA,EAAA,IAAAH,WAAA;AAAA,WAAAF,EAClBM,GAAiB;AAAA,MAAA,IAAAJ,WAAA;AAAA,eAAAF,EACfO,GAAe,EAAA;AAAA,MAAA;AAAA,IAAA,CAAA;AAAA,EAAA;AAAA,CAAA,CAAA,GAMlBC,IAA0B,CAC9B,SACA,eACA,YACA,YACA,YACA,aAAa,GAGFC,IAAoDV,CAAAA,MAAU;AACzE,QAAMW,IAAQC,EAAAA,GACR,CAACC,GAAOC,CAAM,IAAIC,EAAWf,GAAOS,CAAuB;AAEjE,SAAAR,EACGe,GAAK;AAAA,IAAA,IACJC,UAAO;AAAA,aAAEN,EAAAA,EAAQO,MAAMC,KAAKC,OAAOC,SAAS;AAAA,IAAC;AAAA,IAAA,IAC7CC,WAAQ;AAAA,aAAET,EAAMS,YAAY;AAAA,IAAK;AAAA,IAAA,IACjCC,WAAQ;AAAA,aAAEV,EAAMU,YAAY;AAAA,IAAK;AAAA,IAAA,IACjCC,WAAQ;AAAA,aAAEX,EAAMW,YAAY;AAAA,IAAK;AAAA,IAAA,IAAArB,WAAA;AAAA,aAAA,CAAAF,EAEhCwB,GAAU;AAAA,QAAA,IAAAtB,WAAA;AAAA,iBAAEU,EAAMa;AAAAA,QAAK;AAAA,MAAA,CAAA,GAAAzB,EACvB0B,GAAY;AAAA,QAAA,IAAAxB,WAAA;AAAA,iBAAA,CAAAF,EACV2B,GAAUC,EAAA;AAAA,YAAA,IACTC,QAAK;AAAA,qBAAEnB,EAAAA,EAAQO,MAAMY;AAAAA,YAAK;AAAA,YAC1BC,eAAgBC,CAAAA,MAAY;AAC1BrB,cAAAA,IAAQsB,aAAaD,EAAQF,KAAK;AAAA,YACpC;AAAA,YACAI,QAAQA,MAAM;AACZvB,cAAAA,EAAAA,EAAQwB,WAAAA;AAAAA,YACV;AAAA,YAAC,IACDlB,UAAO;AAAA,qBAAEN,EAAAA,EAAQO,MAAMC,KAAKC,OAAOC,SAAS;AAAA,YAAC;AAAA,YAAA,IAC7CC,WAAQ;AAAA,qBAAET,EAAMS,YAAY;AAAA,YAAK;AAAA,YAAA,IACjCC,WAAQ;AAAA,qBAAEV,EAAMU,YAAY;AAAA,YAAK;AAAA,UAAA,GAC7BT,GAAM;AAAA,YAAA,IAAAX,WAAA;AAAA,qBAAAF,EAETF,GAAoB;AAAA,gBAAA,IAACqC,cAAW;AAAA,yBAAEvB,EAAMuB;AAAAA,gBAAW;AAAA,cAAA,CAAA;AAAA,YAAA;AAAA,UAAA,CAAA,CAAA,GAAAnC,EAErDoC,GAAU;AAAA,YAAA,IAACjB,SAAM;AAAA,qBAAET,EAAAA,EAAQO,MAAMC,KAAKC;AAAAA,YAAM;AAAA,UAAA,CAAA,GAAAnB,EAC5CqC,GAAgB;AAAA,YAAA,IAAAnC,WAAA;AAAA,qBAAEU,EAAM0B;AAAAA,YAAW;AAAA,UAAA,CAAA,CAAA;AAAA,QAAA;AAAA,MAAA,CAAA,CAAA;AAAA,IAAA;AAAA,EAAA,CAAA;AAI5C;"}
1
+ {"version":3,"file":"DatePickerField.js","sources":["../../../src/components/form/DatePickerField.tsx"],"sourcesContent":["import type { DatePickerInputProps, DateValue } from '@ark-ui/solid';\nimport type { Component } from 'solid-js';\n\nimport {\n DatePicker,\n DatePickerContent,\n DatePickerControl,\n DatePickerInput,\n DatePickerPositioner,\n DatePickerTrigger,\n DatePickerViews,\n} from '@/components/DatePicker';\nimport { Field, FieldContent, FieldDescription, FieldError, FieldLabel } from '@/components/Field';\n\nimport { useFieldContext } from './context';\n\nexport type DatePickerFieldProps = DatePickerInputProps & {\n label?: string;\n description?: string;\n showTrigger?: boolean;\n};\n\nconst DatePickerInputGroup: Component<DatePickerInputProps & { showTrigger?: boolean }> = (\n props,\n) => {\n const [local, others] = splitProps(props, ['showTrigger']);\n\n return (\n <>\n <DatePickerControl>\n <DatePickerInput {...others} />\n <Show when={local.showTrigger !== false}>\n <DatePickerTrigger />\n </Show>\n </DatePickerControl>\n <DatePickerPositioner>\n <DatePickerContent>\n <DatePickerViews />\n </DatePickerContent>\n </DatePickerPositioner>\n </>\n );\n};\n\nconst DATE_PICKER_FIELD_PROPS = [\n 'label',\n 'description',\n 'required',\n 'disabled',\n 'readOnly',\n 'placeholder',\n 'showTrigger',\n] as const;\n\nexport const DatePickerField: Component<DatePickerFieldProps> = (props) => {\n const field = useFieldContext<DateValue[]>();\n const [local, others] = splitProps(props, DATE_PICKER_FIELD_PROPS);\n\n return (\n <Field\n invalid={field().state.meta.errors.length > 0}\n disabled={local.disabled ?? false}\n readOnly={local.readOnly ?? false}\n required={local.required ?? false}\n >\n <FieldLabel>{local.label}</FieldLabel>\n <FieldContent>\n <DatePicker\n value={field().state.value}\n onValueChange={(details) => {\n field().handleChange(details.value);\n }}\n onBlur={() => {\n field().handleBlur();\n }}\n invalid={field().state.meta.errors.length > 0}\n disabled={local.disabled ?? false}\n readOnly={local.readOnly ?? false}\n >\n <DatePickerInputGroup\n {...others}\n placeholder={local.placeholder}\n {...(typeof local.showTrigger === 'boolean' && { showTrigger: local.showTrigger })}\n />\n </DatePicker>\n <FieldError errors={field().state.meta.errors} />\n <FieldDescription>{local.description}</FieldDescription>\n </FieldContent>\n </Field>\n );\n};\n"],"names":["DatePickerInputGroup","props","local","others","splitProps","_$createComponent","DatePickerControl","children","DatePickerInput","_$Show","when","showTrigger","DatePickerTrigger","DatePickerPositioner","DatePickerContent","DatePickerViews","DATE_PICKER_FIELD_PROPS","DatePickerField","field","useFieldContext","Field","invalid","state","meta","errors","length","disabled","readOnly","required","FieldLabel","label","FieldContent","DatePicker","value","onValueChange","details","handleChange","onBlur","handleBlur","_$mergeProps","placeholder","FieldError","FieldDescription","description"],"mappings":";;;;;AAsBA,MAAMA,IACJC,CAAAA,MACG;AACH,QAAM,CAACC,GAAOC,CAAM,IAAIC,EAAWH,GAAO,CAAC,aAAa,CAAC;AAEzD,SAAA,CAAAI,EAEKC,GAAiB;AAAA,IAAA,IAAAC,WAAA;AAAA,aAAA,CAAAF,EACfG,GAAoBL,CAAM,GAAAE,EAC1BI,GAAI;AAAA,QAAA,IAACC,OAAI;AAAA,iBAAER,EAAMS,gBAAgB;AAAA,QAAK;AAAA,QAAA,IAAAJ,WAAA;AAAA,iBAAAF,EACpCO,GAAiB,EAAA;AAAA,QAAA;AAAA,MAAA,CAAA,CAAA;AAAA,IAAA;AAAA,EAAA,CAAA,GAAAP,EAGrBQ,GAAoB;AAAA,IAAA,IAAAN,WAAA;AAAA,aAAAF,EAClBS,GAAiB;AAAA,QAAA,IAAAP,WAAA;AAAA,iBAAAF,EACfU,GAAe,EAAA;AAAA,QAAA;AAAA,MAAA,CAAA;AAAA,IAAA;AAAA,EAAA,CAAA,CAAA;AAK1B,GAEMC,IAA0B,CAC9B,SACA,eACA,YACA,YACA,YACA,eACA,aAAa,GAGFC,IAAoDhB,CAAAA,MAAU;AACzE,QAAMiB,IAAQC,EAAAA,GACR,CAACjB,GAAOC,CAAM,IAAIC,EAAWH,GAAOe,CAAuB;AAEjE,SAAAX,EACGe,GAAK;AAAA,IAAA,IACJC,UAAO;AAAA,aAAEH,EAAAA,EAAQI,MAAMC,KAAKC,OAAOC,SAAS;AAAA,IAAC;AAAA,IAAA,IAC7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,MAAMC,KAAKC;AAAAA,YAAM;AAAA,UAAA,CAAA,GAAAnB,EAC5CqC,GAAgB;AAAA,YAAA,IAAAnC,WAAA;AAAA,qBAAEL,EAAMyC;AAAAA,YAAW;AAAA,UAAA,CAAA,CAAA;AAAA,QAAA;AAAA,MAAA,CAAA,CAAA;AAAA,IAAA;AAAA,EAAA,CAAA;AAI5C;"}
@@ -1,8 +1,8 @@
1
1
  import { Component, ComponentProps } from 'solid-js';
2
- import { NumberInput } from '../NumberInput';
3
- export type NumberInputFieldProps = ComponentProps<typeof NumberInput> & {
2
+ import { NumberInputInput } from '../NumberInput';
3
+ export type NumberInputFieldProps = ComponentProps<typeof NumberInputInput> & {
4
4
  label?: string;
5
5
  description?: string;
6
- triggers?: boolean;
6
+ showTriggers?: boolean;
7
7
  };
8
8
  export declare const NumberInputField: Component<NumberInputFieldProps>;
@@ -1,11 +1,11 @@
1
- import { createComponent as e, mergeProps as u, Show as d } from "solid-js/web";
2
- import { Field as a, FieldLabel as o, FieldContent as s, FieldError as g, FieldDescription as m } from "../Field.js";
3
- import { NumberInput as p, NumberInputControl as h, NumberInputInput as c, NumberInputTriggers as b } from "../NumberInput.js";
4
- import { useFieldContext as f } from "./context.js";
5
- import { splitProps as F } from "solid-js";
6
- const y = (n) => {
7
- const t = f(), [r, l] = F(n, ["label", "description", "required", "disabled", "readOnly", "triggers"]);
8
- return e(a, {
1
+ import { createComponent as e, Show as u } from "solid-js/web";
2
+ import { Field as d, FieldLabel as a, FieldContent as o, FieldError as s, FieldDescription as g } from "../Field.js";
3
+ import { NumberInput as m, NumberInputControl as h, NumberInputInput as p, NumberInputTriggers as c } from "../NumberInput.js";
4
+ import { useFieldContext as b } from "./context.js";
5
+ import { splitProps as f } from "solid-js";
6
+ const v = (n) => {
7
+ const t = b(), [r, l] = f(n, ["label", "description", "required", "disabled", "readOnly", "showTriggers"]);
8
+ return e(d, {
9
9
  get invalid() {
10
10
  return t().state.meta.errors.length > 0;
11
11
  },
@@ -19,13 +19,13 @@ const y = (n) => {
19
19
  return r.readOnly ?? !1;
20
20
  },
21
21
  get children() {
22
- return [e(o, {
22
+ return [e(a, {
23
23
  get children() {
24
24
  return r.label;
25
25
  }
26
- }), e(s, {
26
+ }), e(o, {
27
27
  get children() {
28
- return [e(p, u({
28
+ return [e(m, {
29
29
  get value() {
30
30
  return String(t().state.value);
31
31
  },
@@ -46,27 +46,26 @@ const y = (n) => {
46
46
  },
47
47
  get required() {
48
48
  return r.required ?? !1;
49
- }
50
- }, l, {
49
+ },
51
50
  get children() {
52
51
  return e(h, {
53
52
  get children() {
54
- return [e(c, {}), e(d, {
53
+ return [e(p, l), e(u, {
55
54
  get when() {
56
- return r.triggers !== !1;
55
+ return r.showTriggers !== !1;
57
56
  },
58
57
  get children() {
59
- return e(b, {});
58
+ return e(c, {});
60
59
  }
61
60
  })];
62
61
  }
63
62
  });
64
63
  }
65
- })), e(g, {
64
+ }), e(s, {
66
65
  get errors() {
67
66
  return t().state.meta.errors;
68
67
  }
69
- }), e(m, {
68
+ }), e(g, {
70
69
  get children() {
71
70
  return r.description;
72
71
  }
@@ -77,6 +76,6 @@ const y = (n) => {
77
76
  });
78
77
  };
79
78
  export {
80
- y as NumberInputField
79
+ v as NumberInputField
81
80
  };
82
81
  //# sourceMappingURL=NumberInputField.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"NumberInputField.js","sources":["../../../src/components/form/NumberInputField.tsx"],"sourcesContent":["import type { Component, ComponentProps } from 'solid-js';\n\nimport { Field, FieldLabel, FieldContent, FieldError, FieldDescription } from '@/components/Field';\nimport {\n NumberInput,\n NumberInputControl,\n NumberInputInput,\n NumberInputTriggers,\n} from '@/components/NumberInput';\n\nimport { useFieldContext } from './context';\n\nexport type NumberInputFieldProps = ComponentProps<typeof NumberInput> & {\n label?: string;\n description?: string;\n triggers?: boolean;\n};\n\nexport const NumberInputField: Component<NumberInputFieldProps> = (props) => {\n const field = useFieldContext<number>();\n const [local, others] = splitProps(props, [\n 'label',\n 'description',\n 'required',\n 'disabled',\n 'readOnly',\n 'triggers',\n ]);\n\n return (\n <Field\n invalid={field().state.meta.errors.length > 0}\n required={local.required ?? false}\n disabled={local.disabled ?? false}\n readOnly={local.readOnly ?? false}\n >\n <FieldLabel>{local.label}</FieldLabel>\n <FieldContent>\n <NumberInput\n value={String(field().state.value)}\n onValueChange={(details) => {\n field().handleChange(details.valueAsNumber);\n }}\n onBlur={() => {\n field().handleBlur();\n }}\n invalid={field().state.meta.errors.length > 0}\n disabled={local.disabled ?? false}\n readOnly={local.readOnly ?? false}\n required={local.required ?? false}\n {...others}\n >\n <NumberInputControl>\n <NumberInputInput />\n <Show when={local.triggers !== false}>\n <NumberInputTriggers />\n </Show>\n </NumberInputControl>\n </NumberInput>\n <FieldError errors={field().state.meta.errors} />\n <FieldDescription>{local.description}</FieldDescription>\n </FieldContent>\n </Field>\n );\n};\n"],"names":["NumberInputField","props","field","useFieldContext","local","others","splitProps","_$createComponent","Field","invalid","state","meta","errors","length","required","disabled","readOnly","children","FieldLabel","label","FieldContent","NumberInput","_$mergeProps","value","String","onValueChange","details","handleChange","valueAsNumber","onBlur","handleBlur","NumberInputControl","NumberInputInput","_$Show","when","triggers","NumberInputTriggers","FieldError","FieldDescription","description"],"mappings":";;;;;AAkBO,MAAMA,IAAsDC,CAAAA,MAAU;AAC3E,QAAMC,IAAQC,EAAAA,GACR,CAACC,GAAOC,CAAM,IAAIC,EAAWL,GAAO,CACxC,SACA,eACA,YACA,YACA,YACA,UAAU,CACX;AAED,SAAAM,EACGC,GAAK;AAAA,IAAA,IACJC,UAAO;AAAA,aAAEP,EAAAA,EAAQQ,MAAMC,KAAKC,OAAOC,SAAS;AAAA,IAAC;AAAA,IAAA,IAC7CC,WAAQ;AAAA,aAAEV,EAAMU,YAAY;AAAA,IAAK;AAAA,IAAA,IACjCC,WAAQ;AAAA,aAAEX,EAAMW,YAAY;AAAA,IAAK;AAAA,IAAA,IACjCC,WAAQ;AAAA,aAAEZ,EAAMY,YA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YAAA,IAACzB,SAAM;AAAA,qBAAEV,EAAAA,EAAQQ,MAAMC,KAAKC;AAAAA,YAAM;AAAA,UAAA,CAAA,GAAAL,EAC5C+B,GAAgB;AAAA,YAAA,IAAArB,WAAA;AAAA,qBAAEb,EAAMmC;AAAAA,YAAW;AAAA,UAAA,CAAA,CAAA;AAAA,QAAA;AAAA,MAAA,CAAA,CAAA;AAAA,IAAA;AAAA,EAAA,CAAA;AAI5C;"}
1
+ {"version":3,"file":"NumberInputField.js","sources":["../../../src/components/form/NumberInputField.tsx"],"sourcesContent":["import type { Component, ComponentProps } from 'solid-js';\n\nimport { Field, FieldLabel, FieldContent, FieldError, FieldDescription } from '@/components/Field';\nimport {\n NumberInput,\n NumberInputControl,\n NumberInputInput,\n NumberInputTriggers,\n} from '@/components/NumberInput';\n\nimport { useFieldContext } from './context';\n\nexport type NumberInputFieldProps = ComponentProps<typeof NumberInputInput> & {\n label?: string;\n description?: string;\n showTriggers?: boolean;\n};\n\nexport const NumberInputField: Component<NumberInputFieldProps> = (props) => {\n const field = useFieldContext<number>();\n const [local, others] = splitProps(props, [\n 'label',\n 'description',\n 'required',\n 'disabled',\n 'readOnly',\n 'showTriggers',\n ]);\n\n return (\n <Field\n invalid={field().state.meta.errors.length > 0}\n required={local.required ?? false}\n disabled={local.disabled ?? false}\n readOnly={local.readOnly ?? false}\n >\n <FieldLabel>{local.label}</FieldLabel>\n <FieldContent>\n <NumberInput\n value={String(field().state.value)}\n onValueChange={(details) => {\n field().handleChange(details.valueAsNumber);\n }}\n onBlur={() => {\n field().handleBlur();\n }}\n invalid={field().state.meta.errors.length > 0}\n disabled={local.disabled ?? false}\n readOnly={local.readOnly ?? false}\n required={local.required ?? false}\n >\n <NumberInputControl>\n <NumberInputInput {...others} />\n <Show when={local.showTriggers !== false}>\n <NumberInputTriggers />\n </Show>\n </NumberInputControl>\n </NumberInput>\n <FieldError errors={field().state.meta.errors} />\n <FieldDescription>{local.description}</FieldDescription>\n </FieldContent>\n </Field>\n );\n};\n"],"names":["NumberInputField","props","field","useFieldContext","local","others","splitProps","_$createComponent","Field","invalid","state","meta","errors","length","required","disabled","readOnly","children","FieldLabel","label","FieldContent","NumberInput","value","String","onValueChange","details","handleChange","valueAsNumber","onBlur","handleBlur","NumberInputControl","NumberInputInput","_$Show","when","showTriggers","NumberInputTriggers","FieldError","FieldDescription","description"],"mappings":";;;;;AAkBO,MAAMA,IAAsDC,CAAAA,MAAU;AAC3E,QAAMC,IAAQC,EAAAA,GACR,CAACC,GAAOC,CAAM,IAAIC,EAAWL,GAAO,CACxC,SACA,eACA,YACA,YACA,YACA,cAAc,CACf;AAED,SAAAM,EACGC,GAAK;AAAA,IAAA,IACJC,UAAO;AAAA,aAAEP,EAAAA,EAAQQ,MAAMC,KAAKC,OAAOC,SAAS;AAAA,IAAC;AAAA,IAAA,IAC7CC,WAAQ;AAAA,aAAEV,EAAMU,YAAY;AAAA,IAAK;AAAA,IAAA,IACjCC,WAAQ;AAAA,aAAEX,EAAMW,YAAY;AAAA,IAAK;AAAA,IAAA,IACjCC,WAAQ;AAAA,aAAEZ,EAAMY,YAAY;AAAA,IAAK;AAAA,IAAA,IAAAC,WAAA;AAAA,aAAA,CAAAV,EAEhCW,GAAU;AAAA,QAAA,IAAAD,WAAA;AAAA,iBAAEb,EAAMe;AAAAA,QAAK;AAAA,MAAA,CAAA,GAAAZ,EACvBa,GAAY;AAAA,QAAA,IAAAH,WAAA;AAAA,iBAAA,CAAAV,EACVc,GAAW;AAAA,YAAA,IACVC,QAAK;AAAA,qBAAEC,OAAOrB,IAAQQ,MAAMY,KAAK;AAAA,YAAC;AAAA,YAClCE,eAAgBC,CAAAA,MAAY;AAC1BvB,cAAAA,IAAQwB,aAAaD,EAAQE,aAAa;AAAA,YAC5C;AAAA,YACAC,QAAQA,MAAM;AACZ1B,cAAAA,EAAAA,EAAQ2B,WAAAA;AAAAA,YACV;AAAA,YAAC,IACDpB,UAAO;AAAA,qBAAEP,EAAAA,EAAQQ,MAAMC,KAAKC,OAAOC,SAAS;AAAA,YAAC;AAAA,YAAA,IAC7CE,WAAQ;AAAA,qBAAEX,EAAMW,YAAY;AAAA,YAAK;AAAA,YAAA,IACjCC,WAAQ;AAAA,qBAAEZ,EAAMY,YAAY;AAAA,YAAK;AAAA,YAAA,IACjCF,WAAQ;AAAA,qBAAEV,EAAMU,YAAY;AAAA,YAAK;AAAA,YAAA,IAAAG,WAAA;AAAA,qBAAAV,EAEhCuB,GAAkB;AAAA,gBAAA,IAAAb,WAAA;AAAA,yBAAA,CAAAV,EAChBwB,GAAqB1B,CAAM,GAAAE,EAC3ByB,GAAI;AAAA,oBAAA,IAACC,OAAI;AAAA,6BAAE7B,EAAM8B,iBAAiB;AAAA,oBAAK;AAAA,oBAAA,IAAAjB,WAAA;AAAA,6BAAAV,EACrC4B,GAAmB,EAAA;AAAA,oBAAA;AAAA,kBAAA,CAAA,CAAA;AAAA,gBAAA;AAAA,cAAA,CAAA;AAAA,YAAA;AAAA,UAAA,CAAA,GAAA5B,EAIzB6B,GAAU;AAAA,YAAA,IAACxB,SAAM;AAAA,qBAAEV,EAAAA,EAAQQ,MAAMC,KAAKC;AAAAA,YAAM;AAAA,UAAA,CAAA,GAAAL,EAC5C8B,GAAgB;AAAA,YAAA,IAAApB,WAAA;AAAA,qBAAEb,EAAMkC;AAAAA,YAAW;AAAA,UAAA,CAAA,CAAA;AAAA,QAAA;AAAA,MAAA,CAAA,CAAA;AAAA,IAAA;AAAA,EAAA,CAAA;AAI5C;"}
@@ -3,5 +3,6 @@ import { PasswordInputInput } from '../PasswordInput';
3
3
  export type PasswordInputFieldProps = ComponentProps<typeof PasswordInputInput> & {
4
4
  label?: string;
5
5
  description?: string;
6
+ showVisibilityTrigger?: boolean;
6
7
  };
7
8
  export declare const PasswordInputField: Component<PasswordInputFieldProps>;