diff --git a/.changeset/config.json b/.changeset/config.json index 8493781..f51ec56 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -2,7 +2,7 @@ "$schema": "https://unpkg.com/@changesets/config@2.0.0/schema.json", "changelog": [ "@cultureamp/changelog-github", - { "repo": "cultureamp/kaizen-design-system" } + { "repo": "cultureamp/kaizen-legacy" } ], "access": "public", "baseBranch": "main", diff --git a/.changeset/flat-moles-think.md b/.changeset/flat-moles-think.md deleted file mode 100644 index a845151..0000000 --- a/.changeset/flat-moles-think.md +++ /dev/null @@ -1,2 +0,0 @@ ---- ---- diff --git a/.eslintignore b/.eslintignore index 2c3cc1f..e994683 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1 +1,9 @@ -/packages/**/dist \ No newline at end of file +/packages/**/dist +/draft-packages/**/*.js +/draft-packages/**/*.js.map +/draft-packages/**/*.d.ts +/packages/**/*.js +!/packages/**/*.config.js +!/packages/**/svgMock.js +/packages/**/*.js.map +/packages/**/*.d.ts diff --git a/.github/workflows/changeset.yaml b/.github/workflows/changeset.yaml index 71e9da2..5f18b38 100644 --- a/.github/workflows/changeset.yaml +++ b/.github/workflows/changeset.yaml @@ -9,7 +9,8 @@ jobs: version: runs-on: ubuntu-latest outputs: - published: ${{ steps.changesets.outputs.published }} + hasChangesets: ${{ steps.changesets.outputs.hasChangesets }} + hasPublished: ${{ steps.changesets.outputs.published }} env: GITHUB_TOKEN: ${{ github.token }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} @@ -17,39 +18,28 @@ jobs: - uses: actions/checkout@v3 - uses: ./.github/actions/setup - name: Create Release Pull Request or Publish to npm - id: changesets run: | npm config set "//registry.npmjs.org/:_authToken" "$NPM_TOKEN" - uses: changesets/action@v1 + id: changesets with: title: "Changeset: Version packages" commit: "version packages" version: yarn ci:version publish: yarn ci:publish - - name: Push git tags - if: steps.changesets.outputs.published == 'true' - run: git push --follow-tags - slack-notify: + notify-slack: runs-on: ubuntu-latest - needs: version + needs: + version + # We only trigger this flow if the publish is happening, inferred by not having a changeset. + if: needs.version.outputs.hasChangesets == 'false' + env: + PUBLISHED: ${{ needs.version.outputs.hasPublished }} steps: - - name: Notify Slack (success) - if: needs.version.outputs.published == 'true' - # https://github.com/marketplace/actions/post-to-slack - uses: pcolby/post-to-slack@v1 - with: - url: ${{ secrets.SLACK_WEBHOOK_URL }} - channel: "#wol_kaizen" - username: "Release" - text: Complete - iconEmoji: ":squid:" - - name: Notify Slack (failure) - if: needs.version.outputs.published == 'false' - # https://github.com/marketplace/actions/post-to-slack - uses: pcolby/post-to-slack@v1 + - name: Send + uses: slackapi/slack-github-action@v1.24.0 with: - url: ${{ secrets.SLACK_WEBHOOK_URL }} - channel: "#wol_kaizen" - username: "Release" - text: Something went wrong - iconEmoji: ":squid:" + channel-id: "C02NUQ27G56" + slack-message: ${{ env.PUBLISHED == 'true' && 'Legacy packages have been published' || 'Legacy Publishing failed' }} + env: + SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} diff --git a/docs/package-structure.md b/docs/package-structure.md index bedf603..b064748 100644 --- a/docs/package-structure.md +++ b/docs/package-structure.md @@ -71,11 +71,11 @@ The base package.json will look like this, where: }, "repository": { "type": "git", - "url": "git+https://github.com/cultureamp/kaizen-design-system.git", + "url": "git+https://github.com/cultureamp/kaizen-legacy.git", "directory": "packages/{{ PACKAGE_NAME }}" }, "bugs": { - "url": "https://github.com/cultureamp/kaizen-design-system/issues" + "url": "https://github.com/cultureamp/kaizen-legacy/issues" }, "files": [ "**/*", diff --git a/draft-packages/avatar/package.json b/draft-packages/avatar/package.json index 60af964..fde4f4f 100644 --- a/draft-packages/avatar/package.json +++ b/draft-packages/avatar/package.json @@ -9,11 +9,11 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/cultureamp/kaizen-design-system.git", + "url": "git+https://github.com/cultureamp/kaizen-legacy.git", "directory": "draft-packages/avatar" }, "bugs": { - "url": "https://github.com/cultureamp/kaizen-design-system/issues" + "url": "https://github.com/cultureamp/kaizen-legacy/issues" }, "files": [ "**/*.js", diff --git a/draft-packages/badge/package.json b/draft-packages/badge/package.json index 7030192..c98fc31 100644 --- a/draft-packages/badge/package.json +++ b/draft-packages/badge/package.json @@ -9,11 +9,11 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/cultureamp/kaizen-design-system.git", + "url": "git+https://github.com/cultureamp/kaizen-legacy.git", "directory": "draft-packages/badge" }, "bugs": { - "url": "https://github.com/cultureamp/kaizen-design-system/issues" + "url": "https://github.com/cultureamp/kaizen-legacy/issues" }, "files": [ "**/*.js", diff --git a/draft-packages/card/package.json b/draft-packages/card/package.json index 9290269..0ccc154 100644 --- a/draft-packages/card/package.json +++ b/draft-packages/card/package.json @@ -9,11 +9,11 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/cultureamp/kaizen-design-system.git", + "url": "git+https://github.com/cultureamp/kaizen-legacy.git", "directory": "draft-packages/card" }, "bugs": { - "url": "https://github.com/cultureamp/kaizen-design-system/issues" + "url": "https://github.com/cultureamp/kaizen-legacy/issues" }, "files": [ "**/*.js", diff --git a/draft-packages/collapsible/package.json b/draft-packages/collapsible/package.json index 3e3dad3..28a2478 100644 --- a/draft-packages/collapsible/package.json +++ b/draft-packages/collapsible/package.json @@ -9,11 +9,11 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/cultureamp/kaizen-design-system.git", + "url": "git+https://github.com/cultureamp/kaizen-legacy.git", "directory": "draft-packages/collapsible" }, "bugs": { - "url": "https://github.com/cultureamp/kaizen-design-system/issues" + "url": "https://github.com/cultureamp/kaizen-legacy/issues" }, "files": [ "**/*.js", diff --git a/draft-packages/divider/package.json b/draft-packages/divider/package.json index 789fd87..59f7159 100644 --- a/draft-packages/divider/package.json +++ b/draft-packages/divider/package.json @@ -9,11 +9,11 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/cultureamp/kaizen-design-system.git", + "url": "git+https://github.com/cultureamp/kaizen-legacy.git", "directory": "draft-packages/divider" }, "bugs": { - "url": "https://github.com/cultureamp/kaizen-design-system/issues" + "url": "https://github.com/cultureamp/kaizen-legacy/issues" }, "files": [ "**/*.js", diff --git a/draft-packages/empty-state/package.json b/draft-packages/empty-state/package.json index 346f05c..f58665d 100644 --- a/draft-packages/empty-state/package.json +++ b/draft-packages/empty-state/package.json @@ -9,11 +9,11 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/cultureamp/kaizen-design-system.git", + "url": "git+https://github.com/cultureamp/kaizen-legacy.git", "directory": "draft-packages/empty-state" }, "bugs": { - "url": "https://github.com/cultureamp/kaizen-design-system/issues" + "url": "https://github.com/cultureamp/kaizen-legacy/issues" }, "files": [ "**/*.js", diff --git a/draft-packages/filter-menu-button/package.json b/draft-packages/filter-menu-button/package.json index b235d32..e3ab242 100644 --- a/draft-packages/filter-menu-button/package.json +++ b/draft-packages/filter-menu-button/package.json @@ -9,11 +9,11 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/cultureamp/kaizen-design-system.git", + "url": "git+https://github.com/cultureamp/kaizen-legacy.git", "directory": "draft-packages/filter-menu-button" }, "bugs": { - "url": "https://github.com/cultureamp/kaizen-design-system/issues" + "url": "https://github.com/cultureamp/kaizen-legacy/issues" }, "files": [ "**/*.js", diff --git a/draft-packages/form/CHANGELOG.md b/draft-packages/form/CHANGELOG.md index e990365..03df7c4 100644 --- a/draft-packages/form/CHANGELOG.md +++ b/draft-packages/form/CHANGELOG.md @@ -1,5 +1,11 @@ # Change Log +## 10.5.0 + +### Minor Changes + +- [#16](https://github.com/cultureamp/kaizen-legacy/pull/16) [`a8c5121`](https://github.com/cultureamp/kaizen-legacy/commit/a8c5121f200cfba7281e1b2e1298647771cd8e71) - add margin top to input and button to match labels from other components + ## 10.4.9 ### Patch Changes diff --git a/draft-packages/form/KaizenDraft/Form/TextField/TextField.module.scss b/draft-packages/form/KaizenDraft/Form/TextField/TextField.module.scss index e28ce9b..cd705f8 100644 --- a/draft-packages/form/KaizenDraft/Form/TextField/TextField.module.scss +++ b/draft-packages/form/KaizenDraft/Form/TextField/TextField.module.scss @@ -14,6 +14,10 @@ } } +.input { + margin-top: $spacing-6; +} + $input-disabled-opacity: 0.3; /////////////////////////////////////////////////// diff --git a/draft-packages/form/KaizenDraft/Form/TextField/TextField.tsx b/draft-packages/form/KaizenDraft/Form/TextField/TextField.tsx index 5392c83..ff04276 100644 --- a/draft-packages/form/KaizenDraft/Form/TextField/TextField.tsx +++ b/draft-packages/form/KaizenDraft/Form/TextField/TextField.tsx @@ -85,6 +85,7 @@ export const TextField = ({ id={`${id}-field-input`} automationId={`${id}-field-input`} ariaDescribedBy={ariaDescribedBy} + classNameOverride={styles.input} disabled={disabled} reversed={reversed} status={status} diff --git a/draft-packages/form/package.json b/draft-packages/form/package.json index d2a38d3..c39fa64 100644 --- a/draft-packages/form/package.json +++ b/draft-packages/form/package.json @@ -1,6 +1,6 @@ { "name": "@kaizen/draft-form", - "version": "10.4.9", + "version": "10.5.0", "description": "The draft Form component", "scripts": { "prepublishOnly": "tsc --project tsconfig.dist.json", @@ -9,11 +9,11 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/cultureamp/kaizen-design-system.git", + "url": "git+https://github.com/cultureamp/kaizen-legacy.git", "directory": "draft-packages/form" }, "bugs": { - "url": "https://github.com/cultureamp/kaizen-design-system/issues" + "url": "https://github.com/cultureamp/kaizen-legacy/issues" }, "files": [ "**/*.js", diff --git a/draft-packages/guidance-block/package.json b/draft-packages/guidance-block/package.json index 31c0be0..068815d 100644 --- a/draft-packages/guidance-block/package.json +++ b/draft-packages/guidance-block/package.json @@ -9,11 +9,11 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/cultureamp/kaizen-design-system.git", + "url": "git+https://github.com/cultureamp/kaizen-legacy.git", "directory": "draft-packages/guidance-block" }, "bugs": { - "url": "https://github.com/cultureamp/kaizen-design-system/issues" + "url": "https://github.com/cultureamp/kaizen-legacy/issues" }, "files": [ "**/*.js", diff --git a/draft-packages/hero-card/package.json b/draft-packages/hero-card/package.json index 83983ef..ff212fe 100644 --- a/draft-packages/hero-card/package.json +++ b/draft-packages/hero-card/package.json @@ -9,11 +9,11 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/cultureamp/kaizen-design-system.git", + "url": "git+https://github.com/cultureamp/kaizen-legacy.git", "directory": "draft-packages/hero-card" }, "bugs": { - "url": "https://github.com/cultureamp/kaizen-design-system/issues" + "url": "https://github.com/cultureamp/kaizen-legacy/issues" }, "files": [ "**/*.js", diff --git a/draft-packages/illustration/package.json b/draft-packages/illustration/package.json index c476fdd..08e9384 100644 --- a/draft-packages/illustration/package.json +++ b/draft-packages/illustration/package.json @@ -9,11 +9,11 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/cultureamp/kaizen-design-system.git", + "url": "git+https://github.com/cultureamp/kaizen-legacy.git", "directory": "draft-packages/illustration" }, "bugs": { - "url": "https://github.com/cultureamp/kaizen-design-system/issues" + "url": "https://github.com/cultureamp/kaizen-legacy/issues" }, "files": [ "**/*.js", diff --git a/draft-packages/likert-scale-legacy/CHANGELOG.md b/draft-packages/likert-scale-legacy/CHANGELOG.md index 16e25ec..fa9a7c8 100644 --- a/draft-packages/likert-scale-legacy/CHANGELOG.md +++ b/draft-packages/likert-scale-legacy/CHANGELOG.md @@ -1,5 +1,11 @@ # Change Log +## 1.11.0 + +### Minor Changes + +- [#12](https://github.com/cultureamp/kaizen-legacy/pull/12) [`86b4ad0`](https://github.com/cultureamp/kaizen-legacy/commit/86b4ad0df023d830c2d0636e003afd23fcef4b58) - Fix RTL styles like Likert Scale + ## 1.10.58 ### Patch Changes diff --git a/draft-packages/likert-scale-legacy/KaizenDraft/LikertScaleLegacy/LikertScaleLegacy.module.scss b/draft-packages/likert-scale-legacy/KaizenDraft/LikertScaleLegacy/LikertScaleLegacy.module.scss index fe064b8..0c5eaaa 100644 --- a/draft-packages/likert-scale-legacy/KaizenDraft/LikertScaleLegacy/LikertScaleLegacy.module.scss +++ b/draft-packages/likert-scale-legacy/KaizenDraft/LikertScaleLegacy/LikertScaleLegacy.module.scss @@ -33,39 +33,53 @@ $fifth: $color-red-500; -webkit-animation: pop cubic-bezier(0, 0.94, 0.32, 1) 0.7s 1; } +@mixin right-likert-item($height) { + border-top-right-radius: $height; + border-bottom-right-radius: $height; +} + +@mixin left-likert-item($height) { + border-top-left-radius: $height; + border-bottom-left-radius: $height; +} + @mixin fill($height) { &:first-child .likertItemFill { - border-top-left-radius: $height; - border-bottom-left-radius: $height; + @include left-likert-item($height); [dir="rtl"] & { - border-radius: $height 0; + border-radius: 0; + + @include right-likert-item($height); } &::after { - border-top-left-radius: $height; - border-bottom-left-radius: $height; + @include left-likert-item($height); [dir="rtl"] & { - border-radius: $height 0; + border-radius: 0; + + @include right-likert-item($height); } } } &:last-child .likertItemFill { - border-top-right-radius: $height; - border-bottom-right-radius: $height; + @include right-likert-item($height); [dir="rtl"] & { - border-radius: 0 $height; + border-radius: 0; + + @include left-likert-item($height); } &::after { - border-top-right-radius: $height; - border-bottom-right-radius: $height; + @include right-likert-item($height); [dir="rtl"] & { - border-radius: 0 $height; + border-radius: 0; + + @include left-likert-item($height); } } } @@ -145,8 +159,13 @@ $fifth: $color-red-500; &[dir="rtl"], [dir="rtl"] & { - margin-right: 2px; - margin-left: 2px; + &:first-child { + margin-left: 2px; + } + + &:last-child { + margin-right: 2px; + } } @include fill($block-height); diff --git a/draft-packages/likert-scale-legacy/docs/LikertScaleLegacy.stories.tsx b/draft-packages/likert-scale-legacy/docs/LikertScaleLegacy.stories.tsx index cf08f78..4d5058a 100644 --- a/draft-packages/likert-scale-legacy/docs/LikertScaleLegacy.stories.tsx +++ b/draft-packages/likert-scale-legacy/docs/LikertScaleLegacy.stories.tsx @@ -78,9 +78,10 @@ DefaultStory.args = { labelId: "456", } -const StickerSheetTemplate: StoryFn<{ isReversed: boolean }> = ({ - isReversed, -}) => { +const StickerSheetTemplate: StoryFn<{ + isReversed: boolean + textDirection: "ltr" | "rtl" +}> = ({ isReversed }) => { const SectionHeading = ({ heading }: { heading: string }): JSX.Element => ( {heading} @@ -176,3 +177,25 @@ StickerSheetReversed.parameters = { chromatic: { disable: false }, controls: { disable: true }, } + +export const StickerSheetRTL = StickerSheetTemplate.bind({}) +StickerSheetRTL.storyName = "Sticker Sheet (RTL)" +StickerSheetRTL.args = { + textDirection: "rtl", // Global control; see storybook/preview.tsx +} +StickerSheetRTL.parameters = { + chromatic: { disable: false }, + controls: { disable: true }, +} + +export const StickerSheetReversedRTL = StickerSheetTemplate.bind({}) +StickerSheetReversedRTL.storyName = "Sticker Sheet (Reversed & RTL)" +StickerSheetReversedRTL.args = { + isReversed: true, + textDirection: "rtl", // Global control; see storybook/preview.tsx +} +StickerSheetReversedRTL.parameters = { + backgrounds: { default: "Purple 700" }, + chromatic: { disable: false }, + controls: { disable: true }, +} diff --git a/draft-packages/likert-scale-legacy/package.json b/draft-packages/likert-scale-legacy/package.json index fd4c133..1132bd5 100644 --- a/draft-packages/likert-scale-legacy/package.json +++ b/draft-packages/likert-scale-legacy/package.json @@ -1,6 +1,6 @@ { "name": "@kaizen/draft-likert-scale-legacy", - "version": "1.10.58", + "version": "1.11.0", "description": "The draft likert-scale component", "scripts": { "prepublishOnly": "tsc --project tsconfig.dist.json", @@ -9,11 +9,11 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/cultureamp/kaizen-design-system.git", + "url": "git+https://github.com/cultureamp/kaizen-legacy.git", "directory": "draft-packages/likert-scale-legacy" }, "bugs": { - "url": "https://github.com/cultureamp/kaizen-design-system/issues" + "url": "https://github.com/cultureamp/kaizen-legacy/issues" }, "files": [ "**/*.js", diff --git a/draft-packages/menu/package.json b/draft-packages/menu/package.json index 2e22649..e6bc880 100644 --- a/draft-packages/menu/package.json +++ b/draft-packages/menu/package.json @@ -9,11 +9,11 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/cultureamp/kaizen-design-system.git", + "url": "git+https://github.com/cultureamp/kaizen-legacy.git", "directory": "draft-packages/menu" }, "bugs": { - "url": "https://github.com/cultureamp/kaizen-design-system/issues" + "url": "https://github.com/cultureamp/kaizen-legacy/issues" }, "files": [ "**/*.js", diff --git a/draft-packages/modal/package.json b/draft-packages/modal/package.json index 39b9d99..e5221bb 100644 --- a/draft-packages/modal/package.json +++ b/draft-packages/modal/package.json @@ -9,11 +9,11 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/cultureamp/kaizen-design-system.git", + "url": "git+https://github.com/cultureamp/kaizen-legacy.git", "directory": "draft-packages/modal" }, "bugs": { - "url": "https://github.com/cultureamp/kaizen-design-system/issues" + "url": "https://github.com/cultureamp/kaizen-legacy/issues" }, "files": [ "**/*.js", diff --git a/draft-packages/page-layout/package.json b/draft-packages/page-layout/package.json index 31cfb1e..5aa74e9 100644 --- a/draft-packages/page-layout/package.json +++ b/draft-packages/page-layout/package.json @@ -9,11 +9,11 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/cultureamp/kaizen-design-system.git", + "url": "git+https://github.com/cultureamp/kaizen-legacy.git", "directory": "draft-packages/page-layout" }, "bugs": { - "url": "https://github.com/cultureamp/kaizen-design-system/issues" + "url": "https://github.com/cultureamp/kaizen-legacy/issues" }, "files": [ "**/*.js", diff --git a/draft-packages/popover/package.json b/draft-packages/popover/package.json index bfee7e5..9b78a14 100644 --- a/draft-packages/popover/package.json +++ b/draft-packages/popover/package.json @@ -9,11 +9,11 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/cultureamp/kaizen-design-system.git", + "url": "git+https://github.com/cultureamp/kaizen-legacy.git", "directory": "draft-packages/popover" }, "bugs": { - "url": "https://github.com/cultureamp/kaizen-design-system/issues" + "url": "https://github.com/cultureamp/kaizen-legacy/issues" }, "files": [ "**/*.js", diff --git a/draft-packages/select/package.json b/draft-packages/select/package.json index ddc5a5f..c6dffb5 100644 --- a/draft-packages/select/package.json +++ b/draft-packages/select/package.json @@ -9,11 +9,11 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/cultureamp/kaizen-design-system.git", + "url": "git+https://github.com/cultureamp/kaizen-legacy.git", "directory": "draft-packages/select" }, "bugs": { - "url": "https://github.com/cultureamp/kaizen-design-system/issues" + "url": "https://github.com/cultureamp/kaizen-legacy/issues" }, "files": [ "**/*.js", diff --git a/draft-packages/table/CHANGELOG.md b/draft-packages/table/CHANGELOG.md index 1084919..3f9798d 100644 --- a/draft-packages/table/CHANGELOG.md +++ b/draft-packages/table/CHANGELOG.md @@ -1,5 +1,14 @@ # Change Log +## 5.9.5 + +### Patch Changes + +- [#19](https://github.com/cultureamp/kaizen-legacy/pull/19) [`130cb0c`](https://github.com/cultureamp/kaizen-legacy/commit/130cb0cc61b864fcbe2aac0291381212240be6f2) - fix checkbox focus on table header row + +- Updated dependencies [[`a8c5121`](https://github.com/cultureamp/kaizen-legacy/commit/a8c5121f200cfba7281e1b2e1298647771cd8e71)]: + - @kaizen/draft-form@10.5.0 + ## 5.9.4 ### Patch Changes diff --git a/draft-packages/table/KaizenDraft/Table/Table.module.scss b/draft-packages/table/KaizenDraft/Table/Table.module.scss index a3d2b0f..5f17291 100644 --- a/draft-packages/table/KaizenDraft/Table/Table.module.scss +++ b/draft-packages/table/KaizenDraft/Table/Table.module.scss @@ -70,6 +70,10 @@ $row-height-data-variant: 48px; .headerRowCell .headerRowCellTooltip { display: flex; align-items: stretch; +} + +// overflow has to be set at this level as well as on the heading for some reason ¯\_(ツ)_/¯ +.headerRowCell.headerRowCellNoWrap .headerRowCellTooltip { overflow: hidden; } diff --git a/draft-packages/table/package.json b/draft-packages/table/package.json index 75614e1..4341cd1 100644 --- a/draft-packages/table/package.json +++ b/draft-packages/table/package.json @@ -1,6 +1,6 @@ { "name": "@kaizen/draft-table", - "version": "5.9.4", + "version": "5.9.5", "description": "The draft Table component", "scripts": { "prepublishOnly": "tsc --project tsconfig.dist.json", @@ -9,11 +9,11 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/cultureamp/kaizen-design-system.git", + "url": "git+https://github.com/cultureamp/kaizen-legacy.git", "directory": "draft-packages/table" }, "bugs": { - "url": "https://github.com/cultureamp/kaizen-design-system/issues" + "url": "https://github.com/cultureamp/kaizen-legacy/issues" }, "files": [ "**/*.js", @@ -27,7 +27,7 @@ "dependencies": { "@kaizen/component-base": "^1.1.7", "@kaizen/component-library": "^16.9.3", - "@kaizen/draft-form": "^10.4.9", + "@kaizen/draft-form": "^10.5.0", "@kaizen/draft-tooltip": "^5.4.47", "@kaizen/typography": "^2.3.11", "classnames": "^2.3.2" diff --git a/draft-packages/tabs/package.json b/draft-packages/tabs/package.json index 3b56560..1ad6aed 100644 --- a/draft-packages/tabs/package.json +++ b/draft-packages/tabs/package.json @@ -9,11 +9,11 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/cultureamp/kaizen-design-system.git", + "url": "git+https://github.com/cultureamp/kaizen-legacy.git", "directory": "draft-packages/tabs" }, "bugs": { - "url": "https://github.com/cultureamp/kaizen-design-system/issues" + "url": "https://github.com/cultureamp/kaizen-legacy/issues" }, "files": [ "**/*.js", diff --git a/draft-packages/tag/package.json b/draft-packages/tag/package.json index 1089699..5de51bd 100644 --- a/draft-packages/tag/package.json +++ b/draft-packages/tag/package.json @@ -9,11 +9,11 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/cultureamp/kaizen-design-system.git", + "url": "git+https://github.com/cultureamp/kaizen-legacy.git", "directory": "draft-packages/tag" }, "bugs": { - "url": "https://github.com/cultureamp/kaizen-design-system/issues" + "url": "https://github.com/cultureamp/kaizen-legacy/issues" }, "files": [ "**/*.js", diff --git a/draft-packages/tile/package.json b/draft-packages/tile/package.json index 169a36f..75724ae 100644 --- a/draft-packages/tile/package.json +++ b/draft-packages/tile/package.json @@ -9,11 +9,11 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/cultureamp/kaizen-design-system.git", + "url": "git+https://github.com/cultureamp/kaizen-legacy.git", "directory": "draft-packages/tile" }, "bugs": { - "url": "https://github.com/cultureamp/kaizen-design-system/issues" + "url": "https://github.com/cultureamp/kaizen-legacy/issues" }, "files": [ "**/*.js", diff --git a/draft-packages/title-block-zen/package.json b/draft-packages/title-block-zen/package.json index fb78079..fd1ad04 100644 --- a/draft-packages/title-block-zen/package.json +++ b/draft-packages/title-block-zen/package.json @@ -9,11 +9,11 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/cultureamp/kaizen-design-system.git", + "url": "git+https://github.com/cultureamp/kaizen-legacy.git", "directory": "draft-packages/title-block-zen" }, "bugs": { - "url": "https://github.com/cultureamp/kaizen-design-system/issues" + "url": "https://github.com/cultureamp/kaizen-legacy/issues" }, "files": [ "**/*.js", diff --git a/draft-packages/tooltip/package.json b/draft-packages/tooltip/package.json index f2fdb5d..83b0235 100644 --- a/draft-packages/tooltip/package.json +++ b/draft-packages/tooltip/package.json @@ -9,11 +9,11 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/cultureamp/kaizen-design-system.git", + "url": "git+https://github.com/cultureamp/kaizen-legacy.git", "directory": "draft-packages/tooltip" }, "bugs": { - "url": "https://github.com/cultureamp/kaizen-design-system/issues" + "url": "https://github.com/cultureamp/kaizen-legacy/issues" }, "files": [ "**/*.js", diff --git a/draft-packages/well/package.json b/draft-packages/well/package.json index 1082b9f..33df23f 100644 --- a/draft-packages/well/package.json +++ b/draft-packages/well/package.json @@ -9,11 +9,11 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/cultureamp/kaizen-design-system.git", + "url": "git+https://github.com/cultureamp/kaizen-legacy.git", "directory": "draft-packages/well" }, "bugs": { - "url": "https://github.com/cultureamp/kaizen-design-system/issues" + "url": "https://github.com/cultureamp/kaizen-legacy/issues" }, "files": [ "**/*.js", diff --git a/packages/a11y/package.json b/packages/a11y/package.json index f96d6b9..9097bf5 100644 --- a/packages/a11y/package.json +++ b/packages/a11y/package.json @@ -9,11 +9,11 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/cultureamp/kaizen-design-system.git", + "url": "git+https://github.com/cultureamp/kaizen-legacy.git", "directory": "packages/a11y" }, "bugs": { - "url": "https://github.com/cultureamp/kaizen-design-system/issues" + "url": "https://github.com/cultureamp/kaizen-legacy/issues" }, "files": [ "**/*.js", diff --git a/packages/brand-moment/package.json b/packages/brand-moment/package.json index 437d731..a7de1b0 100644 --- a/packages/brand-moment/package.json +++ b/packages/brand-moment/package.json @@ -9,11 +9,11 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/cultureamp/kaizen-design-system.git", + "url": "git+https://github.com/cultureamp/kaizen-legacy.git", "directory": "packages/brand-moment" }, "bugs": { - "url": "https://github.com/cultureamp/kaizen-design-system/issues" + "url": "https://github.com/cultureamp/kaizen-legacy/issues" }, "files": [ "**/*.js", diff --git a/packages/brand/package.json b/packages/brand/package.json index 5050ac1..a6424dc 100644 --- a/packages/brand/package.json +++ b/packages/brand/package.json @@ -9,11 +9,11 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/cultureamp/kaizen-design-system.git", + "url": "git+https://github.com/cultureamp/kaizen-legacy.git", "directory": "packages/brand" }, "bugs": { - "url": "https://github.com/cultureamp/kaizen-design-system/issues" + "url": "https://github.com/cultureamp/kaizen-legacy/issues" }, "files": [ "**/*.js", diff --git a/packages/button/docs/Button.stories.tsx b/packages/button/docs/Button.stories.tsx index 9ee19a0..77abf58 100644 --- a/packages/button/docs/Button.stories.tsx +++ b/packages/button/docs/Button.stories.tsx @@ -28,7 +28,7 @@ const meta = { ], resourceLinks: { sourceCode: - "https://github.com/cultureamp/kaizen-design-system/tree/master/packages/button", + "https://github.com/cultureamp/kaizen-legacy/tree/main/packages/button", figma: "https://www.figma.com/file/eZKEE5kXbEMY3lx84oz8iN/%E2%9D%A4%EF%B8%8F-UI-Kit%3A-Heart?node-id=1929%3A17364", designGuidelines: diff --git a/packages/button/package.json b/packages/button/package.json index cfb463b..0f59078 100644 --- a/packages/button/package.json +++ b/packages/button/package.json @@ -9,11 +9,11 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/cultureamp/kaizen-design-system.git", + "url": "git+https://github.com/cultureamp/kaizen-legacy.git", "directory": "packages/button" }, "bugs": { - "url": "https://github.com/cultureamp/kaizen-design-system/issues" + "url": "https://github.com/cultureamp/kaizen-legacy/issues" }, "files": [ "**/*.js", diff --git a/packages/component-base/package.json b/packages/component-base/package.json index a11ab17..3ffe0df 100644 --- a/packages/component-base/package.json +++ b/packages/component-base/package.json @@ -9,11 +9,11 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/cultureamp/kaizen-design-system.git", + "url": "git+https://github.com/cultureamp/kaizen-legacy.git", "directory": "packages/component-base" }, "bugs": { - "url": "https://github.com/cultureamp/kaizen-design-system/issues" + "url": "https://github.com/cultureamp/kaizen-legacy/issues" }, "files": [ "**/*.js", diff --git a/packages/component-library/package.json b/packages/component-library/package.json index cd3b245..6a92efb 100644 --- a/packages/component-library/package.json +++ b/packages/component-library/package.json @@ -1,14 +1,14 @@ { "name": "@kaizen/component-library", "description": "Component Library for Culture Amp's Kaizen Design System", - "homepage": "https://github.com/cultureamp/kaizen-design-system/tree/main/packages/component-library", + "homepage": "https://github.com/cultureamp/kaizen-legacy/tree/main/packages/component-library", "repository": { "type": "git", - "url": "git+https://github.com/cultureamp/kaizen-design-system.git", + "url": "git+https://github.com/cultureamp/kaizen-legacy.git", "directory": "packages/component-library" }, "bugs": { - "url": "https://github.com/cultureamp/kaizen-design-system/issues" + "url": "https://github.com/cultureamp/kaizen-legacy/issues" }, "files": [ "**/*.js", diff --git a/packages/date-picker/CHANGELOG.md b/packages/date-picker/CHANGELOG.md index 0c4a167..c0779f1 100644 --- a/packages/date-picker/CHANGELOG.md +++ b/packages/date-picker/CHANGELOG.md @@ -1,5 +1,28 @@ # Change Log +## 6.3.2 + +### Patch Changes + +- [#24](https://github.com/cultureamp/kaizen-legacy/pull/24) [`948b07c`](https://github.com/cultureamp/kaizen-legacy/commit/948b07c671aa8c364741ee2fe1bc5aeb47d96a0a) - Align spacing and disabled state with DatePicker + +## 6.3.1 + +### Patch Changes + +- [#20](https://github.com/cultureamp/kaizen-legacy/pull/20) [`40474b5`](https://github.com/cultureamp/kaizen-legacy/commit/40474b5345f913876bf9574a5d2372d6f3d7d914) - align text right for rtl + +## 6.3.0 + +### Minor Changes + +- [#16](https://github.com/cultureamp/kaizen-legacy/pull/16) [`a8c5121`](https://github.com/cultureamp/kaizen-legacy/commit/a8c5121f200cfba7281e1b2e1298647771cd8e71) - add margin top to input and button to match labels from other components + +### Patch Changes + +- Updated dependencies [[`a8c5121`](https://github.com/cultureamp/kaizen-legacy/commit/a8c5121f200cfba7281e1b2e1298647771cd8e71)]: + - @kaizen/draft-form@10.5.0 + ## 6.2.5 ### Patch Changes diff --git a/packages/date-picker/package.json b/packages/date-picker/package.json index b09fff6..dbd1d7a 100644 --- a/packages/date-picker/package.json +++ b/packages/date-picker/package.json @@ -1,6 +1,6 @@ { "name": "@kaizen/date-picker", - "version": "6.2.5", + "version": "6.3.2", "description": "Date Picker component", "scripts": { "prepublishOnly": "tsc --project tsconfig.dist.json", @@ -9,11 +9,11 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/cultureamp/kaizen-design-system.git", + "url": "git+https://github.com/cultureamp/kaizen-legacy.git", "directory": "packages/date-picker" }, "bugs": { - "url": "https://github.com/cultureamp/kaizen-design-system/issues" + "url": "https://github.com/cultureamp/kaizen-legacy/issues" }, "files": [ "**/*.js", @@ -28,7 +28,7 @@ "@internationalized/date": "^3.4.0", "@kaizen/a11y": "^1.7.12", "@kaizen/component-base": "^1.1.7", - "@kaizen/draft-form": "^10.4.9", + "@kaizen/draft-form": "^10.5.0", "@kaizen/draft-tooltip": "^5.4.47", "@kaizen/typography": "^2.3.11", "@popperjs/core": "^2.11.8", diff --git a/packages/date-picker/src/DateRangePicker/DateRangePicker.module.scss b/packages/date-picker/src/DateRangePicker/DateRangePicker.module.scss index bc5fd01..4bc83e0 100644 --- a/packages/date-picker/src/DateRangePicker/DateRangePicker.module.scss +++ b/packages/date-picker/src/DateRangePicker/DateRangePicker.module.scss @@ -31,8 +31,13 @@ $placeholder-opacity: 0.7; background-clip: padding-box; border: $border-solid-border-width $border-solid-border-style $color-gray-500; border-radius: $border-solid-border-radius; + margin-top: $spacing-6; padding: 0 $button-base-padding-horizontal; + [dir="rtl"] & { + text-align: right; + } + &:focus-visible:not([disabled]), &:hover:not([disabled]) { background-color: $color-gray-200; diff --git a/packages/date-picker/src/TimeField/TimeField.module.scss b/packages/date-picker/src/TimeField/TimeField.module.scss index 53cae56..715a159 100644 --- a/packages/date-picker/src/TimeField/TimeField.module.scss +++ b/packages/date-picker/src/TimeField/TimeField.module.scss @@ -22,6 +22,10 @@ $story-className--timefield-focus: ":global(.story__timefield-focus)"; color: $color-purple-800; } +.heading { + margin-bottom: $spacing-6; +} + .input { display: inline-flex; align-items: center; diff --git a/packages/date-picker/src/TimeField/TimeField.tsx b/packages/date-picker/src/TimeField/TimeField.tsx index 4658356..a5c527d 100644 --- a/packages/date-picker/src/TimeField/TimeField.tsx +++ b/packages/date-picker/src/TimeField/TimeField.tsx @@ -97,7 +97,15 @@ const TimeFieldComponent = ({ ) return (
- + {label}
diff --git a/packages/date-picker/src/_subcomponents/DateInput/DateInput.module.scss b/packages/date-picker/src/_subcomponents/DateInput/DateInput.module.scss index 8b3a7df..4ab9add 100644 --- a/packages/date-picker/src/_subcomponents/DateInput/DateInput.module.scss +++ b/packages/date-picker/src/_subcomponents/DateInput/DateInput.module.scss @@ -1,3 +1,9 @@ +@import "~@kaizen/design-tokens/sass/spacing"; + .dateInput { width: 100%; } + +.input { + margin-top: $spacing-6; +} diff --git a/packages/date-picker/src/_subcomponents/DateInput/DateInput.tsx b/packages/date-picker/src/_subcomponents/DateInput/DateInput.tsx index 2d8311a..a7ebec4 100644 --- a/packages/date-picker/src/_subcomponents/DateInput/DateInput.tsx +++ b/packages/date-picker/src/_subcomponents/DateInput/DateInput.tsx @@ -34,6 +34,7 @@ export const DateInput = React.forwardRef( inputRef={isRefObject(ref) ? ref : undefined} id={id} autoComplete="off" + classNameOverride={styles.input} disabled={disabled} reversed={isReversed} {...inputProps} diff --git a/packages/deprecated-component-library-helpers/package.json b/packages/deprecated-component-library-helpers/package.json index f55ee5d..a6ce444 100644 --- a/packages/deprecated-component-library-helpers/package.json +++ b/packages/deprecated-component-library-helpers/package.json @@ -1,13 +1,13 @@ { "name": "@kaizen/deprecated-component-library-helpers", "version": "2.5.8", - "homepage": "https://github.com/cultureamp/kaizen-design-system/tree/main/packages/deprecated-comonent-library-helpers", + "homepage": "https://github.com/cultureamp/kaizen-legacy/tree/main/packages/deprecated-comonent-library-helpers", "repository": { "type": "git", - "url": "git+https://github.com/cultureamp/kaizen-design-system.git" + "url": "git+https://github.com/cultureamp/kaizen-legacy.git" }, "bugs": { - "url": "https://github.com/cultureamp/kaizen-design-system/issues" + "url": "https://github.com/cultureamp/kaizen-legacy/issues" }, "files": [ "**/*" diff --git a/packages/loading-skeleton/package.json b/packages/loading-skeleton/package.json index 629d3af..7f574ec 100644 --- a/packages/loading-skeleton/package.json +++ b/packages/loading-skeleton/package.json @@ -9,11 +9,11 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/cultureamp/kaizen-design-system.git", + "url": "git+https://github.com/cultureamp/kaizen-legacy.git", "directory": "packages/loading-skeleton" }, "bugs": { - "url": "https://github.com/cultureamp/kaizen-design-system/issues" + "url": "https://github.com/cultureamp/kaizen-legacy/issues" }, "files": [ "**/*.js", diff --git a/packages/loading-spinner/package.json b/packages/loading-spinner/package.json index bbf8491..e950c37 100644 --- a/packages/loading-spinner/package.json +++ b/packages/loading-spinner/package.json @@ -9,11 +9,11 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/cultureamp/kaizen-design-system.git", + "url": "git+https://github.com/cultureamp/kaizen-legacy.git", "directory": "packages/loading-spinner" }, "bugs": { - "url": "https://github.com/cultureamp/kaizen-design-system/issues" + "url": "https://github.com/cultureamp/kaizen-legacy/issues" }, "files": [ "**/*.js", diff --git a/packages/notification/package.json b/packages/notification/package.json index acab931..8abdfb9 100644 --- a/packages/notification/package.json +++ b/packages/notification/package.json @@ -9,11 +9,11 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/cultureamp/kaizen-design-system.git", + "url": "git+https://github.com/cultureamp/kaizen-legacy.git", "directory": "packages/notification" }, "bugs": { - "url": "https://github.com/cultureamp/kaizen-design-system/issues" + "url": "https://github.com/cultureamp/kaizen-legacy/issues" }, "files": [ "**/*.js", diff --git a/packages/pagination/package.json b/packages/pagination/package.json index 02e3ff2..f06de5e 100644 --- a/packages/pagination/package.json +++ b/packages/pagination/package.json @@ -9,11 +9,11 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/cultureamp/kaizen-design-system.git", + "url": "git+https://github.com/cultureamp/kaizen-legacy.git", "directory": "packages/pagination" }, "bugs": { - "url": "https://github.com/cultureamp/kaizen-design-system/issues" + "url": "https://github.com/cultureamp/kaizen-legacy/issues" }, "files": [ "**/*.js", diff --git a/packages/progress-bar/package.json b/packages/progress-bar/package.json index 2048cbd..36b0e3d 100644 --- a/packages/progress-bar/package.json +++ b/packages/progress-bar/package.json @@ -9,11 +9,11 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/cultureamp/kaizen-design-system.git", + "url": "git+https://github.com/cultureamp/kaizen-legacy.git", "directory": "packages/progress-bar" }, "bugs": { - "url": "https://github.com/cultureamp/kaizen-design-system/issues" + "url": "https://github.com/cultureamp/kaizen-legacy/issues" }, "files": [ "**/*.js", diff --git a/packages/responsive/package.json b/packages/responsive/package.json index 2f20e91..e547c28 100644 --- a/packages/responsive/package.json +++ b/packages/responsive/package.json @@ -9,11 +9,11 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/cultureamp/kaizen-design-system.git", + "url": "git+https://github.com/cultureamp/kaizen-legacy.git", "directory": "packages/responsive" }, "bugs": { - "url": "https://github.com/cultureamp/kaizen-design-system/issues" + "url": "https://github.com/cultureamp/kaizen-legacy/issues" }, "files": [ "**/*.js", diff --git a/packages/rich-text-editor/CHANGELOG.md b/packages/rich-text-editor/CHANGELOG.md index e9da613..aeb2df4 100644 --- a/packages/rich-text-editor/CHANGELOG.md +++ b/packages/rich-text-editor/CHANGELOG.md @@ -1,5 +1,29 @@ # Change Log +## 3.0.0 + +### Major Changes + +- [#29](https://github.com/cultureamp/kaizen-legacy/pull/29) [`c377231`](https://github.com/cultureamp/kaizen-legacy/commit/c37723116f29b628631ff0298ae64841c9c3a882) - Rename `value` prop to reflect uncontrolled form field + + To conform to React naming convention for form control props. + Uncontrolled form fields take a `defaultValue` to indicate that + changes to this prop's value will not update the mounted component. + Rather, the component manages its current value as internal state, + and notifies subscribers via `onChange` when it changes. + + Consumers will need to update their code to the new prop name. E.g. before: + + ```jsx + + ``` + + and after: + + ```jsx + + ``` + ## 2.2.11 ### Patch Changes diff --git a/packages/rich-text-editor/docs/EditableRichTextContent.stories.tsx b/packages/rich-text-editor/docs/EditableRichTextContent.stories.tsx index be237ce..5e93257 100644 --- a/packages/rich-text-editor/docs/EditableRichTextContent.stories.tsx +++ b/packages/rich-text-editor/docs/EditableRichTextContent.stories.tsx @@ -60,7 +60,7 @@ function InlineEditor(props: { { name: "bulletList", group: "list" }, { name: "link", group: "link" }, ]} - value={rteData} + defaultValue={rteData} onChange={handleOnChange} /> diff --git a/packages/rich-text-editor/docs/RichTextEditor.stories.tsx b/packages/rich-text-editor/docs/RichTextEditor.stories.tsx index 3c8de1b..6e86e34 100644 --- a/packages/rich-text-editor/docs/RichTextEditor.stories.tsx +++ b/packages/rich-text-editor/docs/RichTextEditor.stories.tsx @@ -9,7 +9,7 @@ import dummyContent from "./dummyContent.json" import dummyMalformedContent from "./dummyMalformedContent.json" type RTEStory = StoryFn< - Omit + Omit > export default { @@ -32,7 +32,7 @@ export const Default: RTEStory = ({ labelText, ...args }) => { return ( @@ -60,7 +60,7 @@ export const WithData: RTEStory = ({ labelText, ...args }) => { return ( @@ -89,7 +89,7 @@ export const WithBadData: RTEStory = ({ labelText, ...args }) => { return ( @@ -121,14 +121,14 @@ export const WithDescriptionAndValidationMessage: RTEStory = ({ <> { } const TestRTE = ( - args: Omit & { - rteMockData?: RichTextEditorProps["value"] + args: Omit< + RichTextEditorProps, + "defaultValue" | "onChange" | "aria-labelledby" + > & { + rteMockData?: RichTextEditorProps["defaultValue"] } ): JSX.Element => { const { rteMockData, ...rest } = args @@ -34,7 +37,7 @@ const TestRTE = ( { name: "orderedList", group: "list" }, { name: "bulletList", group: "list" }, ]} - value={rteData} + defaultValue={rteData} onChange={handleOnChange} {...rest} /> diff --git a/packages/rich-text-editor/src/RichTextEditor/RichTextEditor.tsx b/packages/rich-text-editor/src/RichTextEditor/RichTextEditor.tsx index 017dff9..a13c33b 100644 --- a/packages/rich-text-editor/src/RichTextEditor/RichTextEditor.tsx +++ b/packages/rich-text-editor/src/RichTextEditor/RichTextEditor.tsx @@ -23,10 +23,10 @@ import styles from "./RichTextEditor.module.scss" export interface BaseRichTextEditorProps extends OverrideClassName< - Omit, "onChange" | "content"> + Omit, "onChange" | "defaultValue"> > { onChange: (content: ProseMirrorState.EditorState) => void - value: EditorContentArray + defaultValue: EditorContentArray controls?: ToolbarItems[] /** * Sets a default min-height for the editable area in units of body paragraph line height, similar to the 'rows' attribute on