sit-onyx 1.1.0-dev-20250929075001 → 1.1.0-dev-20250929145347

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.
@@ -35,15 +35,18 @@ declare const __VLS_component: import('vue').DefineComponent<OnyxInputProps, {
35
35
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
36
36
  validityChange: (validity: ValidityState) => any;
37
37
  "update:modelValue": (value: string) => any;
38
+ "update:showPassword": (showPassword: boolean) => any;
38
39
  }, string, import('vue').PublicProps, Readonly<OnyxInputProps> & Readonly<{
39
40
  onValidityChange?: ((validity: ValidityState) => any) | undefined;
40
41
  "onUpdate:modelValue"?: ((value: string) => any) | undefined;
42
+ "onUpdate:showPassword"?: ((showPassword: boolean) => any) | undefined;
41
43
  }>, {
42
44
  skeleton: import('../../composables/useSkeletonState.js', { with: { "resolution-mode": "import" } }).SkeletonInjected;
43
45
  required: boolean;
44
46
  disabled: import('../OnyxForm/OnyxForm.core.js', { with: { "resolution-mode": "import" } }).FormInjected<boolean>;
45
47
  showError: import('../OnyxForm/OnyxForm.core.js', { with: { "resolution-mode": "import" } }).FormInjected<import('../../composables/useErrorClass.js', { with: { "resolution-mode": "import" } }).ShowErrorMode>;
46
48
  requiredMarker: import('../OnyxForm/OnyxForm.core.js', { with: { "resolution-mode": "import" } }).FormInjected<import('../../composables/required.js', { with: { "resolution-mode": "import" } }).RequiredMarkerType>;
49
+ showPassword: boolean;
47
50
  readonly: boolean;
48
51
  loading: boolean;
49
52
  autocapitalize: import('../../composables/useLenientMaxLengthValidation.js', { with: { "resolution-mode": "import" } }).Autocapitalize;
@@ -19,6 +19,11 @@ export type OnyxInputProps = SharedFormElementProps & SharedTextInputProps & {
19
19
  * Whether to hide the clear icon when the input is filled and focused.
20
20
  */
21
21
  hideClearIcon?: boolean;
22
+ /**
23
+ * Show or hide the password value for input with `type="password"`.
24
+ * If unset, the state will be managed internally.
25
+ */
26
+ showPassword?: boolean;
22
27
  };
23
28
  export declare const INPUT_TYPES: readonly ["email", "password", "search", "tel", "text", "url"];
24
29
  export type InputType = (typeof INPUT_TYPES)[number];
@@ -4393,24 +4393,26 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
4393
4393
  () => props.alignment === "auto" ? openAlignment.value : props.alignment
4394
4394
  );
4395
4395
  const positionAndAlignment = computed(() => {
4396
- let returnPosition = toolTipPosition.value;
4397
- if ((toolTipPosition.value === "top" || toolTipPosition.value === "bottom") && alignsWithEdge.value) {
4396
+ if ((toolTipPosition.value === "top" || toolTipPosition.value === "bottom") && props.alignsWithEdge) {
4398
4397
  if (alignment.value === "left") {
4399
- returnPosition = toolTipPosition.value + " x-start";
4398
+ return `${toolTipPosition.value} x-start`;
4400
4399
  }
4401
4400
  if (alignment.value === "right") {
4402
- returnPosition = toolTipPosition.value + " x-end";
4401
+ return `${toolTipPosition.value} x-end`;
4403
4402
  }
4404
4403
  }
4405
- return returnPosition;
4404
+ if (toolTipPosition.value.includes(" ")) {
4405
+ return toolTipPosition.value;
4406
+ }
4407
+ return `${toolTipPosition.value} center`;
4406
4408
  });
4407
4409
  const createPattern = () => triggerType.value === "hover" ? createTooltip(tooltipOptions.value) : createToggletip(toggletipOptions.value);
4408
4410
  const ariaPattern = shallowRef(createPattern());
4409
4411
  watch(triggerType, () => ariaPattern.value = createPattern());
4410
4412
  const tooltip2 = computed(() => ariaPattern.value?.elements.tooltip);
4411
4413
  const triggerElementProps = computed(() => toValue(ariaPattern.value?.elements.trigger));
4412
- const alignsWithEdge = computed(() => props.alignsWithEdge);
4413
- const fitParent = computed(() => props.fitParent);
4414
+ const alignsWithEdge = toRef(() => props.alignsWithEdge);
4415
+ const fitParent = toRef(() => props.fitParent);
4414
4416
  const tooltipWrapperRef = useTemplateRef("tooltipWrapperRefEl");
4415
4417
  const tooltipRef = useTemplateRef("tooltipRefEl");
4416
4418
  const { openDirection, updateOpenDirection } = useOpenDirection(tooltipWrapperRef, "top");
@@ -4458,27 +4460,31 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
4458
4460
  onMounted(() => {
4459
4461
  handleOpening(isVisible.value);
4460
4462
  updateDirections();
4461
- if (!useragentSupportsAnchorApi.value) updateAnchorPositionPolyfill();
4462
- });
4463
- watch(isVisible, async (newVal) => {
4464
- await nextTick();
4465
- handleOpening(newVal);
4466
- updateDirections();
4467
- if (!useragentSupportsAnchorApi.value) updateAnchorPositionPolyfill();
4468
4463
  });
4469
- watch([tooltipWidth, toolTipPosition, alignment, alignsWithEdge], async () => {
4470
- if (!useragentSupportsAnchorApi.value) {
4471
- await nextTick();
4472
- updateAnchorPositionPolyfill();
4464
+ onMounted(() => {
4465
+ if (useragentSupportsAnchorApi.value) {
4466
+ return;
4473
4467
  }
4468
+ watch(
4469
+ [tooltipWidth, toolTipPosition, alignment, alignsWithEdge, isVisible],
4470
+ () => updateAnchorPositionPolyfill(),
4471
+ { flush: "post", immediate: true }
4472
+ );
4474
4473
  });
4475
- const id = useId();
4476
- const anchorName = computed(() => `--anchor-${id}`);
4474
+ watch(
4475
+ isVisible,
4476
+ async (newVal) => {
4477
+ handleOpening(newVal);
4478
+ updateDirections();
4479
+ },
4480
+ { flush: "post" }
4481
+ );
4482
+ const anchorName = `--anchor-${useId()}`;
4477
4483
  const tooltipStyles = computed(() => {
4478
4484
  if (useragentSupportsAnchorApi.value) {
4479
4485
  return {
4480
4486
  width: tooltipWidth.value,
4481
- "position-anchor": anchorName.value,
4487
+ "position-anchor": anchorName,
4482
4488
  "position-area": positionAndAlignment.value
4483
4489
  };
4484
4490
  }
@@ -4488,7 +4494,7 @@ const _sfc_main$10 = /* @__PURE__ */ defineComponent({
4488
4494
  top: topPosition.value
4489
4495
  };
4490
4496
  });
4491
- const __returned__ = { props, emit, densityClass, t, isVisible, tooltipOptions, toggletipOptions, triggerType, toolTipPosition, alignment, positionAndAlignment, createPattern, ariaPattern, tooltip: tooltip2, triggerElementProps, alignsWithEdge, fitParent, tooltipWrapperRef, tooltipRef, openDirection, updateOpenDirection, openAlignment, updateOpenAlignment, leftPosition, topPosition, updateAnchorPositionPolyfill, useragentSupportsAnchorApi, updateDirections, handleOpening, tooltipClasses, width, tooltipWidth, id, anchorName, tooltipStyles, OnyxIcon };
4497
+ const __returned__ = { props, emit, densityClass, t, isVisible, tooltipOptions, toggletipOptions, triggerType, toolTipPosition, alignment, positionAndAlignment, createPattern, ariaPattern, tooltip: tooltip2, triggerElementProps, alignsWithEdge, fitParent, tooltipWrapperRef, tooltipRef, openDirection, updateOpenDirection, openAlignment, updateOpenAlignment, leftPosition, topPosition, updateAnchorPositionPolyfill, useragentSupportsAnchorApi, updateDirections, handleOpening, tooltipClasses, width, tooltipWidth, anchorName, tooltipStyles, OnyxIcon };
4492
4498
  Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true });
4493
4499
  return __returned__;
4494
4500
  }
@@ -8148,6 +8154,7 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
8148
8154
  success: { type: [String, Object], required: false },
8149
8155
  hideSuccessIcon: { type: Boolean, required: false },
8150
8156
  hideClearIcon: { type: Boolean, required: false },
8157
+ showPassword: { type: Boolean, required: false },
8151
8158
  modelValue: { type: null, required: false },
8152
8159
  type: { type: String, required: false, default: "date" },
8153
8160
  min: { type: null, required: false },
@@ -8654,9 +8661,10 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
8654
8661
  type: { type: null, required: false, default: "text" },
8655
8662
  pattern: { type: null, required: false },
8656
8663
  hideSuccessIcon: { type: Boolean, required: false, default: false },
8657
- hideClearIcon: { type: Boolean, required: false, default: false }
8664
+ hideClearIcon: { type: Boolean, required: false, default: false },
8665
+ showPassword: { type: Boolean, required: false, default: void 0 }
8658
8666
  },
8659
- emits: ["validityChange", "update:modelValue"],
8667
+ emits: ["validityChange", "update:modelValue", "update:showPassword"],
8660
8668
  setup(__props, { expose: __expose, emit: __emit }) {
8661
8669
  const props = __props;
8662
8670
  const emit = __emit;
@@ -8685,7 +8693,12 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
8685
8693
  const skeleton = useSkeletonContext(props);
8686
8694
  const errorClass = useErrorClass(showError);
8687
8695
  useAutofocus(input2, props);
8688
- const showPassword = ref(false);
8696
+ const showPassword = useVModel({
8697
+ props,
8698
+ emit,
8699
+ key: "showPassword",
8700
+ default: false
8701
+ });
8689
8702
  const displayType = computed(() => {
8690
8703
  if (props.type === "password" && showPassword.value) {
8691
8704
  return "text";
@@ -12763,6 +12776,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
12763
12776
  minlength: { type: Number, required: false },
12764
12777
  autocapitalize: { type: null, required: false, default: "sentences" },
12765
12778
  modelValue: { type: null, required: false },
12779
+ showPassword: { type: Boolean, required: false },
12766
12780
  autosize: { type: Object, required: false },
12767
12781
  disableManualResize: { type: Boolean, required: false, default: false }
12768
12782
  },