@furystack/shades-common-components 15.0.4 → 15.1.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/CHANGELOG.md +49 -0
- package/esm/components/button-group.d.ts +6 -5
- package/esm/components/button-group.d.ts.map +1 -1
- package/esm/components/button-group.js +5 -1
- package/esm/components/button-group.js.map +1 -1
- package/esm/components/button-group.spec.js +5 -0
- package/esm/components/button-group.spec.js.map +1 -1
- package/esm/components/button.d.ts +3 -2
- package/esm/components/button.d.ts.map +1 -1
- package/esm/components/button.js.map +1 -1
- package/esm/components/chip.d.ts +3 -2
- package/esm/components/chip.d.ts.map +1 -1
- package/esm/components/chip.js +6 -1
- package/esm/components/chip.js.map +1 -1
- package/esm/components/chip.spec.js +16 -0
- package/esm/components/chip.spec.js.map +1 -1
- package/esm/components/component-size.d.ts +6 -0
- package/esm/components/component-size.d.ts.map +1 -0
- package/esm/components/component-size.js +2 -0
- package/esm/components/component-size.js.map +1 -0
- package/esm/components/index.d.ts +2 -0
- package/esm/components/index.d.ts.map +1 -1
- package/esm/components/index.js +2 -0
- package/esm/components/index.js.map +1 -1
- package/esm/components/inputs/checkbox.d.ts +6 -0
- package/esm/components/inputs/checkbox.d.ts.map +1 -1
- package/esm/components/inputs/checkbox.js +47 -0
- package/esm/components/inputs/checkbox.js.map +1 -1
- package/esm/components/inputs/checkbox.spec.js +38 -0
- package/esm/components/inputs/checkbox.spec.js.map +1 -1
- package/esm/components/inputs/input-number.d.ts +6 -0
- package/esm/components/inputs/input-number.d.ts.map +1 -1
- package/esm/components/inputs/input-number.js +26 -0
- package/esm/components/inputs/input-number.js.map +1 -1
- package/esm/components/inputs/input-number.spec.js +38 -0
- package/esm/components/inputs/input-number.spec.js.map +1 -1
- package/esm/components/inputs/input.d.ts +7 -1
- package/esm/components/inputs/input.d.ts.map +1 -1
- package/esm/components/inputs/input.js +24 -1
- package/esm/components/inputs/input.js.map +1 -1
- package/esm/components/inputs/input.spec.js +38 -0
- package/esm/components/inputs/input.spec.js.map +1 -1
- package/esm/components/inputs/radio.d.ts +6 -0
- package/esm/components/inputs/radio.d.ts.map +1 -1
- package/esm/components/inputs/radio.js +37 -0
- package/esm/components/inputs/radio.js.map +1 -1
- package/esm/components/inputs/radio.spec.js +38 -0
- package/esm/components/inputs/radio.spec.js.map +1 -1
- package/esm/components/inputs/select.d.ts +6 -0
- package/esm/components/inputs/select.d.ts.map +1 -1
- package/esm/components/inputs/select.js +24 -0
- package/esm/components/inputs/select.js.map +1 -1
- package/esm/components/inputs/select.spec.js +22 -0
- package/esm/components/inputs/select.spec.js.map +1 -1
- package/esm/components/inputs/switch.d.ts +2 -1
- package/esm/components/inputs/switch.d.ts.map +1 -1
- package/esm/components/inputs/switch.js +14 -1
- package/esm/components/inputs/switch.js.map +1 -1
- package/esm/components/inputs/switch.spec.js +38 -0
- package/esm/components/inputs/switch.spec.js.map +1 -1
- package/esm/components/inputs/text-area.d.ts +6 -0
- package/esm/components/inputs/text-area.d.ts.map +1 -1
- package/esm/components/inputs/text-area.js +17 -0
- package/esm/components/inputs/text-area.js.map +1 -1
- package/esm/components/inputs/text-area.spec.js +38 -0
- package/esm/components/inputs/text-area.spec.js.map +1 -1
- package/esm/components/pagination.d.ts +3 -2
- package/esm/components/pagination.d.ts.map +1 -1
- package/esm/components/pagination.js.map +1 -1
- package/esm/components/rating.d.ts +2 -1
- package/esm/components/rating.d.ts.map +1 -1
- package/esm/components/rating.js.map +1 -1
- package/esm/components/route-breadcrumb.d.ts +46 -0
- package/esm/components/route-breadcrumb.d.ts.map +1 -0
- package/esm/components/route-breadcrumb.js +56 -0
- package/esm/components/route-breadcrumb.js.map +1 -0
- package/esm/components/route-breadcrumb.spec.d.ts +2 -0
- package/esm/components/route-breadcrumb.spec.d.ts.map +1 -0
- package/esm/components/route-breadcrumb.spec.js +186 -0
- package/esm/components/route-breadcrumb.spec.js.map +1 -0
- package/esm/components/timeline.d.ts +4 -0
- package/esm/components/timeline.d.ts.map +1 -1
- package/esm/components/timeline.js +77 -1
- package/esm/components/timeline.js.map +1 -1
- package/esm/components/timeline.spec.js +74 -0
- package/esm/components/timeline.spec.js.map +1 -1
- package/package.json +1 -1
- package/src/components/button-group.spec.tsx +6 -0
- package/src/components/button-group.tsx +10 -4
- package/src/components/button.tsx +2 -1
- package/src/components/chip.spec.tsx +24 -0
- package/src/components/chip.tsx +9 -2
- package/src/components/component-size.ts +5 -0
- package/src/components/index.ts +2 -0
- package/src/components/inputs/checkbox.spec.tsx +42 -0
- package/src/components/inputs/checkbox.tsx +55 -0
- package/src/components/inputs/input-number.spec.tsx +42 -0
- package/src/components/inputs/input-number.tsx +35 -0
- package/src/components/inputs/input.spec.tsx +42 -0
- package/src/components/inputs/input.tsx +34 -2
- package/src/components/inputs/radio.spec.tsx +42 -0
- package/src/components/inputs/radio.tsx +45 -0
- package/src/components/inputs/select.spec.tsx +26 -0
- package/src/components/inputs/select.tsx +32 -0
- package/src/components/inputs/switch.spec.tsx +42 -0
- package/src/components/inputs/switch.tsx +19 -2
- package/src/components/inputs/text-area.spec.tsx +42 -0
- package/src/components/inputs/text-area.tsx +25 -0
- package/src/components/pagination.tsx +2 -1
- package/src/components/rating.tsx +2 -1
- package/src/components/route-breadcrumb.spec.tsx +239 -0
- package/src/components/route-breadcrumb.tsx +83 -0
- package/src/components/timeline.spec.tsx +109 -0
- package/src/components/timeline.tsx +94 -1
|
@@ -139,5 +139,79 @@ describe('Timeline', () => {
|
|
|
139
139
|
const items = timeline.querySelectorAll('shade-timeline-item');
|
|
140
140
|
expect(items.length).toBe(2);
|
|
141
141
|
});
|
|
142
|
+
describe('orientation', () => {
|
|
143
|
+
it('should not set data-orientation when orientation is not specified (defaults to vertical)', async () => {
|
|
144
|
+
const el = (createComponent("div", null,
|
|
145
|
+
createComponent(Timeline, null,
|
|
146
|
+
createComponent(TimelineItem, null, "Event"))));
|
|
147
|
+
const timeline = el.firstElementChild;
|
|
148
|
+
timeline.updateComponent();
|
|
149
|
+
await flushUpdates();
|
|
150
|
+
expect(timeline.hasAttribute('data-orientation')).toBe(false);
|
|
151
|
+
});
|
|
152
|
+
it('should not set data-orientation when orientation is "vertical"', async () => {
|
|
153
|
+
const el = (createComponent("div", null,
|
|
154
|
+
createComponent(Timeline, { orientation: "vertical" },
|
|
155
|
+
createComponent(TimelineItem, null, "Event"))));
|
|
156
|
+
const timeline = el.firstElementChild;
|
|
157
|
+
timeline.updateComponent();
|
|
158
|
+
await flushUpdates();
|
|
159
|
+
expect(timeline.hasAttribute('data-orientation')).toBe(false);
|
|
160
|
+
});
|
|
161
|
+
it('should set data-orientation="horizontal" when orientation is "horizontal"', async () => {
|
|
162
|
+
const el = (createComponent("div", null,
|
|
163
|
+
createComponent(Timeline, { orientation: "horizontal" },
|
|
164
|
+
createComponent(TimelineItem, null, "Event"))));
|
|
165
|
+
const timeline = el.firstElementChild;
|
|
166
|
+
timeline.updateComponent();
|
|
167
|
+
await flushUpdates();
|
|
168
|
+
expect(timeline.getAttribute('data-orientation')).toBe('horizontal');
|
|
169
|
+
});
|
|
170
|
+
it('should render children in horizontal mode', async () => {
|
|
171
|
+
const el = (createComponent("div", null,
|
|
172
|
+
createComponent(Timeline, { orientation: "horizontal" },
|
|
173
|
+
createComponent(TimelineItem, null, "First"),
|
|
174
|
+
createComponent(TimelineItem, null, "Second"),
|
|
175
|
+
createComponent(TimelineItem, null, "Third"))));
|
|
176
|
+
const timeline = el.firstElementChild;
|
|
177
|
+
timeline.updateComponent();
|
|
178
|
+
await flushUpdates();
|
|
179
|
+
const items = timeline.querySelectorAll('shade-timeline-item');
|
|
180
|
+
expect(items.length).toBe(3);
|
|
181
|
+
});
|
|
182
|
+
it('should support horizontal with mode="alternate"', async () => {
|
|
183
|
+
const el = (createComponent("div", null,
|
|
184
|
+
createComponent(Timeline, { orientation: "horizontal", mode: "alternate" },
|
|
185
|
+
createComponent(TimelineItem, null, "First"),
|
|
186
|
+
createComponent(TimelineItem, null, "Second"))));
|
|
187
|
+
const timeline = el.firstElementChild;
|
|
188
|
+
timeline.updateComponent();
|
|
189
|
+
await flushUpdates();
|
|
190
|
+
expect(timeline.getAttribute('data-orientation')).toBe('horizontal');
|
|
191
|
+
expect(timeline.getAttribute('data-mode')).toBe('alternate');
|
|
192
|
+
});
|
|
193
|
+
it('should support horizontal with mode="right"', async () => {
|
|
194
|
+
const el = (createComponent("div", null,
|
|
195
|
+
createComponent(Timeline, { orientation: "horizontal", mode: "right" },
|
|
196
|
+
createComponent(TimelineItem, null, "First"))));
|
|
197
|
+
const timeline = el.firstElementChild;
|
|
198
|
+
timeline.updateComponent();
|
|
199
|
+
await flushUpdates();
|
|
200
|
+
expect(timeline.getAttribute('data-orientation')).toBe('horizontal');
|
|
201
|
+
expect(timeline.getAttribute('data-mode')).toBe('right');
|
|
202
|
+
});
|
|
203
|
+
it('should add pending item in horizontal mode', async () => {
|
|
204
|
+
const el = (createComponent("div", null,
|
|
205
|
+
createComponent(Timeline, { orientation: "horizontal", pending: "Loading..." },
|
|
206
|
+
createComponent(TimelineItem, null, "Step 1"),
|
|
207
|
+
createComponent(TimelineItem, null, "Step 2"))));
|
|
208
|
+
const timeline = el.firstElementChild;
|
|
209
|
+
timeline.updateComponent();
|
|
210
|
+
await flushUpdates();
|
|
211
|
+
const items = timeline.querySelectorAll('shade-timeline-item');
|
|
212
|
+
expect(items.length).toBe(3);
|
|
213
|
+
expect(timeline.getAttribute('data-orientation')).toBe('horizontal');
|
|
214
|
+
});
|
|
215
|
+
});
|
|
142
216
|
});
|
|
143
217
|
//# sourceMappingURL=timeline.spec.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timeline.spec.js","sourceRoot":"","sources":["../../src/components/timeline.spec.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AACjE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAA;AAE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AC,YAAY;oBACrD,gBAAC,YAAY,iBAAsB;oBACnC,gBAAC,YAAY,iBAAsB,CAC1B,CACP,CACP,CAAA;YACD,MAAM,QAAQ,GAAG,EAAE,CAAC,iBAAgC,CAAA;YACpD,QAAQ,CAAC,eAAe,EAAE,CAAA;YAC1B,MAAM,YAAY,EAAE,CAAA;YACpB,MAAM,KAAK,GAAG,QAAQ,CAAC,gBAAgB,CAAC,qBAAqB,CAAC,CAAA;YAC9D,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;YAC5B,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAC,kBAAkB,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAA;QACtE,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -602,6 +602,12 @@ describe('SegmentedControl', () => {
|
|
|
602
602
|
expect(control.getAttribute('data-size')).toBe('small')
|
|
603
603
|
})
|
|
604
604
|
})
|
|
605
|
+
|
|
606
|
+
it('should set data-size="large" for large size', async () => {
|
|
607
|
+
await usingAsync(await renderSegmented({ size: 'large' }), async ({ control }) => {
|
|
608
|
+
expect(control.getAttribute('data-size')).toBe('large')
|
|
609
|
+
})
|
|
610
|
+
})
|
|
605
611
|
})
|
|
606
612
|
|
|
607
613
|
describe('color', () => {
|
|
@@ -3,6 +3,7 @@ import { Shade, createComponent } from '@furystack/shades'
|
|
|
3
3
|
import { buildTransition, cssVariableTheme } from '../services/css-variable-theme.js'
|
|
4
4
|
import { paletteFullColors } from '../services/palette-css-vars.js'
|
|
5
5
|
import type { Palette } from '../services/theme-provider-service.js'
|
|
6
|
+
import type { ComponentSize } from './component-size.js'
|
|
6
7
|
|
|
7
8
|
// ==========================================
|
|
8
9
|
// ButtonGroup
|
|
@@ -86,7 +87,7 @@ export type ToggleButtonProps = PartialElement<HTMLButtonElement> & {
|
|
|
86
87
|
* The size of the toggle button.
|
|
87
88
|
* @default 'medium'
|
|
88
89
|
*/
|
|
89
|
-
size?:
|
|
90
|
+
size?: ComponentSize
|
|
90
91
|
/**
|
|
91
92
|
* Whether the button is in a pressed (selected) state.
|
|
92
93
|
* Use this for standalone toggle buttons or controlled state.
|
|
@@ -202,7 +203,7 @@ export type ToggleButtonGroupProps = PartialElement<HTMLElement> & {
|
|
|
202
203
|
* Individual ToggleButton `size` props are overridden by this value.
|
|
203
204
|
* @default 'medium'
|
|
204
205
|
*/
|
|
205
|
-
size?:
|
|
206
|
+
size?: ComponentSize
|
|
206
207
|
}
|
|
207
208
|
|
|
208
209
|
export const ToggleButtonGroup: (props: ToggleButtonGroupProps, children: ChildrenList) => JSX.Element =
|
|
@@ -364,7 +365,7 @@ export type SegmentedControlProps = PartialElement<HTMLElement> & {
|
|
|
364
365
|
/** Whether the entire control is disabled */
|
|
365
366
|
disabled?: boolean
|
|
366
367
|
/** Size variant */
|
|
367
|
-
size?:
|
|
368
|
+
size?: ComponentSize
|
|
368
369
|
}
|
|
369
370
|
|
|
370
371
|
const defaultSegmentedColors = {
|
|
@@ -425,6 +426,11 @@ export const SegmentedControl = Shade<SegmentedControlProps>({
|
|
|
425
426
|
padding: `${cssVariableTheme.spacing.xs} ${cssVariableTheme.spacing.md}`,
|
|
426
427
|
fontSize: cssVariableTheme.typography.fontSize.sm,
|
|
427
428
|
},
|
|
429
|
+
|
|
430
|
+
'&[data-size="large"] .segmented-option': {
|
|
431
|
+
padding: `${cssVariableTheme.spacing.md} ${cssVariableTheme.spacing.xl}`,
|
|
432
|
+
fontSize: cssVariableTheme.typography.fontSize.lg,
|
|
433
|
+
},
|
|
428
434
|
},
|
|
429
435
|
render: ({ props, useHostProps }) => {
|
|
430
436
|
const { options, value, onValueChange, color, disabled, size, style } = props
|
|
@@ -435,7 +441,7 @@ export const SegmentedControl = Shade<SegmentedControlProps>({
|
|
|
435
441
|
|
|
436
442
|
useHostProps({
|
|
437
443
|
role: 'radiogroup',
|
|
438
|
-
'data-size': size
|
|
444
|
+
'data-size': size && size !== 'medium' ? size : undefined,
|
|
439
445
|
style: {
|
|
440
446
|
'--seg-color-main': colors.main,
|
|
441
447
|
'--seg-color-main-contrast': colors.mainContrast,
|
|
@@ -3,6 +3,7 @@ import { Shade, createComponent } from '@furystack/shades'
|
|
|
3
3
|
import { buildTransition, cssVariableTheme } from '../services/css-variable-theme.js'
|
|
4
4
|
import { paletteFullColors } from '../services/palette-css-vars.js'
|
|
5
5
|
import type { Palette } from '../services/theme-provider-service.js'
|
|
6
|
+
import type { ComponentSize } from './component-size.js'
|
|
6
7
|
|
|
7
8
|
export type ButtonProps = PartialElement<HTMLButtonElement> & {
|
|
8
9
|
/**
|
|
@@ -18,7 +19,7 @@ export type ButtonProps = PartialElement<HTMLButtonElement> & {
|
|
|
18
19
|
* The size of the button.
|
|
19
20
|
* @default 'medium'
|
|
20
21
|
*/
|
|
21
|
-
size?:
|
|
22
|
+
size?: ComponentSize
|
|
22
23
|
/** When true, applies the error palette color regardless of the `color` prop */
|
|
23
24
|
danger?: boolean
|
|
24
25
|
/** When true, shows a loading spinner and disables the button */
|
|
@@ -92,6 +92,30 @@ describe('Chip', () => {
|
|
|
92
92
|
expect(chip.getAttribute('data-size')).toBe('small')
|
|
93
93
|
})
|
|
94
94
|
|
|
95
|
+
it('should set data-size attribute when size is large', async () => {
|
|
96
|
+
const el = (
|
|
97
|
+
<div>
|
|
98
|
+
<Chip size="large">Large</Chip>
|
|
99
|
+
</div>
|
|
100
|
+
)
|
|
101
|
+
const chip = el.firstElementChild as JSX.Element
|
|
102
|
+
chip.updateComponent()
|
|
103
|
+
await flushUpdates()
|
|
104
|
+
expect(chip.getAttribute('data-size')).toBe('large')
|
|
105
|
+
})
|
|
106
|
+
|
|
107
|
+
it('should not set data-size when size is medium (default)', async () => {
|
|
108
|
+
const el = (
|
|
109
|
+
<div>
|
|
110
|
+
<Chip size="medium">Medium</Chip>
|
|
111
|
+
</div>
|
|
112
|
+
)
|
|
113
|
+
const chip = el.firstElementChild as JSX.Element
|
|
114
|
+
chip.updateComponent()
|
|
115
|
+
await flushUpdates()
|
|
116
|
+
expect(chip.getAttribute('data-size')).toBeNull()
|
|
117
|
+
})
|
|
118
|
+
|
|
95
119
|
it('should set data-disabled attribute when disabled', async () => {
|
|
96
120
|
const el = (
|
|
97
121
|
<div>
|
package/src/components/chip.tsx
CHANGED
|
@@ -3,13 +3,14 @@ import { Shade, createComponent } from '@furystack/shades'
|
|
|
3
3
|
import { buildTransition, cssVariableTheme } from '../services/css-variable-theme.js'
|
|
4
4
|
import { paletteFullColors } from '../services/palette-css-vars.js'
|
|
5
5
|
import type { Palette } from '../services/theme-provider-service.js'
|
|
6
|
+
import type { ComponentSize } from './component-size.js'
|
|
6
7
|
import { Icon } from './icons/icon.js'
|
|
7
8
|
import { close } from './icons/icon-definitions.js'
|
|
8
9
|
|
|
9
10
|
export type ChipProps = PartialElement<HTMLElement> & {
|
|
10
11
|
variant?: 'filled' | 'outlined'
|
|
11
12
|
color?: keyof Palette
|
|
12
|
-
size?:
|
|
13
|
+
size?: ComponentSize
|
|
13
14
|
disabled?: boolean
|
|
14
15
|
clickable?: boolean
|
|
15
16
|
onDelete?: (ev: MouseEvent) => void
|
|
@@ -58,6 +59,12 @@ export const Chip = Shade<ChipProps>({
|
|
|
58
59
|
fontSize: cssVariableTheme.typography.fontSize.xs,
|
|
59
60
|
},
|
|
60
61
|
|
|
62
|
+
'&[data-size="large"]': {
|
|
63
|
+
height: '40px',
|
|
64
|
+
padding: `0 ${cssVariableTheme.spacing.lg}`,
|
|
65
|
+
fontSize: cssVariableTheme.typography.fontSize.md,
|
|
66
|
+
},
|
|
67
|
+
|
|
61
68
|
// Disabled state
|
|
62
69
|
'&[data-disabled]': {
|
|
63
70
|
opacity: cssVariableTheme.action.disabledOpacity,
|
|
@@ -155,7 +162,7 @@ export const Chip = Shade<ChipProps>({
|
|
|
155
162
|
const isClickable = clickable || rest.onclick
|
|
156
163
|
useHostProps({
|
|
157
164
|
'data-variant': variant || undefined,
|
|
158
|
-
'data-size': size
|
|
165
|
+
'data-size': size && size !== 'medium' ? size : undefined,
|
|
159
166
|
'data-disabled': disabled ? '' : undefined,
|
|
160
167
|
'data-clickable': isClickable ? '' : undefined,
|
|
161
168
|
tabIndex: isClickable && !disabled ? 0 : undefined,
|
package/src/components/index.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export * from './component-size.js'
|
|
1
2
|
export * from './accordion/index.js'
|
|
2
3
|
export * from './alert.js'
|
|
3
4
|
export * from './animations.js'
|
|
@@ -39,6 +40,7 @@ export * from './pagination.js'
|
|
|
39
40
|
export * from './paper.js'
|
|
40
41
|
export * from './rating.js'
|
|
41
42
|
export * from './result.js'
|
|
43
|
+
export * from './route-breadcrumb.js'
|
|
42
44
|
export * from './skeleton.js'
|
|
43
45
|
export * from './styles.js'
|
|
44
46
|
export * from './suggest/index.js'
|
|
@@ -374,4 +374,46 @@ describe('Checkbox', () => {
|
|
|
374
374
|
})
|
|
375
375
|
})
|
|
376
376
|
})
|
|
377
|
+
|
|
378
|
+
describe('size', () => {
|
|
379
|
+
it('should not set data-size when size is not specified', async () => {
|
|
380
|
+
await usingAsync(new Injector(), async (injector) => {
|
|
381
|
+
const rootElement = document.getElementById('root') as HTMLDivElement
|
|
382
|
+
initializeShadeRoot({ injector, rootElement, jsxElement: <Checkbox /> })
|
|
383
|
+
await flushUpdates()
|
|
384
|
+
const el = document.querySelector('shade-checkbox') as HTMLElement
|
|
385
|
+
expect(el.getAttribute('data-size')).toBeNull()
|
|
386
|
+
})
|
|
387
|
+
})
|
|
388
|
+
|
|
389
|
+
it('should not set data-size for medium size (default)', async () => {
|
|
390
|
+
await usingAsync(new Injector(), async (injector) => {
|
|
391
|
+
const rootElement = document.getElementById('root') as HTMLDivElement
|
|
392
|
+
initializeShadeRoot({ injector, rootElement, jsxElement: <Checkbox size="medium" /> })
|
|
393
|
+
await flushUpdates()
|
|
394
|
+
const el = document.querySelector('shade-checkbox') as HTMLElement
|
|
395
|
+
expect(el.getAttribute('data-size')).toBeNull()
|
|
396
|
+
})
|
|
397
|
+
})
|
|
398
|
+
|
|
399
|
+
it('should set data-size="small" for small size', async () => {
|
|
400
|
+
await usingAsync(new Injector(), async (injector) => {
|
|
401
|
+
const rootElement = document.getElementById('root') as HTMLDivElement
|
|
402
|
+
initializeShadeRoot({ injector, rootElement, jsxElement: <Checkbox size="small" /> })
|
|
403
|
+
await flushUpdates()
|
|
404
|
+
const el = document.querySelector('shade-checkbox') as HTMLElement
|
|
405
|
+
expect(el.getAttribute('data-size')).toBe('small')
|
|
406
|
+
})
|
|
407
|
+
})
|
|
408
|
+
|
|
409
|
+
it('should set data-size="large" for large size', async () => {
|
|
410
|
+
await usingAsync(new Injector(), async (injector) => {
|
|
411
|
+
const rootElement = document.getElementById('root') as HTMLDivElement
|
|
412
|
+
initializeShadeRoot({ injector, rootElement, jsxElement: <Checkbox size="large" /> })
|
|
413
|
+
await flushUpdates()
|
|
414
|
+
const el = document.querySelector('shade-checkbox') as HTMLElement
|
|
415
|
+
expect(el.getAttribute('data-size')).toBe('large')
|
|
416
|
+
})
|
|
417
|
+
})
|
|
418
|
+
})
|
|
377
419
|
})
|
|
@@ -3,6 +3,7 @@ import { Shade, createComponent } from '@furystack/shades'
|
|
|
3
3
|
import { cssVariableTheme } from '../../services/css-variable-theme.js'
|
|
4
4
|
import type { Palette } from '../../services/theme-provider-service.js'
|
|
5
5
|
import { ThemeProviderService } from '../../services/theme-provider-service.js'
|
|
6
|
+
import type { ComponentSize } from '../component-size.js'
|
|
6
7
|
import { FormService } from '../form.js'
|
|
7
8
|
|
|
8
9
|
export type CheckboxProps = {
|
|
@@ -42,6 +43,11 @@ export type CheckboxProps = {
|
|
|
42
43
|
* Whether the checkbox is required
|
|
43
44
|
*/
|
|
44
45
|
required?: boolean
|
|
46
|
+
/**
|
|
47
|
+
* The size of the checkbox.
|
|
48
|
+
* @default 'medium'
|
|
49
|
+
*/
|
|
50
|
+
size?: ComponentSize
|
|
45
51
|
/**
|
|
46
52
|
* Optional props for the label element
|
|
47
53
|
*/
|
|
@@ -144,6 +150,54 @@ export const Checkbox = Shade<CheckboxProps>({
|
|
|
144
150
|
opacity: cssVariableTheme.action.disabledOpacity,
|
|
145
151
|
cursor: 'not-allowed',
|
|
146
152
|
},
|
|
153
|
+
|
|
154
|
+
// Size: small
|
|
155
|
+
'&[data-size="small"] label': {
|
|
156
|
+
fontSize: cssVariableTheme.typography.fontSize.xs,
|
|
157
|
+
},
|
|
158
|
+
'&[data-size="small"] .checkbox-control': {
|
|
159
|
+
width: '16px',
|
|
160
|
+
height: '16px',
|
|
161
|
+
},
|
|
162
|
+
'&[data-size="small"] input[type="checkbox"]': {
|
|
163
|
+
width: '16px',
|
|
164
|
+
height: '16px',
|
|
165
|
+
},
|
|
166
|
+
'&[data-size="small"] input[type="checkbox"]:checked::after': {
|
|
167
|
+
left: '4px',
|
|
168
|
+
top: '1px',
|
|
169
|
+
width: '4px',
|
|
170
|
+
height: '8px',
|
|
171
|
+
},
|
|
172
|
+
'&[data-size="small"][data-indeterminate] input[type="checkbox"]::after': {
|
|
173
|
+
left: '3px',
|
|
174
|
+
top: '6px',
|
|
175
|
+
width: '8px',
|
|
176
|
+
},
|
|
177
|
+
|
|
178
|
+
// Size: large
|
|
179
|
+
'&[data-size="large"] label': {
|
|
180
|
+
fontSize: cssVariableTheme.typography.fontSize.md,
|
|
181
|
+
},
|
|
182
|
+
'&[data-size="large"] .checkbox-control': {
|
|
183
|
+
width: '24px',
|
|
184
|
+
height: '24px',
|
|
185
|
+
},
|
|
186
|
+
'&[data-size="large"] input[type="checkbox"]': {
|
|
187
|
+
width: '24px',
|
|
188
|
+
height: '24px',
|
|
189
|
+
},
|
|
190
|
+
'&[data-size="large"] input[type="checkbox"]:checked::after': {
|
|
191
|
+
left: '8px',
|
|
192
|
+
top: '3px',
|
|
193
|
+
width: '6px',
|
|
194
|
+
height: '12px',
|
|
195
|
+
},
|
|
196
|
+
'&[data-size="large"][data-indeterminate] input[type="checkbox"]::after': {
|
|
197
|
+
left: '5px',
|
|
198
|
+
top: '10px',
|
|
199
|
+
width: '12px',
|
|
200
|
+
},
|
|
147
201
|
},
|
|
148
202
|
render: ({ props, injector, useDisposable, useHostProps, useRef }) => {
|
|
149
203
|
const inputRef = useRef<HTMLInputElement>('formInput')
|
|
@@ -166,6 +220,7 @@ export const Checkbox = Shade<CheckboxProps>({
|
|
|
166
220
|
|
|
167
221
|
const color = themeProvider.theme.palette[props.color || 'primary'].main
|
|
168
222
|
useHostProps({
|
|
223
|
+
'data-size': props.size && props.size !== 'medium' ? props.size : undefined,
|
|
169
224
|
'data-disabled': props.disabled ? '' : undefined,
|
|
170
225
|
'data-indeterminate': props.indeterminate ? '' : undefined,
|
|
171
226
|
style: { '--checkbox-color': color },
|
|
@@ -683,4 +683,46 @@ describe('InputNumber', () => {
|
|
|
683
683
|
})
|
|
684
684
|
})
|
|
685
685
|
})
|
|
686
|
+
|
|
687
|
+
describe('size', () => {
|
|
688
|
+
it('should not set data-size when size is not specified', async () => {
|
|
689
|
+
await usingAsync(new Injector(), async (injector) => {
|
|
690
|
+
const rootElement = document.getElementById('root') as HTMLDivElement
|
|
691
|
+
initializeShadeRoot({ injector, rootElement, jsxElement: <InputNumber /> })
|
|
692
|
+
await flushUpdates()
|
|
693
|
+
const el = document.querySelector('shade-input-number') as HTMLElement
|
|
694
|
+
expect(el.getAttribute('data-size')).toBeNull()
|
|
695
|
+
})
|
|
696
|
+
})
|
|
697
|
+
|
|
698
|
+
it('should not set data-size for medium size (default)', async () => {
|
|
699
|
+
await usingAsync(new Injector(), async (injector) => {
|
|
700
|
+
const rootElement = document.getElementById('root') as HTMLDivElement
|
|
701
|
+
initializeShadeRoot({ injector, rootElement, jsxElement: <InputNumber size="medium" /> })
|
|
702
|
+
await flushUpdates()
|
|
703
|
+
const el = document.querySelector('shade-input-number') as HTMLElement
|
|
704
|
+
expect(el.getAttribute('data-size')).toBeNull()
|
|
705
|
+
})
|
|
706
|
+
})
|
|
707
|
+
|
|
708
|
+
it('should set data-size="small" for small size', async () => {
|
|
709
|
+
await usingAsync(new Injector(), async (injector) => {
|
|
710
|
+
const rootElement = document.getElementById('root') as HTMLDivElement
|
|
711
|
+
initializeShadeRoot({ injector, rootElement, jsxElement: <InputNumber size="small" /> })
|
|
712
|
+
await flushUpdates()
|
|
713
|
+
const el = document.querySelector('shade-input-number') as HTMLElement
|
|
714
|
+
expect(el.getAttribute('data-size')).toBe('small')
|
|
715
|
+
})
|
|
716
|
+
})
|
|
717
|
+
|
|
718
|
+
it('should set data-size="large" for large size', async () => {
|
|
719
|
+
await usingAsync(new Injector(), async (injector) => {
|
|
720
|
+
const rootElement = document.getElementById('root') as HTMLDivElement
|
|
721
|
+
initializeShadeRoot({ injector, rootElement, jsxElement: <InputNumber size="large" /> })
|
|
722
|
+
await flushUpdates()
|
|
723
|
+
const el = document.querySelector('shade-input-number') as HTMLElement
|
|
724
|
+
expect(el.getAttribute('data-size')).toBe('large')
|
|
725
|
+
})
|
|
726
|
+
})
|
|
727
|
+
})
|
|
686
728
|
})
|
|
@@ -3,6 +3,7 @@ import { Shade, createComponent } from '@furystack/shades'
|
|
|
3
3
|
import { buildTransition, cssVariableTheme } from '../../services/css-variable-theme.js'
|
|
4
4
|
import type { Palette } from '../../services/theme-provider-service.js'
|
|
5
5
|
import { ThemeProviderService } from '../../services/theme-provider-service.js'
|
|
6
|
+
import type { ComponentSize } from '../component-size.js'
|
|
6
7
|
import { FormService } from '../form.js'
|
|
7
8
|
|
|
8
9
|
export type InputNumberProps = {
|
|
@@ -82,6 +83,12 @@ export type InputNumberProps = {
|
|
|
82
83
|
*/
|
|
83
84
|
name?: string
|
|
84
85
|
|
|
86
|
+
/**
|
|
87
|
+
* The size of the input.
|
|
88
|
+
* @default 'medium'
|
|
89
|
+
*/
|
|
90
|
+
size?: ComponentSize
|
|
91
|
+
|
|
85
92
|
/**
|
|
86
93
|
* Helper text displayed below the input
|
|
87
94
|
*/
|
|
@@ -251,6 +258,33 @@ export const InputNumber = Shade<InputNumberProps>({
|
|
|
251
258
|
opacity: '0.85',
|
|
252
259
|
lineHeight: '1.4',
|
|
253
260
|
},
|
|
261
|
+
|
|
262
|
+
// Size: small
|
|
263
|
+
'&[data-size="small"] label': {
|
|
264
|
+
padding: `${cssVariableTheme.spacing.xs} ${cssVariableTheme.spacing.sm}`,
|
|
265
|
+
},
|
|
266
|
+
'&[data-size="small"] input': {
|
|
267
|
+
fontSize: cssVariableTheme.typography.fontSize.xs,
|
|
268
|
+
},
|
|
269
|
+
'&[data-size="small"] .step-button': {
|
|
270
|
+
width: '22px',
|
|
271
|
+
height: '22px',
|
|
272
|
+
fontSize: cssVariableTheme.typography.fontSize.sm,
|
|
273
|
+
},
|
|
274
|
+
|
|
275
|
+
// Size: large
|
|
276
|
+
'&[data-size="large"] label': {
|
|
277
|
+
padding: `${cssVariableTheme.spacing.md} ${cssVariableTheme.spacing.lg}`,
|
|
278
|
+
fontSize: cssVariableTheme.typography.fontSize.sm,
|
|
279
|
+
},
|
|
280
|
+
'&[data-size="large"] input': {
|
|
281
|
+
fontSize: cssVariableTheme.typography.fontSize.md,
|
|
282
|
+
},
|
|
283
|
+
'&[data-size="large"] .step-button': {
|
|
284
|
+
width: '34px',
|
|
285
|
+
height: '34px',
|
|
286
|
+
fontSize: cssVariableTheme.typography.fontSize.lg,
|
|
287
|
+
},
|
|
254
288
|
},
|
|
255
289
|
render: ({ props, injector, useState, useDisposable, useHostProps, useRef }) => {
|
|
256
290
|
const inputRef = useRef<HTMLInputElement>('formInput')
|
|
@@ -274,6 +308,7 @@ export const InputNumber = Shade<InputNumberProps>({
|
|
|
274
308
|
const primaryColor = themeProvider.theme.palette[props.color || 'primary'].main
|
|
275
309
|
useHostProps({
|
|
276
310
|
'data-variant': props.variant || undefined,
|
|
311
|
+
'data-size': props.size && props.size !== 'medium' ? props.size : undefined,
|
|
277
312
|
'data-disabled': props.disabled ? '' : undefined,
|
|
278
313
|
style: { '--input-number-color': primaryColor },
|
|
279
314
|
})
|
|
@@ -841,4 +841,46 @@ describe('Input', () => {
|
|
|
841
841
|
})
|
|
842
842
|
})
|
|
843
843
|
})
|
|
844
|
+
|
|
845
|
+
describe('size', () => {
|
|
846
|
+
it('should not set data-size when size is not specified', async () => {
|
|
847
|
+
await usingAsync(new Injector(), async (injector) => {
|
|
848
|
+
const rootElement = document.getElementById('root') as HTMLDivElement
|
|
849
|
+
initializeShadeRoot({ injector, rootElement, jsxElement: <Input /> })
|
|
850
|
+
await flushUpdates()
|
|
851
|
+
const input = document.querySelector('shade-input') as HTMLElement
|
|
852
|
+
expect(input.getAttribute('data-size')).toBeNull()
|
|
853
|
+
})
|
|
854
|
+
})
|
|
855
|
+
|
|
856
|
+
it('should not set data-size for medium size (default)', async () => {
|
|
857
|
+
await usingAsync(new Injector(), async (injector) => {
|
|
858
|
+
const rootElement = document.getElementById('root') as HTMLDivElement
|
|
859
|
+
initializeShadeRoot({ injector, rootElement, jsxElement: <Input size="medium" /> })
|
|
860
|
+
await flushUpdates()
|
|
861
|
+
const input = document.querySelector('shade-input') as HTMLElement
|
|
862
|
+
expect(input.getAttribute('data-size')).toBeNull()
|
|
863
|
+
})
|
|
864
|
+
})
|
|
865
|
+
|
|
866
|
+
it('should set data-size="small" for small size', async () => {
|
|
867
|
+
await usingAsync(new Injector(), async (injector) => {
|
|
868
|
+
const rootElement = document.getElementById('root') as HTMLDivElement
|
|
869
|
+
initializeShadeRoot({ injector, rootElement, jsxElement: <Input size="small" /> })
|
|
870
|
+
await flushUpdates()
|
|
871
|
+
const input = document.querySelector('shade-input') as HTMLElement
|
|
872
|
+
expect(input.getAttribute('data-size')).toBe('small')
|
|
873
|
+
})
|
|
874
|
+
})
|
|
875
|
+
|
|
876
|
+
it('should set data-size="large" for large size', async () => {
|
|
877
|
+
await usingAsync(new Injector(), async (injector) => {
|
|
878
|
+
const rootElement = document.getElementById('root') as HTMLDivElement
|
|
879
|
+
initializeShadeRoot({ injector, rootElement, jsxElement: <Input size="large" /> })
|
|
880
|
+
await flushUpdates()
|
|
881
|
+
const input = document.querySelector('shade-input') as HTMLElement
|
|
882
|
+
expect(input.getAttribute('data-size')).toBe('large')
|
|
883
|
+
})
|
|
884
|
+
})
|
|
885
|
+
})
|
|
844
886
|
})
|