@grupor5/raya 0.2.34 → 0.2.35

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.
package/dist/index.js CHANGED
@@ -4106,6 +4106,7 @@ function DatePickerWithRange({
4106
4106
  ] })
4107
4107
  ] });
4108
4108
  }
4109
+ var defaultIncludesFilter = (value, search) => value.toLowerCase().includes(search.toLowerCase()) ? 1 : 0;
4109
4110
  var Dropdown = React28__namespace.forwardRef(
4110
4111
  ({
4111
4112
  label,
@@ -4117,7 +4118,8 @@ var Dropdown = React28__namespace.forwardRef(
4117
4118
  name,
4118
4119
  error,
4119
4120
  helperText,
4120
- required
4121
+ required,
4122
+ filter
4121
4123
  }, ref) => {
4122
4124
  const [open, setOpen] = React28__namespace.useState(false);
4123
4125
  const [inputValue, setInputValue] = React28__namespace.useState("");
@@ -4163,6 +4165,7 @@ var Dropdown = React28__namespace.forwardRef(
4163
4165
  {
4164
4166
  ref: popoverRef,
4165
4167
  className: "relative",
4168
+ filter: filter != null ? filter : defaultIncludesFilter,
4166
4169
  onKeyDown: (e) => {
4167
4170
  if (e.key === "Escape") {
4168
4171
  e.preventDefault();
package/dist/index.mjs CHANGED
@@ -4075,6 +4075,7 @@ function DatePickerWithRange({
4075
4075
  ] })
4076
4076
  ] });
4077
4077
  }
4078
+ var defaultIncludesFilter = (value, search) => value.toLowerCase().includes(search.toLowerCase()) ? 1 : 0;
4078
4079
  var Dropdown = React28.forwardRef(
4079
4080
  ({
4080
4081
  label,
@@ -4086,7 +4087,8 @@ var Dropdown = React28.forwardRef(
4086
4087
  name,
4087
4088
  error,
4088
4089
  helperText,
4089
- required
4090
+ required,
4091
+ filter
4090
4092
  }, ref) => {
4091
4093
  const [open, setOpen] = React28.useState(false);
4092
4094
  const [inputValue, setInputValue] = React28.useState("");
@@ -4132,6 +4134,7 @@ var Dropdown = React28.forwardRef(
4132
4134
  {
4133
4135
  ref: popoverRef,
4134
4136
  className: "relative",
4137
+ filter: filter != null ? filter : defaultIncludesFilter,
4135
4138
  onKeyDown: (e) => {
4136
4139
  if (e.key === "Escape") {
4137
4140
  e.preventDefault();
@@ -15,6 +15,7 @@ interface DropdownProps {
15
15
  error?: string | boolean;
16
16
  helperText?: string;
17
17
  required?: boolean;
18
+ filter?: (value: string, search: string, keywords?: string[]) => number;
18
19
  }
19
20
  declare const Dropdown: React.ForwardRefExoticComponent<DropdownProps & React.RefAttributes<HTMLInputElement>>;
20
21
 
@@ -15,6 +15,7 @@ interface DropdownProps {
15
15
  error?: string | boolean;
16
16
  helperText?: string;
17
17
  required?: boolean;
18
+ filter?: (value: string, search: string, keywords?: string[]) => number;
18
19
  }
19
20
  declare const Dropdown: React.ForwardRefExoticComponent<DropdownProps & React.RefAttributes<HTMLInputElement>>;
20
21
 
@@ -75,6 +75,7 @@ var Label = React2__namespace.forwardRef((_a, ref) => {
75
75
  );
76
76
  });
77
77
  Label.displayName = LabelPrimitive__namespace.Root.displayName;
78
+ var defaultIncludesFilter = (value, search) => value.toLowerCase().includes(search.toLowerCase()) ? 1 : 0;
78
79
  var Dropdown = React2__namespace.forwardRef(
79
80
  ({
80
81
  label,
@@ -86,7 +87,8 @@ var Dropdown = React2__namespace.forwardRef(
86
87
  name,
87
88
  error,
88
89
  helperText,
89
- required
90
+ required,
91
+ filter
90
92
  }, ref) => {
91
93
  const [open, setOpen] = React2__namespace.useState(false);
92
94
  const [inputValue, setInputValue] = React2__namespace.useState("");
@@ -132,6 +134,7 @@ var Dropdown = React2__namespace.forwardRef(
132
134
  {
133
135
  ref: popoverRef,
134
136
  className: "relative",
137
+ filter: filter != null ? filter : defaultIncludesFilter,
135
138
  onKeyDown: (e) => {
136
139
  if (e.key === "Escape") {
137
140
  e.preventDefault();
@@ -52,6 +52,7 @@ var Label = React2.forwardRef((_a, ref) => {
52
52
  );
53
53
  });
54
54
  Label.displayName = LabelPrimitive.Root.displayName;
55
+ var defaultIncludesFilter = (value, search) => value.toLowerCase().includes(search.toLowerCase()) ? 1 : 0;
55
56
  var Dropdown = React2.forwardRef(
56
57
  ({
57
58
  label,
@@ -63,7 +64,8 @@ var Dropdown = React2.forwardRef(
63
64
  name,
64
65
  error,
65
66
  helperText,
66
- required
67
+ required,
68
+ filter
67
69
  }, ref) => {
68
70
  const [open, setOpen] = React2.useState(false);
69
71
  const [inputValue, setInputValue] = React2.useState("");
@@ -109,6 +111,7 @@ var Dropdown = React2.forwardRef(
109
111
  {
110
112
  ref: popoverRef,
111
113
  className: "relative",
114
+ filter: filter != null ? filter : defaultIncludesFilter,
112
115
  onKeyDown: (e) => {
113
116
  if (e.key === "Escape") {
114
117
  e.preventDefault();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grupor5/raya",
3
- "version": "0.2.34",
3
+ "version": "0.2.35",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dist/index.d.ts",
@@ -66,7 +66,8 @@
66
66
  "clean": "rm -rf dist",
67
67
  "storybook": "storybook dev -p 6006",
68
68
  "build-storybook": "storybook build",
69
- "test": "jest",
69
+ "test": "vitest run",
70
+ "test:watch": "vitest",
70
71
  "validate-grid": "node ./scripts/validate-grid.js",
71
72
  "validate-colors": "node ./scripts/validate-colors.js",
72
73
  "validate-typography-colors": "node ./scripts/validate-typography-colors.js",
@@ -84,18 +85,22 @@
84
85
  "@storybook/addon-links": "8.6.14",
85
86
  "@storybook/react": "8.6.14",
86
87
  "@storybook/react-vite": "8.6.14",
88
+ "@testing-library/jest-dom": "^6.9.1",
89
+ "@testing-library/react": "^16.3.2",
90
+ "@testing-library/user-event": "^14.6.1",
87
91
  "@types/lodash": "^4.17.18",
88
92
  "@types/node": "^24.0.3",
89
93
  "@vitejs/plugin-react": "^4.5.2",
90
94
  "autoprefixer": "^10.4.21",
91
95
  "chromatic": "^13.0.1",
92
- "jest": "^29.0.0",
96
+ "jsdom": "^28.0.0",
93
97
  "postcss": "^8.0.0",
94
98
  "tailwindcss": "^3.0.0",
95
99
  "tailwindcss-animate": "^1.0.7",
96
100
  "tsup": "^8.5.0",
97
101
  "typescript": "^5.0.0",
98
- "vite": "^6.3.5"
102
+ "vite": "^6.3.5",
103
+ "vitest": "^4.0.18"
99
104
  },
100
105
  "dependencies": {
101
106
  "@grupor5/raya-icons": "^0.1.6",
@@ -1,109 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>Typography Sizes Test - Raya Design System</title>
7
- <link rel="stylesheet" href="./tailwind.css">
8
- <style>
9
- body { font-family: 'Rubik', sans-serif; padding: 2rem; background: #f9fafb; }
10
- .test-section { margin-bottom: 3rem; padding: 2rem; background: white; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
11
- .test-item { margin-bottom: 1rem; padding: 1rem; border-left: 4px solid #8b859e; background: #faf9fb; }
12
- .class-name { font-family: monospace; font-size: 12px; color: #706984; margin-bottom: 0.5rem; }
13
- .size-info { font-family: monospace; font-size: 10px; color: #a8a3b6; }
14
- </style>
15
- </head>
16
- <body>
17
- <h1 class="text-display-xl" style="margin-bottom: 2rem; color: #8b859e;">Typography Sizes Test</h1>
18
- <p style="margin-bottom: 2rem; color: #706984;">Testing all typography classes from the Raya Design System. Each text shows its actual rendered size.</p>
19
-
20
- <div class="test-section">
21
- <h2 style="margin-bottom: 1rem; color: #8b859e;">Display Scale (NEW - Up to 60px)</h2>
22
-
23
- <div class="test-item">
24
- <div class="class-name">text-display-xxl</div>
25
- <div class="text-display-xxl">Display XXL - 60px</div>
26
- <div class="size-info">60px / 72px line-height</div>
27
- </div>
28
-
29
- <div class="test-item">
30
- <div class="class-name">text-display-xl</div>
31
- <div class="text-display-xl">Display XL - 56px</div>
32
- <div class="size-info">56px / 68px line-height</div>
33
- </div>
34
-
35
- <div class="test-item">
36
- <div class="class-name">text-display-l</div>
37
- <div class="text-display-l">Display L - 52px</div>
38
- <div class="size-info">52px / 64px line-height</div>
39
- </div>
40
-
41
- <div class="test-item">
42
- <div class="class-name">text-display-m</div>
43
- <div class="text-display-m">Display M - 48px</div>
44
- <div class="size-info">48px / 60px line-height</div>
45
- </div>
46
-
47
- <div class="test-item">
48
- <div class="class-name">text-display-s</div>
49
- <div class="text-display-s">Display S - 44px</div>
50
- <div class="size-info">44px / 56px line-height</div>
51
- </div>
52
-
53
- <div class="test-item">
54
- <div class="class-name">text-display-xs</div>
55
- <div class="text-display-xs">Display XS - 40px</div>
56
- <div class="size-info">40px / 52px line-height</div>
57
- </div>
58
- </div>
59
-
60
- <div class="test-section">
61
- <h2 style="margin-bottom: 1rem; color: #8b859e;">Heading Scale</h2>
62
-
63
- <div class="test-item">
64
- <div class="class-name">text-heading-xl</div>
65
- <div class="text-heading-xl">Heading XL - 36px</div>
66
- <div class="size-info">36px / 44px line-height</div>
67
- </div>
68
-
69
- <div class="test-item">
70
- <div class="class-name">text-heading-lg</div>
71
- <div class="text-heading-lg">Heading L - 32px</div>
72
- <div class="size-info">32px / 40px line-height</div>
73
- </div>
74
-
75
- <div class="test-item">
76
- <div class="class-name">text-heading-md</div>
77
- <div class="text-heading-md">Heading M - 28px</div>
78
- <div class="size-info">28px / 36px line-height</div>
79
- </div>
80
-
81
- <div class="test-item">
82
- <div class="class-name">text-heading-sm</div>
83
- <div class="text-heading-sm">Heading S - 24px</div>
84
- <div class="size-info">24px / 32px line-height</div>
85
- </div>
86
- </div>
87
-
88
- <div class="test-section">
89
- <h2 style="margin-bottom: 1rem; color: #8b859e;">Typography Component Tests</h2>
90
- <p style="margin-bottom: 1rem; color: #706984;">Testing Typography component with new display variants:</p>
91
-
92
- <div class="test-item">
93
- <div class="class-name">Typography variant="display-xxl"</div>
94
- <div class="text-display-xxl">60px Typography Component</div>
95
- </div>
96
-
97
- <div class="test-item">
98
- <div class="class-name">Typography variant="display-xl"</div>
99
- <div class="text-display-xl">56px Typography Component</div>
100
- </div>
101
-
102
- <div class="test-item">
103
- <div class="class-name">Typography variant="display-l"</div>
104
- <div class="text-display-l">52px Typography Component</div>
105
- </div>
106
- </div>
107
-
108
- </body>
109
- </html>