@urbicon-ui/blocks 6.21.1 → 6.21.3

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 (78) hide show
  1. package/dist/components/NumberInput/NumberInput.svelte +197 -0
  2. package/dist/components/NumberInput/NumberInput.svelte.d.ts +4 -0
  3. package/dist/components/NumberInput/index.d.ts +55 -0
  4. package/dist/components/NumberInput/index.js +1 -0
  5. package/dist/components/index.d.ts +2 -0
  6. package/dist/components/index.js +1 -0
  7. package/dist/i18n/index.d.ts +6 -0
  8. package/dist/primitives/Avatar/avatar.variants.d.ts +6 -6
  9. package/dist/primitives/Badge/Badge.svelte +18 -8
  10. package/dist/primitives/Badge/index.d.ts +26 -6
  11. package/dist/primitives/Breadcrumb/Breadcrumb.svelte +11 -6
  12. package/dist/primitives/Breadcrumb/index.d.ts +2 -2
  13. package/dist/primitives/Button/button.variants.d.ts +4 -4
  14. package/dist/primitives/ButtonGroup/index.d.ts +1 -1
  15. package/dist/primitives/Card/card.variants.d.ts +5 -5
  16. package/dist/primitives/Checkbox/Checkbox.svelte +3 -3
  17. package/dist/primitives/Combobox/Combobox.svelte +478 -104
  18. package/dist/primitives/Combobox/combobox.variants.d.ts +89 -17
  19. package/dist/primitives/Combobox/combobox.variants.js +94 -13
  20. package/dist/primitives/Combobox/index.d.ts +166 -51
  21. package/dist/primitives/ConfirmDialog/index.d.ts +19 -0
  22. package/dist/primitives/Dialog/Dialog.svelte +74 -0
  23. package/dist/primitives/Dialog/dialog.variants.d.ts +9 -9
  24. package/dist/primitives/Dialog/index.d.ts +12 -1
  25. package/dist/primitives/Drawer/Drawer.svelte +2 -1
  26. package/dist/primitives/Drawer/drawer.variants.d.ts +8 -0
  27. package/dist/primitives/Drawer/drawer.variants.js +45 -10
  28. package/dist/primitives/Drawer/index.d.ts +13 -4
  29. package/dist/primitives/FormField/FormField.svelte +6 -6
  30. package/dist/primitives/FormField/index.d.ts +13 -4
  31. package/dist/primitives/Input/Input.svelte +8 -4
  32. package/dist/primitives/Input/input.variants.d.ts +9 -9
  33. package/dist/primitives/Menu/Menu.svelte +66 -4
  34. package/dist/primitives/Menu/index.d.ts +25 -0
  35. package/dist/primitives/Pagination/Pagination.svelte +28 -13
  36. package/dist/primitives/Pagination/index.d.ts +44 -0
  37. package/dist/primitives/Popover/Popover.svelte +34 -3
  38. package/dist/primitives/Popover/index.d.ts +3 -3
  39. package/dist/primitives/RadioGroup/RadioGroup.svelte +3 -3
  40. package/dist/primitives/Select/Select.svelte +21 -11
  41. package/dist/primitives/Select/index.d.ts +7 -0
  42. package/dist/primitives/Select/select.variants.d.ts +17 -17
  43. package/dist/primitives/Select/select.variants.js +18 -0
  44. package/dist/primitives/Skeleton/skeleton.variants.d.ts +3 -3
  45. package/dist/primitives/Slider/Slider.svelte +4 -8
  46. package/dist/primitives/Spinner/spinner.variants.d.ts +16 -16
  47. package/dist/primitives/Textarea/Textarea.svelte +13 -5
  48. package/dist/primitives/Textarea/textarea.variants.d.ts +7 -7
  49. package/dist/primitives/Textarea/textarea.variants.js +5 -2
  50. package/dist/primitives/Toast/Toaster.svelte +42 -2
  51. package/dist/primitives/Toast/index.d.ts +30 -0
  52. package/dist/primitives/Toast/toast.store.svelte.d.ts +25 -1
  53. package/dist/primitives/Toast/toast.store.svelte.js +91 -1
  54. package/dist/primitives/Toast/toast.variants.d.ts +18 -0
  55. package/dist/primitives/Toast/toast.variants.js +15 -0
  56. package/dist/primitives/Toggle/Toggle.svelte +17 -3
  57. package/dist/primitives/Toggle/index.d.ts +8 -2
  58. package/dist/primitives/Toggle/toggle.variants.d.ts +7 -0
  59. package/dist/primitives/Toggle/toggle.variants.js +26 -0
  60. package/dist/primitives/Toolbar/toolbar.variants.d.ts +6 -6
  61. package/dist/primitives/Tooltip/Tooltip.svelte +47 -21
  62. package/dist/primitives/Tooltip/Tooltip.svelte.d.ts +1 -1
  63. package/dist/primitives/Tooltip/index.d.ts +31 -3
  64. package/dist/primitives/Tooltip/tooltip.variants.d.ts +4 -4
  65. package/dist/primitives/Tooltip/tooltip.variants.js +2 -2
  66. package/dist/primitives/index.d.ts +3 -3
  67. package/dist/style/semantic.css +55 -29
  68. package/dist/translations/de.d.ts +3 -0
  69. package/dist/translations/de.js +4 -1
  70. package/dist/translations/en.d.ts +3 -0
  71. package/dist/translations/en.js +4 -1
  72. package/dist/utils/figma-token-export.d.ts +13 -0
  73. package/dist/utils/figma-token-export.js +99 -26
  74. package/dist/utils/guide.svelte.d.ts +8 -2
  75. package/dist/utils/guide.svelte.js +86 -5
  76. package/dist/utils/use-form-field.svelte.d.ts +9 -9
  77. package/dist/utils/use-form-field.svelte.js +12 -12
  78. package/package.json +3 -3
@@ -1,9 +1,9 @@
1
1
  /**
2
2
  * `useFormField` — Single source of truth for the ARIA wiring that every
3
- * Form primitive duplicates: error/hint id derivation, `aria-describedby`,
4
- * `aria-invalid`, and the mutually-exclusive error-over-hint convention.
3
+ * Form primitive duplicates: error/helper id derivation, `aria-describedby`,
4
+ * `aria-invalid`, and the mutually-exclusive error-over-helper convention.
5
5
  *
6
- * Layout (label position, error/hint placement, required marker) stays
6
+ * Layout (label position, error/helper placement, required marker) stays
7
7
  * component-specific because real Form primitives differ in shape — Input
8
8
  * stacks the label on top, Checkbox/Toggle put it inline, RadioGroup and
9
9
  * SegmentGroup have a group caption + per-item labels. The hook does not
@@ -23,11 +23,11 @@
23
23
  * ```svelte
24
24
  * <script lang="ts">
25
25
  * import { useFormField } from './index.js';
26
- * let { id: idProp, hint, error, required, disabled, label } = $props();
26
+ * let { id: idProp, helper, error, required, disabled, label } = $props();
27
27
  * const propsId = $props.id();
28
28
  * const ff = useFormField(() => ({
29
29
  * fieldId: idProp ?? `field-${propsId}`,
30
- * hint,
30
+ * helper,
31
31
  * error,
32
32
  * required,
33
33
  * disabled
@@ -47,8 +47,8 @@ export interface UseFormFieldInputs {
47
47
  /** The DOM id to apply to the field element. Compute once in the caller via `$props.id()`. */
48
48
  fieldId: string;
49
49
  /** Helper text shown below the field when no error is set. */
50
- hint?: string;
51
- /** Error message — when truthy, replaces `hint` and flags the field invalid. */
50
+ helper?: string;
51
+ /** Error message — when truthy, replaces `helper` and flags the field invalid. */
52
52
  error?: string;
53
53
  /** Required flag — exposed verbatim for the caller's label markup. */
54
54
  required?: boolean;
@@ -60,8 +60,8 @@ export interface UseFormFieldReturn {
60
60
  readonly fieldId: string;
61
61
  /** Id of the error description, or undefined when no error is set. */
62
62
  readonly errorId: string | undefined;
63
- /** Id of the hint description, or undefined when error is set or no hint is given. */
64
- readonly hintId: string | undefined;
63
+ /** Id of the helper description, or undefined when error is set or no helper is given. */
64
+ readonly helperId: string | undefined;
65
65
  /** Concatenation suitable for `aria-describedby` (`undefined` when both are unset). */
66
66
  readonly describedBy: string | undefined;
67
67
  /** `true` iff `error` is truthy. Use for `aria-invalid={ff.invalid || undefined}`. */
@@ -1,9 +1,9 @@
1
1
  /**
2
2
  * `useFormField` — Single source of truth for the ARIA wiring that every
3
- * Form primitive duplicates: error/hint id derivation, `aria-describedby`,
4
- * `aria-invalid`, and the mutually-exclusive error-over-hint convention.
3
+ * Form primitive duplicates: error/helper id derivation, `aria-describedby`,
4
+ * `aria-invalid`, and the mutually-exclusive error-over-helper convention.
5
5
  *
6
- * Layout (label position, error/hint placement, required marker) stays
6
+ * Layout (label position, error/helper placement, required marker) stays
7
7
  * component-specific because real Form primitives differ in shape — Input
8
8
  * stacks the label on top, Checkbox/Toggle put it inline, RadioGroup and
9
9
  * SegmentGroup have a group caption + per-item labels. The hook does not
@@ -23,11 +23,11 @@
23
23
  * ```svelte
24
24
  * <script lang="ts">
25
25
  * import { useFormField } from './index.js';
26
- * let { id: idProp, hint, error, required, disabled, label } = $props();
26
+ * let { id: idProp, helper, error, required, disabled, label } = $props();
27
27
  * const propsId = $props.id();
28
28
  * const ff = useFormField(() => ({
29
29
  * fieldId: idProp ?? `field-${propsId}`,
30
- * hint,
30
+ * helper,
31
31
  * error,
32
32
  * required,
33
33
  * disabled
@@ -51,20 +51,20 @@
51
51
  export function computeFormFieldAria(input) {
52
52
  const fieldId = input.fieldId;
53
53
  const errorId = input.error ? `${fieldId}-error` : undefined;
54
- // Hint is suppressed when an error is present — the error message is
54
+ // Helper is suppressed when an error is present — the error message is
55
55
  // the more important description at that point. This is the same
56
56
  // exclusive convention as Material / Carbon / Polaris.
57
- const hintId = !input.error && input.hint ? `${fieldId}-hint` : undefined;
58
- // Error first, hint second — error is the more semantically urgent
57
+ const helperId = !input.error && input.helper ? `${fieldId}-helper` : undefined;
58
+ // Error first, helper second — error is the more semantically urgent
59
59
  // description and should reach assistive tech first.
60
- const describedBy = [errorId, hintId].filter(Boolean).join(' ') || undefined;
60
+ const describedBy = [errorId, helperId].filter(Boolean).join(' ') || undefined;
61
61
  const invalid = !!input.error;
62
62
  const required = !!input.required;
63
63
  const disabled = !!input.disabled;
64
64
  return {
65
65
  fieldId,
66
66
  errorId,
67
- hintId,
67
+ helperId,
68
68
  describedBy,
69
69
  invalid,
70
70
  required,
@@ -80,8 +80,8 @@ export function useFormField(inputs) {
80
80
  get errorId() {
81
81
  return result.errorId;
82
82
  },
83
- get hintId() {
84
- return result.hintId;
83
+ get helperId() {
84
+ return result.helperId;
85
85
  },
86
86
  get describedBy() {
87
87
  return result.describedBy;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@urbicon-ui/blocks",
3
- "version": "6.21.1",
3
+ "version": "6.21.3",
4
4
  "description": "Svelte 5 UI component library with Tailwind CSS 4, OKLCH design tokens and zero runtime dependencies",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -91,8 +91,8 @@
91
91
  "@sveltejs/package": "^2.5.8",
92
92
  "@sveltejs/vite-plugin-svelte": "^7.0.0",
93
93
  "@tailwindcss/vite": "^4.3.1",
94
- "@urbicon-ui/i18n": "6.21.1",
95
- "@urbicon-ui/shared-types": "6.21.1",
94
+ "@urbicon-ui/i18n": "6.21.3",
95
+ "@urbicon-ui/shared-types": "6.21.3",
96
96
  "prettier": "^3.8.4",
97
97
  "prettier-plugin-svelte": "^4.1.1",
98
98
  "prettier-plugin-tailwindcss": "^0.8.0",