Skip to content

Commit

Permalink
Merge pull request #826 from opengovsg/v1.27.0
Browse files Browse the repository at this point in the history
build: release v1.27.0
  • Loading branch information
karrui authored Dec 17, 2024
2 parents c9abd56 + b6ca740 commit 1e971bf
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 16 additions & 1 deletion packages/camp/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,15 @@ All notable changes to this project will be documented in this file. Dates are d

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### [v1.26.0](https://github.com/opengovsg/design-system/compare/v1.24.0...v1.26.0)
#### [v1.27.0](https://github.com/opengovsg/design-system/compare/v1.26.0...v1.27.0)

- chore: merge v1.27.0 back to main [`#824`](https://github.com/opengovsg/design-system/pull/824)
- Chore/add field styles for number input [`#823`](https://github.com/opengovsg/design-system/pull/823)
- build: release v1.26.0 [`#818`](https://github.com/opengovsg/design-system/pull/818)

#### [v1.26.0](https://github.com/opengovsg/design-system/compare/v1.25.0...v1.26.0)

> 12 December 2024
- fix(MultiSelectProvider.tsx): double addition on mobile [`#817`](https://github.com/opengovsg/design-system/pull/817)
- fix(deps): bump @chakra-ui/utils from 2.0.15 to 2.2.2 [`#800`](https://github.com/opengovsg/design-system/pull/800)
Expand All @@ -24,13 +32,20 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- chore: merge release v1.25.0 back to main [`#773`](https://github.com/opengovsg/design-system/pull/773)
- feat: update design tokens (postman colors) [`#778`](https://github.com/opengovsg/design-system/pull/778)
- build: release v1.25.0 [`#772`](https://github.com/opengovsg/design-system/pull/772)
- build: release v1.26.0 [`c4ca7ab`](https://github.com/opengovsg/design-system/commit/c4ca7abfe303b87fdd9be2bec7505c83f559a2d2)

#### [v1.25.0](https://github.com/opengovsg/design-system/compare/v1.24.0...v1.25.0)

> 10 October 2024
- feat: use @chakra-ui/react imports over specialised imports [`#770`](https://github.com/opengovsg/design-system/pull/770)
- feat: add script to copy generated themes to storybook theme folder [`#769`](https://github.com/opengovsg/design-system/pull/769)
- feat: add Armoury theme [`#768`](https://github.com/opengovsg/design-system/pull/768)
- chore: merge release v1.24.0 back to main [`#756`](https://github.com/opengovsg/design-system/pull/756)
- fix(deps): bump rollup from 3.29.4 to 3.29.5 in /react [`#764`](https://github.com/opengovsg/design-system/pull/764)
- chore(deps-dev): bump vite from 4.5.3 to 4.5.5 in /react [`#759`](https://github.com/opengovsg/design-system/pull/759)
- build: release v1.24.0 [`#755`](https://github.com/opengovsg/design-system/pull/755)
- build: release v1.25.0 [`6161c9d`](https://github.com/opengovsg/design-system/commit/6161c9d4bf3f850f2b4032fb8dbb4eecf88aad9f)

#### [v1.24.0](https://github.com/opengovsg/design-system/compare/v1.23.0...v1.24.0)

Expand Down
2 changes: 1 addition & 1 deletion packages/camp/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@opengovsg/design-system-react",
"version": "1.26.0",
"version": "1.27.0",
"description": "React components",
"homepage": "https://github.com/opengovsg/design-system/react#readme",
"bugs": "https://github.com/opengovsg/design-system/issues",
Expand Down
6 changes: 6 additions & 0 deletions packages/camp/src/NumberInput/NumberInput.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,9 @@ export const FormInput: StoryFn<NumberInputProps> = (args) => {
</FormControl>
)
}

export const InputStyles = Template.bind({})
InputStyles.args = {
placeholder: 'Pass in input styles',
inputStyles: { bgColor: 'gray.100' },
}
9 changes: 8 additions & 1 deletion packages/camp/src/NumberInput/NumberInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import { useRef } from 'react'
import {
Box,
chakra,
ComponentWithAs as _,
Divider,
forwardRef,
NumberInputProps as ChakraNumberInputProps,
SystemStyleObject,
useFormControlProps,
useMergeRefs,
useMultiStyleConfig,
Expand All @@ -29,6 +29,11 @@ export interface NumberInputProps extends ChakraNumberInputProps {
* Whether to show the increment and decrement steppers. Defaults to true.
*/
showSteppers?: boolean

/**
* Merge styles for inner input field
*/
inputStyles?: SystemStyleObject
}

export const NumberInput = forwardRef<NumberInputProps, 'input'>(
Expand All @@ -38,6 +43,7 @@ export const NumberInput = forwardRef<NumberInputProps, 'input'>(
clampValueOnBlur = false,
isSuccess,
isPrefilled,
inputStyles,
...props
},
ref,
Expand Down Expand Up @@ -90,6 +96,7 @@ export const NumberInput = forwardRef<NumberInputProps, 'input'>(
// is this input.
ref={inputRef}
__css={styles.field}
sx={inputStyles}
/>
{showSteppers && (
<Box __css={styles.stepperWrapper} ref={stepperWrapperRef}>
Expand Down

0 comments on commit 1e971bf

Please sign in to comment.