@bspk/ui 1.3.29 → 1.4.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.
- package/build.ts +1 -2
- package/dist/components/Button/Button.js +1 -1
- package/dist/components/Button/Button.js.map +1 -1
- package/dist/components/InputNumber/InputNumber.js +16 -6
- package/dist/components/InputNumber/InputNumber.js.map +1 -1
- package/dist/components/InputPhone/InputPhone.js +1 -5
- package/dist/components/InputPhone/InputPhone.js.map +1 -1
- package/dist/components/StylesProviderAgentWorkplace/StylesProviderAgentWorkplace.d.ts +11 -0
- package/dist/components/StylesProviderAgentWorkplace/StylesProviderAgentWorkplace.js +14 -0
- package/dist/components/StylesProviderAgentWorkplace/StylesProviderAgentWorkplace.js.map +1 -0
- package/dist/components/StylesProviderAgentWorkplace/index.d.ts +1 -0
- package/dist/components/StylesProviderAgentWorkplace/index.js +2 -0
- package/dist/components/StylesProviderAgentWorkplace/index.js.map +1 -0
- package/dist/components/StylesProviderBrokerWorkplace/StylesProviderBrokerWorkplace.d.ts +11 -0
- package/dist/components/StylesProviderBrokerWorkplace/StylesProviderBrokerWorkplace.js +14 -0
- package/dist/components/StylesProviderBrokerWorkplace/StylesProviderBrokerWorkplace.js.map +1 -0
- package/dist/components/StylesProviderBrokerWorkplace/index.d.ts +1 -0
- package/dist/components/StylesProviderBrokerWorkplace/index.js +2 -0
- package/dist/components/StylesProviderBrokerWorkplace/index.js.map +1 -0
- package/dist/components/StylesProviderDemo/brandsCss.js +10 -9
- package/dist/components/StylesProviderDemo/brandsCss.js.map +1 -1
- package/dist/components/StylesProviderDemo/exampleCss.js +5 -5
- package/dist/components/StylesProviderDemo/exampleCss.js.map +1 -1
- package/dist/components/Table/Table.js +1 -1
- package/dist/components/Table/Table.js.map +1 -1
- package/dist/styles/agent-workplace.css +1794 -0
- package/dist/styles/{denali-boss.css.js → agent-workplace.css.js} +763 -848
- package/dist/styles/anywhere.css +569 -654
- package/dist/styles/anywhere.css.js +569 -654
- package/dist/styles/better-homes-gardens.css +622 -719
- package/dist/styles/better-homes-gardens.css.js +622 -719
- package/dist/styles/broker-workplace.css +1794 -0
- package/dist/styles/broker-workplace.css.js +1799 -0
- package/dist/styles/cartus.css +541 -638
- package/dist/styles/cartus.css.js +541 -638
- package/dist/styles/century-21.css +570 -663
- package/dist/styles/century-21.css.js +570 -663
- package/dist/styles/coldwell-banker.css +534 -631
- package/dist/styles/coldwell-banker.css.js +534 -631
- package/dist/styles/corcoran.css +536 -637
- package/dist/styles/corcoran.css.js +536 -637
- package/dist/styles/era.css +546 -641
- package/dist/styles/era.css.js +546 -641
- package/dist/styles/example.css +1898 -0
- package/dist/styles/example.css.js +1903 -0
- package/dist/styles/sothebys.css +543 -638
- package/dist/styles/sothebys.css.js +543 -638
- package/dist/types/common.d.ts +2 -1
- package/dist/types/common.js.map +1 -1
- package/package.json +7 -47
- package/src/components/Button/Button.tsx +1 -1
- package/src/components/InputNumber/InputNumber.tsx +35 -11
- package/src/components/InputPhone/InputPhone.tsx +1 -8
- package/src/components/StylesProviderAgentWorkplace/StylesProviderAgentWorkplace.tsx +15 -0
- package/src/components/StylesProviderAgentWorkplace/index.tsx +1 -0
- package/src/components/StylesProviderBrokerWorkplace/StylesProviderBrokerWorkplace.tsx +15 -0
- package/src/components/StylesProviderBrokerWorkplace/index.tsx +1 -0
- package/src/components/StylesProviderDemo/brandsCss.ts +13 -10
- package/src/components/StylesProviderDemo/exampleCss.ts +5 -5
- package/src/components/Table/Table.tsx +1 -1
- package/{dist/styles/denali-boss.css → src/styles/example.css} +401 -384
- package/src/types/common.ts +2 -10
- package/dist/components/InputNumber/IncrementButton.d.ts +0 -17
- package/dist/components/InputNumber/IncrementButton.js +0 -17
- package/dist/components/InputNumber/IncrementButton.js.map +0 -1
- package/dist/components/StylesProviderDenaliBoss/StylesProviderDenaliBoss.d.ts +0 -11
- package/dist/components/StylesProviderDenaliBoss/StylesProviderDenaliBoss.js +0 -14
- package/dist/components/StylesProviderDenaliBoss/StylesProviderDenaliBoss.js.map +0 -1
- package/dist/components/StylesProviderDenaliBoss/index.d.ts +0 -1
- package/dist/components/StylesProviderDenaliBoss/index.js +0 -2
- package/dist/components/StylesProviderDenaliBoss/index.js.map +0 -1
- package/dist/constants/brands.d.ts +0 -7
- package/dist/constants/brands.js +0 -43
- package/dist/constants/brands.js.map +0 -1
- package/src/components/InputNumber/IncrementButton.tsx +0 -41
- package/src/components/StylesProviderDenaliBoss/StylesProviderDenaliBoss.tsx +0 -15
- package/src/components/StylesProviderDenaliBoss/index.tsx +0 -1
- package/src/constants/brands.ts +0 -49
package/dist/types/common.d.ts
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
* @bspk/ui/Txt".
|
|
7
7
|
*/
|
|
8
8
|
import { IconName } from '@bspk/icons';
|
|
9
|
+
import { BRANDS } from '@bspk/styles/brands';
|
|
9
10
|
import { JSXElementConstructor, ReactNode, ComponentPropsWithoutRef, AriaRole, ChangeEvent, KeyboardEvent, CSSProperties } from 'react';
|
|
10
11
|
export type AlertVariant = 'error' | 'informational' | 'success' | 'warning';
|
|
11
12
|
/** Sets a ref to the given element. */
|
|
@@ -137,5 +138,5 @@ export type FieldControlProps<ValueType = string, ChangeContext = ChangeEvent<HT
|
|
|
137
138
|
'aria-describedby'?: string;
|
|
138
139
|
'aria-errormessage'?: string;
|
|
139
140
|
};
|
|
140
|
-
export type Brand =
|
|
141
|
+
export type Brand = (typeof BRANDS)[number]['slug'];
|
|
141
142
|
/** Copyright 2026 Anywhere Real Estate - CC BY 4.0 */
|
package/dist/types/common.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../src/types/common.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;
|
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../src/types/common.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AA8KH,sDAAsD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bspk/ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"license": "CC-BY-4.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -186,10 +186,14 @@
|
|
|
186
186
|
"./Slider/*": "./dist/components/Slider/*.js",
|
|
187
187
|
"./Snackbar": "./dist/components/Snackbar/index.js",
|
|
188
188
|
"./Snackbar/*": "./dist/components/Snackbar/*.js",
|
|
189
|
+
"./StylesProviderAgentWorkplace": "./dist/components/StylesProviderAgentWorkplace/index.js",
|
|
190
|
+
"./StylesProviderAgentWorkplace/*": "./dist/components/StylesProviderAgentWorkplace/*.js",
|
|
189
191
|
"./StylesProviderAnywhere": "./dist/components/StylesProviderAnywhere/index.js",
|
|
190
192
|
"./StylesProviderAnywhere/*": "./dist/components/StylesProviderAnywhere/*.js",
|
|
191
193
|
"./StylesProviderBetterHomesGardens": "./dist/components/StylesProviderBetterHomesGardens/index.js",
|
|
192
194
|
"./StylesProviderBetterHomesGardens/*": "./dist/components/StylesProviderBetterHomesGardens/*.js",
|
|
195
|
+
"./StylesProviderBrokerWorkplace": "./dist/components/StylesProviderBrokerWorkplace/index.js",
|
|
196
|
+
"./StylesProviderBrokerWorkplace/*": "./dist/components/StylesProviderBrokerWorkplace/*.js",
|
|
193
197
|
"./StylesProviderCartus": "./dist/components/StylesProviderCartus/index.js",
|
|
194
198
|
"./StylesProviderCartus/*": "./dist/components/StylesProviderCartus/*.js",
|
|
195
199
|
"./StylesProviderCentury21": "./dist/components/StylesProviderCentury21/index.js",
|
|
@@ -200,8 +204,6 @@
|
|
|
200
204
|
"./StylesProviderCorcoran/*": "./dist/components/StylesProviderCorcoran/*.js",
|
|
201
205
|
"./StylesProviderDemo": "./dist/components/StylesProviderDemo/index.js",
|
|
202
206
|
"./StylesProviderDemo/*": "./dist/components/StylesProviderDemo/*.js",
|
|
203
|
-
"./StylesProviderDenaliBoss": "./dist/components/StylesProviderDenaliBoss/index.js",
|
|
204
|
-
"./StylesProviderDenaliBoss/*": "./dist/components/StylesProviderDenaliBoss/*.js",
|
|
205
207
|
"./StylesProviderEra": "./dist/components/StylesProviderEra/index.js",
|
|
206
208
|
"./StylesProviderEra/*": "./dist/components/StylesProviderEra/*.js",
|
|
207
209
|
"./StylesProviderSothebys": "./dist/components/StylesProviderSothebys/index.js",
|
|
@@ -241,7 +243,7 @@
|
|
|
241
243
|
},
|
|
242
244
|
"dependencies": {
|
|
243
245
|
"@bspk/icons": "^1.1.1",
|
|
244
|
-
"@bspk/styles": "^1.
|
|
246
|
+
"@bspk/styles": "^1.1.6",
|
|
245
247
|
"@floating-ui/dom": "^1.6.13",
|
|
246
248
|
"date-fns": "^4.1.0",
|
|
247
249
|
"focus-trap-react": "^11.0.1",
|
|
@@ -296,47 +298,5 @@
|
|
|
296
298
|
"typescript": "^5.9.3",
|
|
297
299
|
"typescript-eslint": "^8.49.0",
|
|
298
300
|
"typescript-json-schema": "^0.65.1"
|
|
299
|
-
}
|
|
300
|
-
"brands": [
|
|
301
|
-
{
|
|
302
|
-
"title": "Anywhere",
|
|
303
|
-
"slug": "anywhere"
|
|
304
|
-
},
|
|
305
|
-
{
|
|
306
|
-
"title": "Better Homes & Gardens",
|
|
307
|
-
"slug": "better-homes-gardens"
|
|
308
|
-
},
|
|
309
|
-
{
|
|
310
|
-
"title": "Cartus",
|
|
311
|
-
"slug": "cartus"
|
|
312
|
-
},
|
|
313
|
-
{
|
|
314
|
-
"title": "Century 21",
|
|
315
|
-
"slug": "century-21"
|
|
316
|
-
},
|
|
317
|
-
{
|
|
318
|
-
"title": "Coldwell Banker",
|
|
319
|
-
"slug": "coldwell-banker"
|
|
320
|
-
},
|
|
321
|
-
{
|
|
322
|
-
"title": "Corcoran",
|
|
323
|
-
"slug": "corcoran"
|
|
324
|
-
},
|
|
325
|
-
{
|
|
326
|
-
"title": "Denali Boss",
|
|
327
|
-
"slug": "denali-boss"
|
|
328
|
-
},
|
|
329
|
-
{
|
|
330
|
-
"title": "ERA",
|
|
331
|
-
"slug": "era"
|
|
332
|
-
},
|
|
333
|
-
{
|
|
334
|
-
"title": "Sotheby's",
|
|
335
|
-
"slug": "sothebys"
|
|
336
|
-
},
|
|
337
|
-
{
|
|
338
|
-
"title": "Example",
|
|
339
|
-
"slug": "example"
|
|
340
|
-
}
|
|
341
|
-
]
|
|
301
|
+
}
|
|
342
302
|
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import './input-number.scss';
|
|
2
|
+
import { SvgAdd } from '@bspk/icons/Add';
|
|
3
|
+
import { SvgRemove } from '@bspk/icons/Remove';
|
|
2
4
|
import { useEffect, useRef } from 'react';
|
|
3
|
-
import { IncrementButton } from './IncrementButton';
|
|
4
5
|
import { useId } from '-/hooks/useId';
|
|
6
|
+
import { useLongPress } from '-/hooks/useLongPress';
|
|
5
7
|
import { CommonProps, FieldControlProps } from '-/types/common';
|
|
6
8
|
|
|
7
9
|
function isNumber(value: unknown): number | undefined;
|
|
@@ -109,14 +111,23 @@ export function InputNumber({
|
|
|
109
111
|
valueRef.current = value;
|
|
110
112
|
}, [value]);
|
|
111
113
|
|
|
112
|
-
const
|
|
113
|
-
const
|
|
114
|
-
|
|
115
|
-
if (next < min || next > max) return false;
|
|
114
|
+
const decrementHandler = () => {
|
|
115
|
+
const next = valueRef.current + step * -1;
|
|
116
|
+
if (next < min) return false;
|
|
116
117
|
onChange(next);
|
|
117
118
|
return true;
|
|
118
119
|
};
|
|
119
120
|
|
|
121
|
+
const incrementHandler = () => {
|
|
122
|
+
const next = valueRef.current + step;
|
|
123
|
+
if (next > max) return false;
|
|
124
|
+
onChange(next);
|
|
125
|
+
return true;
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
const addPressHandlers = useLongPress({ callback: incrementHandler });
|
|
129
|
+
const removePressHandlers = useLongPress({ callback: decrementHandler });
|
|
130
|
+
|
|
120
131
|
return (
|
|
121
132
|
<div
|
|
122
133
|
data-bspk="input-number"
|
|
@@ -158,13 +169,26 @@ export function InputNumber({
|
|
|
158
169
|
value={value !== undefined ? value : ''}
|
|
159
170
|
/>
|
|
160
171
|
<div aria-hidden data-divider />
|
|
161
|
-
<
|
|
172
|
+
<button
|
|
173
|
+
{...removePressHandlers}
|
|
174
|
+
aria-controls={inputId}
|
|
175
|
+
aria-label="Decrease value"
|
|
162
176
|
disabled={removeDisabled}
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
177
|
+
tabIndex={-1}
|
|
178
|
+
type="button"
|
|
179
|
+
>
|
|
180
|
+
<SvgRemove aria-hidden />
|
|
181
|
+
</button>
|
|
182
|
+
<button
|
|
183
|
+
{...addPressHandlers}
|
|
184
|
+
aria-controls={inputId}
|
|
185
|
+
aria-label="Increase value"
|
|
186
|
+
disabled={addDisabled}
|
|
187
|
+
tabIndex={-1}
|
|
188
|
+
type="button"
|
|
189
|
+
>
|
|
190
|
+
<SvgAdd aria-hidden />
|
|
191
|
+
</button>
|
|
168
192
|
</div>
|
|
169
193
|
);
|
|
170
194
|
}
|
|
@@ -162,14 +162,7 @@ export function InputPhone({
|
|
|
162
162
|
|
|
163
163
|
return (
|
|
164
164
|
<>
|
|
165
|
-
<div
|
|
166
|
-
data-bspk="input-phone"
|
|
167
|
-
onKeyDownCapture={handleKeyDown({
|
|
168
|
-
Tab: () => {
|
|
169
|
-
// if (open) closeMenu();
|
|
170
|
-
},
|
|
171
|
-
})}
|
|
172
|
-
>
|
|
165
|
+
<div data-bspk="input-phone">
|
|
173
166
|
<Input
|
|
174
167
|
aria-describedby={ariaDescribedBy}
|
|
175
168
|
aria-errormessage={ariaErrorMessage}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import '@bspk/styles/agent-workplace.css';
|
|
2
|
+
import '-/styles/base.scss';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Utility to provide the Agent Workplace styles to the application.
|
|
6
|
+
*
|
|
7
|
+
* @name StylesProviderAgentWorkplace
|
|
8
|
+
* @phase Utility
|
|
9
|
+
* @generated
|
|
10
|
+
*/
|
|
11
|
+
export function StylesProviderAgentWorkplace(): JSX.Element | null {
|
|
12
|
+
return null;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/** Copyright 2026 Anywhere Real Estate - CC BY 4.0 */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './StylesProviderAgentWorkplace';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import '@bspk/styles/broker-workplace.css';
|
|
2
|
+
import '-/styles/base.scss';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Utility to provide the Broker Workplace styles to the application.
|
|
6
|
+
*
|
|
7
|
+
* @name StylesProviderBrokerWorkplace
|
|
8
|
+
* @phase Utility
|
|
9
|
+
* @generated
|
|
10
|
+
*/
|
|
11
|
+
export function StylesProviderBrokerWorkplace(): JSX.Element | null {
|
|
12
|
+
return null;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/** Copyright 2026 Anywhere Real Estate - CC BY 4.0 */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './StylesProviderBrokerWorkplace';
|